/* ==========================================================================
   STYLESHEET APLIKASI ABSEN KARYAWAN ONLINE & INTEGRASI HRIS - BAGIAN HRD
   Desain Korporat Modern, Ramah, Berintegritas Tinggi & Responsif (HP & PC)
   ========================================================================== */

:root {
    --primary: #0f2942;
    --primary-light: #1e4976;
    --accent: #0284c7;
    --accent-hover: #0369a1;
    --gold: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --purple: #8b5cf6;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 6px rgba(15, 41, 66, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 41, 66, 0.10);
    --radius: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: 48px;
}

/* TOPBAR */
.topbar {
    background: linear-gradient(135deg, #091929 0%, #0f2942 60%, #1e4976 100%);
    color: #ffffff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

.brand-title h1 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.brand-title p {
    font-size: 0.78rem;
    color: #bae6fd;
}

.clock-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.live-time {
    font-size: 1.25rem;
    font-weight: 800;
    color: #38bdf8;
    font-variant-numeric: tabular-nums;
}

.live-date {
    font-size: 0.78rem;
    color: #e2e8f0;
}

/* CONTAINER */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 20px 0 20px;
}

/* HERO BANNER HRD */
.hero-hrd {
    background: linear-gradient(125deg, #0b2239 0%, #133b63 55%, #0369a1 100%);
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-content {
    padding: 28px 32px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #7dd3fc;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 5px 12px;
    border-radius: 999px;
    width: fit-content;
}

.hero-content h2 {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
}

.motto-box {
    background: rgba(255, 255, 255, 0.10);
    border-left: 4px solid #fbbf24;
    padding: 14px 18px;
    border-radius: 0 12px 12px 0;
    backdrop-filter: blur(6px);
}

.motto-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #fde68a;
    font-weight: 700;
    margin-bottom: 4px;
}

.motto-text {
    font-size: 0.98rem;
    font-style: italic;
    font-weight: 600;
    color: #ffffff;
}

.hero-rules-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.rule-chip {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #e0f2fe;
}

.rule-chip strong {
    color: #fbbf24;
}

.hero-image-wrap {
    position: relative;
    min-height: 260px;
    background: #0f172a;
}

.hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-image-caption {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(9, 25, 41, 0.82);
    backdrop-filter: blur(6px);
    color: #f8fafc;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* NAVIGATION TABS */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--bg-card);
    padding: 10px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.tab-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 11px 18px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 41, 66, 0.22);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* KPI CARDS */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent);
}

.kpi-card.kpi-hadir { border-top-color: var(--success); }
.kpi-card.kpi-late { border-top-color: var(--warning); }
.kpi-card.kpi-alfa-acc { border-top-color: var(--danger); background: #fffafa; }
.kpi-card.kpi-sakit { border-top-color: var(--info); }
.kpi-card.kpi-cuti { border-top-color: var(--purple); }

.kpi-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
}

.kpi-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* CARDS & GRIDS */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--primary);
}

.card-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-absen-layout {
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 20px;
}

/* MOBILE PHONE SIMULATOR / FORM CARD */
.phone-card {
    background: #ffffff;
    border-radius: 22px;
    border: 3px solid #1e293b;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    overflow: hidden;
}

.phone-Notch {
    background: #0f172a;
    color: #fff;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 700;
}

.phone-body {
    padding: 18px;
}

/* FORMS & CONTROLS */
.form-group {
    margin-bottom: 13px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border-radius: 9px;
    border: 1px solid #cbd5e1;
    font-size: 0.88rem;
    color: var(--text-main);
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn {
    border: none;
    padding: 10px 16px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.18s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover { background: #059669; }

.btn-warning {
    background: var(--warning);
    color: #fff;
}
.btn-warning:hover { background: #d97706; }

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: #dc2626; }

.btn-outline {
    background: #f8fafc;
    color: var(--primary);
    border: 1px solid #cbd5e1;
}
.btn-outline:hover { background: #e2e8f0; }

.btn-sm {
    padding: 5px 10px;
    font-size: 0.76rem;
    border-radius: 7px;
}

.gps-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 11px 13px;
    margin-bottom: 12px;
    font-size: 0.8rem;
}

.schedule-info-banner {
    background: #fefce8;
    border: 1px solid #fde047;
    color: #713f12;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

/* TABLES */
.table-responsive {
    overflow-x: auto;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}

table.data-table th {
    background: #0f2942;
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    padding: 10px 11px;
    white-space: nowrap;
}

table.data-table td {
    padding: 9px 11px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

table.data-table tr:hover td {
    background-color: #f8fafc;
}

/* BADGES */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-hadir { background: #dcfce7; color: #166534; }
.badge-terlambat { background: #fef3c7; color: #92400e; }
.badge-sakit { background: #dbeafe; color: #1e40af; }
.badge-izin { background: #e0e7ff; color: #3730a3; }
.badge-cuti { background: #f3e8ff; color: #6b21a8; }
.badge-alfa { background: #fee2e2; color: #991b1b; }
.badge-office { background: #e0f2fe; color: #075985; }
.badge-proyek { background: #ffedd5; color: #9a3412; }
.badge-free-gps { background: #ecfccb; color: #3f6212; }

/* FORMULA CALLOUT */
.formula-banner {
    background: linear-gradient(90deg, #fff1f2 0%, #fffbeb 100%);
    border: 1px solid #fecdd3;
    border-left: 5px solid #e11d48;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.map-box {
    width: 100%;
    height: 360px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.mini-map-box {
    width: 100%;
    height: 185px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    margin-top: 8px;
}

/* FILTER BAR */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    background: #f8fafc;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
    flex: 1;
}

.filter-item label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* MODAL */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.modal-backdrop.open {
    display: flex;
}

.modal-dialog {
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    padding: 22px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    max-height: 92vh;
    overflow-y: auto;
}

@media (max-width: 1024px) {
    .hero-hrd {
        grid-template-columns: 1fr;
    }
    .grid-2, .grid-absen-layout {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   MENU BERANDA & NAVIGASI HALAMAN DALAM
   ========================================================================== */
.home-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.menu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px 20px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--accent);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    font-family: inherit;
    color: inherit;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.menu-card:nth-child(2) { border-top-color: var(--success); }
.menu-card:nth-child(3) { border-top-color: var(--danger); }
.menu-card:nth-child(4) { border-top-color: var(--purple); }
.menu-card:nth-child(5) { border-top-color: var(--gold); }

.menu-icon {
    font-size: 2rem;
    line-height: 1;
}

.menu-label {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--primary);
}

.menu-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.view-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.view-bar-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}

.link-info-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 0.84rem;
    color: #0c4a6e;
}

.link-warning {
    margin-top: 8px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 8px 10px;
    border-radius: 8px;
}

/* ==========================================================================
   MENU NAVIGASI ATAS (tombol aktif)
   ========================================================================== */
.top-nav {
    flex-basis: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.top-nav-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #e0f2fe;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 9px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.top-nav-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: translateY(-1px);
}

.top-nav-btn.active {
    background: #ffffff;
    color: var(--primary);
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.online-pill {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.55);
    color: #6ee7b7;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
}

.online-pill i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
}


/* ==========================================================================
   STYLE TAMBAHAN: REKAPITULASI (PERIODE LALU, INI, YTD), TABS & SCROLL BOUND
   ========================================================================== */

/* Panel & Filter Rekap */
.rk-panel {
    background: #ffffff;
    border-top: 4px solid var(--accent);
}

.rk-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rk-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.rk-quick {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

/* Judul Banner Laporan */
.rk-banner {
    background: linear-gradient(135deg, #091e33 0%, #113559 100%);
    color: #ffffff;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 6px solid #10b981;
}

.rk-banner h2 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.rk-banner small {
    color: #93c5fd;
    font-size: 0.82rem;
}

/* KPI Indikator */
.rk-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.rk-kpi {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid #94a3b8;
}

.rk-kpi.k-total { border-top-color: #0284c7; }
.rk-kpi.k-hadir { border-top-color: #10b981; background: #f0fdf4; }
.rk-kpi.k-sakit { border-top-color: #f59e0b; background: #fefce8; }
.rk-kpi.k-tidak { border-top-color: #ef4444; background: #fef2f2; }
.rk-kpi.k-pct-hadir { border-top-color: #059669; }
.rk-kpi.k-pct-tidak { border-top-color: #dc2626; }

.rk-kpi-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.rk-kpi-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 4px 0;
}

.rk-kpi-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.rk-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* Legend & Info */
.rk-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #fefce8;
    border: 1px solid #fef08a;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #854d0e;
    margin-bottom: 10px;
}

.rk-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.rk-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rk-legend b {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 4px;
    font-size: 0.72rem;
    color: #fff;
}

.rk-legend b.c-H { background: #16a34a; }
.rk-legend b.c-S { background: #3b82f6; }
.rk-legend b.c-I { background: #6366f1; }
.rk-legend b.c-A { background: #dc2626; }
.rk-legend b.c-C { background: #9333ea; }
.rk-legend b.c-TL { background: #d97706; }
.rk-legend b.c-X { background: #64748b; }

/* Sticky Header Scrollable Table */
.scroll-table {
    max-height: 520px;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.scroll-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Tabel Rekap Periode Multi-Header */
.rk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.rk-table th {
    padding: 8px 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-weight: 700;
}

.rk-table td {
    padding: 7px 6px;
    border: 1px solid #e2e8f0;
}

.rk-table tr:hover td {
    background: #f8fafc;
}

.rk-no { width: 38px; text-align: center; background: #0f2942; }
.rk-nama { min-width: 170px; background: #0f2942; text-align: left; }
.rk-dept { min-width: 190px; background: #0f2942; text-align: left; }

.grp-lalu { background: #0284c7 !important; color: #fff; }
.grp-ini  { background: #059669 !important; color: #fff; }
.grp-ytd  { background: #4f46e5 !important; color: #fff; }

.rk-h2 th {
    font-size: 0.75rem;
    padding: 4px;
    text-align: center;
}

/* Tabel Batas Akhir (Table End Mark) */
.table-end {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 10px;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 600;
}

/* Floating Action Button (Scroll Up / Down) */
.scroll-fab {
    position: fixed;
    right: 22px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
}

.scroll-fab button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0f2942;
    color: #ffffff;
    border: 2px solid #38bdf8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.scroll-fab button:hover {
    background: #0284c7;
    transform: scale(1.08);
}

/* Side Card Modul Absen */
.absen-side {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.side-list {
    margin: 0 0 16px 18px;
    font-size: 0.84rem;
    color: #334155;
    line-height: 1.6;
}

.side-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==========================================================================
   PHOTO THUMBNAIL & ZOOM LIGHTBOX MODAL
   ========================================================================== */
.table-face-thumb-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.table-face-thumb {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #38bdf8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.table-face-thumb:hover {
    transform: scale(1.15);
    border-color: #0284c7;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

.table-face-placeholder {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px dashed #94a3b8;
}

/* Photo Zoom Lightbox Modal */
.photo-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.photo-zoom-modal.active {
    opacity: 1;
    visibility: visible;
}

.photo-zoom-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 24px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    color: #f8fafc;
    position: relative;
    text-align: center;
    animation: zoomModalPop 0.25s ease-out;
}

@keyframes zoomModalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.photo-zoom-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: #334155;
    border: none;
    color: #cbd5e1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.photo-zoom-close:hover {
    background: #ef4444;
    color: #fff;
}

.photo-zoom-img-wrap {
    width: 220px;
    height: 220px;
    margin: 10px auto 16px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #38bdf8;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-zoom-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-zoom-img.zoomed {
    transform: scale(1.6);
    cursor: zoom-out;
}

.photo-zoom-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 4px;
}

.photo-zoom-sub {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 12px;
}

.photo-zoom-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #064e3b;
    color: #6ee7b7;
    border: 1px solid #059669;
}

/* ==========================================================================
   MODUL TRACKING GPS & NOTICE ALERT STYLES
   ========================================================================== */
.tracking-map-container {
    height: 350px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.badge-tracking-inside {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-tracking-outside {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    animation: pulseRedBorder 1.5s infinite;
}

.badge-tracking-gpsoff {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
}

@keyframes pulseRedBorder {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Topbar Alert Badge */
.topbar-alert-btn {
    background: #fee2e2;
    border: 1px solid #f87171;
    color: #b91c1c;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.topbar-alert-btn:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

.topbar-alert-btn.has-alert {
    animation: alertPulse 1.8s infinite;
}

@keyframes alertPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
    50% { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.alert-badge-count {
    background: #ef4444;
    color: #fff;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 800;
}

/* Supervisor Card in Tracking */
.supervisor-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.supervisor-card-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 96px;
    width: 96px;
    flex-shrink: 0;
}

.supervisor-card-actions .btn {
    padding: 5px 8px;
    font-size: 0.76rem;
    white-space: nowrap;
    text-align: center;
    width: 100%;
}

.supervisor-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.supervisor-card-info h5 {
    margin: 0 0 2px 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.supervisor-card-info p {
    margin: 0;
    font-size: 0.78rem;
    color: #64748b;
}
