/* ============================================================
   KAS.CSS — Modul Uang Kas Kelas
   Website Kelas RPL × BC
   
   Extends style.css — do NOT duplicate existing rules
   ============================================================ */

/* ============================================================
   KAS PAGE HEADER
   ============================================================ */
.kas-page-hero {
    background: linear-gradient(135deg, var(--headline) 0%, #172c66 50%, #0d1f4d 100%);
    color: white;
    padding: 3rem 0 2rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.kas-page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(139, 211, 221, 0.08);
    border-radius: 50%;
}

.kas-page-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(245, 130, 174, 0.06);
    border-radius: 50%;
}

.kas-page-hero .container {
    position: relative;
    z-index: 1;
}

.kas-page-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.kas-page-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
}

.kas-page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 1rem;
}

.kas-page-breadcrumb a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.kas-page-breadcrumb a:hover {
    color: white;
}

/* ============================================================
   KAS SUMMARY CARDS
   ============================================================ */
.kas-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: -2rem 0 2rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .kas-cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        margin: -2.5rem 0 2.5rem;
    }
}

.kas-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.kas-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.kas-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.kas-card.card-saldo::before { background: linear-gradient(90deg, var(--headline), var(--secondary)); }
.kas-card.card-income::before { background: linear-gradient(90deg, #4caf50, #81c784); }
.kas-card.card-expense::before { background: linear-gradient(90deg, var(--tertiary), #ff8a80); }
.kas-card.card-target::before { background: linear-gradient(90deg, var(--secondary), #64b5f6); }

.kas-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.card-saldo .kas-card-icon { background: rgba(0,24,88,0.08); color: var(--headline); }
.card-income .kas-card-icon { background: rgba(76,175,80,0.1); color: #2e7d32; }
.card-expense .kas-card-icon { background: rgba(245,130,174,0.12); color: #c62828; }
.card-target .kas-card-icon { background: rgba(139,211,221,0.15); color: #01579b; }

.kas-card-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--paragraph);
    opacity: 0.6;
    margin-bottom: 0.25rem;
}

.kas-card-value {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--headline);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .kas-card { padding: 1.5rem; }
    .kas-card-value { font-size: 1.6rem; }
}

.kas-card-note {
    font-size: 0.78rem;
    color: var(--paragraph);
    opacity: 0.55;
    margin-top: 0.25rem;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.kas-progress-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.kas-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kas-progress-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--headline);
}

.kas-progress-pct {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--headline);
}

.kas-progress-bar-wrap {
    width: 100%;
    height: 12px;
    background: rgba(0,24,88,0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.kas-progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--secondary), var(--headline));
    width: 0%;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.kas-progress-bar-fill.reached {
    background: linear-gradient(90deg, #4caf50, #2e7d32);
}

.kas-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--paragraph);
    opacity: 0.65;
}

/* ============================================================
   SECTION LAYOUTS
   ============================================================ */
.kas-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .kas-content-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.kas-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.kas-section-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.kas-section-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--headline);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kas-section-body {
    padding: 1.25rem 1.5rem;
}

/* ============================================================
   TRANSACTION LIST / TABLE
   ============================================================ */
.trx-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trx-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(0,24,88,0.06);
    transition: background var(--transition-fast);
}

.trx-item:last-child { border-bottom: none; }

.trx-item:hover {
    background: rgba(0,24,88,0.02);
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.trx-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.trx-dot.income { background: #4caf50; }
.trx-dot.expense { background: var(--tertiary); }

.trx-info {
    flex: 1;
    min-width: 0;
}

.trx-desc {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--headline);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trx-meta {
    font-size: 0.76rem;
    color: var(--paragraph);
    opacity: 0.6;
    margin-top: 1px;
}

.trx-amount {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.trx-amount.income { color: #2e7d32; }
.trx-amount.expense { color: #c62828; }

/* Transaction Table (riwayat page) */
.kas-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: white;
}

.kas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.kas-table th {
    background: rgba(0,24,88,0.04);
    color: var(--headline);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.kas-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(0,24,88,0.05);
    color: var(--paragraph);
    vertical-align: middle;
}

.kas-table tbody tr:hover { background: rgba(0,24,88,0.02); }
.kas-table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   BADGES
   ============================================================ */
.kas-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.kas-badge.badge-income {
    background: rgba(76,175,80,0.12);
    color: #2e7d32;
}

.kas-badge.badge-expense {
    background: rgba(245,130,174,0.15);
    color: #c62828;
}

.kas-badge.badge-lunas {
    background: rgba(76,175,80,0.12);
    color: #2e7d32;
}

.kas-badge.badge-belum {
    background: rgba(245,130,174,0.15);
    color: #c62828;
}

.kas-badge.badge-kurang {
    background: rgba(255,152,0,0.15);
    color: #e65100;
}

.kas-badge.badge-active {
    background: rgba(139,211,221,0.2);
    color: #01579b;
}

/* ============================================================
   CHART / VISUALIZATION
   ============================================================ */
.kas-chart-wrap {
    position: relative;
    width: 100%;
    height: 220px;
}

.kas-chart-canvas {
    width: 100% !important;
    height: 100% !important;
}

.kas-chart-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.kas-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--paragraph);
}

.kas-chart-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.kas-filter-bar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.kas-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 140px;
}

.kas-filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--headline);
    opacity: 0.6;
}

.kas-filter-input,
.kas-filter-select {
    padding: 0.55rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--headline);
    background: var(--bg);
    font-family: var(--font-body);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    width: 100%;
}

.kas-filter-input:focus,
.kas-filter-select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(139,211,221,0.2);
}

.kas-filter-tabs {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.kas-filter-tab {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--paragraph);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.kas-filter-tab:hover {
    border-color: var(--headline);
    color: var(--headline);
}

.kas-filter-tab.active {
    background: var(--headline);
    border-color: var(--headline);
    color: white;
}

/* ============================================================
   PAYMENT TABLE (pembayaran siswa)
   ============================================================ */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 600px) {
    .payment-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .payment-grid { grid-template-columns: repeat(5, 1fr); }
}

.payment-stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.payment-stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--headline);
    display: block;
}

.payment-stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: var(--paragraph);
    opacity: 0.6;
    margin-top: 0.25rem;
}

/* ============================================================
   WARNING ALERTS
   ============================================================ */
.kas-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    border-left: 4px solid;
}

.kas-warning.warn-danger {
    background: rgba(229,57,53,0.06);
    border-color: #e53935;
    color: #b71c1c;
}

.kas-warning.warn-warning {
    background: rgba(255,152,0,0.08);
    border-color: #ff9800;
    color: #e65100;
}

.kas-warning.warn-success {
    background: rgba(76,175,80,0.08);
    border-color: #4caf50;
    color: #1b5e20;
}

.kas-warning.warn-info {
    background: rgba(139,211,221,0.15);
    border-color: var(--secondary);
    color: #01579b;
}

.kas-warning-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.5; }
.kas-warning-text { flex: 1; }
.kas-warning-title { font-weight: 700; margin-bottom: 2px; }

/* ============================================================
   FORMS
   ============================================================ */
.kas-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .kas-form-grid.two-col {
        grid-template-columns: 1fr 1fr;
    }
    .kas-form-grid.three-col {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.kas-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.kas-form-group.full { grid-column: 1 / -1; }

.kas-form-label {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--headline);
}

.kas-form-label .required {
    color: var(--tertiary);
    margin-left: 2px;
}

.kas-form-input,
.kas-form-select,
.kas-form-textarea {
    padding: 0.65rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--headline);
    background: white;
    font-family: var(--font-body);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    width: 100%;
}

.kas-form-input:focus,
.kas-form-select:focus,
.kas-form-textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(139,211,221,0.18);
}

.kas-form-textarea { resize: vertical; min-height: 80px; }

.kas-form-note {
    font-size: 0.76rem;
    color: var(--paragraph);
    opacity: 0.55;
    margin-top: 2px;
}

.kas-form-saldo-info {
    background: rgba(139,211,221,0.12);
    border: 1px solid rgba(139,211,221,0.4);
    border-radius: var(--radius-sm);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--headline);
}

/* ============================================================
   MODAL
   ============================================================ */
.kas-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.kas-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.kas-modal {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-base);
}

.kas-modal-overlay.open .kas-modal {
    transform: scale(1) translateY(0);
}

.kas-modal-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--headline);
    margin-bottom: 1rem;
}

.kas-modal-info {
    background: rgba(0,24,88,0.04);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.kas-modal-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(0,24,88,0.06);
}

.kas-modal-info-row:last-child { border-bottom: none; }
.kas-modal-info-row .key { color: var(--paragraph); opacity: 0.65; }
.kas-modal-info-row .val { font-weight: 700; color: var(--headline); }

.kas-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.kas-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.kas-toast {
    background: var(--headline);
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    pointer-events: auto;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 340px;
}

.kas-toast.show { transform: translateX(0); }
.kas-toast.success { background: #2e7d32; }
.kas-toast.error { background: #c62828; }
.kas-toast.warning { background: #e65100; }

/* ============================================================
   EMPTY STATE (Kas)
   ============================================================ */
.kas-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.kas-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.kas-empty-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--headline);
    margin-bottom: 0.5rem;
}

.kas-empty-text {
    font-size: 0.875rem;
    color: var(--paragraph);
    opacity: 0.6;
    margin-bottom: 1.25rem;
    max-width: 300px;
}

/* ============================================================
   TOP EXPENSES WIDGET
   ============================================================ */
.top-expense-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-expense-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,24,88,0.06);
}

.top-expense-item:last-child { border-bottom: none; }

.top-expense-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,24,88,0.06);
    color: var(--headline);
    font-size: 0.78rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.top-expense-item:nth-child(1) .top-expense-rank { background: #FFD700; color: #7a5e00; }
.top-expense-item:nth-child(2) .top-expense-rank { background: #C0C0C0; color: #4a4a4a; }
.top-expense-item:nth-child(3) .top-expense-rank { background: #CD7F32; color: #5d3100; }

.top-expense-info { flex: 1; min-width: 0; }

.top-expense-cat {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--headline);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-expense-desc {
    font-size: 0.75rem;
    color: var(--paragraph);
    opacity: 0.55;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-expense-amount {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 800;
    color: #c62828;
    white-space: nowrap;
}

/* ============================================================
   CATEGORY BREAKDOWN
   ============================================================ */
.cat-breakdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cat-breakdown-item {}

.cat-breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
    font-size: 0.84rem;
}

.cat-breakdown-name { font-weight: 600; color: var(--headline); }
.cat-breakdown-pct { color: var(--paragraph); opacity: 0.6; font-weight: 600; }

.cat-breakdown-bar-wrap {
    height: 8px;
    background: rgba(0,24,88,0.07);
    border-radius: 999px;
    overflow: hidden;
}

.cat-breakdown-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s ease;
}

/* ============================================================
   HOME PAGE KAS CARD (ringkasan di homepage)
   ============================================================ */
.kas-home-card {
    background: linear-gradient(135deg, var(--headline) 0%, #172c66 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.kas-home-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(139,211,221,0.12);
    border-radius: 50%;
}

.kas-home-card-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.65);
    margin-bottom: 0.5rem;
}

.kas-home-card-saldo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
}

/* ============================================================
   LAPORAN PRINT STYLES
   ============================================================ */
@media print {
    .navbar,
    .kas-filter-bar,
    .kas-modal-overlay,
    .kas-toast-container,
    .no-print,
    .btn-print,
    .admin-sidebar,
    .admin-header {
        display: none !important;
    }

    body {
        background: white !important;
        color: #000 !important;
        font-size: 12pt;
    }

    .kas-page-hero {
        background: #001858 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .kas-card, .kas-section {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    .kas-table th {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #001858;
    }

    .print-header h1 { font-size: 16pt; }
    .print-header p { font-size: 10pt; color: #555; }
    
    .print-summary-box {
        border: 2px solid #001858 !important;
        border-radius: 4px;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
}

.print-header { display: none; }

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
    .kas-filter-bar {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .kas-filter-group {
        min-width: 100% !important;
        width: 100% !important;
    }

    div[style*="minmax(160px"],
    div[style*="minmax(180px"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .kas-filter-tabs {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .kas-filter-tab {
        flex: 1 1 auto;
        text-align: center;
        font-size: 0.78rem;
        padding: 0.45rem 0.65rem;
    }

    .kas-table-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .kas-table {
        min-width: 620px;
    }

    .quick-actions {
        flex-wrap: wrap;
    }

    .kas-section-header {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
    }

    .kas-section-body {
        padding: 1rem 1.25rem;
    }

    .kas-progress-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .kas-dash-tab-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .kas-table {
        font-size: 0.78rem;
    }
    
    .kas-table th, .kas-table td {
        padding: 0.625rem 0.625rem;
    }

    .kas-modal {
        padding: 1.25rem 1rem;
        border-radius: var(--radius-lg);
        width: calc(100% - 0.5rem);
    }

    .kas-modal-title {
        font-size: 1.1rem;
    }

    .kas-modal-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .kas-modal-actions .btn {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }

    .kas-card-value {
        font-size: 1.15rem;
    }

    .kas-page-title {
        font-size: 1.35rem;
    }

    .kas-progress-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .kas-warning {
        padding: 0.75rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 360px) {
    .kas-modal {
        padding: 1rem 0.75rem;
    }

    .kas-table {
        font-size: 0.75rem;
    }

    .kas-filter-bar {
        padding: 0.75rem 0.5rem;
    }

    .kas-filter-tab {
        font-size: 0.72rem;
        padding: 0.35rem 0.5rem;
    }

    .kas-section-header,
    .kas-section-body {
        padding: 0.875rem 0.75rem;
    }

    div[style*="minmax(160px"],
    div[style*="minmax(180px"] {
        grid-template-columns: 1fr !important;
    }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .kas-progress-bar-fill,
    .kas-toast,
    .kas-modal,
    .kas-card {
        transition: none !important;
    }
}

