:root {
    --bg: #efe5d7;
    --sidebar: #132a24;
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #d4a017;
    --danger: #a13816;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 0 0, #0f766e2e, #0000 28%),
        radial-gradient(circle at 100%, #d4a01724, #0000 22%),
        linear-gradient(#f7f1e8 0%, #efe5d7 100%);
    margin: 0;
    font-family: Manrope, sans-serif;
    overflow-x: auto;
}

button,
input,
select {
    font: inherit;
}

.sidebar {
    background:
        radial-gradient(circle at top, #0f766e2e, transparent 24%),
        linear-gradient(180deg, var(--sidebar) 0%, #0f211d 100%);
    color: #f7f3eb;
    border-right: 1px solid #ffffff0d;
    height: 100vh;
    padding: 28px 22px;
    position: sticky;
    top: 0;
    overflow: auto;
}

.brand-block {
    background: #ffffff0d;
    border: 1px solid #ffffff14;
    border-radius: 24px;
    padding: 20px;
}

.brand-label,
.brand-sub {
    color: #f7f3ebb3;
}

.brand-block h1 {
    letter-spacing: -0.04em;
    color: #f7f3eb;
    margin: 0;
    font-family:
        Space Grotesk,
        sans-serif;
    font-size: 2rem;
}

.brand-sub {
    margin-top: 8px;
    display: block;
}

.sidebar-nav {
    gap: 10px;
    margin-top: 22px;
    display: grid;
}

.nav-link,
.dropdown-link {
    cursor: pointer;
    text-align: left;
    color: #f6f0e6;
    border: 0;
    border-radius: 16px;
    width: 100%;
    transition:
        transform 0.18s,
        background 0.18s;
}

.nav-link {
    background: 0 0;
    padding: 14px 16px;
    font-weight: 700;
}

.nav-link:hover,
.dropdown-link:hover {
    transform: translate(2px);
}

.dropdown-toggle {
    justify-content: space-between;
    align-items: center;
    display: flex;
}

.caret {
    font-weight: 800;
}

.dropdown-menu {
    gap: 8px;
    margin-top: 8px;
    padding-left: 14px;
    display: grid;
}

.dropdown-block:not(.open) .dropdown-menu {
    display: none;
}

.dropdown-link {
    background: #ffffff0a;
    padding: 12px 14px;
    font-size: 0.94rem;
}

.main-content {
    padding: 0;
    overflow-x: auto;
}

.topbar,
.summary-grid,
.orders-card {
    z-index: 1;
    position: relative;
}

h2,
h3 {
    letter-spacing: -0.03em;
    margin: 0;
    font-family:
        Space Grotesk,
        sans-serif;
}

.subtitle,
.modal-subtitle {
    max-width: 820px;
    color: var(--muted);
    margin: 12px 0 0;
}

.action-btn:hover,
.close-btn:hover {
    transform: translateY(-1px);
}

.action-btn.accent {
    color: var(--accent-strong);
    background: #0f766e1f;
}

.action-btn.ghost,
.close-btn {
    color: var(--text);
    background: #fffaf2d9;
}

.orders-layout {
    gap: 24px;
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
}

.metric-card,
.orders-card,
.modal-panel,
.summary-strip article {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.metric-card span,
.metric-card small,
.filter-field span,
th,
.user-link small,
.field span,
.field-hint,
.summary-strip span {
    color: var(--muted);
}

.orders-card,
.modal-panel {
    border-radius: var(--radius-xl);
    padding: 26px;
}

.card-head,
.filter-grid,
.modal-head {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    display: flex;
}

.filter-grid {
    align-items: stretch;
}

.filter-field,
.field {
    gap: 8px;
    min-width: 180px;
    display: grid;
}

.search-field {
    flex: 320px;
    min-width: 320px;
}

.date-field {
    min-width: 210px;
}

.hidden {
    display: none !important;
}

select,
input {
    width: 100%;
    color: var(--text);
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 14px;
    outline: none;
    padding: 14px 16px;
}

select:focus,
input:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.table-shell {
    -webkit-overflow-scrolling: touch;
    background: #ffffffc7;
    border: 1px solid #132a2414;
    border-radius: 22px;
    margin-top: 22px;
    overflow: auto hidden;
}

thead {
    background: #f6f2e9;
}

tbody tr+tr td {
    border-top: 1px solid #132a2414;
}

tbody tr:hover {
    background: #0f766e08;
}

.user-link {
    color: var(--accent-strong);
    gap: 6px;
    font-weight: 800;
    text-decoration: none;
    display: grid;
}

.user-link:hover {
    text-decoration: underline;
}

.price {
    font-weight: 800;
}

.status-badge {
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
}

.status-badge.under-review {
    color: var(--accent);
    background: #0f766e1c;
}

.status-badge.accepted-orders {
    color: var(--success);
    background: #18794e1f;
}

.status-badge.done-orders {
    color: #0f5d3a;
    background: #18794e29;
}

.status-badge.cancelled-order {
    color: var(--danger);
    background: #a138161f;
}

.address-cell {
    color: var(--muted);
    white-space: normal;
    min-width: 220px;
    line-height: 1.5;
    display: inline-block;
}

.action-group {
    flex-wrap: wrap;
    gap: 8px;
    display: flex;
}

.row-action {
    cursor: pointer;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 800;
    transition: transform 0.18s;
}

.row-action:hover {
    transform: translateY(-1px);
}

.row-action.delete {
    color: var(--danger);
    background: #a138161f;
}

.modal-panel {
    width: min(1120px, 100%);
    max-height: calc(100vh - 56px);
    overflow: auto;
}

.readonly-field input,
.final-price-field input {
    color: #4a5a55;
    background: #ecede8;
}

.wide-field {
    grid-column: span 2;
}

#modalExtrasSelect {
    min-height: 132px;
}

.summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
    display: grid;
}

.summary-strip article {
    border-radius: var(--radius-lg);
    padding: 18px;
}

.summary-strip strong {
    margin-top: 10px;
    font-size: 1.2rem;
    display: block;
}

@media (width<=1180px) {

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

@media (width<=980px) {
    .sidebar {
        height: auto;
        position: relative;
    }
}

@media (width<=760px) {
    .main-content {
        padding: 0;
        overflow-x: auto;
    }

    .topbar,
    .card-head,
    .filter-grid,
    .modal-head,
    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-grid,
    .summary-strip,
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .search-field,
    .date-field,
    .wide-field {
        grid-column: span 1;
        min-width: 0;
    }

    .modal-overlay {
        padding: 18px;
    }
}

.modal-form select[multiple] {
    min-height: 132px;
    padding: 10px;
}

.modal-form select[multiple] option {
    border-radius: 8px;
    padding: 8px 10px;
}

.modal-form input:disabled,
.modal-form select:disabled {
    cursor: default;
    opacity: 0.72;
    color: var(--text);
    background: #eceeea;
}

.row-action.print {
    color: #071a3d;
    background: #071a3d1a;
}

.done-detail-field {
    min-width: 0;
}

.readonly-value {
    min-height: 48px;
    color: var(--text);
    word-break: break-word;
    background: #eceeea;
    border: 1px solid #132a241a;
    border-radius: 14px;
    align-items: center;
    padding: 13px 15px;
    font-weight: 700;
    line-height: 1.45;
    display: flex;
}

:root {
    --bg: #f5efe4;
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --warning: #d4a017;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

.topbar,
.hero-card,
.details-card {
    z-index: 1;
    position: relative;
}

h1,
h2,
h3 {
    letter-spacing: -0.03em;
    margin: 0;
    font-family:
        Space Grotesk,
        sans-serif;
}

.top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    display: flex;
}

.action-btn,
.save-btn {
    cursor: pointer;
    border: 0;
    transition:
        transform 0.18s,
        box-shadow 0.18s;
}

.action-btn:hover,
.save-btn:hover {
    transform: translateY(-1px);
}

.action-btn {
    box-shadow: var(--shadow);
    border-radius: 999px;
    padding: 14px 20px;
    font-weight: 800;
}

.action-btn.warning {
    color: #342400;
    background: #e6b93f;
}

.link-btn {
    justify-content: center;
    align-items: center;
    text-decoration: none;
    display: inline-flex;
}

.profile-layout {
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
}

.hero-card,
.details-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero-card {
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
    gap: 22px;
    padding: 28px;
    display: grid;
}

.hero-main {
    gap: 26px;
    display: grid;
}

.identity-block {
    align-items: center;
    gap: 18px;
    display: flex;
}

.status-row {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    display: flex;
}

.pill.online {
    color: var(--success);
    background: #18794e24;
}

.pill.subtle {
    color: var(--text);
    background: #15231f0f;
}

.hero-meta {
    color: var(--muted);
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 10px 0 0;
    display: flex;
}

.hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    display: grid;
}

.stat-card,
.side-panel {
    background: var(--surface-strong);
    border: 1px solid #132a240f;
}

.stat-card {
    border-radius: var(--radius-lg);
    padding: 18px;
}

.stat-card span,
.stat-card small {
    display: block;
}

.stat-card span,
.panel-header span {
    color: var(--muted);
}

.stat-card strong {
    margin: 8px 0 6px;
    font-size: 1.55rem;
    display: block;
}

.side-panel {
    border-radius: var(--radius-lg);
    align-content: start;
    gap: 18px;
    padding: 22px;
    display: grid;
}

.panel-header {
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    display: flex;
}

.panel-header p {
    margin: 0;
    font-weight: 800;
}

.state-grid,
.select-field,
.field,
.permission-copy {
    gap: 8px;
    display: grid;
}

.permission-field {
    background: #0f766e0d;
    border: 1px solid #0f766e1f;
    border-radius: 18px;
    gap: 12px;
    padding: 16px;
    display: grid;
}

.permission-copy small {
    color: var(--muted);
    line-height: 1.5;
}

input:focus,
select:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.details-card {
    padding: 26px;
}

.save-btn {
    background: var(--surface-dark);
    color: #fff;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 800;
}

.details-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
    display: grid;
}

.field.wide {
    grid-column: span 2;
}

.readonly input {
    color: #4a5a55;
    background: #ecede8;
}

@media (width<=1120px) {
    .details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (width<=720px) {

    .topbar,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .identity-block {
        grid-template-columns: 1fr;
        display: grid;
    }
}

.field textarea {
    width: 100%;
    color: var(--text);
    resize: vertical;
    font: inherit;
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 14px;
    outline: none;
    padding: 14px 16px;
}

.field textarea:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.selected-files {
    color: var(--muted);
    overflow-wrap: anywhere;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.5;
}

@media (width<=720px) {
    .toast {
        max-width: none;
        bottom: 14px;
        left: 14px;
        right: 14px;
    }
}

:root {
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

button,
input {
    font: inherit;
}

.topbar,
.account-grid,
.permissions-card {
    z-index: 1;
    position: relative;
}

h1,
h2,
h3,
h4 {
    letter-spacing: -0.03em;
    margin: 0;
    font-family:
        Space Grotesk,
        sans-serif;
}

.subtitle,
.table-note,
.summary-item span,
.summary-note p,
.permission-meta {
    color: var(--muted);
}

.top-actions,
.section-head,
.permission-row {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    display: flex;
}

.action-btn,
.toggle-label {
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}

.action-btn:hover,
.toggle-label:hover {
    transform: translateY(-1px);
}

.action-btn {
    cursor: pointer;
    box-shadow: var(--shadow);
    border: 0;
    border-radius: 999px;
    padding: 14px 20px;
    font-weight: 800;
}

.operators-layout {
    gap: 24px;
    max-width: 1520px;
    margin: 0 auto;
    display: grid;
}

.account-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 20px;
    display: grid;
}

.account-card,
.summary-card,
.permissions-card,
.permission-section {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.account-card,
.summary-card,
.permissions-card {
    padding: 24px;
}

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

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

.field input {
    width: 100%;
    color: var(--text);
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
}

.field input:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.password-control {
    position: relative;
}

.password-control input {
    padding-right: 86px;
}

.password-toggle {
    cursor: pointer;
    color: var(--accent-strong);
    background: #0f766e1a;
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 900;
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: #0f766e29;
}

.field-hint {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.5;
}

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

.role-option {
    background: var(--surface-strong);
    cursor: pointer;
    border: 1px solid #132a2412;
    border-radius: 20px;
    gap: 6px;
    padding: 18px;
    display: grid;
}

.role-option.active {
    background: #0f766e14;
    border-color: #0f766e38;
}

.role-option input {
    display: none;
}

.role-option small {
    color: var(--muted);
}

.summary-metrics {
    gap: 14px;
    margin-top: 20px;
    display: grid;
}

.summary-item,
.summary-note {
    background: var(--surface-strong);
    border: 1px solid #132a240f;
    border-radius: 20px;
    padding: 18px;
}

.summary-item strong {
    margin-top: 10px;
    font-size: 1.7rem;
    display: block;
}

.summary-note {
    margin-top: 16px;
}

.summary-note strong {
    display: block;
}

.permissions-sections {
    gap: 18px;
    margin-top: 20px;
    display: grid;
}

.permission-section {
    background: #fffaf3e0;
    padding: 20px;
}

.permission-list {
    gap: 10px;
    margin-top: 18px;
    display: grid;
}

.permission-row {
    background: var(--surface-strong);
    border: 1px solid #132a240f;
    border-radius: 18px;
    padding: 14px 16px;
}

.permission-info {
    flex: 1;
    min-width: 260px;
}

.permission-info strong {
    display: block;
}

.permission-meta {
    margin-top: 6px;
}

.toggle-group {
    flex-wrap: wrap;
    gap: 10px;
    display: flex;
}

.toggle-label {
    cursor: pointer;
    background: #0f766e0f;
    border-radius: 999px;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-weight: 700;
    display: inline-flex;
}

.toggle-label.edit {
    background: #d4a0171f;
}

.toggle-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.toggle-label input:disabled {
    opacity: 0.45;
}

@media (width<=1120px) {

    .account-grid,
    .role-switcher {
        grid-template-columns: 1fr;
    }
}

@media (width<=760px) {

    .topbar,
    .section-head,
    .permission-row {
        flex-direction: column;
        align-items: stretch;
    }

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

.modal-overlay {
    z-index: 50;
    backdrop-filter: blur(10px);
    background: #07122275;
    place-items: center;
    padding: 24px;
    display: grid;
    position: fixed;
    inset: 0;
}

.modal-overlay.hidden,
.toast.hidden {
    display: none;
}

.modal-card {
    background: #fffaf2;
    border: 1px solid #132a241f;
    border-radius: 24px;
    width: min(920px, 100%);
    max-height: min(86vh, 820px);
    padding: 28px;
    position: relative;
    overflow: auto;
    box-shadow: 0 30px 80px #07122238;
}

.modal-close {
    cursor: pointer;
    width: 36px;
    height: 36px;
    color: var(--text);
    background: #132a2414;
    border: 0;
    border-radius: 50%;
    font-weight: 900;
    position: absolute;
    top: 18px;
    right: 18px;
}

.modal-summary-grid {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
    display: grid;
}

.modal-summary-grid div,
.modal-row {
    background: #fff;
    border: 1px solid #132a2414;
    border-radius: 16px;
}

.modal-summary-grid div {
    padding: 14px;
}

.modal-summary-grid span,
.modal-row small,
.modal-row span {
    color: var(--muted);
}

.modal-summary-grid span,
.modal-row small {
    font-size: 0.78rem;
    font-weight: 800;
    display: block;
}

.modal-summary-grid strong {
    margin-top: 6px;
    display: block;
}

.modal-table {
    gap: 10px;
    display: grid;
}

.modal-row {
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    display: flex;
}

.modal-row strong,
.modal-row span {
    display: block;
}

.modal-row span {
    margin-top: 5px;
}

.modal-row b {
    color: var(--accent-strong);
    background: #0f766e1a;
    border-radius: 999px;
    flex: none;
    padding: 8px 12px;
}

.empty-state {
    color: var(--text);
    background: #d4a0171f;
    border-radius: 16px;
    margin: 0;
    padding: 18px;
    font-weight: 700;
}

.modal-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
    display: flex;
}

.toast {
    z-index: 60;
    color: #fff;
    background: #132a24;
    border-radius: 16px;
    max-width: 360px;
    padding: 14px 18px;
    font-weight: 800;
    position: fixed;
    bottom: 24px;
    right: 24px;
    box-shadow: 0 20px 50px #07122238;
}

@media print {

    body>.app-shell,
    .toast,
    .modal-close,
    .modal-actions {
        display: none !important;
    }

    .modal-overlay {
        background: #fff;
        padding: 0;
        display: block;
        position: static;
    }

    .modal-card {
        width: 100%;
        max-height: none;
        box-shadow: none;
        border: 0;
        overflow: visible;
    }
}

@media (width<=760px) {
    .modal-card {
        padding: 22px;
    }

    .modal-summary-grid {
        grid-template-columns: 1fr;
    }

    .modal-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.section-card {
    z-index: 1;
    background: var(--surface);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    border-radius: 8px;
    padding: 24px;
    position: relative;
}

.required-note {
    color: #9b3b31;
    font-size: 0.82rem;
    font-weight: 800;
}

.field select,
.field textarea {
    width: 100%;
    color: var(--text);
    font: inherit;
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 8px;
    outline: none;
    padding: 14px 16px;
}

.field select:focus,
.field textarea:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.field select[multiple] {
    min-height: 148px;
    padding: 8px;
}

.field select[multiple] option {
    border-radius: 5px;
    padding: 9px 10px;
}

.choice-field {
    border: 1px solid #132a241a;
    border-radius: 8px;
    margin: 0;
    padding: 16px;
}

.choice-field legend {
    padding: 0 7px;
    font-size: 0.88rem;
    font-weight: 800;
}

.choice-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    display: grid;
}

.choice-option,
.stacked-checks label {
    background: #fff;
    border: 1px solid #132a2414;
    border-radius: 7px;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    font-size: 0.86rem;
    font-weight: 700;
    display: flex;
}

.choice-option input,
.stacked-checks input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.stacked-checks {
    gap: 8px;
    display: grid;
}

.review-block {
    background: #fff;
    border: 1px solid #132a2414;
    border-radius: 8px;
    padding: 15px;
}

.review-block p {
    color: var(--muted);
    margin: 7px 0 0;
}

.section-card .role-switcher {
    margin-top: 20px;
}

.section-card,
.summary-card,
.permissions-card,
.permission-section,
.summary-item,
.summary-note,
.role-option,
.permission-row,
.modal-card,
.modal-summary-grid div,
.modal-row {
    border-radius: 8px;
}

.action-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

@media (width<=760px) {
    .choice-grid {
        grid-template-columns: 1fr;
    }
}

:root {
    --surface: #fffaf3d6;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --success: #18794e;
    --danger: #a13816;
    --warning: #d4a017;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

.topbar,
.products-layout {
    z-index: 1;
    position: relative;
}

.top-actions,
.form-actions {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.products-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.6fr);
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
}

.product-form-card,
.preview-card,
.products-table-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
    padding: 24px;
}

.products-table-card {
    grid-column: 1/-1;
}

.product-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
    display: grid;
}

.field.wide,
.form-actions.wide {
    grid-column: 1/-1;
}

.field span {
    color: var(--muted);
    font-weight: 800;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.image-upload-field small {
    color: var(--muted);
    font-weight: 700;
}

.product-preview-image {
    min-height: 260px;
    color: var(--muted);
    background: linear-gradient(135deg, #0f766e2e, #d4a01729);
    border-radius: 24px;
    place-items: center;
    font-weight: 800;
    display: grid;
    overflow: hidden;
}

.product-preview-image img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    min-height: 260px;
    display: block;
}

.preview-content {
    gap: 12px;
    margin-top: 18px;
    display: grid;
}

.preview-content p {
    color: var(--muted);
    margin: 0;
    line-height: 1.7;
}

.preview-meta {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    display: flex;
}

.preview-meta span,
.preview-content small {
    color: var(--muted);
}

.preview-meta strong {
    font-size: 1.25rem;
}

.status-pill {
    width: fit-content;
    color: var(--success);
    background: #18794e24;
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
}

.status-pill.draft {
    color: #8c6500;
    background: #d4a0172e;
}

.status-pill.out-of-stock {
    color: var(--danger);
    background: #a1381621;
}

.count-pill {
    color: var(--accent);
    background: #0f766e1a;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
}

.toast {
    color: #fff;
    z-index: 25;
    background: #132a24f5;
    border-radius: 20px;
    gap: 6px;
    min-width: min(100%, 360px);
    max-width: 420px;
    padding: 16px 18px;
    display: grid;
    position: fixed;
    bottom: 24px;
    right: 24px;
    box-shadow: 0 24px 50px #15231f38;
}

.toast.hidden {
    display: none;
}

.toast span {
    color: #ffffffc2;
}

@media (width<=1120px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
}

@media (width<=760px) {

    .topbar,
    .product-form {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
}

:root {
    --bg: #f5efe4;
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --danger: #c2410c;
    --warning: #d4a017;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

.topbar,
.hero-card,
.details-card,
.tabs-card {
    z-index: 1;
    position: relative;
}

.subtitle {
    max-width: 720px;
    color: var(--muted);
    margin: 12px 0 0;
    font-size: 1rem;
}

.action-btn,
.save-btn,
.inline-btn,
.mini-link {
    cursor: pointer;
    border: 0;
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}

.action-btn:hover,
.save-btn:hover,
.inline-btn:hover,
.mini-link:hover,
.tab-btn:hover {
    transform: translateY(-1px);
}

.hero-card,
.details-card,
.tabs-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.stat-card,
.side-panel,
.timeline-item,
.log-item,
.message-item {
    background: var(--surface-strong);
    border: 1px solid #132a240f;
}

.state-grid {
    gap: 14px;
    display: grid;
}

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

.permission-copy {
    gap: 6px;
    display: grid;
}

.select-field span,
.field span,
.permission-copy span {
    font-size: 0.9rem;
    font-weight: 700;
}

input::placeholder {
    color: #889691;
}

.quick-links {
    flex-wrap: wrap;
    gap: 10px;
    display: flex;
}

.mini-link {
    color: var(--accent-strong);
    background: #0f766e14;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
}

.mini-link.active {
    background: var(--accent);
    color: #fff;
}

.permission-toggle {
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    justify-self: start;
    padding: 12px 16px;
    font-weight: 800;
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}

.permission-toggle:hover {
    transform: translateY(-1px);
}

.permission-toggle.allowed {
    color: var(--success);
    background: #18794e24;
    box-shadow: 0 10px 24px #18794e1f;
}

.permission-toggle.blocked {
    color: var(--danger);
    background: #a1381624;
    box-shadow: 0 10px 24px #a138161f;
}

.details-card,
.tabs-card {
    padding: 26px;
}

.section-head,
.panel-topline,
.tabs-header {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    display: flex;
}

.save-btn,
.inline-btn {
    background: var(--surface-dark);
    color: #fff;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 800;
}

.tabs-header {
    border-bottom: 1px solid #132a2414;
    padding-bottom: 18px;
}

.tab-btn {
    color: var(--muted);
    cursor: pointer;
    background: 0 0;
    border: 0;
    border-bottom: 3px solid #0000;
    padding: 0 0 12px;
    font-weight: 800;
}

.tab-btn.active {
    color: var(--text);
    border-color: var(--accent);
}

.tab-panel {
    padding-top: 22px;
    animation: 0.28s fadeUp;
    display: none;
}

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

.table-shell {
    border: 1px solid #132a2414;
    border-radius: 18px;
    margin-top: 18px;
    overflow: auto;
}

table {
    border-collapse: collapse;
    background: #fff;
    width: 100%;
}

.badge {
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.8rem;
    font-weight: 800;
    display: inline-block;
}

.badge.blue {
    color: var(--accent-strong);
    background: #0f766e1c;
}

.badge.green {
    color: var(--success);
    background: #18794e21;
}

.badge.amber {
    color: #8c6500;
    background: #d4a0172e;
}

.timeline,
.log-list,
.message-stack {
    gap: 14px;
    margin-top: 18px;
    display: grid;
}

.timeline-item,
.log-item,
.message-item {
    border-radius: 18px;
    padding: 18px;
}

.timeline-item {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    display: grid;
}

.timeline-item p,
.log-item p,
.message-item p {
    color: var(--muted);
    margin: 6px 0 0;
}

.timeline-item time,
.log-item span,
.message-head span {
    color: var(--muted);
    font-size: 0.9rem;
}

.timeline-dot {
    border-radius: 50%;
    width: 14px;
    height: 14px;
}

.timeline-dot.success {
    background: var(--success);
}

.timeline-dot.neutral {
    background: var(--accent);
}

.timeline-dot.alert {
    background: var(--warning);
}

.message-item.outgoing {
    border-left: 4px solid var(--accent);
}

.message-item.incoming {
    border-left: 4px solid var(--warning);
}

.message-head {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    display: flex;
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (width<=720px) {

    .topbar,
    .section-head,
    .panel-topline {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-stats,
    .details-grid {
        grid-template-columns: 1fr;
    }
}

:root {
    --bg: #efe5d7;
    --sidebar: #132a24;
    --sidebar-soft: #1b3a32;
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #60706a;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #d4a017;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

button {
    font: inherit;
}

.brand-block h1 {
    letter-spacing: -0.04em;
    margin: 0;
    font-family:
        Space Grotesk,
        sans-serif;
    font-size: 2rem;
}

.nav-link.active,
.nav-link:hover {
    background: #ffffff14;
}

.main-content {
    padding: 30px;
}

.topbar,
.hero-banner,
.kpi-grid,
.leaders-grid {
    max-width: 1580px;
    margin: 0 auto;
}

.topbar {
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
    display: flex;
}

.top-actions,
.hero-tags {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.action-btn.primary {
    color: #fff;
    background: #132a24;
}

.hero-banner,
.kpi-card,
.leader-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.hero-banner {
    border-radius: var(--radius-xl);
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
    margin-top: 24px;
    padding: 24px 26px;
    display: flex;
}

.hero-banner p:last-child {
    color: var(--muted);
    max-width: 760px;
    margin: 12px 0 0;
    line-height: 1.7;
}

.hero-tag {
    color: var(--accent-strong);
    background: #0f766e14;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
    display: inline-flex;
}

.hero-tag.success {
    color: var(--success);
    background: #18794e1f;
}

.kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
    display: grid;
}

.kpi-card {
    border-radius: var(--radius-lg);
    background: #fffaf3e0;
    padding: 18px;
}

.kpi-card span,
.section-note {
    color: var(--muted);
}

.kpi-card strong {
    letter-spacing: -0.03em;
    margin-top: 10px;
    font-family:
        Space Grotesk,
        sans-serif;
    font-size: 1.55rem;
    display: block;
}

.kpi-card small {
    color: var(--muted);
    margin-top: 8px;
    display: block;
}

.kpi-card.accent {
    background: linear-gradient(135deg, #0f766e1a, #fffaf3f2);
}

.kpi-card.money {
    background: linear-gradient(135deg, #d4a0171f, #fffaf3f5);
}

.leaders-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
    display: grid;
}

.leader-card {
    border-radius: var(--radius-xl);
    padding: 24px;
}

.leader-list {
    gap: 12px;
    margin-top: 18px;
    display: grid;
}

.leader-item {
    background: var(--surface-strong);
    border: 1px solid #132a240f;
    border-radius: 18px;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    display: flex;
}

.leader-item span {
    color: var(--muted);
    font-weight: 700;
}

@media (width<=1380px) {
    .kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (width<=1180px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        height: auto;
        position: relative;
    }

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

@media (width<=860px) {
    .main-content {
        padding: 18px;
    }

    .topbar,
    .hero-banner,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .kpi-grid,
    .leaders-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-card.partner-metric {
    background: #eaf2ff;
    border-color: #071a3d1f;
}

.kpi-card.partner-metric strong {
    color: #071a3d;
}

.kpi-card.profit-metric {
    background: #edf8f2;
    border-color: #18794e24;
}

.kpi-card.profit-metric strong {
    color: #0f6a42;
}

:root {
    --surface: #fffaf3d6;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --success: #18794e;
    --warning: #d4a017;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
}

.topbar,
.history-layout {
    z-index: 1;
    position: relative;
}

.subtitle,
.metric-card span,
.metric-card small,
th {
    color: var(--muted);
}

.subtitle {
    max-width: 760px;
    margin: 12px 0 0;
}

.action-link {
    background: var(--surface-dark);
    color: #fff;
    box-shadow: var(--shadow);
    border-radius: 999px;
    padding: 14px 20px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
}

.history-layout {
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
}

.metric-card,
.history-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.metric-card {
    padding: 20px;
}

.history-card {
    padding: 24px;
}

.status-pill.live {
    color: var(--success);
    background: #18794e24;
}

.status-pill.ended {
    color: #8c6500;
    background: #d4a0172e;
}

.link-cell {
    color: var(--accent);
    font-weight: 800;
}

@media (width<=980px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (width<=760px) {

    .topbar,
    .summary-grid {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
}

:root {
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #d4a017;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

.topbar,
.summary-grid,
.ads-grid {
    z-index: 1;
    position: relative;
}

.subtitle,
.metric-card span,
.metric-card small,
.ad-meta span,
.ad-meta p,
.ad-meta a {
    color: var(--muted);
}

.top-actions,
.card-actions {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.action-btn,
.mini-btn {
    cursor: pointer;
    border: 0;
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}

.action-btn:hover,
.mini-btn:hover {
    transform: translateY(-1px);
}

.action-btn.primary,
.mini-btn.primary {
    background: var(--surface-dark);
    color: #fff;
}

.ads-layout {
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
}

.metric-card,
.ad-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.ads-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
    display: grid;
}

.ad-card {
    overflow: hidden;
}

.ad-card.featured {
    grid-row: span 2;
}

.ad-visual {
    color: #fff;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    padding: 24px;
    display: flex;
    position: relative;
}

.hero-creative {
    background:
        radial-gradient(circle at 100% 0, #d4a01759, #0000 30%),
        linear-gradient(135deg, #0f766e 0%, #133a33 55%, #0d201c 100%);
}

.side-creative {
    background:
        radial-gradient(circle at 0 100%, #ffffff2e, #0000 28%),
        linear-gradient(135deg, #ca8a04 0%, #7c4b00 100%);
}

.offer-creative {
    background:
        radial-gradient(circle at 0 0, #ffffff2e, #0000 25%),
        linear-gradient(135deg, #1d4d44 0%, #0f766e 100%);
}

.creative-copy h2 {
    margin-top: 12px;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.creative-copy p,
.side-creative p,
.offer-creative p {
    color: #ffffffd1;
    margin: 12px 0 0;
    line-height: 1.6;
}

.creative-badge,
.creative-chip,
.stacked-tag {
    backdrop-filter: blur(8px);
    background: #ffffff24;
    border-radius: 999px;
    width: fit-content;
    padding: 8px 12px;
    font-weight: 800;
    display: inline-flex;
}

.creative-badge.subtle {
    background: #ffffff2e;
}

.creative-chip {
    align-self: flex-start;
}

.ad-content {
    padding: 22px;
}

.ad-head {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    display: flex;
}

.status-pill {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    display: inline-flex;
}

.status-pill.scheduled {
    color: #8c6500;
    background: #d4a0172e;
}

.ad-meta {
    gap: 16px;
    margin-top: 18px;
    display: grid;
}

.ad-meta span {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.84rem;
    font-weight: 800;
    display: block;
}

.ad-meta p {
    margin: 8px 0 0;
    line-height: 1.7;
}

.ad-meta a {
    color: var(--accent-strong);
    margin-top: 8px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
}

.card-actions {
    margin-top: 18px;
}

.mini-btn {
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 800;
}

@media (width<=1180px) {

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

    .ad-card.featured {
        grid-area: span 1 / span 2;
    }
}

@media (width<=760px) {

    .topbar,
    .ad-head {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-grid,
    .ads-grid {
        grid-template-columns: 1fr;
    }

    .ad-card.featured {
        grid-column: span 1;
    }
}

.modal-overlay {
    backdrop-filter: blur(10px);
    z-index: 20;
    background: #0a18156b;
    place-items: center;
    padding: 24px;
    display: grid;
    position: fixed;
    inset: 0;
}

.modal-overlay.hidden {
    display: none;
}

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

.modal-subtitle,
.info-panel p,
.toast span {
    color: var(--muted);
}

.modal-subtitle {
    margin: 12px 0 0;
}

.icon-btn {
    cursor: pointer;
    width: 44px;
    height: 44px;
    color: var(--text);
    background: #132a2414;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
}

.modal-body {
    margin-top: 22px;
}

.info-panel {
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid #132a240f;
    gap: 14px;
    padding: 20px;
    display: grid;
}

.info-panel p {
    margin: 0;
    line-height: 1.7;
}

.info-panel strong {
    color: var(--text);
}

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

.ads-form label {
    gap: 8px;
    display: grid;
}

.ads-form label.wide {
    grid-column: 1/-1;
}

.ads-form span {
    color: var(--muted);
    font-weight: 800;
}

.ads-form input,
.ads-form textarea {
    width: 100%;
    color: var(--text);
    font: inherit;
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
}

.ads-form textarea {
    resize: vertical;
}

@media (width<=760px) {

    .modal-head,
    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

.image-upload-field input[type="file"] {
    cursor: pointer;
    padding: 12px;
}

.ad-image-preview {
    min-height: 220px;
    color: var(--muted);
    background: #ffffff8c;
    border: 1px dashed #132a2438;
    border-radius: 18px;
    place-items: center;
    font-weight: 800;
    display: grid;
    overflow: hidden;
}

.ad-image-preview img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    max-height: 320px;
    display: block;
}

.form-submit-row {
    justify-content: flex-end;
    display: flex;
}

.preview-report {
    gap: 18px;
    display: grid;
}

.preview-header {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    display: flex;
}

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

.preview-metrics article {
    background: #0f766e14;
    border: 1px solid #132a2412;
    border-radius: 18px;
    padding: 16px;
}

.preview-metrics span {
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 900;
    display: block;
}

.preview-metrics strong {
    color: var(--text);
    margin-top: 8px;
    font-size: 1.18rem;
    display: block;
}

@media (width<=760px) {
    .preview-metrics {
        grid-template-columns: 1fr;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    #adsModal,
    #adsModal * {
        visibility: visible;
    }

    #adsModal {
        backdrop-filter: none;
        background: #fff;
        padding: 0;
        position: absolute;
        inset: 0;
        display: block !important;
    }

    #adsModal .modal-card {
        width: 100%;
        max-height: none;
        box-shadow: none;
        border: 0;
        border-radius: 0;
    }

    #printAdPreviewBtn,
    #closeAdsModalBtn,
    #closeAdsModalFooterBtn {
        display: none !important;
    }
}

:root {
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

.topbar,
.summary-grid,
.shares-card {
    z-index: 1;
    position: relative;
}

.subtitle,
.table-note,
.customer-cell span,
th {
    color: var(--muted);
}

.top-actions {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.shares-layout {
    gap: 24px;
    max-width: 1380px;
    margin: 0 auto;
    display: grid;
}

.metric-card,
.shares-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.shares-card {
    padding: 24px;
}

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

.customer-cell {
    gap: 6px;
    display: grid;
}

.customer-cell strong,
.count-pill {
    font-weight: 800;
}

.count-pill {
    color: var(--accent-strong);
    background: #0f766e1a;
    border-radius: 999px;
    padding: 8px 12px;
    display: inline-flex;
}

@media (width<=1050px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (width<=720px) {

    .topbar,
    .card-head {
        flex-direction: column;
        align-items: stretch;
    }
}

:root {
    --navy: #10243f;
    --navy-2: #183858;
    --text: #172233;
    --muted: #667085;
    --line: #e5e9ef;
    --surface: #fff;
    --page: #f3f6f9;
    --green: #18794e;
    --red: #b42318;
    --amber: #b7791f;
    --shadow: 0 12px 34px #10243f14;
}

* {
    box-sizing: border-box;
}

button,
input,
select,
textarea {
    font: inherit;
}

.page-shell {
    padding: 30px;
}

.topbar,
.approval-layout {
    max-width: 1560px;
    margin-inline: auto;
}

.eyebrow {
    color: #0f766e;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 7px;
    font-size: 0.78rem;
    font-weight: 800;
}

h1,
h2 {
    letter-spacing: 0;
    margin: 0;
    font-family:
        Space Grotesk,
        sans-serif;
}

.subtitle {
    max-width: 790px;
    color: var(--muted);
    margin: 10px 0 0;
    line-height: 1.65;
}

.top-actions,
.modal-actions {
    flex-wrap: wrap;
    gap: 10px;
    display: flex;
}

.action-btn,
.clear-btn,
.segment,
.table-btn {
    cursor: pointer;
    border: 0;
    border-radius: 7px;
    font-weight: 800;
}

.action-btn {
    padding: 12px 17px;
}

.action-btn.primary {
    background: var(--navy);
    color: #fff;
}

.action-btn.ghost {
    color: var(--navy);
    border: 1px solid var(--line);
    background: #fff;
}

.approval-layout {
    gap: 20px;
    display: grid;
}

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

.metric-card,
.approval-card,
.modal-card {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 8px;
}

.metric-card {
    border-top: 3px solid var(--navy-2);
    padding: 19px;
}

.metric-card.urgent-card {
    border-top-color: var(--amber);
}

.metric-card span,
.metric-card small {
    color: var(--muted);
}

.metric-card strong {
    margin: 8px 0 4px;
    font-size: 1.75rem;
    display: block;
}

.approval-card {
    padding: 22px;
}

.card-head {
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    display: flex;
}

.segmented {
    background: #edf1f5;
    border-radius: 8px;
    padding: 4px;
    display: flex;
}

.segment {
    color: var(--muted);
    background: 0 0;
    padding: 9px 13px;
}

.segment.active {
    color: #fff;
    background: var(--navy);
}

.filter-bar {
    grid-template-columns:
        minmax(240px, 1.4fr) repeat(2, minmax(170px, 0.7fr)) auto;
    align-items: end;
    gap: 12px;
    margin: 20px 0;
    display: grid;
}

.filter-bar label,
.decision-form label {
    gap: 7px;
    display: grid;
}

.filter-bar span,
.decision-form span {
    font-size: 0.8rem;
    font-weight: 800;
}

.filter-bar input,
.filter-bar select,
.decision-form textarea {
    border: 1px solid var(--line);
    width: 100%;
    color: var(--text);
    background: #fff;
    border-radius: 7px;
    outline: none;
    padding: 11px 12px;
}

.filter-bar input:focus,
.filter-bar select:focus,
.decision-form textarea:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px #0f766e1a;
}

.clear-btn {
    height: 43px;
    color: var(--navy);
    background: #eef2f6;
    padding: 0 15px;
}

.table-shell {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: auto;
}

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

th {
    color: var(--muted);
    text-transform: uppercase;
    background: #f8fafc;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

td {
    font-size: 0.84rem;
}

.request-cell strong,
.request-cell span {
    display: block;
}

.request-cell span,
.muted {
    color: var(--muted);
    margin-top: 4px;
    font-size: 0.75rem;
}

.change-cell {
    max-width: 260px;
}

.change-cell span {
    display: block;
}

.change-cell b {
    color: var(--green);
}

.pill {
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
}

.pill.pending {
    color: #8a5b0b;
    background: #fff3d6;
}

.pill.approved {
    color: var(--green);
    background: #e9f7ef;
}

.pill.rejected {
    color: var(--red);
    background: #fdecea;
}

.pill.urgent {
    color: #a33a14;
    background: #fff0e8;
}

.pill.normal {
    color: #475467;
    background: #edf2f7;
}

.actions {
    gap: 6px;
    display: flex;
}

.table-btn {
    color: var(--navy);
    background: #edf2f7;
    padding: 8px 10px;
}

.table-btn.approve {
    color: var(--green);
    background: #e9f7ef;
}

.table-btn.reject {
    color: var(--red);
    background: #fdecea;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 36px;
}

.empty-state strong {
    color: var(--text);
}

.modal-overlay {
    z-index: 80;
    background: #09182a8c;
    place-items: center;
    padding: 22px;
    display: grid;
    position: fixed;
    inset: 0;
}

.modal-overlay.hidden,
.hidden {
    display: none !important;
}

.modal-card {
    width: min(820px, 100%);
    max-height: 88vh;
    padding: 25px;
    position: relative;
    overflow: auto;
}

.modal-close {
    cursor: pointer;
    background: #edf2f7;
    border: 0;
    border-radius: 7px;
    width: 34px;
    height: 34px;
    font-weight: 900;
    position: absolute;
    top: 17px;
    right: 17px;
}

.modal-body {
    gap: 14px;
    margin-top: 18px;
    display: grid;
}

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

.detail-item,
.change-panel,
.reason-panel,
.evidence-row {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 13px;
}

.detail-item span,
.change-column span {
    color: var(--muted);
    font-size: 0.74rem;
    display: block;
}

.detail-item strong,
.change-column strong {
    margin-top: 5px;
    display: block;
}

.change-panel {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    display: grid;
}

.change-arrow {
    color: #0f766e;
    font-weight: 900;
}

.reason-panel p {
    margin: 7px 0 0;
    line-height: 1.6;
}

.evidence-row {
    justify-content: space-between;
    gap: 12px;
    display: flex;
}

.decision-form {
    background: #f8fafc;
    border-radius: 8px;
    margin-top: 16px;
    padding: 15px;
}

.form-error {
    min-height: 18px;
    color: var(--red);
    margin: 7px 0 0;
    font-size: 0.8rem;
    font-weight: 700;
}

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

.action-btn.approve {
    background: var(--green);
    color: #fff;
}

.action-btn.reject {
    background: var(--red);
    color: #fff;
}

.toast {
    z-index: 90;
    background: var(--navy);
    color: #fff;
    box-shadow: var(--shadow);
    border-radius: 7px;
    padding: 13px 17px;
    font-weight: 800;
    position: fixed;
    bottom: 22px;
    right: 22px;
}

@media (width<=1000px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    .clear-btn {
        height: 43px;
    }
}

@media (width<=700px) {
    .page-shell {
        padding: 17px;
    }

    .topbar,
    .card-head {
        flex-direction: column;
    }

    .metrics-grid,
    .filter-bar,
    .detail-grid,
    .change-panel {
        grid-template-columns: 1fr;
    }

    .change-arrow {
        text-align: center;
        transform: rotate(90deg);
    }

    .approval-card {
        padding: 14px;
    }

    h1 {
        font-size: 2rem;
    }
}

:root {
    --bg: #efe5d7;
    --sidebar: #132a24;
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-soft: #fffaf3f0;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #60706a;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #d4a017;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
}

.brand-block h1 a {
    color: inherit;
    text-decoration: none;
}

.topbar,
.hero-banner,
.summary-grid,
.packages-grid {
    max-width: 1580px;
    margin: 0 auto;
}

h2,
h3,
h4 {
    letter-spacing: -0.03em;
    margin: 0;
    font-family:
        Space Grotesk,
        sans-serif;
}

.top-actions,
.hero-tags,
.value-fields {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.hero-banner,
.summary-card,
.package-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
    display: grid;
}

.summary-card span,
.summary-card small,
.field label,
.package-index,
.service-count,
.field span {
    color: var(--muted);
}

.summary-card strong {
    margin: 10px 0 6px;
    font-size: 1.7rem;
    display: block;
}

.packages-grid {
    gap: 22px;
    margin-top: 24px;
    display: grid;
}

.package-card {
    border-radius: var(--radius-xl);
    padding: 22px;
}

.package-head {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    display: flex;
}

.package-meta h3 {
    font-size: 1.45rem;
}

.package-index {
    font-size: 0.9rem;
    font-weight: 700;
}

.service-count {
    background: #ffffffbf;
    border: 1px solid #132a2414;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
    display: inline-flex;
}

.setup-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
    display: grid;
}

.field span {
    font-size: 0.92rem;
    font-weight: 700;
}

.field input,
.field select {
    background: var(--surface-strong);
    width: 100%;
    min-height: 48px;
    color: var(--text);
    border: 1px solid #132a241f;
    border-radius: 16px;
    padding: 12px 14px;
}

.field input[readonly] {
    background: #f4ede3;
    font-weight: 700;
}

.table-shell {
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    border: 1px solid #132a2414;
    margin-top: 18px;
    overflow-x: auto;
}

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

.service-name {
    font-weight: 700;
}

.chip {
    color: var(--accent-strong);
    background: #0f766e14;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.88rem;
    font-weight: 800;
    display: inline-flex;
}

.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 18px;
}

.service-builder {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 18px;
    display: grid;
}

.builder-panel,
.quick-panel,
.values-panel {
    border-radius: var(--radius-lg);
    background: #ffffff8c;
    border: 1px solid #132a2414;
    padding: 18px;
}

.panel-title {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    display: flex;
}

.panel-title p {
    color: var(--muted);
    margin: 6px 0 0;
}

.builder-row {
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 12px;
    display: grid;
}

.small-btn,
.remove-btn {
    cursor: pointer;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    transition:
        transform 0.18s,
        background 0.18s;
}

.small-btn:hover,
.remove-btn:hover {
    transform: translateY(-1px);
}

.small-btn {
    color: #fff;
    background: #132a24;
    padding: 12px 14px;
}

.remove-btn {
    color: #8f3113;
    background: #a138161f;
    padding: 10px 12px;
}

.quick-list {
    flex-wrap: wrap;
    gap: 10px;
    display: flex;
}

.quick-btn {
    background: var(--surface-strong);
    color: var(--text);
    cursor: pointer;
    border: 1px solid #132a2414;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    transition:
        transform 0.18s,
        border-color 0.18s;
}

.quick-btn:hover {
    border-color: #0f766e47;
    transform: translateY(-1px);
}

.values-panel {
    margin-top: 16px;
}

.value-fields .field {
    flex: 180px;
}

@media (width<=1200px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .setup-grid,
    .service-builder {
        grid-template-columns: 1fr;
    }
}

@media (width<=720px) {
    .main-content {
        padding: 20px;
    }

    .topbar,
    .hero-banner {
        flex-direction: column;
    }

    .summary-grid,
    .builder-row {
        grid-template-columns: 1fr;
    }
}

button,
input,
textarea {
    font: inherit;
}

.topbar,
.summary-grid,
.creation-grid,
.table-card {
    z-index: 1;
    position: relative;
}

.subtitle,
.metric-card span,
.metric-card small,
.guide-item p,
.table-note,
th {
    color: var(--muted);
}

.extra-layout {
    gap: 24px;
    max-width: 1480px;
    margin: 0 auto;
    display: grid;
}

.metric-card,
.form-card,
.guide-card,
.table-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.creation-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
    gap: 20px;
    display: grid;
}

.form-card,
.guide-card,
.table-card {
    padding: 24px;
}

.field input,
.field textarea {
    width: 100%;
    color: var(--text);
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
}

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

.field input:focus,
.field textarea:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.preview-field {
    align-content: start;
}

.order-preview {
    background: var(--surface-strong);
    border: 1px solid #132a2414;
    border-radius: 16px;
    align-items: center;
    min-height: 56px;
    padding: 14px 16px;
    display: flex;
}

.preview-pill {
    color: var(--accent-strong);
    background: #0f766e1a;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    display: inline-flex;
}

.guide-list {
    gap: 14px;
    margin-top: 20px;
    display: grid;
}

.guide-item {
    background: var(--surface-strong);
    border: 1px solid #132a240f;
    border-radius: 18px;
    padding: 16px;
}

.guide-item strong {
    display: block;
}

.guide-item p {
    margin: 8px 0 0;
    line-height: 1.6;
}

@media (width<=1180px) {
    .creation-grid {
        grid-template-columns: 1fr;
    }
}

@media (width<=760px) {

    .topbar,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

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

    .field.wide {
        grid-column: span 1;
    }
}

.extra-status {
    white-space: nowrap;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
}

.extra-status.active {
    color: #0f6a42;
    background: #18794e1f;
}

.extra-status.deleted {
    color: #8a2d12;
    background: #a138161f;
}

.temporarily-deleted-row {
    opacity: 0.72;
    background: #a1381609;
}

.extra-state-btn {
    cursor: pointer;
    font: inherit;
    white-space: nowrap;
    border: 0;
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 0.78rem;
    font-weight: 800;
}

.extra-state-btn.delete {
    color: #8a2d12;
    background: #a138161f;
}

.extra-state-btn.restore {
    color: #0f6a42;
    background: #18794e24;
}

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

.save-extra-btn,
.reset-extra-btn {
    cursor: pointer;
    font: inherit;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
}

.save-extra-btn {
    background: var(--surface-dark);
    color: #fff;
}

.reset-extra-btn {
    color: var(--text);
    background: #132a2414;
}

:root {
    --bg: #f5efe4;
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #d4a017;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

.topbar,
.summary-grid,
.hero-card,
.workspace-grid,
.bottom-grid {
    z-index: 1;
    position: relative;
}

.top-actions,
.hero-actions,
.hero-pills {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.action-btn,
.inline-btn,
.small-btn,
.stack-item,
.footer-btn,
.close-btn {
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}

.action-btn:hover,
.inline-btn:hover,
.small-btn:hover,
.stack-item:hover,
.footer-btn:hover,
.close-btn:hover {
    transform: translateY(-1px);
}

.action-btn,
.inline-btn,
.small-btn,
.footer-btn,
.close-btn {
    cursor: pointer;
    border: 0;
    font-weight: 800;
}

.action-btn {
    box-shadow: var(--shadow);
    border-radius: 999px;
    padding: 14px 20px;
}

.action-btn.primary,
.inline-btn {
    background: var(--surface-dark);
    color: #fff;
}

.action-btn.ghost,
.inline-btn.secondary,
.small-btn {
    color: var(--text);
    background: #fffaf2d9;
}

.dashboard-layout {
    gap: 24px;
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
}

.summary-grid,
.workspace-grid,
.bottom-grid {
    gap: 20px;
    display: grid;
}

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

.hero-card,
.metric-card,
.panel-card,
.packages-card,
.structure-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.metric-card,
.panel-card,
.packages-card,
.structure-card {
    border-radius: var(--radius-xl);
}

.metric-card span,
.metric-card small,
.hero-meta,
.mini-stat span,
.stack-item p,
.package-card p,
.tree-item p {
    color: var(--muted);
}

.hero-row,
.panel-head {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    display: flex;
}

.hero-meta {
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 10px 0 0;
    display: flex;
}

.hero-actions {
    margin-top: 22px;
}

.pill {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 800;
}

.pill.success {
    color: var(--success);
    background: #18794e24;
}

.mini-stat {
    border-radius: var(--radius-lg);
    background: var(--surface-dark);
    border: 1px solid #132a240f;
    padding: 18px;
}

.mini-stat strong {
    margin-top: 8px;
    font-size: 1.7rem;
    display: block;
}

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

.panel-card,
.packages-card,
.structure-card {
    padding: 24px;
}

.stack-list,
.packages-grid,
.structure-tree {
    gap: 14px;
    margin-top: 18px;
    display: grid;
}

.stack-item {
    background: var(--surface-strong);
    cursor: pointer;
    border: 1px solid #132a2412;
    border-radius: 18px;
    padding: 18px;
}

.stack-item.active {
    background: #0f766e17;
    border-color: #0f766e40;
}

.stack-item h4,
.package-card h4,
.tree-item h4 {
    font-size: 1rem;
}

.stack-item p,
.package-card p,
.tree-item p {
    margin: 8px 0 0;
    line-height: 1.5;
}

.bottom-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
}

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

.package-card,
.tree-item {
    background: var(--surface-strong);
    border: 1px solid #132a2412;
    border-radius: 18px;
    padding: 18px;
}

.package-meta {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    display: flex;
}

.tag {
    color: var(--accent-strong);
    background: #0f766e1a;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 800;
}

.tag.warn {
    color: #8c6500;
    background: #d4a0172b;
}

.modal-backdrop {
    z-index: 20;
    backdrop-filter: blur(10px);
    background: #0a14126b;
    place-items: center;
    padding: 24px;
    display: grid;
    position: fixed;
    inset: 0;
}

.modal-backdrop.hidden {
    display: none;
}

.creation-modal {
    background: #fffaf3f5;
    border: 1px solid #132a2414;
    border-radius: 30px;
    width: min(1100px, 100%);
    padding: 26px;
    box-shadow: 0 30px 80px #15231f2e;
}

.modal-head,
.modal-footer {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    display: flex;
}

.modal-subtitle {
    color: var(--muted);
    max-width: 700px;
    margin: 10px 0 0;
}

.close-btn,
.footer-btn {
    border-radius: 14px;
    padding: 12px 16px;
}

.close-btn,
.footer-btn.ghost {
    color: var(--text);
    background: #15231f14;
}

.footer-btn.primary {
    background: var(--surface-dark);
    color: #fff;
}

.modal-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 18px;
    margin-top: 22px;
    display: grid;
}

.modal-form-panel,
.modal-context-panel {
    gap: 16px;
    display: grid;
}

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

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

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

.form-field label,
.context-label {
    font-size: 0.88rem;
    font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    color: var(--text);
    font: inherit;
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
}

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

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.context-card {
    background: var(--surface-strong);
    border: 1px solid #132a2412;
    border-radius: 20px;
    padding: 18px;
}

.context-card strong {
    margin-top: 8px;
    font-size: 1rem;
    display: block;
}

.context-card p {
    color: var(--muted);
    margin: 10px 0 0;
    line-height: 1.6;
}

.goal-list {
    color: var(--muted);
    gap: 10px;
    margin: 12px 0 0;
    padding-left: 18px;
    display: grid;
}

.modal-footer {
    margin-top: 22px;
}

.tree-group {
    gap: 12px;
    display: grid;
}

.tree-item {
    position: relative;
}

.tree-item:before {
    content: "";
    background: #0f766e33;
    width: 10px;
    height: 2px;
    position: absolute;
    top: 24px;
    left: -10px;
}

@media (width<=1180px) {

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

    .hero-card,
    .bottom-grid,
    .modal-grid {
        grid-template-columns: 1fr;
    }
}

@media (width<=760px) {

    .topbar,
    .hero-row,
    .panel-head,
    .modal-head,
    .modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-grid,
    .workspace-grid,
    .packages-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.topbar,
.summary-grid,
.workspace-grid {
    z-index: 1;
    position: relative;
}

.subtitle,
.metric-card span,
.metric-card small,
.section-note,
.panel-title span,
.flow-note p,
.field span {
    color: var(--muted);
}

.top-actions,
.governorate-tabs {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.action-btn,
.tab-btn,
.save-btn,
.location-chip {
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}

.action-btn:hover,
.tab-btn:hover,
.save-btn:hover,
.location-chip:hover {
    transform: translateY(-1px);
}

.action-btn,
.tab-btn,
.save-btn {
    cursor: pointer;
    border: 0;
    font-weight: 800;
}

.action-btn.primary,
.save-btn {
    background: var(--surface-dark);
    color: #fff;
}

.action-btn.ghost,
.tab-btn {
    color: var(--text);
    background: #fffaf2e0;
}

.locations-layout {
    gap: 24px;
    max-width: 1480px;
    margin: 0 auto;
    display: grid;
}

.metric-card,
.manager-card,
.preview-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.workspace-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
    gap: 20px;
    display: grid;
}

.manager-card,
.preview-card {
    padding: 24px;
}

.section-head,
.panel-title {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    display: flex;
}

.governorate-tabs {
    margin-top: 20px;
}

.tab-btn {
    border-radius: 999px;
    padding: 11px 15px;
}

.tab-btn.active {
    background: var(--accent);
    color: #fff;
}

.manager-grid {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    margin-top: 20px;
    display: grid;
}

.create-panel,
.locations-panel,
.app-mock {
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid #132a240f;
    padding: 20px;
}

.create-panel {
    align-content: start;
    gap: 14px;
    display: grid;
}

.field input,
.field select {
    width: 100%;
    color: var(--text);
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
}

.field input:focus,
.field select:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.save-btn {
    border-radius: 16px;
    padding: 14px 18px;
}

.location-list {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    display: flex;
}

.location-chip {
    color: var(--accent-strong);
    background: #0f766e1a;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    display: inline-flex;
}

.mock-header {
    gap: 8px;
    margin-bottom: 18px;
    display: flex;
}

.mock-dot {
    background: #132a2438;
    border-radius: 50%;
    width: 10px;
    height: 10px;
}

.mock-body {
    gap: 16px;
    display: grid;
}

.flow-note {
    background: #0f766e0f;
    border: 1px solid #0f766e1f;
    border-radius: 18px;
    padding: 16px;
}

.flow-note strong {
    display: block;
}

.flow-note p {
    margin: 8px 0 0;
    line-height: 1.6;
}

@media (width<=1180px) {

    .workspace-grid,
    .manager-grid {
        grid-template-columns: 1fr;
    }
}

@media (width<=760px) {

    .topbar,
    .section-head,
    .panel-title {
        flex-direction: column;
        align-items: stretch;
    }

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

.location-chip {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.location-chip small {
    color: #9a3412;
    font-weight: 800;
}

.location-chip.temporarily-deleted {
    color: #7c2d12;
    background: #a1381614;
    border: 1px dashed #a1381647;
}

.area-state-btn {
    cursor: pointer;
    font: inherit;
    border: 0;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.76rem;
    font-weight: 800;
}

.area-state-btn.delete {
    color: #8a2d12;
    background: #a138161f;
}

.area-state-btn.restore {
    color: #0f6a42;
    background: #18794e24;
}

:root {
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #d4a017;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
}

.topbar,
.summary-grid,
.logs-card {
    z-index: 1;
    position: relative;
}

.subtitle,
.table-note,
.customer-cell span,
th,
.metric-card span,
.metric-card small {
    color: var(--muted);
}

.action-btn,
.close-btn {
    cursor: pointer;
    box-shadow: var(--shadow);
    border: 0;
    border-radius: 999px;
    padding: 14px 20px;
    font-weight: 800;
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}

.logs-layout {
    gap: 24px;
    max-width: 1560px;
    margin: 0 auto;
    display: grid;
}

.metric-card,
.logs-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.logs-card {
    padding: 24px;
}

.search-toolbar {
    flex-wrap: wrap;
    align-items: end;
    gap: 16px;
    margin-top: 20px;
    display: flex;
}

.search-field span {
    font-size: 0.88rem;
    font-weight: 800;
}

.search-field input {
    width: 100%;
    color: var(--text);
    font: inherit;
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
}

.search-field input:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.clear-search-btn {
    cursor: pointer;
    color: var(--text);
    background: #15231f14;
    border: 0;
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: 800;
    transition:
        transform 0.18s,
        background 0.18s;
}

.clear-search-btn:hover {
    transform: translateY(-1px);
}

.customer-cell strong,
.status-pill {
    font-weight: 800;
}

.status-pill {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.78rem;
    display: inline-flex;
}

.status-pill.requested {
    color: var(--success);
    background: #18794e24;
}

.status-pill.viewed {
    color: #8c6500;
    background: #d4a0172e;
}

.funnel-overlay {
    z-index: 20;
    backdrop-filter: blur(10px);
    background: #0a14126b;
    padding: 24px;
    position: fixed;
    inset: 0;
    overflow: auto;
}

.funnel-overlay.hidden {
    display: none;
}

.funnel-panel {
    border-radius: var(--radius-xl);
    border: 1px solid var(--card-border);
    background: #fffaf3f7;
    max-width: 1420px;
    margin: 0 auto;
    padding: 26px;
    box-shadow: 0 30px 80px #15231f2e;
}

.funnel-head,
.panel-top {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    display: flex;
}

.funnel-subtitle,
.panel-top small,
.funnel-stage p,
.stack-item p,
.lane-card p {
    color: var(--muted);
}

.funnel-subtitle {
    max-width: 760px;
    margin: 10px 0 0;
}

.close-btn {
    color: var(--text);
    background: #15231f14;
    border-radius: 14px;
    padding: 12px 16px;
}

.funnel-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
    display: grid;
}

.funnel-stage,
.insight-card,
.lane-card,
.stack-item {
    background: var(--surface-strong);
    border: 1px solid #132a2412;
    border-radius: 22px;
}

.funnel-stage,
.insight-card {
    padding: 20px;
}

.funnel-stage span,
.lane-card span {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
    font-weight: 800;
    display: block;
}

.stage-metric {
    margin: 12px 0 10px;
    font-family:
        Space Grotesk,
        sans-serif;
    font-size: 2rem;
    font-weight: 800;
}

.funnel-stage.highlight {
    background: linear-gradient(135deg, #18794e24, #fffaf3f5);
}

.wide {
    grid-column: span 3;
}

.drop-list,
.stack-list,
.action-lanes {
    gap: 14px;
    margin-top: 18px;
    display: grid;
}

.drop-row {
    grid-template-columns: 170px 1fr 80px;
    align-items: center;
    gap: 12px;
    display: grid;
}

.bar-track {
    background: #0f766e14;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.bar-track.warning {
    background: #d4a0171f;
}

.bar-fill {
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #1a9c91);
    height: 100%;
}

.fill-a {
    width: 28%;
}

.fill-b {
    background: linear-gradient(90deg, #d4a017, #f0c35a);
    width: 42%;
}

.fill-c {
    background: linear-gradient(90deg, #b24a1f, #de7b4b);
    width: 24%;
}

.stack-item,
.lane-card {
    padding: 16px;
}

.stack-item.good {
    background: #18794e14;
}

@media (width<=1100px) {

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

@media (width<=720px) {

    .topbar,
    .card-head,
    .funnel-head,
    .panel-top,
    .search-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-grid,
    .funnel-grid {
        grid-template-columns: 1fr;
    }

    .drop-row {
        grid-template-columns: 1fr;
    }
}

.customer-profile-link {
    color: #0f766e;
    font-weight: 800;
    text-decoration: none;
}

.customer-profile-link:hover {
    text-decoration: underline;
}

:root {
    --bg: #efe5d7;
    --sidebar: #132a24;
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #60706a;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #d4a017;
    --success: #18794e;
    --danger: #a13816;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

.topbar,
.summary-grid,
.maids-card {
    max-width: 1580px;
    margin: 0 auto;
}

.summary-card,
.maids-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.summary-card {
    border-radius: var(--radius-lg);
    padding: 20px;
}

.summary-card span,
.summary-card small {
    display: block;
}

.summary-card span,
.filter-field span,
th {
    color: var(--muted);
}

.summary-card strong {
    margin: 10px 0 6px;
    font-family:
        Space Grotesk,
        sans-serif;
    font-size: 1.7rem;
    display: block;
}

.summary-card.accent {
    background: linear-gradient(135deg, #d4a0171f, #fffaf3f5);
}

.maids-card {
    border-radius: var(--radius-xl);
    margin-top: 24px;
    padding: 24px;
}

.card-head,
.filters-inline {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    display: flex;
}

.filters-inline {
    align-items: stretch;
}

.filter-field {
    gap: 8px;
    min-width: 180px;
    display: grid;
}

.search-field {
    min-width: 320px;
}

.table-shell {
    background: #ffffffc7;
    border: 1px solid #132a2414;
    border-radius: 22px;
    margin-top: 22px;
    overflow: auto;
}

.name-cell,
.operator-cell {
    gap: 6px;
    display: grid;
}

.name-cell small,
.operator-cell small,
.notes-cell,
.address-cell {
    color: var(--muted);
    line-height: 1.5;
}

.status-pill,
.doc-badge {
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
}

.status-pill.expired {
    color: var(--danger);
    background: #a1381621;
}

.doc-badge.ready {
    color: var(--success);
    background: #18794e24;
}

.doc-badge.pending {
    color: #8c6500;
    background: #d4a0172e;
}

.row-action.view {
    color: var(--accent);
    background: #0f766e1a;
}

.row-action.edit {
    color: var(--text);
    background: #15231f14;
}

@media (width<=1260px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (width<=720px) {
    .main-content {
        padding: 18px;
    }

    .topbar,
    .card-head,
    .filters-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .search-field {
        min-width: 0;
    }
}

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

.maid-edit-form label {
    gap: 8px;
    display: grid;
}

.maid-edit-form label.wide,
.form-submit-row.wide {
    grid-column: 1/-1;
}

.maid-edit-form span {
    color: var(--muted);
    font-weight: 800;
}

.maid-edit-form textarea {
    width: 100%;
    color: var(--text);
    font: inherit;
    resize: vertical;
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 14px;
    outline: none;
    padding: 14px 16px;
}

@media (width<=720px) {

    .modal-head,
    .modal-actions,
    .maid-edit-form {
        flex-direction: column;
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

.salary-cell {
    color: var(--accent);
    background: #0f766e1a;
    border-radius: 999px;
    padding: 8px 11px;
    font-weight: 900;
    display: inline-flex;
}

:root {
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #d4a017;
    --danger: #a13816;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

textarea {
    font: inherit;
}

.topbar,
.summary-grid,
.inbox-card {
    z-index: 1;
    position: relative;
}

.top-actions,
.filter-tabs,
.bulk-actions {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.action-btn,
.filter-tab,
.bulk-btn,
.clear-btn {
    cursor: pointer;
    border: 0;
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}

.action-btn:hover,
.filter-tab:hover,
.bulk-btn:hover,
.clear-btn:hover {
    transform: translateY(-1px);
}

.action-btn.primary,
.bulk-btn.primary {
    background: var(--surface-dark);
    color: #fff;
}

.action-btn.ghost,
.filter-tab,
.clear-btn {
    color: var(--text);
    background: #fffaf2d9;
}

.bulk-btn.warning {
    color: #8c6500;
    background: #d4a0172e;
}

.inbox-layout {
    gap: 24px;
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
}

.metric-card,
.inbox-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.metric-card span,
.metric-card small,
.selection-state span,
th,
.preview-text,
.meta-sub {
    color: var(--muted);
}

.inbox-card {
    padding: 24px;
}

.inbox-head,
.selection-state {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    display: flex;
}

.selection-state {
    justify-content: flex-end;
}

.clear-btn,
.bulk-btn {
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 800;
}

.clear-btn:disabled,
.bulk-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.filter-tabs,
.bulk-actions {
    margin-top: 20px;
}

.filter-tab {
    border-radius: 999px;
    padding: 11px 14px;
    font-weight: 800;
}

.filter-tab.active {
    background: var(--accent);
    color: #fff;
}

.row-clickable {
    cursor: pointer;
}

.row-clickable:hover {
    background: #0f766e0a;
}

tbody tr {
    transition: background 0.18s;
}

tbody tr.selected {
    background: #0f766e14;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.customer-link {
    color: var(--text);
    text-align: left;
    cursor: pointer;
    background: 0 0;
    border: 0;
    padding: 0;
    font-weight: 800;
}

.customer-link:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

.customer-cell strong,
.count-pill,
.box-pill,
.status-pill {
    font-weight: 800;
}

.count-pill,
.box-pill,
.status-pill {
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 0.78rem;
    display: inline-flex;
}

.count-pill {
    color: var(--accent-strong);
    background: #0f766e1a;
}

.box-pill.inbox {
    color: var(--success);
    background: #18794e24;
}

.box-pill.sent {
    color: var(--accent);
    background: #0f766e1c;
}

.box-pill.junk {
    color: var(--danger);
    background: #a1381624;
}

.box-pill.starred {
    color: #8c6500;
    background: #d4a0172e;
}

.status-pill.read {
    color: var(--text);
    background: #15231f14;
}

.preview-text {
    max-width: 420px;
    line-height: 1.6;
}

.compact-card {
    width: min(100%, 720px);
}

.modal-head,
.modal-actions,
.message-user-row,
.modal-content,
.message-meta-grid {
    flex-wrap: wrap;
    gap: 18px;
    display: flex;
}

.modal-head,
.modal-actions {
    justify-content: space-between;
    align-items: flex-start;
}

.modal-subtitle,
#messageMetaLine,
.message-preview-copy,
.rule-item p,
.meta-box span,
.reply-field span,
.toast span {
    color: var(--muted);
}

.modal-subtitle,
#messageMetaLine,
.message-preview-copy,
.rule-item p {
    margin: 10px 0 0;
}

.icon-btn,
.ghost-btn {
    cursor: pointer;
    border: 0;
    font-weight: 800;
}

.icon-btn {
    width: 44px;
    height: 44px;
    color: var(--text);
    background: #132a2414;
    border-radius: 14px;
}

.ghost-btn {
    color: var(--text);
    background: #fffaf2d9;
    border-radius: 14px;
    padding: 12px 16px;
}

.modal-content {
    align-items: stretch;
    margin-top: 22px;
}

.message-profile-card,
.message-preview-card,
.rule-item {
    background: var(--surface-strong);
    border: 1px solid #132a240f;
}

.message-profile-card,
.message-preview-card {
    border-radius: var(--radius-lg);
    flex: 320px;
    padding: 20px;
}

.message-user-row {
    align-items: center;
}

.avatar-mini {
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #1d4d44);
    border-radius: 18px;
    place-items: center;
    width: 62px;
    height: 62px;
    font-size: 1.1rem;
    font-weight: 800;
    display: grid;
}

.message-meta-grid {
    margin-top: 18px;
}

.meta-box {
    background: #fffc;
    border: 1px solid #132a240f;
    border-radius: 16px;
    flex: 180px;
    padding: 14px;
}

.meta-box span,
.reply-field span {
    font-size: 0.88rem;
    font-weight: 700;
    display: block;
}

.meta-box strong {
    margin-top: 8px;
    display: block;
}

.message-preview-copy {
    line-height: 1.7;
}

.reply-field {
    gap: 8px;
    margin-top: 18px;
    display: grid;
}

.reply-field textarea {
    width: 100%;
    color: var(--text);
    resize: vertical;
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 16px;
    outline: none;
    min-height: 130px;
    padding: 14px 16px;
}

.reply-field textarea:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.rules-list {
    gap: 14px;
    margin-top: 22px;
    display: grid;
}

.rule-item {
    border-radius: 18px;
    padding: 18px;
}

.rule-item p {
    line-height: 1.6;
}

.toast strong {
    font-size: 0.95rem;
}

@media (width<=1100px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (width<=720px) {

    .topbar,
    .inbox-head,
    .selection-state,
    .modal-head,
    .modal-actions,
    .modal-content {
        flex-direction: column;
        align-items: stretch;
    }

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

.bulk-btn.restore {
    color: var(--success);
    background: #18794e24;
}

:root {
    --surface: #fffaf3db;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --success: #18794e;
    --warning: #b7791f;
    --danger: #b42318;
    --shadow: 0 20px 50px #15231f14;
}

.page-shell {
    max-width: 1540px;
    margin: 0 auto;
    padding: 32px;
}

.topbar {
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    display: flex;
}

.top-actions,
.table-toolbar,
.chat-form {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.metric-card,
.operators-card,
.modal-card {
    background: var(--surface);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    border-radius: 24px;
}

.metric-card span {
    color: var(--muted);
    font-weight: 800;
}

.metric-card strong {
    margin-top: 8px;
    font-family:
        Space Grotesk,
        sans-serif;
    font-size: 2rem;
    display: block;
}

.operators-card {
    padding: 22px;
}

.table-toolbar {
    justify-content: space-between;
    align-items: end;
    margin-bottom: 18px;
}

.search-field,
.filter-field {
    gap: 8px;
    display: grid;
}

.search-field {
    flex: 320px;
}

.filter-field {
    flex: 0 220px;
}

.search-field span,
.filter-field span {
    color: var(--text);
    font-weight: 900;
}

.search-field input,
.filter-field select,
.chat-form input {
    width: 100%;
    color: var(--text);
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 16px;
    outline: none;
    padding: 13px 15px;
}

.search-field input:focus,
.filter-field select:focus,
.chat-form input:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

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

table {
    border-collapse: separate;
    border-spacing: 0 10px;
    width: 100%;
}

th {
    text-align: left;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

td {
    background: var(--surface-strong);
    border-top: 1px solid #132a240f;
    border-bottom: 1px solid #132a240f;
    padding: 16px 14px;
}

td:first-child {
    border-left: 1px solid #132a240f;
}

td:last-child {
    border-right: 1px solid #132a240f;
    border-radius: 0 18px 18px 0;
}

.operator-name {
    gap: 4px;
    display: grid;
}

.operator-name strong {
    font-size: 1rem;
}

.operator-name span,
.chat-message small,
.operator-profile span {
    color: var(--muted);
}

.status-pill {
    border-radius: 999px;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    font-weight: 900;
    display: inline-flex;
}

.status-pill:before {
    content: "";
    background: currentColor;
    border-radius: 50%;
    width: 8px;
    height: 8px;
}

.status-pill.active {
    color: var(--success);
    background: #18794e1a;
}

.status-pill.paused {
    color: var(--warning);
    background: #b7791f1f;
}

.status-pill.offline {
    color: var(--danger);
    background: #b423181a;
}

.chat-btn {
    cursor: pointer;
    color: var(--accent-strong);
    background: #0f766e1a;
    border: 0;
    border-radius: 999px;
    padding: 10px 13px;
    font-weight: 900;
}

.empty-row {
    text-align: center;
    color: var(--muted);
    font-weight: 800;
}

.modal-card {
    background: #fffaf2;
    width: min(720px, 100%);
    max-height: min(86vh, 760px);
    padding: 28px;
    position: relative;
    overflow: auto;
}

.operator-profile {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 10px;
    margin: 18px 0;
    display: grid;
}

.operator-profile div {
    background: #fff;
    border: 1px solid #132a2414;
    border-radius: 16px;
    padding: 13px;
}

.operator-profile strong,
.operator-profile span {
    display: block;
}

.chat-thread {
    background: #fff;
    border: 1px solid #132a2414;
    border-radius: 18px;
    gap: 10px;
    min-height: 180px;
    padding: 14px;
    display: grid;
}

.chat-message {
    background: #0f766e1a;
    border-radius: 16px;
    max-width: 78%;
    padding: 10px 12px;
}

.chat-message.me {
    color: #fff;
    background: #132a24;
    justify-self: end;
}

.chat-message p {
    margin: 0 0 5px;
    font-weight: 800;
}

.chat-form {
    align-items: center;
    margin-top: 14px;
}

.chat-form input {
    flex: 260px;
}

@media (width<=1000px) {

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

@media (width<=760px) {

    .metrics-grid,
    .operator-profile {
        grid-template-columns: 1fr;
    }

    td,
    th {
        white-space: nowrap;
    }
}

.operator-action-group {
    align-items: center;
    gap: 8px;
    display: flex;
}

.view-btn {
    cursor: pointer;
    color: var(--text);
    background: #132a241a;
    border: 0;
    border-radius: 999px;
    padding: 10px 13px;
    font-weight: 900;
}

.operator-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
    display: grid;
}

.operator-details-grid div {
    background: #fff;
    border: 1px solid #132a2414;
    border-radius: 16px;
    padding: 15px;
}

.operator-details-grid div.wide {
    grid-column: 1/-1;
}

.operator-details-grid span,
.operator-details-grid strong {
    display: block;
}

.operator-details-grid span {
    color: var(--muted);
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 800;
}

@media (width<=620px) {
    .operator-details-grid {
        grid-template-columns: 1fr;
    }

    .operator-details-grid div.wide {
        grid-column: auto;
    }
}

:root {
    --surface: #fffaf3e0;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #b7791f;
    --shadow: 0 20px 50px #15231f14;
}

.top-actions,
.toolbar,
.reply-actions {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.action-btn {
    cursor: pointer;
    box-shadow: var(--shadow);
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    font-weight: 900;
    transition: transform 0.18s;
}

.action-btn.ghost {
    color: var(--text);
    background: #fffaf2eb;
}

.metrics-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    display: grid;
}

.metric-card,
.msgs-card,
.message-panel {
    background: var(--surface);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    border-radius: 24px;
}

.metric-card.accent {
    background: linear-gradient(135deg, #d4a01729, #fffaf3f5);
}

.msgs-card {
    padding: 22px;
}

.toolbar {
    justify-content: space-between;
    align-items: end;
    margin-bottom: 18px;
}

.search-field span,
.filter-field span {
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    color: var(--text);
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 16px;
    outline: none;
    padding: 13px 15px;
}

.messages-layout {
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.2fr);
    gap: 16px;
    display: grid;
}

.messages-list {
    gap: 10px;
    max-height: 690px;
    padding-right: 4px;
    display: grid;
    overflow: auto;
}

.message-item {
    background: var(--surface-strong);
    cursor: pointer;
    text-align: left;
    border: 1px solid #132a2414;
    border-radius: 18px;
    gap: 8px;
    width: 100%;
    padding: 15px;
    display: grid;
}

.message-item.unread {
    background: #fff8e5f5;
    border-color: #d4a01773;
}

.message-item.active {
    outline: 3px solid #0f766e2e;
}

.message-top {
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    display: flex;
}

.message-top strong {
    display: block;
}

.message-top span,
.message-meta,
.message-preview,
.empty-panel span,
.detail-grid span {
    color: var(--muted);
}

.unread-dot {
    background: #d4a017;
    border-radius: 50%;
    flex: none;
    width: 10px;
    height: 10px;
    margin-top: 5px;
}

.message-meta {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 800;
    display: flex;
}

.message-preview {
    margin: 0;
    line-height: 1.5;
}

.message-panel {
    min-height: 520px;
    padding: 24px;
}

.empty-panel {
    text-align: center;
    align-content: center;
    place-items: center;
    gap: 8px;
    min-height: 460px;
    display: grid;
}

.detail-head {
    justify-content: space-between;
    align-items: start;
    gap: 14px;
    margin-bottom: 18px;
    display: flex;
}

.status-pill {
    color: var(--accent-strong);
    background: #0f766e1a;
    border-radius: 999px;
    padding: 8px 11px;
    font-weight: 900;
    display: inline-flex;
}

.status-pill.unread {
    color: var(--warning);
    background: #d4a01729;
}

.detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    display: grid;
}

.detail-grid div,
.message-body,
.reply-box {
    background: #fff;
    border: 1px solid #132a2414;
    border-radius: 18px;
    padding: 14px;
}

.detail-grid span,
.detail-grid strong {
    display: block;
}

.message-body {
    color: var(--text);
    line-height: 1.7;
}

.reply-box {
    gap: 12px;
    margin-top: 16px;
    display: grid;
}

.reply-box label {
    gap: 8px;
    font-weight: 900;
    display: grid;
}

@media (width<=1100px) {
    .messages-layout {
        grid-template-columns: 1fr;
    }

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

@media (width<=760px) {
    .topbar {
        flex-direction: column;
    }

    .metrics-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .toast {
        max-width: none;
        bottom: 14px;
        left: 14px;
        right: 14px;
    }
}

:root {
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #d4a017;
    --danger: #a13816;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

.topbar,
.summary-grid,
.filter-card {
    z-index: 1;
    position: relative;
}

.top-actions,
.filter-pills,
.ratings-grid {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.action-btn,
.pill-btn,
.close-btn {
    cursor: pointer;
    border: 0;
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}

.action-btn:hover,
.pill-btn:hover,
.close-btn:hover {
    transform: translateY(-1px);
}

.reviews-layout {
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
}

.metric-card,
.filter-card,
.review-card,
.rating-box {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.metric-card,
.review-card {
    border-radius: var(--radius-xl);
}

.metric-card span,
.metric-card small,
.meta-block span,
.customer-block p,
.review-note span,
.rating-box small {
    color: var(--muted);
}

.filter-card {
    border-radius: var(--radius-xl);
    padding: 26px;
}

.filter-head,
.review-head {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    display: flex;
}

.pill-btn {
    color: var(--accent-strong);
    background: #0f766e14;
    border-radius: 999px;
    padding: 11px 14px;
    font-weight: 800;
}

.pill-btn.active {
    background: var(--accent);
    color: #fff;
}

.review-feed {
    gap: 18px;
    margin-top: 22px;
    display: grid;
}

.review-card {
    background: #fffaf3e0;
    padding: 22px;
}

.review-card.attention {
    border-color: #a1381638;
}

.customer-block {
    align-items: center;
    gap: 14px;
    display: flex;
}

.avatar {
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #1d4d44);
    border-radius: 18px;
    place-items: center;
    width: 60px;
    height: 60px;
    font-weight: 800;
    display: grid;
}

.meta-block {
    text-align: right;
}

.meta-block strong {
    margin-top: 8px;
    display: block;
}

.ratings-grid {
    margin-top: 18px;
}

.rating-box {
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    flex: 1;
    min-width: 260px;
    padding: 18px;
}

.rating-box span {
    font-weight: 800;
    display: block;
}

.stars {
    color: var(--warning);
    letter-spacing: 0.18em;
    margin: 12px 0 8px;
    font-size: 1.1rem;
}

.stars.low {
    color: var(--danger);
}

.review-note {
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid #132a240f;
    margin-top: 18px;
    padding: 18px;
}

.review-note p {
    margin: 10px 0 0;
    line-height: 1.7;
}

.analytics-overlay {
    z-index: 20;
    backdrop-filter: blur(10px);
    background: #0a14126b;
    padding: 24px;
    position: fixed;
    inset: 0;
    overflow: auto;
}

.analytics-overlay.hidden {
    display: none;
}

.analytics-panel {
    border-radius: var(--radius-xl);
    border: 1px solid var(--card-border);
    background: #fffaf3f7;
    max-width: 1360px;
    margin: 0 auto;
    padding: 26px;
    box-shadow: 0 30px 80px #15231f2e;
}

.analytics-head,
.card-head {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    display: flex;
}

.analytics-subtitle,
.card-head small,
.insight-card p,
.priority-item p,
.lane-card p {
    color: var(--muted);
}

.analytics-subtitle {
    max-width: 760px;
    margin: 10px 0 0;
}

.close-btn {
    color: var(--text);
    background: #15231f14;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 800;
}

.analytics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
    display: grid;
}

.insight-card,
.chart-card,
.lane-card {
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid #132a2412;
}

.insight-card,
.chart-card {
    padding: 20px;
}

.insight-card span,
.lane-card span {
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
    font-weight: 800;
    display: block;
}

.insight-card strong,
.lane-card strong {
    margin: 10px 0 8px;
    display: block;
}

.insight-card.highlight {
    background: linear-gradient(135deg, #0f766e1f, #fffaf3f2);
}

.distribution-list,
.priority-list,
.action-lanes {
    gap: 14px;
    margin-top: 18px;
    display: grid;
}

.distribution-row {
    grid-template-columns: 90px 1fr 52px;
    align-items: center;
    gap: 12px;
    display: grid;
}

.bar-track.danger {
    background: #a1381614;
}

.fill-5 {
    width: 58%;
}

.fill-4 {
    width: 24%;
}

.fill-3 {
    width: 11%;
}

.fill-2 {
    background: linear-gradient(90deg, #a13816, #d96b38);
    width: 7%;
}

.tag-cloud {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    display: flex;
}

.issue-tag {
    color: var(--accent-strong);
    background: #0f766e1a;
    border-radius: 999px;
    padding: 10px 12px;
    font-weight: 700;
}

.issue-tag.high {
    color: var(--danger);
    background: #a1381624;
}

.issue-tag.low {
    color: #8c6500;
    background: #d4a01729;
}

.priority-item,
.lane-card {
    background: #fffaf3e0;
    border: 1px solid #132a240f;
    border-radius: 18px;
    padding: 16px;
}

@media (width<=1100px) {

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

@media (width<=720px) {

    .topbar,
    .filter-head,
    .review-head,
    .analytics-head,
    .card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-grid,
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .meta-block {
        text-align: left;
    }

    .wide {
        grid-column: span 1;
    }

    .distribution-row {
        grid-template-columns: 1fr;
    }
}

.user-profile-link {
    color: inherit;
    text-decoration: none;
}

.user-profile-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

:root {
    --surface: #fffaf3d6;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --danger: #a13816;
    --success: #18794e;
    --warning: #d4a017;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

.page-shell {
    min-height: 100vh;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.ambient-right {
    background: #d4a01729;
    bottom: 140px;
    right: -120px;
}

.topbar,
.schedule-layout {
    z-index: 1;
    position: relative;
}

.eyebrow {
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 800;
}

.top-actions,
.calendar-actions {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.action-btn,
.mini-btn,
.status-toggle {
    cursor: pointer;
    border: 0;
    font-weight: 800;
    transition:
        transform 0.18s,
        background 0.18s;
}

.action-btn:hover,
.mini-btn:hover,
.status-toggle:hover {
    transform: translateY(-1px);
}

.action-btn.ghost,
.mini-btn {
    color: var(--text);
    background: #fffaf3e6;
}

.mini-btn {
    border-radius: 14px;
    padding: 11px 14px;
    box-shadow: 0 10px 25px #15231f0f;
}

.schedule-layout {
    gap: 22px;
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
}

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

.metric-card,
.control-card {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.metric-card span,
.metric-card small,
.toggle-card span,
.calendar-legend,
.day-name {
    color: var(--muted);
}

.control-card {
    padding: 24px;
}

.quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
    display: grid;
}

.toggle-card {
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid #132a2412;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px;
    display: flex;
}

.toggle-card strong {
    margin-top: 6px;
    display: block;
}

.status-toggle {
    border-radius: 999px;
    min-width: 110px;
    padding: 12px 16px;
}

.status-toggle.open {
    color: var(--success);
    background: #18794e24;
}

.status-toggle.closed {
    color: var(--danger);
    background: #a1381621;
}

.weekday-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
    display: grid;
}

.weekday-card {
    background: var(--surface-strong);
    border: 1px solid #132a2412;
    border-radius: 18px;
    gap: 12px;
    padding: 16px;
    display: grid;
}

.weekday-card strong {
    font-size: 1.05rem;
}

.calendar-legend {
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
    font-weight: 700;
    display: flex;
}

.legend-dot {
    border-radius: 999px;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    display: inline-block;
}

.legend-dot.open {
    background: var(--success);
}

.legend-dot.closed {
    background: var(--danger);
}

.legend-dot.custom {
    background: var(--warning);
}

.calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
    display: grid;
}

.day-name {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

.calendar-day {
    cursor: pointer;
    text-align: left;
    background: #fffaf3db;
    border: 1px solid #132a2414;
    border-radius: 18px;
    align-content: space-between;
    gap: 10px;
    min-height: 106px;
    padding: 12px;
    display: grid;
}

.calendar-day.muted {
    opacity: 0.36;
    cursor: default;
}

.calendar-day.open {
    box-shadow: inset 0 0 0 2px #18794e2e;
}

.calendar-day.closed {
    box-shadow: inset 0 0 0 2px #a1381633;
}

.calendar-day.custom {
    border-color: #d4a01773;
}

.calendar-day strong {
    font-size: 1.1rem;
}

.day-status {
    border-radius: 999px;
    width: fit-content;
    padding: 7px 9px;
    font-size: 0.74rem;
    font-weight: 900;
}

.day-status.open {
    color: var(--success);
    background: #18794e24;
}

.day-status.closed {
    color: var(--danger);
    background: #a1381621;
}

@media (width<=1180px) {

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

@media (width<=760px) {

    .topbar,
    .quick-grid,
    .summary-grid,
    .weekday-grid {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

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

    .day-name {
        display: none;
    }
}

.section-note {
    color: var(--muted);
    margin: 8px 0 0;
}

.hours-summary {
    flex-wrap: wrap;
    gap: 10px;
    display: flex;
}

.hours-summary span {
    color: var(--muted);
    background: #fffaf3e6;
    border-radius: 999px;
    padding: 10px 12px;
    font-weight: 800;
}

.hours-summary strong {
    color: var(--text);
}

.hours-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
    display: grid;
}

.hour-slot {
    text-align: left;
    cursor: pointer;
    background: var(--surface-strong);
    border: 1px solid #132a2414;
    border-radius: 18px;
    gap: 8px;
    padding: 15px;
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        border-color 0.18s;
    display: grid;
}

.hour-slot:hover {
    transform: translateY(-1px);
}

.hour-slot strong {
    font-size: 1.1rem;
}

.hour-slot span {
    color: var(--muted);
    font-weight: 800;
}

.hour-slot.open {
    border-color: #18794e3d;
    box-shadow: inset 0 0 0 2px #18794e1f;
}

.hour-slot.closed {
    border-color: #a138163d;
    box-shadow: inset 0 0 0 2px #a138161f;
}

.hour-slot.closed span {
    color: var(--danger);
}

.hour-slot.open span {
    color: var(--success);
}

@media (width<=1180px) {
    .hours-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (width<=760px) {
    .hours-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hours-closure-panel {
    background: #fffaf3eb;
    border: 1px solid #132a2417;
    border-radius: 20px;
    grid-template-columns: minmax(260px, 1fr) minmax(190px, 240px) auto;
    align-items: end;
    gap: 16px;
    margin-top: 18px;
    padding: 18px;
    display: grid;
}

.closure-copy,
.closure-date-field {
    gap: 7px;
    display: grid;
}

.closure-copy span,
.closure-date-field span {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
    font-weight: 900;
}

.closure-copy small {
    color: var(--muted);
    line-height: 1.5;
}

.closure-date-field input {
    width: 100%;
    min-height: 48px;
    color: var(--text);
    font: inherit;
    background: #fff;
    border: 1px solid #132a2424;
    border-radius: 14px;
    outline: none;
    padding: 11px 13px;
}

.closure-date-field input:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.closure-date-field input:disabled,
.hours-closure-panel .action-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.closure-status {
    color: var(--danger);
    background: #a1381614;
    border-radius: 16px;
    margin-top: 12px;
    padding: 13px 15px;
    font-weight: 800;
    line-height: 1.5;
}

.closure-status.hidden {
    display: none;
}

.hour-slot .closure-date {
    color: var(--danger);
    font-size: 0.76rem;
    line-height: 1.4;
}

@media (width<=900px) {
    .hours-closure-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

.hour-slot.pending {
    border-color: #d4a017b3;
    box-shadow: inset 0 0 0 2px #d4a01738;
}

.hour-slot.pending:after {
    content: "Select end date";
    color: #8a650d;
    font-size: 0.75rem;
    font-weight: 900;
}

.closure-status {
    gap: 9px;
    display: grid;
}

.closure-status div {
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    display: flex;
}

.closure-status span {
    color: var(--muted);
}

@media (width<=760px) {
    .closure-status div {
        flex-direction: column;
        align-items: flex-start;
    }
}

:root {
    --surface: #fffaf3d6;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
}

.topbar,
.message-layout {
    z-index: 1;
    position: relative;
}

.subtitle {
    color: var(--muted);
    margin: 12px 0 0;
}

.ghost-link,
.ghost-btn,
.primary-btn {
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    font-weight: 800;
    text-decoration: none;
}

.ghost-link,
.ghost-btn {
    color: var(--text);
    box-shadow: var(--shadow);
    background: #fffaf3e6;
}

.primary-btn {
    background: var(--surface-dark);
    color: #fffaf2;
}

.message-layout {
    gap: 22px;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
}

.customer-card,
.message-card {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.customer-card {
    align-items: center;
    gap: 18px;
    padding: 24px;
    display: flex;
}

.avatar {
    background: var(--surface-dark);
    color: #fffaf2;
    border-radius: 24px;
    place-items: center;
    width: 72px;
    height: 72px;
    font-size: 1.35rem;
    font-weight: 900;
    display: grid;
}

.customer-meta {
    color: var(--muted);
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    display: flex;
}

.dot {
    background: #5f6f6980;
    border-radius: 999px;
    width: 5px;
    height: 5px;
}

.message-card {
    padding: 26px;
}

.card-head {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    display: flex;
}

.channel-pill {
    color: var(--accent);
    background: #0f766e1f;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
}

.message-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
    display: grid;
}

.field.wide,
.delivery-preview,
.form-actions {
    grid-column: 1/-1;
}

.delivery-preview {
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid #132a2412;
    gap: 8px;
    padding: 16px;
    display: grid;
}

.delivery-preview p {
    color: var(--muted);
    margin: 0;
}

.delivery-preview strong {
    color: var(--text);
}

.form-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    display: flex;
}

@media (width<=760px) {

    .topbar,
    .customer-card,
    .card-head,
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

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

.sidebar {
    color: #f7f3eb;
    z-index: 10;
    background: linear-gradient(#132a24 0%, #0f211d 100%);
    border-right: 1px solid #ffffff1f;
    height: 100vh;
    padding: 28px 22px;
    position: sticky;
    top: 0;
    overflow: auto;
}

.brand-label {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin: 0 0 8px;
    font-size: 1.08rem;
    font-weight: 800;
}

.brand-block a {
    color: inherit;
    text-decoration: none;
}

.nav-link {
    background: 0 0;
    padding: 15px 16px;
    font-size: 1.12rem;
    font-weight: 900;
}

.nav-link.active,
.nav-link:hover,
.dropdown-link.active {
    background: #ffffff1a;
}

.caret {
    font-weight: 900;
    line-height: 1;
    transition: transform 0.18s;
}

.dropdown-block.open .caret {
    transform: rotate(45deg);
}

.dropdown-link {
    background: #ffffff0a;
    padding: 13px 14px;
    font-size: 1.06rem;
    font-weight: 800;
}

.main-content {
    min-width: 0;
    overflow-x: auto;
}

@media (width<=980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        height: auto;
        max-height: none;
        position: relative;
    }
}

.sidebar-document {
    background: 0 0;
    min-height: 100vh;
    margin: 0;
    font-family: Manrope, sans-serif;
}

.sidebar-document .sidebar-content {
    color: #f7f3eb;
    background: linear-gradient(#071a3d 0%, #0a234f 52%, #05142f 100%);
    min-height: 100vh;
    padding: 28px 22px;
}

.sidebar-frame {
    border: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    display: block;
}

.dropdown-link.with-badge {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    display: flex;
}

.sidebar-badge {
    color: #061633;
    background: #d4a017;
    border-radius: 999px;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    font-size: 0.85rem;
    font-weight: 900;
    display: inline-grid;
}

.sidebar-badge.hidden {
    display: none;
}

.nav-link.with-badge {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    display: flex;
}

.action-btn,
.save-btn,
.inline-btn,
.mini-link,
.ghost-btn,
.table-action-btn {
    cursor: pointer;
    border: 0;
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}

.action-btn.danger {
    color: #fff7f1;
    background: #8f2d14;
}

.ghost-btn {
    color: var(--text);
    background: #fffaf2d9;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 800;
}

.address-actions {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.address-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
    display: grid;
}

.address-summary-card,
.address-editor-card {
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    border: 1px solid #132a240f;
}

.address-summary-card {
    padding: 18px;
}

.address-summary-card span,
.address-summary-card small {
    color: var(--muted);
}

.address-summary-card strong {
    margin: 10px 0 6px;
    font-size: 1.55rem;
    display: block;
}

.address-workspace {
    gap: 18px;
    margin-top: 18px;
    display: grid;
}

.address-editor-card {
    padding: 22px;
}

.address-form {
    gap: 18px;
    margin-top: 20px;
    display: grid;
}

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

.address-form-actions,
.table-actions {
    flex-wrap: wrap;
    gap: 10px;
    display: flex;
}

.table-action-btn {
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 800;
}

.table-action-btn.view {
    color: var(--accent-strong);
    background: #0f766e1c;
}

.table-action-btn.edit {
    color: var(--success);
    background: #18794e21;
}

.table-action-btn.delete {
    color: var(--danger);
    background: #c2410c24;
}

.modal-subtitle {
    max-width: 760px;
    margin: 12px 0 0;
}

@media (width<=1120px) {
    .hero-card {
        grid-template-columns: 1fr;
    }

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

@media (width<=720px) {
    .page-shell {
        padding: 18px;
    }

    .topbar,
    .section-head,
    .panel-topline,
    .modal-head,
    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-stats,
    .details-grid,
    .address-summary-grid,
    .address-form-grid {
        grid-template-columns: 1fr;
    }

    .field.wide {
        grid-column: span 1;
    }

    .toast {
        min-width: 0;
        max-width: none;
        bottom: 18px;
        left: 18px;
        right: 18px;
    }

    .identity-block,
    .timeline-item {
        grid-template-columns: 1fr;
        display: grid;
    }

    .tabs-header {
        gap: 14px;
    }

    .tab-btn {
        padding-bottom: 8px;
    }
}

:root {
    --navy: #071f3a;
    --navy-soft: #0e3158;
    --gold: #d4a017;
    --teal: #0f766e;
    --surface: #fffaf2;
    --text: #15231f;
    --muted: #66756f;
    --danger: #b42318;
    --success: #18794e;
    --border: #071f3a1f;
    --shadow: 0 24px 70px #071f3a2e;
}

.login-shell {
    grid-template-columns: minmax(340px, 0.95fr) minmax(360px, 1.05fr);
    min-height: 100vh;
    display: grid;
}

.brand-panel {
    align-items: stretch;
    padding: 28px;
    display: flex;
}

.brand-card {
    color: #fff;
    background:
        linear-gradient(180deg, #071f3a2e, #071f3ae0),
        linear-gradient(135deg,
            var(--navy) 0%,
            var(--navy-soft) 58%,
            #0f766e 100%);
    width: 100%;
    min-height: 520px;
    box-shadow: var(--shadow);
    border-radius: 8px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    display: flex;
    position: relative;
    overflow: hidden;
}

.brand-card:before {
    content: "";
    pointer-events: none;
    border: 1px solid #ffffff24;
    border-radius: 8px;
    position: absolute;
    inset: 24px;
}

.brand-card h1,
.login-card h2 {
    letter-spacing: -0.03em;
    margin: 0;
    font-family:
        Space Grotesk,
        sans-serif;
}

.brand-card h1 {
    font-size: clamp(3rem, 8vw, 6rem);
}

.brand-card p {
    color: #ffffffd1;
    max-width: 600px;
    margin: 16px 0 0;
    line-height: 1.7;
}

.eyebrow {
    color: var(--gold);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

.security-pills {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    display: flex;
}

.security-pills span {
    color: #f8fbff;
    background: #ffffff1f;
    border: 1px solid #ffffff29;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 800;
}

.login-panel {
    place-items: center;
    padding: 28px;
    display: grid;
}

.login-card {
    border: 1px solid var(--border);
    backdrop-filter: blur(14px);
    background: #fffaf2eb;
    border-radius: 8px;
    width: min(100%, 520px);
    padding: 34px;
    box-shadow: 0 20px 55px #15231f1a;
}

.form-head {
    margin-bottom: 28px;
}

.form-head h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.form-head p {
    color: var(--muted);
    margin: 10px 0 0;
}

.field-group {
    color: var(--text);
    gap: 9px;
    margin-bottom: 18px;
    font-weight: 800;
    display: grid;
}

.field-group input {
    border: 1px solid var(--border);
    width: 100%;
    min-height: 52px;
    color: var(--text);
    background: #fff;
    border-radius: 8px;
    outline: none;
    padding: 0 16px;
    transition:
        border-color 0.18s,
        box-shadow 0.18s;
}

.field-group input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px #0f766e1f;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 82px;
}

.show-password-btn {
    height: 36px;
    color: var(--navy);
    cursor: pointer;
    background: #edf4f4;
    border: 0;
    border-radius: 8px;
    padding: 0 14px;
    font-weight: 800;
    position: absolute;
    top: 8px;
    right: 8px;
}

.form-row {
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin: 8px 0 18px;
    display: flex;
}

.remember-check {
    color: var(--muted);
    align-items: center;
    gap: 8px;
    font-weight: 800;
    display: inline-flex;
}

.form-row a {
    color: var(--teal);
    font-weight: 800;
    text-decoration: none;
}

.form-message {
    min-height: 22px;
    color: var(--muted);
    margin: 0 0 16px;
    font-weight: 800;
}

.form-message.error {
    color: var(--danger);
}

.form-message.success {
    color: var(--success);
}

.login-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--navy), var(--teal));
    cursor: pointer;
    border: 0;
    border-radius: 8px;
    width: 100%;
    min-height: 54px;
    font-weight: 900;
    box-shadow: 0 18px 36px #071f3a38;
}

.login-btn:disabled {
    cursor: wait;
    opacity: 0.72;
}

@media (width<=860px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        padding-bottom: 0;
    }

    .brand-card {
        min-height: 340px;
    }
}

@media (width<=560px) {

    .brand-panel,
    .login-panel {
        padding: 16px;
    }

    .brand-card,
    .login-card {
        padding: 24px;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

:root {
    --bg: #f5efe4;
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #5f6f69;
    --accent: #0f766e;
    --accent-soft: #0f766e1f;
    --danger: #a13816;
    --warning: #d4a017;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

.page-shell {
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.topbar,
.summary-card,
.list-card {
    z-index: 1;
    position: relative;
}

.topbar {
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    max-width: 1680px;
    margin: 0 auto 24px;
    display: flex;
}

h2 {
    font-size: 1.5rem;
}

.subtitle {
    max-width: 760px;
    color: var(--muted);
    margin: 12px 0 0;
}

.header-badges {
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    display: flex;
}

.add-user-link {
    background: var(--surface-dark);
    color: #fffaf2;
    min-height: 48px;
    box-shadow: var(--shadow);
    border-radius: 999px;
    justify-content: center;
    align-items: center;
    padding: 12px 20px;
    font-weight: 800;
    text-decoration: none;
    transition:
        transform 0.18s,
        box-shadow 0.18s,
        opacity 0.18s;
    display: inline-flex;
}

.add-user-link:hover {
    transform: translateY(-1px);
}

.header-pill {
    box-shadow: var(--shadow);
    background: #fffaf3e6;
    border: 1px solid #132a2414;
    border-radius: 999px;
    padding: 12px 16px;
    font-weight: 700;
}

.header-pill.subtle {
    color: var(--muted);
}

.layout {
    gap: 24px;
    max-width: 1680px;
    margin: 0 auto;
    display: grid;
}

.summary-card,
.list-card {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.summary-card {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 20px;
    display: grid;
}

.metric-card {
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    border: 1px solid #132a2412;
    padding: 20px;
}

.metric-card span,
.metric-card small {
    display: block;
}

.metric-card span,
.selection-state span {
    color: var(--muted);
}

.list-card {
    padding: 24px;
}

.list-head,
.bulk-actions {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    display: flex;
}

.selection-state {
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    display: flex;
}

.clear-btn,
.bulk-btn,
.row-action {
    cursor: pointer;
    border: 0;
    transition:
        transform 0.18s,
        opacity 0.18s,
        background 0.18s;
}

.clear-btn:hover,
.bulk-btn:hover,
.row-action:hover {
    transform: translateY(-1px);
}

.clear-btn {
    color: var(--text);
    background: #15231f14;
}

.bulk-actions {
    margin-top: 20px;
}

.bulk-btn {
    color: var(--text);
    background: #fff;
    border: 1px solid #132a2414;
    box-shadow: 0 10px 25px #15231f0f;
}

.bulk-btn.primary {
    background: var(--surface-dark);
    color: #fff;
}

.bulk-btn.success {
    color: var(--success);
    background: #18794e24;
}

.bulk-btn:disabled,
.clear-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 1760px;
}

.checkbox-col {
    width: 130px;
}

.checkbox-wrap {
    align-items: center;
    gap: 10px;
    font-weight: 700;
    display: inline-flex;
}

.user-name {
    gap: 6px;
    display: grid;
}

.user-profile-link {
    color: var(--text);
    text-align: left;
    cursor: pointer;
    background: 0 0;
    border: 0;
    padding: 0;
    font-weight: 800;
}

.user-name small,
.muted {
    color: var(--muted);
}

.wallet {
    font-weight: 800;
}

.status-pill.inactive,
.status-pill.banned {
    color: var(--danger);
    background: #a1381621;
}

.status-pill.restricted {
    color: var(--warning);
    background: #b7791f1f;
}

.status-pill.open {
    color: var(--accent);
    background: #0f766e1c;
}

.status-pill.restricted {
    color: #8c6500;
    background: #d4a0172e;
}

.actions-cell {
    min-width: 300px;
}

.row-actions {
    flex-wrap: wrap;
    gap: 8px;
    display: flex;
}

.row-action {
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 800;
}

.row-action.ban {
    color: var(--danger);
    background: #a138161f;
}

.row-action.restrict {
    color: #8c6500;
    background: #d4a0172e;
}

.row-action.message {
    color: var(--success);
    background: #18794e1f;
}

@media (width<=1120px) {
    .summary-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (width<=760px) {

    .topbar,
    .list-head,
    .bulk-actions,
    .selection-state,
    .modal-head,
    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

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

.recipient-summary {
    gap: 10px;
    display: grid;
}

.recipient-list {
    gap: 8px;
    max-height: 170px;
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    overflow: auto;
}

.recipient-list li {
    background: #0f766e14;
    border-radius: 14px;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    display: flex;
}

.recipient-list span {
    color: var(--muted);
}

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

.communication-field span {
    color: var(--muted);
    font-weight: 800;
}

.communication-field input,
.communication-field textarea {
    width: 100%;
    color: var(--text);
    font: inherit;
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
}

.communication-field textarea {
    resize: vertical;
}

.communication-field input:focus,
.communication-field textarea:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.clear-btn.primary-action {
    background: var(--surface-dark);
    color: #fffaf2;
}

.status-badge.waiting-list {
    color: #8c6500;
    background: #d4a0172e;
}

:root {
    --bg: #efe5d7;
    --surface: #fffaf3d1;
    --surface-strong: #fffaf2;
    --surface-dark: #132a24;
    --card-border: #132a2414;
    --text: #15231f;
    --muted: #60706a;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #d4a017;
    --danger: #c2410c;
    --success: #18794e;
    --shadow: 0 20px 50px #15231f14;
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, #0f766e2e, transparent 28%),
        radial-gradient(circle at right, #d4a01724, transparent 22%),
        linear-gradient(180deg, #f7f1e8 0%, var(--bg) 100%);
    margin: 0;
    font-family: Manrope, sans-serif;
}

.ambient {
    filter: blur(44px);
    opacity: 0.45;
    pointer-events: none;
    border-radius: 50%;
    width: 380px;
    height: 380px;
    position: absolute;
}

.ambient-left {
    background: #0f766e2e;
    top: -120px;
    left: -90px;
}

.topbar,
.hero-card,
.summary-grid,
.workspace-grid {
    z-index: 1;
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
}

.back-link {
    color: var(--accent-strong);
    margin-bottom: 14px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
}

h1 {
    font-size: clamp(2.1rem, 4vw, 3.5rem);
}

.top-actions,
.toolbar-actions,
.filter-tabs {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
}

.action-btn,
.ghost-btn,
.filter-tab {
    cursor: pointer;
    border: 0;
    transition:
        transform 0.18s,
        background 0.18s,
        box-shadow 0.18s;
}

.action-btn:hover,
.ghost-btn:hover,
.filter-tab:hover {
    transform: translateY(-1px);
}

.action-btn.success {
    color: #fff;
    background: linear-gradient(135deg, #18794e, #0f766e);
}

.action-btn.ghost,
.ghost-btn,
.filter-tab {
    color: var(--text);
    background: #fffaf2e0;
}

.ghost-btn {
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 800;
}

.hero-card,
.metric-card,
.ledger-card,
.insight-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.hero-card {
    border-radius: var(--radius-xl);
    grid-template-columns: minmax(0, 1.5fr) 320px;
    gap: 22px;
    padding: 28px;
    display: grid;
}

.identity-row {
    align-items: center;
    gap: 18px;
    display: flex;
}

.avatar {
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #1d4d44);
    border-radius: 26px;
    place-items: center;
    width: 86px;
    height: 86px;
    font-size: 1.7rem;
    font-weight: 800;
    display: grid;
    box-shadow: 0 16px 30px #0f766e42;
}

.hero-balance {
    color: #fff;
    background: linear-gradient(135deg, #132a24f5, #0f766eeb);
    border-radius: 22px;
    margin-top: 26px;
    padding: 20px 22px;
}

.hero-balance span,
.hero-balance small {
    color: #fffc;
    display: block;
}

.hero-balance strong {
    letter-spacing: -0.04em;
    margin: 10px 0 8px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    display: block;
}

.hero-aside {
    gap: 16px;
    display: grid;
}

.status-card {
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid #132a240f;
    padding: 20px;
}

.status-card span,
.status-card small {
    color: var(--muted);
}

.status-card strong {
    margin: 10px 0 6px;
    font-size: 1.5rem;
    display: block;
}

.status-card.success {
    background: linear-gradient(#18794e1f, #fffaf3f2);
}

.metric-card {
    border-radius: var(--radius-lg);
    padding: 22px;
}

.metric-card.income {
    background: linear-gradient(#18794e1f, #fffaf3eb);
}

.metric-card.expense {
    background: linear-gradient(#c2410c14, #fffaf3eb);
}

.metric-card.highlight {
    background: linear-gradient(#0f766e1f, #fffaf3eb);
}

.workspace-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.8fr);
    gap: 22px;
    margin-top: 24px;
    display: grid;
}

.ledger-card,
.insight-card {
    border-radius: var(--radius-xl);
}

.ledger-card {
    padding: 24px;
}

.section-head {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    display: flex;
}

.section-head.compact {
    align-items: flex-start;
}

.toolbar {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-top: 18px;
    display: flex;
}

.search-field {
    gap: 8px;
    min-width: min(100%, 420px);
    display: grid;
}

.search-field span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.search-field input {
    width: 100%;
    color: var(--text);
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 14px;
    outline: none;
    padding: 14px 16px;
}

table {
    border-collapse: collapse;
    background: #fff;
    width: 100%;
    min-width: 1100px;
}

.type-chip,
.status-chip {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 800;
    display: inline-flex;
}

.type-chip.credit {
    color: var(--success);
    background: #18794e21;
}

.type-chip.debit {
    color: var(--danger);
    background: #c2410c1f;
}

.type-chip.refund {
    color: var(--accent-strong);
    background: #0f766e1c;
}

.status-chip.completed {
    color: var(--success);
    background: #18794e1f;
}

.status-chip.pending {
    color: #8c6500;
    background: #d4a0172e;
}

.amount.positive,
.positive {
    color: var(--success);
    font-weight: 800;
}

.amount.negative {
    color: var(--danger);
    font-weight: 800;
}

.insights-column {
    gap: 18px;
    display: grid;
}

.insight-card {
    padding: 22px;
}

.modal-card {
    background: #fffaf3f5;
    border: 1px solid #132a2414;
    border-radius: 30px;
    width: min(100%, 1120px);
    max-height: min(92vh, 920px);
    padding: 28px;
    overflow: auto;
    box-shadow: 0 30px 70px #15231f2e;
}

.modal-subtitle {
    max-width: 760px;
    color: var(--muted);
    margin: 12px 0 0;
}

.balance-form {
    gap: 22px;
    margin-top: 22px;
    display: grid;
}

.balance-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
    gap: 20px;
    display: grid;
}

.balance-fields,
.balance-preview-card {
    background: var(--surface-strong);
    border: 1px solid #132a240f;
    border-radius: 24px;
    padding: 20px;
}

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

.form-field span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.form-field input,
.form-field select {
    width: 100%;
    color: var(--text);
    background: #fff;
    border: 1px solid #132a241f;
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
}

.form-field input:focus,
.form-field select:focus {
    border-color: #0f766e80;
    box-shadow: 0 0 0 4px #0f766e1f;
}

.form-field input[readonly] {
    color: #4a5a55;
    background: #edf0ea;
}

.preview-stack {
    gap: 12px;
    margin-top: 18px;
    display: grid;
}

.preview-item {
    background: #ffffffd1;
    border: 1px solid #132a240f;
    border-radius: 18px;
    padding: 16px;
}

.preview-item span,
.preview-note p {
    color: var(--muted);
}

.preview-item strong {
    margin-top: 8px;
    font-size: 1.35rem;
    display: block;
}

.preview-item.emphasis {
    background: linear-gradient(135deg, #132a24f5, #0f766eeb);
}

.preview-item.emphasis span,
.preview-item.emphasis strong {
    color: #fff;
}

.preview-note {
    background: #0f766e0f;
    border: 1px solid #0f766e1f;
    border-radius: 18px;
    margin-top: 18px;
    padding: 16px;
}

.preview-note strong {
    margin-bottom: 6px;
    display: block;
}

.preview-note p {
    margin: 0;
    line-height: 1.6;
}

.toast span {
    color: #fffc;
    line-height: 1.5;
}

.breakdown-list,
.snapshot-list,
.note-stack {
    gap: 12px;
    margin-top: 14px;
    display: grid;
}

.breakdown-item,
.snapshot-item,
.note-card {
    background: var(--surface-strong);
    border: 1px solid #132a240f;
    border-radius: 18px;
    padding: 16px;
}

.breakdown-item,
.snapshot-item {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    display: flex;
}

.breakdown-item span,
.snapshot-item span,
.note-card p {
    color: var(--muted);
}

.note-card strong {
    margin-bottom: 6px;
    display: block;
}

.note-card p {
    margin: 0;
    line-height: 1.6;
}

@media (width<=1180px) {

    .hero-card,
    .workspace-grid,
    .balance-layout {
        grid-template-columns: 1fr;
    }

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

@media (width<=760px) {
    .page-shell {
        padding: 18px;
    }

    .topbar,
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .identity-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-grid,
    .balance-grid {
        grid-template-columns: 1fr;
    }

    .form-field.wide {
        grid-column: span 1;
    }

    .toast {
        min-width: 0;
        max-width: none;
        bottom: 18px;
        left: 18px;
        right: 18px;
    }
}

.error-page {
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    display: grid;
}

.error-card {
    border: 1px solid var(--card-border, #132a2417);
    background: var(--surface, #fffaf3);
    width: min(680px, 100%);
    box-shadow: var(--shadow);
    text-align: center;
    border-radius: 30px;
    padding: clamp(30px, 6vw, 64px);
}

.error-code {
    color: #0f766e29;
    font-family:
        Space Grotesk,
        sans-serif;
    font-size: clamp(5rem, 18vw, 10rem);
    font-weight: 700;
    line-height: 0.8;
    display: block;
}

.error-card h1 {
    margin: 15px auto;
    font-family:
        Space Grotesk,
        sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.error-card>p:not(.eyebrow) {
    max-width: 540px;
    color: var(--muted);
    margin: 0 auto 28px;
}

.error-action {
    text-decoration: none;
    display: inline-flex;
}

.menu-toggle {
    display: none;
}

.user-avatar {
    float: left;
    object-fit: cover;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    margin-right: 12px;
}

/* Application sidebar */
.app-shell {
    grid-template-columns: 272px minmax(0, 1fr);
}

.page-column {
    min-width: 0;
}

.app-shell>.sidebar {
    z-index: 50;
    box-sizing: border-box;
    width: 272px;
    height: 100dvh;
    padding: 20px 16px 16px;
    background:
        radial-gradient(circle at 10% 0%, #1b4f6b 0%, transparent 34%),
        linear-gradient(165deg, #071a3d 0%, #081d43 48%, #06152f 100%);
    border-right: 1px solid #ffffff14;
    box-shadow: 14px 0 40px #06152f12;
    scrollbar-width: thin;
    scrollbar-color: #ffffff2b transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden auto;
}

.sidebar-brand {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    display: flex;
}

.sidebar-logo {
    color: #fff;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
    display: flex;
}

.sidebar-logo-mark {
    color: #071a3d;
    background: linear-gradient(145deg, #f2c45b, #d4a017);
    border-radius: 13px;
    place-items: center;
    width: 42px;
    height: 42px;
    box-shadow: 0 8px 24px #0003;
    font-family: Space Grotesk, sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    display: grid;
}

.sidebar-logo>span:last-child,
.sidebar-context>span:last-child,
.sidebar-account-copy {
    min-width: 0;
    display: grid;
}

.sidebar-logo strong {
    letter-spacing: 0.09em;
    font-family: Space Grotesk, sans-serif;
    font-size: 1.03rem;
}

.sidebar-logo small,
.sidebar-context small,
.sidebar-account small {
    color: #dbe6f0a3;
    font-size: 0.72rem;
}

.sidebar-close {
    color: #fff;
    background: #ffffff12;
    border: 1px solid #ffffff1c;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
    line-height: 1;
    display: none;
}

.sidebar-context {
    background: #ffffff0b;
    border: 1px solid #ffffff12;
    border-radius: 14px;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 11px 12px;
    display: flex;
}

.sidebar-context-dot {
    background: #55d6a0;
    border: 3px solid #55d6a029;
    border-radius: 50%;
    width: 8px;
    height: 8px;
    box-shadow: 0 0 0 4px #55d6a012;
}

.sidebar-context strong {
    color: #f7f9fc;
    font-size: 0.82rem;
}

.app-shell .sidebar-nav {
    gap: 21px;
    margin: 25px 0;
    display: grid;
}

.sidebar-nav-group {
    gap: 5px;
    display: grid;
}

.sidebar-nav-group h2 {
    color: #aebfd099;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin: 0 12px 5px;
    font-family: Manrope, sans-serif;
    font-size: 0.67rem;
    font-weight: 800;
}

.sidebar-dropdown {
    gap: 5px;
    display: grid;
}

.sidebar-dropdown-toggle {
    color: #aebfd0;
    cursor: pointer;
    list-style: none;
    align-items: center;
    justify-content: space-between;
    border: 1px solid transparent;
    border-radius: 10px;
    margin: 0 2px;
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-family: Manrope, sans-serif;
    font-size: 0.67rem;
    font-weight: 800;
    display: flex;
}

.sidebar-dropdown-toggle::-webkit-details-marker {
    display: none;
}

.sidebar-dropdown-toggle:hover,
.sidebar-dropdown-toggle:focus-visible {
    color: #fff;
    background: #ffffff0d;
    border-color: #ffffff12;
    outline: none;
}

.sidebar-dropdown-parent-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.sidebar-dropdown-caret {
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    line-height: 1;
    display: inline-flex;
}

.sidebar-dropdown-caret::before {
    content: '+';
    transition: transform .2s ease;
}

.sidebar-item-dropdown[open] .sidebar-dropdown-caret {
    font-size: 1.25rem;
}

.sidebar-item-dropdown[open] .sidebar-dropdown-caret::before {
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.sidebar-dropdown-menu {
    gap: 5px;
    display: grid;
}

.sidebar-item-dropdown {
    display: grid;
}

.sidebar-dropdown-parent {
    cursor: pointer;
    list-style: none;
}

.sidebar-dropdown-parent::-webkit-details-marker {
    display: none;
}

.sidebar-item-dropdown-menu {
    gap: 3px;
    margin: 2px 0 2px 18px;
    padding-left: 12px;
    border-left: 1px solid #ffffff1f;
    display: grid;
}

.sidebar-child-link {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.82rem;
}

.sidebar-link {
    color: #dce5ef;
    border: 1px solid transparent;
    border-radius: 12px;
    align-items: center;
    gap: 12px;
    min-height: 43px;
    padding: 9px 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: 160ms ease;
    display: flex;
}

.sidebar-link svg,
.sidebar-account button svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
    color: #fff;
    background: #ffffff0d;
    border-color: #ffffff12;
    transform: translateX(2px);
    outline: none;
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(90deg, #ffffff1c, #ffffff0c);
    border-color: #ffffff1c;
    box-shadow: inset 3px 0 #d4a017;
}

.sidebar-active-dot {
    background: #e5b943;
    border-radius: 50%;
    width: 6px;
    height: 6px;
    margin-left: auto;
    box-shadow: 0 0 10px #e5b943aa;
}

.sidebar-account {
    background: #020c1e52;
    border: 1px solid #ffffff12;
    border-radius: 15px;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 10px;
    display: flex;
}

.sidebar-avatar {
    color: #fff;
    background: linear-gradient(145deg, #1e847d, #11645f);
    border: 1px solid #ffffff26;
    border-radius: 11px;
    place-items: center;
    width: 38px;
    height: 38px;
    font-size: 0.75rem;
    font-weight: 900;
    display: grid;
    flex: 0 0 auto;
}

.sidebar-account-copy {
    flex: 1;
    overflow: hidden;
}

.sidebar-account-copy strong,
.sidebar-account-copy small {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-account-copy strong {
    color: #fff;
    font-size: 0.78rem;
}

.sidebar-account button {
    color: #dbe6f0c7;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: 8px;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
}

.sidebar-account button:hover,
.sidebar-account button:focus-visible {
    color: #fff;
    background: #ffffff13;
    outline: none;
}

.sidebar-symbols {
    width: 0;
    height: 0;
    position: absolute;
}

.sidebar-backdrop {
    display: none;
}

.menu-toggle {
    cursor: pointer;
    background: #fffaf3e6;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    place-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    box-shadow: 0 8px 20px #15231f12;
}

.menu-toggle span {
    background: #071a3d;
    border-radius: 3px;
    width: 19px;
    height: 2px;
    display: block;
}

@media (width <=980px) {
    .app-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-shell>.sidebar {
        width: min(300px, calc(100vw - 48px));
        height: 100dvh;
        position: fixed;
        inset: 0 auto 0 0;
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    .app-shell>.sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close,
    .menu-toggle {
        display: grid;
    }

    .sidebar-backdrop {
        z-index: 40;
        cursor: default;
        opacity: 0;
        background: #03102bb8;
        backdrop-filter: blur(3px);
        border: 0;
        padding: 0;
        position: fixed;
        inset: 0;
        transition: opacity 220ms ease;
        display: block;
        pointer-events: none;
    }

    body.sidebar-open {
        overflow: hidden;
    }

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

@media (prefers-reduced-motion: reduce) {

    .app-shell>.sidebar,
    .sidebar-backdrop,
    .sidebar-link {
        transition: none;
    }
}

.avatar-form input {
    clip: rect(0, 0, 0, 0);
    width: 1px;
    height: 1px;
    position: absolute;
    overflow: hidden;
}

/* Application header and footer */
.app-header {
    z-index: 30;
    background: #fffaf3e8;
    backdrop-filter: blur(18px);
    border-bottom: 1px solid #132a2412;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    min-height: 104px;
    padding: 20px clamp(20px, 3vw, 42px);
    position: sticky;
    top: 0;
    display: flex;
}

.app-header-main,
.app-header-actions {
    align-items: center;
    gap: 16px;
    min-width: 0;
    display: flex;
}

.app-header-copy {
    min-width: 0;
}

.app-header-copy h1 {
    color: #10231e;
    letter-spacing: -0.035em;
    margin: 2px 0 0;
    font-family: Space Grotesk, sans-serif;
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.15;
}

.app-header-copy>p:last-child:not(.app-header-eyebrow) {
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(56vw, 720px);
    margin: 7px 0 0;
    font-size: 0.84rem;
    overflow: hidden;
}

.app-header-eyebrow {
    color: #0f766e;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 0.67rem;
    font-weight: 900;
    display: flex;
}

.app-header-eyebrow span {
    background: #d4a017;
    border-radius: 4px;
    width: 18px;
    height: 3px;
}

.workspace-status {
    background: #fff;
    border: 1px solid #132a2412;
    border-radius: 13px;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 7px 13px;
    box-shadow: 0 8px 24px #15231f0a;
    display: flex;
}

.workspace-status>span:last-child {
    line-height: 1.25;
    display: grid;
}

.workspace-status small,
.account-summary-copy small,
.account-menu-heading small {
    color: var(--muted);
    font-size: 0.68rem;
}

.workspace-status strong {
    color: #1d302a;
    font-size: 0.78rem;
}

.workspace-status-dot {
    background: #24a36b;
    border: 3px solid #d9f2e6;
    border-radius: 50%;
    width: 9px;
    height: 9px;
    box-shadow: 0 0 0 3px #24a36b12;
}

.account-menu {
    position: relative;
}

.account-menu summary {
    cursor: pointer;
    background: #fff;
    border: 1px solid #132a2412;
    border-radius: 14px;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    padding: 7px 10px 7px 7px;
    box-shadow: 0 8px 24px #15231f0a;
    list-style: none;
    transition: 160ms ease;
    display: flex;
}

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

.account-menu summary:hover,
.account-menu summary:focus-visible,
.account-menu[open] summary {
    border-color: #0f766e40;
    box-shadow: 0 0 0 3px #0f766e0c;
    outline: none;
}

.header-avatar {
    color: #fff;
    object-fit: cover;
    background: linear-gradient(145deg, #1e847d, #0e5e59);
    border-radius: 10px;
    place-items: center;
    width: 36px;
    height: 36px;
    font-size: 0.7rem;
    font-weight: 900;
    display: grid;
    flex: 0 0 auto;
    overflow: hidden;
}

.header-avatar.large {
    border-radius: 13px;
    width: 46px;
    height: 46px;
    font-size: 0.8rem;
}

.header-avatar img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.account-summary-copy {
    min-width: 0;
    line-height: 1.3;
    display: grid;
    flex: 1;
}

.account-summary-copy strong,
.account-summary-copy small {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.account-summary-copy strong {
    color: var(--text);
    font-size: 0.78rem;
}

.account-menu summary>svg {
    fill: none;
    stroke: #596b65;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 17px;
    height: 17px;
    transition: transform 160ms ease;
}

.account-menu[open] summary>svg {
    transform: rotate(180deg);
}

.account-menu-panel {
    z-index: 80;
    background: #fffdf9;
    border: 1px solid #132a2417;
    border-radius: 17px;
    width: 270px;
    padding: 10px;
    box-shadow: 0 22px 55px #10231e24;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
}

.account-menu-heading {
    border-bottom: 1px solid #132a240f;
    align-items: center;
    gap: 11px;
    margin-bottom: 7px;
    padding: 7px 7px 13px;
    display: flex;
}

.account-menu-heading>span:last-child {
    min-width: 0;
    display: grid;
}

.account-menu-heading strong {
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.84rem;
    overflow: hidden;
}

.avatar-form label,
.header-logout button {
    color: #42534d;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: 10px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 41px;
    padding: 9px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    transition: 150ms ease;
    display: flex;
}

.avatar-form label:hover,
.header-logout button:hover,
.avatar-form label:focus-within,
.header-logout button:focus-visible {
    color: #0f766e;
    background: #0f766e0c;
    outline: none;
}

.header-logout button:hover,
.header-logout button:focus-visible {
    color: #a13816;
    background: #a138160b;
}

.avatar-form svg,
.header-logout svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 18px;
    height: 18px;
}

.app-footer {
    color: #65756f;
    background: #fffaf380;
    border-top: 1px solid #132a2410;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 78px;
    margin-top: auto;
    padding: 16px clamp(20px, 3vw, 42px);
    font-size: 0.73rem;
    display: flex;
}

.page-column {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-column>.main-content {
    flex: 1;
}

.app-footer-brand,
.app-footer-meta {
    align-items: center;
    gap: 10px;
    display: flex;
}

.app-footer-mark {
    color: #071a3d;
    background: #d4a017;
    border-radius: 8px;
    place-items: center;
    width: 30px;
    height: 30px;
    font-family: Space Grotesk, sans-serif;
    font-weight: 900;
    display: grid;
}

.app-footer-brand>span:last-child {
    line-height: 1.25;
    display: grid;
}

.app-footer-brand strong {
    color: #23352f;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
}

.app-footer-brand small {
    color: #778680;
    font-size: 0.65rem;
}

.app-footer-meta {
    gap: 18px;
}

.system-status {
    align-items: center;
    gap: 7px;
    display: flex;
}

.system-status i {
    background: #24a36b;
    border-radius: 50%;
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 3px #24a36b16;
}

@media (width <=760px) {
    .app-header {
        align-items: flex-start;
        min-height: 88px;
        padding: 15px 18px;
    }

    .app-header-main {
        align-items: flex-start;
    }

    .app-header-copy h1 {
        margin-top: 4px;
        font-size: 1.3rem;
    }

    .app-header-copy>p:last-child:not(.app-header-eyebrow),
    .workspace-status,
    .account-summary-copy {
        display: none;
    }

    .app-header-actions {
        margin-left: auto;
    }

    .account-menu summary {
        min-width: 0;
        padding: 6px;
    }

    .account-menu summary>svg {
        display: none;
    }

    .account-menu-panel {
        width: min(270px, calc(100vw - 36px));
    }

    .app-footer {
        align-items: flex-start;
        padding: 18px;
    }

    .app-footer-meta {
        text-align: right;
        align-items: flex-end;
        gap: 5px;
        display: grid;
    }
}

/* Reusable workspace page system
   Compose new pages with: workspace-page, page-actions, page-stack,
   view-tabs, stats-grid/stat-card, surface-card and data-table-shell. */
.workspace-page {
    box-sizing: border-box;
    width: 100%;
    max-width: 1680px;
    margin-inline: auto;
    padding: clamp(18px, 2.5vw, 36px);
}

.workspace-page .page-stack {
    gap: 20px;
    display: grid;
}

.workspace-page .page-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    display: flex;
}

.ui-button {
    color: #344740;
    cursor: pointer;
    background: #fffdf9;
    border: 1px solid #132a2412;
    border-radius: 11px;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    padding: 10px 15px;
    box-shadow: 0 8px 20px #15231f08;
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        background 150ms ease;
    display: inline-flex;
}

.ui-button:hover,
.ui-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 11px 24px #15231f14;
    outline: none;
}

.ui-button.primary {
    color: #fff;
    background: #071a3d;
    border-color: #071a3d;
}

.ui-button.accent {
    color: #fff;
    background: #0f766e;
    border-color: #0f766e;
}

.ui-button.ghost {
    color: #344740;
    background: #fffdf9;
}

.view-tabs {
    background: #ffffffa8;
    border: 1px solid #132a2412;
    border-radius: 15px;
    align-items: center;
    gap: 5px;
    width: max-content;
    max-width: 100%;
    margin-bottom: 18px;
    padding: 5px;
    box-shadow: 0 8px 24px #15231f08;
    display: flex;
    overflow-x: auto;
}

.view-tabs a {
    color: #63736d;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 10px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 13px;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    transition: 150ms ease;
    display: flex;
}

.view-tabs a:hover,
.view-tabs a:focus-visible {
    color: #0f766e;
    background: #0f766e0a;
    outline: none;
}

.view-tabs a.active {
    color: #fff;
    background: #0b625c;
    border-color: #0b625c;
    box-shadow: 0 7px 16px #0b625c24;
}

.workspace-page .stats-grid {
    background: transparent;
    border: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 0;
    box-shadow: none;
    display: grid;
}

.workspace-page .stat-card {
    background: #fffdf9d9;
    border: 1px solid #132a2412;
    border-radius: 18px;
    min-width: 0;
    padding: 18px;
    box-shadow: 0 12px 30px #15231f0a;
}

.workspace-page .stat-card>span {
    color: #52645e;
    font-size: 0.76rem;
    font-weight: 800;
}

.workspace-page .stat-card>strong {
    color: #142721;
    margin: 9px 0 5px;
    font-family: Space Grotesk, sans-serif;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    display: block;
}

.workspace-page .stat-card>small {
    color: #7a8984;
    line-height: 1.45;
    display: block;
}

.workspace-page .surface-card {
    background: #fffdf9db;
    backdrop-filter: blur(18px);
    border: 1px solid #132a2412;
    border-radius: 21px;
    padding: clamp(16px, 2vw, 24px);
    box-shadow: 0 18px 45px #15231f0c;
}

.workspace-page .data-table-shell {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    border-radius: 15px;
    margin-top: 18px;
    scrollbar-color: #a9b6b1 #eef1ee;
    scrollbar-width: thin;
    overflow: auto hidden;
}

.workspace-page .data-table-shell table {
    width: 100%;
    border-collapse: collapse;
}

.workspace-page .data-table-shell th {
    color: #61716b;
    background: #f5f3ed;
    padding-block: 13px;
    font-size: 0.66rem;
}

.workspace-page .data-table-shell td {
    padding-block: 14px;
    font-size: 0.76rem;
}

/* Full catalog workspace */
.full-catalog-page {
    display: grid;
    gap: 18px;
}

.full-catalog-page .page-actions {
    margin-bottom: 0;
}

.full-catalog-page .overview-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.full-catalog-page .metric-card {
    min-width: 0;
    padding: 18px;
    background: #fffdf9d9;
    border: 1px solid #132a2412;
    border-radius: 18px;
    box-shadow: 0 12px 30px #15231f0a;
}

.full-catalog-page .metric-card span,
.full-catalog-page .metric-card small {
    color: #61716b;
    display: block;
}

.full-catalog-page .metric-card span {
    font-size: .76rem;
    font-weight: 800;
}

.full-catalog-page .metric-card strong {
    display: block;
    margin: 8px 0 4px;
    color: #142721;
    font: 700 clamp(1.35rem, 2.5vw, 1.9rem) / 1.1 Space Grotesk, sans-serif;
}

.full-catalog-page .metric-card small {
    font-size: .72rem;
    line-height: 1.45;
}

.catalog-section-tabs {
    display: flex;
    gap: 5px;
    width: max-content;
    max-width: 100%;
    padding: 5px;
    overflow-x: auto;
    background: #ffffffa8;
    border: 1px solid #132a2412;
    border-radius: 15px;
    box-shadow: 0 8px 24px #15231f08;
}

.catalog-section-tabs a {
    min-height: 38px;
    padding: 8px 15px;
    color: #63736d;
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.catalog-section-tabs a:hover,
.catalog-section-tabs a:focus-visible {
    color: #0f766e;
    background: #0f766e0a;
    outline: none;
}

.catalog-section-tabs a.active {
    color: #fff;
    background: #0b625c;
    box-shadow: 0 7px 16px #0b625c24;
}

.full-catalog-section {
    padding: clamp(16px, 2vw, 24px);
    background: #fffdf9db;
    border: 1px solid #132a2412;
    border-radius: 21px;
    box-shadow: 0 18px 45px #15231f0c;
    scroll-margin-top: 20px;
}

.full-catalog-section .catalog-head {
    align-items: flex-start;
    margin-bottom: 0;
}

.full-catalog-section .catalog-head h2 {
    margin: 3px 0 0;
    color: #142721;
    font: 700 clamp(1.1rem, 2vw, 1.45rem) / 1.2 Space Grotesk, sans-serif;
}

.full-catalog-section .catalog-head .eyebrow {
    margin: 0;
}

.full-catalog-section .section-note {
    margin: 7px 0 0;
    color: #71817b;
    font-size: .76rem;
}

.catalog-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-top: 18px;
}

.catalog-summary-card {
    min-height: 148px;
    padding: 16px;
    background: #ffffffb8;
    border: 1px solid #132a2412;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}

.catalog-summary-card h3 {
    margin: 11px 0 5px;
    color: #20332d;
    font-size: .95rem;
}

.catalog-summary-card p {
    margin: 0;
    color: #71817b;
    font-size: .74rem;
    line-height: 1.5;
}

.catalog-summary-card footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: #71817b;
    font-size: .72rem;
    font-weight: 700;
}

.catalog-summary-card footer a {
    color: #0f766e;
    font-weight: 800;
    text-decoration: none;
}

.full-catalog-section .data-table-shell {
    margin-top: 18px;
}

.full-catalog-section .data-table-shell td strong,
.full-catalog-section .data-table-shell td small {
    display: block;
}

.full-catalog-section .data-table-shell td small {
    margin-top: 3px;
    color: #82908b;
    font-size: .68rem;
}

.full-catalog-section .data-table-shell td:last-child,
.full-catalog-section .data-table-shell th:last-child {
    text-align: end;
}

@media (width <=1100px) {

    .full-catalog-page .overview-metrics,
    .catalog-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (width <=680px) {

    .full-catalog-page .overview-metrics,
    .catalog-card-grid {
        grid-template-columns: 1fr;
    }

    .catalog-section-tabs {
        width: 100%;
    }

    .catalog-section-tabs a {
        flex: 1 0 auto;
        justify-content: center;
    }

    .full-catalog-section .catalog-head {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .full-catalog-section .catalog-head .ui-button {
        width: 100%;
    }
}

/* Governorates full-control hierarchy */
.full-control-page {
    display: grid;
    gap: 18px;
}

.full-control-page .overview-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.full-control-page .metric-card {
    min-width: 0;
    padding: 18px;
    background: #fffdf9d9;
    border: 1px solid #132a2412;
    border-radius: 18px;
    box-shadow: 0 12px 30px #15231f0a;
}

.full-control-page .metric-card span,
.full-control-page .metric-card small {
    display: block;
    color: #61716b;
}

.full-control-page .metric-card span {
    font-size: .76rem;
    font-weight: 800;
}

.full-control-page .metric-card strong {
    display: block;
    margin: 8px 0 4px;
    color: #142721;
    font: 700 clamp(1.35rem, 2.5vw, 1.9rem) / 1.1 Space Grotesk, sans-serif;
}

.full-control-page .metric-card small {
    font-size: .72rem;
    line-height: 1.45;
}

.full-control-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #082c2a, #0d5148);
    border-radius: 22px;
    color: #fff;
    box-shadow: 0 22px 50px #103c3538;
}

.full-control-hero .hero-content {
    padding: clamp(22px, 4vw, 38px);
}

.full-control-hero .hero-content .eyebrow {
    color: #b3ddd2;
    margin: 0;
}

.full-control-hero .hero-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-top: 8px;
}

.full-control-hero h2 {
    margin: 0;
    color: #fff;
    font: 700 clamp(1.8rem, 4vw, 3rem) / 1.05 Space Grotesk, sans-serif;
}

.full-control-hero .hero-meta {
    margin: 10px 0 0;
    color: #c1ded7;
    font-size: .78rem;
}

.full-control-hero .dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    margin: 0 8px;
    vertical-align: middle;
    background: #79c6b7;
    border-radius: 50%;
}

.full-control-hero .hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.full-control-hero .pill {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    white-space: nowrap;
}

.full-control-hero .pill.success {
    color: #063c2c;
    background: #9af0c9;
}

.full-control-hero .pill.subtle {
    color: #d6eee8;
    background: #ffffff1a;
}

.full-control-hero .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.full-control-hero .inline-btn {
    padding: 10px 14px;
    color: #073b35;
    background: #a5efda;
    border-radius: 10px;
    font-size: .73rem;
    font-weight: 800;
    text-decoration: none;
}

.full-control-hero .inline-btn.secondary {
    color: #d7f1ea;
    background: #ffffff12;
    border: 1px solid #ffffff2b;
}

.full-control-hero .hero-aside {
    padding: 22px;
    background: #ffffff0d;
    border-inline-start: 1px solid #ffffff18;
    display: grid;
    align-content: center;
    gap: 14px;
}

.full-control-hero .mini-stat {
    padding-bottom: 12px;
    border-bottom: 1px solid #ffffff1d;
}

.full-control-hero .mini-stat:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.full-control-hero .mini-stat span {
    display: block;
    color: #a6d1c7;
    font-size: .7rem;
}

.full-control-hero .mini-stat strong {
    display: block;
    margin-top: 3px;
    color: #fff;
    font: 700 1.5rem Space Grotesk, sans-serif;
}

.full-control-page .workspace-grid,
.full-control-page .bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.full-control-page .bottom-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
}

.full-control-page .panel-card,
.full-control-page .packages-card,
.full-control-page .structure-card {
    min-width: 0;
    padding: 20px;
    background: #fffdf9db;
    border: 1px solid #132a2412;
    border-radius: 19px;
    box-shadow: 0 16px 38px #15231f0b;
}

.full-control-page .panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.full-control-page .panel-head .eyebrow {
    margin: 0;
}

.full-control-page .panel-head h3 {
    margin: 3px 0 0;
    color: #1b3029;
    font: 700 1.05rem Space Grotesk, sans-serif;
}

.full-control-page .small-btn {
    padding: 8px 11px;
    color: #0b625c;
    background: #0f766e0d;
    border: 1px solid #0f766e22;
    border-radius: 9px;
    font-size: .7rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.full-control-page .stack-list {
    display: grid;
    gap: 8px;
    max-height: 300px;
    overflow: auto;
}

.full-control-page .stack-item {
    width: 100%;
    padding: 12px 13px;
    color: inherit;
    background: #ffffff9c;
    border: 1px solid #132a2410;
    border-radius: 12px;
    text-align: start;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.full-control-page .stack-item:hover,
.full-control-page .stack-item.active {
    background: #e8f6f1;
    border-color: #0f766e45;
}

.full-control-page .stack-item h4 {
    margin: 0 0 4px;
    color: #253a33;
    font-size: .8rem;
}

.full-control-page .stack-item p {
    margin: 0;
    color: #788983;
    font-size: .7rem;
    line-height: 1.4;
}

.supporter-access-scope .scope-choice-grid,
.supporter-permission-group {
    display: grid;
    gap: 9px;
}

.supporter-access-scope .scope-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
}

.supporter-access-scope label,
.supporter-permission-row label {
    color: #52645e;
    font-size: .74rem;
    font-weight: 700;
}

.supporter-permission-matrix {
    display: grid;
    gap: 12px;
}

.supporter-permission-group {
    padding: 12px;
    border: 1px solid #132a2412;
    border-radius: 12px;
}

.supporter-permission-group legend {
    padding-inline: 5px;
    color: #21352e;
    font-size: .75rem;
    font-weight: 800;
}

.supporter-permission-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding-block: 7px;
    border-bottom: 1px solid #132a240d;
}

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

@media (width <=680px) {
    .supporter-access-scope .scope-choice-grid { grid-template-columns: 1fr; }
}

.full-control-page .packages-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.full-control-page .package-card {
    padding: 14px;
    background: #ffffffa8;
    border: 1px solid #132a2410;
    border-radius: 13px;
}

.full-control-page .package-card h4 {
    margin: 0 0 6px;
    color: #243831;
    font-size: .82rem;
}

.full-control-page .package-card p {
    min-height: 34px;
    margin: 0;
    color: #788983;
    font-size: .7rem;
    line-height: 1.45;
}

.full-control-page .package-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.full-control-page .tag {
    padding: 5px 8px;
    color: #0b625c;
    background: #e5f4ef;
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 800;
}

.full-control-page .tag.warn {
    color: #945121;
    background: #fff0dd;
}

.full-control-page .structure-tree {
    display: grid;
    gap: 10px;
    max-height: 340px;
    overflow: auto;
}

.full-control-page .tree-group {
    display: grid;
    gap: 6px;
    padding-inline-start: 12px;
    border-inline-start: 2px solid #b7ded2;
}

.full-control-page .tree-item {
    padding: 10px 12px;
    background: #ffffffa8;
    border: 1px solid #132a2410;
    border-radius: 10px;
}

.full-control-page .tree-item h4 {
    margin: 0 0 3px;
    color: #273c34;
    font-size: .75rem;
}

.full-control-page .tree-item p {
    margin: 0;
    color: #7c8c85;
    font-size: .68rem;
}

@media (width <=1100px) {

    .full-control-page .overview-metrics,
    .full-control-page .workspace-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .full-control-page .bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (width <=680px) {

    .full-control-page .overview-metrics,
    .full-control-page .workspace-grid,
    .full-control-page .packages-grid {
        grid-template-columns: 1fr;
    }

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

    .full-control-hero .hero-aside {
        border-top: 1px solid #ffffff18;
        border-inline-start: 0;
        grid-template-columns: repeat(3, 1fr);
    }

    .full-control-hero .hero-row {
        flex-direction: column;
    }
}

@media (width <=1200px) {
    .workspace-page .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-page .page-actions {
        justify-content: flex-start;
    }
}

@media (width <=760px) {
    .workspace-page {
        padding: 16px;
    }

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

    .workspace-page .page-actions .ui-button {
        flex: 1 1 auto;
    }

    .view-tabs {
        width: 100%;
    }

    .view-tabs a {
        flex: 1 0 auto;
    }
}

/* Legacy page aliases. Kept temporarily for JavaScript-generated markup. */
@layer legacy-page-aliases {
    .users-page {
        width: 100%;
        max-width: 1680px;
        margin: 0 auto;
        padding: clamp(18px, 2.5vw, 36px);
    }

    .users-page-toolbar {
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 9px;
        margin-bottom: 18px;
        display: flex;
    }

    .users-page .add-user-link {
        color: #fff;
        background: #0f766e;
        border: 1px solid #0f766e;
        border-radius: 11px;
        min-height: 42px;
        padding: 10px 16px;
        box-shadow: 0 8px 20px #0f766e24;
        font-size: 0.78rem;
    }

    .users-page .header-pill {
        color: #344740;
        background: #fffdf9;
        border: 1px solid #132a2412;
        border-radius: 11px;
        padding: 11px 14px;
        box-shadow: 0 8px 20px #15231f08;
        font-size: 0.74rem;
    }

    .users-layout {
        gap: 20px;
        display: grid;
    }

    .users-page .summary-card {
        background: transparent;
        border: 0;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        padding: 0;
        box-shadow: none;
    }

    .users-page .metric-card {
        background: #fffdf9d9;
        border: 1px solid #132a2412;
        border-radius: 18px;
        min-width: 0;
        padding: 18px;
        box-shadow: 0 12px 30px #15231f0a;
    }

    .users-page .metric-card>span {
        color: #52645e;
        font-size: 0.76rem;
        font-weight: 800;
    }

    .users-page .metric-card strong {
        color: #142721;
        margin: 9px 0 5px;
        font-family: Space Grotesk, sans-serif;
        font-size: clamp(1.25rem, 2vw, 1.75rem);
        display: block;
    }

    .users-page .metric-card small {
        color: #7a8984;
        line-height: 1.45;
    }

    .users-page .list-card {
        background: #fffdf9db;
        border: 1px solid #132a2412;
        border-radius: 21px;
        padding: clamp(16px, 2vw, 24px);
        box-shadow: 0 18px 45px #15231f0c;
    }

    .users-page .list-head h2 {
        color: #142721;
        margin-top: 4px;
        font-size: 1.25rem;
    }

    .users-page .selection-state {
        background: #f5f4ee;
        border: 1px solid #132a240d;
        border-radius: 11px;
        padding: 6px 7px 6px 12px;
    }

    .users-page .selection-state span {
        font-size: 0.72rem;
        font-weight: 700;
    }

    .users-page .clear-btn,
    .users-page .bulk-btn {
        border-radius: 10px;
        min-height: 38px;
        padding: 9px 13px;
        font-size: 0.73rem;
        font-weight: 800;
    }

    .users-page .bulk-actions {
        justify-content: flex-start;
        gap: 8px;
        padding: 13px 0 2px;
        border-top: 1px solid #132a240d;
    }

    .users-page .table-shell {
        max-width: 100%;
        border-radius: 15px;
        margin-top: 15px;
        scrollbar-color: #a9b6b1 #eef1ee;
        scrollbar-width: thin;
    }

    .users-page table {
        min-width: 1360px;
    }

    .users-page th {
        color: #61716b;
        background: #f5f3ed;
        padding-block: 13px;
        font-size: 0.66rem;
    }

    .users-page td {
        padding-block: 14px;
        font-size: 0.76rem;
    }

    .users-page tbody tr.selected {
        background: #0f766e0c;
        box-shadow: inset 3px 0 #0f766e;
    }

    .users-page .checkbox-wrap input,
    .users-page .row-checkbox {
        accent-color: #0f766e;
        width: 16px;
        height: 16px;
    }

    .users-page .status-pill {
        border-radius: 999px;
        padding: 6px 9px;
        font-size: 0.66rem;
        font-weight: 800;
        display: inline-flex;
    }

    .users-page .row-actions {
        flex-wrap: nowrap;
    }

    .users-page .row-action {
        white-space: nowrap;
        border-radius: 9px;
        padding: 8px 10px;
        font-size: 0.68rem;
    }

    .users-page .modal-overlay {
        z-index: 100;
    }

    .users-page .modal-card {
        width: min(720px, 100%);
        border-radius: 21px;
    }

    .sr-only {
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
        width: 1px;
        height: 1px;
        position: absolute;
        overflow: hidden;
    }

    @media (width <=1120px) {
        .users-page .summary-card {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (width <=760px) {
        .users-page {
            padding: 16px;
        }

        .users-page-toolbar {
            justify-content: flex-start;
        }

        .users-page .add-user-link {
            width: 100%;
        }

        .users-page .header-pill {
            flex: 1 1 auto;
        }

        .users-page .summary-card {
            grid-template-columns: 1fr;
        }

        .users-page .list-head,
        .users-page .selection-state {
            align-items: stretch;
            display: grid;
        }

        .users-page .bulk-actions {
            display: grid;
        }
    }
}

/* Responsive application layer */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

.app-shell,
.page-column,
.main-content,
.workspace-page,
.workspace-page .page-stack,
.workspace-page .surface-card {
    min-width: 0;
}

.main-content {
    overflow: visible;
}

.workspace-page .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}

.workspace-page .surface-card {
    overflow: hidden;
}

.workspace-page :is(.card-head, .filter-head, .list-head) {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.workspace-page .filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    align-items: end;
    gap: 10px;
    width: min(100%, 850px);
    display: grid;
}

.workspace-page .filter-field,
.workspace-page .search-field,
.workspace-page .date-field {
    min-width: 0;
}

.workspace-page :is(input, select, textarea, button) {
    max-width: 100%;
}

.workspace-page .data-table-shell {
    overscroll-behavior-inline: contain;
}

.workspace-page .data-table-shell::after {
    content: "Scroll horizontally to see more";
    color: #778680;
    background: #f7f4ed;
    border-top: 1px solid #132a240d;
    padding: 8px 12px;
    font-size: 0.64rem;
    font-weight: 700;
    display: none;
}

.workspace-page .data-table-shell table {
    min-width: max-content;
}

.workspace-page .data-table-shell th,
.workspace-page .data-table-shell td {
    max-width: 320px;
}

.workspace-page .data-table-shell td {
    overflow-wrap: anywhere;
}

.workspace-page :is(.modal-panel, .modal-card, .analytics-panel) {
    box-sizing: border-box;
    width: min(1120px, 100%);
    max-height: calc(100dvh - 40px);
    overflow: auto;
}

.workspace-page .modal-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}

.workspace-page .ratings-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

@media (width <=1280px) {
    .app-header {
        padding-inline: 24px;
    }

    .workspace-status {
        display: none;
    }

    .workspace-page .page-actions {
        justify-content: flex-start;
    }
}

@media (width <=980px) {
    .app-header {
        min-height: 92px;
    }

    .app-header-copy>p:last-child:not(.app-header-eyebrow) {
        max-width: 55vw;
    }

    .workspace-page :is(.review-head, .filter-head, .analytics-head) {
        align-items: flex-start;
        gap: 14px;
    }

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

    .workspace-page .chart-card.wide,
    .workspace-page .insight-card.highlight {
        grid-column: 1 / -1;
    }
}

@media (width <=760px) {
    .app-header {
        gap: 10px;
        min-height: 82px;
        padding: 13px 16px;
    }

    .app-header-main {
        gap: 11px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
    }

    .app-header-copy h1 {
        max-width: 52vw;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

    .header-avatar {
        width: 38px;
        height: 38px;
    }

    .workspace-page {
        padding: 14px;
    }

    .workspace-page .page-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-page .page-actions> :only-child,
    .workspace-page .page-actions> :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .workspace-page .page-actions>* {
        width: 100%;
    }

    .view-tabs {
        scrollbar-width: none;
    }

    .view-tabs::-webkit-scrollbar {
        display: none;
    }

    .view-tabs a {
        min-height: 42px;
    }

    .workspace-page .surface-card {
        border-radius: 17px;
        padding: 15px;
    }

    .workspace-page :is(.card-head, .filter-head, .list-head, .review-head) {
        align-items: stretch;
        display: grid;
    }

    .workspace-page .filter-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .workspace-page .filter-pills,
    .workspace-page .bulk-actions,
    .workspace-page .selection-state {
        grid-template-columns: 1fr;
        align-items: stretch;
        display: grid;
    }

    .workspace-page .filter-pills button,
    .workspace-page .bulk-actions button {
        min-height: 42px;
    }

    .workspace-page .data-table-shell {
        width: calc(100% + 30px);
        margin-inline: -15px;
        border-inline: 0;
        border-radius: 0;
    }

    .workspace-page .data-table-shell::after {
        display: block;
    }

    .workspace-page .data-table-shell th,
    .workspace-page .data-table-shell td {
        padding: 12px 13px;
    }

    .workspace-page .review-card {
        border-radius: 15px;
        padding: 15px;
    }

    .workspace-page .customer-block {
        min-width: 0;
    }

    .workspace-page .meta-block {
        text-align: left;
    }

    .workspace-page .analytics-grid,
    .workspace-page .ratings-grid,
    .workspace-page .action-lanes {
        grid-template-columns: 1fr;
    }

    .workspace-page :is(.chart-card.wide, .insight-card.highlight) {
        grid-column: auto;
    }

    .app-footer {
        min-height: 68px;
        padding: 14px 16px;
    }
}

@media (width <=600px),
(height <=620px) {

    .workspace-page .modal-overlay,
    .workspace-page .analytics-overlay {
        align-items: stretch;
        padding: 0;
    }

    .workspace-page :is(.modal-panel, .modal-card, .analytics-panel) {
        width: 100%;
        max-height: 100dvh;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        padding: 18px 15px;
    }

    .workspace-page :is(.modal-head, .analytics-head) {
        align-items: flex-start;
        display: flex;
    }

    .workspace-page :is(.modal-head, .analytics-head)>div:first-child {
        min-width: 0;
        flex: 1;
    }

    .workspace-page :is(.modal-actions, .form-actions) {
        align-items: stretch;
        display: grid;
    }
}

@media (width <=480px) {
    .workspace-page .stats-grid {
        gap: 10px;
    }

    .workspace-page .stat-card {
        border-radius: 15px;
        padding: 15px;
    }

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

    .workspace-page .page-actions>* {
        grid-column: auto !important;
    }

    .app-footer-brand small,
    .app-footer-meta>span:last-child {
        display: none;
    }
}

@media (hover: none) and (pointer: coarse) {

    .ui-button,
    .sidebar-link,
    .workspace-page button,
    .workspace-page select,
    .workspace-page input:not([type="checkbox"]):not([type="radio"]) {
        min-height: 44px;
    }
}

@media (width <=480px) {
    .app-header-eyebrow {
        max-width: 165px;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

    .app-footer-brand small,
    .system-status {
        display: none;
    }
}

@layer legacy-page-aliases {
    .order-page {
        width: 100%;
        max-width: 1680px;
        margin: 0 auto;
        padding: clamp(18px, 2.5vw, 36px);
    }

    .order-view-nav {
        background: #ffffffd9;
        border: 1px solid #132a2412;
        border-radius: 15px;
        align-items: center;
        gap: 5px;
        width: 100%;
        max-width: 100%;
        margin-bottom: 18px;
        padding: 5px;
        box-shadow: 0 8px 24px #15231f08;
        display: flex;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .order-view-nav a {
        color: #63736d;
        white-space: nowrap;
        border: 1px solid transparent;
        border-radius: 10px;
        align-items: center;
        gap: 8px;
        min-height: 38px;
        padding: 8px 13px;
        font-size: 0.78rem;
        font-weight: 800;
        text-decoration: none;
        transition: 150ms ease;
        display: flex;
        justify-content: center;
        flex: 1 0 auto;
    }

    .order-view-nav a>span {
        background: #9aa7a2;
        border-radius: 50%;
        width: 6px;
        height: 6px;
    }

    .order-view-nav a:hover,
    .order-view-nav a:focus-visible {
        color: #0f766e;
        background: #0f766e0a;
        outline: none;
    }

    .order-view-nav a.active {
        color: #fff;
        background: #0b625c;
        border-color: #0b625c;
        box-shadow: 0 7px 16px #0b625c24;
    }

    .order-view-nav a.active>span {
        background: #e5b943;
        box-shadow: 0 0 0 3px #e5b94326;
    }

    @media (max-width: 720px) {
        .order-view-nav {
            justify-content: flex-start;
        }

        .order-view-nav a {
            justify-content: flex-start;
            flex: 0 0 auto;
        }
    }

    .order-page-toolbar {
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 9px;
        margin: -61px 0 18px auto;
        display: flex;
    }

    .order-page .action-btn {
        border: 1px solid #132a2412;
        border-radius: 11px;
        min-height: 40px;
        padding: 10px 14px;
        font-size: 0.76rem;
        font-weight: 800;
        text-decoration: none;
    }

    .order-page .action-btn.primary {
        color: #fff;
        background: #071a3d;
        border-color: #071a3d;
    }

    .order-page .action-btn.accent {
        color: #fff;
        background: #0f766e;
        border-color: #0f766e;
    }

    .order-page .action-btn.ghost {
        color: #344740;
        background: #fffdf9;
    }

    .order-page .orders-layout,
    .order-page .reviews-layout {
        gap: 20px;
        display: grid;
    }

    .order-page .summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        display: grid;
    }

    .order-page .metric-card {
        background: #fffdf9d9;
        border: 1px solid #132a2412;
        border-radius: 18px;
        min-width: 0;
        padding: 18px;
        box-shadow: 0 12px 30px #15231f0a;
    }

    .order-page .metric-card strong {
        color: #142721;
        margin: 9px 0 5px;
        font-family: Space Grotesk, sans-serif;
        font-size: clamp(1.25rem, 2vw, 1.75rem);
        display: block;
    }

    .order-page .metric-card>span {
        color: #52645e;
        font-size: 0.76rem;
        font-weight: 800;
    }

    .order-page .metric-card small {
        color: #7a8984;
        line-height: 1.45;
    }

    .order-page .orders-card,
    .order-page .filter-card {
        background: #fffdf9db;
        border: 1px solid #132a2412;
        border-radius: 21px;
        padding: clamp(16px, 2vw, 24px);
        box-shadow: 0 18px 45px #15231f0c;
    }

    .order-page .card-head,
    .order-page .filter-head {
        align-items: flex-end;
        gap: 18px;
    }

    .order-page .filter-grid {
        gap: 10px;
    }

    .order-page .filter-field {
        min-width: 155px;
    }

    .order-page .filter-field>span {
        font-size: 0.7rem;
        font-weight: 800;
    }

    .order-page .filter-field input,
    .order-page .filter-field select {
        border-radius: 11px;
        min-height: 43px;
        padding: 10px 12px;
        font-size: 0.78rem;
    }

    .order-page .table-shell {
        max-width: 100%;
        border-radius: 15px;
        margin-top: 18px;
        scrollbar-color: #a9b6b1 #eef1ee;
        scrollbar-width: thin;
    }

    .order-page table {
        width: 100%;
        border-collapse: collapse;
    }

    .order-page th {
        color: #61716b;
        background: #f5f3ed;
        padding-block: 13px;
        font-size: 0.66rem;
    }

    .order-page td {
        padding-block: 14px;
        font-size: 0.76rem;
    }

    .order-page .modal-overlay,
    .order-page+.modal-overlay {
        z-index: 100;
    }

    .order-page .modal-panel,
    .order-page+.modal-overlay .modal-panel {
        border-radius: 22px;
    }

    @media (width <=1200px) {
        .order-page .summary-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .order-page-toolbar {
            justify-content: flex-start;
            margin: 0 0 18px;
        }
    }

    @media (width <=760px) {
        .order-page {
            padding: 16px;
        }

        .order-view-nav {
            width: 100%;
        }

        .order-view-nav a {
            justify-content: center;
            flex: 1 0 auto;
        }

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

        .order-page .card-head,
        .order-page .filter-head,
        .order-page .filter-grid {
            align-items: stretch;
            display: grid;
        }

        .order-page .search-field,
        .order-page .filter-field {
            min-width: 0;
        }

        .order-page-toolbar .action-btn {
            justify-content: center;
            flex: 1 1 auto;
            display: inline-flex;
        }
    }
}

/* Native products view using the reusable workspace system */
.products-page .products-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
    align-items: start;
    max-width: none;
}

.products-page .product-form-card,
.products-page .product-preview-card,
.products-page .products-table-card {
    min-width: 0;
}

.products-page .product-preview-card {
    position: sticky;
    top: 124px;
}

.products-page .products-table-card {
    grid-column: 1 / -1;
}

.products-page .product-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.products-page .field {
    min-width: 0;
}

.products-page .field>span {
    color: #52645e;
    font-size: 0.72rem;
    font-weight: 800;
}

.products-page :is(input, select, textarea) {
    border-radius: 11px;
    min-height: 44px;
    padding: 11px 13px;
    font-size: 0.8rem;
}

.products-page textarea {
    min-height: 128px;
    resize: vertical;
}

.products-page .image-upload-field {
    background: #f7f5ef;
    border: 1px dashed #0f766e4a;
    border-radius: 14px;
    padding: 14px;
}

.products-page .image-upload-field input[type="file"] {
    background: #fff;
    border-style: solid;
    padding: 7px;
}

.products-page .image-upload-field input[type="file"]::file-selector-button {
    color: #fff;
    cursor: pointer;
    background: #0f766e;
    border: 0;
    border-radius: 8px;
    margin-right: 10px;
    padding: 8px 11px;
    font-weight: 800;
}

.products-page .form-actions {
    justify-content: flex-end;
    padding-top: 4px;
}

.products-page .product-preview-image {
    aspect-ratio: 4 / 3;
    min-height: 220px;
    background:
        radial-gradient(circle at 20% 15%, #d4a01729, transparent 38%),
        linear-gradient(145deg, #e7f3ef, #eef0e8);
    border: 1px dashed #0f766e38;
    border-radius: 17px;
}

.products-page .product-preview-image img {
    object-fit: cover;
    min-height: 100%;
}

.products-page .preview-content h2 {
    overflow-wrap: anywhere;
}

.products-page .preview-content p {
    overflow-wrap: anywhere;
}

.products-page .data-table-shell table {
    min-width: 760px;
}

.products-page .toast {
    z-index: 120;
}

@media (width <=1120px) {
    .products-page .products-layout {
        grid-template-columns: 1fr;
    }

    .products-page .product-preview-card {
        grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
        align-items: center;
        gap: 20px;
        position: static;
        display: grid;
    }

    .products-page .product-preview-card>.eyebrow {
        grid-column: 1 / -1;
    }

    .products-page .preview-content {
        margin-top: 0;
    }
}

@media (width <=700px) {

    .products-page .product-form,
    .products-page .product-preview-card {
        grid-template-columns: 1fr;
    }

    .products-page .field.wide,
    .products-page .form-actions.wide,
    .products-page .product-preview-card>.eyebrow {
        grid-column: auto;
    }

    .products-page .form-actions {
        display: grid;
    }

    .products-page .product-preview-image {
        min-height: 190px;
    }

    .products-page .toast {
        min-width: 0;
        max-width: none;
        right: 14px;
        bottom: 14px;
        left: 14px;
    }
}

/* Yajra server-side data tables */
.yajra-table-footer {
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    color: #66766f;
    font-size: 0.72rem;
    display: flex;
}

.yajra-table-footer>div {
    gap: 8px;
    display: flex;
}

.yajra-table-footer .ui-button {
    min-height: 36px;
    padding: 7px 11px;
}

.yajra-table-footer button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.rtl-cell {
    direction: rtl;
}

@media (width <=560px) {
    .yajra-table-footer {
        align-items: stretch;
        display: grid;
    }

    .yajra-table-footer>div .ui-button {
        flex: 1;
    }
}

/* The preview responds to its card width, independently from the viewport. */
.products-page .product-preview-card {
    container-name: product-preview;
    container-type: inline-size;
    display: block;
}

.products-page .product-preview-shell {
    min-width: 0;
}

.products-page .product-preview-shell>* {
    min-width: 0;
}

@container product-preview (min-width: 560px) {
    .products-page .product-preview-shell {
        grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr);
        align-items: center;
        gap: clamp(18px, 3cqi, 28px);
        display: grid;
    }

    .products-page .product-preview-shell .preview-content {
        padding-block: 4px;
    }

    .products-page .product-preview-shell .product-preview-image {
        aspect-ratio: 4 / 3;
        min-height: 0;
        height: 100%;
        max-height: 330px;
    }
}

@container product-preview (max-width: 360px) {
    .products-page .product-preview-head {
        align-items: flex-start;
    }

    .products-page .product-preview-image {
        aspect-ratio: 1 / 1;
        min-height: 180px;
    }

    .products-page .preview-badges {
        align-items: flex-start;
        display: grid;
    }

    .products-page .preview-price-row {
        align-items: flex-start;
        display: grid;
    }

    .products-page .preview-price-row>span {
        text-align: left;
    }

    .products-page .preview-price-row b {
        max-width: 100%;
    }
}

@media (width <=480px) {
    .products-page .product-preview-card {
        margin-inline: -2px;
        padding: 13px;
    }

    .products-page .product-preview-head {
        padding-bottom: 11px;
    }

    .products-page .product-preview-image {
        min-height: 170px;
    }

    .products-page .product-image-placeholder {
        padding: 22px 14px;
    }

    .products-page .preview-content {
        gap: 11px;
        padding-inline: 2px;
        padding-top: 14px;
    }

    .products-page .preview-inventory>div:first-child {
        align-items: flex-start;
        display: grid;
    }
}

@media (height <=720px) and (width > 1120px) {
    .products-page .product-preview-card {
        position: static;
    }
}

/* Admin overview */
.admin-overview-page {
    display: grid;
    gap: 20px;
}

.overview-welcome {
    color: #fff;
    background: linear-gradient(125deg, #071a3d, #0a5653);
    border-radius: 24px;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: clamp(22px, 4vw, 38px);
    box-shadow: 0 22px 50px #071a3d24;
    display: flex;
    overflow: hidden;
    position: relative;
}

.overview-welcome::after {
    content: "";
    border: 1px solid #ffffff18;
    border-radius: 50%;
    width: 260px;
    height: 260px;
    position: absolute;
    right: -80px;
    top: -130px;
}

.overview-welcome>div {
    z-index: 1;
}

.overview-welcome .eyebrow {
    color: #9ee3d8;
}

.overview-welcome h2 {
    margin: 5px 0 8px;
    font-family: Space Grotesk, sans-serif;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.overview-welcome p:last-child {
    color: #d7e6e2;
    max-width: 640px;
    margin: 0;
}

.overview-primary-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
    display: flex;
}

.overview-primary-actions .ui-button.primary {
    color: #15312a;
    background: #fff;
    border-color: #fff;
}

.overview-primary-actions .ui-button.accent {
    background: #18a094;
    border-color: #18a094;
}

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

.overview-metric {
    background: #fffdf9;
    border: 1px solid #132a2412;
    border-radius: 18px;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    box-shadow: 0 12px 30px #15231f0a;
    display: flex;
}

.metric-icon {
    color: #0f766e;
    background: #e3f3ef;
    border-radius: 13px;
    flex: 0 0 44px;
    place-items: center;
    width: 44px;
    height: 44px;
    font-family: Space Grotesk, sans-serif;
    font-weight: 800;
    display: grid;
}

.metric-icon.orders {
    color: #335eb2;
    background: #eaf0fb;
}

.metric-icon.revenue {
    color: #9b6517;
    background: #fff0d2;
}

.metric-icon.maids {
    color: #7851a9;
    background: #f1eafa;
}

.overview-metric div {
    min-width: 0;
}

.overview-metric small {
    color: #687872;
    font-size: .9rem;
    font-weight: 800;
}

.overview-metric strong {
    color: #152821;
    margin: 3px 0;
    font-family: Space Grotesk, sans-serif;
    font-size: clamp(1.15rem, 2vw, 1.6rem);
    display: block;
    overflow-wrap: anywhere;
}

.overview-metric p {
    color: #83908c;
    margin: 0;
    font-size: .68rem;
}

.overview-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .75fr);
    align-items: start;
    gap: 20px;
    display: grid;
}

.overview-card-head {
    justify-content: space-between;
}

.overview-card-head>a {
    color: #0f766e;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
}

.overview-empty {
    text-align: center;
    place-items: center;
    min-height: 280px;
    padding: 35px 20px;
    display: grid;
    align-content: center;
}

.overview-empty>span {
    color: #0f766e;
    background: #e8f5f1;
    border-radius: 50%;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    font-family: Space Grotesk, sans-serif;
    font-weight: 800;
    display: grid;
}

.overview-empty strong {
    color: #263b34;
}

.overview-empty p {
    color: #7b8a85;
    max-width: 370px;
    margin: 7px auto 0;
    font-size: .76rem;
    line-height: 1.55;
}

.overview-order-list {
    margin-top: 13px;
    display: grid;
}

.overview-order-list article {
    border-top: 1px solid #132a240c;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    display: grid;
}

.overview-order-list article:first-child {
    border-top: 0;
}

.overview-order-id {
    color: #0f766e;
    background: #e9f4f1;
    border-radius: 9px;
    padding: 7px 8px;
    font-size: .68rem;
    font-weight: 800;
}

.overview-order-list article>div {
    min-width: 0;
    display: grid;
}

.overview-order-list article>div strong {
    color: #293c35;
    font-size: .78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-order-list article>div small {
    color: #82908b;
    margin-top: 3px;
    font-size: .67rem;
}

.overview-orders-card {
    gap: 20px;
    display: grid;
}

.overview-side-stack {
    gap: 20px;
    display: grid;
}

.overview-status-list {
    margin-top: 10px;
    display: grid;
}

.overview-status-list div {
    border-top: 1px solid #132a240c;
    justify-content: space-between;
    align-items: center;
    padding: 13px 0;
    display: flex;
}

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

.overview-status-list span {
    color: #5c6e67;
    font-size: .74rem;
}

.overview-status-list strong {
    color: #172a24;
    font-family: Space Grotesk, sans-serif;
}

.overview-shortcuts>div:last-child {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 13px;
    display: grid;
}

.overview-shortcuts a {
    color: #31463f;
    background: #f6f4ee;
    border: 1px solid #132a240b;
    border-radius: 12px;
    gap: 5px;
    padding: 13px;
    text-decoration: none;
    display: grid;
}

.overview-shortcuts a:hover {
    background: #eef6f3;
    border-color: #0f766e25;
}

.overview-shortcuts a strong {
    font-size: .74rem;
}

.overview-shortcuts a span {
    color: #74837e;
    font-size: .64rem;
}

@media (width <=1100px) {
    .overview-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .overview-side-stack {
        grid-template-columns: 1fr 1fr;
    }
}

@media (width <=680px) {
    .overview-welcome {
        align-items: flex-start;
        display: grid;
    }

    .overview-primary-actions {
        justify-content: flex-start;
    }

    .overview-primary-actions .ui-button {
        flex: 1;
    }

    .overview-metrics,
    .overview-side-stack {
        grid-template-columns: 1fr;
    }

    .overview-order-list article {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .overview-order-list .status-pill {
        grid-column: 2;
        width: max-content;
    }

    .overview-shortcuts>div:last-child {
        grid-template-columns: 1fr;
    }
}

/* Cities CRUD */
.wallet-layout {
    grid-template-columns: minmax(280px, .7fr) minmax(0, 1.5fr);
    align-items: start;
    gap: 20px;
    display: grid;
}

.wallet-adjust-card {
    position: sticky;
    top: 100px;
}

.wallet-help {
    color: #71817b;
    margin: 4px 0 18px;
    font-size: .75rem;
    line-height: 1.55;
}

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

.wallet-form-grid .field {
    min-width: 0;
}

.wallet-form-grid .field>span:first-child {
    color: #52645e;
    font-size: .7rem;
    font-weight: 800;
}

.wallet-form-grid :is(input, select, textarea) {
    border-radius: 11px;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
}

.wallet-form-grid textarea {
    resize: vertical;
}

.wallet-adjust-card .form-actions {
    justify-content: flex-end;
    margin-top: 17px;
}

.wallet-ledger-card table {
    min-width: 1050px;
}

@media (width <=1050px) {
    .wallet-layout {
        grid-template-columns: 1fr;
    }

    .wallet-adjust-card {
        position: static;
    }

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

    .wallet-form-grid .wide {
        grid-column: 1/-1;
    }
}

@media (width <=560px) {
    .wallet-form-grid {
        grid-template-columns: 1fr;
    }

    .wallet-form-grid .wide {
        grid-column: auto;
    }
}

/* Cities CRUD */
.message-thread-row {
    border-top: 1px solid #132a240d;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 17px 0;
    display: grid;
}

.message-thread-row:first-of-type {
    border-top: 0;
}

.message-thread-avatar {
    color: #0f766e;
    background: #e6f3ef;
    border-radius: 13px;
    place-items: center;
    width: 44px;
    height: 44px;
    font-weight: 800;
    display: grid;
}

.message-thread-row>div {
    min-width: 0;
}

.message-thread-row strong {
    color: #263a33;
    display: block;
}

.message-thread-row p {
    color: #667871;
    margin: 4px 0;
    font-size: .74rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-thread-row small,
.message-thread-row time {
    color: #87948f;
    font-size: .65rem;
}

.message-thread-row time {
    white-space: nowrap;
}

@media (width <=560px) {
    .message-thread-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .message-thread-row time {
        grid-column: 2;
    }
}

/* Cities CRUD */
.cities-page .notice {
    border: 1px solid;
    border-radius: 13px;
    margin-bottom: 18px;
    padding: 13px 15px;
    font-size: 0.78rem;
    line-height: 1.55;
}

.cities-page .notice.success {
    color: #11633f;
    background: #e8f6ee;
    border-color: #18794e26;
}

.cities-page .notice.danger {
    color: #8f3018;
    background: #fff0e9;
    border-color: #a1381626;
}

.cities-page .notice ul {
    margin: 7px 0 0;
    padding-left: 20px;
}

.cities-card-head {
    justify-content: space-between;
}

.city-filters {
    grid-template-columns: minmax(190px, 1.4fr) minmax(170px, 1fr) auto auto;
    align-items: end;
    gap: 9px;
    width: min(100%, 760px);
    display: grid;
}

.city-filters label {
    gap: 6px;
    min-width: 0;
    display: grid;
}

.city-filters label>span {
    color: #60716a;
    font-size: 0.68rem;
    font-weight: 800;
}

.city-filters :is(input, select) {
    border-radius: 10px;
    min-height: 42px;
    padding: 9px 11px;
    font-size: 0.76rem;
}

.cities-page .data-table-shell table {
    min-width: 900px;
}

.cities-page .table-actions {
    flex-wrap: nowrap;
}

.cities-page .table-action-btn {
    text-decoration: none;
}

.cities-page .table-actions form {
    margin: 0;
}

.cities-page .empty-table {
    color: #71817b;
    text-align: center;
    padding: 38px;
}

.pagination-shell {
    color: #66766f;
    margin-top: 18px;
    font-size: 0.72rem;
}

.pagination-shell nav>div:first-child {
    display: none;
}

.pagination-shell nav>div:last-child {
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    display: flex;
}

.pagination-shell nav span[aria-current="page"] span,
.pagination-shell nav a,
.pagination-shell nav span[aria-disabled="true"] span {
    border: 1px solid #132a2412 !important;
    background: #fff !important;
    border-radius: 8px !important;
    padding: 7px 10px !important;
    text-decoration: none;
}

.pagination-shell nav svg {
    width: 15px;
    height: 15px;
}

.city-editor-page {
    max-width: 980px;
}

.city-editor-card .card-head {
    margin-bottom: 20px;
}

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

.city-form-grid .field {
    min-width: 0;
}

.city-form-grid .field>span:first-child {
    color: #52645e;
    font-size: 0.72rem;
    font-weight: 800;
}

.city-form-grid :is(input, select) {
    border-radius: 11px;
    min-height: 45px;
    padding: 11px 13px;
    font-size: 0.8rem;
}

.city-status-field {
    grid-column: 1 / -1;
}

.switch-row {
    background: #f5f5ef;
    border: 1px solid #132a240d;
    border-radius: 11px;
    align-items: center;
    gap: 10px;
    min-height: 45px;
    padding: 10px 13px;
    display: flex;
}

.switch-row input[type="checkbox"] {
    accent-color: #0f766e;
    width: 18px;
    height: 18px;
    min-height: 0;
}

.switch-row>span {
    color: #43564f;
    font-size: 0.76rem;
    font-weight: 700;
}

.city-form-actions {
    border-top: 1px solid #132a240d;
    justify-content: flex-end;
    margin-top: 22px;
    padding-top: 18px;
}

@media (width <=800px) {
    .city-filters {
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
}

@media (width <=560px) {

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

    .city-status-field {
        grid-column: auto;
    }

    .city-form-actions {
        align-items: stretch;
        display: grid;
    }

    .pagination-shell nav>div:last-child>div:first-child {
        display: none;
    }
}

/* Services catalog */
.catalog-notice {
    color: #11633f;
    background: #e8f6ee;
    border: 1px solid #18794e26;
    border-radius: 13px;
    margin-bottom: 18px;
    padding: 13px 15px;
    font-size: 0.78rem;
}

.catalog-notice.danger {
    color: #8f3018;
    background: #fff0e9;
    border-color: #a1381626;
}

.catalog-notice ul {
    margin: 7px 0 0;
    padding-left: 20px;
}

.catalog-head {
    justify-content: space-between;
}

.catalog-filters {
    grid-template-columns: minmax(190px, 1fr) repeat(2, minmax(150px, 0.75fr)) auto;
    align-items: end;
    gap: 9px;
    width: min(100%, 680px);
    display: grid;
}

.catalog-filters :is(input, select) {
    border-radius: 10px;
    min-height: 42px;
    padding: 9px 11px;
    font-size: 0.76rem;
}

.services-page .data-table-shell table {
    min-width: 980px;
}

.service-name-cell {
    align-items: center;
    gap: 10px;
    display: flex;
}

.service-name-cell img {
    object-fit: cover;
    border-radius: 9px;
    width: 42px;
    height: 42px;
}

.service-name-cell span {
    min-width: 0;
    display: grid;
}

.service-name-cell small {
    color: #71817b;
}

.services-page .table-actions {
    flex-wrap: nowrap;
}

.services-page .table-actions form {
    margin: 0;
}

.catalog-editor-page {
    max-width: auto;
}

.form-section-heading {
    border-bottom: 1px solid #132a2412;
    margin: 18px 0 2px;
    padding: 14px 0 10px;
}

.form-section-heading h3 {
    margin: 0;
    color: #15231f;
    font-family: Space Grotesk, sans-serif;
    font-size: 1.05rem;
}

.choice-field {
    border: 0;
    margin: 0;
    padding: 0;
}

.choice-field legend {
    color: #52645e;
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 800;
}

.scope-choice-grid {
    border: 1px solid #132a2412;
    border-radius: 12px;
    background: #fffaf2;
    gap: 8px 16px;
    max-height: 180px;
    overflow: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.scope-choice-grid label {
    align-items: center;
    gap: 8px;
    color: #52645e;
    font-size: 0.82rem;
    display: flex;
}

.locations-workspace {
    gap: 18px;
    align-items: start;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
}

.location-tabs {
    gap: 6px;
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
}

.location-tab {
    border: 1px solid #132a2412;
    border-radius: 999px;
    background: #fffaf2;
    color: #52645e;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 800;
}

.location-tab small {
    opacity: 0.65;
    margin-left: 4px;
}

.location-tab.active,
.location-tab:hover,
.location-tab:focus-visible {
    background: #0b625c;
    border-color: #0b625c;
    color: #fff;
    outline: none;
}

.location-manager-grid {
    gap: 18px;
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(220px, 0.9fr) minmax(0, 1.4fr);
}

.location-create-panel {
    align-content: start;
    gap: 12px;
    display: grid;
}

.location-create-panel h3,
.locations-list-panel h3 {
    margin: 0;
    font-family: Space Grotesk, sans-serif;
    font-size: 1rem;
}

.locations-list-panel {
    min-width: 0;
}

.panel-title {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    display: flex;
}

.panel-title span {
    color: #71817b;
    font-size: 0.76rem;
}

.location-row {
    align-items: center;
    border-top: 1px solid #132a2412;
    gap: 8px;
    padding: 11px 0;
    display: flex;
}

.location-row>span:first-child {
    min-width: 0;
    margin-right: auto;
}

.location-row strong,
.location-row small {
    display: block;
}

.location-row small {
    color: #71817b;
    font-size: 0.72rem;
}

.location-status {
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.68rem;
    font-weight: 800;
}

.location-status.active {
    background: #18794e1c;
    color: #18794e;
}

.location-status.paused {
    background: #c2410c1c;
    color: #c2410c;
}

.location-preview-card {
    position: sticky;
    top: 24px;
}

.location-app-preview {
    border: 1px solid #132a2412;
    border-radius: 16px;
    background: #f7f1e8;
    gap: 14px;
    padding: 16px;
    display: grid;
}

@media (max-width: 1050px) {

    .locations-workspace,
    .location-manager-grid {
        grid-template-columns: 1fr;
    }

    .location-preview-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .locations-page {
        padding: 18px 14px;
    }

    .locations-page .page-actions {
        align-items: stretch;
        flex-direction: column;
        margin-bottom: 14px;
    }

    .locations-page .page-actions .ui-button {
        width: 100%;
    }

    .locations-page .overview-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .locations-page .metric-card {
        min-width: 0;
        padding: 14px;
    }

    .locations-page .metric-card strong {
        overflow-wrap: anywhere;
        font-size: 1.15rem;
    }

    .location-manager-card,
    .location-preview-card {
        padding: 16px;
    }

    .location-tabs {
        flex-wrap: nowrap;
        margin: 0 -2px 16px;
        padding: 2px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .location-tab {
        flex: 0 0 auto;
    }

    .location-row {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .location-row>span:first-child {
        flex: 1 1 100%;
        margin-bottom: 2px;
    }

    .location-row form {
        margin-left: auto;
    }
}

@media (max-width: 430px) {
    .locations-page .overview-metrics {
        grid-template-columns: 1fr;
    }

    .locations-page .card-head,
    .locations-page .panel-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .location-create-panel :is(input, select, textarea),
    .location-app-preview :is(input, select, textarea) {
        width: 100%;
        max-width: 100%;
    }
}

.card-description {
    color: #63736d;
    margin: 6px 0 0;
    max-width: 620px;
    font-size: 0.85rem;
}

.catalog-editor-page .card-head {
    margin-bottom: 20px;
}

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

.maid-form-sections .form-section-heading {
    margin-top: 10px;
}

.service-form-grid .field {
    min-width: 0;
}

.service-form-grid .field.wide {
    grid-column: 1 / -1;
}

.service-form-grid .field>span:first-child {
    color: #52645e;
    font-size: 0.72rem;
    font-weight: 800;
}

.service-form-grid :is(input, select, textarea) {
    border-radius: 11px;
    min-height: 45px;
    padding: 11px 13px;
    font-size: 0.8rem;
}

.service-form-grid textarea {
    min-height: 130px;
    resize: vertical;
}

.catalog-form-actions {
    border-top: 1px solid #132a240d;
    justify-content: flex-end;
    margin-top: 22px;
    padding-top: 18px;
}

@media (width <=760px) {
    .catalog-filters {
        grid-template-columns: 1fr;
        width: 100%;
    }
}

@media (width <=560px) {
    .service-form-grid {
        grid-template-columns: 1fr;
    }

    .service-form-grid .field.wide {
        grid-column: auto;
    }

    .catalog-form-actions {
        align-items: stretch;
        display: grid;
    }
}

/* Product storefront preview */
.products-page .product-preview-card {
    background:
        radial-gradient(circle at 100% 0%, #0f766e12, transparent 38%),
        #fffdf9e8;
    padding: 16px;
}

.products-page .product-preview-head {
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 3px 3px 14px;
    display: flex;
}

.products-page .product-preview-head h2 {
    color: #142721;
    margin: 4px 0 0;
    font-size: 1.05rem;
}

.products-page .preview-live-badge {
    color: #0b6a47;
    background: #e6f6ed;
    border: 1px solid #18794e1f;
    border-radius: 999px;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    font-size: 0.68rem;
    font-weight: 900;
    display: inline-flex;
}

.products-page .preview-live-badge i {
    background: #25a66c;
    border-radius: 50%;
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 3px #25a66c1f;
}

.products-page .product-preview-image {
    isolation: isolate;
    background:
        linear-gradient(145deg, #f3f7f4, #e7eeea);
    border: 1px solid #132a2412;
    border-radius: 16px;
    position: relative;
    box-shadow: inset 0 0 0 1px #fff8;
}

.products-page .product-preview-image::after {
    content: "Preview";
    color: #fff;
    z-index: 2;
    background: #071a3db8;
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 6px 9px;
    font-size: 0.6rem;
    font-weight: 900;
    position: absolute;
    top: 10px;
    left: 10px;
}

.products-page .product-preview-image img {
    border-radius: inherit;
}

.products-page .product-image-placeholder {
    color: #64756e;
    text-align: center;
    place-items: center;
    gap: 7px;
    padding: 30px 18px;
    display: grid;
}

.products-page .product-image-placeholder svg {
    fill: none;
    stroke: #0f766e;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
    width: 42px;
    height: 42px;
    margin-bottom: 5px;
}

.products-page .product-image-placeholder strong {
    color: #294039;
    font-size: 0.82rem;
}

.products-page .product-image-placeholder span {
    color: #82908b;
    font-size: 0.68rem;
}

.products-page .preview-content {
    gap: 14px;
    margin-top: 0;
    padding: 18px 4px 3px;
}

.products-page .preview-badges {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    display: flex;
}

.products-page .preview-category {
    color: #0f6b64;
    background: #0f766e10;
    border: 1px solid #0f766e16;
    border-radius: 999px;
    padding: 7px 9px;
    font-size: 0.65rem;
    font-weight: 800;
}

.products-page .preview-badges .status-pill {
    padding: 7px 9px;
    font-size: 0.65rem;
}

.products-page .preview-content>h2 {
    color: #13251f;
    letter-spacing: -0.035em;
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.2;
}

.products-page .preview-content>p {
    color: #697a74;
    min-height: 3.2em;
    font-size: 0.76rem;
    line-height: 1.6;
}

.products-page .preview-price-row {
    border-top: 1px solid #132a240d;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    padding-top: 14px;
    display: flex;
}

.products-page .preview-price-row>strong {
    color: #0b625c;
    font-family: Space Grotesk, sans-serif;
    font-size: 1.35rem;
}

.products-page .preview-price-row>span {
    color: #81908b;
    text-align: right;
    font-size: 0.62rem;
    line-height: 1.4;
}

.products-page .preview-price-row b {
    color: #4c5e57;
    max-width: 125px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.66rem;
    display: block;
    overflow: hidden;
}

.products-page .preview-inventory {
    background: #f6f5ef;
    border: 1px solid #132a240b;
    border-radius: 11px;
    padding: 10px 11px;
}

.products-page .preview-inventory>div:first-child {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    display: flex;
}

.products-page .preview-inventory :is(span, strong) {
    color: #61716b;
    font-size: 0.65rem;
}

.products-page .preview-inventory strong {
    color: #263a33;
}

.products-page .inventory-track {
    background: #dfe6e2;
    border-radius: 999px;
    height: 5px;
    margin-top: 8px;
    overflow: hidden;
}

.products-page .inventory-track span {
    background: linear-gradient(90deg, #0f766e, #3fac83);
    border-radius: inherit;
    width: 0;
    height: 100%;
    transition: width 180ms ease;
    display: block;
}

.products-page .preview-inventory.low .inventory-track span {
    background: #d4a017;
}

.products-page .preview-inventory.empty .inventory-track span {
    background: #a13816;
}

@media (width <=1120px) {
    .products-page .product-preview-card>.product-preview-head {
        grid-column: 1 / -1;
    }
}

@media (width <=700px) {
    .products-page .product-preview-card>.product-preview-head {
        grid-column: auto;
    }

    .products-page .product-preview-image {
        aspect-ratio: 16 / 10;
    }
}

/* Redesigned application login */
.login-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: #172722;
    background: #f3eee4;
    font-family: "Manrope", sans-serif;
}

.login-page *,
.login-page *::before,
.login-page *::after {
    box-sizing: border-box;
}

.login-page .login-shell {
    grid-template-columns: minmax(420px, 1.05fr) minmax(480px, .95fr);
    min-height: 100svh;
}

.login-page .brand-panel {
    padding: clamp(18px, 2.4vw, 34px);
}

.login-page .brand-card {
    isolation: isolate;
    min-height: calc(100svh - clamp(36px, 4.8vw, 68px));
    justify-content: space-between;
    border-radius: 30px;
    padding: clamp(30px, 4.5vw, 64px);
    background:
        radial-gradient(circle at 82% 18%, #36b7a96b 0, transparent 30%),
        radial-gradient(circle at 18% 85%, #d4a01738 0, transparent 26%),
        linear-gradient(145deg, #102c25 0%, #0d443d 57%, #0f766e 100%);
    box-shadow: 0 30px 80px #102c2538;
}

.login-page .brand-card::before {
    inset: 16px;
    border-color: #ffffff17;
    border-radius: 22px;
}

.login-brand {
    z-index: 2;
    align-items: center;
    gap: 12px;
    width: max-content;
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-decoration: none;
    display: flex;
}

.login-brand-mark {
    width: 44px;
    height: 44px;
    border: 1px solid #ffffff38;
    border-radius: 14px;
    background: #ffffff14;
    place-items: center;
    display: grid;
}

.login-brand-mark svg {
    width: 27px;
    fill: none;
    stroke: #f5d77d;
    stroke-linecap: round;
    stroke-width: 1.7;
}

.brand-copy {
    z-index: 2;
    max-width: 680px;
    margin-block: auto;
    padding-block: clamp(70px, 12vh, 140px) 50px;
}

.login-page .brand-copy .eyebrow {
    color: #f2cf68;
}

.login-page .brand-copy h1 {
    max-width: 650px;
    font-size: clamp(3rem, 5.4vw, 6.4rem);
    line-height: .96;
}

.login-page .brand-copy>p:last-child {
    max-width: 580px;
    font-size: clamp(.95rem, 1.2vw, 1.1rem);
}

.login-highlights {
    z-index: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #ffffff24;
    gap: 18px;
    padding-top: 25px;
    display: grid;
}

.login-highlights div {
    gap: 4px;
    display: grid;
}

.login-highlights strong {
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
}

.login-highlights span {
    color: #cfe3de;
    font-size: .72rem;
    line-height: 1.4;
}

.brand-orbit {
    z-index: 0;
    pointer-events: none;
    border: 1px solid #ffffff16;
    border-radius: 50%;
    position: absolute;
}

.orbit-one {
    width: 440px;
    height: 440px;
    top: -150px;
    right: -150px;
}

.orbit-two {
    width: 280px;
    height: 280px;
    bottom: -120px;
    left: -70px;
}

.login-page .login-panel {
    padding: clamp(28px, 6vw, 90px);
}

.login-page .login-card {
    width: min(100%, 500px);
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

.login-page .form-head {
    margin-bottom: 34px;
}

.login-mobile-mark {
    display: none;
}

.login-page .form-head .eyebrow {
    margin-bottom: 13px;
    color: #0f766e;
    font-size: .7rem;
}

.login-page .form-head h2 {
    color: #132a24;
    font-size: clamp(2.15rem, 4vw, 3.25rem);
    line-height: 1.03;
}

.login-page .form-head p:last-child {
    max-width: 440px;
    margin-top: 13px;
    font-size: .9rem;
    line-height: 1.65;
}

.login-page .field-group {
    gap: 8px;
    margin-bottom: 17px;
    font-size: .76rem;
}

.login-input-wrap {
    position: relative;
    display: block;
}

.login-input-wrap>svg {
    width: 19px;
    fill: none;
    stroke: #788781;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
}

.login-page .field-group input {
    min-height: 56px;
    border-color: #132a241c;
    border-radius: 14px;
    padding: 0 50px;
    font: inherit;
    font-size: .84rem;
    font-weight: 600;
    box-shadow: 0 5px 16px #15231f08;
}

.login-page .field-group input::placeholder {
    color: #98a39f;
}

.login-page .field-group input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 4px #0f766e18, 0 8px 22px #15231f0b;
}

.login-page .password-wrap input {
    padding-right: 74px;
}

.login-page .show-password-btn {
    top: 10px;
    right: 10px;
    height: 36px;
    border-radius: 10px;
    color: #0f665f;
    background: #e9f2ef;
    font-size: .69rem;
}

.login-page .form-error {
    border-left: 3px solid #a13816;
    margin: -7px 0 16px;
    padding-left: 10px;
    color: #a13816;
    font-size: .72rem;
    font-weight: 700;
}

.login-page .form-row {
    margin: 5px 0 20px;
}

.login-page .remember-check {
    cursor: pointer;
    font-size: .73rem;
}

.login-page .remember-check input {
    width: 17px;
    height: 17px;
    accent-color: #0f766e;
}

.secure-session {
    align-items: center;
    gap: 7px;
    color: #71817b;
    font-size: .68rem;
    font-weight: 700;
    display: flex;
}

.secure-session i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22a06b;
    box-shadow: 0 0 0 4px #22a06b1c;
}

.login-page .login-btn {
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 57px;
    border-radius: 14px;
    background: linear-gradient(135deg, #132a24, #0f766e);
    font-family: "Manrope", sans-serif;
    font-size: .8rem;
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex;
}

.login-page .login-btn svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.login-page .login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 42px #071f3a42;
}

.demo-accounts {
    border-top: 1px solid #132a2412;
    margin-top: 30px;
    padding-top: 23px;
}

.demo-heading {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    display: flex;
}

.demo-heading>span {
    color: #3e514a;
    font-size: .74rem;
    font-weight: 800;
}

.demo-heading small {
    color: #7b8984;
    font-size: .65rem;
}

.demo-account-grid {
    gap: 8px;
    display: grid;
}

.demo-account-grid button {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 12px;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    color: #22342e;
    background: #ffffff8c;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color .18s, background .18s, transform .18s;
    display: flex;
}

.demo-account-grid button:hover {
    border-color: #0f766e33;
    background: #fff;
    transform: translateX(2px);
}

.demo-account-grid button>span:last-child {
    min-width: 0;
    gap: 2px;
    display: grid;
}

.demo-account-grid button strong {
    font-size: .7rem;
}

.demo-account-grid button small {
    color: #71817b;
    font-size: .63rem;
    overflow-wrap: anywhere;
}

.demo-avatar {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    place-items: center;
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    display: grid;
}

.demo-avatar.admin {
    background: #132a24;
}

.demo-avatar.supporter {
    background: #0f766e;
}

.demo-avatar.partner {
    color: #4e3b05;
    background: #e7c45d;
}

.login-help {
    margin: 22px 0 0;
    color: #84908c;
    text-align: center;
    font-size: .65rem;
}

@media (width <=940px) {
    .login-page .login-shell {
        grid-template-columns: minmax(330px, .8fr) minmax(420px, 1.2fr);
    }

    .login-page .brand-copy h1 {
        font-size: clamp(2.7rem, 5.8vw, 4.5rem);
    }

    .login-highlights {
        grid-template-columns: 1fr;
    }

    .login-highlights div:nth-child(2) {
        display: none;
    }
}

@media (width <=760px) {
    .login-page .login-shell {
        display: block;
    }

    .login-page .brand-panel {
        display: none;
    }

    .login-page .login-panel {
        min-height: 100svh;
        align-items: center;
        padding: clamp(24px, 8vw, 54px);
        background:
            radial-gradient(circle at 100% 0, #0f766e1c, transparent 35%),
            radial-gradient(circle at 0 100%, #d4a0171c, transparent 35%);
    }

    .login-mobile-mark {
        width: 46px;
        height: 46px;
        margin-bottom: 28px;
        border-radius: 14px;
        place-items: center;
        color: #fff;
        background: linear-gradient(135deg, #132a24, #0f766e);
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        display: grid;
    }
}

@media (width <=480px) {
    .login-page .login-panel {
        align-items: start;
        padding: 24px 18px 32px;
    }

    .login-page .form-head {
        margin-bottom: 27px;
    }

    .login-page .form-head h2 {
        font-size: 2.12rem;
    }

    .login-page .form-row {
        flex-direction: row;
        align-items: center;
    }

    .secure-session {
        font-size: 0;
    }

    .demo-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {

    .login-page *,
    .login-page *::before,
    .login-page *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* DataTable empty, loading, and error widgets */
.datatable-state-row:hover {
    background: transparent !important;
}

.datatable-state-row>td {
    padding: 0 !important;
}

.datatable-state {
    min-height: 280px;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 42px 24px;
    color: #52645e;
    text-align: left;
    display: flex;
}

.datatable-state-icon {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border: 1px solid #0f766e20;
    border-radius: 20px;
    place-items: center;
    color: #0f766e;
    background: linear-gradient(145deg, #eff8f5, #e2f0eb);
    box-shadow: inset 0 1px #fff, 0 12px 30px #132a240c;
    display: grid;
}

.datatable-state-icon svg {
    width: 29px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.datatable-state>span:last-child {
    max-width: 360px;
    gap: 6px;
    display: grid;
}

.datatable-state strong {
    color: #21352e;
    font-size: .9rem;
}

.datatable-state small {
    color: #71817b;
    font-size: .72rem;
    line-height: 1.55;
}

.datatable-state.error .datatable-state-icon {
    border-color: #a1381624;
    color: #a13816;
    background: linear-gradient(145deg, #fff5f0, #f9e6dd);
}

.datatable-state.loading .datatable-state-icon {
    grid-auto-flow: column;
    gap: 4px;
}

.datatable-state.loading .datatable-state-icon i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0f766e;
    animation: datatable-pulse 1s ease-in-out infinite;
}

.datatable-state.loading .datatable-state-icon i:nth-child(2) {
    animation-delay: .14s;
}

.datatable-state.loading .datatable-state-icon i:nth-child(3) {
    animation-delay: .28s;
}

@keyframes datatable-pulse {

    0%,
    100% {
        opacity: .28;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

@media (width <=560px) {
    .datatable-state {
        min-height: 230px;
        flex-direction: column;
        text-align: center;
    }

    .datatable-state-icon {
        width: 58px;
        height: 58px;
        border-radius: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .datatable-state.loading .datatable-state-icon i {
        animation: none;
        opacity: .65;
    }
}

.prototype-toolbar,
.prototype-bulk-bar,
.prototype-profile-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.prototype-snapshot {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.prototype-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.prototype-tags span,
.leader-item {
    border-radius: 999px;
    background: rgba(15, 118, 110, .1);
    padding: 8px 12px;
}

.prototype-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.prototype-kpi-grid article,
.leader-item {
    background: rgba(255, 250, 243, .9);
    border: 1px solid rgba(19, 42, 36, .08);
    border-radius: 22px;
    padding: 16px;
}

.prototype-kpi-grid span,
.prototype-kpi-grid small {
    display: block;
    color: #60706a;
}

.prototype-kpi-grid strong {
    display: block;
    margin-top: 8px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.6rem;
}

.leaders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.leader-item {
    display: flex;
    justify-content: space-between;
    border-radius: 16px;
    margin: 8px 16px;
}

.phone-cell {
    white-space: nowrap;
}

.prototype-dialog {
    border: 0;
    border-radius: 24px;
    padding: 24px;
    max-width: 520px;
    background: #fffaf2;
}

.prototype-dialog::backdrop {
    background: rgba(19, 42, 36, .45);
}

.prototype-dialog form {
    display: grid;
    gap: 12px;
}

.message-thread-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-top: 1px solid rgba(19, 42, 36, .08);
}

@media (max-width: 1366px) {
    .prototype-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .prototype-kpi-grid,
    .leaders-grid,
    .prototype-snapshot {
        grid-template-columns: 1fr;
        display: grid;
    }

    .data-table-shell {
        overflow-x: auto;
    }
}

/* Prototype visual alignment. Later rules win over earlier admin styles. */
body {
    color: #15231f;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 24%),
        radial-gradient(circle at right, rgba(212, 160, 23, 0.12), transparent 22%),
        linear-gradient(180deg, #f7f1e8 0%, #efe5d7 100%);
}

.app-header {
    align-items: flex-start;
    min-height: 0;
    padding: 28px 30px 18px;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
}

.app-header-main {
    flex: 1;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}

.app-header-copy h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: -0.03em;
}

.app-header-eyebrow {
    margin-bottom: 8px;
    color: #0f766e;
    letter-spacing: 0.16em;
    font-size: 0.82rem;
    font-weight: 800;
}

.app-header-copy p {
    max-width: 760px;
    color: #60706a;
}

.page-header-actions,
.header-toolbar {
    margin: 0;
}

.page-column > .main-content {
    padding: 0 30px 36px;
}

.app-shell .ui-button {
    min-height: 48px;
    padding: 14px 20px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 250, 242, 0.9);
    color: #15231f;
    box-shadow: 0 20px 50px rgba(21, 35, 31, 0.08);
    font-size: 0.95rem;
    font-weight: 800;
}

.app-shell .ui-button.primary {
    background: #132a24;
    color: #fff;
}

.app-shell .ui-button.accent {
    background: #0f766e;
    color: #fff;
}

.app-shell .ui-button:hover,
.app-shell .ui-button:focus-visible,
.app-shell .tab-btn:hover,
.app-shell .tab-btn:focus-visible {
    transform: translateY(-1px);
    outline: 2px solid rgba(15, 118, 110, 0.35);
    outline-offset: 2px;
}

.app-shell .sidebar-link {
    min-height: 52px;
    padding: 14px 16px;
    border: 0;
    border-radius: 16px;
    color: #f6f0e6;
    background: transparent;
    box-shadow: none;
    font-size: 1.05rem;
    font-weight: 700;
}

.app-shell .sidebar-link svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.app-shell .sidebar-link:hover,
.app-shell .sidebar-link:focus-visible,
.app-shell .sidebar-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: transparent;
    box-shadow: none;
    transform: translateX(2px);
}

.app-shell .sidebar-child-link {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.94rem;
    font-weight: 800;
}

.app-shell .sidebar-item-dropdown-menu {
    gap: 8px;
    margin: 8px 0 0;
    padding-left: 14px;
    border-left: 0;
}

.app-shell .sidebar-brand {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
}

.app-shell .sidebar-logo strong {
    letter-spacing: -0.04em;
    font-size: 1.65rem;
}

.app-shell .sidebar-context {
    margin-top: 14px;
    padding: 0 8px;
    background: transparent;
    border: 0;
}

.app-shell .sidebar-nav {
    gap: 10px;
    margin-top: 22px;
}

.app-shell .sidebar-nav-group {
    gap: 10px;
}

.admin-overview-page .overview-welcome.prototype-snapshot {
    display: flex;
    align-items: flex-start;
    margin-top: 6px;
    padding: 24px 26px;
    color: #15231f;
    background: rgba(255, 250, 243, 0.82);
    border: 1px solid rgba(19, 42, 36, 0.08);
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(21, 35, 31, 0.08);
}

.admin-overview-page .overview-welcome.prototype-snapshot::after {
    display: none;
}

.admin-overview-page .overview-welcome .eyebrow,
.admin-overview-page .overview-welcome h2,
.admin-overview-page .overview-welcome p {
    color: inherit;
}

.admin-overview-page .overview-welcome .eyebrow {
    color: #0f766e;
}

.admin-overview-page .overview-welcome p {
    color: #60706a;
    line-height: 1.7;
}

.prototype-kpi-grid {
    gap: 18px;
    margin-top: 24px;
}

.prototype-kpi-grid article {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 250, 243, 0.88);
    box-shadow: 0 20px 50px rgba(21, 35, 31, 0.08);
}

.prototype-kpi-grid strong {
    margin-top: 10px;
    font-size: 1.55rem;
}

.prototype-kpi-grid .partner-metric {
    background: #eaf2ff;
}

.prototype-kpi-grid .accent {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(255, 250, 243, 0.95));
}

.prototype-kpi-grid .money {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.12), rgba(255, 250, 243, 0.96));
}

.prototype-kpi-grid .profit-metric {
    background: #edf8f2;
}

.prototype-kpi-grid .profit-metric strong {
    color: #0f6a42;
}

.prototype-tags {
    gap: 12px;
}

.prototype-tags span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    color: #0a5c55;
    font-weight: 800;
}

.prototype-tags span:first-child {
    background: rgba(24, 121, 78, 0.12);
    color: #18794e;
}

.leaders-grid {
    gap: 20px;
    margin-top: 24px;
}

.leader-card {
    padding: 24px;
    border-radius: 28px;
}

.leader-item {
    margin: 12px 0 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fffaf2;
}

.app-shell .workspace-page .surface-card,
.app-shell .metric-card,
.app-shell .panel-card,
.app-shell .packages-card {
    border: 1px solid rgba(19, 42, 36, 0.08);
    border-radius: 28px;
    background: rgba(255, 250, 243, 0.82);
    box-shadow: 0 20px 50px rgba(21, 35, 31, 0.08);
}

.app-shell .workspace-page .data-table-shell {
    overflow: auto;
    border: 1px solid rgba(19, 42, 36, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
}

.app-shell .workspace-page .data-table-shell table {
    border-collapse: collapse;
    min-width: 960px;
}

.app-shell .workspace-page .data-table-shell th {
    padding: 16px 18px;
    background: #f6f2e9;
    color: #60706a;
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-shell .workspace-page .data-table-shell td {
    padding: 16px 18px;
    vertical-align: middle;
    white-space: nowrap;
}

.app-shell .workspace-page .data-table-shell tbody tr + tr td {
    border-top: 1px solid rgba(19, 42, 36, 0.08);
}

.app-shell .workspace-page .data-table-shell tbody tr:hover {
    background: rgba(15, 118, 110, 0.04);
}

.app-shell tbody tr:has(input[type="checkbox"]:checked) {
    background: rgba(15, 118, 110, 0.08);
}

.app-shell .table-action-btn,
.app-shell .small-btn,
.app-shell .inline-btn {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 800;
}

.catalog-filters,
.prototype-bulk-bar,
.prototype-profile-actions,
#bulk-users-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.catalog-filters input,
.catalog-filters select,
.prototype-dialog input,
.prototype-dialog select,
.prototype-dialog textarea,
.stack-list input,
.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid rgba(19, 42, 36, 0.12);
    border-radius: 14px;
    background: #fff;
    color: #15231f;
}

.catalog-filters input,
.catalog-filters select {
    width: auto;
    min-width: 180px;
}

.prototype-dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(21, 35, 31, 0.18);
}

.prototype-dialog label {
    display: grid;
    gap: 8px;
    color: #60706a;
    font-weight: 700;
}

.tab-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 14px;
    background: rgba(255, 250, 242, 0.85);
    color: #15231f;
    font-weight: 800;
}

.tab-btn.active {
    background: #0f766e;
    color: #fff;
}

.clip-cell {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.phone-cell {
    white-space: nowrap;
}

.message-thread-row {
    border-radius: 18px;
    margin: 8px 16px;
    background: #fffaf2;
}

.message-thread-row:hover {
    background: rgba(15, 118, 110, 0.06);
}

.message-thread-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #132a24;
    color: #fff;
    font-weight: 800;
}

.full-control-hero,
.stack-item,
.package-card {
    border: 1px solid rgba(19, 42, 36, 0.08);
    border-radius: 22px;
    background: rgba(255, 250, 243, 0.9);
}

.stack-item.active {
    background: rgba(15, 118, 110, 0.1);
}

.empty-table,
.overview-empty {
    padding: 28px 18px;
    color: #60706a;
}

@media (min-width: 1181px) {
    .app-shell {
        grid-template-columns: 310px minmax(0, 1fr);
    }

    .app-shell > .sidebar {
        width: 310px;
        padding: 28px 22px;
        background:
            radial-gradient(circle at top, rgba(15, 118, 110, 0.18), transparent 24%),
            linear-gradient(180deg, #132a24 0%, #0f211d 100%);
    }
}

@media (max-width: 1380px) {
    .prototype-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

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

    .app-shell > .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(310px, calc(100vw - 32px));
        height: 100dvh;
        padding: 28px 22px;
        background:
            radial-gradient(circle at top, rgba(15, 118, 110, 0.18), transparent 24%),
            linear-gradient(180deg, #132a24 0%, #0f211d 100%);
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    .app-shell > .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close,
    .menu-toggle {
        display: grid;
    }

    .sidebar-backdrop {
        z-index: 40;
        display: block;
        pointer-events: none;
    }

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

    .page-column > .main-content,
    .app-header {
        padding-right: 18px;
        padding-left: 18px;
    }
}

@media (max-width: 860px) {
    .app-header,
    .app-header-main,
    .prototype-snapshot,
    .leaders-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .prototype-kpi-grid,
    .overview-metrics {
        grid-template-columns: 1fr;
    }

    .prototype-tags {
        justify-content: flex-start;
    }

    .inbox-split {
        grid-template-columns: 1fr;
    }
}

/* Final prototype polish */
.app-shell {
    --sidebar: #132a24;
    --bg: #efe5d7;
    --surface: rgba(255, 250, 243, 0.82);
    --surface-strong: #fffaf2;
    --card-border: rgba(19, 42, 36, 0.08);
    --text: #15231f;
    --muted: #60706a;
    --accent: #0f766e;
    --accent-strong: #0a5c55;
    --warning: #d4a017;
    --success: #18794e;
    --danger: #a13816;
    --shadow: 0 20px 50px rgba(21, 35, 31, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    color: var(--text);
    font-family: Manrope, sans-serif;
}

.app-shell h1,
.app-shell h2,
.app-shell h3 {
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: -0.03em;
}

.app-shell .sidebar-logo-mark,
.app-shell .sidebar-link > svg,
.app-shell .sidebar-active-dot,
.app-shell .sidebar-context,
.app-shell .sidebar-account {
    display: none;
}

.app-shell .sidebar-brand {
    display: block;
    height: auto;
    align-self: start;
}

.app-shell .brand-copy {
    display: grid;
    gap: 6px;
    padding: 0;
}

.app-shell .brand-kicker,
.app-shell .sidebar-nav-group h2 {
    margin: 0;
    color: rgba(247, 243, 235, 0.7);
    font-family: Manrope, sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.app-shell .sidebar-logo strong {
    color: #f7f3eb;
    font-size: 2rem;
    line-height: 1;
}

.app-shell .sidebar-link {
    min-height: 48px;
    padding: 13px 16px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f6f0e6;
}

.app-shell .sidebar-nav-group h2 {
    margin: 22px 16px 0;
}

.app-shell .sidebar-nav {
    gap: 8px;
    margin-bottom: 28px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.app-shell .workspace-status {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.app-shell .workspace-status small {
    display: none;
}

.app-shell .header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.app-shell .page-column > .main-content,
.app-shell .admin-overview-page,
.app-shell .workspace-page {
    max-width: 1580px;
}

.app-shell .prototype-kpi-grid article {
    min-height: 112px;
}

.app-shell .prototype-kpi-grid span {
    font-size: 0.92rem;
    line-height: 1.35;
}

.app-shell .prototype-kpi-grid strong {
    font-size: 1.55rem;
    line-height: 1.1;
}

.app-shell .data-table-shell th {
    font-size: 0.78rem;
    font-weight: 800;
}

.app-shell .data-table-shell td {
    font-size: 0.94rem;
    line-height: 1.4;
}

.app-shell input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.app-shell .catalog-filters select,
.app-shell .prototype-dialog select,
.app-shell .form-grid select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 22px, calc(100% - 12px) 22px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.app-shell .prototype-dialog {
    margin: 8vh auto auto;
}

.app-shell .prototype-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.app-shell .yajra-table-footer a,
.app-shell .yajra-table-footer span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

.app-shell .pill,
.app-shell .status-pill,
.app-shell [class*="badge"] {
    border-radius: 999px;
    font-weight: 800;
}

.inbox-split {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    min-height: 520px;
}

.inbox-list-pane,
.inbox-reader,
.inbox-person,
.inbox-bubble {
    border: 1px solid var(--card-border, rgba(19, 42, 36, 0.08));
    border-radius: 22px;
    background: rgba(255, 250, 243, 0.9);
}

.inbox-list-pane,
.inbox-reader {
    padding: 18px;
    box-shadow: var(--shadow, 0 20px 50px rgba(21, 35, 31, 0.08));
}

.inbox-search {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    color: #60706a;
    font-weight: 800;
}

.inbox-list {
    display: grid;
    gap: 8px;
    max-height: 640px;
    overflow: auto;
}

.inbox-person {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    cursor: pointer;
}

.inbox-person input {
    accent-color: #0f766e;
}

.inbox-person:has(input:checked),
.inbox-person:hover {
    background: rgba(15, 118, 110, 0.08);
}

.inbox-person strong,
.inbox-person small,
.inbox-person time {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-thread header p,
.inbox-person small,
.inbox-bubble time {
    color: #60706a;
}

.inbox-bubble {
    margin: 18px 0;
    padding: 16px 18px;
}

.inbox-thread[hidden] {
    display: none;
}

.full-control-hero {
    display: grid;
    gap: 18px;
    margin-top: 18px;
    padding: 24px;
}

.full-control-workspace,
.full-control-bottom {
    gap: 18px;
}

body.sidebar-open {
    overflow: hidden;
}

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 10px 12px; font-size: 13px; line-height: 1.35; text-align: start; vertical-align: middle; }
.data-table th { height: 42px; font-size: 12px; font-weight: 700; letter-spacing: 0.01em; }
.data-table tbody tr { height: 52px; }
.user-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tab-btn, .wizard-tab { border: 1px solid #d5deea; background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.tab-btn.active, .wizard-tab.active { background: #14324f; color: #fff; border-color: #14324f; }
.user-panel, .maid-step { display: none; }
.user-panel.active { display: block; }
.service-form-grid.user-panel.active { display: grid; }
.maid-step.active { display: contents; }
dialog.modal-dialog { width: min(760px, calc(100vw - 32px)); margin: 8vh auto; padding: 0; border: 0; border-radius: 16px; }
dialog.modal-dialog .modal-card { padding: 24px; }
dialog.modal-dialog .form-actions, dialog.modal-dialog .prototype-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.ads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ad-card { border: 1px solid #d5deea; border-radius: 16px; overflow: hidden; background: #fff; }
.ad-visual { height: 148px; background: #eef3f8; display: flex; align-items: center; justify-content: center; }
.ad-visual img, .ad-live-preview img { width: 100%; height: 148px; object-fit: cover; background: #eef3f8; }
.ad-content, .ad-live-preview { padding: 16px; display: grid; gap: 8px; }
.ad-editor { display: grid; gap: 12px; }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; background: #e8eef6; font-size: 12px; }
.toolbar .field input, .toolbar .field select, .catalog-filters input, .catalog-filters select { min-height: 40px; }
.empty-table { padding: 28px 16px; }
.campaign-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.campaign-card { display: flex; flex-direction: column; min-height: 430px; border-radius: 22px; overflow: hidden; background: #f6f3ec; border: 1px solid #e4ddd2; }
.campaign-creative { min-height: 240px; padding: 22px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; background: linear-gradient(160deg, #12382f, #1d8a63); background-size: cover; background-position: center; }
.campaign-tone-1 .campaign-creative { background: linear-gradient(160deg, #8a5310, #e2a24a); }
.campaign-tone-2 .campaign-creative { background: linear-gradient(160deg, #0d4642, #1c8b78); }
.campaign-creative h3 { margin: 0; font-size: 28px; line-height: 1.15; color: #fff; }
.campaign-kicker { font-size: 13px; opacity: .9; }
.campaign-creative .status-pill { align-self: flex-start; background: rgba(255,255,255,.18); color: #fff; }
.campaign-meta { display: grid; gap: 8px; padding: 18px 20px 20px; }
.campaign-meta .eyebrow { letter-spacing: .08em; text-transform: uppercase; }
.ad-editor { grid-template-columns: minmax(0, 1fr) minmax(240px, .8fr); align-items: start; }
.ad-live-preview { min-height: 320px; }
.attendance-card { margin: 16px 0; padding: 20px; border: 1px solid #e4ddd2; border-radius: 18px; background: #f8f6f1; }
.attendance-head, .attendance-metrics { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.attendance-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 12px 0; }
.attendance-metrics article { padding: 12px; border-radius: 14px; background: #fff; }
.attendance-metrics span, .campaign-meta span { display: block; color: #667085; font-size: 12px; }
.status-pill.is-online { background: #e5f6ea; color: #146c36; }
.chat-thread { display: grid; gap: 10px; max-height: 280px; overflow: auto; margin: 12px 0; }
.chat-thread article { padding: 10px 12px; border-radius: 12px; background: #f4f7fb; }
.partner-chat { display: grid; gap: 8px; }
@media (max-width: 800px) {
    .attendance-metrics, .ad-editor { grid-template-columns: 1fr; }
}

.workspace-page,
.users-page,
.table-wrapper,
.data-table-shell {
    min-width: 0;
    max-width: 100%;
}

.table-wrapper,
.workspace-page .data-table-shell {
    overflow-x: auto;
    overflow-y: hidden;
}

.workspace-page .data-table-shell th,
.workspace-page .data-table-shell td {
    padding: 8px 12px;
    vertical-align: middle;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
    max-width: none;
    font-size: 0.78rem;
}

.workspace-page .data-table-shell th {
    height: 40px;
    padding-block: 8px;
}

.workspace-page .data-table-shell tbody td {
    height: 64px;
}

table[data-kind="customers"] .table-col-user,
table[data-kind="customers"] th:nth-child(3) { width: 240px; min-width: 220px; max-width: 260px; }
table[data-kind="customers"] th:nth-child(4),
table[data-kind="customers"] td:nth-child(4) { width: 140px; min-width: 130px; }
table[data-kind="customers"] th:nth-child(5),
table[data-kind="customers"] td:nth-child(5) { width: 140px; min-width: 120px; }
table[data-kind="customers"] th:nth-child(6),
table[data-kind="customers"] td:nth-child(6) { width: 120px; min-width: 100px; }
table[data-kind="customers"] th:nth-child(7),
table[data-kind="customers"] td:nth-child(7),
table[data-kind="customers"] th:nth-child(8),
table[data-kind="customers"] td:nth-child(8),
table[data-kind="customers"] th:nth-child(9),
table[data-kind="customers"] td:nth-child(9) { width: 120px; min-width: 110px; }
table[data-kind="customers"] th:nth-child(10),
table[data-kind="customers"] td:nth-child(10) { width: 130px; min-width: 120px; }

.table-col-actions {
    width: 190px;
    min-width: 160px;
    max-width: none;
    overflow: visible;
}

.table-col-clip,
.clip-cell {
    max-width: 180px;
}

.data-table-shell .table-user-cell,
.data-table-shell .service-name-cell {
    align-items: center;
    gap: 0;
    min-width: 0;
    max-width: 260px;
}

.data-table-shell .service-name-cell span {
    display: grid;
    gap: 1px;
    line-height: 1.2;
    min-width: 0;
}

.data-table-shell .service-name-cell a,
.data-table-shell .service-name-cell strong {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
}

.data-table-shell .service-name-cell small {
    color: #71817b;
    font-size: 0.72rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table-shell .status-pill {
    height: 26px;
    min-height: 0;
    gap: 6px;
    padding: 0 8px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.data-table-shell .status-pill:before {
    width: 6px;
    height: 6px;
}

.data-table-shell .table-actions,
.data-table-shell .row-actions {
    display: inline-flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-height: 0;
    width: auto;
}

.data-table-shell .table-action-btn,
.data-table-shell .row-actions .ui-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto;
    max-width: none;
    height: 32px;
    min-height: 32px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #132a2414;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: #24332e;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.table-actions-menu {
    position: relative;
}

.table-actions-menu summary {
    list-style: none;
}

.table-actions-menu summary::-webkit-details-marker {
    display: none;
}

.table-actions-menu-panel {
    position: fixed;
    z-index: 40;
    display: grid;
    gap: 2px;
    min-width: 180px;
    padding: 6px;
    border: 1px solid #132a2414;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px #15231f1f;
}

.table-actions-menu:not([open]) .table-actions-menu-panel {
    display: none;
}

.table-actions-menu-panel .table-action-btn,
.table-menu-form {
    width: 100%;
    justify-content: flex-start;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
}

.table-menu-form {
    margin: 0;
}

.table-actions-menu-panel .table-action-btn:hover,
.data-table-shell .table-action-btn:hover {
    background: #f4f7f5;
    transform: none;
}

.phone-cell {
    white-space: nowrap;
}
