:root {
    --orange: #f97316;
    --orange-light: #ffedd5;
    --orange-soft: #fff7ed;
    --blue: #3c91bd;
    --sidebar: #203035;
    --sidebar-dark: #172428;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #e8edf2;
    --white: #ffffff;
    --danger: #b91c1c;
    --success: #15803d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

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

.guest {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--orange-soft), #ffffff 45%, #f1f5f9);
}

.shell,
.app-shell {
    display: grid;
    grid-template-columns: 344px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--sidebar);
    color: #fff;
    padding: 0 15px 22px;
    overflow-y: auto;
}

.sidebar-overlay {
    display: none;
}

.sidebar-brand {
    display: grid;
    place-items: center;
    height: 74px;
    margin: 0 -15px 15px;
    background: #3a89b0;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    text-decoration: none;
}

.sidebar-brand:hover {
    color: #fff;
}

.sidebar-logo {
    display: grid;
    place-items: center;
    min-height: 168px;
    margin-bottom: 14px;
}

.sidebar-logo img {
    width: 225px;
    height: 140px;
    background: #fff;
    object-fit: contain;
}

.sidebar-logo-placeholder {
    width: 225px;
    height: 140px;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--orange);
    font-size: 36px;
    font-weight: 900;
}

.sidebar-search {
    margin-bottom: 22px;
}

.sidebar-search input {
    border: 0;
    border-radius: 4px;
    background: #344b53;
    color: #fff;
    height: 54px;
    font-size: 20px;
}

.sidebar-search input::placeholder {
    color: #b9c5ca;
}

.brand {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 28px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 10px;
    border-radius: 4px;
    color: #d9eef8;
    margin-bottom: 4px;
    font-size: 20px;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.nav-dropdown {
    margin-bottom: 4px;
}

.nav-dropdown summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 10px;
    border-radius: 4px;
    color: #d9eef8;
    font-size: 20px;
    cursor: pointer;
    list-style: none;
}

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

.nav-dropdown summary:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.nav-caret {
    margin-left: auto;
    color: #b9c5ca;
    font-size: 13px;
    font-weight: 900;
}

.nav-dropdown[open] .nav-caret {
    transform: rotate(180deg);
}

.nav-submenu {
    display: grid;
    gap: 4px;
    margin: 0 0 8px 42px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 210, 31, .35);
}

.nav-submenu a {
    margin-bottom: 0;
    padding: 8px 10px;
    font-size: 15px;
    line-height: 1.25;
}

.nav-submenu a.active {
    background: rgba(255, 210, 31, .16);
    color: #fff;
    font-weight: 800;
}

.nav-icon {
    width: 28px;
    color: #ffd21f;
    font-weight: 900;
    text-align: center;
    font-size: 17px;
}

.workspace {
    min-width: 0;
    background: var(--bg);
}

.app-topbar {
    height: 74px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 22px;
    background: var(--blue);
    color: #fff;
}

.menu-button {
    border: 0;
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
}

.menu-button:hover {
    background: rgba(255, 255, 255, .24);
}

.menu-button-icon,
.menu-button-icon::before,
.menu-button-icon::after {
    width: 23px;
    height: 3px;
    display: block;
    border-radius: 999px;
    background: currentColor;
}

.menu-button-icon {
    position: relative;
}

.menu-button-icon::before,
.menu-button-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.menu-button-icon::before {
    top: -8px;
}

.menu-button-icon::after {
    top: 8px;
}

@media (min-width: 821px) {
    body.sidebar-collapsed .app-shell {
        grid-template-columns: 0 1fr;
    }

    body.sidebar-collapsed .sidebar {
        width: 0;
        padding-left: 0;
        padding-right: 0;
        overflow: hidden;
    }

    body.sidebar-collapsed .menu-button-icon {
        transform: rotate(90deg);
    }
}

.back-button {
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.back-button:hover {
    background: rgba(255, 255, 255, .25);
}

.topbar-spacer {
    flex: 1;
}

.topbar-indicators,
.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.topbar-user {
    border: 0;
    background: transparent;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.topbar-user:hover {
    color: #fff;
}

.user-caret {
    font-size: 12px;
    font-weight: 900;
    opacity: .9;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 30;
    display: none;
    min-width: 180px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .16);
}

.user-dropdown a {
    display: block;
    padding: 12px 14px;
    color: var(--ink);
    font-weight: 700;
}

.user-dropdown a:hover {
    background: var(--orange-soft);
    color: #9a3412;
}

.topbar-user-menu:hover .user-dropdown,
.topbar-user-menu:focus-within .user-dropdown {
    display: block;
}

.topbar-pill {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    border-radius: 4px;
    padding: 2px 6px;
    background: #08b455;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.topbar-pill.orange {
    background: #f97316;
}

.notification-center {
    position: relative;
}

.notification-toggle {
    position: relative;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .36);
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}

.notification-toggle:hover,
.notification-toggle.enabled,
.notification-toggle[aria-expanded="true"] {
    background: #fff;
    color: var(--blue);
    border-color: #fff;
}

.notification-bell {
    position: relative;
    width: 16px;
    height: 17px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 10px 10px 4px 4px;
}

.notification-bell::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -5px;
    width: 6px;
    height: 5px;
    border-radius: 999px 999px 0 0;
    border: 2px solid currentColor;
    border-bottom: 0;
    transform: translateX(-50%);
}

.notification-bell::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 7px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    transform: translateX(-50%);
}

.notification-count {
    position: absolute;
    right: -7px;
    top: -7px;
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    border: 2px solid var(--blue);
    border-radius: 999px;
    background: #f97316;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.notification-count[hidden] {
    display: none;
}

.notification-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    z-index: 70;
    width: min(380px, calc(100vw - 28px));
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 22px 54px rgba(15, 23, 42, .22);
}

.notification-panel[hidden] {
    display: none;
}

.notification-panel::before {
    content: "";
    position: absolute;
    right: 14px;
    top: -7px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-left: 1px solid #dbe3ee;
    border-top: 1px solid #dbe3ee;
    transform: rotate(45deg);
}

.notification-panel-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.notification-panel-head strong {
    color: #0f172a;
}

.notification-panel-head span {
    border-radius: 999px;
    padding: 4px 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 900;
}

.notification-list {
    display: grid;
    max-height: 360px;
    overflow: auto;
}

.notification-item {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 13px 48px 13px 16px;
    border-bottom: 1px solid #eef2f7;
    color: var(--ink);
    text-decoration: none;
}

.notification-item:hover {
    background: #fff7ed;
    color: var(--ink);
}

.notification-item strong {
    color: #0f172a;
    font-size: 14px;
}

.notification-item span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.notification-item em {
    position: absolute;
    right: 16px;
    top: 16px;
    min-width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #0d9d69;
    color: #fff;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}

.notification-empty {
    padding: 18px 16px;
    color: var(--muted);
    font-weight: 700;
}

.topbar-pill.has-alerts {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}

.topbar-pill.purple {
    background: #4338ca;
}

.user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: var(--blue);
    font-weight: 900;
}

.settings-dot {
    font-size: 22px;
}

.main {
    padding: 12px 5px 28px;
    overflow-x: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.dashboard-panel {
    background: #fff;
    margin: 0 0 26px;
    padding: 34px 32px 30px;
    border-radius: 10px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .05);
}

.dashboard-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.dashboard-title-row > div:first-child {
    min-width: 0;
    flex: 1;
}

.dashboard-title-row h1 {
    margin-bottom: 8px;
    font-size: 34px;
    line-height: 1.08;
    color: #050b1a;
}

.title-icon {
    color: #0a2d57;
}

.dashboard-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 430px;
}

.privilege-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 15px 22px;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 800;
    font-size: 18px;
}

.dashboard-view-switcher {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 22px;
}

.dashboard-view-switcher a {
    display: grid;
    gap: 5px;
    min-height: 84px;
    padding: 14px 16px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #f8fbff;
    color: #111827;
    text-decoration: none;
}

.dashboard-view-switcher a:hover {
    border-color: #6172f3;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.dashboard-view-switcher a.active {
    background: #0c1ea0;
    border-color: #0c1ea0;
    color: #fff;
}

.dashboard-view-switcher strong {
    font-size: 16px;
}

.dashboard-view-switcher span {
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
}

.dashboard-view-switcher a.active span {
    color: rgba(255, 255, 255, .82);
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 18px;
}

.boss-kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(190px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.boss-kpi {
    display: grid;
    min-height: 128px;
    align-content: space-between;
    gap: 10px;
    padding: 18px 16px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.boss-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, .14);
}

.boss-kpi span {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.boss-kpi strong {
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(22px, 1.55vw, 28px);
    line-height: 1;
    white-space: nowrap;
    text-overflow: clip;
    font-variant-numeric: tabular-nums;
}

.boss-kpi small {
    color: rgba(255, 255, 255, .86);
    font-weight: 700;
    line-height: 1.25;
}

.boss-kpi.blue { background: #2563eb; }
.boss-kpi.green { background: #059669; }
.boss-kpi.red { background: #dc2626; }
.boss-kpi.amber { background: #f97316; }
.boss-kpi.slate { background: #334155; }
.boss-kpi.amber-soft {
    background: #f59e0b;
    color: #111827;
}

.boss-kpi.amber-soft small {
    color: rgba(17, 24, 39, .78);
}

.boss-decision-board {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

.boss-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 16px;
}

.boss-action-card {
    border-radius: 10px;
    padding: 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.boss-action-card h3 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 18px;
}

.boss-action-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px dashed #e2e8f0;
    color: #0f172a;
    text-decoration: none;
}

.boss-action-card a:last-child {
    border-bottom: 0;
}

.boss-action-card a:hover span {
    color: #f97316;
}

.boss-action-card strong {
    min-width: 44px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    text-align: center;
}

.metric-card {
    position: relative;
    min-height: 141px;
    display: grid;
    align-content: center;
    gap: 14px;
    overflow: hidden;
    border-radius: 10px;
    padding: 24px 16px;
    color: #fff;
}

.metric-card strong {
    position: relative;
    z-index: 1;
    max-width: 100%;
    font-size: clamp(20px, 1.45vw, 28px);
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.metric-card span {
    font-size: 18px;
    font-weight: 800;
    max-width: 180px;
}

.metric-card i {
    position: absolute;
    right: 24px;
    bottom: 18px;
    font-style: normal;
    font-size: 66px;
    opacity: .22;
    font-weight: 900;
}

.metric-card.red { background: #e52329; }
.metric-card.blue { background: #2d62e8; }
.metric-card.emerald { background: #059669; }
.metric-card.indigo { background: #4f46e5; }
.metric-card.green { background: #0d9d69; }
.metric-card.amber { background: #f59e0b; }
.metric-card.slate { background: #464f5f; }

.billing-panel {
    max-width: 1550px;
    margin: 0 0 22px;
    padding: 22px;
    border-radius: 8px;
    background: #fff;
    border-top: 5px solid #6172f3;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}

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

.billing-head h2 {
    margin: 4px 0 6px;
    color: #0b1020;
    font-size: 24px;
}

.billing-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.billing-kpi,
.billing-shortcut {
    display: grid;
    color: var(--ink);
    text-decoration: none;
}

.billing-kpi {
    min-height: 104px;
    padding: 14px 16px;
    border-radius: 6px;
    background: #f7f8fc;
    border-left: 4px solid #6172f3;
}

.billing-kpi span {
    color: #464f5f;
    font-size: 13px;
    font-weight: 800;
}

.billing-kpi strong {
    margin: 10px 0 6px;
    color: #0c1ea0;
    font-size: 26px;
    line-height: 1;
}

.billing-kpi small {
    color: var(--muted);
}

.billing-kpi.strong {
    background: #edf3ff;
    border-left-color: #0c1ea0;
}

.billing-kpi.paid {
    border-left-color: #0d9d69;
}

.billing-kpi.unpaid {
    border-left-color: #f97316;
}

.billing-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 16px;
}

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

.billing-shortcuts-wide {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.billing-shortcut {
    min-height: 86px;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    align-content: center;
    padding: 14px;
    border-radius: 6px;
    background: #f7f8fc;
    border: 1px solid #dedeea;
}

.billing-shortcut:hover,
.billing-kpi:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.billing-shortcut span {
    grid-row: 1 / 3;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: #fff;
    background: #6172f3;
    font-weight: 900;
}

.billing-shortcut strong {
    color: #0b1020;
    font-size: 16px;
}

.billing-shortcut small {
    color: var(--muted);
}

.billing-shortcut.violet span { background: #3c41cd; }
.billing-shortcut.amber span { background: #ffc000; color: #111827; }
.billing-shortcut.green span { background: #0d9d69; }
.billing-shortcut.dark span { background: #464f5f; }
.billing-shortcut.slate span { background: #203035; }

.billing-list {
    overflow: hidden;
    border: 1px solid #dedeea;
    border-radius: 6px;
    background: #fff;
}

.billing-list-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #edf3ff;
    color: #0c1ea0;
}

.billing-list-title .actions {
    align-items: center;
}

.payment-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.payment-modal:target {
    display: flex;
}

.payment-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .56);
}

.payment-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    max-height: min(82vh, 760px);
    overflow: auto;
    border-radius: 8px;
    border: 1px solid #dedeea;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.payment-modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #dedeea;
    background: #edf3ff;
}

.payment-modal-head h3 {
    margin: 2px 0 0;
    color: #0c1ea0;
}

.payment-modal-close {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #9a2b0c;
    background: #fff3e2;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.dashboard-payment-form {
    display: grid;
    grid-template-columns: minmax(170px, 1.1fr) minmax(120px, .7fr) minmax(150px, .8fr) minmax(150px, .9fr) minmax(150px, .9fr) auto;
    gap: 8px;
    align-items: end;
    padding: 14px 18px;
    border-top: 1px solid #e5e7eb;
}

.dashboard-payment-form:first-of-type {
    border-top: 0;
}

.payment-invoice-title {
    display: grid;
    gap: 2px;
}

.payment-invoice-title small {
    color: #b91c1c;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .dashboard-payment-form {
        grid-template-columns: 1fr 1fr;
    }
}

.sales-insights {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.sales-trend-card,
.recent-invoices-card {
    overflow: hidden;
    border: 1px solid #dedeea;
    border-radius: 8px;
    background: #fff;
}

.sales-trend-card h3,
.recent-invoices-card h3 {
    margin: 0;
    color: #464f5f;
    font-size: 15px;
}

.sales-trend-card h3 {
    padding: 16px 18px 0;
}

.sales-chart-wrap {
    overflow-x: auto;
    padding: 8px 14px 14px;
}

.sales-chart {
    display: block;
    min-width: 820px;
    width: 100%;
    height: 178px;
}

.sales-chart .grid-line {
    stroke: #d8deee;
    stroke-width: 1;
    stroke-dasharray: 5 5;
}

.sales-chart .axis-line {
    stroke: #cfd5e4;
    stroke-width: 1.2;
}

.sales-chart .trend-line {
    fill: none;
    stroke: #0c1ea0;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sales-chart .trend-point {
    fill: #0c1ea0;
    stroke: #fff;
    stroke-width: 2;
}

.sales-chart .trend-value {
    fill: #111827;
    font-size: 11px;
    font-weight: 800;
}

.sales-chart .trend-label {
    fill: #374151;
    font-size: 12px;
}

.recent-invoices-card {
    padding: 14px 18px 10px;
}

.invoice-dashboard-table th {
    color: #464f5f;
    font-size: 14px;
}

.invoice-dashboard-table td {
    font-weight: 700;
}

.invoice-dashboard-table a {
    color: #0b1020;
    text-decoration: none;
}

.invoice-state {
    display: inline-flex;
    min-width: 88px;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 5px;
    background: #3c41cd;
    color: #fff;
    font-weight: 900;
    box-shadow: inset 0 0 0 2px rgba(12, 30, 160, .25);
}

.invoice-state.paid {
    background: #0d9d69;
    box-shadow: inset 0 0 0 2px rgba(8, 112, 78, .25);
}

.invoice-state.unpaid {
    background: #3c41cd;
}

.excel-dashboard {
    min-height: calc(100vh - 96px);
    margin: -8px -6px 0;
    padding: 0 18px 28px;
    background: #f7f8fc;
    color: #111827;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

.excel-tabs {
    display: grid;
    grid-template-columns: 72px repeat(6, minmax(120px, 1fr)) 1fr 52px 52px;
    align-items: center;
    gap: 10px;
    min-height: 86px;
    padding: 0 18px;
    border-bottom: 2px solid #e5e7ef;
    background: #fff;
}

.excel-logo {
    width: 72px;
    height: 52px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #fff;
    color: #25314a;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.excel-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.excel-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 6px;
    color: #485263;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
}

.excel-tabs a.active {
    background: #eef4ff;
    color: #303ed5;
}

.excel-icon-tab {
    color: #485263 !important;
    font-size: 34px !important;
}

.excel-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(230px, 1fr));
    gap: 24px;
    margin: 44px 0 14px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.excel-kpi-card {
    position: relative;
    display: grid;
    min-height: 110px;
    align-content: space-between;
    padding: 16px 58px 10px 18px;
    border: 1px solid #e4e7f0;
    border-radius: 7px;
    background: #fff;
    color: #050505;
    text-decoration: none;
}

.excel-kpi-card strong {
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(20px, 1.35vw, 24px);
    line-height: 1.1;
    white-space: nowrap;
    text-overflow: clip;
    font-variant-numeric: tabular-nums;
}

.excel-kpi-card span {
    color: #465063;
    font-size: 14px;
    font-weight: 800;
}

.excel-kpi-card i {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #fff;
    font-style: normal;
    font-size: 15px;
    font-weight: 900;
}

.excel-kpi-card i.violet { background: #6571ee; }
.excel-kpi-card i.blue { background: #6571ee; }
.excel-kpi-card i.pink { background: #f35aa4; }
.excel-kpi-card i.orange { background: #ffc056; }
.excel-kpi-card i.yellow { background: #ffc34e; }

.excel-main-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) minmax(480px, 3.25fr);
    gap: 24px;
    margin-bottom: 16px;
}

.excel-donut-card,
.excel-mode-card,
.excel-trend-card,
.excel-top-card,
.excel-invoices-card {
    overflow: hidden;
    border: 1px solid #e4e7f0;
    border-radius: 12px;
    background: #fff;
}

.excel-donut-card {
    display: grid;
    justify-items: center;
    min-height: 235px;
    padding: 10px 18px 18px;
    background: #3f3fd0;
    color: #fff;
}

.excel-donut-card h3,
.excel-mode-card h3,
.excel-trend-card h3,
.excel-top-card h3,
.excel-invoices-card h3 {
    margin: 0;
    color: inherit;
    font-size: 14px;
    font-weight: 800;
}

.excel-donut {
    width: 138px;
    height: 138px;
    display: grid;
    place-items: center;
    align-self: center;
    border-radius: 50%;
    background: conic-gradient(#b7c3ff calc(var(--paid) * 1%), rgba(255, 255, 255, .25) 0);
    box-shadow: 0 0 0 8px rgba(195, 207, 255, .75);
}

.excel-donut > div {
    width: 98px;
    height: 98px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border-radius: 50%;
    background: #3f3fd0;
}

.excel-donut strong {
    font-size: 24px;
}

.excel-donut span {
    font-size: 13px;
    font-weight: 800;
}

.excel-mode-card {
    display: grid;
    align-content: space-between;
    min-height: 235px;
    padding: 16px 8px 0;
    color: #465063;
    text-align: center;
}

.excel-mode-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    padding: 0 6px 0;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
}

.excel-mode-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.excel-mode-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.excel-trend-card {
    min-height: 235px;
    padding: 18px 18px 10px;
}

.excel-trend-card h3 {
    color: #465063;
    margin-bottom: 8px;
}

.excel-trend-chart {
    display: block;
    width: 100%;
    min-width: 760px;
    height: 188px;
}

.excel-trend-chart .grid-line {
    stroke: #d8deee;
    stroke-dasharray: 5 5;
}

.excel-trend-chart .axis-line {
    stroke: #d1d5db;
}

.excel-trend-chart .trend-line {
    fill: none;
    stroke: #111aa5;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.excel-trend-chart .trend-value {
    fill: #050505;
    font-size: 11px;
    font-weight: 900;
}

.excel-trend-chart .trend-label {
    fill: #374151;
    font-size: 13px;
}

.excel-bottom-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.15fr) minmax(560px, 1.65fr);
    gap: 24px;
}

.excel-top-card,
.excel-invoices-card {
    min-height: 210px;
    padding: 14px 16px 8px;
}

.excel-card-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #465063;
}

.excel-card-title-row strong {
    font-size: 14px;
}

.excel-bars {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.excel-bar-row {
    display: grid;
    grid-template-columns: 160px minmax(80px, 1fr) 90px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
}

.excel-bar-row div {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef1f7;
}

.excel-bar-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #111aa5;
}

.excel-invoice-table {
    width: 100%;
    border-collapse: collapse;
}

.excel-invoice-table th,
.excel-invoice-table td {
    padding: 8px 6px;
    border-bottom: 2px solid #dfe3ee;
    text-align: left;
}

.excel-invoice-table th {
    color: #465063;
    font-size: 15px;
}

.excel-invoice-table td {
    color: #050505;
    font-size: 15px;
    font-weight: 700;
}

.excel-state {
    display: inline-flex;
    min-width: 96px;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 5px;
    background: #3f3fd0;
    color: #fff;
    font-weight: 900;
    box-shadow: inset 0 0 0 2px #1c278e;
}

.excel-state.paid {
    background: #3f3fd0;
}

.billing-page-kpis {
    max-width: 1550px;
}

.billing-module-grid {
    margin-bottom: 22px;
}

.mini-module {
    min-height: 210px;
    color: var(--ink);
}

.mini-module:hover {
    color: var(--ink);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

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

.dashboard-panel,
.module-grid,
.main > .card {
    max-width: 1550px;
}

.module-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 388px;
    overflow: hidden;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}

.module-head {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}

.module-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    font-weight: 900;
    font-size: 20px;
}

.module-icon.green { background: #0d9d69; }
.module-icon.cyan { background: #0891b2; }
.module-icon.amber { background: #f59e0b; }
.module-icon.red { background: #e52329; }

.module-head h2 {
    margin-bottom: 6px;
    font-size: 26px;
    color: #071126;
}

.module-head p {
    margin: 0;
    color: #64748b;
}

.module-body {
    padding: 24px;
}

.module-body > strong {
    display: block;
    font-size: 44px;
    line-height: 1;
}

.module-body > span {
    display: block;
    margin: 8px 0 22px;
    color: #64748b;
    font-weight: 800;
    text-transform: uppercase;
}

.module-body dl {
    margin: 0;
}

.module-body dl div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-top: 1px dashed #e2e8f0;
    font-size: 18px;
}

.module-body dt,
.module-body dd {
    margin: 0;
}

.module-body dd {
    font-weight: 800;
}

.module-link {
    display: block;
    padding: 20px 24px;
    border-top: 1px solid var(--line);
    color: #1e40af;
    font-size: 20px;
    font-weight: 800;
}

.flutter-install-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(360px, 1fr));
    gap: 18px;
    max-width: 1550px;
}

.flutter-install-card {
    min-height: 0;
    overflow: visible;
}

.flutter-install-card .module-head {
    align-items: flex-start;
}

.flutter-install-card .module-head > div {
    min-width: 0;
}

.flutter-install-card .module-head h2 {
    font-size: 22px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.flutter-install-card .module-head p,
.flutter-install-card .module-body span,
.flutter-install-card .module-body li,
.flutter-install-card .module-body dd {
    overflow-wrap: anywhere;
}

.install-code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    margin: 0;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.45;
}

.notice-page {
    display: grid;
    gap: 18px;
    max-width: 1180px;
}

.notice-cover {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    background: #fff;
    border-radius: 10px;
    padding: 28px;
    border-left: 6px solid var(--orange);
}

.notice-cover h1 {
    font-size: 30px;
    margin-bottom: 10px;
}

.notice-cover p {
    max-width: 720px;
    color: var(--muted);
    line-height: 1.5;
}

.notice-meta {
    min-width: 180px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 14px;
    border-radius: 8px;
    background: var(--orange-soft);
}

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

.notice-summary a {
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
    border: 1px solid var(--line);
}

.notice-section,
.notice-module {
    background: #fff;
    border-radius: 10px;
    padding: 22px;
    border: 1px solid var(--line);
}

.notice-title {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.notice-title > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--orange);
    color: #fff;
    font-weight: 900;
    font-size: 20px;
}

.notice-title h2,
.notice-module h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.notice-title p,
.notice-module p {
    margin: 0;
    color: var(--muted);
}

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

.notice-steps div {
    padding: 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.notice-steps p,
.notice-list li {
    color: var(--muted);
    line-height: 1.45;
}

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

.notice-module ol {
    margin: 16px 0 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.6;
}

.notice-list {
    margin: 0;
    padding-left: 22px;
}

.quick-contact-stack {
    position: fixed;
    right: 22px;
    top: 35%;
    z-index: 50;
    display: grid;
    gap: 14px;
}

.quick-contact-btn {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 16px 30px rgba(15, 23, 42, .22);
}

.quick-contact-btn.whatsapp {
    background: #22c55e;
}

.quick-contact-btn.phone {
    background: #ef493f;
}

.quick-contact-btn.mail {
    background: #f59e0b;
    font-size: 24px;
}

.select2-lite {
    display: grid;
    gap: 8px;
}

.select2-lite-search {
    width: 100%;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    padding: 11px 12px;
    font: inherit;
    background: #f8fafc;
}

.select2-lite select {
    width: 100%;
}

.contact-action-row .btn.disabled {
    opacity: .45;
    pointer-events: none;
}

.login-card {
    width: min(420px, 100%);
}

h1, h2, h3 {
    margin: 0 0 12px;
}

h1 {
    font-size: 26px;
}

h2 {
    font-size: 18px;
}

.muted {
    color: var(--muted);
}

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

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

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    background: linear-gradient(135deg, var(--orange-soft), #ffffff);
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 18px;
}

.dashboard-hero h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.eyebrow {
    margin: 0 0 4px;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-status {
    display: grid;
    gap: 6px;
    justify-items: end;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.kpi-card {
    display: grid;
    gap: 6px;
    min-height: 122px;
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    padding: 16px;
    color: var(--ink);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

a.kpi-card {
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
}

a.kpi-card:hover,
.clickable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.kpi-card,
.module-card {
    transition: transform .16s ease, box-shadow .16s ease;
}

.clickable-card {
    cursor: pointer;
}

.kpi-card.warning {
    border-left-color: #dc2626;
}

.kpi-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.kpi-card strong {
    font-size: 30px;
    line-height: 1;
}

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

.finance-board {
    max-width: 1550px;
    margin-bottom: 22px;
}

.finance-summary {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px 22px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid #0d9d69;
    margin-bottom: 12px;
}

.finance-summary h2 {
    margin-bottom: 5px;
    font-size: 22px;
}

.finance-balance {
    min-width: 210px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #f8fafc;
    text-align: right;
}

.finance-balance span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.finance-balance strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 26px;
}

.finance-content {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, .85fr);
    gap: 14px;
}

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

.card-title-row h2 {
    margin: 0;
    font-size: 18px;
}

.premium-filter {
    border-left: 4px solid var(--orange);
}

.filter-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.filter-head h2 {
    margin-bottom: 4px;
    font-size: 20px;
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.filter-toggle::-webkit-details-marker {
    display: none;
}

.filter-toggle::after {
    content: "+";
    margin-left: 10px;
    font-size: 18px;
    line-height: 1;
}

details[open] > .filter-toggle {
    margin-bottom: 16px;
}

details[open] > .filter-toggle::after {
    content: "-";
}

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

.compact-table th,
.compact-table td {
    padding: 9px 10px;
}

.amount-entry,
.amount-exit {
    white-space: nowrap;
    font-weight: 900;
}

.amount-entry {
    color: #15803d;
}

.amount-exit {
    color: #b91c1c;
}

.account-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px dashed #e2e8f0;
}

.account-row:first-of-type {
    border-top: 0;
}

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

.account-row span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.account-row b {
    white-space: nowrap;
    color: #0f172a;
}

.accounting-hero {
    border-top: 5px solid #1f3f77;
}

.accounting-period-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    min-width: min(560px, 100%);
}

.accounting-toolbar {
    display: grid;
    justify-items: end;
    gap: 10px;
}

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

.accounting-period-form p {
    margin: 0;
}

.accounting-kpis .kpi-card strong {
    font-size: clamp(19px, 2vw, 28px);
    overflow-wrap: anywhere;
}

.accounting-balance-card {
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid #183b73;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.accounting-sheet-title {
    display: grid;
    place-items: center;
    min-height: 76px;
    background: #1f3f77;
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.accounting-sheet-subtitle {
    padding: 10px 16px;
    background: #fff8df;
    color: #594515;
    font-style: italic;
    font-weight: 700;
    text-align: center;
}

.accounting-balance-table {
    min-width: 980px;
}

.accounting-balance-table th {
    background: #1f3f77;
    color: #fff;
}

.accounting-balance-table td {
    font-weight: 700;
}

.accounting-balance-table td:nth-child(n+3) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.accounting-class-1 { background: #eef2ff; }
.accounting-class-2 { background: #f8fafc; }
.accounting-class-3 { background: #ecfdf5; }
.accounting-class-4 { background: #fff7ed; }
.accounting-class-5 { background: #ecfdf5; }
.accounting-class-6 { background: #fef2f2; }
.accounting-class-7 { background: #f0fdf4; }
.accounting-class-8 { background: #f5f3ff; }

.accounting-total-row td {
    background: #1f3f77;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
}

.accounting-balance-status {
    padding: 16px;
    border-top: 1px solid #183b73;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.accounting-balance-status.is-balanced {
    background: #dcfce7;
    color: #14532d;
}

.accounting-balance-status.is-unbalanced {
    background: #fef2f2;
    color: #991b1b;
}

.accounting-result-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .65fr);
    gap: 14px;
}

.accounting-result-list {
    margin: 0;
}

.accounting-result-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.accounting-result-list div:last-child {
    border-bottom: 0;
}

.accounting-result-list dt,
.accounting-result-list dd {
    margin: 0;
}

.accounting-result-list dt {
    color: var(--muted);
    font-weight: 800;
}

.accounting-result-list dd {
    text-align: right;
    font-weight: 900;
}

.accounting-result-list .strong {
    color: #0f172a;
    font-size: 18px;
}

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

.accounting-source-list span {
    padding: 12px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #f8fafc;
    font-weight: 800;
}

.priority-list,
.quick-actions {
    display: grid;
    gap: 10px;
}

.profile-list {
    margin: 0 0 18px;
}

.profile-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.profile-list dt,
.profile-list dd {
    margin: 0;
}

.profile-list dt {
    color: var(--muted);
    font-weight: 700;
}

.profile-list dd {
    text-align: right;
    font-weight: 800;
}

.priority-list a {
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
}

label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    margin: 0 0 6px;
}

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 11px;
    font: inherit;
    background: #fff;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.btn.secondary {
    background: #374151;
}

.btn.light {
    background: var(--orange-light);
    color: #9a3412;
}

.btn.danger {
    background: #b91c1c;
    color: #fff;
}

.danger-zone {
    border-color: #fecaca;
}

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

.reset-card {
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.reset-card h2,
.reset-confirm-card h2 {
    margin: 0 0 8px;
}

.reset-card ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    padding-left: 18px;
}

.reset-card.keep {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.reset-card.delete {
    border-color: #fecaca;
    background: #fef2f2;
}

.reset-confirm-card {
    display: grid;
    gap: 14px;
    max-width: 640px;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert.success {
    background: #ecfdf5;
    color: var(--success);
    border-color: #bbf7d0;
}

.alert.error {
    background: #fef2f2;
    color: var(--danger);
    border-color: #fecaca;
}

.alert.warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.notification-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 120;
    width: min(360px, calc(100vw - 36px));
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #d7e0ee;
    border-left: 5px solid var(--orange);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
}

.notification-toast[hidden] {
    display: none;
}

.notification-toast strong {
    color: #0f172a;
    font-size: 16px;
}

.notification-toast span {
    color: var(--muted);
    line-height: 1.35;
}

.notification-toast a {
    justify-self: start;
    font-weight: 800;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

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

th {
    background: var(--orange-soft);
    color: #9a3412;
    font-size: 13px;
}

.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
    background: var(--orange-light);
    color: #9a3412;
}

.badge.online {
    background: #dcfce7;
    color: #166534;
}

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

.customer-row-details summary {
    cursor: pointer;
    display: inline-flex;
    list-style: none;
}

.customer-row-details summary::-webkit-details-marker {
    display: none;
}

.customer-detail-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: 10px;
    min-width: 320px;
}

.customer-detail-grid span {
    color: var(--muted);
    font-size: 14px;
}

.customer-detail-grid strong {
    color: var(--text);
    display: block;
    font-size: 13px;
}

.pagination-bar {
    align-items: center;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
}

.actions {
    display: flex;
    gap: 8px;
    align-items: end;
    flex-wrap: wrap;
}

.payment-details {
    min-width: 210px;
}

.payment-details summary {
    display: inline-flex;
    cursor: pointer;
    list-style: none;
}

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

.payment-inline-form {
    margin-top: 8px;
    max-width: 360px;
}

.payment-inline-form input,
.payment-inline-form select {
    min-width: 150px;
}

.logo-preview {
    max-height: 70px;
    max-width: 160px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px;
    background: #fff;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-grid;
    place-items: center;
    background: var(--orange-light);
    color: #9a3412;
    font-weight: 800;
}

.avatar.placeholder {
    border: 1px solid #fed7aa;
}

@media (max-width: 820px) {
    .shell,
    .app-shell {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: min(82vw, 310px);
        max-height: none;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 14px 0 32px rgba(15, 23, 42, .24);
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: none;
        border: 0;
        background: rgba(15, 23, 42, .42);
    }
    body.sidebar-open .sidebar-overlay {
        display: block;
    }
    body.sidebar-open {
        overflow: hidden;
    }
    .workspace {
        width: 100%;
    }
    .sidebar-brand {
        height: 64px;
        font-size: 24px;
    }
    .sidebar-logo {
        min-height: auto;
    }
    .sidebar-logo img,
    .sidebar-logo-placeholder {
        max-width: 150px;
        max-height: 90px;
    }
    .grid, .grid-3 {
        grid-template-columns: 1fr;
    }
    .metric-strip,
    .boss-main-grid,
    .excel-main-grid,
    .excel-bottom-grid,
    .reset-grid,
    .dashboard-view-switcher,
    .kpi-grid,
    .billing-kpis {
        grid-template-columns: 1fr;
    }
    .reset-card ul {
        grid-template-columns: 1fr;
    }
    .excel-dashboard {
        margin: 0;
        padding: 0 8px 18px;
    }
    .excel-tabs {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 10px;
    }
    .excel-logo,
    .excel-tabs-spacer {
        display: none;
    }
    .excel-tabs a {
        min-height: 36px;
        font-size: 13px;
        padding: 7px 8px;
    }
    .excel-icon-tab {
        font-size: 22px !important;
    }
    .excel-kpi-row {
        gap: 10px;
        margin: 16px 0 12px;
    }
    .excel-main-grid,
    .excel-bottom-grid {
        gap: 12px;
    }
    .excel-kpi-card {
        min-height: 96px;
    }
    .excel-trend-card,
    .excel-invoices-card {
        overflow-x: auto;
    }
    .excel-bar-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    .billing-panel {
        padding: 14px;
        margin-bottom: 16px;
    }
    .billing-head {
        flex-direction: column;
    }
    .billing-head h2 {
        font-size: 20px;
    }
    .billing-workspace {
        grid-template-columns: 1fr;
    }
    .billing-shortcuts,
    .billing-shortcuts-wide {
        grid-template-columns: 1fr;
    }
    .billing-list {
        overflow-x: auto;
    }
    .module-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-panel {
        padding: 18px 16px;
        margin: 0 0 18px;
        overflow: hidden;
    }
    .dashboard-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    .dashboard-title-row h1 {
        font-size: 26px;
    }
    .dashboard-title-row > div:first-child {
        width: 100%;
    }
    .dashboard-actions {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 8px;
    }
    .privilege-chip {
        max-width: 100%;
        padding: 10px 14px;
        font-size: 14px;
        line-height: 1.25;
        white-space: normal;
    }
    .dashboard-actions .btn {
        max-width: 100%;
        padding: 9px 12px;
        font-size: 13px;
        line-height: 1.2;
        white-space: normal;
    }
    .metric-card {
        min-height: 112px;
    }
    .app-topbar {
        height: auto;
        min-height: 64px;
        flex-wrap: nowrap;
        padding: 10px 12px;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 25;
    }
    .topbar-user strong {
        max-width: 82px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .settings-dot {
        font-size: 18px;
    }
    .main {
        padding: 8px 6px 18px;
    }
    .topbar-indicators {
        display: flex;
    }
    .topbar-indicators .topbar-pill {
        display: none;
    }
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }
    .hero-status {
        justify-items: start;
    }
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }
    .notice-cover {
        flex-direction: column;
        padding: 22px;
    }
    .notice-cover h1 {
        font-size: 24px;
    }
    .notice-summary,
    .notice-steps,
    .notice-module-grid {
        grid-template-columns: 1fr;
    }
    .finance-summary {
        align-items: flex-start;
        flex-direction: column;
    }
    .finance-balance {
        width: 100%;
        text-align: left;
    }
    .finance-content {
        grid-template-columns: 1fr;
    }
    .filter-head {
        flex-direction: column;
    }
    .accounting-period-form,
    .accounting-toolbar,
    .accounting-result-grid {
        grid-template-columns: 1fr;
    }
    .accounting-toolbar {
        width: 100%;
        justify-items: stretch;
    }
    .accounting-period-form {
        width: 100%;
        min-width: 0;
    }
    .accounting-export-actions {
        justify-content: flex-start;
    }
    .accounting-sheet-title {
        min-height: 58px;
        padding: 12px;
        font-size: 20px;
    }
    .accounting-balance-status {
        font-size: 15px;
        line-height: 1.35;
    }
}

@media (min-width: 821px) and (max-width: 1180px) {
    .app-shell,
    .shell {
        grid-template-columns: 290px 1fr;
    }
    .metric-strip,
    .boss-main-grid,
    .excel-main-grid,
    .excel-bottom-grid,
    .dashboard-view-switcher,
    .kpi-grid,
    .billing-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .excel-tabs {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
    .excel-logo,
    .excel-tabs-spacer {
        display: none;
    }
    .billing-workspace {
        grid-template-columns: 1fr;
    }
    .billing-shortcuts,
    .billing-shortcuts-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .notice-summary,
    .notice-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .quick-contact-stack {
        right: 12px;
        top: auto;
        bottom: 16px;
        gap: 10px;
    }
    .quick-contact-btn {
        width: 52px;
        height: 52px;
        font-size: 12px;
    }
    .notice-steps {
        grid-template-columns: 1fr;
    }
    .finance-content {
        grid-template-columns: 1fr;
    }
    .accounting-result-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1181px) {
    .app-shell,
    .shell {
        grid-template-columns: 240px 1fr;
    }
    .sidebar-brand {
        height: 58px;
        font-size: 22px;
    }
    .sidebar-logo {
        min-height: 115px;
        margin-bottom: 10px;
    }
    .sidebar-logo img,
    .sidebar-logo-placeholder {
        width: 155px;
        height: 90px;
    }
    .sidebar-search {
        margin-bottom: 12px;
    }
    .sidebar-search input {
        height: 42px;
        font-size: 16px;
        padding: 8px 12px;
    }
    .nav a {
        font-size: 15px;
        padding: 8px 8px;
        gap: 10px;
    }
    .nav-icon {
        width: 22px;
        font-size: 13px;
    }
    .app-topbar {
        height: 58px;
        padding: 0 16px;
    }
    .menu-button {
        font-size: 22px;
    }
    .back-button {
        padding: 7px 10px;
        font-size: 13px;
    }
    .topbar-user strong {
        font-size: 15px;
    }
    .user-avatar {
        width: 34px;
        height: 34px;
    }
    .main {
        padding: 8px 5px 20px;
    }
    .dashboard-panel {
        padding: 22px 28px 24px;
        margin-bottom: 18px;
    }
    .dashboard-title-row {
        margin-bottom: 18px;
    }
    .dashboard-title-row h1 {
        font-size: 28px;
        line-height: 1.12;
    }
    .dashboard-title-row .muted {
        font-size: 14px;
    }
    .dashboard-actions {
        min-width: 340px;
        gap: 10px;
    }
    .privilege-chip {
        padding: 10px 16px;
        font-size: 15px;
    }
    .dashboard-actions .btn {
        padding: 9px 12px;
        font-size: 14px;
    }
    .metric-strip {
        gap: 14px;
    }
    .metric-card {
        min-height: 104px;
        padding: 18px 18px;
        border-radius: 8px;
    }
    .metric-card strong {
        font-size: clamp(20px, 1.45vw, 28px);
    }
    .metric-card span {
        font-size: 15px;
        max-width: 140px;
    }
    .metric-card i {
        font-size: 50px;
        right: 18px;
        bottom: 12px;
    }
    .module-grid {
        gap: 16px;
    }
    .module-card {
        min-height: 300px;
        border-radius: 8px;
    }
    .module-head {
        padding: 16px 18px;
        gap: 14px;
    }
    .module-icon {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
    .module-head h2 {
        font-size: 22px;
        margin-bottom: 4px;
    }
    .module-head p {
        font-size: 14px;
    }
    .module-body {
        padding: 18px;
    }
    .module-body > strong {
        font-size: 34px;
    }
    .module-body > span {
        margin: 6px 0 14px;
        font-size: 13px;
    }
.module-body dl div {
        padding: 8px 0;
        font-size: 15px;
    }
    .module-link {
        padding: 14px 18px;
        font-size: 16px;
    }
}

.inline-editor {
    position: relative;
}

.inline-editor summary {
    display: inline-flex;
    list-style: none;
    cursor: pointer;
}

.inline-editor summary::-webkit-details-marker {
    display: none;
}

.inline-editor[open] summary {
    margin-bottom: 10px;
}

.inline-editor form {
    min-width: 360px;
    max-width: 520px;
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}

.permission-checklist {
    display: grid;
    gap: 8px;
    max-height: 240px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.permission-checklist label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-weight: 400;
    margin: 0;
}

.permission-checklist input {
    width: auto;
    margin-top: 3px;
}
