:root {
    --nav: #13243a;
    --nav-soft: #1d3452;
    --primary: #1f5f8b;
    --primary-dark: #17486b;
    --primary-soft: #eaf3fa;
    --teal: #17766f;
    --amber: #a66f16;
    --violet: #6260a8;
    --gold: #b49145;
    --ink: #1f2a37;
    --muted: #667085;
    --line: #e4e7ec;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --page: #eef2f6;
    --danger: #b42318;
    --shadow: 0 14px 34px rgba(16, 24, 40, 0.08);
}

/* Atrio admin polish inspired by classic enterprise dashboard templates. */
:root {
    --nav: #1b1e2f;
    --nav-soft: #24283d;
    --primary: #246b9f;
    --primary-dark: #184f78;
    --primary-soft: #eaf5fb;
    --teal: #13806d;
    --amber: #b7791f;
    --gold: #c49a3c;
    --ink: #172033;
    --muted: #697386;
    --line: #e5e9f2;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --page: #f2f4f8;
    --danger: #b42318;
    --shadow: 0 16px 40px rgba(24, 34, 54, 0.08);
}

body {
    background: var(--page);
    color: var(--ink);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
}

.app-sidebar {
    gap: 1rem;
    background: var(--nav);
    padding: 0;
    box-shadow: 12px 0 28px rgba(21, 28, 46, 0.12);
}

.sidebar-brand {
    min-height: 78px;
    border-radius: 0;
    background: #181b2b;
    padding: 1rem 1.1rem;
}

.sidebar-brand img {
    width: 58px;
    height: 46px;
    border-radius: 6px;
    padding: 0.2rem;
}

.sidebar-brand strong {
    font-size: 1.18rem;
    font-weight: 800;
}

.sidebar-nav {
    gap: 0.25rem;
    padding: 0.45rem 0.75rem;
}

.sidebar-home,
.nav-group summary {
    min-height: 42px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.55rem 0.7rem;
}

.nav-group {
    border: 0;
    border-radius: 4px;
    background: transparent;
}

.sidebar-home:hover,
.nav-group summary:hover,
.sidebar-home.is-active,
.nav-group[open] summary {
    background: var(--nav-soft);
}

.nav-glyph {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    color: #9fd2ef;
    font-size: 0.72rem;
    font-weight: 900;
}

.nav-submenu {
    gap: 0.05rem;
    margin: 0.15rem 0 0.35rem 2.05rem;
    border-left-color: rgba(255, 255, 255, 0.14);
}

.nav-link {
    min-height: 32px;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer {
    margin: auto 0.75rem 0.75rem;
    border-top-color: rgba(255, 255, 255, 0.12);
    padding: 0.9rem 0 0;
}

.user-chip {
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.65rem;
}

.user-chip > span {
    border-radius: 6px;
    background: linear-gradient(135deg, #c49a3c, #9e7420);
}

.sidebar-actions a,
.sidebar-actions button {
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
}

.topbar {
    min-height: 150px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
    padding: 1.65rem 2rem 3.7rem;
}

.topbar h1 {
    font-size: 1.75rem;
    font-weight: 800;
}

.topbar-status {
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(24, 34, 54, 0.06);
}

.app-main {
    width: min(1400px, calc(100% - 3rem));
    margin-top: -2.55rem;
}

.overview-copy,
.overview-metrics,
.action-board,
.embed-panel,
.card,
.metric-card,
.filter-panel,
.form-card,
.table-card,
.module-card,
.link-card {
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.metric-card {
    min-height: 104px;
    border-top: 3px solid var(--primary);
}

.metric-card strong {
    font-size: 1.95rem;
}

.form-card {
    gap: 1rem;
    padding: 1.1rem;
}

.form-card h2,
.section-heading h2 {
    font-size: 1.08rem;
    font-weight: 800;
}

input,
select,
textarea {
    min-height: 42px;
    border-color: #d8deeb;
    border-radius: 4px;
    background: #fbfcfe;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(36, 107, 159, 0.12);
    outline: 0;
}

.action-button,
button {
    border-radius: 4px;
    box-shadow: 0 6px 14px rgba(36, 107, 159, 0.16);
}

.action-button--secondary {
    box-shadow: none;
}

.table-card {
    border: 0;
}

th {
    background: #fbfcfe;
    color: #56617a;
    font-size: 0.72rem;
}

td {
    background: #ffffff;
}

tbody tr:hover td {
    background: #fbfdff;
}

.status-badge {
    border-radius: 4px;
}

.user-edit summary {
    border-color: #d8deeb;
    background: #ffffff;
    color: var(--primary);
}

.user-edit form {
    border-radius: 6px;
}

.auth-screen .app-shell {
    display: block;
    min-height: 100vh;
}

.auth-screen .app-sidebar,
.auth-screen .topbar {
    display: none;
}

.auth-screen .app-main {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1fr);
    min-height: 100vh;
    background: #ffffff;
}

.auth-hero {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 0.9rem;
    min-height: 100%;
    background:
        linear-gradient(135deg, rgba(27, 30, 47, 0.94), rgba(36, 107, 159, 0.88)),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 28%);
    color: #ffffff;
    padding: clamp(2rem, 6vw, 5rem);
}

.auth-hero img {
    width: 96px;
    height: 74px;
    border-radius: 10px;
    background: #ffffff;
    object-fit: contain;
    padding: 0.35rem;
}

.auth-hero strong {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

.auth-hero span {
    max-width: 440px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
}

.auth-layout .auth-card {
    align-self: center;
    width: min(460px, calc(100% - 2rem));
    margin: 0 auto;
    border: 0;
    box-shadow: none;
}

.auth-kicker {
    display: inline-flex;
    margin-bottom: 0.55rem;
    color: var(--gold);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

@media (max-width: 1120px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        padding-bottom: 0.2rem;
    }

    .sidebar-brand {
        min-height: 64px;
        border-radius: 0;
    }

    .sidebar-nav {
        padding: 0 0.85rem 0.45rem;
    }
}

@media (max-width: 760px) {
    .topbar {
        padding: 1.15rem 1rem 3rem;
    }

    .app-main {
        width: min(100% - 1.25rem, 1400px);
    }

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

    .auth-hero {
        min-height: 220px;
        padding: 1.5rem;
    }

    .auth-hero img {
        width: 74px;
        height: 56px;
    }

    .auth-layout .auth-card {
        align-self: start;
        padding: 1.25rem;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: Verdana, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
}

.app-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    gap: 1.25rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--nav);
    color: #ffffff;
    padding: 1.15rem;
    z-index: 20;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 98px;
    border-radius: 12px;
    background: rgba(12, 16, 30, 0.36);
    color: #ffffff;
    padding: 0.75rem;
}

.sidebar-brand img {
    width: 86px;
    height: 60px;
    border-radius: 9px;
    background: #ffffff;
    object-fit: contain;
    padding: 0.38rem;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.sidebar-brand span,
.user-chip div {
    display: grid;
    min-width: 0;
}

.sidebar-brand strong {
    font-size: 1.4rem;
    letter-spacing: 0;
}

.sidebar-brand small,
.user-chip small {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav {
    display: grid;
    gap: 0.55rem;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.sidebar-home,
.nav-group summary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 42px;
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 800;
    padding: 0.55rem 0.65rem;
}

.sidebar-home:hover,
.nav-group summary:hover,
.sidebar-home.is-active,
.nav-group[open] summary {
    background: var(--nav-soft);
    color: #ffffff;
}

.nav-group {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.nav-group summary {
    cursor: pointer;
    list-style: none;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-glyph {
    display: inline-grid;
    width: 20px;
    flex: 0 0 20px;
    place-items: center;
    color: var(--gold);
    font-size: 0.92rem;
}

.nav-arrow {
    margin-left: auto;
    transform: rotate(0deg);
    transition: transform 0.16s ease;
}

.nav-group[open] .nav-arrow {
    transform: rotate(90deg);
}

.nav-submenu {
    display: grid;
    gap: 0.15rem;
    margin: 0 0.45rem 0.45rem 1.2rem;
    padding-left: 0.65rem;
    border-left: 1px dotted rgba(255, 255, 255, 0.24);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 36px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.4rem 0.55rem;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav-branch {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
}

.nav-link.is-active .nav-branch {
    background: var(--gold);
}

.sidebar-footer {
    display: grid;
    gap: 0.8rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.user-chip > span {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 8px;
    background: var(--gold);
    color: #ffffff;
    font-weight: 800;
}

.user-chip strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-actions {
    display: flex;
    gap: 0.4rem;
}

.sidebar-actions a,
.sidebar-actions button {
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.4rem 0.55rem;
}

.sidebar-actions form {
    margin: 0;
}

.app-workspace {
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 185px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    padding: 2rem 2.35rem 4.5rem;
}

.topbar h1 {
    margin: 0;
    color: var(--nav);
    font-size: 1.9rem;
    line-height: 1.2;
}

.topbar p {
    max-width: 760px;
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.topbar-status {
    display: grid;
    min-width: 140px;
    justify-items: end;
    gap: 0.25rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 0.75rem 0.9rem;
}

.topbar-status span {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.topbar-status strong {
    color: var(--nav);
}

.app-main {
    width: min(1280px, calc(100% - 3rem));
    margin: -3.2rem auto 0;
    padding: 0 0 3rem;
}

.eyebrow {
    display: inline-flex;
    margin: 0 0 0.45rem;
    color: var(--gold);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.overview-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1.25rem;
}

.overview-copy,
.overview-metrics,
.action-board,
.embed-panel,
.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.overview-copy {
    padding: 1.35rem;
}

.overview-copy h2 {
    margin: 0;
    color: var(--nav);
    font-size: 1.45rem;
}

.overview-copy p {
    max-width: 760px;
    margin: 0.6rem 0 0;
    color: var(--muted);
}

.overview-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.overview-metrics div {
    display: grid;
    place-content: center;
    gap: 0.2rem;
    border-left: 1px solid var(--line);
    text-align: center;
}

.overview-metrics div:first-child {
    border-left: 0;
}

.overview-metrics strong {
    color: var(--primary);
    font-size: 1.65rem;
}

.overview-metrics span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.module-section {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.25rem;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.section-heading span,
.workspace-card__kicker {
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0.1rem 0 0;
    color: var(--nav);
    font-size: 1.05rem;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.module-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-card {
    display: grid;
    min-height: 170px;
    align-content: space-between;
    gap: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.module-card:hover {
    transform: translateY(-1px);
}

.module-card span {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.25rem 0.55rem;
}

.module-card strong {
    color: var(--nav);
    font-size: 1rem;
}

.module-card small {
    color: var(--muted);
}

.module-card--teal span {
    background: #e7f6f3;
    color: var(--teal);
}

.module-card--amber span {
    background: #fff4df;
    color: var(--amber);
}

.module-card--violet span {
    background: #eeeeff;
    color: var(--violet);
}

.action-board {
    display: grid;
}

.action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding: 1rem;
}

.action-row:last-child {
    border-bottom: 0;
}

.action-row h3 {
    margin: 0.15rem 0;
    color: var(--nav);
    font-size: 1rem;
}

.action-row p {
    margin: 0;
    color: var(--muted);
}

.action-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.action-button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid var(--primary);
    border-radius: 4px;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    padding: 0.5rem 0.8rem;
}

.action-button:hover,
button:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.action-button--secondary {
    background: #ffffff;
    color: var(--primary);
}

.action-button--secondary:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.action-button--full {
    width: 100%;
}

.card {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem;
}

.card h1,
.page-heading h1 {
    margin: 0 0 0.5rem;
    color: var(--nav);
    font-size: 1.45rem;
}

.page-heading {
    margin-bottom: 1rem;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.link-card {
    display: grid;
    min-height: 118px;
    align-content: start;
    gap: 0.35rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.link-card:hover {
    background: var(--surface-soft);
    color: var(--ink);
}

.link-card strong {
    color: var(--nav);
}

.link-card span {
    color: var(--muted);
    font-size: 0.92rem;
}

.link-card.is-active {
    border-left-color: var(--gold);
    outline: 2px solid rgba(180, 145, 69, 0.24);
}

.map-view {
    margin-top: 1.25rem;
}

.map-view h2 {
    margin: 0 0 0.6rem;
    color: var(--nav);
}

.embed-panel {
    overflow: hidden;
}

.embed-panel__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 1rem;
}

.embed-panel__bar div {
    display: grid;
    gap: 0.15rem;
}

.embed-panel__bar strong {
    color: var(--nav);
}

.embed-panel iframe,
.map-view iframe {
    display: block;
    border: 0;
    background: #ffffff;
}

.auth-card {
    max-width: 460px;
}

.auth-card form {
    display: grid;
    gap: 0.75rem;
}

.auth-note {
    margin: 1rem 0 0;
    color: var(--muted);
}

input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    padding: 0.55rem 0.65rem;
}

select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    padding: 0.55rem 0.65rem;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.check-row input {
    width: auto;
    min-height: auto;
}

.notice {
    margin: 0 0 1rem;
    border: 1px solid #b8d9c2;
    border-radius: 6px;
    background: #edf8f0;
    color: #255d34;
    padding: 0.8rem 1rem;
}

.form-error {
    margin-bottom: 0.75rem;
    color: var(--danger);
    font-weight: 800;
}

.watermark {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    color: #667085;
    font-size: 1.1rem;
    overflow: hidden;
}

.watermark span {
    position: absolute;
    white-space: nowrap;
    opacity: 0.12;
    transform: rotate(-30deg);
    user-select: none;
}

.copy-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    z-index: 9999;
    transform: translateX(-50%);
    border: 2px solid #111111;
    background: #fff2a8;
    color: #111111;
    font-weight: 800;
    padding: 1rem;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.metric-card,
.filter-panel,
.form-card,
.table-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metric-card {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
}

.metric-card span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.metric-card strong {
    color: var(--nav);
    font-size: 1.7rem;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(140px, 1fr)) auto;
    gap: 0.75rem;
    align-items: end;
    padding: 1rem;
}

.filter-panel label,
.form-card label {
    display: grid;
    gap: 0.3rem;
}

.filter-panel label span,
.field-label {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.availability-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.availability-item {
    display: grid;
    gap: 0.35rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 8px;
    background: var(--surface);
    padding: 0.9rem;
}

.availability-item div {
    display: grid;
    gap: 0.15rem;
}

.availability-item strong {
    color: var(--nav);
}

.availability-item span,
.availability-item small,
table small {
    color: var(--muted);
}

.empty-state {
    margin-top: 1rem;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    padding: 1.25rem;
    text-align: center;
}

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

.form-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
}

.form-card--wide {
    margin-bottom: 1.25rem;
}

.form-card h2 {
    margin: 0;
    color: var(--nav);
    font-size: 1.05rem;
}

.vue-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.form-card form {
    display: grid;
    gap: 0.75rem;
}

.form-grid-2,
.form-grid-3 {
    display: grid;
    gap: 0.75rem;
}

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

.form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    max-height: 210px;
    overflow-y: auto;
    gap: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.6rem;
}

.check-grid label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--ink);
    font-size: 0.86rem;
}

.check-grid input {
    width: auto;
    min-height: auto;
}

.signature-flow {
    display: grid;
    gap: 0.55rem;
    border: 1px dashed var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
    padding: 0.85rem;
}

.signature-flow div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.signature-flow div span {
    border: 1px solid #d8deeb;
    border-radius: 999px;
    background: #ffffff;
    color: var(--nav);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.3rem 0.6rem;
}

.signature-flow p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.signature-flow .signature-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.signature-flow .signature-picker-grid label {
    display: grid;
    gap: 0.3rem;
}

.signature-flow .signature-picker-grid label > span {
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.76rem;
    padding: 0;
    text-transform: uppercase;
}

.form-help {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.pagination-row {
    margin-top: 1rem;
}

.pagination-row nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pagination-row a,
.pagination-row span {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #ffffff;
    color: var(--ink);
    padding: 0.35rem 0.55rem;
}

.letter-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.letter-paper {
    display: grid;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.official-letter {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    border: 1px solid #d8deeb;
    background: #ffffff;
    color: #000000;
    box-shadow: var(--shadow);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13pt;
    line-height: 1.22;
    padding: 7mm;
}

.official-letter__header {
    display: grid;
    grid-template-columns: 116px 1fr 116px;
    align-items: end;
    gap: 10px;
    border-bottom: 2px solid #000000;
    padding-bottom: 3px;
}

.official-letter__logo {
    display: grid;
    width: 96px;
    height: 54px;
    place-items: center;
    border: 2px solid #444444;
    color: #111111;
    font-size: 7pt;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
}

.official-letter h1 {
    margin: 0;
    font-size: 25pt;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
}

.official-letter__greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 12px;
}

.official-letter__greeting strong {
    font-size: 15pt;
}

.date-line {
    display: inline-flex;
    align-items: end;
    gap: 6px;
    min-width: 420px;
}

.date-line i {
    display: inline-block;
    width: 122px;
    border-bottom: 1px solid #000000;
}

.date-line i:nth-child(2) {
    width: 42px;
}

.date-line i:last-child {
    width: 68px;
}

.official-letter__request {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin: 14px 0 12px;
    font-size: 15.5pt;
}

.checkline {
    white-space: nowrap;
}

.letter-box-table,
.official-signature-box,
.official-result-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1.6px solid #000000;
    margin-top: 12px;
}

.letter-box-table h2,
.official-signature-box h2,
.official-result-box h2 {
    grid-column: 1 / -1;
    margin: 0;
    border-bottom: 1px solid #000000;
    background: #d9d9d9;
    color: #000000;
    font-size: 15pt;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
}

.letter-cell {
    min-height: 38px;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    padding: 2px 4px;
}

.letter-cell:nth-child(odd),
.letter-cell:last-child {
    border-right: 0;
}

.letter-cell--full {
    grid-column: 1 / -1;
    border-right: 0;
}

.letter-box-table .letter-cell:last-child {
    border-bottom: 0;
}

.letter-cell span {
    display: block;
    font-size: 11.5pt;
}

.letter-cell em {
    color: #666666;
    font-size: 9pt;
}

.letter-cell strong {
    display: block;
    margin-top: 4px;
    font-size: 12.5pt;
    font-weight: 700;
}

.lgpd-box {
    margin-top: 14px;
    border: 1.6px solid #000000;
    background: #d9d9d9;
    font-size: 15.5pt;
    line-height: 1.05;
    padding: 4px 8px;
    text-align: center;
}

.official-letter__statement {
    margin: 16px 0 0;
    font-size: 15.2pt;
    line-height: 1.42;
    text-align: left;
}

.official-letter__statement--tight {
    margin-top: 12px;
    font-size: 14.5pt;
    line-height: 1.28;
}

.candidate-signature {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 4px;
    margin: 24px 0 20px;
    font-size: 10pt;
}

.candidate-signature span {
    width: 260px;
    border-top: 1px solid #000000;
}

.official-signature-box {
    grid-template-columns: 1fr;
    min-height: 240px;
}

.official-signature-box--change {
    min-height: 290px;
}

.official-signature-box .official-signature-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    padding: 13px 26px 0;
}

.official-signature-box .official-signature-slot {
    width: min(360px, 100%);
    min-height: 60px;
}

.official-signature-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr);
    gap: 34px;
    align-items: stretch;
    padding: 10px 26px 0;
}

.official-signature-slot {
    display: grid;
    justify-items: center;
    align-content: center;
    min-height: 58px;
    text-align: center;
}

.official-signature-slot > span {
    width: 100%;
    border-top: 1px solid #000000;
}

.official-signature-slot small {
    color: #000000;
    font-size: 9.2pt;
    line-height: 1.05;
    margin-top: 4px;
}

.official-signature-slot strong {
    color: #000000;
    font-size: 10.8pt;
    font-weight: 500;
    line-height: 1.1;
    margin-top: 1px;
}

.official-signature-slot--named {
    align-content: center;
    min-height: 58px;
}

.official-signature-slot--named strong {
    font-weight: 700;
}

.official-result-box {
    grid-template-columns: 1fr;
    margin-top: 20px;
}

.official-result-head {
    display: grid;
    grid-template-columns: 170px 1fr 118px;
    min-height: 40px;
    border-bottom: 1px solid #000000;
}

.official-result-head > div {
    border-right: 1px solid #000000;
    padding: 2px 4px;
}

.official-result-head > div:last-child {
    border-right: 0;
}

.official-result-head span,
.official-result-head strong {
    display: block;
    color: #000000;
    font-size: 10.5pt;
}

.official-result-head strong {
    margin-top: 4px;
    font-weight: 700;
}

.result-check {
    display: grid;
    justify-items: center;
}

.result-check strong {
    font-size: 11pt;
}

.result-check span {
    font-size: 13pt;
}

.official-letter__footer {
    display: flex;
    justify-content: space-between;
    color: #000000;
    font-size: 8.5pt;
    margin-top: 4px;
}

.manual-attachment {
    display: grid;
    gap: 0.65rem;
    max-width: 900px;
    margin: 1rem auto 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.manual-attachment h2 {
    margin: 0;
    color: var(--nav);
    font-size: 1rem;
}

.letter-box-table--change {
    grid-template-columns: 1fr 240px;
}

.letter-box-table--change .letter-cell--small {
    border-right: 0;
}

.letter-paper header {
    display: grid;
    gap: 0.25rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
    text-align: center;
}

.letter-paper header strong {
    color: var(--nav);
    font-size: 1.25rem;
}

.letter-paper h2 {
    margin: 0 0 0.35rem;
    color: var(--nav);
    font-size: 1rem;
}

.letter-paper p {
    margin: 0.2rem 0;
}

.signature-lines {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
    margin-top: 2rem;
}

.signature-lines div {
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    text-align: center;
}

.signature-lines div > span {
    width: min(260px, 100%);
    border-top: 1px solid var(--ink);
}

@media print {
    .app-sidebar,
    .topbar,
    .no-print,
    .letter-toolbar {
        display: none;
    }

    .app-shell {
        display: block;
    }

    .app-main {
        width: 100%;
        margin: 0;
    }

    .letter-paper {
        border: 0;
        box-shadow: none;
    }

    .official-letter {
        width: 210mm;
        min-height: 297mm;
        border: 0;
        box-shadow: none;
        padding: 8mm;
    }

    body {
        background: #ffffff;
    }
}

.vue-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.vue-actions span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.bed-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.65rem;
}

.bed-option {
    display: grid;
    min-height: 96px;
    align-content: start;
    justify-content: stretch;
    gap: 0.25rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 0.8rem;
    text-align: left;
}

.bed-option:hover,
.bed-option.is-selected {
    border-color: var(--primary);
    border-left-color: var(--primary);
    background: var(--primary-soft);
    color: var(--ink);
}

.bed-option strong {
    color: var(--nav);
}

.bed-option span,
.bed-option small {
    color: var(--muted);
}

.table-card {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 0.8rem;
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.status-badge {
    display: inline-flex;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.25rem 0.55rem;
    text-transform: uppercase;
}

.status-reservada {
    background: #fff4df;
    color: var(--amber);
}

.status-confirmada {
    background: #fff4df;
    color: var(--amber);
}

.status-ocupada {
    background: #eaf3fa;
    color: var(--primary);
}

.status-concluida {
    background: #e7f6f3;
    color: var(--teal);
}

.status-cancelada {
    background: #fee4e2;
    color: var(--danger);
}

.status-user-active {
    background: #e7f6f3;
    color: var(--teal);
}

.status-user-pending {
    background: #fff4df;
    color: var(--amber);
}

.status-user-rejected {
    background: #fee4e2;
    color: var(--danger);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.table-actions form {
    margin: 0;
}

.table-actions button {
    min-height: 32px;
    font-size: 0.74rem;
    padding: 0.35rem 0.55rem;
}

.icon-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.icon-actions form {
    margin: 0;
}

.icon-action {
    display: inline-grid;
    width: 34px;
    height: 34px;
    min-height: 34px;
    place-items: center;
    border: 1px solid #d8deeb;
    border-radius: 4px;
    background: #ffffff;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    box-shadow: none;
}

.icon-action:hover {
    border-color: currentColor;
    background: var(--surface-soft);
}

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

.icon-action--view {
    color: var(--primary);
}

.icon-action--edit {
    color: var(--amber);
}

.icon-action--delete {
    color: var(--danger);
}

.button-danger {
    border-color: var(--danger);
    background: var(--danger);
}

.user-edit {
    position: relative;
}

.user-edit summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 1px solid var(--primary);
    border-radius: 4px;
    background: #ffffff;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.74rem;
    font-weight: 800;
    list-style: none;
    padding: 0.35rem 0.55rem;
}

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

.user-edit form {
    position: absolute;
    right: 0;
    z-index: 30;
    display: grid;
    width: min(620px, calc(100vw - 2rem));
    gap: 0.75rem;
    margin-top: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 1rem;
}

@media (max-width: 1120px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: relative;
        height: auto;
        max-height: none;
        gap: 0.8rem;
        padding: 0.85rem;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        gap: 0.55rem;
        padding: 0 0 0.35rem;
        scroll-snap-type: x proximity;
    }

    .sidebar-home,
    .nav-group {
        min-width: 220px;
        scroll-snap-align: start;
    }

    .nav-submenu {
        max-height: 210px;
        overflow-y: auto;
    }

    .overview-panel,
    .module-grid,
    .module-grid--compact,
    .metric-grid,
    .split-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-panel,
    .form-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 14px;
    }

    .sidebar-brand {
        min-height: 64px;
        padding: 0.35rem;
    }

    .sidebar-brand img {
        width: 64px;
        height: 44px;
    }

    .sidebar-brand strong {
        font-size: 1.05rem;
    }

    .sidebar-home,
    .nav-group {
        min-width: 190px;
    }

    .topbar,
    .action-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar {
        min-height: auto;
        padding: 1.15rem 1rem 3.4rem;
    }

    .topbar h1 {
        font-size: 1.35rem;
    }

    .topbar-status {
        justify-items: start;
        width: 100%;
    }

    .app-main {
        width: min(100% - 1.5rem, 1280px);
        margin-top: -2.2rem;
    }

    .sidebar-nav,
    .overview-panel,
    .module-grid,
    .module-grid--compact,
    .overview-metrics,
    .metric-grid,
    .split-grid,
    .filter-panel,
    .form-grid-2,
    .form-grid-3,
    .signature-flow .signature-picker-grid {
        grid-template-columns: 1fr;
    }

    .overview-metrics div {
        border-top: 1px solid var(--line);
        border-left: 0;
        padding: 1rem;
    }

    .overview-metrics div:first-child {
        border-top: 0;
    }

    .action-stack {
        justify-content: flex-start;
    }

    .metric-card,
    .form-card,
    .table-card,
    .overview-copy,
    .overview-metrics,
    .action-board,
    .embed-panel,
    .card {
        border-radius: 7px;
    }

    th,
    td {
        padding: 0.65rem;
    }

    .bed-picker {
        grid-template-columns: 1fr;
    }

    .user-edit form {
        position: fixed;
        inset: auto 0.75rem 1rem;
        width: auto;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}
