:root {
    --primary: #065f46;
    --primary-dark: #044332;
    --primary-light: #ecfdf5;
    --secondary: #10b981;
    --accent: #f59e0b;
    --bg-body: #f8fafc;
    --card-border: #e2e8f0;
    --text-dark: #0f172a;
    --text-muted: #64748b;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 20px rgba(6, 95, 70, 0.2);
}

.main-container {
    flex: 1;
    padding-top: 25px;
    padding-bottom: 90px;
}

.brand-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(6, 95, 70, 0.25);
}

.card-custom {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
    box-shadow: 0 8px 35px rgba(0,0,0,0.07);
}

/* Auth Pill Switcher */
.auth-toggle-pill {
    background-color: #f1f5f9;
}

.auth-toggle-pill .btn {
    border: none;
    font-size: 13px;
    transition: all 0.25s ease;
}

.auth-toggle-pill .active-tab {
    background-color: #ffffff !important;
    color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-primary-custom {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    padding: 11px 20px;
    transition: all 0.25s;
}

.btn-primary-custom:hover {
    background-color: var(--secondary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.stat-card-gradient {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    color: white;
    border-radius: 18px;
}

.badge-persen {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 30px;
}

.hidden { display: none !important; }

/* Form Controls */
.form-control, .form-select {
    border-radius: 10px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Mobile Bottom Navigation */
@media (max-width: 768px) {
    .nav-tabs-mobile {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        display: flex;
        justify-content: space-around;
        padding: 10px 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.07);
        z-index: 1050;
        border-top: 1px solid #f1f5f9;
    }
    .nav-item-mobile {
        text-align: center;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 11px;
        font-weight: 600;
        flex: 1;
    }
    .nav-item-mobile i {
        font-size: 18px;
        display: block;
        margin-bottom: 2px;
    }
    .nav-item-mobile.active {
        color: var(--primary);
    }
}

/* -------------------------------------
   PERBAIKAN TAMPILAN CETAK / PRINT A4
-------------------------------------- */
@media print {
    .no-print, .navbar-custom, #mobileNav, button, .btn { 
        display: none !important; 
    }
    .print-only { 
        display: block !important; 
    }
    
    body { 
        background: #ffffff !important; 
        margin: 0 !important; 
        padding: 10mm !important; 
        font-size: 11pt !important; 
        color: #000000 !important; 
    }
    
    .main-container { 
        padding: 0 !important; 
    }
    
    .card-custom { 
        box-shadow: none !important; 
        border: none !important; 
        padding: 0 !important; 
    }
    
    .kop-surat {
        border-bottom: 3px double #000;
        padding-bottom: 12px;
        margin-bottom: 20px;
        text-align: center;
    }
    .kop-surat h2 {
        margin: 0;
        font-size: 18pt;
        font-weight: 800;
        text-transform: uppercase;
    }
    .kop-surat p {
        margin: 2px 0 0 0;
        font-size: 10pt;
    }

    .table-print {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-top: 15px;
    }
    .table-print th, .table-print td {
        border: 1px solid #333 !important;
        padding: 6px 8px !important;
        font-size: 10pt !important;
    }
    .table-print th {
        background-color: #f1f5f9 !important;
        text-align: center !important;
        font-weight: bold !important;
    }

    .print-signature {
        margin-top: 40px;
        display: flex;
        justify-content: space-between;
        page-break-inside: avoid;
    }
    .sig-box {
        text-align: center;
        width: 200px;
    }
    .sig-space {
        height: 60px;
    }

    .print-footer-tag {
        position: fixed;
        bottom: 5mm;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 8pt;
        color: #777;
    }
}