:root {
    --color-primary: #123c73;
    --color-primary-dark: #0b274a;
    --color-primary-soft: #e7eef8;
    --color-bg: #f4f7fb;
    --color-surface: rgba(255, 255, 255, 0.88);
    --color-surface-strong: #ffffff;
    --color-text: #172033;
    --color-text-muted: #64748b;
    --color-border: rgba(18, 60, 115, 0.12);
    --color-teal: #0f9baa;
    --color-gold: #d7a837;
    --color-success: #1d8f6a;
    --color-warning: #d18a18;
    --color-danger: #be5b5b;
    --shadow-soft: 0 24px 60px rgba(15, 33, 63, 0.08);
    --shadow-card: 0 16px 36px rgba(9, 30, 66, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --sidebar-width: 292px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--color-text);
    background:
        radial-gradient(circle at top left, rgba(15, 155, 170, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(215, 168, 55, 0.14), transparent 20%),
        linear-gradient(180deg, #f9fbff 0%, var(--color-bg) 100%);
}

.auth-body {
    background:
        radial-gradient(circle at left top, rgba(18, 60, 115, 0.18), transparent 30%),
        radial-gradient(circle at right bottom, rgba(15, 155, 170, 0.14), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(11, 39, 74, 0.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem 1.4rem;
    color: #eaf2ff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
        linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    transition: width 220ms ease, padding 220ms ease, transform 220ms ease;
}

.sidebar-mobile-head {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: -0.25rem;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.4rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--color-primary-dark);
    background: linear-gradient(135deg, #ffffff 0%, #dceafe 100%);
}

.brand-logo {
    width: 3.2rem;
    height: 3.2rem;
    object-fit: contain;
    flex-shrink: 0;
    padding: 0.3rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 22px rgba(7, 23, 51, 0.18);
}

.brand-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.brand-subtitle {
    color: rgba(234, 242, 255, 0.72);
    font-size: 0.88rem;
}

.sidebar-close-button {
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.sidebar-nav {
    display: grid;
    gap: 0.55rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 3.25rem;
    padding: 0 1rem;
    border: 1px solid transparent;
    border-radius: 1rem;
    color: rgba(234, 242, 255, 0.78);
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.sidebar-role {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(234, 242, 255, 0.68);
}

body.sidebar-collapsed .sidebar {
    width: 96px;
    padding-inline: 0.9rem;
}

body.sidebar-collapsed .sidebar .brand-block {
    justify-content: center;
}

body.sidebar-collapsed .sidebar .brand-logo {
    width: 2.8rem;
    height: 2.8rem;
    padding: 0.25rem;
}

body.sidebar-collapsed .sidebar .brand-block > div:last-child,
body.sidebar-collapsed .sidebar .nav-link .nav-label,
body.sidebar-collapsed .sidebar .sidebar-footer {
    display: none;
}

body.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    padding-inline: 0;
}

body.sidebar-collapsed .sidebar .nav-link .nav-icon {
    margin: 0;
}

.main-content {
    flex: 1;
    padding: 2rem;
    min-width: 0;
}

.section-note {
    margin: 0 0 1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.topbar-main {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.topbar-logo {
    width: 2.3rem;
    height: 2.3rem;
    object-fit: contain;
    flex-shrink: 0;
}

.topbar-menu-group {
    display: flex;
    align-items: center;
}

.sidebar-toggle-button {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.26rem;
    width: 3rem;
    height: 3rem;
    padding: 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.sidebar-toggle-button span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--color-primary);
}

.topbar-caption {
    margin: 0 0 0.2rem;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topbar-title {
    font-size: 1.5rem;
}

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

.topbar-user {
    display: grid;
    gap: 0.12rem;
    padding: 0.65rem 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-card);
}

.topbar-user-role {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topbar-user strong {
    font-size: 0.95rem;
}

.topbar-user small {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    gap: 1.5rem;
    align-items: stretch;
    padding: 2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(18, 60, 115, 0.97), rgba(11, 39, 74, 0.95)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
    box-shadow: var(--shadow-soft);
    color: #f7faff;
}

.hero-panel-compact {
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.7fr);
    padding: 1.3rem 1.5rem;
    align-items: center;
}

.eyebrow,
.panel-eyebrow {
    margin: 0 0 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow {
    color: rgba(233, 243, 255, 0.72);
}

.hero-panel h1 {
    margin: 0;
    max-width: 10ch;
    font-size: clamp(2rem, 3vw, 3.4rem);
    line-height: 1.02;
}

.hero-copy {
    max-width: 60ch;
    margin: 1rem 0 0;
    color: rgba(240, 246, 255, 0.8);
    line-height: 1.7;
}

.hero-mini-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(240, 246, 255, 0.82);
    line-height: 1.6;
}

.hero-stat-card {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(14px);
}

.hero-stat-card strong {
    margin: 0.25rem 0;
    font-size: 3rem;
    line-height: 1;
}

.hero-stat-label {
    color: rgba(240, 246, 255, 0.72);
    font-size: 0.95rem;
}

.hero-stat-card p {
    margin: 0.35rem 0 0;
    color: rgba(240, 246, 255, 0.76);
    line-height: 1.6;
}

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

.kpi-card,
.panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-card);
}

.kpi-card {
    padding: 1.35rem;
}

.kpi-card::before {
    content: '';
    position: absolute;
    inset: auto -20% -50% auto;
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(2px);
}

.tone-primary::before {
    background: var(--color-primary);
}

.tone-teal::before {
    background: var(--color-teal);
}

.tone-gold::before {
    background: var(--color-gold);
}

.tone-slate::before {
    background: #7c8aa5;
}

.kpi-label {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

.kpi-value {
    display: block;
    margin-top: 0.55rem;
    font-size: 1.85rem;
    line-height: 1.1;
}

.kpi-trend {
    display: inline-flex;
    margin-top: 1rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-grid-simple {
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.9fr);
}

.panel {
    padding: 1.35rem;
}

.panel-wide {
    min-width: 0;
}

.panel-large {
    grid-row: span 2;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.panel-head-secondary {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(18, 60, 115, 0.08);
}

.report-hero-panel {
    margin-bottom: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.92));
}

.table-toolbar-inline {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
}

.table-toolbar-inline input[type="month"] {
    min-height: 2.85rem;
    padding: 0.72rem 0.9rem;
    border: 1px solid rgba(18, 60, 115, 0.1);
    border-radius: 0.9rem;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
}

.report-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.report-meta-card {
    display: grid;
    gap: 0.3rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(18, 60, 115, 0.08);
    border-radius: 1rem;
    background: #ffffff;
}

.report-meta-card span {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.report-meta-card strong {
    font-size: 1rem;
}

.report-overview-grid {
    align-items: stretch;
}

.report-summary-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.85rem;
    color: var(--color-text-main);
    line-height: 1.7;
}

.report-summary-list li::marker {
    color: var(--color-primary);
}

.report-note-panel {
    background:
        linear-gradient(180deg, rgba(18, 60, 115, 0.96), rgba(11, 39, 74, 0.98));
    color: #f3f7ff;
}

.report-note-panel .panel-eyebrow,
.report-note-panel h2,
.report-note-panel strong,
.report-note-panel span {
    color: inherit;
}

.report-note-block {
    display: grid;
    gap: 0.35rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.report-note-block:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.report-note-block:last-of-type {
    padding-bottom: 0;
}

.report-stat-table {
    display: grid;
    gap: 0.8rem;
}

.report-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(18, 60, 115, 0.08);
    background: linear-gradient(180deg, rgba(246, 248, 252, 0.96), rgba(255, 255, 255, 1));
}

.report-stat-row span {
    color: var(--color-text-muted);
}

.report-stat-row strong {
    color: var(--color-text-main);
    text-align: right;
}

.print-report-body {
    background: #eef3f9;
}

.print-report-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem;
}

.print-report-content {
    width: 100%;
}

.print-report-body .dashboard-grid,
.print-report-body .report-overview-grid {
    grid-template-columns: 1fr;
}

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

.print-report-body .table-wrap {
    overflow: visible;
}

.print-report-body .report-table {
    table-layout: auto;
}

.print-report-body .data-table th,
.print-report-body .data-table td {
    white-space: normal;
    vertical-align: top;
    word-break: normal;
    overflow-wrap: break-word;
}

.report-table th,
.report-table td {
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.report-table .cell-wrap {
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.report-toolbar-inline {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.report-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.panel-eyebrow {
    color: var(--color-text-muted);
}

.ghost-button {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.7rem 1rem;
    background: rgba(18, 60, 115, 0.04);
    color: var(--color-primary);
    cursor: pointer;
}

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

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

.data-table th,
.data-table td {
    padding: 0.95rem 0.8rem;
    border-bottom: 1px solid rgba(18, 60, 115, 0.08);
    text-align: left;
    white-space: nowrap;
}

.data-table th {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.status-paid,
.status-lunas,
.status-sudah-bayar {
    color: var(--color-success);
    background: rgba(29, 143, 106, 0.12);
}

.status-partial,
.status-sebagian,
.status-belum-bayar {
    color: var(--color-warning);
    background: rgba(209, 138, 24, 0.14);
}

.status-unpaid,
.status-belum-lunas,
.status-tidak-bayar {
    color: var(--color-danger);
    background: rgba(190, 91, 91, 0.14);
}

.activity-list {
    display: grid;
    gap: 0.95rem;
}

.activity-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid rgba(18, 60, 115, 0.08);
}

.activity-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.activity-time {
    display: inline-flex;
    justify-content: center;
    padding: 0.35rem 0.4rem;
    border-radius: 999px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.activity-item strong {
    display: block;
    margin-bottom: 0.35rem;
}

.activity-item p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.accent-panel {
    background:
        linear-gradient(180deg, rgba(18, 60, 115, 0.94), rgba(16, 54, 103, 0.96)),
        var(--color-surface);
    color: #f8fbff;
}

.accent-panel .panel-eyebrow,
.accent-panel li {
    color: rgba(239, 246, 255, 0.82);
}

.formula-list {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.8;
}

.compact-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(240, 247, 255, 0.92));
}

.quick-actions {
    display: grid;
    gap: 0.85rem;
}

.quick-action {
    display: flex;
    align-items: center;
    min-height: 3.2rem;
    padding: 0 1rem;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: var(--color-surface-strong);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.quick-action:hover {
    transform: translateY(-2px);
    border-color: rgba(18, 60, 115, 0.26);
    box-shadow: 0 18px 30px rgba(18, 60, 115, 0.08);
}

.quick-action-block {
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem;
}

.quick-action-block strong {
    font-size: 0.98rem;
}

.quick-action-block span {
    color: var(--color-text-muted);
    line-height: 1.55;
}

.quick-action-static:hover {
    transform: none;
    border-color: var(--color-border);
    box-shadow: none;
}

.spreadsheet-panel {
    margin-top: 1rem;
}

.attendance-panel {
    margin-top: 1rem;
}

.attendance-quick-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 0.9rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(18, 60, 115, 0.08);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.96));
}

.field {
    display: grid;
    gap: 0.4rem;
}

.field span {
    color: var(--color-text-muted);
    font-size: 0.84rem;
    font-weight: 600;
}

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

.attendance-submit {
    display: grid;
    gap: 0.45rem;
    align-self: stretch;
}

.attendance-submit-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.attendance-submit span {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.sheet-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.sheet-zoom-control {
    display: inline-grid;
    gap: 0.28rem;
}

.sheet-zoom-control span {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sheet-zoom-control select {
    min-height: 2.7rem;
    padding: 0.62rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 0.9rem;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
}

.confirm-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(11, 39, 74, 0.42);
    backdrop-filter: blur(6px);
}

.confirm-modal-backdrop[hidden] {
    display: none !important;
}

.confirm-modal {
    width: min(100%, 420px);
    padding: 1.4rem;
    border: 1px solid rgba(18, 60, 115, 0.12);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 60px rgba(9, 30, 66, 0.18);
}

.confirm-modal-head h3 {
    margin: 0;
    font-size: 1.2rem;
}

.confirm-modal-copy {
    margin: 0.9rem 0 0;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.2rem;
}

.sheet-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0 0 1rem;
}

.sheet-shortcuts span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(18, 60, 115, 0.08);
    border-radius: 999px;
    background: rgba(18, 60, 115, 0.04);
    color: var(--color-text-muted);
    font-size: 0.86rem;
}

.sheet-shortcuts strong {
    color: var(--color-primary);
}

.primary-button {
    border: 0;
    border-radius: 999px;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(18, 60, 115, 0.2);
}

.primary-button-compact {
    padding: 0.62rem 0.95rem;
    font-size: 0.92rem;
    box-shadow: 0 10px 18px rgba(18, 60, 115, 0.16);
}

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

.sheet-table {
    width: 100%;
    min-width: 1760px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    border: 1px solid rgba(18, 60, 115, 0.12);
    border-radius: 1rem;
    overflow: hidden;
    background: #ffffff;
    transform-origin: top left;
}

.sheet-table th,
.sheet-table td {
    padding: 0;
    border-right: 1px solid rgba(18, 60, 115, 0.08);
    border-bottom: 1px solid rgba(18, 60, 115, 0.08);
    vertical-align: middle;
}

.sheet-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0.82rem 0.9rem;
    background: #eef4fc;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sheet-table tbody tr:nth-child(even) td {
    background: rgba(18, 60, 115, 0.015);
}

.sheet-table tbody tr.is-entry-row td {
    background: rgba(15, 155, 170, 0.06);
}

.sheet-table .cell-no {
    position: sticky;
    left: 64px;
    z-index: 3;
}

.sheet-table .cell-pilih {
    position: sticky;
    left: 0;
    z-index: 4;
    width: 64px;
    min-width: 64px;
    text-align: center;
    background: #f8fbff;
}

.sheet-table td.cell-pilih {
    z-index: 2;
}

.sheet-table td.cell-no {
    z-index: 1;
}

.sheet-table .cell-aksi {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #ffffff;
}

.sheet-table tbody tr:nth-child(even) .cell-aksi {
    background: #f9fbff;
}

.sheet-table th:last-child,
.sheet-table td:last-child {
    border-right: 0;
}

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

.sheet-table input,
.sheet-table select,
.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.82rem 0.9rem;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
}

.sheet-table input:focus,
.sheet-table select:focus,
.field textarea {
    resize: vertical;
    min-height: 6.5rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    background: #f7fbff;
    box-shadow: inset 0 0 0 2px rgba(18, 60, 115, 0.18);
}

.sheet-table td:focus-within {
    background: #f7fbff;
}

.sheet-table .is-active-row td {
    background: rgba(18, 60, 115, 0.045);
}

.sheet-table .is-active-row .cell-no {
    background: #eaf2ff;
}

.sheet-table td.is-invalid {
    background: rgba(190, 91, 91, 0.08);
    box-shadow: inset 0 0 0 1px rgba(190, 91, 91, 0.18);
    position: relative;
}

.sheet-table td.is-valid {
    background: rgba(29, 143, 106, 0.04);
}

.sheet-table td.is-invalid::after {
    content: attr(data-message);
    display: block;
    padding: 0 0.9rem 0.7rem;
    color: var(--color-danger);
    font-size: 0.72rem;
    line-height: 1.35;
}

.sheet-table .row-no,
.sheet-table .cell-no {
    width: 64px;
    min-width: 64px;
    text-align: center;
}

.sheet-table .cell-pilih input[type='checkbox'] {
    width: 1.1rem;
    min-height: auto;
    height: 1.1rem;
    margin: 0;
    padding: 0;
    accent-color: var(--color-primary);
}

.sheet-table .row-no {
    padding: 0.82rem 0.4rem;
    background: #f8fbff;
    color: var(--color-text-muted);
    font-weight: 700;
}

.sheet-table .cell-date {
    width: 138px;
    min-width: 138px;
}

.sheet-table .cell-produk {
    width: 200px;
    min-width: 200px;
}

.sheet-table .cell-harga {
    width: 150px;
    min-width: 150px;
}

.sheet-table .cell-harga input {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.sheet-table .cell-sumber {
    width: 180px;
    min-width: 180px;
}

.sheet-table .cell-email {
    width: 230px;
    min-width: 230px;
}

.sheet-table .cell-nik {
    width: 170px;
    min-width: 170px;
}

.sheet-table .cell-nama {
    width: 190px;
    min-width: 190px;
}

.sheet-table .cell-password {
    width: 180px;
    min-width: 180px;
}

.sheet-table .cell-password input {
    letter-spacing: 0.08em;
}

.sheet-table .cell-status {
    width: 150px;
    min-width: 150px;
}

.sheet-table .cell-aksi {
    width: 120px;
    min-width: 120px;
}

.sheet-table .cell-aksi .ghost-button,
.sheet-table .cell-aksi .danger-button {
    width: calc(100% - 1rem);
    margin: 0.5rem;
    border-radius: 0.8rem;
}

.sheet-table input[list]::-webkit-calendar-picker-indicator {
    opacity: 0;
}

.auth-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-showcase,
.auth-panel {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
}

.auth-showcase {
    padding: 2.5rem;
    background:
        linear-gradient(135deg, rgba(18, 60, 115, 0.97), rgba(11, 39, 74, 0.95)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
    color: #f8fbff;
}

.auth-showcase h1 {
    margin: 0;
    max-width: 13ch;
    font-size: clamp(2.2rem, 3vw, 3.6rem);
    line-height: 1.03;
}

.auth-copy {
    max-width: 58ch;
    margin: 1rem 0 0;
    color: rgba(240, 246, 255, 0.82);
    line-height: 1.8;
}

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

.auth-highlight-card {
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.08);
}

.auth-highlight-card span {
    display: block;
    color: rgba(233, 243, 255, 0.72);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-highlight-card strong {
    display: block;
    margin-top: 0.55rem;
    font-size: 1.2rem;
}

.auth-highlight-card p {
    margin: 0.55rem 0 0;
    color: rgba(240, 246, 255, 0.78);
    line-height: 1.7;
}

.auth-panel {
    padding: 2rem;
}

.auth-panel-head h2 {
    margin: 0;
    font-size: 1.65rem;
}

.auth-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.password-field-wrap {
    position: relative;
}

.password-field-wrap input {
    padding-right: 3.4rem;
}

.password-toggle-button {
    position: absolute;
    top: 50%;
    right: 0.7rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(18, 60, 115, 0.08);
    color: var(--color-primary);
    cursor: pointer;
}

.password-toggle-button:hover {
    background: rgba(18, 60, 115, 0.14);
}

.password-toggle-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(18, 60, 115, 0.18);
}

.password-toggle-icon {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
}

.password-toggle-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field span {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.master-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.75rem;
}

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

.master-form-panel {
    order: 1;
}

.master-data-panel {
    order: 2;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.master-form .form-note,
.master-form .form-actions {
    grid-column: span 2;
}

.invoice-master-form {
    align-items: start;
}

.invoice-items-shell {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(18, 60, 115, 0.08);
    border-radius: 1rem;
    background: rgba(246, 248, 252, 0.8);
}

.invoice-items-list {
    display: grid;
    gap: 0.85rem;
}

.invoice-item-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto;
    gap: 0.8rem;
    padding: 0.9rem;
    border: 1px solid rgba(18, 60, 115, 0.08);
    border-radius: 1rem;
    background: #fff;
}

.invoice-item-remove-wrap {
    display: flex;
    align-items: end;
}

.flash-message {
    margin: 0 0 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(29, 143, 106, 0.16);
    border-radius: 1rem;
    background: rgba(29, 143, 106, 0.08);
    color: var(--color-success);
    line-height: 1.6;
}

.flash-message-warning {
    border-color: rgba(209, 138, 24, 0.18);
    background: rgba(209, 138, 24, 0.08);
    color: var(--color-warning);
}

.toast-stack {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 130;
    display: grid;
    gap: 0.75rem;
    width: min(92vw, 360px);
    pointer-events: none;
}

.toast-card {
    pointer-events: auto;
    display: grid;
    gap: 0.45rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(29, 143, 106, 0.16);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 40px rgba(9, 30, 66, 0.16);
    color: var(--color-success);
    transform: translateY(-8px);
    opacity: 0;
    animation: toast-slide-in 180ms ease forwards;
}

.toast-card.is-warning {
    border-color: rgba(209, 138, 24, 0.18);
    color: var(--color-warning);
}

.toast-card.is-danger {
    border-color: rgba(179, 61, 61, 0.18);
    color: #8c2f2f;
}

.toast-card.is-hiding {
    animation: toast-slide-out 180ms ease forwards;
}

.toast-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.toast-card-title {
    margin: 0;
    font-size: 0.96rem;
    color: var(--color-text-main);
}

.toast-card-copy {
    margin: 0;
    color: inherit;
    font-size: 0.92rem;
    line-height: 1.55;
}

.toast-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0.1rem;
}

@keyframes toast-slide-in {
    from {
        transform: translateY(-8px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-8px);
        opacity: 0;
    }
}

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

.table-actions-compact {
    align-items: center;
}

.table-detail {
    position: relative;
}

.table-detail summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    background: #ffffff;
    color: var(--color-text);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

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

.table-detail[open] summary {
    border-color: rgba(18, 60, 115, 0.18);
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.table-detail-card {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    z-index: 6;
    display: grid;
    gap: 0.45rem;
    min-width: 240px;
    max-width: 320px;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(18, 60, 115, 0.12);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(18, 60, 115, 0.14);
}

.table-detail-card span {
    color: var(--color-text-muted);
    line-height: 1.5;
    white-space: normal;
}

.table-detail-card strong {
    color: var(--color-text);
}

.cell-wrap {
    white-space: normal;
    min-width: 220px;
    line-height: 1.5;
}

.table-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 0.8fr)) auto;
    gap: 0.85rem;
    align-items: end;
    margin-bottom: 1rem;
}

.toolbar-search,
.toolbar-filter {
    display: grid;
    gap: 0.4rem;
}

.toolbar-search span,
.toolbar-filter span {
    color: var(--color-text-muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.toolbar-search input,
.toolbar-filter select,
.toolbar-filter input[type="date"],
.toolbar-filter input[type="month"] {
    width: 100%;
    min-height: 2.85rem;
    padding: 0.72rem 0.9rem;
    border: 1px solid rgba(18, 60, 115, 0.1);
    border-radius: 0.9rem;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
}

input[type="date"],
input[type="month"] {
    appearance: none;
    -webkit-appearance: none;
    min-height: 2.95rem;
    padding: 0.72rem 0.95rem;
    border: 1px solid rgba(18, 60, 115, 0.1);
    border-radius: 0.9rem;
    background:
        linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    color: var(--color-text);
    font: inherit;
    line-height: 1.2;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    padding: 0.2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    opacity: 0.7;
}

input[type="date"]:focus,
input[type="month"]:focus,
.toolbar-search input:focus,
.toolbar-filter select:focus,
.toolbar-filter input[type="date"]:focus,
.toolbar-filter input[type="month"]:focus {
    outline: none;
    border-color: rgba(18, 60, 115, 0.24);
    box-shadow: 0 0 0 3px rgba(18, 60, 115, 0.08);
}

.toolbar-small {
    max-width: 110px;
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.table-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.empty-state-cell {
    text-align: center;
    color: var(--color-text-muted);
    padding: 1.4rem 1rem;
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.pagination-bar-top {
    margin: 0 0 1rem;
}

.pagination-info {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.pagination-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    min-height: 2.4rem;
    padding: 0 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    background: #ffffff;
    color: var(--color-text);
    font-weight: 700;
}

.page-number.is-gap {
    pointer-events: none;
    cursor: default;
    background: transparent;
    border-color: transparent;
    color: var(--color-text-muted);
}

.page-number.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.ghost-button-small {
    padding: 0.55rem 0.85rem;
    font-size: 0.84rem;
}

.tombol-hapus-baris {
    min-width: auto;
}

.danger-button {
    color: var(--color-danger);
    border-color: rgba(190, 91, 91, 0.18);
    background: rgba(190, 91, 91, 0.04);
}

.form-note {
    margin: -0.2rem 0 0;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.sales-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-filter-panel {
    margin-top: 1rem;
}

.dashboard-filter-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 0.85rem;
    align-items: end;
}

.dashboard-filter-actions {
    justify-content: flex-end;
    align-self: stretch;
}

.dashboard-filter-actions .primary-button,
.dashboard-filter-actions .ghost-button {
    min-height: 2.85rem;
    padding: 0.68rem 1rem;
    font-size: 0.9rem;
}

.mini-overview-card {
    padding: 1rem 1.15rem;
    border: 1px solid var(--color-border);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-card);
}

.mini-overview-card span {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.88rem;
}

.mini-overview-card strong {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.55rem;
}

.mini-overview-note {
    display: block;
    margin-top: 0.45rem;
    color: var(--color-text-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.chart-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.chart-panel {
    width: 100%;
}

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

.pie-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.2rem;
    align-items: center;
}

.pie-chart {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 10px solid rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 1px rgba(18, 60, 115, 0.08), 0 18px 34px rgba(18, 60, 115, 0.08);
}

.pie-legend {
    display: grid;
    gap: 0.8rem;
}

.pie-legend-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
}

.pie-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-top: 0.2rem;
}

.pie-legend-copy {
    display: grid;
    gap: 0.18rem;
}

.pie-legend-copy strong {
    font-size: 0.92rem;
    color: var(--color-text);
}

.pie-legend-copy span {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.empty-state-text {
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.6;
}

.chart-toolbar {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.bar-chart {
    display: grid;
    grid-template-columns: repeat(31, minmax(16px, 1fr));
    gap: 0.4rem;
    align-items: end;
    min-height: 210px;
    padding-top: 0.4rem;
}

.bar-chart-monthly {
    grid-template-columns: repeat(12, minmax(44px, 1fr));
}

.bar-chart-item {
    display: grid;
    gap: 0.35rem;
    align-items: end;
}

.bar-chart-value {
    display: none;
}

.bar-chart-column {
    position: relative;
    height: 140px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.14rem;
    border-radius: 0.8rem;
    background: linear-gradient(180deg, rgba(18, 60, 115, 0.04), rgba(18, 60, 115, 0.1));
}

.bar-chart-fill {
    width: 100%;
    border-radius: 0.8rem 0.8rem 0.35rem 0.35rem;
    background: linear-gradient(180deg, #16a3b7 0%, #123c73 100%);
    box-shadow: 0 12px 24px rgba(18, 60, 115, 0.16);
}

.bar-chart-fill.tone-monthly {
    background: linear-gradient(180deg, #e3b23c 0%, #123c73 100%);
}

.bar-chart-label {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
}

.sheet-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.sheet-toolbar-item {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(18, 60, 115, 0.08);
    border-radius: 1rem;
    background: #f7faff;
}

.sheet-toolbar-item span {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sheet-toolbar-item strong {
    display: block;
    margin-top: 0.4rem;
    line-height: 1.55;
}

.sheet-submit-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.sheet-submit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sheet-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

.sheet-summary strong {
    color: var(--color-text);
}

.table-inline-note {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.sales-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.side-info-panel {
    padding-bottom: 1.1rem;
}

.master-list {
    display: grid;
    gap: 0.8rem;
}

.master-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(18, 60, 115, 0.08);
    border-radius: 1rem;
    background: #f8fbff;
}

.master-item strong,
.master-item b {
    display: block;
}

.master-item span {
    display: block;
    margin-top: 0.25rem;
    color: var(--color-text-muted);
    font-size: 0.84rem;
}

.source-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.source-tags span {
    display: inline-flex;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 700;
}

.formula-dark {
    color: var(--color-text);
}

.status-audit {
    background: rgba(18, 60, 115, 0.12);
    color: var(--color-primary-dark);
}

.auth-panel-simple {
    width: min(100%, 480px);
    padding: 2.2rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.96));
}

.eyebrow-dark {
    color: var(--color-primary);
}

.auth-brand-lockup {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-brand-mark {
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 1.05rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    box-shadow: 0 16px 28px rgba(18, 60, 115, 0.2);
}

.auth-brand-logo {
    width: 4.2rem;
    height: 4.2rem;
    object-fit: contain;
    flex-shrink: 0;
}

.auth-panel-head {
    display: grid;
    gap: 0.9rem;
}

.auth-panel-copy {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.auth-submit-button {
    width: 100%;
    min-height: 3.15rem;
    margin-top: 0.35rem;
}

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

    .chart-stack,
    .pie-grid,
    .dashboard-grid,
    .hero-panel,
    .master-layout-grid,
    .sales-bottom-grid,
    .dashboard-filter-bar {
        grid-template-columns: 1fr;
    }

    .auth-showcase h1 {
        max-width: none;
    }
}

@media (max-width: 900px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
    }

    .main-content {
        padding: 1rem;
    }

    .hero-panel,
    .panel,
    .kpi-card,
    .auth-showcase,
    .auth-panel {
        border-radius: 1.25rem;
    }

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

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

    .chart-stack,
    .pie-grid,
    .sales-overview-grid,
    .sheet-toolbar,
    .table-toolbar,
    .dashboard-filter-bar {
        grid-template-columns: 1fr;
    }

    .pie-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .pie-chart {
        width: 180px;
        height: 180px;
    }

    .bar-chart {
        grid-template-columns: repeat(10, minmax(18px, 1fr));
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .bar-chart-item {
        min-width: 42px;
    }

    .bar-chart-monthly {
        grid-template-columns: repeat(6, minmax(52px, 1fr));
    }

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

    .field-wide {
        grid-column: auto;
    }

    .table-meta,
    .pagination-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .sheet-submit-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .sheet-shortcuts {
        flex-direction: column;
        align-items: flex-start;
    }

    .sheet-table {
        min-width: 1320px;
    }

    .hero-panel {
        padding: 1.4rem;
    }

    .hero-panel h1 {
        max-width: none;
        font-size: 2rem;
    }

    .panel-head {
        flex-direction: column;
    }

    .auth-shell {
        padding: 1rem;
    }

    .auth-showcase,
    .auth-panel {
        padding: 1.4rem;
    }

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

    .sheet-actions,
    .topbar-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 1080px) {
    .sidebar-backdrop {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        width: min(320px, calc(100vw - 2rem));
        box-shadow: 0 24px 60px rgba(9, 30, 66, 0.28);
    }

    .sidebar-mobile-head {
        display: flex;
    }

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

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.sidebar-collapsed .sidebar {
        width: min(320px, calc(100vw - 2rem));
        padding-inline: 1.4rem;
    }

    body.sidebar-collapsed .sidebar .brand-block > div:last-child,
    body.sidebar-collapsed .sidebar .nav-link .nav-label,
    body.sidebar-collapsed .sidebar .sidebar-footer {
        display: block;
    }

    body.sidebar-collapsed .sidebar .nav-link {
        justify-content: flex-start;
        padding-inline: 1rem;
    }

    .main-content {
        width: 100%;
        padding: 1.4rem;
    }

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

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .topbar-main {
        width: 100%;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    body {
        background: #ffffff;
    }

    .sidebar,
    .sidebar-backdrop,
    .topbar,
    .sidebar-toggle-button,
    .ghost-button,
    .primary-button,
    .pagination-bar,
    .table-toolbar-inline {
        display: none !important;
    }

    .app-shell,
    .main-content,
    .panel,
    .panel-wide {
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: 0;
        background: #ffffff;
    }

    .kpi-grid,
    .sales-overview-grid,
    .report-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.7rem;
    }

    .report-overview-grid {
        grid-template-columns: 1fr !important;
    }

    .print-report-body .dashboard-grid,
    .print-report-body .report-overview-grid,
    .print-report-body .report-meta-grid {
        grid-template-columns: 1fr !important;
    }

    .print-report-body .kpi-grid {
        grid-template-columns: 1fr 1fr 1fr !important;
    }

    .print-report-body .panel,
    .print-report-body .panel-wide,
    .print-report-body .compact-panel,
    .print-report-body .kpi-card,
    .print-report-body .report-meta-card,
    .print-report-body .report-stat-row {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .kpi-card,
    .mini-overview-card,
    .report-meta-card,
    .quick-action,
    .report-note-panel,
    .report-stat-row {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #d9e1ec;
        background: #ffffff;
        color: #172033 !important;
    }

    .table-wrap {
        overflow: visible;
    }

    .data-table {
        font-size: 10.5px;
    }

    .report-table {
        table-layout: auto !important;
        width: 100% !important;
    }

    .data-table th,
    .data-table td {
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
        hyphens: none;
        line-height: 1.3;
        padding: 0.34rem 0.28rem;
    }

    .report-table th,
    .report-table td {
        font-size: 9.2px;
    }

    .report-table th:first-child,
    .report-table td:first-child {
        width: 28px;
    }

    .report-table .status-pill {
        padding: 0.22rem 0.4rem;
        font-size: 0.66rem;
        white-space: nowrap;
    }

    .print-report-body .panel-head {
        gap: 0.6rem;
        margin-bottom: 0.75rem;
    }

    .print-report-body .panel {
        padding: 0.85rem;
    }

    .print-report-body .report-summary-list {
        gap: 0.55rem;
        line-height: 1.45;
    }

    .print-report-body .report-stat-row {
        padding: 0.55rem 0.65rem;
    }

    .panel-head-secondary {
        border-top: 1px solid #d9e1ec;
    }
}

.npwp-layout {
    display: grid;
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.npwp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.95rem;
}

.inline-notice {
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(18, 60, 115, 0.1);
    background: rgba(18, 60, 115, 0.05);
    color: #123c73;
}

.inline-notice-danger {
    border-color: rgba(179, 61, 61, 0.16);
    background: rgba(179, 61, 61, 0.07);
    color: #8c2f2f;
}

.npwp-field small {
    color: #b33d3d;
}

.npwp-field.has-error input,
.npwp-field.has-error textarea {
    box-shadow: inset 0 0 0 2px rgba(179, 61, 61, 0.15);
}

.npwp-form-grid .form-field-full,
.npwp-form-grid .form-note,
.npwp-form-grid .form-actions {
    grid-column: 1 / -1;
}

.npwp-preview-shell {
    border: 1px solid #d9e1ec;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #f4f7fb 0%, #edf2f9 100%);
    min-height: calc(100vh - 10.5rem);
}

.npwp-preview-frame {
    width: 100%;
    min-height: calc(100vh - 10.5rem);
    border: 0;
    background: #f3f6fb;
}

.npwp-preview-empty {
    min-height: calc(100vh - 10.5rem);
    border: 1px dashed #c7d2e1;
    border-radius: 22px;
    display: grid;
    place-content: center;
    text-align: center;
    padding: 2rem;
    color: #60708a;
    background: linear-gradient(180deg, rgba(18, 60, 115, 0.03), rgba(22, 163, 183, 0.02));
}

.npwp-preview-empty strong {
    display: block;
    color: #172033;
    margin-bottom: 0.45rem;
}

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

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

    .npwp-preview-shell,
    .npwp-preview-frame,
    .npwp-preview-empty {
        min-height: 560px;
    }
}
