:root {
    --color-bg-top: #050607;
    --color-bg-mid: #111719;
    --color-bg-bottom: #020303;
    --color-surface: rgba(43, 57, 59, 0.24);
    --color-surface-alt: rgba(72, 126, 120, 0.14);
    --color-surface-soft: rgba(230, 247, 244, 0.1);
    --color-sidebar: rgba(17, 23, 25, 0.34);
    --color-sidebar-panel: rgba(13, 18, 20, 0.62);
    --color-sidebar-text: #eef2ff;
    --color-sidebar-text-soft: rgba(232, 244, 242, 0.68);
    --color-card: rgba(18, 25, 27, 0.52);
    --color-card-strong: #42b8aa;
    --color-card-deep: rgba(9, 14, 15, 0.78);
    --color-accent: #9ee7dd;
    --color-text: #eef6f5;
    --color-text-soft: rgba(232, 244, 242, 0.72);
    --color-text-strong: #ffffff;
    --color-button: rgba(48, 126, 118, 0.88);
    --color-button-hover: rgba(66, 184, 170, 0.94);
    --color-border: rgba(230, 247, 244, 0.12);
    --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.42);
    --blur-strong: blur(28px);
    --radius: 16px;
    --sidebar-width: 288px;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
    min-height: 100%;
}

body {
    height: 100%;
    min-height: 100%;
    margin: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0%, rgba(8, 12, 14, 0.22) 42%, rgba(0, 0, 0, 0.72) 100%),
        radial-gradient(circle at 12% 18%, rgba(190, 220, 215, 0.22), transparent 24%),
        radial-gradient(circle at 82% 22%, rgba(48, 126, 118, 0.24), transparent 28%),
        radial-gradient(circle at 72% 82%, rgba(90, 105, 110, 0.22), transparent 30%),
        linear-gradient(145deg, var(--color-bg-top) 0%, var(--color-bg-mid) 46%, var(--color-bg-bottom) 100%);
    color: var(--color-text);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(92px);
    opacity: 0.62;
    z-index: 0;
}

body::before {
    top: 90px;
    left: -140px;
    width: 430px;
    height: 430px;
    background: rgba(190, 220, 215, 0.2);
}

body::after {
    right: -120px;
    bottom: -40px;
    width: 460px;
    height: 460px;
    background: rgba(48, 126, 118, 0.24);
}

a {
    color: inherit;
    text-decoration: none;
}

.menu-toggle,
.sidebar-backdrop {
    display: none;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    min-height: 0;
    padding: 15px;
    background: transparent;
    color: var(--color-sidebar-text);
    overflow: hidden;
}

.sidebar-panel {
    min-height: 0;
    border-radius: calc(var(--radius) + 2px);
    background: var(--color-sidebar-panel);
    box-shadow: var(--shadow-soft);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border: 1px solid var(--color-border);
    padding: 18px;
}

.sidebar-menu {
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 44px;
    margin-bottom: 24px;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-sidebar-text);
}

.brand span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-sidebar-text);
}

.nav-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(226, 233, 255, 0.28) transparent;
}

.nav-list > li {
    flex: 0 0 auto;
}

.nav-list::-webkit-scrollbar {
    width: 7px;
}

.nav-list::-webkit-scrollbar-track {
    background: transparent;
}

.nav-list::-webkit-scrollbar-thumb {
    border-radius: 2px;
    background: rgba(226, 233, 255, 0.22);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--color-sidebar-text);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link span {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Regra de hover: nunca aplicar hover em containers de pagina inteira.
   Validar novos hovers para que fiquem restritos a elementos acionaveis
   ou boxes de conteudo, como botoes, links, linhas e cards especificos. */
.nav-link.is-active,
.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

.nav-link-muted {
    color: var(--color-sidebar-text-soft);
}

.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.app-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 15px;
    overflow: hidden;
}

.page-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    flex: 1;
    gap: 18px;
    min-height: 0;
    max-height: 100%;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(226, 233, 255, 0.28) transparent;
    scrollbar-gutter: stable;
}

.page-panel::-webkit-scrollbar {
    width: 8px;
}

.page-panel::-webkit-scrollbar-track {
    background: transparent;
}

.page-panel::-webkit-scrollbar-track-piece:start {
    margin-top: 10px;
}

.page-panel::-webkit-scrollbar-track-piece:end {
    margin-bottom: 10px;
}

.page-panel::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.page-panel::-webkit-scrollbar-thumb {
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 2px;
    background: rgba(226, 233, 255, 0.22);
    background-clip: padding-box;
}

.page-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(226, 233, 255, 0.34);
    background-clip: padding-box;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-radius: calc(var(--radius) + 2px);
    background: var(--color-sidebar-panel);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border: 1px solid var(--color-border);
}

.page-header h1 {
    margin: 0;
    font-size: 26px;
    color: var(--color-text-strong);
}

.page-header p {
    margin: 6px 0 0;
    color: var(--color-text-soft);
    max-width: 60ch;
}

.content-grid {
    display: grid;
    gap: 16px;
    min-width: 0;
    min-height: 0;
}

.card,
.subcard {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--color-sidebar-panel);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.card-header,
.card-body,
.subcard-header,
.subcard-body {
    min-width: 0;
    padding: 18px;
}

.card-header,
.subcard-header {
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
    background: rgba(230, 247, 244, 0.06);
}

.card-title {
    margin: 0;
    font-size: 18px;
    color: var(--color-text-strong);
}

.table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    background: transparent;
}

.table th,
.table td {
    padding: 12px 14px;
    text-align: left;
    white-space: nowrap;
}

.table th {
    color: var(--color-text-soft);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr + tr td {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 221, 163, 0.18);
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 700;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 10px 14px;
    border: 0;
    border-radius: var(--radius);
    background: var(--color-button);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(48, 126, 118, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    background: var(--color-button-hover);
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(48, 126, 118, 0.28);
}

.button-full {
    width: 100%;
}

.button-ghost {
    min-height: 34px;
    background: var(--color-card-deep);
    color: #fff8f2;
}

.button-ghost:hover {
    background: rgba(42, 31, 25, 0.86);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    place-items: center;
    padding: 24px;
}

.auth-panel {
    width: min(420px, 100%);
    border-radius: var(--radius);
    background: var(--color-sidebar-panel);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border: 1px solid var(--color-border);
    padding: 28px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    font-size: 18px;
}

.auth-heading {
    margin-bottom: 20px;
}

.auth-heading h1 {
    margin: 0;
    font-size: 28px;
    color: var(--color-text-strong);
}

.auth-heading p {
    margin: 6px 0 0;
    color: var(--color-text-soft);
}

.form-stack {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.field input {
    width: 100%;
    min-height: 42px;
    border-radius: var(--radius);
    padding: 9px 11px;
    color: var(--color-text);
    font: inherit;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.field select {
    width: 100%;
    min-height: 42px;
    border-radius: var(--radius);
    padding: 9px 11px;
    color: var(--color-text);
    font: inherit;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.field select option {
    color: #111827;
}

.field input:focus,
.field select:focus {
    outline: 3px solid rgba(255, 221, 163, 0.18);
}

.card-subtitle {
    margin: 4px 0 0;
    color: var(--color-text-soft);
    font-size: 13px;
}

.users-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
    align-items: start;
}

.list-toolbar,
.editor-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.subcard-header.list-toolbar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 56px;
    height: 56px;
    padding: 6px 12px;
    gap: 10px;
}

.subcard-header.list-toolbar > div:first-child {
    display: grid;
    gap: 2px;
}

.subcard-header.list-toolbar .card-title {
    font-size: 15px;
    line-height: 1.2;
}

.subcard-header.list-toolbar .card-subtitle {
    margin-top: 0;
    font-size: 12px;
    line-height: 1.2;
}

.subcard-header.list-toolbar .toolbar-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}

.list-toolbar > *,
.editor-heading > * {
    min-width: 0;
}

.toolbar-actions {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    max-width: 100%;
}

.search-field {
    display: grid;
    gap: 6px;
    flex: 1 1 220px;
    min-width: 0;
    max-width: 280px;
    color: var(--color-text-soft);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-field[hidden] {
    display: none;
}

.search-field-inline {
    flex: 0 1 300px;
    width: min(300px, 34vw);
    width: min(300px, 34dvw);
    max-width: 300px;
    text-transform: none;
    letter-spacing: 0;
}

.search-field input {
    min-height: 34px;
    border-radius: calc(var(--radius) - 4px);
    padding: 7px 10px;
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.search-field input:focus {
    outline: 3px solid rgba(255, 221, 163, 0.18);
}

.table-body-scroll {
    overflow-x: auto;
}

.users-page .content-grid {
    flex: 1;
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
}

.users-page {
    display: flex;
    flex-direction: column;
}

.users-list {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
}

.users-list .subcard-body {
    display: flex;
    flex: 1;
    min-height: 0;
    padding: 0;
}

.users-list .table-wrap {
    display: flex;
    flex: 1;
    min-height: 0;
}

.users-list .table {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
}

.fixed-body-table {
    min-width: 860px;
}

.fixed-body-table thead,
.fixed-body-table tbody,
.fixed-body-table tr {
    display: block;
}

.fixed-body-table tbody {
    max-height: 355px;
    overflow-y: auto;
    overflow-x: hidden;
}

.users-list .fixed-body-table tbody {
    height: auto;
    min-height: 240px;
    max-height: none;
}

.fixed-body-table tr {
    display: grid;
    align-items: center;
}

.users-table tr {
    grid-template-columns: minmax(150px, 1.1fr) minmax(220px, 1.4fr) minmax(130px, 0.9fr) minmax(92px, 0.6fr) minmax(150px, 1fr) 86px;
}

.fixed-body-table th,
.fixed-body-table td {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-empty-row td {
    grid-column: 1 / -1;
    color: var(--color-text-soft);
}

.badge-muted {
    background: rgba(226, 233, 255, 0.12);
    color: var(--color-text-soft);
}

.button-small {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 13px;
}

.button-icon {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
}

.button-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.button-icon.is-active {
    background: var(--color-button);
}

.subcard-header.list-toolbar .button {
    min-height: 34px;
    padding: 7px 11px;
}

.subcard-header.list-toolbar .button-icon {
    padding: 0;
}

@media (min-width: 981px) {
    .subcard-header.list-toolbar .button-icon {
        display: none;
    }
}

@media (max-width: 980px) {
    .subcard-header.list-toolbar {
        height: auto;
        min-height: 56px;
    }

    .subcard-header.list-toolbar .toolbar-actions {
        align-items: center;
        flex-wrap: wrap;
        justify-content: flex-end;
        max-width: min(100%, 420px);
    }

    .subcard-header.list-toolbar .search-field-inline {
        order: 3;
        display: none;
        flex: 1 1 100%;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
    }

    .subcard-header.list-toolbar.is-search-open .search-field-inline {
        display: grid;
    }
}

.tab-actions {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-button {
    min-height: 32px;
    border: 0;
    border-radius: calc(var(--radius) - 6px);
    padding: 7px 11px;
    color: var(--color-text-soft);
    font: inherit;
    font-weight: 700;
    background: transparent;
    cursor: pointer;
}

.tab-button.is-active {
    color: var(--color-text-strong);
    background: rgba(255, 255, 255, 0.14);
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-span-2 {
    grid-column: span 2;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 2px;
}

.permissions-list {
    display: grid;
    gap: 10px;
}

.permission-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
}

.permission-item small {
    color: var(--color-text-soft);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.permission-item input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-card-strong);
}

.empty-state {
    margin: 0;
    color: var(--color-text-soft);
}

.alert {
    margin-bottom: 16px;
    border-radius: var(--radius);
    padding: 11px 12px;
    font-weight: 700;
}

.alert-error {
    background: rgba(255, 143, 102, 0.18);
    color: var(--color-text-strong);
    border: 1px solid rgba(255, 143, 102, 0.22);
}

.alert-success {
    background: rgba(91, 214, 155, 0.16);
    color: var(--color-text-strong);
    border: 1px solid rgba(91, 214, 155, 0.22);
}

.footer {
    flex: 0 0 auto;
    margin-top: 2px;
    padding: 6px 10px;
    border-radius: 14px;
    background: var(--color-sidebar-panel);
    color: var(--color-text-soft);
    font-size: 11px;
    line-height: 1.2;
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border: 1px solid var(--color-border);
    text-align: right;
}

.icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    opacity: 0.88;
    filter: brightness(0) saturate(100%) invert(95%) sepia(28%) saturate(181%) hue-rotate(184deg) brightness(112%) contrast(100%);
}

.sidebar-user-footer {
    position: relative;
    text-align: left;
}

.sidebar-user-menu {
    position: relative;
}

.sidebar-user-menu summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-sidebar-text);
    list-style: none;
}

.sidebar-user-menu summary::-webkit-details-marker {
    display: none;
}

.sidebar-user-popover {
    display: grid;
    gap: 10px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user-popover strong {
    font-size: 13px;
    line-height: 1.25;
    color: var(--color-sidebar-text);
}

@media (max-width: 860px) {
    body.is-sidebar-open {
        overflow: hidden;
    }

    .menu-toggle {
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 40;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        border: 1px solid var(--color-border);
        border-radius: 14px;
        background: rgba(27, 23, 21, 0.72);
        box-shadow: var(--shadow-soft), var(--shadow-glow);
        backdrop-filter: var(--blur-strong);
        -webkit-backdrop-filter: var(--blur-strong);
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: var(--color-sidebar-text);
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .app-shell {
        grid-template-columns: 1fr;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 35;
        width: min(var(--sidebar-width), calc(100vw - 64px));
        width: min(var(--sidebar-width), calc(100dvw - 64px));
        height: 100vh;
        height: 100dvh;
        padding: 10px;
        overflow: hidden;
        transform: translateX(-100%);
        transition: transform 0.26s ease;
    }

    .is-sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 30;
        display: block;
        background: rgba(5, 4, 3, 0.64);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.26s ease;
    }

    .is-sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-menu {
        overflow: hidden;
    }

    .sidebar-panel {
        padding: 12px;
    }

    .brand {
        min-height: 38px;
        margin-bottom: 10px;
        font-size: 18px;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
    }

    .nav-list {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        padding-bottom: 0;
    }

    .app-main {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .app-content {
        display: flex;
        padding: 58px 8px 10px;
        overflow: hidden;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        border-radius: 12px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .page-header p {
        margin-top: 3px;
    }

    .page-panel {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 10px;
        max-height: 100%;
        overflow: auto;
    }

    .content-grid {
        gap: 10px;
    }

    .card,
    .subcard {
        border-radius: 12px;
    }

    .card-header,
    .subcard-header {
        border-radius: 11px 11px 0 0;
    }

    .card-header,
    .card-body,
    .subcard-header,
    .subcard-body {
        padding: 12px;
    }

    .card-title {
        font-size: 16px;
    }

    .users-layout {
        grid-template-columns: 1fr;
    }

    .list-toolbar,
    .editor-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .subcard-header.list-toolbar {
        height: auto;
        min-height: 56px;
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 8px 10px;
    }

    .search-field-inline {
        width: 100%;
        max-width: none;
    }

    .toolbar-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .subcard-header.list-toolbar .toolbar-actions {
        align-items: center;
        flex: 0 1 auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        width: auto;
        max-width: min(100%, 360px);
        margin-left: auto;
    }

    .subcard-header.list-toolbar .search-field-inline {
        flex: 1 1 100%;
        width: min(320px, 100%);
        max-width: 320px;
    }

    .subcard-header.list-toolbar .button:not(.button-icon) {
        flex: 0 0 auto;
    }

    .form-stack,
    .form-grid {
        gap: 10px;
    }

    .field {
        gap: 5px;
    }

    .field input,
    .field select,
    .search-field input {
        min-height: 38px;
        padding: 7px 9px;
    }

    .button {
        min-height: 36px;
        padding: 8px 11px;
    }

    .search-field {
        max-width: none;
    }

    .tab-actions {
        gap: 4px;
        padding: 3px;
        width: 100%;
    }

    .tab-button {
        flex: 1;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-span-2 {
        grid-column: auto;
    }

    .form-actions {
        gap: 8px;
        flex-direction: column-reverse;
    }
}
