:root {
    --ui-bg: #f5efe6;
    --ui-bg-soft: #fcf7f0;
    --ui-surface: rgba(255, 255, 255, 0.84);
    --ui-surface-strong: #ffffff;
    --ui-border: rgba(17, 61, 71, 0.12);
    --ui-border-strong: rgba(17, 61, 71, 0.22);
    --ui-text: #17313a;
    --ui-muted: #647b82;
    --ui-brand: #0b5d67;
    --ui-brand-deep: #083942;
    --ui-brand-soft: #d9ecea;
    --ui-accent: #c8922c;
    --ui-accent-soft: #f5e2bb;
    --ui-success: #25735d;
    --ui-danger: #b8574c;
    --ui-warning: #d08a25;
    --ui-info: #2f6ea7;
    --ui-shadow-sm: 0 10px 22px rgba(8, 35, 40, 0.06);
    --ui-shadow-lg: 0 24px 60px rgba(8, 35, 40, 0.14);
    --ui-shadow-xl: 0 34px 80px rgba(8, 35, 40, 0.18);
    --ui-radius-sm: 16px;
    --ui-radius-md: 24px;
    --ui-radius-lg: 32px;
}

:root.dark-mode {
    --ui-bg: #09161a;
    --ui-bg-soft: #102128;
    --ui-surface: rgba(11, 25, 30, 0.88);
    --ui-surface-strong: #13242b;
    --ui-border: rgba(179, 220, 218, 0.12);
    --ui-border-strong: rgba(179, 220, 218, 0.22);
    --ui-text: #edf6f4;
    --ui-muted: #9db7b5;
    --ui-brand: #4ec1b5;
    --ui-brand-deep: #1d6771;
    --ui-brand-soft: rgba(78, 193, 181, 0.12);
    --ui-accent: #e0b256;
    --ui-accent-soft: rgba(224, 178, 86, 0.16);
    --ui-success: #3cb996;
    --ui-danger: #ea7a72;
    --ui-warning: #efb457;
    --ui-info: #70a8dc;
    --ui-shadow-sm: 0 16px 28px rgba(0, 0, 0, 0.2);
    --ui-shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.32);
    --ui-shadow-xl: 0 34px 80px rgba(0, 0, 0, 0.42);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(11, 93, 103, 0.14), transparent 28rem),
        radial-gradient(circle at top right, rgba(200, 146, 44, 0.16), transparent 26rem),
        linear-gradient(180deg, var(--ui-bg-soft) 0%, var(--ui-bg) 100%);
    color: var(--ui-text);
    font-family: "Alexandria", sans-serif;
}

img,
svg,
canvas {
    max-width: 100%;
}

canvas {
    display: block;
}

body.public-site {
    background:
        radial-gradient(circle at 15% 0%, rgba(11, 93, 103, 0.12), transparent 22rem),
        radial-gradient(circle at 100% 0%, rgba(200, 146, 44, 0.18), transparent 24rem),
        linear-gradient(180deg, #fffdf8 0%, #f7f0e7 100%);
}

:root.dark-mode body {
    background:
        radial-gradient(circle at top left, rgba(78, 193, 181, 0.12), transparent 25rem),
        radial-gradient(circle at top right, rgba(224, 178, 86, 0.12), transparent 25rem),
        linear-gradient(180deg, var(--ui-bg-soft) 0%, var(--ui-bg) 100%);
    color: var(--ui-text);
}

a {
    color: inherit;
    transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.shell-accent {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 0 0, rgba(11, 93, 103, 0.08), transparent 22rem),
        radial-gradient(circle at 100% 0, rgba(200, 146, 44, 0.12), transparent 26rem);
    opacity: 0.9;
}

.app-shell {
    position: relative;
    min-height: 100vh;
    background: transparent;
    overflow-x: clip;
}

.sidebar {
    width: 310px;
    padding: 28px 22px;
    background:
        linear-gradient(180deg, rgba(6, 37, 43, 0.95) 0%, rgba(10, 57, 66, 0.92) 100%);
    border-inline-end: 1px solid rgba(221, 242, 240, 0.14);
    box-shadow: 18px 0 48px rgba(7, 28, 33, 0.22);
    backdrop-filter: blur(16px);
}

.brand-block,
.brand-mark,
.sidebar-footer,
.user-pill,
.user-pill-meta,
.topbar-context,
.topbar-meta,
.page-intro,
.entity-cell,
.entity-meta,
.table-inline-meta,
.table-empty,
.guest-brand,
.public-brand,
.public-brand-copy {
    display: flex;
    flex-direction: column;
}

.brand-block,
.user-pill,
.topbar-right,
.topbar-left,
.language-switcher,
.page-actions,
.hero-badges,
.hero-actions,
.filter-actions,
.actions-row,
.table-actions,
.modal-actions,
.public-announcement,
.public-toolbar,
.public-lang-switcher,
.public-hero-actions,
.offer-card-actions,
.existing-doc-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.brand-block {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.sidebar-close-button {
    display: none;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    margin-inline-start: auto;
}

.brand-icon,
.public-brand-icon,
.entity-avatar,
.user-pill-avatar,
.stat-icon,
.modal-icon,
.existing-doc-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(207, 161, 72, 0.95), rgba(243, 208, 125, 0.88));
    color: #17313a;
    box-shadow: 0 18px 40px rgba(198, 146, 42, 0.28);
}

.brand-mark strong,
.public-brand-copy strong,
.page-head h1,
.hero-copy h2,
.auth-hero h1,
.public-hero-copy h1,
.section-hero h1,
.offer-hero-copy h1 {
    font-family: "El Messiri", sans-serif;
}

.brand-mark strong {
    font-size: 1.35rem;
    color: #f5f7f7;
}

.brand-mark small,
.sidebar-meta span,
.sidebar-version span,
.user-pill-meta small {
    color: rgba(228, 241, 240, 0.72);
}

.sidebar-meta,
.sidebar-footer {
    border: 1px solid rgba(221, 242, 240, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    padding: 16px 18px;
}

.sidebar-meta {
    gap: 6px;
    margin-bottom: 18px;
}

.sidebar-meta strong,
.sidebar-version strong,
.user-pill-meta p {
    color: #f4fbfa;
    margin: 0;
}

.nav-links {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    color: rgba(232, 244, 243, 0.78);
    background: transparent;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    text-decoration: none;
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(78, 193, 181, 0.24), rgba(224, 178, 86, 0.18));
    border-color: rgba(194, 228, 223, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 14px 30px rgba(2, 14, 17, 0.18);
}

.sidebar-footer {
    gap: 14px;
    margin-top: auto;
}

.sidebar-mobile-tools {
    display: none;
    gap: 12px;
    margin-top: 10px;
}

.sidebar-mobile-tools .language-switcher,
.sidebar-mobile-tools .toolbar-chip,
.sidebar-mobile-tools .button {
    width: 100%;
}

.sidebar-mobile-tools .language-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sidebar-mobile-tools .lang-link {
    text-align: center;
}

.sidebar-mobile-logout {
    display: grid;
}

.user-pill {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

.user-pill-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 800;
}

.main-layout {
    min-width: 0;
    background: transparent;
}

.topbar,
.topbar-right,
.topbar-left,
.topbar-context,
.topbar-meta,
.page-head,
.page-intro,
.page-actions,
.hero-copy,
.public-branding,
.public-brand,
.public-brand-copy,
.public-toolbar,
.public-nav,
.public-hero-copy,
.public-hero-panel,
.section-head,
.quick-stat-card,
.stat-card,
.status-chip,
.panel,
.stack-row,
.metric-row,
.align-right,
.table-actions,
.actions-row,
.card-panel {
    min-width: 0;
}

.topbar-context strong,
.topbar-meta strong,
.page-head h1,
.hero-copy h2,
.public-brand-copy strong,
.public-brand-copy small,
.public-hero-copy h1,
.section-head h2,
.quick-stat-card strong,
.stat-card strong,
.stack-row strong,
.metric-label strong,
.contact-list a {
    overflow-wrap: anywhere;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 24px;
    padding: 22px 28px 18px;
    border-bottom: 1px solid var(--ui-border);
    background: rgba(249, 244, 237, 0.7);
    backdrop-filter: blur(18px);
}

.topbar-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ui-brand);
}

.topbar-context strong,
.topbar-meta strong {
    color: var(--ui-text);
}

.toolbar-chip,
.lang-link,
.period-pill,
.table-caption,
.hero-badge,
.status-chip,
.pagination-link,
.pagination-ellipsis {
    border-radius: 999px;
    border: 1px solid var(--ui-border);
    background: rgba(255, 255, 255, 0.74);
}

.language-switcher,
.public-lang-switcher {
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--ui-border);
}

.lang-link,
.public-lang-switcher a {
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
}

.lang-link.active,
.public-lang-switcher a.active,
.toolbar-chip {
    color: var(--ui-brand-deep);
}

.lang-link.active,
.public-lang-switcher a.active {
    background: linear-gradient(135deg, rgba(11, 93, 103, 0.12), rgba(200, 146, 44, 0.15));
    border-color: rgba(11, 93, 103, 0.15);
}

.toolbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    box-shadow: var(--ui-shadow-sm);
}

.content {
    padding: 0 24px 42px;
}

.content-shell {
    display: grid;
    gap: 22px;
    padding-top: 22px;
}

.page-head,
.panel,
.guest-panel,
.auth-card,
.auth-hero,
.public-hero-panel,
.offer-side-card {
    border-radius: var(--ui-radius-lg);
    border: 1px solid var(--ui-border);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-lg);
    backdrop-filter: blur(18px);
}

.page-head {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) auto;
    gap: 20px;
    padding: 30px 32px;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(245, 239, 230, 0.84)),
        radial-gradient(circle at top right, rgba(11, 93, 103, 0.12), transparent 14rem);
}

.page-head::after,
.hero-banner::after,
.public-hero::after,
.auth-hero::after {
    content: "";
    position: absolute;
    inset-inline-end: -3rem;
    inset-block-start: -3rem;
    width: 14rem;
    height: 14rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 146, 44, 0.22), transparent 68%);
    pointer-events: none;
}

.page-head h1 {
    margin: 12px 0 10px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    color: var(--ui-text);
}

.page-intro p,
.auth-hero-copy p,
.auth-card-copy,
.public-hero-copy p,
.offer-hero-copy p,
.section-hero p,
.card-copy,
.muted-copy,
.table-subtext,
.table-caption,
.public-inquiry-hint,
.auth-hint,
.public-footer p,
.contact-list span {
    color: var(--ui-muted);
    line-height: 1.8;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: var(--ui-shadow-sm);
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
    text-decoration: none;
}

.button-primary {
    color: #fdfdfd;
    background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-deep));
}

.button-primary:hover,
.button-primary:focus-visible {
    box-shadow: 0 16px 30px rgba(11, 93, 103, 0.25);
}

.button-secondary,
.button-ghost {
    color: var(--ui-text);
    border-color: var(--ui-border);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.78);
}

.button-ghost {
    background: rgba(11, 93, 103, 0.08);
}

.button-danger {
    color: #ffffff;
    background: linear-gradient(135deg, #c76656, var(--ui-danger));
}

.button-small {
    min-height: 38px;
    padding: 0 14px;
}

.button-wide,
.button-block {
    width: 100%;
}

.icon-button {
    width: 44px;
    padding: 0;
}

.panel,
.guest-panel,
.auth-card,
.offer-side-card {
    padding: 26px;
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

.panel-head,
.filter-panel-head,
.section-head,
.section-panel-head,
.report-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.section-panel-head,
.table-panel > .panel-head {
    padding: 26px 26px 0;
}

.filter-panel {
    padding: 24px 26px;
}

.period-pill,
.table-caption,
.hero-badge,
.pagination-link,
.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: var(--ui-text);
    font-weight: 700;
}

.form-grid,
.filters-grid,
.public-filters,
.public-inquiry-form {
    display: grid;
    gap: 16px;
}

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

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

.filters-grid-bookings,
.filters-grid-reports,
.filters-grid-files {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filters-grid-search {
    grid-template-columns: minmax(0, 1.6fr) auto;
    align-items: end;
}

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

.search-grow,
.wide-field,
.full-span {
    grid-column: 1 / -1;
}

.form-grid label,
.stacked-form label,
.filter-field,
.public-inquiry-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-grid label span,
.stacked-form label span,
.filter-field > span,
.public-inquiry-form label span {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ui-text);
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 13px 15px;
    border-radius: 18px;
    border: 1px solid var(--ui-border);
    background: rgba(255, 255, 255, 0.86);
    color: var(--ui-text);
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

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

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(11, 93, 103, 0.36);
    box-shadow: 0 0 0 4px rgba(11, 93, 103, 0.12);
}

.search-control {
    position: relative;
}

.search-control-icon {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ui-muted);
}

.search-control-input {
    padding-inline-start: 44px;
}

.checkbox-field,
.checkbox-inline {
    flex-direction: row !important;
    align-items: center;
    gap: 12px !important;
}

.checkbox-field input,
.checkbox-inline input {
    width: 20px;
    min-height: 20px;
    margin: 0;
}

.subtle-panel {
    background: linear-gradient(135deg, rgba(11, 93, 103, 0.06), rgba(200, 146, 44, 0.08));
}

.honeypot-field {
    display: none !important;
}

.table-responsive {
    width: 100%;
    padding: 0 10px 12px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0 12px;
    background: transparent;
}

.data-table thead {
    background: transparent;
}

.data-table th {
    padding: 0 18px 10px;
    border: 0;
    color: var(--ui-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.data-table td {
    padding: 18px;
    background: rgba(255, 255, 255, 0.86);
    border-top: 1px solid var(--ui-border);
    border-bottom: 1px solid var(--ui-border);
    vertical-align: middle;
}

.data-table tbody td:first-child {
    border-inline-start: 1px solid var(--ui-border);
    border-start-start-radius: 22px;
    border-end-start-radius: 22px;
}

.data-table tbody td:last-child {
    border-inline-end: 1px solid var(--ui-border);
    border-start-end-radius: 22px;
    border-end-end-radius: 22px;
}

.entity-cell {
    flex-direction: row;
    align-items: center;
    gap: 14px;
}

.entity-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(11, 93, 103, 0.14), rgba(200, 146, 44, 0.16));
    color: var(--ui-brand-deep);
    font-weight: 800;
}

.table-inline-meta {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.table-inline-icon {
    color: var(--ui-brand);
}

.table-primary-text,
.table-service-type {
    font-weight: 700;
}

.mono-code {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ui-brand-deep);
}

.table-empty,
.empty-state {
    place-items: center;
    gap: 12px;
    padding: 42px 20px;
    text-align: center;
}

.small-empty {
    padding: 26px 18px;
}

.badge,
.doc-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.82rem;
    font-weight: 800;
}

.badge-success,
.doc-type-visa {
    background: rgba(37, 115, 93, 0.12);
    color: var(--ui-success);
    border-color: rgba(37, 115, 93, 0.18);
}

.badge-danger,
.doc-type-passport {
    background: rgba(184, 87, 76, 0.12);
    color: var(--ui-danger);
    border-color: rgba(184, 87, 76, 0.18);
}

.badge-warning,
.doc-type-ticket {
    background: rgba(208, 138, 37, 0.12);
    color: var(--ui-warning);
    border-color: rgba(208, 138, 37, 0.2);
}

.badge-info,
.doc-type-contract,
.doc-type-other,
.badge-secondary {
    background: rgba(47, 110, 167, 0.12);
    color: var(--ui-info);
    border-color: rgba(47, 110, 167, 0.18);
}

.hero-banner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 1fr);
    gap: 22px;
    padding: 34px;
    overflow: hidden;
    border-radius: calc(var(--ui-radius-lg) + 2px);
    border: 1px solid var(--ui-border);
    background:
        linear-gradient(135deg, rgba(12, 79, 88, 0.95), rgba(7, 48, 56, 0.88)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
    box-shadow: var(--ui-shadow-xl);
    color: #f5fbfb;
}

.hero-banner .eyebrow,
.hero-banner p,
.hero-banner small,
.hero-banner span,
.hero-banner strong {
    color: inherit;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-copy h2 {
    margin: 14px 0 12px;
    font-size: clamp(2rem, 4.8vw, 3.4rem);
    line-height: 1.06;
}

.hero-badge {
    color: #f1faf9;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

.quick-stat-grid,
.stats-grid,
.charts-grid,
.split-grid,
.info-grid,
.card-grid,
.document-preview-grid {
    display: grid;
    gap: 18px;
}

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

.quick-stat-card,
.stat-card,
.status-chip,
.card-panel,
.existing-doc-card {
    border-radius: 26px;
    border: 1px solid var(--ui-border);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-sm);
}

.quick-stat-card {
    padding: 22px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

.quick-stat-head,
.stat-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.quick-stat-card strong,
.stat-card strong,
.report-price {
    font-size: 1.35rem;
    line-height: 1.2;
}

.growth-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.growth-up {
    background: rgba(69, 203, 149, 0.18);
}

.growth-down {
    background: rgba(255, 147, 137, 0.18);
}

.growth-neutral {
    background: rgba(255, 255, 255, 0.14);
}

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

.stat-card {
    padding: 22px;
}

.stat-icon,
.existing-doc-icon,
.modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(11, 93, 103, 0.12), rgba(200, 146, 44, 0.14));
    color: var(--ui-brand);
}

.stat-icon.success {
    color: var(--ui-success);
}

.stat-icon.danger {
    color: var(--ui-danger);
}

.stat-icon.info {
    color: var(--ui-info);
}

.stat-icon.accent {
    color: var(--ui-accent);
}

.status-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 12px;
}

.status-chip {
    padding: 18px;
}

.status-chip.accent {
    background: linear-gradient(135deg, rgba(200, 146, 44, 0.08), rgba(255, 255, 255, 0.82));
}

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

.chart-container {
    min-height: 19rem;
}

.info-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

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

.metric-bars,
.stack-list {
    display: grid;
    gap: 14px;
}

.metric-row,
.stack-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(17, 61, 71, 0.08);
}

.metric-label,
.align-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.align-right {
    text-align: end;
}

.bar-track {
    width: 100%;
    max-width: 14rem;
    height: 11px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(11, 93, 103, 0.1);
}

.bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ui-brand), var(--ui-accent));
}

.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.card-panel {
    padding: 24px;
}

.card-panel h3 {
    margin-top: 0;
}

.document-preview-grid {
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.existing-doc-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    padding: 20px;
}

.document-card-meta {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.existing-doc-actions {
    justify-content: flex-end;
}

.document-filename {
    word-break: break-word;
}

.document-library-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pagination-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 26px 26px;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-link {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    text-decoration: none;
}

.pagination-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-deep));
    border-color: transparent;
}

.pagination-link:hover,
.pagination-link:focus-visible {
    text-decoration: none;
    transform: translateY(-1px);
}

.flash-stack,
.auth-flash-stack,
.public-flashes {
    display: grid;
    gap: 12px;
}

.auth-flash-stack {
    position: fixed;
    inset-block-start: 18px;
    inset-inline: 0;
    width: min(32rem, calc(100% - 2rem));
    margin-inline: auto;
    z-index: 70;
}

.flash-card,
.toast,
.keyboard-help-modal,
.modal-box {
    border: 1px solid var(--ui-border);
    border-radius: 24px;
    background: var(--ui-surface-strong);
    box-shadow: var(--ui-shadow-lg);
}

.flash-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
}

.modal-box,
.keyboard-help-modal {
    padding: 24px;
}

.modal-actions {
    justify-content: flex-end;
    margin-top: 18px;
}

.toast-container {
    position: fixed;
    inset-block-start: 1.5rem;
    inset-inline-end: 1.5rem;
    z-index: 60;
    display: grid;
    gap: 12px;
    width: min(24rem, calc(100vw - 2rem));
}

.toast {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 16px 18px 20px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-close {
    border: 0;
    background: transparent;
    color: var(--ui-muted);
    cursor: pointer;
}

.toast-progress {
    position: absolute;
    inset-inline: 16px;
    inset-block-end: 10px;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(11, 93, 103, 0.1);
}

.toast-progress-bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--ui-brand), var(--ui-accent));
    transform-origin: left center;
    animation: toast-progress linear forwards;
}

.keyboard-help-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(8, 20, 24, 0.42);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.keyboard-help-overlay.visible,
.modal-overlay.is-open {
    opacity: 1;
}

.keyboard-help-header,
.shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.keyboard-help-body {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.keyboard-help-close {
    border: 0;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--ui-muted);
}

kbd {
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid var(--ui-border);
    background: rgba(11, 93, 103, 0.08);
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.78rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(8, 20, 24, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.is-open {
    pointer-events: auto;
}

.guest-shell,
.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 34px;
}

.guest-panel,
.auth-shell {
    width: min(84rem, 100%);
}

.auth-shell {
    grid-template-columns: minmax(0, 1.16fr) minmax(22rem, 27rem);
    gap: 30px;
    align-items: stretch;
}

.auth-body {
    background:
        radial-gradient(circle at 0 0, rgba(11, 93, 103, 0.22), transparent 24rem),
        radial-gradient(circle at 100% 0, rgba(200, 146, 44, 0.22), transparent 22rem),
        linear-gradient(180deg, #fffaf2 0%, #efe4d4 100%);
}

.auth-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 28px;
    min-height: 42rem;
    padding: 38px;
    background:
        linear-gradient(145deg, rgba(8, 63, 72, 0.98), rgba(6, 35, 42, 0.95)),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 16rem);
    color: #f6fbfb;
}

.auth-hero::before {
    content: "";
    position: absolute;
    inset-inline-end: 8%;
    inset-block-start: 18%;
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05), transparent 68%);
    pointer-events: none;
}

.auth-hero-top,
.auth-brand-lockup,
.auth-card-headline {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.auth-hero-top {
    justify-content: space-between;
    align-items: center;
}

.auth-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
    gap: 22px;
    align-items: stretch;
}

.auth-hero-copy {
    display: grid;
    align-content: center;
    gap: 16px;
    max-width: 37rem;
}

.auth-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.auth-status-pill i,
.auth-support-card i,
.auth-inline-chip i,
.auth-security-banner i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-lang-switcher {
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-lang-switcher .lang-link {
    color: rgba(246, 251, 251, 0.82);
    border-color: transparent;
}

.auth-lang-switcher .lang-link.active,
.auth-lang-switcher .lang-link:hover,
.auth-lang-switcher .lang-link:focus-visible {
    color: #08232c;
    background: #f7fbfb;
    border-color: rgba(255, 255, 255, 0.18);
}

.auth-brand-lockup {
    flex: 1 1 24rem;
    margin: 0;
}

.auth-brand-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.auth-brand-icon {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(247, 205, 106, 0.98), rgba(207, 161, 72, 0.94));
    color: #17313a;
    box-shadow: 0 22px 44px rgba(7, 28, 33, 0.22);
}

.auth-brand-copy {
    display: grid;
    gap: 4px;
}

.auth-brand-copy strong {
    font-family: "El Messiri", sans-serif;
    font-size: 1.4rem;
    line-height: 1.1;
}

.auth-brand-copy span {
    color: rgba(246, 251, 251, 0.8);
    max-width: 28rem;
}

.auth-hero .eyebrow,
.auth-hero p,
.auth-hero strong,
.auth-hero span,
.auth-hero h1 {
    color: inherit;
}

.auth-hero-copy h1 {
    margin: 0;
    font-size: clamp(2.45rem, 5vw, 4.25rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
}

.auth-hero-copy p:last-child {
    max-width: 34rem;
    color: rgba(246, 251, 251, 0.82);
    font-size: 1rem;
    line-height: 1.85;
}

.auth-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-inline-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.88rem;
    font-weight: 700;
}

.auth-preview-panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 22px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.auth-preview-header {
    display: grid;
    gap: 4px;
}

.auth-preview-header span {
    color: rgba(246, 251, 251, 0.72);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-preview-header strong {
    font-size: 1.05rem;
}

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

.auth-preview-card,
.auth-proof-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-preview-card span {
    color: rgba(246, 251, 251, 0.72);
    font-size: 0.78rem;
}

.auth-preview-card strong {
    font-size: 1.02rem;
}

.auth-preview-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-preview-note div {
    display: grid;
    gap: 6px;
}

.auth-preview-note span {
    color: rgba(246, 251, 251, 0.76);
    font-size: 0.88rem;
    line-height: 1.7;
}

.auth-preview-note i,
.auth-proof-card i {
    color: #f6c766;
}

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

.auth-proof-card i {
    width: 20px;
    height: 20px;
}

.auth-proof-card strong {
    font-size: 0.98rem;
}

.auth-proof-card span {
    color: rgba(246, 251, 251, 0.78);
    line-height: 1.75;
    font-size: 0.89rem;
}

.auth-card {
    position: relative;
    display: grid;
    gap: 22px;
    align-self: center;
    align-content: start;
    padding: 34px 30px;
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 254, 252, 0.98), rgba(250, 244, 236, 0.96));
    box-shadow: 0 34px 84px rgba(8, 35, 40, 0.14);
}

.auth-card::before {
    content: "";
    position: absolute;
    inset-inline: 26px;
    inset-block-start: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(11, 93, 103, 0.26), transparent);
}

.auth-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(11, 93, 103, 0.08), rgba(200, 146, 44, 0.14));
    color: var(--ui-brand-deep);
    font-size: 0.82rem;
    font-weight: 800;
}

.auth-card-headline {
    display: grid;
    gap: 14px;
    justify-items: start;
}

.auth-card-badge i {
    width: 17px;
    height: 17px;
}

.auth-card-head {
    display: grid;
    gap: 8px;
}

.auth-card-head h2 {
    margin: 0;
    font-size: 2rem;
}

.auth-login-form {
    gap: 16px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-input-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid var(--ui-border);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-input-shell:focus-within {
    border-color: rgba(11, 93, 103, 0.32);
    box-shadow: 0 0 0 4px rgba(11, 93, 103, 0.12);
    transform: translateY(-1px);
}

.auth-input-shell i {
    width: 18px;
    height: 18px;
    color: var(--ui-muted);
    flex-shrink: 0;
}

.auth-input-shell input {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.auth-input-shell input:focus {
    box-shadow: none;
}

.auth-submit-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 12px;
}

.auth-mini-note {
    font-size: 0.78rem;
    color: var(--ui-muted);
    line-height: 1.7;
    text-align: start;
}

.auth-login-form .button {
    min-height: 54px;
    font-weight: 800;
}

.auth-security-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(11, 93, 103, 0.05), rgba(200, 146, 44, 0.12));
    border: 1px solid rgba(11, 93, 103, 0.12);
}

.auth-security-banner div {
    display: grid;
    gap: 6px;
}

.auth-security-banner strong {
    color: var(--ui-brand-deep);
}

.auth-support-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.auth-support-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--ui-border);
    background: rgba(255, 255, 255, 0.76);
    color: var(--ui-brand-deep);
}

.auth-support-card div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.auth-support-card strong {
    font-size: 0.88rem;
}

.auth-support-card span {
    color: var(--ui-muted);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.auth-support-card:hover,
.auth-support-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(11, 93, 103, 0.18);
    box-shadow: var(--ui-shadow-sm);
}

.stacked-form {
    display: grid;
    gap: 14px;
}

.auth-hint {
    padding-top: 6px;
    border-top: 1px solid var(--ui-border);
}

.public-announcement,
.public-header {
    width: min(76rem, calc(100% - 2rem));
    margin-inline: auto;
}

.public-announcement {
    justify-content: center;
    padding: 14px 0 8px;
    font-size: 0.85rem;
    color: var(--ui-muted);
}

.public-announcement span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--ui-border);
}

.public-header {
    position: sticky;
    top: 16px;
    z-index: 25;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border-radius: 28px;
    border: 1px solid var(--ui-border);
    background: rgba(255, 251, 244, 0.78);
    box-shadow: var(--ui-shadow-lg);
    backdrop-filter: blur(16px);
}

.public-brand {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.public-brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--ui-brand), var(--ui-accent));
    color: #ffffff;
    box-shadow: 0 18px 34px rgba(11, 93, 103, 0.18);
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.public-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--ui-muted);
    font-weight: 700;
    text-decoration: none;
}

.public-nav a.active,
.public-nav a:hover,
.public-nav a:focus-visible {
    color: var(--ui-brand-deep);
    background: rgba(11, 93, 103, 0.08);
}

.public-main {
    width: min(76rem, calc(100% - 2rem));
    margin: 22px auto 42px;
}

.section-shell,
.public-hero,
.offer-hero,
.final-cta {
    position: relative;
}

.section-shell {
    margin-bottom: 24px;
}

.public-hero,
.offer-hero,
.split-copy,
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
    gap: 22px;
}

.public-hero,
.offer-hero,
.section-hero,
.final-cta {
    padding: 34px;
    overflow: hidden;
    border-radius: calc(var(--ui-radius-lg) + 2px);
    border: 1px solid var(--ui-border);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-lg);
}

.public-hero-copy h1,
.section-hero h1,
.offer-hero-copy h1 {
    margin: 12px 0 14px;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.04;
}

.trust-grid,
.offers-grid,
.process-grid,
.faq-grid,
.public-footer-grid {
    display: grid;
    gap: 18px;
}

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

.trust-card,
.process-card,
.faq-card {
    padding: 22px;
    border-radius: 24px;
    border: 1px solid var(--ui-border);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--ui-shadow-sm);
}

.offers-grid {
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.offer-card {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--ui-border);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--ui-shadow-lg);
}

.offer-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(11, 93, 103, 0.16), rgba(200, 146, 44, 0.2));
}

.offer-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-card-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--ui-brand);
}

.offer-card-chip {
    position: absolute;
    inset-inline-start: 14px;
    inset-block-start: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: 800;
}

.offer-card-body {
    display: grid;
    gap: 14px;
    padding: 22px;
}

.offer-card-meta,
.offer-hero-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

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

.offer-card-meta strong,
.offer-hero-meta strong,
.detail-summary strong {
    font-size: 1.05rem;
}

.offer-card-highlights,
.detail-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.offer-card-highlights li,
.detail-list li {
    position: relative;
    padding-inline-start: 24px;
}

.offer-card-highlights li::before,
.detail-list li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 0.6rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ui-brand), var(--ui-accent));
}

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

.process-index {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(11, 93, 103, 0.12), rgba(200, 146, 44, 0.14));
    color: var(--ui-brand);
    font-weight: 800;
}

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

.section-hero.narrow-copy,
.faq-stack,
.split-copy,
.detail-grid {
    max-width: none;
}

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

.contact-list a {
    font-weight: 700;
    color: var(--ui-brand);
    text-decoration: none;
}

.selected-offer-box,
.public-inquiry-hint,
.detail-summary,
.final-cta {
    border-radius: 24px;
}

.selected-offer-box,
.public-inquiry-hint {
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(11, 93, 103, 0.08), rgba(200, 146, 44, 0.1));
    border: 1px solid rgba(11, 93, 103, 0.12);
}

.public-inquiry-hint {
    margin-bottom: 2px;
}

.detail-summary {
    display: grid;
    gap: 14px;
}

.detail-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ui-border);
}

.detail-summary > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.public-inquiry-form .button-primary,
.offer-side-card .button-primary {
    width: 100%;
}

.final-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background:
        linear-gradient(135deg, rgba(11, 93, 103, 0.95), rgba(8, 57, 66, 0.92)),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 16rem);
    color: #ffffff;
}

.final-cta h2,
.final-cta p {
    color: inherit;
}

.public-footer {
    width: min(76rem, calc(100% - 2rem));
    margin: 0 auto 34px;
    padding: 28px 0 0;
    border-top: 1px solid var(--ui-border);
}

.public-footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
}

.public-footer a {
    display: block;
    margin-top: 8px;
    color: var(--ui-muted);
    text-decoration: none;
}

.inline-form {
    display: inline-flex;
}

.public-menu-toggle,
.topbar-toggle {
    display: none;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.table-empty,
.empty-state {
    display: grid;
}

:root.dark-mode .topbar,
:root.dark-mode .public-header {
    background: rgba(9, 22, 26, 0.78);
}

:root.dark-mode .page-head,
:root.dark-mode .panel,
:root.dark-mode .guest-panel,
:root.dark-mode .auth-card,
:root.dark-mode .public-hero,
:root.dark-mode .section-hero,
:root.dark-mode .offer-hero,
:root.dark-mode .final-cta,
:root.dark-mode .offer-card,
:root.dark-mode .quick-stat-card,
:root.dark-mode .stat-card,
:root.dark-mode .status-chip,
:root.dark-mode .existing-doc-card,
:root.dark-mode .trust-card,
:root.dark-mode .process-card,
:root.dark-mode .faq-card,
:root.dark-mode .toast,
:root.dark-mode .keyboard-help-modal,
:root.dark-mode .modal-box {
    background: var(--ui-surface);
    border-color: var(--ui-border);
    color: var(--ui-text);
}

:root.dark-mode .hero-banner,
:root.dark-mode .auth-hero,
:root.dark-mode .final-cta {
    background:
        linear-gradient(135deg, rgba(14, 46, 51, 0.98), rgba(8, 26, 31, 0.96)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent);
}

:root.dark-mode .auth-status-pill,
:root.dark-mode .auth-lang-switcher,
:root.dark-mode .auth-inline-chip,
:root.dark-mode .auth-preview-panel,
:root.dark-mode .auth-preview-card,
:root.dark-mode .auth-preview-note,
:root.dark-mode .auth-proof-card,
:root.dark-mode .auth-security-banner {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(179, 220, 218, 0.12);
}

:root.dark-mode .auth-card-badge,
:root.dark-mode .auth-support-card {
    background: rgba(11, 25, 30, 0.74);
    border-color: rgba(179, 220, 218, 0.14);
}

:root.dark-mode .auth-input-shell {
    background: rgba(12, 27, 32, 0.9);
    border-color: rgba(179, 220, 218, 0.14);
}

:root.dark-mode .auth-input-shell:focus-within {
    border-color: rgba(78, 193, 181, 0.34);
    box-shadow: 0 0 0 4px rgba(78, 193, 181, 0.12);
}

:root.dark-mode .auth-support-card,
:root.dark-mode .auth-card-badge,
:root.dark-mode .auth-security-banner strong,
:root.dark-mode .auth-input-shell i {
    color: var(--ui-text);
}

:root.dark-mode input,
:root.dark-mode select,
:root.dark-mode textarea,
:root.dark-mode .data-table td,
:root.dark-mode .metric-row,
:root.dark-mode .stack-row,
:root.dark-mode .public-announcement span,
:root.dark-mode .toolbar-chip,
:root.dark-mode .lang-link,
:root.dark-mode .public-lang-switcher,
:root.dark-mode .public-nav a.active,
:root.dark-mode .public-nav a:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ui-text);
}

:root.dark-mode .data-table td {
    border-color: var(--ui-border);
}

:root.dark-mode .button-secondary,
:root.dark-mode .button-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ui-text);
    border-color: var(--ui-border);
}

:root.dark-mode .public-footer a,
:root.dark-mode .page-intro p,
:root.dark-mode .public-hero-copy p,
:root.dark-mode .offer-card-body p,
:root.dark-mode .table-subtext,
:root.dark-mode .table-caption,
:root.dark-mode .public-announcement,
:root.dark-mode .contact-list span,
:root.dark-mode .auth-hint,
:root.dark-mode .auth-card-copy,
:root.dark-mode .auth-mini-note,
:root.dark-mode .auth-support-card span,
:root.dark-mode .auth-preview-header span,
:root.dark-mode .auth-preview-note span,
:root.dark-mode .auth-preview-card span {
    color: var(--ui-muted);
}

@media (max-width: 1120px) {
    .page-head,
    .hero-banner,
    .public-hero,
    .offer-hero,
    .split-copy,
    .detail-grid,
    .auth-shell,
    .charts-grid,
    .info-grid,
    .split-grid {
        grid-template-columns: 1fr;
    }

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

    .quick-stat-grid,
    .trust-grid,
    .process-grid,
    .faq-grid,
    .faq-stack,
    .public-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-header {
        grid-template-columns: auto auto;
    }

    .public-nav {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .auth-card {
        order: -1;
    }

    .auth-hero-top {
        align-items: flex-start;
    }

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

@media (max-width: 900px) {
    .app-shell {
        display: block;
        width: 100%;
    }

    .main-layout {
        width: 100%;
        max-width: 100%;
    }

    .sidebar {
        position: fixed;
        inset-block: 0;
        right: 0;
        left: auto;
        z-index: 100;
        width: min(88vw, 20rem);
        max-width: calc(100vw - 0.75rem);
        transform: translate3d(110%, 0, 0);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.24s ease;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    html[dir="rtl"] .sidebar {
        right: 0;
        left: auto;
        transform: translate3d(110%, 0, 0);
    }

    html[dir="ltr"] .sidebar {
        left: 0;
        right: auto;
        transform: translate3d(-110%, 0, 0);
    }

    .sidebar.is-open {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        pointer-events: auto;
    }

    html[dir="rtl"] .sidebar.is-open,
    html[dir="ltr"] .sidebar.is-open {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 95;
        background: rgba(8, 20, 24, 0.46);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

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

    .topbar,
    .content,
    .public-main,
    .public-header,
    .public-announcement,
    .public-footer {
        width: calc(100% - 1.25rem);
        margin-inline: auto;
    }

    .content-shell,
    .page-head,
    .hero-banner,
    .charts-grid,
    .info-grid,
    .stats-grid,
    .quick-stat-grid {
        width: 100%;
        max-width: 100%;
    }

    .topbar-toggle,
    .public-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 16px;
        border: 1px solid var(--ui-border);
        background: rgba(255, 255, 255, 0.8);
        box-shadow: var(--ui-shadow-sm);
    }

    .topbar {
        margin-top: 12px;
        padding: 14px 16px;
        display: grid;
        gap: 14px;
        width: calc(100% - 1.25rem);
        border-radius: 22px;
    }

    .topbar-left {
        justify-content: flex-start;
    }

    .topbar-meta {
        display: none;
    }

    .page-head,
    .panel,
    .guest-panel,
    .public-hero,
    .offer-hero,
    .section-hero,
    .final-cta,
    .auth-hero,
    .auth-card {
        padding: 22px;
    }

    .hero-metrics,
    .auth-preview-grid,
    .auth-proof-grid,
    .auth-support-grid,
    .stats-grid,
    .quick-stat-grid,
    .filters-grid-period,
    .filters-grid-bookings,
    .filters-grid-reports,
    .filters-grid-files,
    .public-filters,
    .public-inquiry-form {
        grid-template-columns: 1fr;
    }

    .data-table {
        min-width: 680px;
    }

    .public-header {
        grid-template-columns: 1fr auto;
    }

    .public-announcement {
        justify-content: stretch;
    }

    .public-announcement span {
        flex: 1 1 100%;
        text-align: center;
    }

    .public-nav {
        display: none;
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: stretch;
        padding-top: 8px;
    }

    .public-nav.is-open {
        display: flex;
    }

    .public-toolbar {
        grid-column: 1 / -1;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        justify-content: stretch;
    }

    .public-toolbar .button {
        width: 100%;
    }

    .public-lang-switcher {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .public-lang-switcher a {
        text-align: center;
    }

    .filters-grid-search {
        grid-template-columns: 1fr;
    }

    .metric-row,
    .stack-row {
        align-items: flex-start;
    }

    .chart-container {
        min-height: 16rem;
    }

    .auth-hero-top,
    .auth-brand-lockup {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-lang-switcher,
    .auth-card-badge {
        align-self: flex-start;
    }

    .auth-hero {
        min-height: auto;
    }

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

    .auth-card-headline {
        justify-items: start;
    }

    .auth-mini-note {
        max-width: none;
        text-align: start;
    }
}

@media (max-width: 640px) {
    .app-shell,
    .main-layout {
        width: 100%;
        max-width: 100%;
    }

    .auth-shell,
    .guest-shell {
        padding: 18px;
    }

    .content,
    .public-main {
        width: calc(100% - 1rem);
    }

    .hero-metrics,
    .auth-preview-grid,
    .auth-proof-grid,
    .auth-support-grid,
    .trust-grid,
    .process-grid,
    .faq-grid,
    .faq-stack,
    .public-footer-grid {
        grid-template-columns: 1fr;
    }

    .topbar,
    .page-head,
    .panel,
    .public-hero,
    .offer-hero,
    .section-hero,
    .final-cta {
        border-radius: 24px;
    }

    .topbar {
        gap: 12px;
        padding: 16px;
    }

    .topbar-right {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }

    .topbar-toggle,
    .public-menu-toggle {
        width: 48px;
        min-width: 48px;
        flex: 0 0 48px;
        padding: 0;
    }

    .topbar-context {
        flex: 1 1 auto;
        gap: 2px;
    }

    .page-head h1,
    .public-hero-copy h1,
    .section-hero h1,
    .offer-hero-copy h1,
    .auth-hero-copy h1 {
        font-size: 2rem;
    }

    .auth-hero,
    .auth-card {
        border-radius: 24px;
    }

    .auth-brand-icon {
        width: 60px;
        height: 60px;
        border-radius: 20px;
    }

    .auth-card-head h2 {
        font-size: 1.7rem;
    }

    .auth-hero-copy h1 {
        font-size: 2.35rem;
    }

    .auth-hero-actions {
        display: grid;
    }

    .auth-inline-chip,
    .auth-preview-panel,
    .auth-security-banner {
        width: 100%;
    }

    .final-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .offer-hero-meta {
        grid-template-columns: 1fr;
    }

    .existing-doc-card {
        grid-template-columns: 1fr;
    }

    .pagination-nav,
    .topbar,
    .public-toolbar,
    .filter-actions,
    .page-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .button,
    .toolbar-chip {
        width: 100%;
    }

    .topbar-right,
    .topbar-left {
        width: 100%;
        justify-content: space-between;
    }

    .topbar-left {
        display: grid;
        grid-template-columns: minmax(0, 5rem) minmax(0, 1fr);
        gap: 10px;
    }

    .topbar-left form {
        width: 100%;
        grid-column: 2;
    }

    .language-switcher {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        grid-column: 1 / -1;
    }

    .lang-link {
        text-align: center;
    }

    .toolbar-mode {
        width: 100%;
        min-width: 0;
        padding-inline: 0;
        justify-content: center;
    }

    .toolbar-mode span,
    .topbar-kicker {
        display: none;
    }

    .topbar-context strong {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .public-header {
        top: 10px;
        padding: 14px;
        border-radius: 22px;
    }

    .public-brand {
        gap: 10px;
        width: 100%;
    }

    .public-brand-icon {
        width: 44px;
        height: 44px;
        border-radius: 15px;
    }

    .public-brand-copy strong {
        font-size: 1rem;
    }

    .public-brand-copy strong,
    .public-brand-copy small {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .public-toolbar {
        grid-template-columns: 1fr;
    }

    .public-nav a {
        width: 100%;
        text-align: start;
    }

    .page-head,
    .hero-banner,
    .public-hero,
    .offer-hero,
    .section-hero,
    .final-cta,
    .auth-hero,
    .auth-card {
        padding: 18px;
    }

    .hero-badges,
    .hero-actions,
    .public-hero-actions {
        display: grid;
        gap: 10px;
    }

    .hero-badges > *,
    .hero-actions > *,
    .public-hero-actions > * {
        width: 100%;
    }

    .chart-container {
        min-height: 14rem;
    }

    .metric-row,
    .stack-row {
        flex-direction: column;
        align-items: stretch;
    }

    .align-right {
        align-items: flex-start;
        text-align: start;
    }

    .table-responsive {
        padding: 0;
        overflow: visible;
    }

    .table-responsive table.responsive-table-ready {
        width: 100%;
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .table-responsive table.responsive-table-ready thead {
        display: none;
    }

    .table-responsive table.responsive-table-ready tbody,
    .table-responsive table.responsive-table-ready tr {
        display: block;
    }

    .table-responsive table.responsive-table-ready tbody tr {
        margin-bottom: 12px;
        border: 1px solid var(--ui-border);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.86);
        box-shadow: var(--ui-shadow-sm);
        overflow: hidden;
    }

    :root.dark-mode .table-responsive table.responsive-table-ready tbody tr {
        background: var(--ui-surface);
    }

    .table-responsive table.responsive-table-ready tbody td,
    .table-responsive table.responsive-table-ready tbody th {
        display: grid;
        grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr);
        gap: 10px;
        width: 100%;
        padding: 14px 16px;
        background: transparent;
        border: 0;
        border-bottom: 1px solid var(--ui-border);
        border-radius: 0 !important;
        text-align: start;
    }

    .table-responsive table.responsive-table-ready tbody td::before,
    .table-responsive table.responsive-table-ready tbody th::before {
        content: attr(data-label);
        color: var(--ui-muted);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .table-responsive table.responsive-table-ready tbody td:last-child,
    .table-responsive table.responsive-table-ready tbody th:last-child {
        border-bottom: 0;
    }

    .table-responsive table.responsive-table-ready tbody td[colspan],
    .table-responsive table.responsive-table-ready tbody th[colspan] {
        display: block;
        text-align: center;
    }

    .table-responsive table.responsive-table-ready tbody td[colspan]::before,
    .table-responsive table.responsive-table-ready tbody th[colspan]::before {
        content: none;
    }

    .table-responsive table.responsive-table-ready tbody td > *,
    .table-responsive table.responsive-table-ready tbody th > * {
        min-width: 0;
    }

    .table-responsive table.responsive-table-ready .entity-cell,
    .table-responsive table.responsive-table-ready .table-inline-meta,
    .table-responsive table.responsive-table-ready .table-actions,
    .table-responsive table.responsive-table-ready .actions-row {
        justify-content: flex-start;
    }

    .table-responsive table.responsive-table-ready .button {
        width: auto;
    }
}

@media (max-width: 640px) {
    .topbar {
        display: grid !important;
        grid-template-columns: 1fr;
        flex-direction: initial !important;
        align-items: stretch !important;
    }

    .topbar > .topbar-right {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        align-items: center;
        justify-content: initial;
        width: 100%;
        gap: 12px;
    }

    .topbar > .topbar-left {
        display: none !important;
    }

    .topbar .topbar-toggle {
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        height: 48px;
        flex: 0 0 48px;
        justify-self: start;
    }

    .topbar .topbar-context {
        min-width: 0;
        align-items: flex-start;
        text-align: start;
    }

    .topbar .topbar-context strong {
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .sidebar-mobile-tools {
        display: grid;
        order: 3;
    }

    .sidebar-mobile-tools .toolbar-mode {
        justify-content: center;
    }

    .sidebar-mobile-tools .toolbar-mode span {
        display: inline;
    }

    .sidebar-footer {
        margin-top: 0;
        order: 5;
    }

    .nav-links {
        margin: 16px 0;
        order: 4;
    }

    .sidebar-meta {
        display: none;
    }

    .brand-block {
        margin-bottom: 12px;
    }

    .sidebar-close-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile shell hardening for phones and small tablets */
a,
button,
.button,
.nav-link,
.lang-link,
.toolbar-chip,
.topbar-toggle,
.sidebar-close-button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.page-actions,
.hero-actions,
.filter-actions,
.actions-row,
.nav-links {
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    body.sidebar-open {
        overflow: hidden;
        touch-action: none;
    }

    .sidebar {
        display: flex;
        flex-direction: column;
        gap: 0;
        height: 100dvh;
        max-height: 100dvh;
        padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
    }

    .nav-links {
        flex: 1 1 auto;
        align-content: start;
        overflow-y: auto;
        padding-inline-end: 2px;
    }

    .nav-link {
        position: relative;
        z-index: 1;
        min-height: 52px;
    }

    .sidebar-backdrop {
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
}

@media (max-width: 640px) {
    .topbar {
        position: static !important;
        top: auto !important;
        z-index: auto !important;
        margin-top: calc(10px + env(safe-area-inset-top, 0px));
        gap: 10px;
        padding: 0.9rem;
    }

    .topbar > .topbar-right {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 10px;
    }

    .topbar .topbar-toggle {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px;
    }

    .topbar .topbar-context {
        gap: 0.15rem;
    }

    .topbar .topbar-context strong {
        font-size: 0.92rem;
    }

    .topbar .topbar-kicker {
        display: none;
    }

    .content {
        padding-top: 0.35rem;
    }

    .content-shell {
        gap: 16px;
        padding-top: 16px;
    }

    .page-actions,
    .hero-actions,
    .filter-actions,
    .report-actions,
    .existing-doc-actions {
        display: grid;
        gap: 10px;
        width: 100%;
    }

    .page-actions .button,
    .hero-actions .button,
    .filter-actions .button,
    .report-actions .button,
    .existing-doc-actions .button {
        width: 100%;
    }

    .page-head,
    .hero-banner,
    .panel {
        scroll-margin-top: 1rem;
    }
}

/* 2026 RTL SaaS dashboard refresh */
:root {
    --ui-bg: #F7F9FB;
    --ui-bg-soft: #F7F9FB;
    --ui-surface: #ffffff;
    --ui-surface-strong: #ffffff;
    --ui-border: #E3EAF0;
    --ui-border-strong: #CAD7DF;
    --ui-text: #0F172A;
    --ui-muted: #64748B;
    --ui-brand: #0F3D3E;
    --ui-brand-deep: #0A2E2F;
    --ui-brand-soft: #E7F4F1;
    --ui-accent: #F59E0B;
    --ui-accent-soft: #FFF4DF;
    --ui-success: #059669;
    --ui-danger: #DC2626;
    --ui-warning: #EA580C;
    --ui-info: #2563EB;
    --ui-shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
    --ui-shadow-lg: 0 14px 34px rgba(15, 23, 42, 0.08);
    --ui-shadow-xl: 0 22px 56px rgba(15, 61, 62, 0.14);
    --ui-radius-sm: 12px;
    --ui-radius-md: 14px;
    --ui-radius-lg: 16px;
}

:root.dark-mode {
    --ui-bg: #081618;
    --ui-bg-soft: #0D1F22;
    --ui-surface: #102326;
    --ui-surface-strong: #132A2D;
    --ui-border: rgba(208, 232, 229, 0.12);
    --ui-border-strong: rgba(208, 232, 229, 0.2);
    --ui-text: #F8FAFC;
    --ui-muted: #9FB4BA;
    --ui-brand: #5EEAD4;
    --ui-brand-deep: #99F6E4;
    --ui-brand-soft: rgba(94, 234, 212, 0.12);
}

body:not(.public-site):not(.auth-body) {
    background: #F7F9FB;
    color: var(--ui-text);
    font-family: "Cairo", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root.dark-mode body:not(.public-site):not(.auth-body) {
    background: var(--ui-bg);
}

.shell-accent {
    display: none;
}

.app-shell {
    background: #F7F9FB;
}

.brand-mark strong,
.public-brand-copy strong,
.page-head h1,
.hero-copy h2,
.auth-hero h1,
.public-hero-copy h1,
.section-hero h1,
.offer-hero-copy h1 {
    font-family: "Cairo", "IBM Plex Sans Arabic", sans-serif;
}

.sidebar {
    width: 288px;
    padding: 24px 18px;
    background: linear-gradient(180deg, #0F3D3E 0%, #0A2E2F 100%);
    border-inline-end: 0;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -20px 0 52px rgba(15, 23, 42, 0.14);
}

.brand-block {
    align-items: center;
    margin-bottom: 18px;
}

.brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #14B8A6;
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(20, 184, 166, 0.24);
}

.brand-mark strong {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.35;
}

.brand-mark small,
.sidebar-version span,
.user-pill-meta small {
    color: rgba(226, 246, 244, 0.72);
}

.sidebar-meta {
    display: none;
}

.nav-links {
    display: grid;
    gap: 6px;
    margin: 16px 0 20px;
}

.nav-link {
    position: relative;
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    color: rgba(235, 253, 251, 0.78);
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: 0;
}

.nav-link i {
    width: 20px;
    height: 20px;
}

.nav-link:hover,
.nav-link:focus-visible {
    transform: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: #ffffff;
    background: rgba(20, 184, 166, 0.28);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 26px rgba(2, 14, 17, 0.18);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    inset-block: 10px;
    inset-inline-end: 10px;
    width: 4px;
    border-radius: 999px;
    background: var(--ui-accent);
}

.sidebar-footer {
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.user-pill {
    width: 100%;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.user-pill-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #ffffff;
    color: #0F3D3E;
}

.main-layout {
    background: #F7F9FB;
}

.topbar {
    min-height: 76px;
    margin: 0;
    padding: 14px 24px;
    border-bottom: 1px solid #E5ECF2;
    background: rgba(247, 249, 251, 0.92);
    backdrop-filter: blur(18px);
}

.topbar-right,
.topbar-left {
    gap: 10px;
}

.topbar-context {
    gap: 0;
}

.topbar-kicker {
    color: #94A3B8;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.topbar-context strong {
    color: var(--ui-text);
    font-size: 1.15rem;
    font-weight: 900;
}

.toolbar-chip,
.language-switcher,
.lang-link {
    border-radius: 12px;
}

.toolbar-chip {
    min-height: 44px;
    padding: 9px 12px;
    background: #ffffff;
    border-color: #DDE7EE;
    color: #334155;
    box-shadow: var(--ui-shadow-sm);
}

.toolbar-chip strong {
    color: var(--ui-text);
    font-size: 0.86rem;
}

.toolbar-chip i {
    color: #0F3D3E;
}

.topbar-location {
    cursor: pointer;
}

.language-switcher {
    gap: 4px;
    padding: 4px;
    background: #ffffff;
    border-color: #DDE7EE;
    box-shadow: var(--ui-shadow-sm);
}

.lang-link {
    padding: 8px 11px;
    border: 0;
    color: #64748B;
    font-weight: 900;
}

.lang-link.active,
.public-lang-switcher a.active {
    color: #ffffff;
    background: #0F3D3E;
}

.topbar-user-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 5px 12px;
    border: 1px solid #DDE7EE;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--ui-shadow-sm);
}

.topbar-user-mini .user-pill-avatar {
    width: 34px;
    height: 34px;
    background: #E7F4F1;
    color: #0F3D3E;
}

.topbar-meta {
    gap: 0;
}

.topbar-meta span {
    color: #94A3B8;
    font-size: 0.74rem;
    font-weight: 800;
}

.topbar-meta strong {
    color: var(--ui-text);
    font-size: 0.86rem;
    font-weight: 900;
}

.content {
    padding: 24px 24px 44px;
}

.content-shell {
    width: min(1520px, 100%);
    margin-inline: auto;
    gap: 22px;
    padding-top: 0;
}

.page-head,
.panel,
.guest-panel,
.auth-card,
.public-hero-panel,
.offer-side-card,
.quick-stat-card,
.stat-card,
.status-chip,
.card-panel,
.existing-doc-card,
.trust-card,
.process-card,
.faq-card,
.toast,
.keyboard-help-modal,
.modal-box {
    border-radius: 16px;
    border-color: #E3EAF0;
    background: #ffffff;
    box-shadow: var(--ui-shadow-lg);
    backdrop-filter: none;
}

.page-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 24px;
    background: #ffffff;
}

.page-head::after,
.hero-banner::after,
.public-hero::after,
.auth-hero::after {
    display: none;
}

.eyebrow,
.topbar-kicker {
    color: #0F766E;
}

.page-head h1 {
    margin: 8px 0 6px;
    font-size: clamp(1.6rem, 2.5vw, 2.25rem);
    line-height: 1.25;
    font-weight: 900;
}

.page-intro p,
.table-subtext,
.table-caption,
.muted-copy {
    color: #64748B;
}

.button {
    min-height: 44px;
    border-radius: 12px;
    padding: 0 16px;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: var(--ui-shadow-sm);
}

.button-primary {
    background: #0F3D3E;
}

.button-primary:hover,
.button-primary:focus-visible {
    background: #0A2E2F;
    box-shadow: 0 14px 28px rgba(15, 61, 62, 0.18);
}

.button-secondary,
.button-ghost {
    color: #334155;
    background: #ffffff;
    border-color: #DDE7EE;
}

.button-ghost {
    background: #F1F5F9;
}

.button-danger {
    background: #DC2626;
}

.icon-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
}

.panel,
.guest-panel,
.auth-card,
.offer-side-card {
    padding: 22px;
}

.filter-panel,
.page-filter-panel {
    padding: 20px;
}

.filter-panel-head h3,
.panel-head h3,
.section-panel-head h3,
.card-panel h3 {
    color: var(--ui-text);
    font-weight: 900;
}

input,
select,
textarea {
    min-height: 46px;
    border-radius: 12px;
    border-color: #DDE7EE;
    background: #ffffff;
    color: #0F172A;
    box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(15, 61, 62, 0.42);
    box-shadow: 0 0 0 4px rgba(15, 61, 62, 0.1);
}

.search-control-input {
    padding-inline-start: 42px;
}

.stats-grid,
.quick-stat-grid,
.charts-grid,
.split-grid,
.info-grid,
.card-grid,
.document-preview-grid {
    gap: 18px;
}

.stat-card,
.quick-stat-card,
.card-panel,
.status-chip {
    background: #ffffff;
}

.stat-icon,
.existing-doc-icon,
.modal-icon,
.entity-avatar {
    border-radius: 12px;
    background: #E7F4F1;
    color: #0F3D3E;
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

.table-responsive {
    padding: 0;
}

.data-table {
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    padding: 14px 18px;
    background: #F8FAFC;
    color: #64748B;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: none;
}

.data-table td {
    padding: 16px 18px;
    background: #ffffff;
    border-top: 1px solid #EEF3F6;
    border-bottom: 0;
}

.data-table tbody tr {
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.data-table tbody tr:hover td {
    background: #F8FAFC;
}

.data-table tbody td:first-child,
.data-table tbody td:last-child {
    border-inline: 0;
    border-radius: 0;
}

.entity-avatar {
    width: 42px;
    height: 42px;
    font-weight: 900;
}

.mono-code {
    color: #0F3D3E;
}

.badge,
.doc-type-badge,
.period-pill,
.table-caption,
.hero-badge,
.pagination-link,
.pagination-ellipsis {
    border-radius: 999px;
    font-weight: 900;
}

.badge-success,
.doc-type-visa {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
    border-color: rgba(5, 150, 105, 0.18);
}

.badge-warning,
.doc-type-ticket {
    background: rgba(245, 158, 11, 0.14);
    color: #B45309;
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-danger,
.doc-type-passport {
    background: rgba(220, 38, 38, 0.1);
    color: #B91C1C;
    border-color: rgba(220, 38, 38, 0.18);
}

.badge-info,
.doc-type-contract,
.doc-type-other,
.badge-secondary {
    background: rgba(37, 99, 235, 0.1);
    color: #1D4ED8;
    border-color: rgba(37, 99, 235, 0.18);
}

.table-empty,
.empty-state,
.small-empty {
    color: #64748B;
    background: #F8FAFC;
    border-radius: 14px;
}

.bar-track {
    height: 10px;
    background: #E7EEF3;
}

.bar-fill {
    background: linear-gradient(90deg, #0F3D3E, #14B8A6);
}

.modal-overlay,
.keyboard-help-overlay {
    background: rgba(15, 23, 42, 0.48);
}

@media (min-width: 901px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        inset-block: 0;
        z-index: 50;
        height: 100vh;
        overflow-y: auto;
    }

    html[dir="rtl"] .sidebar {
        right: 0;
        left: auto;
    }

    html[dir="ltr"] .sidebar {
        left: 0;
        right: auto;
    }

    html[dir="rtl"] .main-layout {
        margin-right: 288px;
        margin-left: 0;
    }

    html[dir="ltr"] .main-layout {
        margin-left: 288px;
        margin-right: 0;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 40;
    }

    .sidebar-close-button {
        display: none !important;
    }
}

@media (max-width: 1120px) {
    .topbar-date-chip,
    .topbar-location,
    .topbar-user-mini {
        display: none;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: min(88vw, 20rem);
        padding: 22px 16px;
    }

    .topbar,
    .content,
    .public-main,
    .public-header,
    .public-announcement,
    .public-footer {
        width: calc(100% - 1.25rem);
        margin-inline: auto;
    }

    .topbar {
        margin-top: 12px;
        border-radius: 16px;
        background: #ffffff;
    }

    .page-head,
    .panel,
    .guest-panel,
    .public-hero,
    .offer-hero,
    .section-hero,
    .final-cta,
    .auth-hero,
    .auth-card {
        padding: 18px;
    }
}

@media (max-width: 640px) {
    .content {
        padding-inline: 0;
    }

    .page-head {
        grid-template-columns: 1fr;
    }

    .page-head h1 {
        font-size: 1.45rem;
    }

    .table-responsive table.responsive-table-ready tbody tr {
        border-radius: 14px;
        background: #ffffff;
    }

    .table-responsive table.responsive-table-ready tbody td,
    .table-responsive table.responsive-table-ready tbody th {
        grid-template-columns: minmax(0, 6.75rem) minmax(0, 1fr);
    }
}
