.hub-body {
    background: #eef2f5;
}

.hub-layout {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
}

.hub-sidebar {
    width: 260px;
    max-width: 260px;
    min-width: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px;
    background: #102f35;
    color: #fff;
    overflow-y: auto;
}

.hub-sidebar-backdrop {
    display: none;
}

.hub-brand {
    display: grid;
    gap: 4px;
    padding: 8px 6px 22px;
}

.hub-brand span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    font-weight: 900;
}

.hub-brand small {
    color: rgba(255,255,255,0.68);
}

.hub-nav {
    display: grid;
    gap: 16px;
}

.hub-nav-group {
    display: grid;
    gap: 5px;
}

.hub-nav-group h2 {
    margin: 0 0 2px;
    padding: 0 12px;
    color: rgba(255,255,255,0.46);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-nav a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,0.84);
    text-decoration: none;
    font-weight: 800;
}

.hub-nav a:hover,
.hub-nav a.is-active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.hub-nav a.is-active {
    box-shadow: inset 3px 0 0 #f4c26b;
}

.hub-main {
    min-width: 0;
}

.hub-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(170px, 0.72fr) minmax(280px, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 10px 22px;
    background: rgba(255,255,255,0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.hub-topbar-left,
.hub-topbar-actions,
.hub-account-menu summary {
    display: flex;
    align-items: center;
}

.hub-topbar-left {
    gap: 12px;
    min-width: 0;
}

.hub-topbar-title {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.hub-topbar-title strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 0.98rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-topbar-title span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.hub-menu-btn {
    display: none;
    cursor: pointer;
}

.hub-menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
}

.hub-search {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.hub-search label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.hub-search input {
    width: 100%;
    min-height: 44px;
    padding: 10px 52px 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafb;
    color: var(--ink);
}

.hub-search input:focus {
    outline: 2px solid rgba(22, 105, 112, 0.18);
    border-color: rgba(22, 105, 112, 0.5);
    background: #fff;
}

.hub-search button {
    position: absolute;
    right: 5px;
    display: inline-grid;
    place-items: center;
    width: 36px;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: var(--brand-dark);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}

.hub-search button span {
    font-size: 1.1rem;
    line-height: 1;
}

.hub-topbar-actions {
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.hub-quick-menu,
.hub-account-menu {
    position: relative;
}

.hub-quick-menu summary,
.hub-account-menu summary {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    list-style: none;
}

.hub-quick-menu summary::-webkit-details-marker,
.hub-account-menu summary::-webkit-details-marker {
    display: none;
}

.hub-quick-menu summary {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    padding: 0 14px;
    color: var(--brand-dark);
    font-weight: 900;
}

.hub-quick-menu summary span {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #e7f4f5;
    line-height: 1;
}

.hub-account-menu summary {
    gap: 10px;
    padding: 5px 10px 5px 6px;
}

.hub-avatar {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #e7f4f5;
    color: var(--brand-dark);
    font-weight: 900;
}

.hub-account-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.hub-account-copy strong {
    max-width: 150px;
    overflow: hidden;
    color: var(--ink);
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-account-copy small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.hub-quick-menu div,
.hub-account-menu div {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    display: grid;
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.hub-quick-menu:not([open]) div,
.hub-account-menu:not([open]) div {
    display: none;
}

.hub-quick-menu a,
.hub-account-menu a {
    padding: 10px;
    border-radius: 6px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
}

.hub-quick-menu a:hover,
.hub-account-menu a:hover {
    background: #f3f7f8;
}

.hub-user {
    display: flex;
    gap: 12px;
    align-items: center;
}

.hub-user a {
    color: var(--brand-dark);
    font-weight: 800;
}

.hub-flash {
    margin: 16px 24px 0;
}

.hub-page {
    padding: 24px;
}

.hub-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 18px;
}

.hub-page-head h1 {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.hub-page-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.hub-stat-card,
.hub-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hub-stat-card {
    display: grid;
    gap: 8px;
    padding: 18px;
}

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

.hub-stat-card strong {
    font-size: 1.8rem;
}

.hub-panel {
    margin-top: 16px;
    padding: 20px;
}

.hub-panel h2 {
    margin: 0 0 12px;
}

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

.hub-checklist span {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
    font-weight: 800;
}

.customer-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 16px;
    margin-top: 16px;
}

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

.dashboard-page {
    display: grid;
    gap: 16px;
}

.dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.dashboard-hero h1,
.dashboard-hero p {
    margin: 0;
}

.dashboard-hero h1 {
    font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.dashboard-hero p:not(.eyebrow) {
    margin-top: 8px;
    color: var(--muted);
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-kpi,
.dashboard-health-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.dashboard-kpi {
    display: grid;
    gap: 7px;
    min-height: 138px;
    padding: 16px;
}

.dashboard-kpi span,
.dashboard-kpi small,
.dashboard-muted {
    color: var(--muted);
}

.dashboard-kpi span {
    font-weight: 900;
}

.dashboard-kpi strong {
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.05;
}

.dashboard-kpi-danger {
    border-color: rgba(191, 65, 65, 0.28);
    background: #fffafa;
}

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

.dashboard-health-card {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 18px;
}

.panel-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.panel-title-row h2,
.panel-title-row p {
    margin: 0;
}

.panel-title-row a {
    color: var(--brand-dark);
    font-weight: 900;
    text-decoration: none;
}

.panel-title-row a:hover {
    text-decoration: underline;
}

.dashboard-meter,
.dashboard-mini-meter {
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: #edf1f5;
}

.dashboard-mini-meter {
    height: 6px;
}

.dashboard-meter span,
.dashboard-mini-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
}

.dashboard-health-row,
.dashboard-alert-row,
.dashboard-module-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.dashboard-health-row:last-child,
.dashboard-alert-row:last-child {
    border-bottom: 0;
}

.dashboard-alert-row {
    color: inherit;
    text-decoration: none;
}

.dashboard-alert-row strong {
    min-width: 34px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f6f9;
    text-align: center;
}

.dashboard-module-row {
    padding-bottom: 6px;
    border-bottom: 0;
}

.dashboard-module-row div {
    display: grid;
    gap: 2px;
}

.dashboard-module-row span,
.dashboard-module-row em {
    color: var(--muted);
    font-style: normal;
}

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

.dashboard-panel {
    margin-top: 0;
}

.dashboard-list {
    display: grid;
    gap: 8px;
}

.dashboard-list.tight {
    gap: 6px;
}

.dashboard-list a {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    background: #fbfcfd;
}

.dashboard-list a:hover {
    border-color: var(--brand);
    background: #fff;
}

.dashboard-list strong {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-list em {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.82rem;
    font-style: normal;
}

.dashboard-list span,
.empty-state {
    color: var(--muted);
}

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

.dashboard-task-strip article {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.dashboard-task-strip span,
.dashboard-task-strip em {
    color: var(--muted);
    font-style: normal;
}

.reports-page {
    display: grid;
    gap: 16px;
}

.reports-hero,
.reports-chart-card,
.reports-kpi {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.reports-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
}

.reports-hero h1,
.reports-hero p {
    margin: 0;
}

.reports-hero h1 {
    font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.reports-hero p:not(.eyebrow) {
    margin-top: 8px;
    color: var(--muted);
}

.reports-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.reports-toolbar {
    margin-top: 0;
}

.reports-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.reports-kpi {
    display: grid;
    gap: 7px;
    min-height: 128px;
    padding: 16px;
}

.reports-kpi span,
.reports-kpi small {
    color: var(--muted);
    font-weight: 800;
}

.reports-kpi strong {
    font-size: clamp(1.25rem, 2vw, 1.9rem);
    line-height: 1.05;
}

.reports-kpi-danger {
    border-color: rgba(191, 65, 65, 0.28);
    background: #fffafa;
}

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

.reports-chart-wide {
    grid-column: span 2;
}

.reports-chart-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 18px;
}

.reports-chart-card canvas {
    display: block;
    width: 100%;
    min-height: 260px;
}

.reports-chart-card .panel-title-row > span,
.reports-panel .panel-title-row > span {
    color: var(--muted);
    font-weight: 800;
}

.reports-table-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.reports-panel {
    margin-top: 0;
    overflow-x: auto;
}

.customer-form {
    display: grid;
    gap: 18px;
}

.field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    resize: vertical;
}

.detail-list {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.detail-list span,
.mini-list span {
    color: var(--muted);
}

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

.mini-list a,
.mini-list div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
    text-decoration: none;
}

.payment-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.payment-summary-strip span {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.checkbox-field {
    align-content: end;
}

.checkbox-field label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.checkbox-field input {
    width: auto;
    min-height: auto;
}

.role-picker {
    display: grid;
    gap: 12px;
}

.role-picker h2 {
    margin: 0;
    font-size: 1.05rem;
}

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

.role-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.role-option input {
    margin-top: 4px;
}

.role-option span {
    display: grid;
    gap: 4px;
}

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

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

.permission-group {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.permission-group h2 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.permission-group label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.permission-group span {
    display: grid;
    gap: 2px;
}

.permission-group small {
    color: var(--muted);
}

@media (max-width: 980px) {
    body.hub-nav-open {
        overflow: hidden;
    }

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

    .hub-sidebar {
        position: fixed;
        z-index: 20;
        inset: 0 auto 0 0;
        width: min(280px, 86vw);
        max-width: min(280px, 86vw);
        transform: translateX(-100%);
        transition: transform 0.18s ease;
    }

    body.hub-nav-open .hub-sidebar-backdrop:not([hidden]) {
        display: block !important;
        background: rgba(23, 32, 51, 0.42);
        backdrop-filter: blur(2px);
    }

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

    .hub-topbar {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .hub-topbar-actions {
        justify-self: end;
    }

    .hub-search {
        grid-column: 1 / -1;
        order: 3;
    }

    .hub-menu-btn {
        display: inline-grid;
        gap: 4px;
        align-content: center;
        min-height: 40px;
        width: 42px;
        padding: 8px 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        font-weight: 800;
    }

    .hub-stat-grid,
    .compact-stats,
    .hub-checklist,
    .customer-profile-grid,
    .payment-summary-strip,
    .role-grid,
    .permission-grid,
    .report-grid,
    .dashboard-kpi-grid,
    .dashboard-ops-grid,
    .dashboard-main-grid,
    .dashboard-task-strip,
    .reports-kpi-grid,
    .reports-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero {
        display: grid;
    }

    .dashboard-hero-actions {
        justify-content: flex-start;
    }

    .reports-hero {
        display: grid;
    }

    .reports-actions {
        justify-content: flex-start;
    }

    .reports-chart-wide {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .hub-topbar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hub-topbar-left,
    .hub-topbar-actions {
        justify-content: space-between;
    }

    .hub-topbar-actions {
        width: 100%;
        position: relative;
        align-items: stretch;
    }

    .hub-search {
        order: 3;
    }

    .hub-quick-menu,
    .hub-account-menu {
        position: static;
        flex: 1 1 0;
        min-width: 0;
    }

    .hub-quick-menu summary,
    .hub-account-menu summary {
        width: 100%;
        justify-content: center;
    }

    .hub-account-menu summary {
        justify-content: flex-start;
    }

    .hub-quick-menu[open],
    .hub-account-menu[open] {
        z-index: 60;
    }

    .hub-quick-menu[open] summary,
    .hub-account-menu[open] summary {
        border-color: rgba(24, 89, 98, 0.36);
        background: #f6fbfb;
        box-shadow: 0 0 0 3px rgba(24, 89, 98, 0.08);
    }

    .hub-quick-menu div,
    .hub-account-menu div {
        top: calc(100% + 8px);
        right: 0;
        left: 0;
        z-index: 70;
        width: 100%;
        min-width: 0;
        max-height: min(62vh, 420px);
        gap: 4px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .hub-quick-menu a,
    .hub-account-menu a {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 12px;
        white-space: normal;
    }

    .hub-account-copy strong {
        max-width: 120px;
    }

    .hub-stat-grid,
    .compact-stats,
    .hub-checklist,
    .customer-profile-grid,
    .payment-summary-strip,
    .role-grid,
    .permission-grid,
    .report-grid,
    .dashboard-kpi-grid,
    .dashboard-ops-grid,
    .dashboard-main-grid,
    .dashboard-task-strip,
    .reports-kpi-grid,
    .reports-chart-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero,
    .dashboard-health-card,
    .dashboard-kpi,
    .dashboard-panel,
    .reports-hero,
    .reports-chart-card,
    .reports-kpi {
        padding: 14px;
    }

    .dashboard-hero-actions .btn,
    .dashboard-hero-actions a,
    .reports-actions .btn,
    .reports-actions a {
        flex: 1 1 160px;
    }

    .reports-chart-wide {
        grid-column: span 1;
    }

    .panel-title-row,
    .dashboard-list strong {
        align-items: flex-start;
    }

    .hub-page {
        padding: 14px;
    }

    .hub-page-head {
        display: grid;
    }

    .hub-page-head .topbar-actions,
    .topbar-actions,
    .screen-actions,
    .row-actions {
        width: 100%;
    }

    .topbar-actions .btn,
    .topbar-actions button,
    .screen-actions .btn,
    .screen-actions button,
    .row-actions .btn,
    .row-actions button {
        flex: 1 1 140px;
    }
}

.statement-page {
    display: grid;
    gap: 16px;
}

.statement-hero,
.statement-document,
.statement-card,
.statement-kpi-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.statement-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
}

.statement-hero h1,
.statement-hero p,
.statement-document-head h2,
.statement-document-head p {
    margin: 0;
}

.statement-hero h1 {
    font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.statement-hero p:not(.eyebrow),
.statement-document-head p,
.statement-meta-box span,
.statement-kpi-grid span,
.statement-mini-facts span,
.statement-card .panel-title-row > span {
    color: var(--muted);
}

.statement-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.statement-filter {
    margin-top: 0;
}

.statement-document {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.statement-document-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
    gap: 18px;
    align-items: start;
}

.statement-meta-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.statement-meta-box strong {
    margin-bottom: 6px;
}

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

.statement-kpi-grid article {
    display: grid;
    gap: 6px;
    padding: 14px;
    min-height: 104px;
}

.statement-kpi-grid strong {
    font-size: clamp(1.1rem, 1.7vw, 1.55rem);
}

.statement-danger {
    border-color: rgba(191, 65, 65, 0.28) !important;
    background: #fffafa !important;
}

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

.statement-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    overflow-x: auto;
}

.statement-aging-row,
.statement-mini-facts div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.statement-meter {
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: #edf1f5;
}

.statement-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
}

.statement-meter.accent span {
    background: #16a34a;
}

.statement-mini-facts {
    display: grid;
    gap: 8px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
    .statement-document-head,
    .statement-kpi-grid,
    .statement-insight-grid,
    .statement-table-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .statement-hero {
        display: grid;
    }

    .statement-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .statement-document-head,
    .statement-kpi-grid,
    .statement-insight-grid,
    .statement-table-grid {
        grid-template-columns: 1fr;
    }

    .statement-hero,
    .statement-document,
    .statement-card {
        padding: 14px;
    }

    .statement-actions .btn,
    .statement-actions a {
        flex: 1 1 150px;
    }
}

@media print {
    .statement-hero,
    .statement-filter {
        display: none !important;
    }

    .statement-document {
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .statement-document-head,
    .statement-insight-grid,
    .statement-table-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.customer-kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 16px;
}

@media (max-width: 980px) {
    .customer-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .customer-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.sms-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

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

@media (max-width: 980px) {
    .sms-kpi-grid,
    .sms-compose-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .sms-kpi-grid,
    .sms-compose-grid {
        grid-template-columns: 1fr;
    }
}

/* Inventory directory refinements */
.inventory-command-strip {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.inventory-command-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
}

.inventory-command-card.is-primary {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.inventory-command-card.is-warning {
    background: #fffbeb;
    border-color: rgba(180, 83, 9, .24);
}

.inventory-command-card span,
.inventory-command-card small {
    color: var(--muted);
    font-weight: 850;
}

.inventory-command-card.is-primary span,
.inventory-command-card.is-primary small {
    color: rgba(255,255,255,.78);
}

.inventory-command-card strong {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.05;
}

.inventory-toolbar {
    margin-top: 0;
}

.inventory-toolbar .operations-filters {
    align-items: end;
    gap: 12px;
}

.inventory-table-title {
    align-items: flex-start;
    margin-bottom: 2px;
    padding: 16px 16px 0;
}

.inventory-table-title > span {
    color: var(--muted);
    font-weight: 800;
}

.inventory-items-card table {
    min-width: 1120px;
}

@media (max-width: 1180px) {
    .inventory-command-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .inventory-command-strip {
        grid-template-columns: 1fr;
    }

    .inventory-command-card,
    .inventory-items-card {
        padding: 14px;
    }

    .inventory-table-title {
        padding: 0;
    }
}

.inventory-stat-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 16px;
}

.inventory-workspace {
    display: grid;
    gap: 16px;
}

.inventory-ledger-card,
.inventory-items-card {
    overflow: hidden;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.section-heading h2 {
    margin: 0;
    font-size: 1.05rem;
}

.stock-ok {
    color: #15803d;
}

.stock-warning {
    color: #b45309;
}

.stock-danger {
    color: #b91c1c;
}

@media (max-width: 1100px) {

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

@media (max-width: 640px) {

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

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading .btn {
        width: 100%;
    }
}
.employee-form-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
}

.employee-photo-panel {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.employee-photo-preview,
.employee-avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #e7edf3;
    color: #1f2937;
    font-weight: 900;
}

.employee-photo-preview {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    font-size: 3rem;
}

.employee-photo-preview img,
.employee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-list-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.employee-avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: .95rem;
}

@media (max-width: 760px) {
    .employee-form-grid {
        grid-template-columns: 1fr;
    }

    .employee-photo-preview {
        max-width: 220px;
    }
}
.pos-page {
    display: grid;
    gap: 18px;
}

.pos-head {
    align-items: end;
}

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

.pos-register-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .75fr);
    gap: 18px;
    align-items: start;
}

.pos-catalog-panel,
.pos-checkout-panel,
.pos-recent-card,
.pos-receipt {
    min-width: 0;
}

.pos-checkout-panel {
    position: sticky;
    top: 88px;
}

.pos-catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, .35fr);
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
}

.pos-category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 2px 10px;
    margin-bottom: 12px;
    scrollbar-width: thin;
}

.pos-category-tabs button,
.pos-quick-cash button {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    font-weight: 900;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease, color .18s ease;
}

.pos-category-tabs button {
    min-height: 38px;
    padding: 8px 13px;
    white-space: nowrap;
}

.pos-category-tabs button:hover,
.pos-quick-cash button:hover {
    border-color: rgba(24, 89, 98, .42);
    box-shadow: 0 8px 20px rgba(16, 47, 53, .08);
}

.pos-category-tabs button.is-active {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

.pos-product-card {
    display: grid;
    gap: 7px;
    min-height: 144px;
    padding: 13px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #f8fbfb 100%);
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(16, 47, 53, .03);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.pos-product-card:hover,
.pos-product-card:focus-visible {
    border-color: rgba(24, 89, 98, .45);
    box-shadow: 0 12px 26px rgba(16, 47, 53, .09);
    transform: translateY(-1px);
    outline: none;
}
.pos-product-card.is-unavailable,
.pos-product-card:disabled {
    cursor: not-allowed;
    opacity: .58;
    filter: grayscale(.18);
    transform: none;
}

.pos-product-card.is-unavailable:hover,
.pos-product-card:disabled:hover {
    border-color: var(--line);
    box-shadow: 0 1px 0 rgba(16, 47, 53, .03);
    transform: none;
}

.pos-product-card span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.pos-product-card strong {
    color: var(--ink);
    line-height: 1.25;
}

.pos-product-card small {
    color: var(--muted);
    line-height: 1.35;
}

.pos-product-card b {
    align-self: end;
    margin-top: auto;
    color: var(--brand-dark);
    font-size: 1.02rem;
}

.pos-cart {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.pos-cart-head,
.pos-cart-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 86px 102px 108px 78px;
    gap: 8px;
    align-items: center;
}

.pos-cart-head {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.pos-cart-row {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.pos-cart-row strong,
.pos-cart-row span {
    display: block;
    min-width: 0;
}

.pos-cart-row span {
    color: var(--muted);
    font-size: .78rem;
}

.pos-cart-row input {
    min-width: 0;
}

.pos-pay-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfb;
    margin: 14px 0;
}

.pos-total-line,
.receipt-totals > div,
.receipt-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.pos-total-line span,
.receipt-totals span,
.receipt-meta span {
    display: block;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.pos-total-line strong {
    font-size: 1.08rem;
}

.pos-grand {
    background: #eef7f6;
    border-color: rgba(24, 89, 98, .18);
}

.pos-grand strong {
    color: var(--brand-dark);
    font-size: 1.45rem;
}

.pos-quick-cash {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pos-quick-cash button {
    min-height: 40px;
    padding: 8px;
}

.pos-actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 10px;
}

.pos-actions .btn {
    width: 100%;
}

.receipt-brand {
    margin-bottom: 16px;
    text-align: center;
}

.receipt-brand h2 {
    margin: 0;
}

.receipt-meta,
.receipt-totals {
    display: grid;
    gap: 10px;
}

.receipt-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.receipt-totals {
    max-width: 360px;
    margin: 18px 0 0 auto;
}

.compact-empty {
    padding: 16px;
}

@media (max-width: 1180px) {
    .pos-register-layout {
        grid-template-columns: 1fr;
    }

    .pos-checkout-panel {
        position: static;
    }
}

@media (max-width: 980px) {
    .pos-stat-grid,
    .receipt-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .pos-catalog-toolbar,
    .pos-stat-grid,
    .receipt-meta {
        grid-template-columns: 1fr;
    }

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

    .pos-product-card {
        min-height: 136px;
        padding: 11px;
    }

    .pos-cart-head {
        display: none;
    }

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

    .pos-cart-row > div,
    .pos-cart-row > strong,
    .pos-cart-row button {
        grid-column: span 2;
    }

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

    .pos-actions {
        grid-template-columns: 1fr;
    }

    .receipt-totals {
        max-width: none;
    }
}

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

.inventory-form-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.inventory-image-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.inventory-image-preview,
.inventory-thumb,
.pos-product-image {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #e7edf3;
    color: #1f2937;
    font-weight: 900;
}

.inventory-image-preview {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    font-size: 2rem;
}

.inventory-image-preview img,
.inventory-thumb img,
.pos-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}




.quick-stock-current {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 78px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.quick-stock-current span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.quick-stock-current strong {
    font-size: 1.25rem;
}

.quick-stock-form [hidden] {
    display: none !important;
}

.inventory-current-stock-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.inventory-current-stock-panel span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.inventory-current-stock-panel strong {
    margin-right: auto;
    font-size: 1.15rem;
}.inventory-simple-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.inventory-section-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.inventory-section-title > span {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: .82rem;
    font-weight: 900;
}

.inventory-section-title h2,
.inventory-section-title p {
    margin: 0;
}

.inventory-section-title h2 {
    font-size: 1rem;
}

.inventory-section-title p {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.45;
}

.compact-number-field {
    max-width: 420px;
}.inventory-pos-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin: 14px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfb;
}

.inventory-pos-toggle input {
    margin-top: 4px;
}

.inventory-pos-toggle strong,
.inventory-pos-toggle small {
    display: block;
}

.inventory-pos-toggle small {
    color: var(--muted);
    line-height: 1.45;
}

.inventory-item-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.inventory-thumb {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    font-size: 1rem;
}

.pos-product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 7px;
    margin-bottom: 2px;
    font-style: normal;
}

.pos-product-image em {
    font-style: normal;
    font-size: 1.8rem;
}

.pos-product-card .pos-product-category {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .inventory-form-grid {
        grid-template-columns: 1fr;
    }

    .inventory-image-preview {
        max-width: 260px;
    }
}

.inventory-opening-stock.is-focused-stock {
    border-color: rgba(24, 89, 98, .35);
    box-shadow: 0 12px 28px rgba(24, 89, 98, .12);
}.inventory-opening-stock {
    display: grid;
    gap: 12px;
    margin: 14px 0;
    padding: 14px;
    border: 1px solid rgba(24, 89, 98, .18);
    border-radius: 8px;
    background: #f4faf9;
}

.inventory-opening-stock h2,
.inventory-opening-stock p {
    margin: 0;
}

.inventory-opening-stock h2 {
    font-size: 1.02rem;
}

.inventory-opening-stock p:not(.eyebrow) {
    color: var(--muted);
}
.premium-pos-receipt {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px;
}

.receipt-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}

.receipt-hero h2 {
    margin: 2px 0 4px;
    font-size: 1.8rem;
}

.receipt-hero span,
.pos-receipt-footer span {
    color: var(--muted);
}

.receipt-status {
    display: grid;
    gap: 4px;
    min-width: 180px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
    text-align: right;
}

.receipt-status span {
    font-weight: 900;
    text-transform: uppercase;
    font-size: .75rem;
}

.receipt-status strong {
    font-size: 1.45rem;
}

.receipt-status.is-paid {
    border-color: rgba(21, 128, 61, .22);
    background: #f0fdf4;
    color: #166534;
}

.receipt-status.is-pending {
    border-color: rgba(180, 83, 9, .24);
    background: #fffbeb;
    color: #92400e;
}

.receipt-lines table {
    margin-top: 8px;
}

.receipt-lines td strong {
    color: var(--ink);
}

.premium-receipt-totals {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: none;
}

.pos-receipt-footer {
    display: grid;
    gap: 4px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    text-align: center;
}

@media (max-width: 760px) {
    .receipt-hero {
        flex-direction: column;
    }

    .receipt-status {
        width: 100%;
        text-align: left;
    }

    .premium-receipt-totals {
        grid-template-columns: 1fr;
    }
}

@media print {
    .premium-pos-receipt {
        box-shadow: none !important;
        border: 0 !important;
        max-width: 100%;
        padding: 0;
    }

    .receipt-status,
    .receipt-totals > div,
    .receipt-meta > div {
        break-inside: avoid;
    }
}
/* Clean POS receipt */
.clean-pos-receipt {
    width: min(100%, 760px);
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.receipt-clean-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: start;
    padding-bottom: 22px;
    border-bottom: 2px solid #111827;
}

.receipt-business {
    display: grid;
    gap: 4px;
}

.receipt-business h2 {
    margin: 0;
    color: #111827;
    font-size: 1.65rem;
    line-height: 1.1;
}

.receipt-business span,
.receipt-summary-card small,
.clean-receipt-footer span {
    color: #64748b;
    font-size: .9rem;
}

.receipt-kicker {
    margin: 0 0 4px;
    color: #185962;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.receipt-summary-card {
    min-width: 178px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-align: right;
}

.receipt-summary-card span {
    display: block;
    margin-bottom: 4px;
    color: #15803d;
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.receipt-summary-card strong {
    display: block;
    color: #111827;
    font-size: 1.45rem;
    line-height: 1.15;
}

.receipt-summary-card.is-pending span {
    color: #b45309;
}

.receipt-clean-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 28px;
    padding: 22px 0;
    border-bottom: 1px solid #e5e7eb;
}

.receipt-clean-meta div {
    min-width: 0;
}

.receipt-clean-meta span,
.receipt-note-box span,
.receipt-clean-totals span {
    display: block;
    margin-bottom: 3px;
    color: #64748b;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.receipt-clean-meta strong {
    color: #111827;
    font-size: .96rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.receipt-items-card {
    margin-top: 20px;
    overflow-x: auto;
}

.receipt-items-table {
    width: 100%;
    border-collapse: collapse;
}

.receipt-items-table th {
    padding: 0 0 10px;
    color: #64748b;
    border-bottom: 1px solid #e5e7eb;
    font-size: .75rem;
    text-align: right;
    text-transform: uppercase;
}

.receipt-items-table th:first-child,
.receipt-items-table td:first-child {
    text-align: left;
}

.receipt-items-table td {
    padding: 14px 0;
    border-bottom: 1px solid #eef2f7;
    color: #111827;
    text-align: right;
    vertical-align: top;
}

.receipt-items-table td strong {
    display: block;
    color: #111827;
    font-weight: 800;
}

.receipt-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
    gap: 28px;
    align-items: start;
    margin-top: 22px;
}

.receipt-note-box {
    padding-top: 6px;
}

.receipt-note-box p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.receipt-clean-totals {
    display: grid;
    gap: 8px;
}

.receipt-clean-totals div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: baseline;
    color: #111827;
}

.receipt-clean-totals strong {
    white-space: nowrap;
}

.receipt-clean-totals .is-total {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 2px solid #111827;
}

.receipt-clean-totals .is-total span,
.receipt-clean-totals .is-total strong {
    color: #111827;
    font-size: 1.15rem;
}

.clean-receipt-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

@media (max-width: 720px) {
    .clean-pos-receipt {
        padding: 20px;
    }

    .receipt-clean-header,
    .receipt-bottom-grid {
        grid-template-columns: 1fr;
    }

    .receipt-summary-card {
        width: 100%;
        text-align: left;
    }

    .receipt-clean-meta {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media print {
    .clean-pos-receipt {
        width: 100%;
        max-width: 720px;
        margin: 0 auto;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .receipt-clean-header {
        border-bottom-color: #111;
    }

    .receipt-items-card {
        overflow: visible;
    }
}
/* Professional reports upgrade */
.reports-pro-page {
    gap: 18px;
}

.reports-pro-hero {
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbfb 55%, #eef7f6 100%);
    border-color: rgba(24, 89, 98, .16);
}

.reports-pro-hero h1 {
    letter-spacing: 0;
}

.reports-pro-toolbar .invoice-filters {
    align-items: end;
}

.reports-command-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr 1fr;
    gap: 14px;
}

.reports-command-card,
.reports-insight-strip article {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.reports-command-card.is-primary {
    background: #102f35;
    color: #fff;
    border-color: #102f35;
}

.reports-command-card.is-warning {
    border-color: rgba(180, 83, 9, .24);
    background: #fffbeb;
}

.reports-command-card span,
.reports-command-card small,
.reports-insight-strip span {
    color: var(--muted);
    font-weight: 850;
}

.reports-command-card.is-primary span,
.reports-command-card.is-primary small {
    color: rgba(255, 255, 255, .76);
}

.reports-command-card strong {
    font-size: clamp(1.45rem, 2.6vw, 2.35rem);
    line-height: 1.02;
}

.reports-command-card .delta.up {
    color: #15803d;
}

.reports-command-card .delta.down {
    color: #b91c1c;
}

.reports-command-card.is-primary .delta.up,
.reports-command-card.is-primary .delta.down,
.reports-command-card.is-primary .delta.flat {
    color: rgba(255, 255, 255, .82);
}

.reports-pro-kpis .reports-kpi {
    min-height: 118px;
}

.reports-insight-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.reports-insight-strip article {
    min-height: auto;
    padding: 14px 16px;
}

.reports-insight-strip strong {
    color: var(--ink);
    font-size: 1.15rem;
}

.reports-pro-chart-card {
    min-height: 340px;
    overflow: hidden;
}

.reports-pro-chart-card canvas {
    background: linear-gradient(180deg, #fff 0%, #fbfdfe 100%);
    border-radius: 8px;
}

.reports-pro-table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.reports-pro-table-grid .reports-table-wide {
    grid-column: span 2;
}

.reports-panel table td span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .78rem;
}

.badge-success {
    color: #166534;
    background: #dcfce7;
    border-color: rgba(22, 101, 52, .18);
}

.badge-warning {
    color: #92400e;
    background: #fef3c7;
    border-color: rgba(146, 64, 14, .18);
}

.badge-danger {
    color: #991b1b;
    background: #fee2e2;
    border-color: rgba(153, 27, 27, .18);
}

@media (max-width: 1180px) {
    .reports-command-grid,
    .reports-insight-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reports-pro-table-grid {
        grid-template-columns: 1fr;
    }

    .reports-pro-table-grid .reports-table-wide {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .reports-command-grid,
    .reports-insight-strip {
        grid-template-columns: 1fr;
    }

    .reports-pro-hero {
        align-items: flex-start;
    }

    .reports-pro-chart-card {
        min-height: 310px;
        padding: 14px;
    }

    .reports-pro-chart-card canvas {
        min-height: 240px;
    }
}

@media print {
    .reports-command-grid,
    .reports-pro-kpis,
    .reports-insight-strip,
    .reports-pro-chart-grid,
    .reports-pro-table-grid {
        break-inside: avoid;
    }

    .reports-pro-chart-card,
    .reports-command-card,
    .reports-insight-strip article {
        box-shadow: none;
    }
}



/* Audit directory refinements */
.audit-page {
    display: grid;
    gap: 16px;
}

.audit-command-strip {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.audit-command-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
}

.audit-command-card.is-primary {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.audit-command-card.is-warning {
    background: #fffbeb;
    border-color: rgba(180, 83, 9, .24);
}

.audit-command-card span,
.audit-command-card small {
    color: var(--muted);
    font-weight: 850;
}

.audit-command-card.is-primary span,
.audit-command-card.is-primary small {
    color: rgba(255,255,255,.78);
}

.audit-command-card strong {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.05;
}

.audit-toolbar {
    margin-top: 0;
}

.audit-toolbar .operations-filters {
    align-items: end;
    gap: 12px;
}

.audit-table-card {
    display: grid;
    gap: 14px;
}

.audit-table-title {
    align-items: flex-start;
    margin-bottom: 2px;
}

.audit-table-title > span {
    color: var(--muted);
    font-weight: 800;
}

.audit-table-card table {
    min-width: 1120px;
}

.audit-change-preview {
    display: -webkit-box;
    max-width: 460px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

@media (max-width: 1180px) {
    .audit-command-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .audit-command-strip {
        grid-template-columns: 1fr;
    }

    .audit-command-card,
    .audit-table-card {
        padding: 14px;
    }
}

/* Discount directory refinements */
.discounts-page {
    display: grid;
    gap: 16px;
}

.discount-command-strip {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.discount-command-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
}

.discount-command-card.is-primary {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.discount-command-card.is-warning {
    background: #fffbeb;
    border-color: rgba(180, 83, 9, .24);
}

.discount-command-card span,
.discount-command-card small {
    color: var(--muted);
    font-weight: 850;
}

.discount-command-card.is-primary span,
.discount-command-card.is-primary small {
    color: rgba(255,255,255,.78);
}

.discount-command-card strong {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.05;
}

.discount-form-card {
    min-width: 0;
}

.discounts-toolbar {
    margin-top: 0;
}

.discounts-toolbar .operations-filters {
    align-items: end;
    gap: 12px;
}

.discounts-table-card {
    display: grid;
    gap: 14px;
}

.discounts-table-title {
    align-items: flex-start;
    margin-bottom: 2px;
}

.discounts-table-title > span {
    color: var(--muted);
    font-weight: 800;
}

.discounts-table-card table {
    min-width: 980px;
}

@media (max-width: 1180px) {
    .discount-command-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .discount-command-strip {
        grid-template-columns: 1fr;
    }

    .discount-command-card,
    .discounts-table-card,
    .discount-form-card {
        padding: 14px;
    }
}

/* SMS directory refinements */
.sms-admin-page {
    display: grid;
    gap: 16px;
}

.sms-command-strip {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.sms-command-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
}

.sms-command-card.is-primary {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.sms-command-card.is-warning {
    background: #fffbeb;
    border-color: rgba(180, 83, 9, .24);
}

.sms-command-card span,
.sms-command-card small {
    color: var(--muted);
    font-weight: 850;
}

.sms-command-card.is-primary span,
.sms-command-card.is-primary small {
    color: rgba(255,255,255,.78);
}

.sms-command-card strong {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.05;
}

.sms-compose-card {
    min-width: 0;
}

.sms-table-card {
    display: grid;
    gap: 14px;
}

.sms-table-title {
    align-items: flex-start;
    margin-bottom: 2px;
}

.sms-table-title > span {
    color: var(--muted);
    font-weight: 800;
}

.sms-mini-filter {
    align-items: end;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    margin: 0;
    padding: 12px;
}

.sms-table-card table {
    min-width: 1080px;
}

.sms-message-preview {
    display: -webkit-box;
    max-width: 380px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.settings-toggle {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    padding: 12px;
}

.settings-toggle input {
    margin-top: 4px;
}

.settings-toggle strong,
.settings-toggle small {
    display: block;
}

.settings-toggle small {
    color: var(--muted);
    margin-top: 3px;
}

@media (max-width: 1180px) {
    .sms-command-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .sms-command-strip {
        grid-template-columns: 1fr;
    }

    .sms-command-card,
    .sms-table-card {
        padding: 14px;
    }
}

/* Users directory refinements */
.users-page {
    display: grid;
    gap: 16px;
}

.user-command-strip {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.user-command-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
}

.user-command-card.is-primary {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.user-command-card.is-warning {
    background: #fffbeb;
    border-color: rgba(180, 83, 9, .24);
}

.user-command-card span,
.user-command-card small {
    color: var(--muted);
    font-weight: 850;
}

.user-command-card.is-primary span,
.user-command-card.is-primary small {
    color: rgba(255,255,255,.78);
}

.user-command-card strong {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.05;
}

.users-toolbar {
    margin-top: 0;
}

.users-toolbar .invoice-filters {
    align-items: end;
    gap: 12px;
}

.users-table-card {
    display: grid;
    gap: 14px;
}

.users-table-title {
    align-items: flex-start;
    margin-bottom: 2px;
}

.users-table-title > span {
    color: var(--muted);
    font-weight: 800;
}

.users-table-card table {
    min-width: 980px;
}

@media (max-width: 1180px) {
    .user-command-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .user-command-strip {
        grid-template-columns: 1fr;
    }

    .user-command-card,
    .users-table-card {
        padding: 14px;
    }
}

/* Employees directory refinements */
.employees-page {
    display: grid;
    gap: 16px;
}

.employee-command-strip {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.employee-command-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
}

.employee-command-card.is-primary {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.employee-command-card.is-warning {
    background: #fffbeb;
    border-color: rgba(180, 83, 9, .24);
}

.employee-command-card span,
.employee-command-card small {
    color: var(--muted);
    font-weight: 850;
}

.employee-command-card.is-primary span,
.employee-command-card.is-primary small {
    color: rgba(255,255,255,.78);
}

.employee-command-card strong {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.05;
}

.employees-toolbar {
    margin-top: 0;
}

.employees-toolbar .operations-filters {
    align-items: end;
    gap: 12px;
}

.employees-table-card {
    display: grid;
    gap: 14px;
}

.employees-table-title {
    align-items: flex-start;
    margin-bottom: 2px;
}

.employees-table-title > span {
    color: var(--muted);
    font-weight: 800;
}

.employees-table-card table {
    min-width: 980px;
}

@media (max-width: 1180px) {
    .employee-command-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .employee-command-strip {
        grid-template-columns: 1fr;
    }

    .employee-command-card,
    .employees-table-card {
        padding: 14px;
    }
}

/* Training directory refinements */
.training-admin-page {
    display: grid;
    gap: 16px;
}

.training-command-strip {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.training-command-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
}

.training-command-card.is-primary {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.training-command-card.is-warning {
    background: #fffbeb;
    border-color: rgba(180, 83, 9, .24);
}

.training-command-card span,
.training-command-card small {
    color: var(--muted);
    font-weight: 850;
}

.training-command-card.is-primary span,
.training-command-card.is-primary small {
    color: rgba(255,255,255,.78);
}

.training-command-card strong {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.05;
}

.training-toolbar {
    margin-top: 0;
}

.training-toolbar .operations-filters {
    align-items: end;
    gap: 12px;
}

.training-table-card {
    display: grid;
    gap: 14px;
}

.training-table-title {
    align-items: flex-start;
    margin-bottom: 2px;
}

.training-table-title > span {
    color: var(--muted);
    font-weight: 800;
}

.training-table-card table {
    min-width: 920px;
}

@media (max-width: 1180px) {
    .training-command-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .training-command-strip {
        grid-template-columns: 1fr;
    }

    .training-command-card,
    .training-table-card {
        padding: 14px;
    }
}

/* Payment directory refinements */
.payment-command-strip {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.payment-command-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
}

.payment-command-card.is-primary {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.payment-command-card.is-warning {
    background: #fffbeb;
    border-color: rgba(180, 83, 9, .24);
}

.payment-command-card span,
.payment-command-card small {
    color: var(--muted);
    font-weight: 850;
}

.payment-command-card.is-primary span,
.payment-command-card.is-primary small {
    color: rgba(255,255,255,.78);
}

.payment-command-card strong {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.05;
}

.payment-toolbar {
    margin-top: 0;
}

.payment-toolbar .invoice-filters {
    align-items: end;
    gap: 12px;
}

.payments-table-card {
    display: grid;
    gap: 14px;
}

.payment-table-title {
    align-items: flex-start;
    margin-bottom: 2px;
}

.payment-table-title > span {
    color: var(--muted);
    font-weight: 800;
}

.payments-table-card table {
    min-width: 980px;
}

@media (max-width: 1180px) {
    .payment-command-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .payment-command-strip {
        grid-template-columns: 1fr;
    }

    .payment-command-card,
    .payments-table-card {
        padding: 14px;
    }
}

/* Invoice directory refinements */
.invoices-page {
    display: grid;
    gap: 16px;
}

.invoice-command-strip {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.invoice-command-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
}

.invoice-command-card.is-primary {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.invoice-command-card.is-warning {
    background: #fffbeb;
    border-color: rgba(180, 83, 9, .24);
}

.invoice-command-card span,
.invoice-command-card small {
    color: var(--muted);
    font-weight: 850;
}

.invoice-command-card.is-primary span,
.invoice-command-card.is-primary small {
    color: rgba(255,255,255,.78);
}

.invoice-command-card strong {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.05;
}

.invoice-toolbar {
    margin-top: 0;
}

.invoice-toolbar .invoice-filters {
    align-items: end;
    gap: 12px;
}

.invoice-table-card {
    display: grid;
    gap: 14px;
}

.invoice-table-title {
    align-items: flex-start;
    margin-bottom: 2px;
}

.invoice-table-title > span {
    color: var(--muted);
    font-weight: 800;
}

.invoice-list table {
    min-width: 980px;
}

@media (max-width: 1180px) {
    .invoice-command-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .invoice-command-strip {
        grid-template-columns: 1fr;
    }

    .invoice-command-card,
    .invoice-table-card {
        padding: 14px;
    }
}
/* Reports command refinements */
.reports-system-insights {
    margin-top: 0;
}

.reports-system-insights article {
    gap: 8px;
    padding: 18px;
}

.reports-system-insights strong {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.05;
}

.reports-pro-toolbar .invoice-filters {
    gap: 12px;
}

.reports-pro-toolbar .btn {
    min-height: 42px;
}

.reports-panel {
    padding: 18px;
}

.reports-panel .panel-title-row {
    align-items: flex-start;
    margin-bottom: 10px;
}

.reports-panel .panel-title-row h2 {
    margin-top: 2px;
}

.reports-panel table {
    min-width: 680px;
}

.reports-table-wide table {
    min-width: 840px;
}

@media (max-width: 720px) {
    .reports-system-insights article,
    .reports-panel {
        padding: 14px;
    }
}
/* Customer command page */
.customers-page {
    display: grid;
    gap: 16px;
}

.customers-hero {
    align-items: flex-start;
}

.customer-command-strip,
.customers-insight-grid {
    display: grid;
    gap: 14px;
}

.customer-command-strip {
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
}

.customer-command-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
}

.customer-command-card.is-primary {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.customer-command-card.is-warning {
    background: #fffbeb;
    border-color: rgba(180, 83, 9, .24);
}

.customer-command-card span,
.customer-command-card small {
    color: var(--muted);
    font-weight: 850;
}

.customer-command-card.is-primary span,
.customer-command-card.is-primary small {
    color: rgba(255, 255, 255, .78);
}

.customer-command-card strong {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.04;
}

.customers-insight-grid {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

.customer-insight-card {
    display: grid;
    gap: 12px;
    margin-top: 0;
}

.customer-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.customer-chip-row span {
    align-items: center;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    gap: 8px;
    padding: 9px 12px;
    font-weight: 800;
}

.customer-chip-row strong {
    color: #102033;
}

.customer-mini-list {
    display: grid;
    gap: 8px;
}

.customer-mini-list a {
    align-items: center;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    color: inherit;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 11px 12px;
    text-decoration: none;
}

.customer-mini-list a:hover {
    border-color: rgba(24, 89, 98, .32);
    background: #fbfdfe;
}

.customer-mini-list span,
.customer-mini-list small {
    display: block;
}

.customer-mini-list small,
.customer-table-title > span {
    color: var(--muted);
    font-weight: 800;
}

.customer-toolbar {
    margin-top: 0;
}

.customer-search-field {
    min-width: min(420px, 100%);
}

.customer-table-card {
    display: grid;
    gap: 14px;
}

.customer-table-title {
    margin-bottom: 2px;
}

.text-danger {
    color: #b91c1c;
}

@media (max-width: 1180px) {
    .customer-command-strip,
    .customers-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .customer-command-strip,
    .customers-insight-grid {
        grid-template-columns: 1fr;
    }

    .customer-command-card,
    .customer-insight-card {
        padding: 14px;
    }

    .customer-mini-list a {
        align-items: flex-start;
        display: grid;
    }
}

/* Customer page refinements */
.customer-insight-card {
    gap: 18px;
    padding: 22px;
}

.customer-insight-card .panel-title-row {
    align-items: flex-start;
    padding-bottom: 8px;
}

.customer-insight-card .panel-title-row h2 {
    margin-top: 4px;
}

.customer-insight-card .panel-title-row span {
    color: var(--muted);
    display: block;
    font-weight: 750;
    margin-top: 7px;
}

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

.customer-chip-row span {
    align-items: start;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    min-height: 96px;
    padding: 16px;
}

.customer-chip-row strong {
    font-size: 1.65rem;
    line-height: 1;
}

.customer-chip-row small {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.customer-mini-list a {
    gap: 14px;
    padding: 14px;
}

.pagination-nav {
    align-items: center;
    border-top: 1px solid rgba(15, 23, 42, .08);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
}

.pagination-pages {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.pagination-pages a,
.pagination-pages span {
    align-items: center;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 8px;
    color: #102033;
    display: inline-flex;
    font-weight: 850;
    justify-content: center;
    min-height: 36px;
    min-width: 36px;
    padding: 0 10px;
    text-decoration: none;
}

.pagination-pages a.is-active {
    background: #102f35;
    border-color: #102f35;
    color: #fff;
}

.pagination-nav .is-disabled {
    opacity: .45;
    pointer-events: none;
}

@media (max-width: 1180px) {
    .customer-chip-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .customer-chip-row {
        grid-template-columns: 1fr;
    }

    .pagination-nav {
        align-items: stretch;
        display: grid;
    }
}
/* Dashboard command center upgrade */
.dashboard-command-strip {
    display: grid;
    grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-command-card {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.dashboard-command-card.is-primary {
    color: #fff;
    background: #102f35;
    border-color: #102f35;
}

.dashboard-command-card.is-warning {
    background: #fffbeb;
    border-color: rgba(180, 83, 9, .24);
}

.dashboard-command-card span,
.dashboard-command-card small {
    color: var(--muted);
    font-weight: 850;
}

.dashboard-command-card.is-primary span,
.dashboard-command-card.is-primary small {
    color: rgba(255, 255, 255, .78);
}

.dashboard-command-card strong {
    font-size: clamp(1.4rem, 2.4vw, 2.2rem);
    line-height: 1.03;
}

.dashboard-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr);
    gap: 16px;
}

.dashboard-chart-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    margin-top: 0;
    padding: 18px;
}

.dashboard-chart-card canvas {
    display: block;
    width: 100%;
    min-height: 260px;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #fbfdfe 100%);
}

.dashboard-chart-card .panel-title-row > span {
    color: var(--muted);
    font-weight: 800;
}

@media (max-width: 1180px) {
    .dashboard-command-strip,
    .dashboard-analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-chart-wide {
        grid-column: span 2;
    }
}

@media (max-width: 720px) {
    .dashboard-command-strip,
    .dashboard-analytics-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-chart-wide {
        grid-column: auto;
    }

    .dashboard-command-card,
    .dashboard-chart-card {
        padding: 14px;
    }
}

.dashboard-system-panel {
    display: grid;
    gap: 14px;
    margin-top: 0;
}

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

.dashboard-module-card,
.dashboard-snapshot-strip article {
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 8px;
    background: #fff;
    min-width: 0;
}

.dashboard-module-card {
    color: inherit;
    display: grid;
    gap: 6px;
    min-height: 118px;
    padding: 14px;
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dashboard-module-card:hover,
.dashboard-module-card:focus-visible {
    border-color: rgba(24, 89, 98, 0.34);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.dashboard-module-card span,
.dashboard-module-card small,
.dashboard-snapshot-strip span,
.dashboard-snapshot-strip small {
    color: var(--muted);
    font-weight: 850;
}

.dashboard-module-card strong {
    color: #102033;
    font-size: clamp(1.25rem, 2vw, 1.85rem);
    line-height: 1.05;
}

.dashboard-system-grid {
    align-items: start;
}

.dashboard-snapshot-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-snapshot-strip article {
    display: grid;
    gap: 6px;
    padding: 16px;
}

.dashboard-snapshot-strip strong {
    color: #102033;
    font-size: 1.45rem;
    line-height: 1.1;
}

@media (max-width: 1180px) {
    .dashboard-module-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 720px) {
    .dashboard-module-grid,
    .dashboard-snapshot-strip {
        grid-template-columns: 1fr;
    }

    .dashboard-module-card,
    .dashboard-snapshot-strip article {
        min-height: auto;
        padding: 14px;
    }
}
/* Standalone POS terminal */
.pos-kiosk-body {
    overflow: hidden;
    background: #0f1720;
}

.pos-kiosk-body .hub-layout {
    display: block;
    min-height: 100vh;
}

.pos-kiosk-main {
    min-height: 100vh;
    background: #eef3f4;
}

.pos-kiosk-page {
    height: 100vh;
    padding: 14px;
    gap: 14px;
    overflow: hidden;
}

.pos-kiosk-header {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(360px, 1.2fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 8px;
    background: #102f35;
    color: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
}

.pos-kiosk-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pos-kiosk-brand > span {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: #f4c26b;
    font-weight: 950;
}

.pos-kiosk-brand h1,
.pos-kiosk-brand p,
.pos-kiosk-brand small {
    margin: 0;
}


.pos-title-refresh {
    color: inherit;
    text-decoration: none;
}

.pos-title-refresh:hover,
.pos-title-refresh:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
}.pos-kiosk-brand h1 {
    font-size: clamp(1.45rem, 2vw, 2.1rem);
    line-height: 1;
}

.pos-kiosk-brand small,
.pos-kiosk-header .eyebrow {
    color: rgba(255, 255, 255, .7);
}

.pos-kiosk-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pos-kiosk-stats article {
    display: grid;
    gap: 4px;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
}

.pos-kiosk-stats span {
    color: rgba(255, 255, 255, .68);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.pos-kiosk-stats strong {
    color: #fff;
    font-size: 1.06rem;
    line-height: 1.1;
}

.pos-kiosk-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.pos-kiosk-header .btn {
    white-space: nowrap;
}

.pos-kiosk-page .pos-register-layout {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 18px var(--pos-checkout-width, 500px);
    gap: 14px;
    min-height: 0;
    height: 100%;
}


.pos-splitter {
    position: relative;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(24, 89, 98, .18);
    transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
    touch-action: none;
    outline: none;
}

.pos-splitter::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: rgba(255, 255, 255, .72);
}

.pos-splitter-grip {
    position: relative;
    z-index: 1;
    width: 5px;
    height: 48px;
    border-radius: 999px;
    background: repeating-linear-gradient(to bottom, #185962, #185962 4px, transparent 4px, transparent 8px);
    opacity: .8;
}

.pos-splitter:hover,
.pos-splitter:focus-visible,
.pos-resizing .pos-splitter {
    background: rgba(24, 89, 98, .4);
    box-shadow: 0 0 0 4px rgba(24, 89, 98, .12);
}

.pos-splitter:hover .pos-splitter-grip,
.pos-splitter:focus-visible .pos-splitter-grip,
.pos-resizing .pos-splitter-grip {
    opacity: 1;
}

.pos-splitter-vertical {
    cursor: col-resize;
    min-height: 0;
    margin: 0 -4px;
    width: 26px;
}

.pos-splitter-horizontal {
    cursor: row-resize;
    min-width: 0;
}

.pos-splitter-horizontal .pos-splitter-grip {
    width: 64px;
    height: 5px;
    background: repeating-linear-gradient(to right, #185962, #185962 4px, transparent 4px, transparent 8px);
}

.pos-resizing,
.pos-resizing * {
    user-select: none !important;
}

.pos-kiosk-catalog,
.pos-kiosk-checkout {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}

.pos-kiosk-catalog {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 0;
    padding: 14px;
    overflow: hidden;
}

.pos-kiosk-catalog .pos-catalog-toolbar {
    grid-template-columns: minmax(320px, 1fr) minmax(220px, .32fr);
    margin-bottom: 10px;
}

.pos-kiosk-catalog .pos-catalog-toolbar input,
.pos-kiosk-catalog .pos-catalog-toolbar select,
.pos-kiosk-checkout input,
.pos-kiosk-checkout select,
.pos-kiosk-checkout textarea {
    min-height: 46px;
    font-size: .98rem;
}

.pos-kiosk-catalog .pos-category-tabs {
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.pos-kiosk-catalog .pos-category-tabs button {
    min-height: 44px;
    padding: 9px 16px;
}

.pos-kiosk-catalog .pos-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    align-content: start;
    min-height: 0;
    overflow: auto;
    padding: 2px 4px 12px 2px;
    scrollbar-width: thin;
}

.pos-kiosk-catalog .pos-product-card {
    min-height: 210px;
    padding: 12px;
    background: #fff;
}

.pos-kiosk-catalog .pos-product-image {
    aspect-ratio: 16 / 10;
    background: #edf3f4;
}

.pos-kiosk-catalog .pos-product-card strong {
    font-size: 1rem;
}

.pos-kiosk-catalog .pos-product-card b {
    font-size: 1.12rem;
}

.pos-kiosk-checkout {
    position: relative;
    top: auto;
    align-self: stretch;
    display: grid;
    grid-template-rows: auto auto minmax(130px, 1fr) auto auto auto;
    gap: 10px;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.pos-kiosk-checkout .panel-title-row h2 {
    font-size: 1.25rem;
}
.pos-sale-title-row {
    gap: 12px;
}

.pos-sale-title-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.pos-kiosk-checkout .pos-cart {
    min-height: 0;
    margin: 0;
    overflow: hidden;
}

.pos-kiosk-checkout .pos-cart-rows {
    display: grid;
    gap: 8px;
    min-height: 0;
    max-height: clamp(140px, 28vh, 340px);
    overflow: auto;
    padding-right: 2px;
}

.pos-kiosk-checkout .pos-cart-head,
.pos-kiosk-checkout .pos-cart-row {
    grid-template-columns: minmax(150px, 1fr) 74px 90px 96px 86px;
}

.pos-cart-remove {
    min-width: 74px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(185, 28, 28, .22);
    border-radius: 8px;
    background: #fff1f2;
    color: #b91c1c;
    font-size: .78rem;
    font-weight: 900;
    cursor: pointer;
}

.pos-cart-remove:hover,
.pos-cart-remove:focus-visible {
    background: #ffe4e6;
    border-color: rgba(185, 28, 28, .42);
}

.pos-kiosk-checkout .pos-cart-row {
    padding: 8px;
}

.pos-kiosk-checkout .pos-pay-card {
    margin: 0;
    padding: 10px;
    background: #f7fafb;
}
.pos-discount-hint {
    min-height: 18px;
    display: block;
    color: #185962;
    font-size: .78rem;
    font-weight: 700;
}

.pos-kiosk-checkout .pos-total-line {
    padding: 10px 12px;
}

.pos-kiosk-checkout .pos-grand strong {
    font-size: 1.75rem;
}

.pos-kiosk-checkout .pos-actions {
    grid-template-columns: .8fr 1.5fr;
}

.pos-kiosk-checkout .pos-actions .btn {
    min-height: 50px;
    font-size: 1rem;
}

.pos-kiosk-recent {
    max-height: 26vh;
    overflow: auto;
    border-radius: 8px;
    background: #fff;
}

@media (max-width: 1180px) {
    .pos-splitter {
        display: none;
    }

    .pos-kiosk-body {
        overflow: auto;
    }

    .pos-kiosk-page {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .pos-kiosk-header,
    .pos-kiosk-page .pos-register-layout {
        grid-template-columns: 1fr;
    }

    .pos-kiosk-checkout {
        position: static;
        max-height: none;
        overflow: visible;
    }
.pos-kiosk-checkout .pos-cart-rows {
        max-height: none;
    }
}

@media (max-width: 760px) {
    .pos-kiosk-page {
        padding: 10px;
    }

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

    .pos-kiosk-actions {
        justify-content: stretch;
    }

    .pos-kiosk-actions .btn {
        flex: 1;
    }

    .pos-kiosk-catalog .pos-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-kiosk-catalog .pos-product-card {
        min-height: 170px;
    }
}

@media (max-width: 520px) {
    .pos-kiosk-stats,
    .pos-kiosk-catalog .pos-catalog-toolbar,
    .pos-kiosk-catalog .pos-product-grid {
        grid-template-columns: 1fr;
    }
}

/* Larger POS item cards for touch-first selling */
.pos-kiosk-catalog .pos-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    padding-right: 4px;
}

.pos-kiosk-catalog .pos-product-card {
    min-height: 292px;
    padding: 14px;
    gap: 10px;
    border-color: rgba(15, 23, 42, .1);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.pos-kiosk-catalog .pos-product-image {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
}

.pos-kiosk-catalog .pos-product-card .pos-product-category {
    width: max-content;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef6f4;
    color: var(--brand-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-kiosk-catalog .pos-product-card strong {
    font-size: 1.08rem;
    line-height: 1.2;
    min-height: 2.4em;
}

.pos-product-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
}

.pos-product-meta small {
    min-width: 0;
    font-size: .82rem;
    font-weight: 800;
}

.pos-product-meta small:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-kiosk-catalog .pos-product-card b {
    display: block;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 1.28rem;
    line-height: 1.1;
}

@media (max-width: 900px) {
    .pos-kiosk-catalog .pos-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-kiosk-catalog .pos-product-card {
        min-height: 240px;
    }
}
/* POS kiosk layout corrections */
.pos-kiosk-page {
    display: grid;
    grid-template-rows: auto minmax(430px, 1fr) 12px clamp(190px, var(--pos-recent-height, 30vh), 34vh);
}

.pos-kiosk-page .pos-register-layout {
    height: 100%;
    min-height: 0;
}

.pos-kiosk-recent {
    max-height: none;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.pos-kiosk-recent table {
    min-width: 960px;
}

.pos-kiosk-recent .panel-title-row {
    position: sticky;
    top: 0;
    z-index: 2;
    align-items: center;
    background: #fff;
    margin: -2px -2px 10px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--line);
}

.pos-kiosk-recent .panel-title-row h2 {
    font-size: 1.08rem;
}

@media (max-width: 1180px) {
    .pos-kiosk-page {
        display: grid;
        grid-template-rows: none;
    }
}

























@media (min-width: 981px) {
    body.hub-nav-open {
        overflow: auto;
    }

    .hub-layout {
        grid-template-columns: 260px minmax(0, 1fr) !important;
    }

    .hub-sidebar {
        position: sticky !important;
        inset: auto !important;
        width: 260px !important;
        max-width: 260px !important;
        height: 100vh;
        transform: none !important;
    }

    .hub-sidebar-backdrop {
        display: none !important;
    }
}



/* Hub shell hardening: keep backdrop out of grid layout */
.hub-layout > .hub-sidebar {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

.hub-layout > .hub-main {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

.hub-layout > .hub-sidebar-backdrop {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 15;
    display: none !important;
}

@media (max-width: 980px) {
    .hub-layout > .hub-sidebar,
    .hub-layout > .hub-main {
        grid-column: 1 !important;
    }

    body.hub-nav-open .hub-layout > .hub-sidebar-backdrop:not([hidden]) {
        display: block !important;
    }
}

/* Customization builder */
.customization-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.customization-builder-panel,
.customization-services-panel {
    min-width: 0;
}

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

.customization-product-grid {
    display: grid;
    gap: 12px;
    max-height: 580px;
    overflow: auto;
    padding-right: 4px;
}

.customization-product-card {
    appearance: none;
    border: 1px solid rgba(12, 74, 82, 0.14);
    background: #ffffff;
    border-radius: 8px;
    padding: 14px;
    text-align: left;
    display: grid;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.customization-product-card:hover,
.customization-product-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(18, 131, 140, 0.38);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
    outline: none;
}

.customization-product-card span {
    color: #0f7f83;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.customization-product-card strong {
    color: #102033;
    font-size: 1rem;
}

.customization-product-card small {
    color: #64748b;
}

.customization-total-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(18, 131, 140, 0.12), rgba(250, 204, 21, 0.14));
    border: 1px solid rgba(18, 131, 140, 0.16);
}

.customization-total-card strong {
    display: block;
    color: #102033;
    font-size: 1.7rem;
    line-height: 1.1;
}

.catalog-table-wrap {
    margin-top: 18px;
}

@media (max-width: 1180px) {
    .customization-layout {
        grid-template-columns: 1fr;
    }

    .customization-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }
}

@media (max-width: 760px) {
    .four-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customization-product-grid {
        grid-template-columns: 1fr;
    }

    .customization-total-card {
        align-items: stretch;
        flex-direction: column;
    }

    .customization-total-card .btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .four-column {
        grid-template-columns: 1fr;
    }
}

/* Premium invoice builders */
.premium-builder-page .hub-page-head {
    align-items: flex-start;
}

.premium-builder-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 18px;
    align-items: start;
}

.premium-builder-main,
.premium-builder-summary {
    min-width: 0;
}

.premium-builder-summary {
    position: sticky;
    top: 88px;
}

.builder-meta-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.builder-meta-strip div {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #f8fafc;
    padding: 12px;
}

.builder-meta-strip span,
.builder-group-heading span,
.premium-total-list span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.builder-meta-strip strong {
    color: #102033;
    display: block;
    font-size: 0.95rem;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.compact-builder-form {
    margin-bottom: 18px;
}

.premium-builder-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.35fr);
    gap: 14px;
    margin: 16px 0;
}

.premium-catalog-stack {
    display: grid;
    gap: 18px;
}

.premium-catalog-group {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #fbfdfe;
    padding: 14px;
}

.builder-group-heading {
    align-items: start;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.builder-group-heading h3 {
    color: #102033;
    font-size: 1rem;
    margin: 0 0 4px;
}

.builder-group-heading p {
    margin: 0;
}

.premium-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.premium-service-card {
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    min-height: 156px;
    padding: 12px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.premium-service-card:hover,
.premium-service-card:focus-within,
.premium-service-card.is-selected {
    border-color: rgba(18, 131, 140, 0.42);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.premium-service-card.is-selected {
    background: linear-gradient(180deg, #ffffff, #f0fbfb);
}

.premium-service-card label,
.print-card-hit {
    align-items: start;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0;
    text-align: left;
    width: 100%;
}

.premium-service-card input[type='checkbox'] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.premium-service-card small {
    color: #0f7f83;
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.premium-service-card strong {
    color: #102033;
    display: block;
    font-size: 1rem;
    line-height: 1.25;
}

.premium-service-card em {
    color: #64748b;
    display: block;
    font-size: 0.86rem;
    font-style: normal;
    line-height: 1.35;
    margin-top: 6px;
}

.premium-service-card b {
    color: #102033;
    font-size: 0.92rem;
    white-space: nowrap;
}

.builder-inline-control {
    align-items: center;
    display: grid;
    grid-template-columns: auto minmax(80px, 120px);
    gap: 10px;
    margin-top: 12px;
}

.builder-inline-control span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.builder-inline-control input {
    min-height: 40px;
}

.print-qty-control {
    grid-template-columns: 40px minmax(70px, 1fr) 40px;
}

.print-qty-control button {
    align-items: center;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #f8fafc;
    color: #102033;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.05rem;
    font-weight: 900;
    justify-content: center;
    min-height: 40px;
}

.print-qty-control button:hover {
    background: #eaf6f6;
    border-color: rgba(18, 131, 140, 0.36);
}

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

.builder-notes-field {
    margin-top: 18px;
}

.premium-summary-lines {
    display: grid;
    gap: 10px;
    margin: 14px 0;
    max-height: 380px;
    overflow: auto;
    padding-right: 4px;
}

.summary-line {
    align-items: center;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}

.summary-line strong,
.summary-line small {
    display: block;
}

.summary-line small {
    color: #64748b;
    font-size: 0.78rem;
    margin-top: 2px;
}

.summary-line b {
    color: #102033;
    white-space: nowrap;
}

.premium-total-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.premium-total-list > div {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.premium-total-list strong {
    color: #102033;
}

.premium-total-list .grand-total {
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    margin-top: 6px;
    padding-top: 14px;
}

.premium-total-list .grand-total strong {
    font-size: 1.55rem;
}

.actions-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.actions-row .btn {
    flex: 1;
}

@media (max-width: 1180px) {
    .premium-builder-shell {
        grid-template-columns: 1fr;
    }

    .premium-builder-summary {
        position: static;
    }
}

@media (max-width: 760px) {
    .builder-meta-strip,
    .premium-builder-toolbar,
    .recurring-builder-grid {
        grid-template-columns: 1fr;
    }

    .premium-service-grid {
        grid-template-columns: 1fr;
    }

    .builder-group-heading,
    .actions-row {
        flex-direction: column;
    }

    .actions-row .btn {
        width: 100%;
    }
}











/* Employee module redesign */
.employee-editor-page {
    display: grid;
    gap: 18px;
}

.employee-editor-head p {
    max-width: 760px;
}

.employee-studio-form {
    display: block;
}

.employee-studio-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.employee-profile-card,
.employee-form-section,
.employee-save-bar {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.employee-profile-card {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.employee-photo-preview-large {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: linear-gradient(135deg, #e8f0f1 0%, #f7fbfb 100%);
    border: 1px solid rgba(15, 47, 53, .08);
    font-size: clamp(3rem, 7vw, 5rem);
}

.employee-profile-meta {
    display: grid;
    gap: 4px;
}

.employee-profile-meta strong {
    color: var(--ink);
    font-size: 1.12rem;
    line-height: 1.2;
}

.employee-profile-meta span,
.employee-access-note span,
.employee-access-note small,
.employee-section-title p,
.employee-save-bar span,
.employee-role-pill + small {
    color: var(--muted);
    font-weight: 750;
}

.employee-access-note {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-radius: 8px;
    background: #f4f8f8;
    border: 1px solid rgba(24, 89, 98, .12);
}

.employee-access-note strong {
    color: var(--brand-dark);
}

.employee-studio-main {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.employee-form-section {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.employee-section-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.employee-section-title > span {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #102f35;
    color: #fff;
    font-weight: 900;
}

.employee-section-title h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
}

.employee-section-title p {
    margin: 3px 0 0;
    line-height: 1.45;
}

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

.employee-field-wide {
    grid-column: 1 / -1;
}

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

.employee-save-bar > div:first-child {
    display: grid;
    gap: 3px;
}

.employee-role-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef6f4;
    color: var(--brand-dark);
    font-weight: 900;
    line-height: 1.2;
}

@media (max-width: 980px) {
    .employee-studio-layout {
        grid-template-columns: 1fr;
    }

    .employee-profile-card {
        position: static;
        grid-template-columns: 150px minmax(0, 1fr);
        align-items: center;
    }

    .employee-profile-card .field,
    .employee-profile-card .employee-access-note {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .employee-form-grid-2,
    .employee-profile-card {
        grid-template-columns: 1fr;
    }

    .employee-photo-preview-large {
        max-width: 220px;
    }

    .employee-save-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .employee-save-bar .actions-row {
        justify-content: flex-start;
    }
}
/* Dashboard gap tightening */
.dashboard-page {
    gap: 14px;
}

.dashboard-command-strip,
.dashboard-kpi-grid,
.dashboard-ops-grid,
.dashboard-module-grid,
.dashboard-snapshot-strip {
    grid-auto-flow: row dense;
}

.dashboard-command-strip {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.dashboard-command-card.is-primary {
    grid-column: span 2;
}

.dashboard-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.dashboard-ops-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: start;
}

.dashboard-module-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.dashboard-module-card {
    min-height: 104px;
}

.dashboard-snapshot-strip {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.dashboard-main-grid {
    display: block;
    column-count: 2;
    column-gap: 16px;
}

.dashboard-main-grid > .dashboard-panel {
    display: inline-block;
    width: 100%;
    margin: 0 0 16px;
    break-inside: avoid;
}

.dashboard-system-grid {
    column-count: 2;
}

.dashboard-panel .dashboard-list {
    min-height: 0;
}

@media (max-width: 1180px) {
    .dashboard-command-card.is-primary {
        grid-column: auto;
    }

    .dashboard-main-grid,
    .dashboard-system-grid {
        column-count: 2;
    }
}

@media (max-width: 760px) {
    .dashboard-main-grid,
    .dashboard-system-grid {
        column-count: 1;
    }

    .dashboard-command-strip,
    .dashboard-kpi-grid,
    .dashboard-ops-grid,
    .dashboard-module-grid,
    .dashboard-snapshot-strip {
        grid-template-columns: 1fr;
    }
}
/* User access form refinements */
.user-access-page {
    display: grid;
    gap: 16px;
}

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

.user-access-summary,
.user-access-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.user-access-summary {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 16px;
}

.user-access-summary h2,
.user-access-summary p {
    margin: 0;
}

.user-access-summary span,
.user-access-section p {
    color: var(--muted);
    font-weight: 750;
}

.user-access-avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 8px;
    background: #102f35;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 900;
}

.user-access-section {
    display: grid;
    gap: 16px;
    padding: 18px;
}

@media (max-width: 720px) {
    .user-access-summary {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .user-access-summary .btn {
        grid-column: 1 / -1;
        width: max-content;
    }
}
/* Account profile */
.account-profile-page .hub-page-head {
    align-items: center;
}

.account-profile-layout {
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
}

.account-profile-card {
    top: 92px;
}

.account-profile-card .compact-field {
    margin-top: 4px;
}

.account-profile-card small {
    color: var(--muted);
    font-weight: 700;
}

@media (max-width: 900px) {
    .account-profile-layout {
        grid-template-columns: 1fr;
    }

    .account-profile-card {
        position: static;
    }
}
/* POS cashier scope */
.pos-cashier-filter {
    display: grid;
    gap: 5px;
    min-width: 170px;
}

.pos-cashier-filter label {
    color: rgba(255, 255, 255, .76);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.pos-cashier-filter select {
    width: 100%;
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-weight: 850;
    padding: 8px 10px;
}

.pos-cashier-filter option {
    color: #10272c;
}
/* Database backups */
.backup-console {
    display: grid;
    gap: 18px;
}

.backup-hero {
    align-items: stretch;
    background: linear-gradient(135deg, #0f3f46 0%, #155d63 52%, #f7fbfc 52%, #ffffff 100%);
    border: 1px solid rgba(15, 63, 70, 0.14);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 320px;
    min-height: 230px;
    padding: 28px;
}

.backup-hero-copy {
    color: #fff;
    max-width: 720px;
}

.backup-hero-copy .eyebrow,
.backup-hero-copy p {
    color: rgba(255, 255, 255, 0.78);
}

.backup-hero-copy h1 {
    color: #fff;
    font-size: 2.65rem;
    line-height: 1.05;
    margin: 6px 0 10px;
}

.backup-status-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.backup-status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    padding: 7px 11px;
    text-transform: uppercase;
}

.backup-status-pill.is-good {
    background: #dcfce7;
    color: #166534;
}

.backup-status-pill.is-warning {
    background: #fef3c7;
    color: #92400e;
}

.backup-status-pill.is-danger {
    background: #fee2e2;
    color: #991b1b;
}

.backup-action-card {
    align-self: stretch;
    background: #fff;
    border: 1px solid rgba(15, 63, 70, 0.12);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(8, 31, 36, 0.14);
    display: grid;
    gap: 10px;
    padding: 20px;
}

.backup-action-card span,
.backup-metric-card span,
.backup-path-box span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.backup-action-card strong {
    color: var(--ink);
    font-size: 1.55rem;
    line-height: 1.1;
}

.backup-action-card small {
    color: var(--muted);
    line-height: 1.45;
}

.backup-action-card .btn {
    margin-top: auto;
    justify-content: center;
}

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

.backup-metric-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 8px;
    min-height: 126px;
    padding: 18px;
}

.backup-metric-card strong {
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1.15;
}

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

.backup-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 330px;
}

.backup-history-panel,
.backup-side-panel {
    margin-top: 0;
}

.backup-section-head {
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin: -2px 0 14px;
    padding-bottom: 14px;
}

.backup-section-head h2,
.backup-side-panel h2 {
    margin: 0 0 6px;
}

.backup-section-head p {
    color: var(--muted);
    margin: 0;
}

.backup-section-head > span {
    background: #f1f5f9;
    border-radius: 999px;
    color: #334155;
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 7px 10px;
}

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

.backup-row {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    padding: 14px;
}

.backup-row.is-latest {
    border-color: rgba(20, 124, 132, 0.34);
    box-shadow: 0 10px 24px rgba(20, 124, 132, 0.08);
}

.backup-file-icon {
    align-items: center;
    background: #e6f4f5;
    border: 1px solid rgba(20, 124, 132, 0.22);
    border-radius: 8px;
    color: #0f5960;
    display: flex;
    font-size: 0.72rem;
    font-weight: 900;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.backup-file-main {
    min-width: 0;
}

.backup-file-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.backup-file-title strong {
    overflow-wrap: anywhere;
}

.backup-file-title span {
    background: #dcfce7;
    border-radius: 999px;
    color: #166534;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 4px 8px;
    text-transform: uppercase;
}

.backup-file-main p {
    color: var(--muted);
    margin: 4px 0 0;
}

.backup-empty-state {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 28px;
    text-align: center;
}

.backup-empty-state strong {
    color: var(--ink);
    display: block;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.backup-empty-state p {
    color: var(--muted);
    margin: 0;
}

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

.backup-check-list div {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 12px;
}

.backup-check-list strong {
    color: var(--ink);
}

.backup-check-list span {
    color: var(--muted);
    font-size: 0.9rem;
}

.backup-path-box {
    background: #102f35;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding: 14px;
}

.backup-path-box span {
    color: rgba(255, 255, 255, 0.68);
}

.backup-path-box code {
    color: #d7fbff;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
    white-space: normal;
}
.backup-path-box small {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .backup-hero,
    .backup-layout {
        grid-template-columns: 1fr;
    }

    .backup-hero {
        background: #0f3f46;
    }

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

@media (max-width: 640px) {
    .backup-hero {
        padding: 20px;
    }

    .backup-hero-copy h1 {
        font-size: 2rem;
    }

    .backup-metrics-grid,
    .backup-row {
        grid-template-columns: 1fr;
    }

    .backup-row .btn {
        justify-content: center;
        width: 100%;
    }

    .backup-section-head {
        display: grid;
    }
}

/* POS terminal header refinement */
.pos-kiosk-header {
    grid-template-columns: minmax(260px, .85fr) minmax(390px, 1.25fr) minmax(190px, auto);
    gap: 12px;
    padding: 12px 14px;
}

.pos-kiosk-brand > div {
    min-width: 0;
}

.pos-kiosk-brand h1 {
    font-size: 1.62rem;
    line-height: 1.08;
}

.pos-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.pos-header-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .8);
    font-size: .74rem;
    font-weight: 800;
    line-height: 1.15;
}

.pos-header-meta b {
    color: #fff;
}

.pos-kiosk-stats {
    align-items: stretch;
}

.pos-kiosk-stats article {
    min-height: 56px;
    padding: 9px 10px;
    align-content: center;
}

.pos-kiosk-stats span {
    font-size: .66rem;
    line-height: 1.1;
    letter-spacing: .03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-kiosk-stats strong {
    min-width: 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-header-controls {
    display: grid;
    gap: 8px;
    justify-items: end;
    align-content: center;
    min-width: 0;
}

.pos-header-controls .pos-cashier-filter {
    width: 100%;
    min-width: 190px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
}

.pos-header-controls .pos-cashier-filter label {
    margin-bottom: 1px;
    font-size: .66rem;
    letter-spacing: .03em;
}

.pos-header-controls .pos-cashier-filter select {
    min-height: 34px;
    padding: 6px 30px 6px 10px;
    font-size: .84rem;
}

.pos-header-controls .pos-kiosk-actions {
    width: 100%;
    justify-content: flex-end;
}

.pos-header-controls .pos-kiosk-actions .btn {
    min-height: 36px;
    padding: 8px 12px;
    font-size: .82rem;
}

@media (max-width: 1280px) {
    .pos-kiosk-header {
        grid-template-columns: minmax(250px, .9fr) minmax(330px, 1.1fr);
    }

    .pos-header-controls {
        grid-column: 1 / -1;
        grid-template-columns: minmax(220px, 320px) auto;
        justify-content: end;
        align-items: end;
    }
}

@media (max-width: 900px) {
    .pos-kiosk-header {
        grid-template-columns: 1fr;
    }

    .pos-header-controls {
        grid-template-columns: 1fr;
        justify-content: stretch;
        justify-items: stretch;
    }

    .pos-header-controls .pos-kiosk-actions {
        justify-content: stretch;
    }

    .pos-header-controls .pos-kiosk-actions .btn {
        flex: 1;
    }
}

@media (max-width: 520px) {
    .pos-kiosk-brand {
        align-items: flex-start;
    }

    .pos-kiosk-brand > span {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    .pos-kiosk-brand h1 {
        font-size: 1.35rem;
    }

    .pos-header-meta span {
        width: 100%;
    }
}
/* Settings console */
.settings-console {
    display: grid;
    gap: 18px;
}

.settings-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
    padding: 24px;
    border: 1px solid rgba(15, 63, 70, .14);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.settings-hero h1 {
    margin: 4px 0 8px;
    font-size: 2.25rem;
    line-height: 1.05;
}

.settings-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.settings-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.settings-module-grid,
.settings-mini-stats,
.settings-textarea-grid,
.settings-template-grid {
    display: grid;
    gap: 14px;
}

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

.settings-module-card {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 150px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.settings-module-card:hover,
.settings-module-card:focus-visible {
    border-color: rgba(24, 89, 98, .34);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.settings-module-card span,
.settings-mini-stats span {
    color: var(--brand-dark);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.settings-module-card strong {
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1.2;
}

.settings-module-card small,
.settings-mini-stats small,
.settings-section-head p {
    color: var(--muted);
    line-height: 1.45;
}

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

.settings-mini-stats article {
    display: grid;
    gap: 5px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.settings-mini-stats strong {
    color: var(--ink);
    font-size: 1.7rem;
    line-height: 1.1;
}

.settings-form {
    display: grid;
    gap: 18px;
}

.settings-form-section {
    margin-top: 0;
}

.settings-section-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.settings-section-head h2 {
    margin: 2px 0 6px;
}

.settings-section-head p {
    margin: 0;
}

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

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

.settings-template-grid .field-wide {
    grid-column: 1 / -1;
}

.settings-form textarea {
    resize: vertical;
}

.settings-save-bar {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid rgba(24, 89, 98, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 36px rgba(15, 23, 42, .12);
    backdrop-filter: blur(10px);
}

.settings-save-bar div {
    display: grid;
    gap: 2px;
}

.settings-save-bar strong {
    color: var(--ink);
}

.settings-save-bar span {
    color: var(--muted);
    font-size: .9rem;
}

@media (max-width: 1240px) {
    .settings-module-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .settings-textarea-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .settings-hero,
    .settings-section-head,
    .settings-save-bar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .settings-hero {
        align-items: start;
    }

    .settings-hero-actions,
    .settings-section-head .btn {
        justify-content: stretch;
        width: 100%;
    }

    .settings-hero-actions .btn,
    .settings-section-head .btn,
    .settings-save-bar .btn {
        width: 100%;
        justify-content: center;
    }

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

@media (max-width: 620px) {
    .settings-hero {
        padding: 18px;
    }

    .settings-hero h1 {
        font-size: 1.8rem;
    }

    .settings-module-grid,
    .settings-mini-stats,
    .settings-template-grid {
        grid-template-columns: 1fr;
    }

    .settings-save-bar {
        position: static;
    }
}