* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #4185f4;
    --primary-light: #e8f0fe;
    --primary-dark: #1a73e8;
    --bg-color: #f7f9fc;
    --card-bg: #ffffff;
    --text-main: #3c4043;
    --text-muted: #70757a;

    --pemasukan: #34a853;
    --pengeluaran: #ea4335;
    --investasi: #4285f4;
    --warning: #fbbc04;

    --shadow-soft: 0 8px 24px rgba(149, 157, 165, 0.1);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --transition: all 0.25s ease-in-out;
    --pro-color: #ffd700;
    --pro-gradient: linear-gradient(135deg, #ffd700, #ffa500);
    --free-color: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* App Container */
.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f8fafc;
    position: relative;
    max-width: 100vw;
}

@media (max-width: 991px) {
    .main-content {
        padding: 16px;
        padding-bottom: 100px;
    }
}

/* Glass Card refined to Professional Card */
.glass-card {
    background: var(--card-bg);
    border: 1px solid #f1f3f4;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 20px;
    margin-bottom: 20px;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e8eaed;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    z-index: 1100;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    transition: transform 0.3s ease;
}

@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    margin-bottom: 32px;
}

.logo i {
    color: var(--primary);
    font-size: 24px;
    background: var(--primary-light);
    padding: 10px;
    border-radius: 12px;
}

.logo span {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--primary-dark);
}

.desktop-nav li {
    padding: 12px 24px;
    margin: 4px 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    border-radius: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.desktop-nav li i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.desktop-nav li:hover {
    background: #f8f9fa;
    color: var(--primary);
}

.desktop-nav li.active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.nav-footer {
    padding: 24px;
    border-top: 1px solid #e8eaed;
    margin-top: auto;
}

/* Bottom Nav - Professional Style */
.bottom-nav {
    display: block;
    position: fixed;
    bottom: 0;
    right: 0;
    width: calc(100% - 280px);
    background: #ffffff;
    border-top: 1px solid #e8eaed;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 70px;
}

.mobile-nav li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    width: 20%;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-nav li i {
    font-size: 22px;
}

.mobile-nav li.active {
    color: var(--primary-dark);
}

/* --- FORMAL FINANCIAL REPORT STYLING --- */
.lb-row-formal {
    display: flex;
    justify-content: space-between;
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.lb-row-formal span:first-child {
    font-weight: 500;
    color: #475569;
}

.val-pemasukan {
    color: #059669;
    font-weight: 700;
}

.val-pengeluaran {
    color: #dc2626;
    font-weight: 700;
}

.asset-card-formal {
    padding: 15px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.asset-card-formal .label {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
}

.asset-card-formal .value {
    font-size: 18px;
    font-weight: 900;
}

.shadow-row {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.top-nav-bar.sticky-top-pro {
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .top-nav-bar.sticky-top-pro {
        border-radius: 0 0 20px 20px;
        margin: -16px -16px 16px -16px;
        /* Berikan jarak (margin-bottom positif) agar konten di bawah tidak mentok */
        width: calc(100% + 32px);
        padding: 15px 20px;
    }
}

/* Main Content Layout */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background-color: var(--bg-color);
}

/* Header & Profile Section - Like "Konsinyor Smart" */
.top-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    background: white;
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-info .avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: white;
    padding: 2px;
    border: 1px solid #e8eaed;
    object-fit: contain;
}

.profile-info .text-stack h2 {
    font-size: 16px;
    font-weight: 700;
    color: #202124;
}

.profile-info .text-stack p {
    font-size: 12px;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* User Status Badges */
.badge-status-free {
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    border: 1px solid #e2e8f0;
}

.badge-status-pro {
    background: var(--pro-gradient);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.diamond-icon {
    font-size: 10px;
    color: var(--pro-color);
    margin-left: 4px;
}

.diamond-mini {
    font-size: 8px;
    color: white;
    background: var(--pro-gradient);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
    border: 1px solid white;
}

.badge-pro {
    background: linear-gradient(135deg, #fbbc04, #ea4335);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

/* Page Section Animation */
.page-section {
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: visible !important;
}

.page-section.active {
    display: block;
    padding-top: 10px;
    /* Tambahkan sedikit ruang di atas setiap section */
}

@media (max-width: 768px) {
    .page-section.active {
        padding-top: 15px;
        /* Lebih banyak ruang di mobile */
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Summary Cards Grid */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.card {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    padding: 12px;
    border: 1px solid #e8eaed;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.card-info h3 {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-info h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

/* Charts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.chart-container {
    padding: 20px;
}

.chart-container h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

/* Transaksi Section */
.transaksi-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
}

.form-group {
    margin-bottom: 15px;
}

.row-group {
    display: flex;
    gap: 10px;
}

.row-group .col {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Outfit';
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(42, 183, 202, 0.15);
}

.badge-action {
    background: rgba(42, 183, 202, 0.1);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
}

.badge-action:hover {
    background: rgba(42, 183, 202, 0.2);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:active {
    transform: scale(0.98);
    background: var(--primary-dark);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-main);
}

.btn-secondary:active {
    transform: scale(0.98);
    background: #cbd5e0;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
    flex: none;
}

.filter-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    background: #f8fafc;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.filter-group-v {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-row select,
.filter-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-main);
    background: white;
    min-width: 100px;
}

.export-group {
    display: flex;
    gap: 10px;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 14px 10px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}

table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
}

table td {
    font-size: 14px;
}

.trx-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trx-title {
    font-weight: 600;
    color: var(--text-main);
}

.trx-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.nom-val {
    font-weight: 700;
    white-space: nowrap;
}

.nom-val.plus {
    color: var(--pemasukan);
}

.nom-val.minus {
    color: var(--pengeluaran);
}

.nom-val.neutral.blue {
    color: #3b82f6;
}

.act-col {
    width: 160px;
    text-align: right;
}

.action-btns {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-edit {
    background: rgba(42, 183, 202, 0.1);
    color: var(--primary);
}

.btn-edit:active {
    background: rgba(42, 183, 202, 0.2);
}

.btn-delete {
    background: rgba(255, 82, 82, 0.1);
    color: var(--pengeluaran);
}

.btn-delete:active {
    background: rgba(255, 82, 82, 0.2);
}

.btn-move {
    background: rgba(113, 128, 150, 0.1);
    color: var(--text-muted);
}

.btn-move:active {
    background: rgba(113, 128, 150, 0.2);
}

.action-grid {
    display: flex;
    gap: 12px;
}

.btn-action-v {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 65px;
    flex: 1;
}

.btn-action-v i {
    font-size: 18px;
}

.btn-action-v span {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.btn-action-v:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-action-v:active {
    transform: translateY(0);
    background: #edf2f7;
}

/* Grouped Transaction Styles */
.date-group-header {
    background: rgba(42, 183, 202, 0.05) !important;
}

.date-group-header td {
    padding: 12px 15px !important;
    border-bottom: 1px solid rgba(42, 183, 202, 0.1) !important;
}

.date-group-header span {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
}

.trx-row {
    transition: var(--transition);
}

.trx-row:hover {
    background: rgba(0, 0, 0, 0.01);
}

.badge-type {
    background: #e2e8f0;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-muted);
}

.trx-desc {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
    display: block;
}

.trx-meta i {
    width: 14px;
    text-align: center;
}

/* Settings Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 95%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: 0.3s;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.setting-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.setting-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Audit Section */
.audit-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 24px;
}

.score-circle {
    width: 100px;
    flex-shrink: 0;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

.percentage {
    fill: #2d3748;
    font-family: 'Outfit';
    font-size: 0.5em;
    text-anchor: middle;
    font-weight: 700;
}

.circular-chart.green .circle {
    stroke: var(--pemasukan);
}

.circular-chart.orange .circle {
    stroke: var(--warning);
}

.circular-chart.red .circle {
    stroke: var(--pengeluaran);
}

.audit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.audit-list {
    list-style: none;
    margin-top: 15px;
}

.audit-list li {
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.audit-list li i {
    margin-top: 3px;
    font-size: 16px;
}

i.orange {
    color: var(--warning);
}

i.yellow {
    color: #ffca28;
}

i.green {
    color: var(--pemasukan);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .transaksi-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .bottom-nav {
        display: block;
        width: 100%;
        left: 0;
    }

    .main-content {
        padding: 16px;
        padding-bottom: 100px;
        width: 100%;
        margin: 0;
    }

    .filter-actions-bar {
        padding: 12px;
        gap: 12px;
    }
}

/* Legacy top-header removed */

h1 {
    font-size: 24px;
}

.audit-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
}

.audit-grid {
    grid-template-columns: 1fr;
}

.summary-cards {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.card-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
    border-radius: 10px;
}

.card-info h2 {
    font-size: 18px;
}

/* Responsive Table Styles */
.responsive-table,
.responsive-table tbody,
.responsive-table tr,
.responsive-table td {
    display: block;
    width: 100%;
}

.responsive-table thead {
    display: none;
}

.responsive-table tr {
    background: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.responsive-table tr.date-group-header {
    background: rgba(42, 183, 202, 0.1);
    padding: 8px 12px;
    margin-top: 5px;
    margin-bottom: 8px;
    box-shadow: none;
    border: none;
}

.responsive-table tr.date-group-header td {
    display: block;
    width: 100%;
    padding: 0;
}

/* Legacy responsive table rules removed */

/* --- PRINT RULES --- */
@media print {
    body {
        background: white;
        color: black;
    }

    .sidebar,
    .bottom-nav,
    .top-header,
    .fab-btn,
    .filter-actions-bar,
    .no-print,
    .action-btns {
        display: none !important;
    }

    .main-content {
        padding: 0;
        overflow: visible;
    }

    .page-section {
        display: none;
    }

    #laporan.active {
        display: block;
    }

    .glass-card {
        background: none;
        box-shadow: none;
        border: none;
        backdrop-filter: none;
        padding: 0;
    }

    .print-area table td {
        padding: 6px 0;
        border-bottom: 1px dotted #ccc;
    }
}

@media (max-width: 480px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
}

.ai-highlight {
    animation: ai-pulse 1s ease;
}

@keyframes ai-pulse {
    0% {
        background-color: transparent;
    }

    50% {
        background-color: rgba(42, 183, 202, 0.1);
    }

    100% {
        background-color: transparent;
    }
}

.ai-pulse-highlight {
    animation: ai-pulse 1s ease;
}

@keyframes ai-pulse {
    0% {
        background-color: transparent;
    }

    50% {
        background-color: rgba(42, 183, 202, 0.15);
    }

    100% {
        background-color: transparent;
    }
}

.archive-bar {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.select-sm {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: white;
    font-family: inherit;
    color: var(--text-main);
    cursor: pointer;
}


/* NEW MOBILE OPTIMIZATIONS */
@media (max-width: 1024px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .dashboard-grid,
    .audit-grid {
        grid-template-columns: 1fr !important;
    }

    .transaksi-container {
        grid-template-columns: 1fr !important;
        width: calc(100% + 32px) !important;
        margin: -16px -16px 0 -16px !important;
        overflow: visible !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: flex !important;
        position: fixed;
        left: -280px;
        top: 0;
        height: 100%;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        left: 0;
    }

    .bottom-nav {
        display: block !important;
    }

    .main-content {
        padding: 15px 15px 90px 15px !important;
    }

    .no-mobile {
        display: none !important;
    }

    /* Redundant header rules removed to prevent mobile stacking */

    #dashboard-range {
        flex: 1;
        min-width: 120px;
    }

    .summary-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        /* Forces 2 columns on mobile */
        gap: 10px !important;
    }

    .card-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
    }

    .card-info h3 {
        font-size: 10px !important;
    }

    .card-info h2 {
        font-size: 14px !important;
        font-weight: 800 !important;
    }

    .filter-actions-bar {
        flex-direction: column !important;
        background: rgba(255, 255, 255, 0.6) !important;
        padding: 15px !important;
        border-radius: 15px !important;
    }

    .filter-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .filter-row select,
    .filter-row input {
        font-size: 13px !important;
        padding: 10px !important;
        border-radius: 10px !important;
    }

    .export-group {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .badge-action {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Removed Card Table View to maintain compact table layout on mobile */
    .modal-content {
        width: 94% !important;
        padding: 20px !important;
        border-radius: 24px !important;
    }
}


.day-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(42, 183, 202, 0.2);
}


/* NEW PRO THEME (RED) */
/* PRO THEME STICKY HEADER REFINED */
.header-red-sticky {
    background: var(--primary);
    color: white;
    position: sticky;
    top: 74px;
    /* Matches white header bottom on desktop usually */
    z-index: 990;
    border-radius: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(42, 183, 202, 0.2);
    overflow: hidden;
    /* Added to keep internal full-width safe */
}

@media (max-width: 768px) {
    .header-red-sticky {
        margin: 0 0 10px 0 !important;
        width: 100% !important;
        border-radius: 20px !important;
        position: -webkit-sticky;
        position: sticky;
        top: 74px !important;
        z-index: 991;
        box-sizing: border-box !important;
        display: block;
        padding-bottom: 5px !important;
    }

    .summary-bar-sticky {
        margin: 0 0 16px 0 !important;
        width: 100% !important;
        border-radius: 20px !important;
        position: -webkit-sticky;
        position: sticky;
        top: 228px !important;
        z-index: 990;
        padding: 12px 15px !important;
        background: white !important;
        box-shadow: var(--shadow-soft) !important;
        border: 1px solid #f0f0f0 !important;
    }

    .list-container.glass-card {
        margin: 12px 0 20px 0 !important;
        width: 100% !important;
        border-radius: 20px !important;
        box-sizing: border-box !important;
        padding: 15px !important;
    }
}

.summary-grid-lite {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 10px;
}

.label-lite {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    display: block;
    margin-bottom: 2px;
}

.value-lite {
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.value-lite.white {
    color: var(--primary-dark);
    /* Primary dark on white */
}

.value-lite.black {
    color: #333;
}

@media (min-width: 992px) {
    .header-red-sticky {
        top: 0;
    }
}

.search-input-white::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.month-display {
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    flex: 1;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.month-display.small-font {
    font-size: 13px;
    letter-spacing: -0.5px;
}

@media (max-width: 400px) {
    .month-display.small-font {
        font-size: 12px;
    }
}

.btn-icon-white {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.tab-strip-red {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.tab-strip-red::-webkit-scrollbar {
    display: none;
}

.scroll-hint {
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    padding: 2px 0 16px 0;
    font-style: italic;
    letter-spacing: 0.2px;
}

.tab-item {
    font-size: 14px;
    opacity: 0.7;
    cursor: pointer;
    transition: 0.2s;
    padding: 5px 15px;
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
}

.tab-item.active {
    opacity: 1;
    font-weight: 600;
    border-bottom: 2px solid white;
}

.summary-sticky-bar {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 12px 5px;
    position: sticky;
    top: 92px;
    z-index: 90;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.summary-item {
    text-align: center;
    flex: 1;
}

.summary-item .label {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.summary-item .value {
    font-size: 15px;
    font-weight: 700;
}

.value.green {
    color: var(--pemasukan);
}

.value.red {
    color: var(--pengeluaran);
}

.value.black {
    color: #333;
}

.date-group-header-pro {
    background: #fdfdfd;
    border-bottom: 1px solid #f0f0f0;
}

.date-group-header-pro td {
    padding: 8px 12px !important;
    cursor: pointer;
    transition: 0.2s;
}

.date-group-header-pro:active {
    background: #f0f0f0 !important;
}

.folder-icon {
    font-size: 18px;
    color: var(--primary);
    margin-right: 5px;
}

.fold-arrow {
    font-size: 10px;
    opacity: 0.5;
    margin-left: 8px;
    transition: 0.3s;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-badge-pro {
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-num {
    font-size: 24px;
    font-weight: 800;
    color: #222;
}

.date-stack {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.my-text {
    font-size: 10px;
    color: #999;
}

.day-name {
    font-size: 11px;
    background: #666;
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
    text-transform: capitalize;
}

.day-totals {
    text-align: right;
    font-size: 13px;
    font-weight: 500;
}

.day-totals .in {
    margin-right: 12px;
}

.trx-row-pro {
    border-bottom: 1px solid #f9f9f9;
    cursor: pointer;
    transition: background 0.1s;
}

.trx-row-pro:active {
    background: #f0f0f0;
}

.trx-row-pro td {
    padding: 12px 15px !important;
    vertical-align: top;
}

.meta-col {
    width: 85px;
}

.time {
    display: block;
    font-size: 10px;
    color: #bbb;
}

.cat {
    font-size: 14px;
    color: #444;
    font-weight: 500;
}

.desc-col {
    font-size: 13px;
    color: #777;
    line-height: 1.3;
}

.nom-col-pro {
    text-align: right;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

/* Action Sheet */
.action-sheet {
    border-radius: 30px 30px 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    position: fixed;
    bottom: 0;
    left: 0;
    padding-bottom: 95px !important;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.modal.show .action-sheet {
    transform: translateY(0);
}

.action-sheet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.sheet-btn {
    background: #f5f5f5;
    border: none;
    padding: 20px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sheet-btn i {
    font-size: 20px;
}

.sheet-btn.red {
    color: var(--pengeluaran);
}

.fab-btn {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    border: none;
    position: fixed;
    bottom: 25px;
    right: 25px;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sembunyikan FAB saat modal terbuka agar tidak mengganggu pandangan */
body.modal-open .fab-btn {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(0.5) rotate(90deg);
    pointer-events: none !important;
    z-index: -1 !important;
}


/* Fix for edge to edge header */
#transaksi .list-container {
    padding: 0 !important;
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: transparent;
}

#transaksi .table-responsive {
    background: white;
}

.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: block;
}


/* IMPORTANT OVERRIDES FOR RED THEME */
:root {
    --primary: #f44336 !important;
    --pemasukan: #4caf50 !important;
    --pengeluaran: #f44336 !important;
}

.fab-btn {
    bottom: 90px !important;
}


/* REVERTING TO ORIGINAL BLUE THEME */
:root {
    --primary: #2ab7ca !important;
    --primary-light: #4cd1e1 !important;
    --primary-dark: #1b8a99 !important;
    --pemasukan: #00e676 !important;
    --pengeluaran: #ff5252 !important;
}

.header-red-sticky {
    background: var(--primary) !important;
    box-shadow: 0 4px 15px rgba(42, 183, 202, 0.3) !important;
}

.fab-btn {
    background: var(--primary) !important;
    box-shadow: 0 4px 15px rgba(42, 183, 202, 0.4) !important;
}


/* MINIMALIST BUTTONS */
.export-group-minimal {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-min {
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-min:active {
    background: #eee;
}

.btn-min i {
    font-size: 13px;
    color: var(--primary);
}

.btn-min.red {
    color: #f44336;
}

.btn-min.red i {
    color: #f44336;
}

.mb-10 {
    margin-bottom: 10px;
}

.mt-10 {
    margin-top: 10px;
}


/* NEW REPORT UI IMPROVEMENTS */
.report-actions {
    display: flex;
    gap: 10px;
}

.action-card {
    background: white;
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    min-width: 80px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.1s;
}

.action-card:active {
    transform: scale(0.95);
}

.action-card span {
    font-size: 9px;
    font-weight: 700;
    color: #888;
}

.surplus-card-pro {
    background: #effbf9;
    padding: 20px 25px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
}

.surplus-label {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    font-size: 15px;
    color: #444;
    line-height: 1.2;
}

.surplus-value {
    font-size: 24px;
    font-weight: 800;
}

.surplus-value.green {
    color: #1ed760;
}

.surplus-value.red {
    color: #f44336;
}

.page-section {
    padding-bottom: 150px !important;
}

.glass-card.print-area.document-pro {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-top: 10px;
}

.document-pro h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dark);
}

.document-pro h3 {
    margin-top: 24px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}


/* COMPRESSION FOR ULTRA COMPACT LAYOUT */
.date-group-header-pro td {
    padding: 8px 12px !important;
    background: #fafafa;
}

.day-num {
    font-size: 20px;
}

.day-name {
    font-size: 10px;
    padding: 1px 4px;
}

.my-text {
    font-size: 9px;
}

.day-totals {
    font-size: 12px;
}

.trx-row-pro td {
    padding: 6px 12px !important;
    border-bottom: 1px solid #f2f2f2;
}

.meta-col {
    width: 70px;
    line-height: 1.1;
}

.time {
    font-size: 9px;
    margin-bottom: 2px;
}

.cat {
    font-size: 12px;
}

.desc-col {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
    padding-top: 8px !important;
}

.nom-col-pro {
    font-size: 13px;
    font-weight: 500;
    vertical-align: middle !important;
}

/* Remove card looks from rows to save space */
.trx-row-pro {
    background: white !important;
}


/* REFRESH BUTTON STYLE */
.btn-refresh {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    color: #444;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.btn-refresh:active {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.96);
}

.btn-refresh i {
    color: var(--primary);
}

/* FORCED HEADER COLORS */
.day-totals .green {
    color: var(--pemasukan) !important;
    font-weight: 700;
}

.day-totals .red {
    color: var(--pengeluaran) !important;
    font-weight: 700;
}

.green {
    color: var(--pemasukan) !important;
}

.red {
    color: var(--pengeluaran) !important;
}


/* ULTRA SINGLE LINE MOBILE */
@media (max-width: 600px) {
    .list-container.glass-card {
        padding: 0 !important;
        border-radius: 20px !important;
        overflow: hidden;
    }

    .trx-row-pro {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 12px 10px !important;
        border-bottom: 1px solid #f8f9fa !important;
        gap: 8px;
    }

    .meta-col {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
        flex-shrink: 0 !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 70px !important;
    }

    .time {
        font-size: 8px !important;
        opacity: 0.5;
    }

    .cat {
        font-size: 11px !important;
        font-weight: 800 !important;
        color: #333 !important;
        line-height: 1.1;
    }

    .wallet-tag {
        font-size: 8px !important;
        opacity: 0.6;
    }

    .desc-col {
        flex: 1 !important;
        margin: 0 !important;
        font-size: 10.5px !important;
        color: #777 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 !important;
    }

    .nom-col-pro {
        width: auto !important;
        text-align: right !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
    }
}

/* End of Mobile Optimizations */


.action-minimal-row {
    display: flex;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.action-minimal {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

.action-minimal:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.action-minimal i {
    font-size: 16px;
}

/* CONSOLIDATED HEADER FIX FOR MOBILE & TABLET */
@media (max-width: 1024px) {
    .top-header {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .btn-action-pro {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        background: white;
        border: 1px solid #e8eaed;
        border-radius: 12px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-main);
        cursor: pointer;
        transition: var(--transition);
        white-space: nowrap;
    }

    .btn-action-pro:hover {
        background: #f8f9fa;
        border-color: var(--primary);
    }


    .report-header-minimal {
        width: 100%;
        margin-bottom: 20px;
        background: white;
        padding: 16px;
        border-radius: 16px;
        box-shadow: var(--shadow-soft);
        border: 1px solid #f1f5f9;
        display: block !important;
    }

    .top-header {
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 1000;
        border-radius: 0;
        padding: 10px 15px;
    }

    #transaksi.active {
        padding-top: 0 !important;
        overflow: visible !important;
    }

    /* Sidebar Overlay */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1050;
        display: none;
        backdrop-filter: blur(2px);
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.show {
        display: block;
    }

    @media (max-width: 600px) {
        .report-header-minimal {
            padding: 12px;
        }

        .action-minimal-row {
            gap: 10px;
            justify-content: space-between;
        }
    }


    .user-profile img,
    .avatar {
        width: 45px !important;
        height: 45px !important;
        margin-left: 10px !important;
        border-radius: 50% !important;
        border: 2px solid white !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    }

    #page-title {
        font-size: 22px !important;
        margin: 0 !important;
    }

    #page-subtitle {
        font-size: 12px !important;
        margin: 0 !important;
        opacity: 0.8 !important;
    }

    #dashboard-range {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .tab-strip-red {
        justify-content: flex-start !important;
        padding: 10px 15px !important;
        gap: 5px !important;
    }

    .summary-sticky-bar {
        padding: 10px !important;
        gap: 5px !important;
    }

    .summary-item .label {
        font-size: 10px !important;
    }

    .summary-item .value {
        font-size: 13px !important;
    }
}

.no-desktop {
    display: none;
}

@media (max-width: 768px) {
    .no-desktop {
        display: block;
    }

    .hamburger {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: white;
        border-radius: 12px;
        color: var(--primary);
        font-size: 20px;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
}

.avatar-container {
    position: relative;
    display: flex;
    align-items: center;
}

.status-indicator-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #00e676;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 230, 118, 0.4);
}

/* AI Consultant Responsiveness & Premium Styling */
.ai-consult-section {
    padding: 24px;
    background: #ffffff;
    border: 1.5px solid var(--primary-light) !important;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(65, 133, 244, 0.08);
    position: relative;
    overflow: hidden;
    margin-top: 30px;
}

#ai-chat-container {
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 18px;
    background: #f8fafc;
    border-radius: 16px;
    display: none;
    flex-direction: column;
    gap: 16px;
    border: 1px inset rgba(0, 0, 0, 0.02);
    scroll-behavior: smooth;
    width: 100%;
    box-sizing: border-box;
}

/* Chat Bubbles */
.chat-msg {
    max-width: 85%;
    padding: 12px 16px;
    font-size: 13.5px;
    line-height: 1.6;
    position: relative;
    animation: fadeInScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.user-msg {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
    border-radius: 18px 18px 2px 18px;
    box-shadow: 0 4px 12px rgba(65, 133, 244, 0.2);
}

.ai-msg {
    align-self: flex-start;
    background: white;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    border-radius: 18px 18px 18px 2px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.ai-msg strong {
    color: var(--primary-dark);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.consult-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    margin-top: 10px;
    box-sizing: border-box;
}

.consult-input-wrapper input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border: 2px solid #edf2f7;
    border-radius: 14px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.consult-input-wrapper input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(65, 133, 244, 0.1);
}

.consult-input-wrapper button {
    flex-shrink: 0;
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(65, 133, 244, 0.15);
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
}

@media (max-width: 480px) {
    .ai-consult-section {
        padding: 16px 12px;
        border-radius: 16px;
        margin-top: 20px;
    }

    #ai-chat-container {
        max-height: 380px;
        padding: 10px;
        gap: 12px;
        margin-bottom: 15px;
    }

    .chat-msg {
        max-width: 95%;
        /* Make bubbles wider on small screens */
        padding: 12px;
        font-size: 13px;
        border-radius: 14px;
    }

    .user-msg {
        border-radius: 14px 14px 2px 14px;
    }

    .ai-msg {
        border-radius: 14px 14px 14px 2px;
    }

    .consult-input-wrapper {
        gap: 6px;
        margin-top: 5px;
    }

    .consult-input-wrapper input {
        font-size: 13px;
        padding: 10px 14px;
        height: 48px;
        border-radius: 12px;
    }

    .consult-input-wrapper button {
        height: 48px;
        width: 48px;
        /* Square button on mobile */
        padding: 0;
        border-radius: 12px;
    }

    .consult-input-wrapper button span {
        display: none;
    }

    .consult-input-wrapper button i {
        font-size: 18px;
        margin: 0;
    }

    .ai-consult-section h3 {
        font-size: 14px !important;
    }

    .ai-consult-section p {
        font-size: 11px !important;
        margin-bottom: 12px !important;
    }
}

/* Tentang Aplikasi Sidebar */
.about-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    height: 100%;
    background: #ffffff;
    z-index: 2100;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.about-sidebar.open {
    left: 0;
}

.about-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 28px 20px;
    color: white;
    position: relative;
    border-bottom: 4px solid rgba(0, 0, 0, 0.08);
}

.about-icon-circle {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.close-about {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    opacity: 0.8;
    padding: 5px;
}

.about-version-badge {
    background: rgba(255, 255, 255, 0.15);
    display: inline-block;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-refresh-about {
    background: white;
    color: var(--primary-dark);
    border: none;
    width: 100%;
    padding: 11px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    font-family: inherit;
    margin-top: 14px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.about-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

.about-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 4px 0;
}

.about-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    overflow: hidden;
}

.about-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-card-text h3 {
    font-size: 13px;
    margin: 0;
    color: var(--primary-dark);
    font-weight: 900;
    letter-spacing: 0.3px;
}

.about-card-text p {
    font-size: 12.5px;
    margin: 4px 0 0 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.btn-chat-support {
    background: #25d366;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 11px;
    font-family: inherit;
    margin-top: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.about-offline-banner {
    background: var(--bg-color);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.offline-icon {
    font-size: 22px;
    color: var(--pemasukan);
    flex-shrink: 0;
}

.offline-text {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Responsive Sidebar - Tablet */
@media (max-width: 768px) {
    .about-sidebar {
        width: 300px;
    }

    .about-header {
        padding: 24px 18px;
    }

    .about-header h2 {
        font-size: 16px !important;
    }

    .about-icon-circle {
        width: 42px;
        height: 42px;
    }

    .about-icon-circle i {
        font-size: 18px !important;
    }
}

/* Responsive Sidebar - Mobile */
@media (max-width: 480px) {

    .about-sidebar,
    .sidebar {
        width: 85vw !important;
        max-width: 340px;
    }

    .about-header {
        padding: 22px 16px;
    }

    .about-header h2 {
        font-size: 15px !important;
    }

    .about-header span {
        font-size: 11px !important;
    }

    .about-icon-circle {
        width: 38px;
        height: 38px;
    }

    .about-icon-circle i {
        font-size: 16px !important;
    }

    .about-version-badge {
        font-size: 10px;
        padding: 4px 10px;
        margin-top: 14px;
    }

    .btn-refresh-about {
        font-size: 12px;
        padding: 10px;
        margin-top: 12px;
    }

    .about-content {
        padding: 16px;
        gap: 14px;
    }

    .about-card-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .about-card-text h3 {
        font-size: 12px;
    }

    .about-card-text p {
        font-size: 11.5px;
    }

    .btn-chat-support {
        font-size: 10.5px;
        padding: 7px 12px;
    }

    .about-offline-banner {
        padding: 12px;
    }

    .offline-icon {
        font-size: 18px;
    }

    .offline-text {
        font-size: 10.5px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {

    .about-sidebar,
    .sidebar {
        width: 90vw !important;
    }

    .about-header {
        padding: 18px 14px;
    }

    .about-header h2 {
        font-size: 14px !important;
    }

    .about-content {
        padding: 14px;
        gap: 12px;
    }

    .about-card {
        gap: 10px;
    }

    .about-card-icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .about-card-text h3 {
        font-size: 11px;
    }

    .about-card-text p {
        font-size: 11px;
    }
}

/* New Sidebar Close Button (Circle at bottom) */
.btn-close-sidebar-circle {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: #475569;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    margin: 0 auto;
}

.btn-close-sidebar-circle:active {
    transform: scale(0.9);
    background: #f1f5f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-close-sidebar-circle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- AI CONSULTATION PAGE STYLES --- */
.ai-page-header {
    background: var(--primary-dark);
    padding: 15px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ai-header-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: white;
    padding: 2px;
}

.ai-chat-history {
    height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
    background: #f8fafc;
}

.ai-bubble {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    word-wrap: break-word;
}

.ai-bubble.incoming {
    align-self: flex-start;
    background: white;
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    border: 1px solid #eef2f6;
}

.ai-bubble.outgoing {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-bottom-input {
    background: white;
    padding: 12px 16px 25px 16px;
    border-top: 1px solid #eef2f6;
    position: sticky;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.ai-input-row textarea {
    flex: 1;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 18px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 120px;
}

.btn-send-ai {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(65, 133, 244, 0.3);
    transition: transform 0.2s;
}

.btn-send-ai:active {
    transform: scale(0.9);
}

.ai-text-content {
    display: block;
    margin-top: 8px;
}

.ai-text-content p {
    margin-bottom: 12px;
}

.ai-text-content strong {
    color: var(--primary-dark);
}

.badge-pro {
    display: inline-block;
    padding: 2px 8px;
    background: var(--pro-gradient);
    color: white;
    font-size: 10px;
    font-weight: 800;
    border-radius: 6px;
    text-transform: uppercase;
}

/* PRO Banner */
.pro-banner-card {
    margin-top: 40px;
    background: linear-gradient(135deg, #ffffff, #fffdf0);
    border: 2px solid #fff3af !important;
    padding: 30px !important;
    text-align: left;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.pro-banner-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--pro-gradient);
    opacity: 0.05;
    border-radius: 50%;
}

.pro-banner-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.pro-gem-large {
    font-size: 32px;
    color: #ffa500;
}

.pro-banner-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #856404;
}

.pro-benefit-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.pro-benefit-list li {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pro-benefit-list li i {
    color: #2ca559;
}

.pro-benefit-list li i.fa-star {
    color: #ffa500;
}

.btn-upgrade-pro {
    width: 100%;
    background: var(--pro-gradient);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-upgrade-pro:active {
    transform: scale(0.98);
}

.pro-banner-footer {
    margin-top: 15px;
    font-size: 11px;
    color: #999;
    text-align: center;
    font-style: italic;
}

/* Upgrade Modal */
.upgrade-sheet {
    border-radius: 24px !important;
    padding: 0 !important;
    overflow: hidden;
}

.upgrade-modal-header {
    background: var(--pro-gradient);
    padding: 15px 10px;
    text-align: center;
    color: white;
}

.pro-gem-animation {
    font-size: 28px;
    margin-bottom: 5px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.upgrade-modal-header h2 {
    margin: 0 0 10px 0;
    font-weight: 800;
}

.upgrade-modal-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.price-card {
    background: #fff;
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.price-label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
    color: #999;
    letter-spacing: 1px;
}

.price-main {
    margin: 10px 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.price-main .currency {
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
    margin-right: 2px;
    color: #333;
}

.price-main .amount {
    font-size: 32px;
    font-weight: 900;
    color: #333;
}

@media (max-width: 380px) {
    .price-main .amount {
        font-size: 32px;
    }
}

.price-info {
    font-size: 12px;
    color: #2ca559;
    font-weight: 700;
}

.payment-instructions {
    padding: 20px;
    background: #fdfdfd;
}

.payment-instructions h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: #333;
}

.payment-instructions ol {
    padding-left: 20px;
}

.payment-instructions li {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.upgrade-actions {
    padding: 10px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-pay-wa {
    background: #25D366;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-cancel-upgrade {
    background: transparent;
    border: none;
    color: #999;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 768px) {
    .ai-chat-history {
        height: calc(100vh - 130px);
    }
}

.upgrade-sheet {
    max-height: 95vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    /* Move padding to inner elements */
}

.upgrade-sheet::-webkit-scrollbar {
    width: 4px;
}

.upgrade-sheet::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.activation-input-group {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.activation-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 14px;
}

.btn-activate-now {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-activate-now:active {
    transform: scale(0.95);
}

@media (max-width: 400px) {
    .activation-input-group {
        flex-direction: column;
    }

    .btn-activate-now {
        padding: 15px;
        font-size: 14px;
    }
}

/* --- NERACA & LABA RUGI STYLES --- */
.report-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 12px 10px;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 12px;
    position: sticky;
    top: 74px;
    /* Sits right below the main header */
    z-index: 995;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .report-tabs {
        margin: 5px 0 15px 0;
        border-radius: 0;
        top: 60px;
        /* Adjusted focus for mobile header height discrepancy if any */
        padding: 8px 12px;
        background: rgba(241, 245, 249, 0.95);
    }
}

.report-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: #64748b;
    font-family: 'Outfit', sans-serif;
}

.report-tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.lb-item-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s;
}

.lb-item-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.neraca-card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

@media print {

    .report-tabs,
    .no-print,
    .bottom-nav,
    .fab-btn,
    .header-red-sticky {
        display: none !important;
    }

    .page-section {
        padding: 0 !important;
    }

    .glass-card {
        box-shadow: none !important;
        border: 1px solid #eee !important;
    }
}