@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #f2f6f3;
    --primary-green: #0e4d2a;
    --primary-green-light: #166534;
    --accent-green: #22c55e;
    --accent-lime: #84cc16;
    --accent-light: #dcfce7;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border-color: #cbd5e1;
    --radius-xl: 22px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-soft: 0 10px 30px -8px rgba(14, 77, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================================
   HALAMAN LOGIN
   ========================================================================== */
.login-page-wrapper {
    min-height: 100vh; min-height: 100dvh; width: 100%; display: flex;
    align-items: center; justify-content: center; position: relative;
    overflow: hidden; padding: 20px;
    background: radial-gradient(circle at 50% 20%, #0d4a29 0%, #072a17 50%, #04190e 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; pointer-events: none; z-index: 1; }
.orb-1 { width: 320px; height: 320px; background: #10b981; top: -80px; left: -80px; }
.orb-2 { width: 280px; height: 280px; background: #059669; bottom: -60px; right: -60px; }
.orb-3 { width: 200px; height: 200px; background: #84cc16; top: 40%; right: 15%; }

.login-glass-card {
    width: 100%; max-width: 420px; background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 26px;
    padding: 34px 28px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    position: relative; z-index: 10;
}
.login-logo-3d-box {
    width: 72px; height: 72px; margin: 0 auto 14px auto;
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 18px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), inset 0 -2px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.9); padding: 6px;
}
.login-logo-3d-box img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.login-input-group { position: relative; display: flex; align-items: center; width: 100%; }
.login-input-group .input-icon { position: absolute; left: 14px; color: #64748b; font-size: 0.95rem; z-index: 5; pointer-events: none; }
.login-input-group input.form-control {
    width: 100%; padding: 11px 44px 11px 40px; border-radius: 12px;
    border: 1.5px solid #cbd5e1; font-size: 0.9rem; font-weight: 600;
    color: var(--text-dark); background: #f8fafc; transition: all 0.2s ease;
}
.login-input-group input.form-control:focus { background: #ffffff; border-color: var(--accent-green); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); outline: none; }
.btn-eye-toggle { position: absolute; right: 12px; background: none; border: none; color: #64748b; font-size: 0.95rem; cursor: pointer; padding: 6px; z-index: 5; display: flex; align-items: center; justify-content: center; transition: color 0.15s ease; }
.btn-eye-toggle:hover { color: var(--primary-green); }

/* ==========================================================================
   DROPDOWN & KOMPONEN UMUM
   ========================================================================== */
.form-select-sm, #entriesSelect { padding-left: 12px !important; padding-right: 30px !important; background-position: right 10px center !important; background-size: 12px 8px !important; min-width: 105px !important; font-weight: 700; font-size: 0.8rem; color: var(--text-dark); border: 1.5px solid #cbd5e1; cursor: pointer; }
.app-wrapper { display: flex; flex: 1; min-height: 100vh; }
.app-sidebar { width: 95px; background: #ffffff; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; padding: 24px 12px; gap: 20px; position: sticky; top: 0; height: 100vh; z-index: 100; flex-shrink: 0; box-shadow: 4px 0 20px rgba(0, 0, 0, 0.02); }
.sidebar-logo-3d { position: relative; width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(180deg, #ffffff 0%, #f8fafc 48%, #e2e8f0 100%); border: 1px solid rgba(255, 255, 255, 0.9); box-shadow: 0 6px 14px rgba(14, 77, 42, 0.12), inset 0 -2px 4px rgba(0, 0, 0, 0.08); display: flex; align-items: center; justify-content: center; padding: 5px; transition: all 0.25s ease; overflow: hidden; text-decoration: none; }
.sidebar-logo-3d img { max-width: 100% !important; max-height: 100% !important; object-fit: contain; border-radius: 8px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 12px; width: 100%; align-items: center; }
.nav-icon-btn { position: relative; width: 50px; height: 50px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%); color: #475569; text-decoration: none; font-size: 1.2rem; border: 1px solid rgba(255, 255, 255, 0.85); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), inset 0 -2px 3px rgba(0, 0, 0, 0.08); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; }
.nav-icon-btn::before { content: ''; position: absolute; top: 2px; left: 4px; right: 4px; height: 38%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.05) 100%); border-radius: 10px 10px 6px 6px; pointer-events: none; }
.nav-icon-btn:hover { transform: translateY(-2px); color: var(--primary-green); }
.nav-icon-btn.nav-dashboard.active { background: linear-gradient(180deg, #6366f1 0%, #4f46e5 48%, #4338ca 100%) !important; color: #ffffff !important; border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 8px 18px rgba(79, 70, 229, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.3) !important; }
.nav-icon-btn.nav-kosmetik.active { background: linear-gradient(180deg, #10b981 0%, #059669 48%, #047857 100%) !important; color: #ffffff !important; border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 8px 18px rgba(5, 150, 105, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.3) !important; }
.nav-icon-btn.nav-pakaian.active { background: linear-gradient(180deg, #3b82f6 0%, #2563eb 48%, #1d4ed8 100%) !important; color: #ffffff !important; border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 8px 18px rgba(37, 99, 235, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.3) !important; }
.nav-icon-btn.nav-rekap.active { background: linear-gradient(180deg, #f59e0b 0%, #d97706 48%, #b45309 100%) !important; color: #ffffff !important; border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 8px 18px rgba(217, 119, 6, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.3) !important; }
.nav-icon-btn.nav-panduan.active { background: linear-gradient(180deg, #06b6d4 0%, #0891b2 48%, #0e7490 100%) !important; color: #ffffff !important; border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 8px 18px rgba(8, 145, 178, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.3) !important; }
.nav-icon-btn.nav-settings.active { background: linear-gradient(180deg, #475569 0%, #334155 48%, #1e293b 100%) !important; color: #ffffff !important; border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 8px 18px rgba(30, 41, 59, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.3) !important; }
.nav-icon-logout { background: linear-gradient(180deg, #ef4444 0%, #dc2626 48%, #b91c1c 100%) !important; color: #ffffff !important; box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35), inset 0 -2px 4px rgba(0, 0, 0, 0.3) !important; }

.mobile-fab-container { display: none; position: fixed; bottom: 20px; right: 20px; z-index: 1050; }
.mobile-fab-trigger { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(180deg, #10b981 0%, #059669 50%, #047857 100%); color: #ffffff; border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 10px 25px rgba(5, 150, 105, 0.5), inset 0 -2px 4px rgba(0, 0, 0, 0.3); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.mobile-fab-trigger:active { transform: scale(0.92); }
.mobile-fab-menu { position: absolute; bottom: 68px; right: 0; background: rgba(255, 255, 255, 0.98); border: 1px solid var(--border-color); border-radius: 22px; padding: 12px; box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22); display: flex; flex-direction: column; gap: 8px; opacity: 0; pointer-events: none; transform: translateY(15px) scale(0.9); transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); min-width: 210px; }
.mobile-fab-menu.show { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.mobile-fab-user-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #f8fafc; border-radius: 14px; border: 1px solid var(--border-color); margin-bottom: 4px; }
.mobile-fab-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; color: var(--text-dark); text-decoration: none; font-weight: 700; font-size: 0.82rem; transition: all 0.15s ease; }
.mobile-fab-item:hover, .mobile-fab-item.active { background: #f0fdf4; color: var(--primary-green); }
.mobile-fab-item i { width: 22px; text-align: center; font-size: 1rem; }

.btn-glossy { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; border-radius: 50rem; font-weight: 700; font-size: 0.84rem; letter-spacing: 0.2px; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.45); cursor: pointer; transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); overflow: hidden; user-select: none; white-space: nowrap; }
.btn-glossy::before { content: ''; position: absolute; top: 2px; left: 6px; right: 6px; height: 42%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.08) 100%); border-radius: 50rem 50rem 15px 15px; pointer-events: none; }
.btn-glossy:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-glossy:active { transform: translateY(1px); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45) !important; }
.btn-glossy-green { background: linear-gradient(180deg, #10b981 0%, #059669 48%, #047857 100%); color: #ffffff !important; box-shadow: 0 6px 14px rgba(5, 150, 105, 0.35), inset 0 -2px 3px rgba(0, 0, 0, 0.25); }
.btn-glossy-excel { background: linear-gradient(180deg, #15803d 0%, #166534 48%, #14532d 100%); color: #ffffff !important; box-shadow: 0 6px 14px rgba(22, 101, 52, 0.35), inset 0 -2px 3px rgba(0, 0, 0, 0.25); }
.btn-glossy-red { background: linear-gradient(180deg, #ef4444 0%, #dc2626 48%, #b91c1c 100%); color: #ffffff !important; box-shadow: 0 6px 14px rgba(220, 38, 38, 0.35), inset 0 -2px 4px rgba(0, 0, 0, 0.3); }
.btn-glossy-blue { background: linear-gradient(180deg, #3b82f6 0%, #2563eb 48%, #1d4ed8 100%); color: #ffffff !important; box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35), inset 0 -2px 4px rgba(0, 0, 0, 0.25); }
.btn-glossy-orange { background: linear-gradient(180deg, #f59e0b 0%, #d97706 48%, #b45309 100%); color: #ffffff !important; box-shadow: 0 6px 14px rgba(217, 119, 6, 0.35), inset 0 -2px 4px rgba(0, 0, 0, 0.25); }
.btn-glossy-dark { background: linear-gradient(180deg, #334155 0%, #1e293b 48%, #0f172a 100%); color: #ffffff !important; box-shadow: 0 6px 14px rgba(15, 23, 42, 0.35), inset 0 -2px 4px rgba(0, 0, 0, 0.4); }
.btn-glossy-sm { padding: 4px 10px; font-size: 0.74rem; }

.app-main { flex: 1; padding: 20px 28px 40px 28px; width: calc(100% - 95px); overflow-x: hidden; }
.top-navbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.top-navbar-main-row { display: flex; align-items: center; width: 100%; }
.top-navbar-main-row > .d-flex { margin-left: auto; }
.mobile-nav-brand { display: none !important; }
.mobile-nav-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; background: #ffffff; padding: 2px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); }
.mobile-nav-title { font-weight: 800; font-size: 0.92rem; color: var(--primary-green); letter-spacing: -0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 145px; }

/* --- ANIMASI LONCENG KEREN --- */
@keyframes bell-ring {
    0% { transform: rotate(0); }
    10% { transform: rotate(20deg); }
    20% { transform: rotate(-20deg); }
    30% { transform: rotate(15deg); }
    40% { transform: rotate(-15deg); }
    50% { transform: rotate(0); }
    100% { transform: rotate(0); }
}
.bell-animated { animation: bell-ring 1.5s infinite; transform-origin: top center; color: #f59e0b !important; filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6)); }

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
#dropdownNotifBtn { transition: all 0.3s ease; background: #ffffff; border: 1px solid var(--border-color); }
#dropdownNotifBtn:hover { background: #f8fafc; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important; }
.notif-badge-pill { animation: pulse-red 2s infinite; position: absolute; top: -3px; right: -3px; background: #ef4444; color: #ffffff; font-size: 0.62rem; font-weight: 800; padding: 2px 5px; border-radius: 50rem; border: 2px solid #ffffff; display: none; }

.search-box { position: relative; width: 100%; }
.search-box input { width: 100%; padding: 9px 16px 9px 38px; background: #ffffff; border: 1px solid var(--border-color); border-radius: 50rem; font-size: 0.86rem; color: var(--text-dark); outline: none; transition: all 0.2s ease; }
.search-box input:focus { border-color: var(--primary-green); box-shadow: 0 0 0 3px rgba(14, 77, 42, 0.1); }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; }

.user-widget-single { display: inline-flex; align-items: center; gap: 6px; background: #ffffff; padding: 3px 10px 3px 4px; border-radius: 50rem; border: 1px solid var(--border-color); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04); white-space: nowrap; }
.user-widget-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #0e4d2a 0%, #166534 100%); color: #ffffff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.75rem; }
.user-widget-name { font-weight: 700; font-size: 0.8rem; color: var(--text-dark); }
.user-widget-role { font-size: 0.65rem; font-weight: 800; padding: 2px 6px; border-radius: 50rem; text-transform: uppercase; }

.dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.dashboard-title { max-width: 100%; }
.dashboard-title h2 { font-size: clamp(1.15rem, 4vw, 1.7rem); font-weight: 800; color: var(--text-dark); letter-spacing: -0.4px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-title p { color: var(--text-muted); font-size: clamp(0.75rem, 2.6vw, 0.88rem); margin: 0; white-space: normal !important; word-wrap: break-word; overflow-wrap: break-word; line-height: 1.45; max-width: 100%; }
.header-actions-group { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card-featured { background: linear-gradient(145deg, var(--primary-green) 0%, #08331b 100%); color: #ffffff; border-radius: var(--radius-xl); padding: 20px; box-shadow: 0 14px 28px -8px rgba(14, 77, 42, 0.38); display: flex; flex-direction: column; justify-content: space-between; min-height: 150px; }
.stat-card-featured .stat-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; font-weight: 500; color: #e2e8f0; }
.stat-card-featured .arrow-badge { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.stat-card-featured .stat-value { font-size: 1.7rem; font-weight: 800; margin: 8px 0; }
.stat-card-featured .pill-tag { background: var(--accent-lime); color: #0f381e; font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 50rem; display: inline-flex; align-items: center; gap: 4px; width: fit-content; }

.stat-card-white { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 20px; display: flex; flex-direction: column; justify-content: space-between; min-height: 150px; box-shadow: var(--shadow-soft); transition: all 0.25s ease; }
.stat-card-white .stat-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.stat-card-white .arrow-badge { width: 30px; height: 30px; border-radius: 50%; background: #f0fdf4; color: var(--primary-green); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.stat-card-white .stat-value { font-size: 1.7rem; font-weight: 800; margin: 8px 0; }
.stat-card-white .pill-tag-soft { font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: 50rem; display: inline-flex; align-items: center; gap: 4px; width: fit-content; }

.table-panel { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 20px; box-shadow: var(--shadow-soft); margin-bottom: 24px; }
.table-panel-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

/* ==========================================================================
   MODEL TABEL EXCEL DENGAN PEWARNAAN FULL BARIS (MERAH, KUNING, HIJAU)
   ========================================================================== */
.table-responsive-custom { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); border: 1.5px solid #cbd5e1; }
.custom-table { width: 100%; border-collapse: collapse !important; min-width: 1100px; background: #ffffff; }
.custom-table thead th { background: #f1f5f9; color: #0f172a; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; padding: 12px 10px; border: 1px solid #cbd5e1 !important; white-space: nowrap; text-align: center; }
.custom-table tbody td { padding: 10px 12px; font-size: 0.84rem; border: 1px solid #cbd5e1 !important; vertical-align: middle; text-align: center; transition: background-color 0.2s ease; }
.custom-table tbody tr:hover td { background-color: #f8fafc; }

/* --- 1. PEWARNAAN BARIS MERAH SOLID --- */
.custom-table tbody tr.tr-tempo-merah td {
    background-color: #bc0101 !important;
    border-color: #a00000 !important;
    color: #ffffff !important;
}
.custom-table tbody tr.tr-tempo-merah td .text-dark,
.custom-table tbody tr.tr-tempo-merah td .text-secondary,
.custom-table tbody tr.tr-tempo-merah td .text-muted,
.custom-table tbody tr.tr-tempo-merah td .text-success,
.custom-table tbody tr.tr-tempo-merah td .text-primary { color: #ffffff !important; }

/* Penyesuaian agar teks lencana Bootstrap tidak tak terlihat di background merah */
.custom-table tbody tr.tr-tempo-merah td .badge.bg-light,
.custom-table tbody tr.tr-tempo-merah td .badge[class*="bg-opacity-10"] {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
}
.custom-table tbody tr.tr-tempo-merah td .badge i { color: #ffffff !important; }


/* --- 2. PEWARNAAN BARIS KUNING SOLID --- */
.custom-table tbody tr.tr-lunas-kuning td {
    background-color: #e6d40f !important;
    border-color: #c9b908 !important;
    color: #000000 !important;
}
.custom-table tbody tr.tr-lunas-kuning td .text-dark,
.custom-table tbody tr.tr-lunas-kuning td .text-secondary,
.custom-table tbody tr.tr-lunas-kuning td .text-muted,
.custom-table tbody tr.tr-lunas-kuning td .text-success,
.custom-table tbody tr.tr-lunas-kuning td .text-primary { color: #000000 !important; }

.custom-table tbody tr.tr-lunas-kuning td .badge.bg-light,
.custom-table tbody tr.tr-lunas-kuning td .badge[class*="bg-opacity-10"] {
    background-color: rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(0, 0, 0, 0.4) !important;
    color: #000000 !important;
}
.custom-table tbody tr.tr-lunas-kuning td .badge i { color: #000000 !important; }


/* --- 3. PEWARNAAN BARIS HIJAU SOLID --- */
.custom-table tbody tr.tr-lunas-hijau td {
    background-color: #1f8b09 !important;
    border-color: #166806 !important;
    color: #ffffff !important;
}
.custom-table tbody tr.tr-lunas-hijau td .text-dark,
.custom-table tbody tr.tr-lunas-hijau td .text-secondary,
.custom-table tbody tr.tr-lunas-hijau td .text-muted,
.custom-table tbody tr.tr-lunas-hijau td .text-success,
.custom-table tbody tr.tr-lunas-hijau td .text-primary { color: #ffffff !important; }

.custom-table tbody tr.tr-lunas-hijau td .badge.bg-light,
.custom-table tbody tr.tr-lunas-hijau td .badge[class*="bg-opacity-10"] {
    background-color: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
}
.custom-table tbody tr.tr-lunas-hijau td .badge i { color: #ffffff !important; }


/* TOMBOL/LENCANA FOTO DI DALAM SEL SOLID */
.tr-tempo-merah .badge-foto-merah { background: #ffffff !important; color: #bc0101 !important; border: none !important; font-weight: 800 !important; }
.tr-lunas-kuning .badge-foto-kuning { background: #000000 !important; color: #e6d40f !important; border: none !important; font-weight: 800 !important; }
.tr-lunas-hijau .badge-foto-hijau { background: #ffffff !important; color: #1f8b09 !important; border: none !important; font-weight: 800 !important; }

/* Jika di baris default putih */
.badge-foto-merah { background: #bc0101 !important; color: #ffffff !important; border: 1px solid #a00000 !important; padding: 5px 12px; border-radius: 50rem; font-size: 0.75rem; font-weight: 800 !important; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; box-shadow: 0 2px 5px rgba(188, 1, 1, 0.35) !important; transition: transform 0.15s ease; }
.badge-foto-kuning { background: #e6d40f !important; color: #000000 !important; border: 1px solid #c9b908 !important; padding: 5px 12px; border-radius: 50rem; font-size: 0.75rem; font-weight: 800 !important; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; box-shadow: 0 2px 5px rgba(230, 212, 15, 0.35) !important; transition: transform 0.15s ease; }
.badge-foto-hijau { background: #1f8b09 !important; color: #ffffff !important; border: 1px solid #166806 !important; padding: 5px 12px; border-radius: 50rem; font-size: 0.75rem; font-weight: 800 !important; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; box-shadow: 0 2px 5px rgba(31, 139, 9, 0.35) !important; transition: transform 0.15s ease; }

.badge-foto-merah:hover, .badge-foto-kuning:hover, .badge-foto-hijau:hover { transform: scale(1.05); filter: brightness(1.1); }
.col-nominal, .text-nowrap { white-space: nowrap !important; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   MODEL KARTU NOTICE DASHBOARD YANG RAPI
   ========================================================================== */
.alert-notice-card { padding: 16px 18px; border-radius: var(--radius-lg); display: flex; align-items: center; gap: 14px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); height: 100%; border-width: 1.5px !important; border-style: solid !important; }
.alert-notice-card.card-overdue { background: #fee2e2; border-color: #b91c1c !important; }
.alert-notice-card.card-h1 { background: #fee2e2; border-color: #ef4444 !important; }
.alert-notice-card.card-h2 { background: #ffedd5; border-color: #f97316 !important; }
.alert-notice-card.card-h3 { background: #fef9c3; border-color: #eab308 !important; }

.alert-notice-badge { flex-shrink: 0; font-size: 0.78rem; padding: 6px 12px; }
.alert-notice-content h6 { font-size: 0.88rem; margin-bottom: 2px; line-height: 1.35; }
.alert-notice-content small { font-size: 0.76rem; line-height: 1.25; display: block; }

/* ANIMASI KEDIP JATUH TEMPO */
@keyframes blink-overdue-darkred { 0%, 100% { background-color: #fee2e2; border-color: #b91c1c; color: #7f1d1d; box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.4); } 50% { background-color: #b91c1c; border-color: #7f1d1d; color: #ffffff; box-shadow: 0 0 10px 2px rgba(185, 28, 28, 0.65); } }
@keyframes blink-h1-red { 0%, 100% { background-color: #fee2e2; border-color: #ef4444; color: #991b1b; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 50% { background-color: #ef4444; border-color: #dc2626; color: #ffffff; box-shadow: 0 0 10px 2px rgba(239, 68, 68, 0.65); } }
@keyframes blink-h2-orange { 0%, 100% { background-color: #ffedd5; border-color: #f97316; color: #9a3412; box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); } 50% { background-color: #f97316; border-color: #ea580c; color: #ffffff; box-shadow: 0 0 8px 2px rgba(249, 115, 22, 0.55); } }
@keyframes blink-h3-yellow { 0%, 100% { background-color: #fef9c3; border-color: #eab308; color: #854d0e; box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.4); } 50% { background-color: #eab308; border-color: #ca8a04; color: #ffffff; box-shadow: 0 0 8px 2px rgba(234, 179, 8, 0.55); } }

/* Fix Lencana Kedip Jika Di Dalam Baris Merah Solid */
.tr-tempo-merah .badge-overdue-blink, .tr-tempo-merah .badge-h1-blink, .tr-tempo-merah .badge-h2-blink, .tr-tempo-merah .badge-h3-blink {
    background-color: transparent !important; color: #ffffff !important; border-color: #ffffff !important; animation: none !important; box-shadow: none !important;
}

.badge-overdue-blink { animation: blink-overdue-darkred 1.2s infinite ease-in-out; font-weight: 800; border-radius: 50rem; padding: 3px 8px; border: 1px solid #b91c1c; display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; white-space: nowrap; }
.badge-h1-blink { animation: blink-h1-red 1.2s infinite ease-in-out; font-weight: 800; border-radius: 50rem; padding: 3px 8px; border: 1px solid #ef4444; display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; white-space: nowrap; }
.badge-h2-blink { animation: blink-h2-orange 1.3s infinite ease-in-out; font-weight: 800; border-radius: 50rem; padding: 3px 8px; border: 1px solid #f97316; display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; white-space: nowrap; }
.badge-h3-blink { animation: blink-h3-yellow 1.5s infinite ease-in-out; font-weight: 800; border-radius: 50rem; padding: 3px 8px; border: 1px solid #eab308; display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; white-space: nowrap; }

.app-footer { background: #ffffff; border-top: 1px solid var(--border-color); padding: 12px 16px; text-align: center; margin-top: auto; width: 100%; }
.copyright-text { font-size: clamp(0.68rem, 2.3vw, 0.84rem); color: var(--text-muted); margin: 0; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; display: block; width: 100%; }
.copyright-link { color: var(--primary-green); font-weight: 700; text-decoration: none; }
.copyright-link:hover { color: var(--accent-green); text-decoration: underline; }

/* ==========================================================================
   MODAL KONFIRMASI BERSIH DARI DOM (TANPA OVERLAY BUG)
   ========================================================================== */
.custom-confirm-modal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.75); z-index: 10500;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.custom-confirm-box {
    background: #ffffff; border-radius: 20px; max-width: 400px; width: 100%;
    padding: 24px 20px; text-align: center; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid #e2e8f0; animation: modalFadeIn 0.2s ease-out; z-index: 10501;
}
@keyframes modalFadeIn { 0% { opacity: 0; transform: scale(0.94); } 100% { opacity: 1; transform: scale(1); } }

/* ==========================================================================
   MODAL PRATINJAU FOTO ELEGAN
   ========================================================================== */
.preview-modal-content { border-radius: 22px; overflow: hidden; background: #0f172a; border: 1px solid rgba(255, 255, 255, 0.15); }
.preview-modal-header { background: #1e293b; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.preview-icon-circle { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center; color: #22c55e; font-size: 0.9rem; flex-shrink: 0; }
.preview-modal-body { background: #0b1120; display: flex; align-items: center; justify-content: center; min-height: 250px; padding: 16px; }
.preview-modal-body img { max-height: 75vh; max-width: 100%; object-fit: contain; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.btn-modal-close-custom { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); color: #ffffff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; font-size: 0.9rem; }
.btn-modal-close-custom:hover { background: #ef4444; color: #ffffff; transform: scale(1.08); }

@media (max-width: 991px) { .app-sidebar { display: none !important; } .app-main { width: 100%; padding: 14px 14px 90px 14px; } .mobile-fab-container { display: block; } .top-navbar .user-widget-single { display: none !important; } .mobile-nav-brand { display: flex !important; align-items: center; gap: 8px; text-decoration: none; } }
@media (max-width: 768px) { .header-actions-group { display: flex; gap: 6px; width: 100%; flex-wrap: wrap; } .header-actions-group .btn-glossy { flex: 1 1 auto; padding: 8px 10px !important; font-size: 0.76rem !important; } .preview-modal-header { padding: 12px 14px; } }
@media (max-width: 576px) { .alert-notice-card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; } .alert-notice-badge { font-size: 0.72rem; padding: 4px 10px; } .alert-notice-content h6 { font-size: 0.82rem; } .login-glass-card { padding: 26px 18px; border-radius: 20px; } .login-logo-3d-box { width: 64px; height: 64px; } }
@media (max-width: 480px) { .mobile-nav-title { max-width: 120px; } }