/* ========================================= */
/* --- 1. GLOBAL & RESET --- */
/* ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    display: flex;
    background-color: #f8fafc;
    color: #334155;
    min-height: 100vh;
}

/* ========================================= */
/* --- 2. SIDEBAR & NAVIGATION --- */
/* ========================================= */
.sidebar {
    width: 260px;
    background-color: #0f172a;
    color: #94a3b8;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-top { 
    flex: 1; 
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    color: white;
}

.logo-icon {
    background: #4f46e5;
    padding: 10px;
    border-radius: 8px;
    font-size: 1.2rem;
}

.logo-text h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.logo-text span {
    font-size: 0.7rem;
    color: #818cf8;
    letter-spacing: 1px;
}

.menu-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-menu li.active a {
    background-color: #4f46e5;
    color: white;
}

/* User Profile Sidebar */
.user-profile {
    margin-top: auto;
    background: #1e293b;
    padding: 15px;
    border-radius: 12px;
}
.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}
.profile-avatar {
    width: 40px;
    height: 40px;
    background: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.profile-text h4 {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 3px;
}
.profile-text span {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
}
.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: transparent;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-logout:hover {
    background: #ef4444;
    color: white;
}

/* ========================================= */
/* --- 3. MAIN CONTENT & TOPBAR --- */
/* ========================================= */
.main-content {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
}

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

.breadcrumb {
    font-size: 0.9rem;
    color: #64748b;
}

.breadcrumb strong {
    color: #0f172a;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.period-selector {
    background: white;
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #475569;
}

.btn-primary {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

/* ========================================= */
/* --- 4. DASHBOARD COMPONENTS --- */
/* ========================================= */
.hero-banner {
    background: #1e1b4b;
    color: white;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.badge {
    background: rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.hero-left h1 { margin: 15px 0 10px 0; font-size: 1.8rem; }
.hero-left p { color: #a5b4fc; font-size: 0.9rem; }
.hero-right { text-align: right; }
.hero-right p { color: #a5b4fc; font-size: 0.9rem; margin-bottom: 8px; }
.hero-right h2 { font-size: 1.2rem; }
.hero-right h2 span { color: #34d399; font-size: 1.8rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.stat-header h3 { font-size: 0.75rem; color: #64748b; font-weight: 600; }
.stat-card h2 { font-size: 1.4rem; color: #0f172a; margin-bottom: 8px; }
.stat-card p { font-size: 0.8rem; color: #94a3b8; }
.stat-card p.trend.positive { color: #10b981; font-weight: 500; }

.icon-box {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-box.green { background: #dcfce7; color: #16a34a; }
.icon-box.blue { background: #e0f2fe; color: #0284c7; }
.icon-box.yellow { background: #fef3c7; color: #d97706; }
.icon-box.red { background: #fee2e2; color: #dc2626; }

.bottom-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.card-header h3 { color: #0f172a; margin-bottom: 5px; }
.card-header p { font-size: 0.85rem; color: #64748b; }
.link-action { color: #4f46e5; text-decoration: none; font-size: 0.85rem; font-weight: 500; }

/* Dashboard Table */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px; font-size: 0.75rem; color: #64748b; border-bottom: 1px solid #e2e8f0; }
td { padding: 15px 12px; font-size: 0.85rem; border-bottom: 1px solid #f8fafc; color: #475569; }
.fw-500 { font-weight: 500; color: #0f172a; }

.type-badge { background: #f1f5f9; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; color: #475569; }
.status-badge.posted { background: #dcfce7; color: #16a34a; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }

/* Info Card */
.info-card h3 { margin-bottom: 20px; }
.info-item { display: flex; gap: 15px; background: #f8fafc; padding: 15px; border-radius: 8px; border: 1px solid #e2e8f0; }
.info-icon { color: #4f46e5; font-size: 1.2rem; }
.info-item h4 { font-size: 0.9rem; color: #334155; margin-bottom: 5px; }
.info-item p { font-size: 0.8rem; color: #64748b; line-height: 1.4; }

/* ========================================= */
/* --- 5. COA & HEADER PAGES --- */
/* ========================================= */
.page-header { margin-bottom: 20px; }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.title-section { display: flex; align-items: center; gap: 15px; }
.icon-title { font-size: 1.5rem; color: #4f46e5; }
.title-section h1 { font-size: 1.4rem; color: #0f172a; margin-bottom: 5px; }
.title-section p { font-size: 0.9rem; color: #64748b; }

.filter-section { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 15px 25px; }
.search-box { display: flex; align-items: center; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 15px; width: 350px; }
.search-box i { color: #94a3b8; margin-right: 10px; }
.search-box input { border: none; background: transparent; outline: none; width: 100%; font-size: 0.9rem; color: #334155; }
.filter-pills { display: flex; gap: 10px; }
.pill { padding: 8px 16px; border: none; border-radius: 6px; font-size: 0.85rem; font-weight: 500; cursor: pointer; background: #f1f5f9; color: #475569; transition: all 0.2s; }
.pill:hover { background: #e2e8f0; }
.pill.active { background: #0f172a; color: white; }

.text-blue { color: #4f46e5 !important; }
.fw-600 { font-weight: 600; }
.badge-outline { background: #eff6ff; color: #2563eb; padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; }
.status-text { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 500; }
.status-text.success { color: #16a34a; }
.status-text.danger { color: #dc2626; }
.table-card table th, .table-card table td { padding: 18px 25px; }
.table-card table th { font-weight: 600; color: #1e293b; text-transform: uppercase; }

/* Filter Badges COA */
.badge-ASSET { background: #eff6ff; color: #2563eb; padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; }
.badge-LIABILITY { background: #fff1f2; color: #e11d48; padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; }
.badge-EQUITY { background: #faf5ff; color: #9333ea; padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; }
.badge-REVENUE { background: #f0fdf4; color: #16a34a; padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; }
.badge-EXPENSE { background: #fef3c7; color: #d97706; padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; }

.bal-DEBIT { background: #eff6ff; color: #2563eb; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; }
.bal-CREDIT { background: #dcfce7; color: #16a34a; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; }

/* ========================================= */
/* --- 6. FORMS (KAS MASUK & KELUAR) --- */
/* ========================================= */
.icon-box-header.green { background: #dcfce7; color: #16a34a; width: 45px; height: 45px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.icon-box-header.red { background: #fee2e2; color: #dc2626; width: 45px; height: 45px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.icon-box-header.blue-light { background: #e0e7ff; color: #4f46e5; width: 45px; height: 45px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }

.btn-outline-green { background: transparent; color: #16a34a; border: 1px solid #16a34a; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 500; display: flex; align-items: center; gap: 8px; transition: all 0.2s; }
.btn-outline-green:hover { background: #f0fdf4; }
.btn-outline-red { background: #fff1f2; color: #e11d48; border: 1px solid #fda4af; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 500; display: flex; align-items: center; gap: 8px; transition: all 0.2s; }

.form-card { padding: 30px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 20px; }
.form-group { display: flex; flex-direction: column; margin-bottom: 20px; }
.form-row .form-group { margin-bottom: 0; }
.label-flex { display: flex; justify-content: space-between; align-items: center; }
.form-label { font-size: 0.85rem; font-weight: 600; color: #334155; margin-bottom: 8px; }
.text-gray { color: #94a3b8; margin-right: 5px; }

.form-control { padding: 12px 15px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 0.9rem; color: #0f172a; outline: none; transition: border-color 0.2s; font-family: 'Inter', sans-serif; }
.form-control:focus { border-color: #4f46e5; }
.form-control.bg-light { background-color: #f8fafc; color: #64748b; }
select.form-control { appearance: auto; cursor: pointer; }
textarea.form-control { resize: vertical; }

.badge-debit { font-size: 0.75rem; font-weight: 700; color: #16a34a; }
.badge-kredit { font-size: 0.75rem; font-weight: 700; color: #2563eb; }
.badge-dr-text { font-size: 0.75rem; font-weight: 700; color: #dc2626; }
.badge-cr-text { font-size: 0.75rem; font-weight: 700; color: #0284c7; }

.input-group { display: flex; align-items: stretch; }
.input-group-text { background-color: #f8fafc; border: 1px solid #e2e8f0; border-right: none; padding: 12px 15px; border-radius: 6px 0 0 6px; color: #64748b; font-weight: 500; font-size: 0.9rem; }
.border-left-0 { border-top-left-radius: 0; border-bottom-left-radius: 0; width: 100%; }

.btn-submit { background: #4f46e5; color: white; border: none; padding: 12px 28px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 8px; margin-top: 15px; transition: 0.2s; box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2); }
.btn-submit:hover { background: #4338ca; transform: translateY(-1px); }
.btn-submit-red { background: #f43f5e; color: white; border: none; padding: 12px 28px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 8px; margin-top: 15px; transition: 0.2s; box-shadow: 0 4px 6px -1px rgba(244, 63, 94, 0.2); }
.btn-submit-red:hover { background: #e11d48; transform: translateY(-1px); }

/* Simulation Box */
.simulation-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin-top: 25px; }
.sim-header { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 700; color: #64748b; margin-bottom: 15px; letter-spacing: 0.5px; }
.sim-header .balanced { color: #16a34a; }
.sim-row { display: flex; justify-content: space-between; align-items: center; background: white; padding: 12px 15px; border-radius: 6px; border: 1px solid #f1f5f9; margin-bottom: 10px; }
.sim-row:last-child { margin-bottom: 0; }
.sim-row .account-info { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; font-weight: 600; color: #334155; }
.badge-dr { background: #fee2e2; color: #dc2626; font-size: 0.7rem; padding: 4px 8px; border-radius: 4px; }
.badge-cr { background: #f1f5f9; color: #475569; font-size: 0.7rem; padding: 4px 8px; border-radius: 4px; }
.sim-nominal { font-weight: 600; font-size: 0.95rem; }
.red-text { color: #dc2626; }

/* ========================================= */
/* --- 7. JURNAL UMUM (MULTI-ROW) --- */
/* ========================================= */
.badge-status-jurnal { padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; transition: all 0.3s; }
.badge-status-jurnal.unbalanced { background-color: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-status-jurnal.balanced { background-color: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.jurnal-detail-container { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; margin-top: 20px; padding: 15px; }
.jurnal-detail-header { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 700; color: #475569; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #e2e8f0; }
.jurnal-detail-header i { color: #4f46e5; margin-right: 5px; }

.jurnal-table { width: 100%; border-collapse: collapse; }
.jurnal-table th { padding: 10px; font-size: 0.8rem; color: #334155; font-weight: 600; text-align: left; }
.jurnal-table td { padding: 5px 10px; }
.jurnal-table .form-control { border-color: #cbd5e1; }

.jurnal-footer { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; padding: 15px 10px; border-top: 1px solid #e2e8f0; margin-top: 10px; text-align: right; font-weight: 600; font-size: 0.95rem; }
.text-danger { color: #dc2626; }
.text-primary { color: #4f46e5; }

.btn-add-row { background: transparent; color: #4f46e5; border: 1px solid #c7d2fe; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: 0.9rem; }
.btn-add-row:hover { background: #e0e7ff; }
.jurnal-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.btn-remove-row { color: #ef4444; background: transparent; border: none; cursor: pointer; font-size: 1.2rem; }

/* ========================================= */
/* --- 8. LAPORAN KEUANGAN & BUKU BESAR -- */
/* ========================================= */
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

.report-container { padding: 30px; background: white; }
.report-header-print { text-align: center; margin-bottom: 25px; border-bottom: 2px solid #0f172a; padding-bottom: 15px; }
.report-header-print h2 { font-size: 1.5rem; color: #0f172a; margin-bottom: 5px; }
.report-header-print h3 { font-size: 1.1rem; color: #334155; margin-bottom: 5px; }
.report-header-print p { font-size: 0.9rem; color: #64748b; }

.report-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; background: #f8fafc; padding: 15px; border-radius: 8px; border: 1px solid #e2e8f0; margin-bottom: 20px; font-size: 0.9rem; }
.report-meta strong { color: #334155; display: block; margin-bottom: 5px; font-size: 0.8rem; text-transform: uppercase; }

.report-table { width: 100%; border-collapse: collapse; }
.report-table th, .report-table td { border: 1px solid #e2e8f0; padding: 12px 15px; }
.report-table th { background-color: #0f172a; color: white; font-weight: 600; text-transform: uppercase; font-size: 0.8rem; border-color: #0f172a; }
.row-saldo-awal { background-color: #f1f5f9; }
.report-table tfoot th, .report-table tfoot td { background-color: #f8fafc; border-top: 2px solid #cbd5e1; }

.report-tabs { display: flex; gap: 15px; padding: 15px 20px; background: white; border-radius: 12px; margin-bottom: 20px; border: 1px solid #f1f5f9; }
.tab-item { padding: 10px 20px; text-decoration: none; color: #64748b; font-weight: 500; font-size: 0.9rem; border-radius: 8px; display: flex; align-items: center; gap: 8px; transition: 0.2s; }
.tab-item:hover { background: #f8fafc; color: #0f172a; }
.tab-item.active { background: #4f46e5; color: white; }

.lr-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 25px; }
.lr-summary-card { background: white; padding: 25px; border-radius: 12px; border: 1px solid #f1f5f9; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.lr-summary-card p { font-size: 0.8rem; font-weight: 600; color: #64748b; margin-bottom: 10px; }
.lr-summary-card h3 { font-size: 2rem; color: #0f172a; margin-bottom: 10px; }
.lr-summary-card .text-blue { color: #4f46e5; }
.lr-summary-card .text-green { color: #16a34a; }
.lr-summary-card span { font-size: 0.8rem; color: #94a3b8; }

.lr-paper { background: white; padding: 40px; border-radius: 12px; border: 1px solid #e2e8f0; margin-bottom: 40px; }
.lr-header { text-align: center; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 2px solid #f1f5f9; }
.lr-header h2 { font-size: 1.4rem; color: #0f172a; margin-bottom: 5px; text-transform: uppercase; }
.lr-header h3 { font-size: 1.1rem; color: #4f46e5; margin-bottom: 5px; font-weight: 600; }
.lr-header p { font-size: 0.9rem; color: #64748b; }

.lr-section { margin-bottom: 30px; }
.lr-section h4 { font-size: 0.95rem; color: #0f172a; margin-bottom: 15px; text-transform: uppercase; }
.lr-row { display: flex; justify-content: space-between; padding: 15px; border: 1px solid #f1f5f9; border-radius: 6px; font-size: 0.95rem; font-weight: 500; color: #334155; margin-bottom: 10px; }
.lr-row .text-red { color: #dc2626; }
.lr-subtotal { display: flex; justify-content: space-between; padding: 15px; background: #eff6ff; color: #1e40af; border-radius: 6px; font-weight: 700; font-size: 1rem; margin-top: 15px; }
.lr-grandtotal { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; background: #0f172a; color: white; border-radius: 8px; margin-top: 40px; }
.lr-grandtotal h4 { font-size: 1.1rem; margin-bottom: 5px; }
.lr-grandtotal small { font-size: 0.8rem; color: #94a3b8; font-weight: 400; }
.lr-grandtotal h3 { font-size: 1.8rem; color: #34d399; }

/* ========================================= */
/* --- 9. PENGATURAN CETAK (PRINT PDF) --- */
/* ========================================= */
@media print {
    body { background: white; margin: 0; padding: 0; }
    .print-hide { display: none !important; }
    .main-content { padding: 0; overflow: visible; }
    .report-container { border: none; box-shadow: none; padding: 0; }
    .report-table th { background-color: #e2e8f0 !important; color: black !important; border-color: black !important; -webkit-print-color-adjust: exact; }
    .report-table td, .report-table th { border: 1px solid black !important; }
    .badge-outline { border: none; padding: 0; font-weight: bold; color: black; }
    .report-meta { border: 1px solid black; }
    
    .lr-paper { border: none; padding: 0; margin: 0; box-shadow: none; }
    .lr-row { border: 1px solid #000; }
    .lr-subtotal { border: 1px solid #000; background: #f8fafc !important; color: black !important; -webkit-print-color-adjust: exact; }
    .lr-grandtotal { background: white !important; color: black !important; border: 2px solid black; -webkit-print-color-adjust: exact; }
    .lr-grandtotal h3 { color: black; }
}

/* ========================================= */
/* --- 10. GAYA HALAMAN LOGIN (DARK MODE) -- */
/* ========================================= */
.login-body { background-color: #0b1120; color: white; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.login-wrapper { width: 100%; max-width: 500px; padding: 20px; }
.login-header { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 30px; }
.logo-icon-large { background: #4f46e5; width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.logo-text-large h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 2px; }
.logo-text-large span { font-size: 0.8rem; color: #818cf8; letter-spacing: 0.5px; }

.login-title { text-align: center; margin-bottom: 40px; }
.login-title h1 { font-size: 1.8rem; margin-bottom: 10px; }
.login-title p { color: #94a3b8; font-size: 0.95rem; }

.login-card { background: #111827; border: 1px solid #1f2937; border-radius: 16px; padding: 35px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.form-group-login { margin-bottom: 25px; }
.form-group-login label { display: block; font-size: 0.75rem; font-weight: 700; color: #cbd5e1; margin-bottom: 8px; letter-spacing: 1px; }

.label-flex-login { display: flex; justify-content: space-between; align-items: center; }
.forgot-link { color: #818cf8; text-decoration: none; font-size: 0.8rem; }
.forgot-link:hover { text-decoration: underline; }

.input-icon-box { position: relative; display: flex; align-items: center; background: #f8fafc; border-radius: 8px; overflow: hidden; }
.input-icon-box input { width: 100%; border: none; padding: 14px 15px 14px 45px; background: transparent; color: #0f172a; font-size: 0.95rem; outline: none; }
.input-icon-box i { position: absolute; left: 15px; color: #64748b; font-size: 1.1rem; }
.input-icon-box .show-pwd { left: auto; right: 15px; cursor: pointer; }

.btn-login-submit { width: 100%; background: #4f46e5; color: white; border: none; padding: 15px; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: 0.2s; display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 30px; }
.btn-login-submit:hover { background: #4338ca; }

.login-footer-card { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #1f2937; padding-top: 20px; font-size: 0.85rem; }
.text-green { color: #10b981; }
.role-text { color: #94a3b8; }
.demo-link { color: #818cf8; text-decoration: none; }
.security-badge { text-align: center; margin-top: 30px; color: #64748b; font-size: 0.8rem; display: flex; justify-content: center; align-items: center; gap: 8px; }

/* ========================================= */
/* --- 11. RESPONSIVE / MOBILE DESIGN ---    */
/* ========================================= */

/* Tablet & Laptop Kecil */
@media screen and (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .bottom-grid { grid-template-columns: 1fr; }
    .lr-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .report-meta { grid-template-columns: repeat(2, 1fr); }
}

/* Smartphone & Layar Kecil */
@media screen and (max-width: 768px) {
    body { flex-direction: column; }
    
    .sidebar { width: 100%; padding: 15px; border-right: none; border-bottom: 2px solid #1e293b; }
    .logo-container { justify-content: center; margin-bottom: 20px; }
    
    .nav-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .nav-menu a { justify-content: center; padding: 12px; font-size: 0.85rem; }
    
    .main-content { padding: 15px; }
    
    .topbar { flex-direction: column; align-items: stretch; gap: 15px; margin-bottom: 20px; }
    .header-actions { flex-direction: column; width: 100%; gap: 10px; }
    .period-selector { width: 100%; text-align: center; }
    .btn-primary { width: 100%; justify-content: center; }
    
    .hero-banner { flex-direction: column; text-align: center; gap: 20px; padding: 20px; }
    .hero-right { text-align: center; }
    
    /* Penumpukan Baris Form */
    .form-row { grid-template-columns: 1fr !important; gap: 15px; }
    
    /* Mengatasi inline-style pada PHP bawaan */
    div[style*="grid-template-columns: 2fr 1fr 1fr auto"],
    div[style*="grid-template-columns: 1fr 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    form[action="laba_rugi.php"] { flex-direction: column !important; align-items: stretch !important; width: 100%; }
    form[action="laba_rugi.php"] .period-selector { justify-content: space-between; flex-wrap: wrap; }
    
    .header-content { flex-direction: column; align-items: flex-start !important; gap: 15px; }
    .title-section h1 { font-size: 1.25rem; }
    
    .filter-section { flex-direction: column; align-items: stretch; gap: 15px; padding: 15px; }
    .search-box { width: 100%; }
    .filter-pills { flex-wrap: wrap; justify-content: center; }
    .pill { flex: 1 1 30%; text-align: center; }

    .card { padding: 15px; }
    
    /* Tabel dapat digeser ke samping (Scroll Horizontal) */
    .table-card, .jurnal-detail-container, .report-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 700px; } 
    
    .report-tabs { flex-wrap: wrap; justify-content: center; }
    .tab-item { flex: 1 1 45%; justify-content: center; text-align: center; padding: 10px; }
    
    .lr-summary-grid { grid-template-columns: 1fr; }
    .lr-paper { padding: 20px; }
    .lr-header h2 { font-size: 1.2rem; }
    .lr-row { flex-direction: column; gap: 8px; text-align: left; }
    .lr-subtotal { flex-direction: column; gap: 8px; text-align: left; }
    .lr-grandtotal { flex-direction: column; align-items: flex-start; gap: 10px; padding: 15px; }
    
    .jurnal-footer { grid-template-columns: 1fr; text-align: left; }
    
    .btn-submit, .btn-submit-red, .btn-outline-green, .btn-outline-red { width: 100%; justify-content: center; }
    
    .user-profile { flex-direction: column; text-align: center; margin-top: 15px; }
    .profile-info { flex-direction: column; justify-content: center; margin-bottom: 10px; }
}

/* Smartphone Layar Sangat Kecil (Potrait) */
@media screen and (max-width: 480px) {
    .nav-menu { grid-template-columns: 1fr; }
    .pill { flex: 1 1 45%; }
    .report-meta { grid-template-columns: 1fr; }
    .sim-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}