/* ════ ABSENSI BAPPERIDA - STYLES ════ */
    :root {
      --navy: #0a1628;
      --gold: #c9a84c;
      --gold-dim: rgba(201, 168, 76, .15);
      --white: #f0f4ff;
      --muted: #7a90b8;
      --success: #22c55e;
      --danger: #ef4444;
      --warning: #f59e0b;
      --info: #60a5fa;
      --card-bg: rgba(17, 34, 64, .85);
      --border: rgba(201, 168, 76, .2);
      --admin: #a78bfa;
      --admin-dim: rgba(167, 139, 250, .15);
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      -webkit-tap-highlight-color: transparent
    }

    html,
    body {
      height: 100%
    }

    body {
      font-family: 'Plus Jakarta Sans', sans-serif;
      background: var(--navy);
      color: var(--white);
      min-height: 100vh;
      overflow-x: hidden
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 168, 76, .12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(10, 22, 60, .8) 0%, transparent 60%)
    }

    .app {
      position: relative;
      z-index: 1;
      max-width: 480px; /* Wider for "Pro" mobile experience */
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      padding: 0 0 110px; /* Removed horizontal padding, panels will handle it */
    }

    /* Offline Banner */
    .offline-banner {
      display: none;
      background: var(--danger);
      color: var(--white);
      text-align: center;
      padding: 8px;
      font-size: 12px;
      font-weight: 700;
      width: 100%;
      position: sticky;
      top: 0;
      z-index: 99998;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5)
    }

    /* Header */
    .header {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 16px 12px; /* Restored horizontal padding */
      border-bottom: 1px solid var(--border);
      margin-bottom: 10px;
    }

    .logo-wrap {
      width: 36px;
      height: 36px;
      border-radius: 9px;
      background: var(--gold-dim);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 17px;
      flex-shrink: 0
    }

    .org-name {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .12em;
      color: var(--gold);
      text-transform: uppercase;
      line-height: 1.2
    }

    .org-sub {
      font-size: 15px;
      font-weight: 800;
      color: var(--white);
      line-height: 1.2
    }

    /* Bottom Navigation Bar (Modern UI) */
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 100%;
      max-width: 480px; 
      background: rgba(10, 22, 40, 0.95);
      backdrop-filter: blur(30px);
      -webkit-backdrop-filter: blur(30px);
      border-top: 1px solid rgba(201, 168, 76, 0.1);
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      padding: 8px 8px calc(10px + var(--tg-safe-area-inset-bottom, 0px));
      z-index: 1000;
      box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
      border-radius: 28px 28px 0 0;
    }

    .nav-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      background: none;
      border: none;
      color: var(--muted);
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      padding: 5px 0;
    }

    .nav-item i {
      font-size: 18px;
      transition: all 0.3s ease;
    }

    .nav-item span {
      font-size: 9px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      transition: all 0.3s ease;
    }

    .nav-item.active {
      color: var(--gold);
    }

    .nav-item.active i {
      transform: translateY(-5px);
      text-shadow: 0 0 15px rgba(201, 168, 76, 0.6);
    }

    .nav-item.active span {
      transform: scale(1.1);
    }

    /* MAIN CENTER BUTTON - PRO MAX GLASS */
    .nav-item.nav-main {
      flex: 0 0 72px;
      height: 72px;
      background: linear-gradient(135deg, var(--gold), #9b6e1a);
      border-radius: 50%;
      margin-bottom: 30px;
      border: 6px solid #0a1628;
      color: #050c1e !important;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 
                  0 0 30px rgba(201, 168, 76, 0.4);
      z-index: 1001;
      justify-content: center;
      transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      position: relative;
      overflow: hidden;
      animation: pulse-glow 3s infinite;
    }

    @keyframes pulse-glow {
      0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(201, 168, 76, 0.3); }
      50% { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 40px rgba(201, 168, 76, 0.6); }
    }

    .nav-item.nav-main i {
      font-size: 24px;
      margin-bottom: -2px;
    }

    .nav-item.nav-main span {
      font-size: 8px;
      font-weight: 900;
      color: #050c1e;
      margin-top: -2px;
    }
    
    .nav-item.nav-main::before {
      content: '';
      position: absolute;
      top: -50%; left: -150%; width: 50px; height: 300%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
      transform: rotate(45deg);
      animation: shine-sweep 4s infinite;
    }

    @keyframes shine-sweep {
      0% { left: -150%; }
      20% { left: 250%; }
      100% { left: 250%; }
    }
    
    .nav-item.nav-main:hover::before {
      left: 100%;
    }
    
    .nav-item.nav-main i {
      font-size: 24px;
      margin-bottom: 2px;
      transform: none !important;
      text-shadow: none !important;
    }

    .nav-item.nav-main span {
      font-size: 8px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .nav-item.nav-main:active {
      transform: scale(0.9) translateY(5px);
    }

    .nav-item.nav-main.active {
      background: linear-gradient(135deg, #fff, var(--gold));
      box-shadow: 0 15px 35px rgba(201, 168, 76, 0.4),
                  0 0 25px rgba(201, 168, 76, 0.3);
      border-color: #0a1628;
    }

    .nav-item.nav-main.active::after {
      display: none;
    }

    /* Admin Tab Special Color */
    .nav-item.admin-tab.active {
      color: var(--admin);
    }
    .nav-item.admin-tab.active i {
      text-shadow: 0 0 15px rgba(167, 139, 250, 0.6);
    }

    /* Active Indicator Dot */
    .nav-item.active::after {
      content: '';
      position: absolute;
      bottom: 0;
      width: 4px;
      height: 4px;
      background: currentColor;
      border-radius: 50%;
      box-shadow: 0 0 8px currentColor;
    }

    /* Panels Adjustment */
    .panel {
      display: none;
      padding: 15px 12px 140px; /* Base mobile padding */
      flex: 1;
      overflow-y: auto;
      background: var(--bg);
      position: relative;
    }
    
    @media (min-width: 768px) {
      .panel {
        padding: 40px 60px;
      }
    }


    .panel.active {
      display: block !important;
    }

    /* Responsive visibility */
    @media (max-width: 767px) {
      .desktop-only { display: none !important; }
      .mobile-only { display: flex !important; }
    }

    @media (min-width: 768px) {
      .desktop-only { display: flex; }
      .mobile-only { display: none !important; }
    }

    /* ══ DESKTOP FULL SCREEN OPTIMIZATION ══ */
    @media (min-width: 768px) {
      .app {
        width: 100vw !important;
        display: flex !important;
        flex-direction: row !important;
        padding: 0 !important;
      }
      .bottom-nav {
        max-width: 260px !important;
        width: 260px !important;
        flex-shrink: 0 !important;
        position: sticky !important;
        top: 0;
        height: 100vh;
        border-radius: 0;
        bottom: auto;
        left: auto;
        transform: none;
        z-index: 1000;
        background: #0d1b2a !important; /* Solid background for sidebar */
        border-right: 1px solid rgba(255, 255, 255, 0.08);
      }
      .panel {
        flex: 1 !important;
        width: calc(100vw - 280px) !important;
        max-width: none !important;
      }
    }

    /* ══ MORE MENU OVERLAY ══ */
    .more-menu-overlay {
      position: fixed;
      inset: 0;
      background: rgba(5, 12, 30, 0.4);
      backdrop-filter: blur(8px);
      z-index: 2000;
      display: none;
      animation: fadeIn 0.3s ease;
    }
    
    .more-menu-content {
      position: absolute;
      bottom: 100px;
      right: 20px;
      width: 200px;
      background: rgba(17, 34, 64, 0.95);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 10px;
      box-shadow: 0 15px 40px rgba(0,0,0,0.6);
      display: flex;
      flex-direction: column;
      gap: 5px;
      transform-origin: bottom right;
      animation: popUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    
    @keyframes popUp {
      from { opacity: 0; transform: scale(0.8) translateY(20px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }
    
    .more-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 15px;
      border-radius: 12px;
      color: var(--white);
      text-decoration: none;
      font-size: 13px;
      font-weight: 600;
      transition: all 0.2s;
      background: transparent;
      border: none;
      width: 100%;
      cursor: pointer;
    }
    
    .more-item:hover {
      background: rgba(201, 168, 76, 0.1);
      color: var(--gold);
    }
    
    .more-item i {
      font-size: 16px;
      color: var(--gold);
      width: 20px;
      text-align: center;
    }
    
    .more-item.admin-only {
      color: var(--admin);
      display: none; /* Controlled by JS */
    }
    .more-item.admin-only i {
      color: var(--admin);
    }

    /* Clock */
    .clock-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 0;
      margin-bottom: 15px;
      backdrop-filter: blur(12px);
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: stretch;
      gap: 0;
      width: 100%;
      box-sizing: border-box;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .clock-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--gold), transparent);
      z-index: 1
    }

    .clock-left {
      flex: 1;
      min-width: 0;
      padding: 16px 14px;
      display: flex;
      flex-direction: column;
      justify-content: center
    }

    .clock-label {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: .1em;
      color: var(--muted);
      text-transform: uppercase;
      margin-bottom: 3px
    }

    .clock-time {
      font-family: 'JetBrains Mono', monospace;
      font-size: 38px;
      font-weight: 700;
      color: var(--white);
      letter-spacing: -1.5px;
      line-height: 1.1
    }

    .clock-time span {
      color: var(--gold)
    }

    .clock-date {
      font-size: 11px;
      color: var(--muted);
      margin-top: 3px
    }

    .clock-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: var(--gold-dim);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 2px 9px;
      font-size: 10px;
      font-weight: 600;
      color: var(--gold);
      margin-top: 6px
    }

    .clock-loc-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: rgba(34, 197, 94, .08);
      border: 1px solid rgba(34, 197, 94, .25);
      border-radius: 20px;
      padding: 2px 9px;
      font-size: 9px;
      font-weight: 600;
      color: #4ade80;
      margin-top: 4px;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .clock-loc-badge.unknown {
      background: rgba(255, 255, 255, .05);
      border-color: rgba(255, 255, 255, .1);
      color: var(--muted)
    }

    /* ── Mini weather inside clock-card ── */
    .clock-weather {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      flex: 0 0 38%;
      padding: 14px 12px;
      background: transparent;
      border-left: none;
      transition: opacity .3s;
      align-self: stretch
    }

    .clock-weather-icon {
      font-size: 36px;
      line-height: 1;
      text-align: center
    }

    .clock-weather-temp {
      font-family: 'JetBrains Mono', monospace;
      font-size: 22px;
      font-weight: 800;
      color: #93c5fd;
      text-align: center;
      margin-top: 2px;
      letter-spacing: -0.5px
    }

    .clock-weather-cond {
      font-size: 10px;
      color: rgba(255, 255, 255, .8);
      text-align: center;
      line-height: 1.3;
      font-weight: 600
    }

    .clock-weather-tags {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      margin-top: 6px;
      width: 100%
    }

    .clock-weather-tag {
      font-size: 8.5px;
      color: rgba(255, 255, 255, .55);
      background: rgba(255, 255, 255, .07);
      border-radius: 5px;
      padding: 2px 6px;
      white-space: nowrap;
      text-align: center;
      width: 100%;
      box-sizing: border-box
    }

    /* Removed redundant .app definition */

    .dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: var(--gold);
      animation: pulse 1.5s ease infinite
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1;
        transform: scale(1)
      }

      50% {
        opacity: .5;
        transform: scale(.7)
      }
    }

    /* Cards */
    .card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 16px;
      margin-bottom: 12px;
      backdrop-filter: blur(15px);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .card-title {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: .08em;
      color: var(--muted);
      text-transform: uppercase;
      margin-bottom: 8px;
      display: flex;
      justify-content: space-between;
      align-items: center
    }

    /* Info grid */

    /* User card */
    .user-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 16px;
      margin-bottom: 12px;
      backdrop-filter: blur(15px);
      display: flex;
      align-items: center;
      gap: 14px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .avatar {
      width: 48px;
      height: 48px;
      border-radius: 14px;
      background: linear-gradient(135deg, var(--gold), #9b6e1a);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      font-weight: 800;
      color: var(--navy);
      flex-shrink: 0
    }

    .user-name {
      font-size: 13px;
      font-weight: 700
    }

    .user-jabatan {
      font-size: 10px;
      color: var(--gold);
      margin-top: 1px;
      font-weight: 600
    }

    .user-meta {
      font-size: 10px;
      color: var(--muted);
      margin-top: 1px
    }

    .sbadge {
      margin-left: auto;
      padding: 2px 7px;
      border-radius: 6px;
      font-size: 9px;
      font-weight: 700;
      flex-shrink: 0
    }

    .s-aktif {
      background: rgba(34, 197, 94, .15);
      color: var(--success);
      border: 1px solid rgba(34, 197, 94, .3)
    }

    .s-loading {
      background: rgba(201, 168, 76, .15);
      color: var(--gold);
      border: 1px solid rgba(201, 168, 76, .3)
    }

    /* Lokasi list */
    .lokasi-item {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 4px 0;
      border-bottom: 1px solid rgba(255, 255, 255, .05)
    }

    .lokasi-item:last-child {
      border-bottom: none;
      padding-bottom: 0
    }

    .lokasi-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--gold);
      flex-shrink: 0
    }

    .lokasi-name {
      font-size: 11px;
      font-weight: 600
    }

    /* GPS */
    .gps-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 11px 13px;
      margin-bottom: 10px;
      backdrop-filter: blur(12px);
      display: none
    }

    .gps-card.show {
      display: block
    }

    .gps-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 4px
    }

    .gps-key {
      font-size: 9px;
      color: var(--muted);
      font-weight: 600
    }

    .gps-val {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px
    }

    .acc-bar {
      height: 3px;
      background: rgba(255, 255, 255, .1);
      border-radius: 2px;
      margin-top: 5px
    }

    .acc-fill {
      height: 100%;
      border-radius: 2px;
      transition: width .5s, background .5s
    }

    .absen-actions-container {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin: 10px 0;
    }
    
    .absen-buttons-col {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%;
    }
    
    @media (min-width: 600px) {
      .absen-actions-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
      }
    }

    /* WiFi / Network indicator */
    .wifi-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 7px 11px;
      border-radius: 10px;
      margin-bottom: 10px;
      font-size: 10px;
      font-weight: 700;
      border: 1px solid;
      transition: all .4s
    }

    .wifi-bar.checking {
      background: rgba(201, 168, 76, .08);
      border-color: rgba(201, 168, 76, .2);
      color: var(--muted)
    }

    .wifi-bar.kantor {
      background: rgba(34, 197, 94, .1);
      border-color: rgba(34, 197, 94, .3);
      color: var(--success)
    }

    .wifi-bar.luar {
      background: rgba(239, 68, 68, .1);
      border-color: rgba(239, 68, 68, .3);
      color: var(--danger)
    }

    .wifi-bar.warn {
      background: rgba(245, 158, 11, .1);
      border-color: rgba(245, 158, 11, .3);
      color: var(--warning)
    }

    .wifi-bar.unknown {
      background: rgba(96, 165, 250, .08);
      border-color: rgba(96, 165, 250, .2);
      color: var(--info)
    }

    .wifi-icon {
      font-size: 14px;
      flex-shrink: 0
    }

    .wifi-info {
      flex: 1;
      line-height: 1.4
    }

    .wifi-status {
      font-weight: 700
    }

    .wifi-detail {
      font-size: 9px;
      opacity: .75;
      font-weight: 500;
      margin-top: 1px
    }

    /* ══ AUTH MODAL (LOGIN & DAFTAR) ══ */
    .auth-overlay {
      position: fixed;
      inset: 0;
      z-index: 10000;
      background: rgba(5, 12, 30, 0.85);
      backdrop-filter: blur(25px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      animation: fadeIn 0.4s ease;
    }

    .auth-card {
      width: 100%;
      max-width: 360px;
      background: rgba(17, 34, 64, 0.7);
      border: 1px solid var(--border);
      border-radius: 24px;
      padding: 28px 24px;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
      position: relative;
      overflow: hidden;
    }

    .auth-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, transparent, var(--gold), transparent);
    }

    .auth-title {
      font-size: 20px;
      font-weight: 800;
      color: var(--white);
      text-align: center;
      margin-bottom: 8px;
    }

    .auth-sub {
      font-size: 11px;
      color: var(--muted);
      text-align: center;
      margin-bottom: 24px;
      line-height: 1.5;
    }

    .auth-tabs {
      display: flex;
      background: rgba(255, 255, 255, 0.05);
      padding: 4px;
      border-radius: 12px;
      margin-bottom: 20px;
    }

    .auth-tab {
      flex: 1;
      padding: 8px;
      font-size: 11px;
      font-weight: 700;
      color: var(--muted);
      cursor: pointer;
      text-align: center;
      border-radius: 8px;
      transition: all 0.3s;
    }

    .auth-tab.active {
      background: var(--gold);
      color: var(--navy);
    }

    .form-input-auth {
      width: 100%;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 14px;
      color: var(--white);
      font-family: inherit;
      font-size: 13px;
      margin-bottom: 12px;
      transition: all 0.3s;
    }

    .form-input-auth:focus {
      outline: none;
      border-color: var(--gold);
      background: rgba(255, 255, 255, 0.08);
    }

    .form-input-auth option {
      background: #1a2a4a;
      color: #ffffff;
      padding: 10px;
    }

    .btn-auth {
      width: 100%;
      background: var(--gold);
      color: var(--navy);
      border: none;
      border-radius: 12px;
      padding: 14px;
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      transition: all 0.3s;
      margin-top: 10px;
    }

    .btn-auth:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }

    .auth-footer {
      font-size: 10px;
      color: var(--muted);
      text-align: center;
      margin-top: 20px;
    }

    /* ══ KAMERA / FACE SCAN MODAL ══ */
    .cam-overlay {
      position: fixed;
      inset: 0;
      z-index: 20000;
      background: rgba(5, 12, 30, .97);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      padding: 0;
      overflow: hidden
    }

    .cam-overlay.hidden {
      display: none
    }

    .cam-header {
      width: 100%;
      padding: 14px 16px 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0
    }

    .cam-title {
      font-size: 13px;
      font-weight: 800;
      color: var(--white)
    }

    .cam-close {
      width: 30px;
      height: 30px;
      border-radius: 8px;
      background: rgba(239, 68, 68, .15);
      border: 1px solid rgba(239, 68, 68, .3);
      color: var(--danger);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center
    }

    .cam-body {
      flex: 1;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 12px 14px;
      gap: 10px;
      overflow-y: auto
    }

    /* Video container */
    .cam-video-wrap {
      position: relative;
      width: 100%;
      max-width: 320px;
      aspect-ratio: 3/4;
      border-radius: 16px;
      overflow: hidden;
      border: 2px solid var(--border);
      background: #000;
      flex-shrink: 0
    }

    .cam-video-wrap.face-ok {
      border-color: var(--success);
      box-shadow: 0 0 16px rgba(34, 197, 94, .3)
    }

    .cam-video-wrap.face-warn {
      border-color: var(--warning);
      box-shadow: 0 0 16px rgba(245, 158, 11, .25)
    }

    .cam-video-wrap.face-bad {
      border-color: var(--danger);
      box-shadow: 0 0 16px rgba(239, 68, 68, .25)
    }

    #camVideo {
      width: 100%;
      height: 100%;
      object-fit: cover; /* Kembali ke cover (Full screen UI) */
      background: #000;
      transform: scaleX(-1); /* Hapus !important agar bisa diupdate JS */
      transition: transform 0.2s ease;
    }

    /* ── ZOOM SLIDER STYLING ── */
    .cam-zoom-wrap {
      width: 100%;
      max-width: 320px;
      padding: 10px 15px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border);
      border-radius: 12px;
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: -5px;
    }

    .zoom-slider {
      flex: 1;
      height: 6px;
      -webkit-appearance: none;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 3px;
      outline: none;
    }

    .zoom-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 18px;
      height: 18px;
      background: var(--gold);
      border-radius: 50%;
      cursor: pointer;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    }

    #buktiVideo {
      width: 100%;
      height: 100%;
      object-fit: contain;
      /* Agar tidak terlalu zoom (muat tanpa crop) */
      transform: none !important;
      background: #000;
    }

    #buktiPreviewCamImg {
      width: 100%;
      height: 100%;
      object-fit: contain;
      transform: none !important;
    }

    #camCanvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none
    }

    /* Face guide oval */
    .face-guide {
      position: absolute;
      inset: 0;
      pointer-events: none;
      display: flex;
      align-items: center;
      justify-content: center
    }

    .face-oval {
      width: 55%;
      aspect-ratio: 3/4;
      border: 2px dashed rgba(201, 168, 76, .5);
      border-radius: 50%;
      transition: border-color .3s
    }

    .cam-video-wrap.face-ok .face-oval {
      border-color: rgba(34, 197, 94, .8);
      border-style: solid
    }

    /* Status badge */
    .cam-status {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      border-radius: 10px;
      width: 100%;
      max-width: 320px;
      flex-shrink: 0
    }

    .cam-status.idle {
      background: rgba(201, 168, 76, .08);
      border: 1px solid rgba(201, 168, 76, .2)
    }

    .cam-status.ok {
      background: rgba(34, 197, 94, .1);
      border: 1px solid rgba(34, 197, 94, .3)
    }

    .cam-status.warn {
      background: rgba(245, 158, 11, .1);
      border: 1px solid rgba(245, 158, 11, .3)
    }

    .cam-status.bad {
      background: rgba(239, 68, 68, .1);
      border: 1px solid rgba(239, 68, 68, .3)
    }

    .cam-status-icon {
      font-size: 18px;
      flex-shrink: 0
    }

    .cam-status-text {
      flex: 1
    }

    .cam-status-title {
      font-size: 11px;
      font-weight: 700
    }

    .cam-status-sub {
      font-size: 9px;
      opacity: .75;
      margin-top: 1px
    }

    /* Liveness challenge - removed */
    .liveness-card {
      display: none
    }

    /* Face recognition */
    .face-reg-card {
      background: var(--card-bg);
      border: 1px solid rgba(201, 168, 76, .3);
      border-radius: 12px;
      padding: 10px 14px;
      width: 100%;
      max-width: 320px;
      flex-shrink: 0;
      margin-bottom: 6px
    }

    .face-reg-title {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: .08em;
      color: var(--muted);
      text-transform: uppercase;
      margin-bottom: 6px
    }

    .face-reg-row {
      display: flex;
      align-items: center;
      gap: 8px
    }

    .face-reg-thumb {
      width: 40px;
      height: 40px;
      border-radius: 8px;
      object-fit: cover;
      border: 2px solid var(--gold);
      flex-shrink: 0
    }

    .face-reg-thumb.empty {
      background: rgba(255, 255, 255, .05);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      color: var(--muted)
    }

    .face-reg-info {
      flex: 1;
      min-width: 0
    }

    .face-reg-status {
      font-size: 10px;
      font-weight: 700
    }

    .face-reg-sub {
      font-size: 9px;
      color: var(--muted);
      margin-top: 1px
    }

    .face-reg-btn {
      background: rgba(201, 168, 76, .12);
      border: 1px solid rgba(201, 168, 76, .3);
      color: var(--gold);
      border-radius: 8px;
      padding: 4px 10px;
      font-size: 9px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap
    }

    .admin-face-title {
      font-size: 10px;
      font-weight: 800;
      color: var(--white);
      letter-spacing: 0.05em;
    }

    /* ══ ADMIN FACE & SIG LIST ══ */
    .face-adm-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border);
      border-radius: 16px;
      margin-bottom: 10px;
      transition: all 0.2s;
    }

    .face-adm-item:active {
      background: rgba(255, 255, 255, 0.06);
    }

    .face-adm-thumb {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      background: var(--navy);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      overflow: hidden;
      border: 2px solid var(--border);
      flex-shrink: 0;
    }

    .face-adm-item.has-face .face-adm-thumb {
      border-color: var(--success);
      box-shadow: 0 0 10px rgba(34, 197, 94, 0.1);
    }

    .face-adm-info {
      flex: 1;
      min-width: 0;
    }

    .face-adm-name {
      font-size: 11px;
      font-weight: 800;
      color: var(--white);
      margin-bottom: 2px;
      line-height: 1.3;
      word-break: break-word;
    }

    .face-adm-status {
      font-size: 10px;
      color: var(--muted);
      margin-top: 4px;
      line-height: 1.4;
    }

    .face-adm-btns {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-left: 12px;
    }

    .face-adm-btn {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: var(--muted);
      padding: 5px 12px;
      border-radius: 12px;
      font-size: 9px;
      font-weight: 800;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s;
      min-width: 75px;
      text-align: center;
    }

    .face-adm-btn:hover {
      background: rgba(255, 255, 255, 0.08);
      color: var(--white);
    }

    .admin-section {
      padding-top: 5px;
    }

    .face-match-badge {
      display: inline-block;
      border-radius: 8px;
      padding: 2px 8px;
      font-size: 9px;
      font-weight: 800;
      margin-left: 4px
    }

    .face-match-ok {
      background: rgba(34, 197, 94, .15);
      color: var(--success);
      border: 1px solid rgba(34, 197, 94, .3)
    }

    .face-match-warn {
      background: rgba(239, 68, 68, .12);
      color: var(--danger);
      border: 1px solid rgba(239, 68, 68, .3)
    }

    .face-match-skip {
      background: rgba(255, 255, 255, .06);
      color: var(--muted);
      border: 1px solid rgba(255, 255, 255, .1)
    }

    /* Baju / seragam check */
    .baju-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 14px;
      width: 100%;
      max-width: 320px;
      flex-shrink: 0
    }

    .baju-title {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: .08em;
      color: var(--muted);
      text-transform: uppercase;
      margin-bottom: 6px
    }

    .baju-row {
      display: flex;
      align-items: center;
      gap: 8px
    }

    .baju-swatch {
      width: 28px;
      height: 28px;
      border-radius: 7px;
      border: 2px solid rgba(255, 255, 255, .15);
      flex-shrink: 0;
      transition: all .3s
    }

    .baju-info {
      flex: 1
    }

    .baju-color {
      font-size: 11px;
      font-weight: 700
    }

    .baju-verdict {
      font-size: 9px;
      margin-top: 1px
    }

    .baju-verdict.ok {
      color: var(--success)
    }

    .baju-verdict.warn {
      color: var(--warning)
    }

    /* Hari seragam info */
    .seragam-info {
      font-size: 9px;
      padding: 5px 10px;
      border-radius: 7px;
      background: rgba(201, 168, 76, .08);
      border: 1px solid rgba(201, 168, 76, .15);
      color: var(--gold);
      width: 100%;
      max-width: 320px;
      text-align: center;
      flex-shrink: 0
    }

    /* Capture button */
    .btn-capture {
      width: 100%;
      max-width: 320px;
      padding: 13px;
      border-radius: 13px;
      background: linear-gradient(135deg, var(--gold), #9b6e1a);
      border: none;
      color: var(--navy);
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      flex-shrink: 0;
      transition: opacity .2s
    }

    .btn-capture:disabled {
      opacity: .5;
      cursor: not-allowed
    }

    .btn-capture-skip {
      width: 100%;
      max-width: 320px;
      padding: 9px;
      border-radius: 10px;
      background: transparent;
      border: 1px solid rgba(255, 255, 255, .12);
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      flex-shrink: 0;
      margin-top: -4px
    }

    /* Result preview */
    .cam-preview {
      width: 100%;
      max-width: 320px;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid var(--border);
      flex-shrink: 0;
      display: none
    }

    .cam-preview.show {
      display: block
    }

    .cam-preview img {
      width: 100%;
      display: block;
      transform: scaleX(-1) !important;
    }

    .cam-preview-info {
      padding: 8px 10px;
      background: rgba(17, 34, 64, .9);
      font-size: 9px;
      color: var(--muted)
    }

    .cam-preview-badge {
      display: inline-flex;
      gap: 4px;
      align-items: center;
      padding: 2px 7px;
      border-radius: 5px;
      font-size: 9px;
      font-weight: 700;
      margin-right: 4px
    }

    .cpb-ok {
      background: rgba(34, 197, 94, .15);
      color: var(--success)
    }

    .cpb-warn {
      background: rgba(245, 158, 11, .15);
      color: var(--warning)
    }

    /* Loading model */
    .model-loading {
      text-align: center;
      padding: 20px;
      color: var(--muted);
      font-size: 11px
    }

    .model-loading .spin {
      font-size: 24px;
      display: block;
      margin-bottom: 8px;
      animation: spin 1s linear infinite
    }

    @keyframes spin {
      to {
        transform: rotate(360deg)
      }
    }

    /* Today history card */
    .today-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 15px;
      margin-bottom: 15px;
      backdrop-filter: blur(12px);
      width: 100%;
      box-sizing: border-box
    }

    .today-empty {
      text-align: center;
      padding: 12px 0;
      font-size: 11px;
      color: var(--muted)
    }

    .today-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 5px 0;
      border-bottom: 1px solid rgba(255, 255, 255, .05)
    }

    .today-row:last-child {
      border-bottom: none;
      padding-bottom: 0
    }

    .today-badge {
      padding: 2px 7px;
      border-radius: 6px;
      font-size: 9px;
      font-weight: 700;
      flex-shrink: 0;
      min-width: 70px;
      text-align: center
    }

    .tb-pulang-luar {
      background: rgba(245, 158, 11, .15);
      color: #f59e0b
    }

    .tb-masuk {
      background: rgba(34, 197, 94, .15);
      color: var(--success)
    }

    .tb-pulang {
      background: rgba(96, 165, 250, .15);
      color: var(--info)
    }

    .tb-luar {
      background: rgba(245, 158, 11, .15);
      color: var(--warning)
    }

    .tb-izin {
      background: rgba(245, 158, 11, .15);
      color: var(--warning)
    }

    .tb-sakit {
      background: rgba(239, 68, 68, .15);
      color: var(--danger)
    }

    .tb-tugas {
      background: rgba(167, 139, 250, .15);
      color: #a78bfa
    }

    .tb-tubel {
      background: rgba(99, 102, 241, .15);
      color: #818cf8
    }

    .tb-cuti {
      background: rgba(20, 184, 166, .15);
      color: #2dd4bf
    }

    .today-jam {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      font-weight: 600;
      flex-shrink: 0;
      color: var(--muted)
    }

    .today-lokasi {
      font-size: 10px;
      color: var(--muted);
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    /* Result */
    .result-card {
      border-radius: 20px;
      padding: 15px;
      margin-bottom: 15px;
      display: none;
      animation: slideUp .3s ease;
      width: 100%;
      box-sizing: border-box;
    }

    .result-card.show {
      display: block
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(10px)
      }

      to {
        opacity: 1;
        transform: translateY(0)
      }
    }

    .r-success {
      background: rgba(34, 197, 94, .1);
      border: 1px solid rgba(34, 197, 94, .3)
    }

    .r-fail {
      background: rgba(239, 68, 68, .1);
      border: 1px solid rgba(239, 68, 68, .3)
    }

    .r-warning {
      background: rgba(245, 158, 11, .1);
      border: 1px solid rgba(245, 158, 11, .3)
    }

    .r-icon {
      font-size: 22px;
      margin-bottom: 5px
    }

    .r-title {
      font-size: 13px;
      font-weight: 800;
      margin-bottom: 2px
    }

    .r-success .r-title {
      color: var(--success)
    }

    .r-fail .r-title {
      color: var(--danger)
    }

    .r-warning .r-title {
      color: #f59e0b
    }

    .r-warning .r-title {
      color: var(--warning)
    }

    .r-msg {
      font-size: 11px;
      color: var(--muted);
      line-height: 1.5;
      white-space: pre-line
    }

    /* Buttons */
    .btn-primary {
      width: 100%;
      padding: 14px;
      border: none;
      border-radius: 13px;
      background: linear-gradient(135deg, var(--gold) 0%, #a07828 100%);
      color: var(--navy);
      font-family: inherit;
      font-size: 14px;
      font-weight: 800;
      cursor: pointer;
      transition: transform .15s, box-shadow .15s;
      box-shadow: 0 4px 18px rgba(201, 168, 76, .3);
      margin-bottom: 8px
    }

    .btn-primary:active {
      transform: scale(.97)
    }

    .btn-primary:disabled {
      opacity: .5;
      cursor: not-allowed;
      transform: none
    }

    .btn-admin {
      width: 100%;
      padding: 14px;
      border: none;
      border-radius: 13px;
      background: linear-gradient(135deg, #7c3aed, #a78bfa);
      color: #fff;
      font-family: inherit;
      font-size: 14px;
      font-weight: 800;
      cursor: pointer;
      transition: transform .15s, box-shadow .15s;
      box-shadow: 0 4px 18px rgba(124, 58, 237, .25);
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .btn-admin:active {
      transform: scale(.97);
      box-shadow: 0 2px 10px rgba(124, 58, 237, .2);
    }

    .btn-admin:disabled {
      opacity: .5;
      cursor: not-allowed;
      transform: none
    }

    .btn-inner {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px
    }

    .btn-refresh,
    .btn-sm-admin {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 6px 12px;
      border-radius: 10px;
      border: 1px solid rgba(201, 168, 76, .2);
      background: rgba(201, 168, 76, .08);
      color: var(--gold);
      font-family: inherit;
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      transition: all .2s;
    }

    .btn-refresh:hover,
    .btn-sm-admin:hover {
      background: rgba(201, 168, 76, .15);
      border-color: rgba(201, 168, 76, .4);
    }

    .btn-refresh:active,
    .btn-sm-admin:active {
      transform: scale(.96);
    }

    .btn-refresh:disabled,
    .btn-sm-admin:disabled {
      opacity: .5;
      cursor: not-allowed;
      transform: none;
    }

    /* Admin Sub-Navigation */
    .admin-nav {
      display: flex;
      gap: 5px;
      background: rgba(255, 255, 255, .04);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 3px;
      margin-bottom: 12px;
      position: sticky;
      top: 65px;
      z-index: 100;
      backdrop-filter: blur(10px);
    }

    .admin-nav-btn {
      flex: 1;
      padding: 7px 5px;
      border-radius: 17px;
      border: none;
      background: transparent;
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
      transition: all .2s;
      white-space: nowrap;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
    }

    .admin-nav-btn.active {
      background: var(--admin);
      color: #fff;
      font-weight: 800;
      box-shadow: 0 2px 10px rgba(124, 58, 237, .2);
    }

    .admin-section {
      animation: fadeIn .3s ease;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(5px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Spinner */
    .spinner {
      width: 15px;
      height: 15px;
      border-radius: 50%;
      border: 2px solid rgba(10, 22, 40, .3);
      border-top-color: var(--navy);
      animation: spin .7s linear infinite;
      display: inline-block
    }

    .spin-sm {
      width: 11px;
      height: 11px;
      border-radius: 50%;
      border: 2px solid rgba(201, 168, 76, .3);
      border-top-color: var(--gold);
      animation: spin .7s linear infinite;
      display: inline-block
    }

    @keyframes spin {
      to {
        transform: rotate(360deg)
      }
    }

    /* Divider */
    .divider {
      display: flex;
      align-items: center;
      gap: 7px;
      margin: 8px 0
    }

    .divider::before,
    .divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border)
    }

    .divider span {
      font-size: 9px;
      color: var(--muted);
      font-weight: 600;
      letter-spacing: .08em
    }

    /* Shimmer */
    .shimmer {
      background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .1) 50%, rgba(255, 255, 255, .05) 75%);
      background-size: 200% 100%;
      animation: shim 1.5s infinite;
      border-radius: 6px
    }

    @keyframes shim {
      from {
        background-position: 200% 0
      }

      to {
        background-position: -200% 0
      }
    }

    /* Form */
    .form-group {
      margin-bottom: 12px
    }

    .form-label {
      font-size: 10px;
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .07em;
      margin-bottom: 6px;
      display: block
    }

    .form-input,
    .form-textarea {
      width: 100%;
      background: rgba(255, 255, 255, .05);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px 12px;
      color: var(--white);
      font-family: inherit;
      font-size: 12px;
      outline: none;
      transition: border-color .2s
    }

    .form-input:focus,
    .form-textarea:focus {
      border-color: var(--gold)
    }

    .form-textarea {
      resize: none;
      min-height: 80px;
      line-height: 1.5
    }

    /* Dropdown / Select dark theme */
    select.form-input,
    select.date-range-input,
    select.dok-input,
    .dok-select {
      background: rgba(20, 35, 70, .92);
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a84c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
      background-size: 12px;
      appearance: none;
      -webkit-appearance: none;
      padding-right: 32px;
      color: var(--white);
      border: 1px solid var(--border);
      cursor: pointer;
    }

    select.form-input:focus,
    select.date-range-input:focus,
    select.dok-input:focus {
      border-color: var(--gold);
      outline: none;
    }

    select.form-input option,
    select.date-range-input option,
    select.dok-input option {
      background: #0f1e3a;
      color: var(--white);
      padding: 8px;
    }

    select.form-input option:hover,
    select.form-input option:checked,
    select.date-range-input option:checked,
    select.dok-input option:checked {
      background: rgba(201, 168, 76, .25);
      color: var(--gold);
    }

    /* Jenis pills */
    .jenis-grid {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
      margin-top: 8px;
      margin-bottom: 16px;
    }

    .jenis-pill {
      flex: 0 1 calc(33.33% - 10px);
      min-width: 90px;
      padding: 10px 6px;
      border-radius: 12px;
      border: 1.5px solid var(--border);
      background: rgba(255, 255, 255, .03);
      color: var(--muted);
      font-family: inherit;
      font-size: 12.5px;
      font-weight: 700;
      cursor: pointer;
      text-align: center;
      transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
      display: flex;
      flex-direction: row;
      /* Icon and text on same line */
      align-items: center;
      justify-content: center;
      gap: 6px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .jenis-pill span {
      font-size: 15px;
      /* Icon size */
    }

    .jenis-pill:hover {
      background: rgba(255, 255, 255, .08);
      border-color: var(--gold-dim);
      transform: translateY(-2px);
    }

    .jenis-pill.active {
      border-color: var(--gold);
      background: var(--gold-dim);
      color: var(--gold)
    }

    /* File upload */
    .bukti-btn-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-bottom: 8px
    }

    .bukti-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 13px 8px;
      border-radius: 10px;
      border: 1px dashed var(--border);
      background: transparent;
      color: var(--muted);
      font-family: inherit;
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      transition: all .2s;
      width: 100%
    }

    .bukti-btn:active {
      border-color: var(--gold);
      color: var(--gold);
      background: var(--gold-dim)
    }

    .bukti-btn.has-file {
      border-color: var(--success);
      color: var(--success);
      background: rgba(34, 197, 94, .08);
      border-style: solid
    }

    .bukti-btn-icon {
      font-size: 20px;
      line-height: 1
    }

    .file-preview-outer {
      margin-top: 8px;
      position: relative;
      display: none
    }

    .file-preview-outer.show {
      display: block
    }

    .file-preview-outer img {
      width: 100%;
      border-radius: 10px;
      max-height: 180px;
      object-fit: cover;
      display: block
    }

    .file-preview-outer .file-clear {
      position: absolute;
      top: 6px;
      right: 6px;
      background: rgba(239, 68, 68, .9);
      border: none;
      border-radius: 50%;
      width: 24px;
      height: 24px;
      color: #fff;
      font-size: 13px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800
    }

    .file-info-row {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 10px;
      color: var(--success);
      margin-top: 5px;
      font-weight: 600
    }

    /* Download rekap */
    .btn-download {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 6px 12px;
      border-radius: 9px;
      border: 1px solid rgba(96, 165, 250, .4);
      background: rgba(96, 165, 250, .1);
      color: var(--info);
      font-family: inherit;
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      transition: all .15s;
      flex-shrink: 0;
      white-space: nowrap
    }

    .btn-download:active {
      background: rgba(96, 165, 250, .25)
    }

    .btn-download:disabled {
      opacity: .5;
      cursor: not-allowed
    }

    .rekap-toolbar {
      display: flex;
      gap: 6px;
      align-items: center
    }

    /* Print */
    @media print {
      body {
        background: #fff !important;
        color: #111 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact
      }

      .app {
        max-width: 100% !important;
        box-shadow: none
      }

      .tabs,
      .header,
      .rekap-toolbar,
      .date-range-card,
      .footer,
      #panel-absen,
      #panel-ket,
      #panel-profil,
      #panel-admin {
        display: none !important
      }

      .panel {
        padding: 0 !important
      }

      #panel-rekap {
        display: block !important
      }

      .rekap-header {
        margin-bottom: 8px
      }

      .rekap-stats6 {
        display: grid !important;
        break-inside: avoid
      }

      .stat-card2 {
        background: #f0f4ff !important;
        border: 1px solid #c9a84c !important
      }

      .stat-num2,
      .stat-lbl2 {
        color: #0a1628 !important
      }

      .pegawai-card {
        background: #f8f9fc !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
        margin-bottom: 6px
      }

      .pegawai-name,
      .pegawai-jabatan {
        color: #0a1628 !important
      }

      .pbar-item {
        background: #e8edf5 !important;
        color: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact
      }

      .rekap-title {
        color: #0a1628 !important;
        font-size: 16px !important
      }

      .print-info {
        display: block !important
      }
    }

    .print-info {
      display: none;
      font-size: 10px;
      color: var(--muted);
      margin-bottom: 6px;
      line-height: 1.6
    }

    /* Riwayat */
    .log-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px
    }

    .log-title {
      font-size: 14px;
      font-weight: 800
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 7px;
      margin-bottom: 10px
    }

    .stat-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 11px;
      padding: 9px 5px;
      text-align: center;
      backdrop-filter: blur(12px)
    }

    .stat-num {
      font-family: 'JetBrains Mono', monospace;
      font-size: 20px;
      font-weight: 700;
      line-height: 1
    }

    .stat-lbl {
      font-size: 9px;
      color: var(--muted);
      font-weight: 600;
      margin-top: 2px
    }

    .s-masuk .stat-num {
      color: var(--success)
    }

    .s-izin .stat-num {
      color: var(--warning)
    }

    .s-sakit .stat-num {
      color: var(--danger)
    }

    .filter-bar {
      display: flex;
      gap: 5px;
      margin-bottom: 10px;
      overflow-x: auto;
      padding-bottom: 2px;
      scrollbar-width: none
    }

    .filter-bar::-webkit-scrollbar {
      display: none
    }

    .filter-chip {
      flex-shrink: 0;
      padding: 4px 10px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      font-family: inherit;
      font-size: 10px;
      font-weight: 600;
      cursor: pointer;
      transition: all .15s
    }

    .filter-chip.active {
      background: var(--gold-dim);
      border-color: var(--gold);
      color: var(--gold)
    }

    .log-list {
      display: flex;
      flex-direction: column;
      gap: 7px
    }

    .log-item {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 13px;
      padding: 10px 12px;
      backdrop-filter: blur(10px);
      animation: slideUp .25s ease;
      display: flex;
      align-items: center;
      gap: 10px
    }

    .log-icon-wrap {
      width: 34px;
      height: 34px;
      border-radius: 9px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      flex-shrink: 0
    }

    .l-pulang-luar .log-icon-wrap {
      background: rgba(245, 158, 11, .15)
    }

    .l-pulang-luar .log-jenis {
      color: #f59e0b
    }

    .pb-pulang-luar {
      background: rgba(245, 158, 11, .15);
      color: #f59e0b
    }

    .l-masuk .log-icon-wrap {
      background: rgba(34, 197, 94, .12)
    }

    .l-pulang .log-icon-wrap {
      background: rgba(96, 165, 250, .12)
    }

    .l-izin .log-icon-wrap {
      background: rgba(245, 158, 11, .12)
    }

    .l-sakit .log-icon-wrap {
      background: rgba(239, 68, 68, .12)
    }

    .l-tugas .log-icon-wrap {
      background: rgba(167, 139, 250, .12)
    }

    .l-pending .log-icon-wrap {
      background: rgba(251, 191, 36, .12)
    }

    .l-alpa .log-icon-wrap {
      background: rgba(239, 68, 68, .15)
    }

    .l-luar .log-icon-wrap {
      background: rgba(245, 158, 11, .08)
    }

    .log-info {
      flex: 1;
      min-width: 0
    }

    .log-jenis {
      font-size: 11px;
      font-weight: 700
    }

    .l-masuk .log-jenis {
      color: var(--success)
    }

    .l-pulang .log-jenis {
      color: var(--info)
    }

    .l-izin .log-jenis {
      color: var(--warning)
    }

    .l-sakit .log-jenis {
      color: var(--danger)
    }

    .l-tugas .log-jenis {
      color: #a78bfa
    }

    .l-pending .log-jenis {
      color: #fbbf24;
      font-style: italic
    }

    .l-alpa .log-jenis {
      color: var(--danger);
      font-weight: 800
    }

    .l-luar .log-jenis {
      color: var(--warning)
    }

    .log-tanggal {
      font-size: 10px;
      color: var(--muted);
      margin-top: 1px
    }

    .log-ket {
      font-size: 9px;
      color: var(--muted);
      margin-top: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    .log-jam {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      font-weight: 600;
      flex-shrink: 0
    }

    /* Shimmer rows */
    .sh-row {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 13px;
      padding: 12px;
      display: flex;
      align-items: center;
      gap: 10px
    }

    .sh-circ {
      width: 34px;
      height: 34px;
      border-radius: 9px;
      flex-shrink: 0
    }

    .sh-lines {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 5px
    }

    .sh-line {
      height: 10px
    }

    /* REKAP */
    .rekap-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px
    }

    .rekap-title {
      font-size: 14px;
      font-weight: 800
    }

    .date-range-card {
      background: linear-gradient(145deg, var(--card-bg), rgba(255, 255, 255, 0.01));
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 18px;
      margin-bottom: 15px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }

    .date-range-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      gap: 8px;
      margin-bottom: 8px
    }

    .date-range-label {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: .07em;
      color: var(--muted);
      text-transform: uppercase;
      margin-bottom: 4px
    }

    .date-range-input {
      width: 100%;
      background: rgba(255, 255, 255, .05);
      border: 1px solid var(--border);
      border-radius: 9px;
      padding: 8px 10px;
      color: var(--white);
      font-family: inherit;
      font-size: 11px;
      outline: none;
      transition: border-color .2s
    }

    .date-range-input:focus {
      border-color: var(--gold)
    }

    .date-preset-bar {
      display: flex;
      gap: 5px;
      overflow-x: auto;
      scrollbar-width: none
    }

    .date-preset-bar::-webkit-scrollbar {
      display: none
    }

    .date-preset {
      flex-shrink: 0;
      padding: 4px 10px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      font-family: inherit;
      font-size: 9px;
      font-weight: 600;
      cursor: pointer;
      transition: all .15px
    }

    .date-preset.active {
      background: var(--gold-dim);
      border-color: var(--gold);
      color: var(--gold)
    }

    /* Rekap summary 6-grid */
    .rekap-stats6 {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 6px;
      margin-bottom: 12px
    }

    .stat-card2 {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 7px 4px;
      text-align: center;
      backdrop-filter: blur(12px)
    }

    .stat-num2 {
      font-family: 'JetBrains Mono', monospace;
      font-size: 17px;
      font-weight: 700;
      line-height: 1
    }

    .stat-lbl2 {
      font-size: 8px;
      color: var(--muted);
      font-weight: 600;
      margin-top: 2px
    }

    .sn-masuk {
      color: var(--success)
    }

    .sn-pulang {
      color: var(--info)
    }

    .sn-luar {
      color: var(--warning)
    }

    .sn-izin {
      color: var(--warning)
    }

    .sn-sakit {
      color: var(--danger)
    }

    .sn-tugas {
      color: #a78bfa
    }

    /* Rekap stat cards baru */
    .rs-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 11px;
      padding: 9px 6px 7px;
      text-align: center;
      backdrop-filter: blur(12px);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px
    }

    .rs-num {
      font-family: 'JetBrains Mono', monospace;
      font-size: 18px;
      font-weight: 800;
      line-height: 1
    }

    .rs-ico {
      font-size: 16px;
      line-height: 1
    }

    .rs-lbl {
      font-size: 8px;
      color: var(--muted);
      font-weight: 600;
      letter-spacing: .03em
    }

    .rs-masuk {
      border-color: rgba(34, 197, 94, .3);
      background: rgba(34, 197, 94, .06)
    }

    .rs-masuk .rs-num {
      color: var(--success)
    }

    .rs-pulang {
      border-color: rgba(96, 165, 250, .3);
      background: rgba(96, 165, 250, .06)
    }

    .rs-pulang .rs-num {
      color: var(--info)
    }

    .rs-lap {
      border-color: rgba(245, 158, 11, .3);
      background: rgba(245, 158, 11, .06)
    }

    .rs-lap .rs-num {
      color: #f59e0b
    }

    .rs-luar {
      border-color: rgba(245, 158, 11, .2);
      background: rgba(245, 158, 11, .04)
    }

    .rs-luar .rs-num {
      color: var(--warning)
    }

    .rs-izin {
      border-color: rgba(251, 191, 36, .3);
      background: rgba(251, 191, 36, .06)
    }

    .rs-izin .rs-num {
      color: #fbbf24
    }

    .rs-sakit {
      border-color: rgba(239, 68, 68, .3);
      background: rgba(239, 68, 68, .06)
    }

    .rs-sakit .rs-num {
      color: var(--danger)
    }

    .rs-tugas {
      border-color: rgba(139, 92, 246, .3);
      background: rgba(139, 92, 246, .06)
    }

    .rs-tugas .rs-num {
      color: #8b5cf6
    }

    .rs-tubel {
      border-color: rgba(99, 102, 241, .3);
      background: rgba(99, 102, 241, .06)
    }

    .rs-tubel .rs-num {
      color: #818cf8
    }

    .rs-cuti {
      border-color: rgba(20, 184, 166, .3);
      background: rgba(20, 184, 166, .06)
    }

    .rs-cuti .rs-num {
      color: #2dd4bf
    }

    .rs-alpa {
      border-color: rgba(239, 68, 68, .25);
      background: rgba(239, 68, 68, .1)
    }

    .rs-alpa .rs-num {
      color: #fca5a5
    }

    /* ════ PROFIL ════ */
    .profil-hero-card {
      background: linear-gradient(135deg, rgba(201, 168, 76, .15), rgba(201, 168, 76, .05));
      border: 1px solid rgba(201, 168, 76, .3);
      border-radius: 16px;
      padding: 16px;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 14px
    }

    .profil-avatar-lg {
      width: 56px;
      height: 56px;
      border-radius: 14px;
      background: linear-gradient(135deg, var(--gold), #9b6e1a);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      font-weight: 800;
      color: var(--navy);
      flex-shrink: 0
    }

    .profil-info {
      flex: 1;
      min-width: 0
    }

    .profil-nama {
      font-size: 14px;
      font-weight: 800;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    .profil-jabatan {
      font-size: 11px;
      color: var(--gold);
      font-weight: 600;
      margin-top: 2px
    }

    .profil-nip {
      font-size: 10px;
      color: var(--muted);
      font-family: 'JetBrains Mono', monospace;
      margin-top: 1px
    }

    .profil-badge {
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 9px;
      font-weight: 700
    }

    .aktif-badge {
      background: rgba(34, 197, 94, .15);
      color: var(--success)
    }

    .nonaktif-badge {
      background: rgba(239, 68, 68, .15);
      color: var(--danger)
    }

    .ket-status-badge {
      background: rgba(245, 158, 11, .15);
      color: var(--warning)
    }

    /* ── Keterangan Status List ── */
    .ket-list-wrap {
      margin-top: 12px
    }

    .ket-list-title {
      font-size: 11px;
      font-weight: 800;
      color: var(--white);
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between
    }

    .ket-item {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 11px 13px;
      margin-bottom: 8px;
      display: flex;
      align-items: flex-start;
      gap: 10px
    }

    .ket-item-left {
      flex: 1;
      min-width: 0
    }

    .ket-item-jenis {
      font-size: 11px;
      font-weight: 800;
      display: flex;
      align-items: center;
      gap: 5px;
      margin-bottom: 3px
    }

    .ket-item-tgl {
      font-size: 10px;
      color: var(--muted);
      font-family: 'JetBrains Mono', monospace;
      margin-bottom: 2px
    }

    .ket-item-ket {
      font-size: 10px;
      color: var(--muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 200px
    }

    .ket-item-right {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 6px;
      flex-shrink: 0
    }

    .ket-badge {
      padding: 2px 8px;
      border-radius: 8px;
      font-size: 9px;
      font-weight: 800;
      white-space: nowrap
    }

    .ket-badge-pending {
      background: rgba(245, 158, 11, .15);
      color: var(--warning)
    }

    .ket-badge-approved {
      background: rgba(34, 197, 94, .15);
      color: var(--success)
    }

    .ket-badge-rejected {
      background: rgba(239, 68, 68, .15);
      color: var(--danger)
    }

    .ket-action-row {
      display: flex;
      gap: 5px
    }

    .ket-btn-edit {
      background: rgba(96, 165, 250, .12);
      border: 1px solid rgba(96, 165, 250, .25);
      color: var(--info);
      border-radius: 7px;
      padding: 3px 9px;
      font-size: 10px;
      font-weight: 700;
      cursor: pointer
    }

    .ket-btn-del {
      background: rgba(239, 68, 68, .1);
      border: 1px solid rgba(239, 68, 68, .2);
      color: var(--danger);
      border-radius: 7px;
      padding: 3px 9px;
      font-size: 10px;
      font-weight: 700;
      cursor: pointer
    }

    .ket-btn-edit:active,
    .ket-btn-del:active {
      opacity: .7
    }

    /* modal */
    .ket-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .65);
      z-index: 9000;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity .2s
    }

    .ket-modal-overlay.open {
      opacity: 1;
      pointer-events: all
    }

    .ket-modal {
      background: var(--navy-card, #1a2035);
      border-radius: 20px 20px 0 0;
      padding: 20px 18px 32px;
      width: 100%;
      max-width: 480px;
      transform: translateY(100%);
      transition: transform .25s cubic-bezier(.4, 0, .2, 1)
    }

    .ket-modal-overlay.open .ket-modal {
      transform: translateY(0)
    }

    .ket-modal-title {
      font-size: 14px;
      font-weight: 800;
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      gap: 8px
    }

    .ket-modal-close {
      margin-left: auto;
      background: none;
      border: none;
      color: var(--muted);
      font-size: 18px;
      cursor: pointer;
      padding: 0 4px
    }

    /* admin konfirmasi panel */
    .konfirm-item {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 13px;
      margin-bottom: 8px
    }

    .konfirm-nama {
      font-size: 12px;
      font-weight: 800;
      margin-bottom: 2px
    }

    .konfirm-detail {
      font-size: 10px;
      color: var(--muted);
      margin-bottom: 8px;
      line-height: 1.6
    }

    .konfirm-actions {
      display: flex;
      gap: 8px
    }

    .konfirm-btn-ok {
      flex: 1;
      background: rgba(34, 197, 94, .15);
      border: 1px solid rgba(34, 197, 94, .3);
      color: var(--success);
      border-radius: 9px;
      padding: 8px;
      font-size: 11px;
      font-weight: 800;
      cursor: pointer
    }

    .konfirm-btn-no {
      flex: 1;
      background: rgba(239, 68, 68, .1);
      border: 1px solid rgba(239, 68, 68, .2);
      color: var(--danger);
      border-radius: 9px;
      padding: 8px;
      font-size: 11px;
      font-weight: 800;
      cursor: pointer
    }

    .konfirm-btn-ok:active,
    .konfirm-btn-no:active {
      opacity: .7
    }

    /* ── Libur Admin ── */
    .libur-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-bottom: 10px
    }

    .libur-item {
      background: rgba(239, 68, 68, .05);
      border: 1px solid rgba(239, 68, 68, .18);
      border-radius: 10px;
      padding: 9px 11px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      transition: background .15s
    }

    .libur-item:hover {
      background: rgba(239, 68, 68, .09)
    }

    .libur-item-left {
      display: flex;
      flex-direction: column;
      gap: 2px;
      flex: 1;
      min-width: 0
    }

    .libur-item-tgl {
      font-size: 10px;
      font-family: 'JetBrains Mono', monospace;
      font-weight: 700;
      color: var(--gold)
    }

    .libur-item-day {
      font-size: 9px;
      color: var(--muted);
      font-weight: 600
    }

    .libur-item-nama {
      font-size: 10px;
      color: var(--white);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .libur-del-btn {
      background: rgba(239, 68, 68, .1);
      border: 1px solid rgba(239, 68, 68, .2);
      color: var(--danger);
      border-radius: 6px;
      padding: 3px 8px;
      font-size: 10px;
      cursor: pointer;
      flex-shrink: 0;
      transition: background .15s
    }

    .libur-del-btn:hover {
      background: rgba(239, 68, 68, .25)
    }

    .libur-badge {
      display: inline-block;
      background: rgba(239, 68, 68, .12);
      border: 1px solid rgba(239, 68, 68, .25);
      color: var(--danger);
      border-radius: 8px;
      padding: 1px 7px;
      font-size: 9px;
      font-weight: 800;
      margin-left: 5px
    }

    .libur-month-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 10px;
      font-weight: 800;
      color: var(--muted);
      margin: 10px 0 5px;
      padding: 4px 8px;
      background: rgba(255, 255, 255, .04);
      border-radius: 7px
    }

    .libur-range-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-bottom: 8px
    }

    /* ── Weather Card ── */
    .weather-card {
      background: linear-gradient(135deg, rgba(15, 40, 90, .9), rgba(20, 60, 110, .7));
      border: 1px solid rgba(96, 165, 250, .25);
      border-radius: 14px;
      padding: 10px 14px;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 12px;
      transition: opacity .3s
    }

    .weather-icon {
      font-size: 28px;
      flex-shrink: 0;
      line-height: 1
    }

    .weather-body {
      flex: 1;
      min-width: 0
    }

    .weather-main {
      display: flex;
      align-items: baseline;
      gap: 6px
    }

    .weather-temp {
      font-size: 20px;
      font-weight: 800;
      color: #93c5fd;
      font-family: 'JetBrains Mono', monospace
    }

    .weather-cond {
      font-size: 11px;
      color: var(--white);
      font-weight: 600
    }

    .weather-meta {
      display: flex;
      gap: 10px;
      margin-top: 3px;
      flex-wrap: wrap
    }

    .weather-tag {
      font-size: 9px;
      color: var(--muted);
      background: rgba(255, 255, 255, .06);
      border-radius: 5px;
      padding: 1px 6px
    }

    .weather-loc {
      font-size: 9px;
      color: rgba(96, 165, 250, .7);
      margin-top: 2px
    }

    /* ── Jam pegawai di rekap ── */
    .jam-pegawai-row {
      display: flex;
      gap: 6px;
      align-items: center;
      margin-top: 4px;
      flex-wrap: wrap
    }

    .jam-pgw-item {
      font-size: 9px;
      background: rgba(201, 168, 76, .08);
      border: 1px solid rgba(201, 168, 76, .2);
      border-radius: 7px;
      padding: 2px 7px;
      font-family: 'JetBrains Mono', monospace;
      color: var(--gold);
      font-weight: 700
    }

    .jam-aktual-row {
      display: flex;
      gap: 8px;
      align-items: center;
      margin-top: 6px;
      padding: 7px 10px;
      background: rgba(15, 30, 60, .5);
      border-radius: 10px;
      border: 1px solid rgba(201, 168, 76, .15);
      flex-wrap: wrap
    }

    .jam-aktual-item {
      display: flex;
      flex-direction: column;
      gap: 1px;
      min-width: 80px
    }

    .jam-aktual-label {
      font-size: 8px;
      color: var(--muted);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .4px
    }

    .jam-aktual-val {
      font-size: 14px;
      font-family: 'JetBrains Mono', monospace;
      font-weight: 800;
      letter-spacing: .5px
    }

    .jam-aktual-val.hadir {
      color: var(--success)
    }

    .jam-aktual-val.terlambat {
      color: var(--warning)
    }

    .jam-aktual-val.cepat {
      color: #f97316
    }

    .jam-aktual-val.alpa {
      color: var(--muted)
    }

    .jam-aktual-divider {
      width: 1px;
      height: 32px;
      background: rgba(255, 255, 255, .08);
      flex-shrink: 0
    }

    .jam-aktual-status {
      font-size: 9px;
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 700;
      margin-left: auto
    }

    .jam-aktual-status.hadir {
      background: rgba(34, 197, 94, .15);
      color: var(--success)
    }

    .jam-aktual-status.alpa {
      background: rgba(239, 68, 68, .12);
      color: var(--danger)
    }

    .jam-aktual-status.izin {
      background: rgba(139, 92, 246, .15);
      color: #a78bfa
    }

    .jam-aktual-status.tugas {
      background: rgba(201, 168, 76, .15);
      color: var(--gold)
    }

    .jam-kerja-bar {
      height: 4px;
      border-radius: 3px;
      background: rgba(255, 255, 255, .08);
      margin-top: 5px;
      overflow: hidden
    }

    .jam-kerja-fill {
      height: 100%;
      border-radius: 3px;
      background: linear-gradient(90deg, var(--success), var(--gold));
      transition: width .4s
    }

    .tg-badge {
      background: rgba(96, 165, 250, .12);
      color: var(--info)
    }

    .profil-section-title {
      font-size: 11px;
      font-weight: 800;
      color: var(--white);
      margin-bottom: 8px;
      letter-spacing: .03em
    }

    /* Pengingat kenaikan */
    .reminder-card {
      border-radius: 12px;
      padding: 11px 13px;
      margin-bottom: 8px;
      display: flex;
      align-items: flex-start;
      gap: 10px
    }

    .reminder-warn {
      background: rgba(245, 158, 11, .1);
      border: 1px solid rgba(245, 158, 11, .3)
    }

    .reminder-info {
      background: rgba(96, 165, 250, .08);
      border: 1px solid rgba(96, 165, 250, .25)
    }

    .reminder-ok {
      background: rgba(34, 197, 94, .07);
      border: 1px solid rgba(34, 197, 94, .2)
    }

    .reminder-icon {
      font-size: 18px;
      flex-shrink: 0;
      margin-top: 1px
    }

    .reminder-body {
      flex: 1;
      min-width: 0
    }

    .reminder-title {
      font-size: 11px;
      font-weight: 800
    }

    .reminder-sub {
      font-size: 10px;
      color: var(--muted);
      margin-top: 2px
    }

    /* Dokumen */
    .dokumen-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 4px
    }

    .dokumen-item {
      background: rgba(255, 255, 255, .04);
      border: 1px solid var(--border);
      border-radius: 11px;
      padding: 10px 12px;
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      transition: background .15s
    }

    .dokumen-item:active {
      background: rgba(255, 255, 255, .08)
    }

    .dokumen-icon {
      font-size: 20px;
      flex-shrink: 0
    }

    .dokumen-info {
      flex: 1;
      min-width: 0
    }

    .dokumen-nama {
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    .dokumen-meta {
      font-size: 9px;
      color: var(--muted);
      margin-top: 1px
    }

    .dokumen-arrow {
      color: var(--muted);
      font-size: 13px;
      flex-shrink: 0
    }

    .dokumen-empty {
      text-align: center;
      padding: 20px;
      color: var(--muted);
      font-size: 11px
    }

    .dokumen-del {
      background: none;
      border: none;
      color: rgba(239, 68, 68, .5);
      font-size: 14px;
      cursor: pointer;
      padding: 4px 6px;
      border-radius: 6px;
      flex-shrink: 0;
      transition: color .15s
    }

    .dokumen-del:active {
      color: #ef4444
    }

    /* Modal tambah dokumen */
    .dok-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .6);
      z-index: 999;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      animation: fadeIn .2s
    }

    .dok-modal {
      background: #0f172a;
      border: 1px solid var(--border);
      border-radius: 20px 20px 0 0;
      padding: 20px 16px 32px;
      width: 100%;
      max-width: 480px;
      animation: slideUp .25s ease
    }

    .dok-modal-title {
      font-size: 13px;
      font-weight: 800;
      color: var(--white);
      margin-bottom: 14px;
      display: flex;
      justify-content: space-between;
      align-items: center
    }

    .dok-modal-close {
      background: none;
      border: none;
      color: var(--muted);
      font-size: 18px;
      cursor: pointer;
      padding: 2px 6px
    }

    .dok-field {
      margin-bottom: 10px
    }

    .dok-field label {
      display: block;
      font-size: 9px;
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .08em;
      margin-bottom: 4px
    }

    .dok-input {
      width: 100%;
      background: rgba(255, 255, 255, .06);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 9px 11px;
      color: var(--white);
      font-size: 12px;
      font-family: inherit;
      box-sizing: border-box;
      outline: none
    }

    .dok-input:focus {
      border-color: var(--gold)
    }

    .dok-select {
      appearance: none;
      -webkit-appearance: none
    }

    .dok-file-label {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(255, 255, 255, .04);
      border: 1px dashed rgba(255, 255, 255, .2);
      border-radius: 10px;
      padding: 10px 12px;
      cursor: pointer;
      font-size: 11px;
      color: var(--muted);
      transition: border-color .15s
    }

    .dok-file-label:active {
      border-color: var(--gold)
    }

    .dok-file-name {
      font-size: 10px;
      color: #a0e080;
      margin-top: 4px
    }

    .dok-tabs {
      display: flex;
      gap: 6px;
      margin-bottom: 12px
    }

    .dok-tab {
      flex: 1;
      padding: 7px;
      border-radius: 9px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, .04);
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      transition: all .15s
    }

    .dok-tab.active {
      background: var(--gold-dim);
      border-color: rgba(201, 168, 76, .4);
      color: var(--gold)
    }

    .dok-upload-progress {
      height: 4px;
      background: rgba(255, 255, 255, .1);
      border-radius: 2px;
      margin-top: 8px;
      overflow: hidden;
      display: none
    }

    .dok-upload-fill {
      height: 100%;
      background: var(--gold);
      border-radius: 2px;
      transition: width .3s
    }


    .pegawai-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 15px;
      margin-bottom: 12px;
      transition: all .25s ease;
      position: relative;
      box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
      backdrop-filter: blur(10px);
      animation: slideUp .3s ease;
    }

    .pegawai-card:hover {
      box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
      transform: translateY(-2px);
      border-color: rgba(201, 168, 76, .3);
    }

    .pegawai-top {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 8px
    }

    .pegawai-avatar {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      background: linear-gradient(135deg, var(--gold), #9b6e1a);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: 800;
      color: var(--navy);
      flex-shrink: 0
    }

    .pegawai-name {
      font-size: 12px;
      font-weight: 700
    }

    .pegawai-jabatan {
      font-size: 10px;
      color: var(--muted)
    }

    .pegawai-bar {
      display: flex;
      gap: 4px;
      flex-wrap: wrap
    }

    .pbar-item {
      padding: 2px 7px;
      border-radius: 6px;
      font-size: 9px;
      font-weight: 700
    }

    .pb-masuk {
      background: rgba(34, 197, 94, .15);
      color: var(--success)
    }

    .pb-pulang {
      background: rgba(96, 165, 250, .15);
      color: var(--info)
    }

    .pb-luar {
      background: rgba(245, 158, 11, .1);
      color: var(--warning)
    }

    .pb-luar-masuk {
      background: rgba(251, 146, 60, .2);
      color: #fb923c
    }

    .pb-luar-pulang {
      background: rgba(251, 191, 36, .2);
      color: #f59e0b
    }

    .pb-izin {
      background: rgba(245, 158, 11, .15);
      color: var(--warning)
    }

    .pb-sakit {
      background: rgba(239, 68, 68, .15);
      color: var(--danger)
    }

    .pb-tugas {
      background: rgba(167, 139, 250, .15);
      color: #a78bfa
    }

    .pb-tubel {
      background: rgba(99, 102, 241, .15);
      color: #818cf8
    }

    .pb-cuti {
      background: rgba(20, 184, 166, .15);
      color: #2dd4bf
    }

    /* ── Discipline badges ── */
    .pb-disiplin-4 {
      background: rgba(34, 197, 94, .18);
      color: var(--success);
      border: 1px solid rgba(34, 197, 94, .35)
    }

    .pb-disiplin-3 {
      background: rgba(96, 165, 250, .18);
      color: var(--info);
      border: 1px solid rgba(96, 165, 250, .35)
    }

    .pb-disiplin-2 {
      background: rgba(245, 158, 11, .18);
      color: var(--warning);
      border: 1px solid rgba(245, 158, 11, .35)
    }

    .pb-disiplin-1 {
      background: rgba(239, 68, 68, .18);
      color: var(--danger);
      border: 1px solid rgba(239, 68, 68, .35)
    }

    /* ── REDESIGN REKAP CARD ── */
    .rekap-card-v2 {
      background: linear-gradient(145deg, var(--card-bg), rgba(255, 255, 255, 0.02));
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 20px;
      margin-bottom: 20px;
      position: relative;
      transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
      animation: slideUp .4s ease;
    }

    .rekap-card-v2:hover {
      transform: translateY(-4px);
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
      border-color: rgba(124, 58, 237, 0.3);
    }

    .rekap-hero-section {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 15px;
    }

    .hero-metric-box {
      background: rgba(255, 255, 255, .03);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    .hero-val {
      font-size: 18px;
      font-weight: 800;
      line-height: 1.1;
      margin-bottom: 4px;
    }

    .hero-lbl {
      font-size: 9px;
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .05em;
    }

    .rekap-stats-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 6px;
      margin-bottom: 12px;
    }

    .stat-box-small {
      background: rgba(255, 255, 255, .02);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 6px 4px;
      text-align: center;
      transition: all .2s;
    }

    .stat-box-small:hover {
      background: rgba(255, 255, 255, .05);
      border-color: rgba(255, 255, 255, .1);
    }

    .stat-box-val {
      font-size: 12px;
      font-weight: 800;
      display: block;
    }

    .stat-box-lbl {
      font-size: 8px;
      font-weight: 600;
      color: var(--muted);
      display: block;
      margin-top: 1px;
    }

    .rekap-akk-highlight {
      background: linear-gradient(135deg, rgba(245, 158, 11, .15) 0%, rgba(245, 158, 11, .05) 100%);
      border: 1px solid rgba(245, 158, 11, .3);
      border-radius: 12px;
      padding: 12px;
      text-align: center;
      margin-bottom: 12px;
    }

    .akk-h-time {
      font-size: 20px;
      font-weight: 900;
      color: var(--warning);
      display: block;
      letter-spacing: -0.01em;
    }

    .akk-h-lbl {
      font-size: 10px;
      font-weight: 800;
      color: var(--warning);
      text-transform: uppercase;
      margin-top: 2px;
    }

    .rekap-footer-all {
      border-top: 1px dashed var(--border);
      padding-top: 12px;
      margin-top: 5px;
    }

    .all-time-title {
      font-size: 9px;
      font-weight: 800;
      color: var(--muted);
      margin-bottom: 8px;
      display: block;
      text-transform: uppercase;
      letter-spacing: .05em;
    }

    .all-time-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }

    .badge-all {
      font-size: 8px;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: 4px;
      background: rgba(255, 255, 255, .05);
      color: var(--muted);
      border: 1px solid rgba(255, 255, 255, .1);
    }

    @media (max-width: 480px) {
      .rekap-stats-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    /* ── Total akumulasi badge ── */
    .pb-total-akk {
      background: rgba(255, 255, 255, .07);
      color: var(--white);
      border: 1px solid rgba(255, 255, 255, .14);
      font-family: 'JetBrains Mono', monospace
    }

    /* ── Header kanan: disiplin badge ── */
    .pegawai-disiplin-wrap {
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 3px
    }

    .disiplin-pct-txt {
      font-family: 'JetBrains Mono', monospace;
      font-size: 13px;
      font-weight: 700;
      line-height: 1
    }

    .disiplin-sub {
      font-size: 8px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .05em;
      margin-top: 1px
    }

    /* ── Discipline progress bar ── */
    .disiplin-bar-wrap {
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid rgba(255, 255, 255, .06)
    }

    .disiplin-bar-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 4px
    }

    .disiplin-bar-label {
      font-size: 9px;
      color: var(--muted);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .06em
    }

    .disiplin-bar-bg {
      height: 5px;
      background: rgba(255, 255, 255, .08);
      border-radius: 3px;
      overflow: hidden
    }

    .disiplin-bar-fill {
      height: 100%;
      border-radius: 3px;
      transition: width .6s ease
    }

    /* ── All-time accumulation row ── */
    .akk-all-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 4px;
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid rgba(255, 255, 255, .06)
    }

    .akk-all-label {
      font-size: 9px;
      color: var(--muted);
      font-weight: 600;
      width: 100%;
      margin-bottom: 2px;
      text-transform: uppercase;
      letter-spacing: .06em
    }

    .akk-badge {
      padding: 2px 8px;
      border-radius: 6px;
      font-size: 9px;
      font-weight: 700;
      font-family: 'JetBrains Mono', monospace
    }

    .akk-lambat {
      background: rgba(251, 146, 60, .15);
      color: #fb923c
    }

    .akk-cepat {
      background: rgba(96, 165, 250, .15);
      color: var(--info)
    }

    .akk-total {
      background: rgba(167, 139, 250, .15);
      color: #a78bfa
    }

    /* ADMIN */
    .admin-header-card {
      background: linear-gradient(135deg, rgba(124, 58, 237, .2), rgba(167, 139, 250, .1));
      border: 1px solid rgba(167, 139, 250, .3);
      border-radius: 14px;
      padding: 13px;
      margin-bottom: 12px;
      position: relative;
      overflow: hidden
    }

    .admin-header-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--admin), transparent)
    }

    .admin-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: var(--admin-dim);
      border: 1px solid rgba(167, 139, 250, .3);
      border-radius: 20px;
      padding: 2px 9px;
      font-size: 10px;
      font-weight: 700;
      color: var(--admin);
      margin-bottom: 8px
    }

    .admin-title {
      font-size: 14px;
      font-weight: 800;
      color: var(--admin);
      margin-bottom: 2px
    }

    .admin-sub {
      font-size: 10px;
      color: var(--muted)
    }

    .map-container {
      border-radius: 12px;
      overflow: hidden;
      margin-bottom: 10px;
      border: 1px solid var(--border);
      position: relative
    }

    #adminMap {
      height: 240px;
      width: 100%;
      background: #112240
    }

    .map-hint {
      position: absolute;
      top: 8px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(10, 22, 40, .9);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 4px 12px;
      font-size: 10px;
      font-weight: 600;
      color: var(--gold);
      z-index: 1000;
      pointer-events: none;
      white-space: nowrap
    }

    .map-coords {
      background: rgba(10, 22, 40, .9);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 8px 11px;
      margin-bottom: 10px;
      display: none;
      gap: 12px
    }

    .map-coords.show {
      display: flex
    }

    .map-coord-item {
      flex: 1
    }

    .map-coord-label {
      font-size: 9px;
      color: var(--muted);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .07em
    }

    .map-coord-val {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      font-weight: 600;
      color: var(--gold)
    }

    .lokasi-mgmt-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: 8px
    }

    .lokasi-mgmt-item {
      background: rgba(255, 255, 255, .04);
      border: 1px solid var(--border);
      border-radius: 11px;
      padding: 9px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px
    }

    .lokasi-mgmt-name {
      font-size: 12px;
      font-weight: 700
    }

    .lokasi-mgmt-coord {
      font-family: 'JetBrains Mono', monospace;
      font-size: 9px;
      color: var(--muted)
    }

    .btn-del {
      background: rgba(239, 68, 68, .15);
      border: 1px solid rgba(239, 68, 68, .3);
      border-radius: 7px;
      padding: 4px 8px;
      color: var(--danger);
      font-family: inherit;
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      flex-shrink: 0
    }

    /* Pulang Luar */
    .btn-pulang-luar {
      width: 100%;
      padding: 14px;
      border: none;
      border-radius: 13px;
      background: linear-gradient(135deg, #f59e0b, #b45309);
      color: #fff;
      font-family: inherit;
      font-size: 14px;
      font-weight: 800;
      cursor: pointer;
      transition: transform .15s, box-shadow .15s;
      box-shadow: 0 4px 18px rgba(245, 158, 11, .3);
      margin-bottom: 8px;
      display: none
    }

    .btn-pulang-luar.show {
      display: block
    }

    .btn-pulang-luar:active {
      transform: scale(.97)
    }

    .btn-pulang-luar:disabled {
      opacity: .5;
      cursor: not-allowed;
      transform: none
    }

    .pulang-luar-form {
      background: rgba(245, 158, 11, .07);
      border: 1px solid rgba(245, 158, 11, .25);
      border-radius: 13px;
      padding: 12px 14px;
      margin-bottom: 10px;
      display: none
    }

    .pulang-luar-form.show {
      display: block
    }

    .pulang-luar-form .form-label {
      color: var(--warning)
    }

    .pulang-luar-note {
      font-size: 10px;
      color: var(--warning);
      background: rgba(245, 158, 11, .1);
      border: 1px solid rgba(245, 158, 11, .2);
      border-radius: 8px;
      padding: 6px 10px;
      margin-bottom: 10px;
      font-weight: 600;
      text-align: center
    }

    /* Checkbox hari */
    .hari-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 4px
    }

    .hari-check-label {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 5px 10px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      transition: all .15s;
      user-select: none
    }

    .hari-check-label input {
      display: none
    }

    .hari-check-label.checked {
      border-color: var(--admin);
      background: var(--admin-dim);
      color: var(--admin)
    }

    /* Jadwal Lokasi — per-location card design */
    .jadwal-lok-card {
      background: rgba(255, 255, 255, .04);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      gap: 9px
    }

    .jadwal-lok-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px
    }

    .jadwal-lok-card-name {
      font-size: 13px;
      font-weight: 700;
      color: var(--white);
      display: flex;
      align-items: center;
      gap: 6px
    }

    .jadwal-lok-card-name span.lok-icon {
      font-size: 15px
    }

    .jadwal-lok-badge {
      font-size: 9px;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 20px;
      background: var(--gold-dim);
      color: var(--gold);
      border: 1px solid rgba(201, 168, 76, .3)
    }

    .jadwal-hari-toggles {
      display: flex;
      flex-wrap: wrap;
      gap: 5px
    }

    .jadwal-hari-btn {
      padding: 4px 10px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, .04);
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      transition: all .15s;
      font-family: inherit;
      letter-spacing: .02em
    }

    .jadwal-hari-btn.aktif {
      background: var(--admin-dim);
      border-color: rgba(167, 139, 250, .5);
      color: var(--admin)
    }

    .jadwal-hari-btn:hover {
      border-color: var(--admin);
      color: var(--admin)
    }

    .jadwal-lok-meta {
      font-size: 9px;
      color: var(--muted);
      font-family: 'JetBrains Mono', monospace
    }

    .radius-note {
      font-size: 10px;
      color: var(--gold);
      background: var(--gold-dim);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 6px 10px;
      margin-bottom: 10px;
      text-align: center;
      font-weight: 600
    }

    .jadwal-empty {
      font-size: 10px;
      color: var(--muted);
      font-style: italic
    }

    /* Empty state */
    .empty-state {
      text-align: center;
      padding: 24px 16px;
      color: var(--muted)
    }

    .empty-icon {
      font-size: 30px;
      margin-bottom: 7px
    }

    .empty-text {
      font-size: 13px;
      font-weight: 600;
      color: var(--white);
      margin-bottom: 3px
    }

    .empty-sub {
      font-size: 11px
    }

    .footer {
      text-align: center;
      font-size: 9px;
      color: var(--muted);
      padding: 6px 0 3px
    }

    .leaflet-container {
      background: #112240 !important
    }

    /* ══ DESKTOP MODE ══ */
    body.desktop-mode .app {
      max-width: 1200px
    }

    body.desktop-mode .tabs .tab {
      min-width: auto;
      padding: 10px 22px;
      font-size: 12px;
      letter-spacing: .02em
    }

    body.desktop-mode .panel {
      padding: 20px 32px 48px
    }

    body.desktop-mode .cam-video-wrap {
      max-width: 480px
    }

    body.desktop-mode .btn-capture,
    .desktop-mode .cam-status,
    .desktop-mode .liveness-card,
    .desktop-mode .face-reg-card,
    .desktop-mode .cam-preview {
      max-width: 480px
    }

    .desktop-mode-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: rgba(96, 165, 250, .15);
      border: 1px solid rgba(96, 165, 250, .3);
      border-radius: 20px;
      padding: 2px 8px;
      font-size: 9px;
      font-weight: 700;
      color: #60a5fa
    }

    /* ── Desktop: 2-column hanya panel ACTIVE ── */
    @media (min-width:800px) {
      body.desktop-mode #panel-admin.active .admin-desktop-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        align-items: start;
      }

      body.desktop-mode .panel.active .card {
        border-radius: 16px;
      }

      /* Absen grid pakai wrapper class absen-desktop-grid agar panel lain tidak terdampak */
      body.desktop-mode #panel-absen.active .absen-desktop-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        align-items: start;
      }

      body.desktop-mode #panel-absen.active .absen-desktop-grid>* {
        margin-bottom: 0;
      }
    }

    /* ══ SUPERADMIN GUARD ══ */
    .superadmin-section {
      display: none
    }

    /* ══ MEJA ABSEN CARD ══ */
    .meja-absen-card {
      background: linear-gradient(135deg, rgba(13, 27, 42, .95), rgba(10, 22, 40, .98));
      border: 1px solid rgba(201, 168, 76, .35);
      border-radius: 16px;
      padding: 18px 16px;
      margin-top: 10px;
      position: relative;
      overflow: hidden
    }

    .meja-absen-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--gold), #f59e0b, var(--gold));
      animation: shimmerBar 2.5s ease-in-out infinite
    }

    @keyframes shimmerBar {

      0%,
      100% {
        opacity: .6
      }

      50% {
        opacity: 1
      }
    }

    .meja-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: linear-gradient(135deg, rgba(201, 168, 76, .2), rgba(245, 158, 11, .15));
      border: 1px solid rgba(201, 168, 76, .4);
      border-radius: 20px;
      padding: 3px 10px;
      font-size: 9px;
      font-weight: 800;
      color: var(--gold);
      letter-spacing: .06em;
      text-transform: uppercase;
      margin-bottom: 10px
    }

    .meja-title {
      font-size: 15px;
      font-weight: 800;
      color: var(--white);
      margin-bottom: 3px;
      display: flex;
      align-items: center;
      gap: 7px
    }

    .meja-sub {
      font-size: 10px;
      color: var(--muted);
      margin-bottom: 14px;
      line-height: 1.5
    }

    .meja-status-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(255, 255, 255, .04);
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: 10px;
      padding: 8px 12px;
      margin-bottom: 12px;
      min-height: 38px
    }

    .meja-status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #6b7280;
      flex-shrink: 0;
      transition: background .3s
    }

    .meja-status-dot.active {
      background: var(--success);
      box-shadow: 0 0 6px rgba(34, 197, 94, .6);
      animation: pulseDot 1.2s ease-in-out infinite
    }

    .meja-status-dot.processing {
      background: #f59e0b;
      box-shadow: 0 0 6px rgba(245, 158, 11, .6);
      animation: pulseDot 0.8s ease-in-out infinite
    }

    @keyframes pulseDot {

      0%,
      100% {
        transform: scale(1);
        opacity: 1
      }

      50% {
        transform: scale(1.4);
        opacity: .7
      }
    }

    .meja-status-text {
      font-size: 10px;
      font-weight: 700;
      color: var(--white);
      flex: 1
    }

    .meja-status-sub {
      font-size: 8.5px;
      color: var(--muted)
    }

    .meja-loc-bar {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 9px;
      color: var(--muted);
      background: rgba(255, 255, 255, .03);
      border: 1px solid rgba(255, 255, 255, .06);
      border-radius: 8px;
      padding: 6px 10px;
      margin-bottom: 12px;
      min-height: 30px
    }

    .meja-loc-bar span.loc-val {
      flex: 1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: rgba(255, 255, 255, .7);
      font-family: 'JetBrains Mono', monospace;
      font-size: 8px
    }

    .btn-meja-start {
      width: 100%;
      padding: 13px;
      border-radius: 12px;
      background: linear-gradient(135deg, var(--gold), #b8860b);
      border: none;
      color: var(--navy);
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
      font-family: inherit;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all .2s;
      box-shadow: 0 4px 16px rgba(201, 168, 76, .25)
    }

    .btn-meja-start:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 20px rgba(201, 168, 76, .35)
    }

    .btn-meja-start:active {
      transform: translateY(0)
    }

    .btn-meja-start:disabled {
      opacity: .5;
      cursor: not-allowed;
      transform: none
    }

    .btn-meja-stop {
      width: 100%;
      padding: 11px;
      border-radius: 12px;
      background: rgba(239, 68, 68, .12);
      border: 1px solid rgba(239, 68, 68, .3);
      color: #ef4444;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: all .2s;
      margin-top: 8px
    }

    .btn-meja-stop:hover {
      background: rgba(239, 68, 68, .2)
    }

    .meja-result-card {
      display: none;
      border-radius: 10px;
      padding: 10px 12px;
      margin-top: 8px;
      font-size: 10px;
      font-weight: 700;
      border-left: 3px solid
    }

    .meja-result-card.success {
      background: rgba(34, 197, 94, .08);
      border-color: var(--success);
      color: var(--success)
    }

    .meja-result-card.fail {
      background: rgba(239, 68, 68, .08);
      border-color: var(--danger);
      color: var(--danger)
    }

    /* ══ CAMERA KASIRJEGRUP STYLE ENHANCEMENT ══ */
    .cam-corner {
      position: absolute;
      width: 26px;
      height: 26px;
      border-color: var(--gold);
      border-style: solid;
      pointer-events: none;
      transition: border-color .3s
    }

    .cam-corner.tl {
      top: 10px;
      left: 10px;
      border-width: 3px 0 0 3px;
      border-radius: 4px 0 0 0
    }

    .cam-corner.tr {
      top: 10px;
      right: 10px;
      border-width: 3px 3px 0 0;
      border-radius: 0 4px 0 0
    }

    .cam-corner.bl {
      bottom: 10px;
      left: 10px;
      border-width: 0 0 3px 3px;
      border-radius: 0 0 0 4px
    }

    .cam-corner.br {
      bottom: 10px;
      right: 10px;
      border-width: 0 3px 3px 0;
      border-radius: 0 0 4px 0
    }

    .cam-video-wrap.face-ok .cam-corner {
      border-color: var(--success)
    }

    .cam-video-wrap.face-bad .cam-corner {
      border-color: var(--danger)
    }

    .cam-scan-line {
      position: absolute;
      left: 12px;
      right: 12px;
      height: 2px;
      background: linear-gradient(90deg, transparent, rgba(201, 168, 76, .9), transparent);
      top: 20%;
      pointer-events: none;
      opacity: 0;
      transition: opacity .3s
    }

    .cam-video-wrap.face-ok .cam-scan-line {
      opacity: 1;
      animation: scanLine 2.5s ease-in-out infinite
    }

    @keyframes scanLine {
      0% {
        top: 15%
      }

      50% {
        top: 78%
      }

      100% {
        top: 15%
      }
    }

    .cam-face-badge {
      position: absolute;
      bottom: 8px;
      left: 10px;
      background: rgba(0, 0, 0, .65);
      border-radius: 8px;
      padding: 2px 9px;
      font-size: 9px;
      color: #fff;
      font-weight: 700;
      pointer-events: none;
      backdrop-filter: blur(4px)
    }

    /* ══ SIGNATURE PAD ══ */
    .sig-overlay {
      position: fixed;
      inset: 0;
      z-index: 10002;
      background: rgba(5, 12, 30, .98);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start
    }

    .sig-overlay.hidden {
      display: none
    }

    .sig-header {
      width: 100%;
      padding: 14px 16px 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0
    }

    .sig-title {
      font-size: 13px;
      font-weight: 800;
      color: var(--white)
    }

    .sig-close {
      width: 30px;
      height: 30px;
      border-radius: 8px;
      background: rgba(239, 68, 68, .15);
      border: 1px solid rgba(239, 68, 68, .3);
      color: var(--danger);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center
    }

    .sig-body {
      flex: 1;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 14px;
      gap: 10px;
      overflow-y: auto
    }

    /* Mode tabs */
    .sig-mode-tabs {
      display: flex;
      gap: 6px;
      width: 100%;
      max-width: 360px;
      flex-shrink: 0
    }

    .sig-mode-tab {
      flex: 1;
      padding: 8px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, .04);
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      transition: all .15s;
      font-family: inherit;
      text-align: center
    }

    .sig-mode-tab.active {
      background: var(--gold-dim);
      border-color: rgba(201, 168, 76, .4);
      color: var(--gold)
    }

    /* Draw pad */
    .sig-canvas-wrap {
      width: 100%;
      max-width: 360px;
      position: relative;
      border-radius: 14px;
      overflow: hidden;
      border: 2px solid rgba(201, 168, 76, .5);
      touch-action: none;
      cursor: crosshair;
      flex-shrink: 0;
      background: #fff
    }

    #sigCanvas {
      display: block;
      width: 100%;
      height: 200px
    }

    .sig-empty-hint {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      color: rgba(0, 0, 0, .25);
      pointer-events: none;
      font-weight: 600;
      letter-spacing: .04em;
      user-select: none
    }

    /* Upload photo */
    .sig-upload-wrap {
      width: 100%;
      max-width: 360px;
      flex-shrink: 0
    }

    .sig-upload-zone {
      border: 2px dashed rgba(201, 168, 76, .4);
      border-radius: 14px;
      padding: 24px 16px;
      text-align: center;
      cursor: pointer;
      color: var(--muted);
      font-size: 11px;
      transition: all .2s;
      background: rgba(201, 168, 76, .04)
    }

    .sig-upload-zone:active {
      border-color: var(--gold);
      background: var(--gold-dim)
    }

    .sig-upload-zone-icon {
      font-size: 32px;
      margin-bottom: 8px
    }

    .sig-upload-zone-text {
      font-size: 11px;
      font-weight: 700;
      color: var(--white);
      margin-bottom: 4px
    }

    .sig-upload-zone-sub {
      font-size: 9px;
      color: var(--muted)
    }

    .sig-upload-preview {
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid var(--border);
      background: #fff;
      max-width: 360px;
      width: 100%
    }

    .sig-upload-preview img {
      width: 100%;
      display: block;
      max-height: 180px;
      object-fit: contain;
      background: #fff
    }

    .sig-upload-change {
      width: 100%;
      padding: 8px;
      border-radius: 9px;
      background: rgba(255, 255, 255, .06);
      border: 1px solid var(--border);
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      margin-top: 6px;
      font-family: inherit
    }

    /* Actions */
    .sig-actions {
      display: flex;
      gap: 8px;
      width: 100%;
      max-width: 360px;
      flex-shrink: 0
    }

    .sig-btn-clear {
      flex: 1;
      padding: 11px;
      border-radius: 10px;
      background: rgba(239, 68, 68, .1);
      border: 1px solid rgba(239, 68, 68, .3);
      color: var(--danger);
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit
    }

    .sig-btn-save {
      flex: 2;
      padding: 11px;
      border-radius: 10px;
      background: linear-gradient(135deg, var(--gold), #9b6e1a);
      border: none;
      color: var(--navy);
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
      font-family: inherit;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px
    }

    .sig-btn-save:disabled {
      opacity: .5;
      cursor: not-allowed
    }

    .sig-msg {
      width: 100%;
      max-width: 360px;
      padding: 8px 12px;
      border-radius: 10px;
      font-size: 10px;
      font-weight: 700;
      text-align: center;
      flex-shrink: 0
    }

    /* Profil card */
    .profil-sig-card {
      background: var(--card-bg);
      border: 1px solid rgba(201, 168, 76, .25);
      border-radius: 14px;
      padding: 12px 14px;
      margin-bottom: 12px;
      backdrop-filter: blur(12px)
    }

    .profil-sig-row {
      display: flex;
      align-items: center;
      gap: 10px
    }

    .profil-sig-thumb {
      width: 96px;
      height: 54px;
      border-radius: 10px;
      background: rgba(255, 255, 255, .06);
      border: 2px solid rgba(201, 168, 76, .3);
      flex-shrink: 0;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      color: var(--muted)
    }

    .profil-sig-thumb img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: #fff
    }

    /* ══ ADMIN FACE REG ══ */
    .face-adm-item {
      background: rgba(255, 255, 255, .04);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 12px;
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 6px
    }

    .face-adm-thumb {
      width: 40px;
      height: 40px;
      border-radius: 9px;
      background: rgba(255, 255, 255, .07);
      border: 1px solid rgba(167, 139, 250, .25);
      flex-shrink: 0;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      color: var(--muted)
    }

    .face-adm-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover
    }

    .face-adm-info {
      flex: 1;
      min-width: 0
    }

    .face-adm-name {
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    .face-adm-status {
      font-size: 9px;
      color: var(--muted);
      margin-top: 1px
    }

    .face-adm-btn {
      background: rgba(167, 139, 250, .12);
      border: 1px solid rgba(167, 139, 250, .3);
      color: var(--admin);
      border-radius: 8px;
      padding: 5px 11px;
      font-size: 9px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      font-family: inherit
    }

/* ════ ADDITIONAL STYLES ════ */
    #appSplash {
      position: fixed;
      inset: 0;
      z-index: 99999;
      background: #050c1e;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      transition: opacity .4s
    }

    #appSplash.hide {
      opacity: 0;
      pointer-events: none
    }

    .splash-logo {
      font-size: 36px
    }

    .splash-title {
      font-size: 14px;
      font-weight: 700;
      color: #c9a84c;
      letter-spacing: .05em
    }

    .splash-sub {
      font-size: 10px;
      color: rgba(255, 255, 255, .4)
    }

    .splash-bar {
      width: 140px;
      height: 3px;
      background: rgba(255, 255, 255, .1);
      border-radius: 2px;
      overflow: hidden
    }

    .splash-progress {
      height: 100%;
      width: 0;
      background: #c9a84c;
      border-radius: 2px;
      animation: splashLoad 1.2s ease forwards
    }

    @keyframes splashLoad {
      0% {
        width: 0
      }

      60% {
        width: 70%
      }

      90% {
        width: 90%
      }

      100% {
        width: 100%
      }
    }

    /* ════ RESPONSIVE DESKTOP UI (RESTORED) ════ */
    @media (min-width: 768px) {
      body {
        display: flex;
        background: #0a1628;
        margin: 0;
        padding: 0;
        min-height: 100vh;
      }

      .app {
        max-width: 100% !important;
        width: 100vw;
        margin: 0;
        display: flex;
        flex-direction: row;
        background: #0a1628;
      }

      .header {
        display: none !important;
      }

      .bottom-nav {
        position: sticky;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px; /* Refined width */
        flex-shrink: 0;
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 12px;
        background: #0d1b2a;
        border-top: none;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        transform: none;
        gap: 4px;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
        border-radius: 0;
        align-items: stretch;
      }

      .bottom-nav::before {
        content: var(--agency-name, 'ABSENSI');
        display: block;
        font-size: 18px;
        font-weight: 900;
        color: var(--gold);
        letter-spacing: 5px;
        margin-bottom: 40px;
        text-align: center;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      }

      .nav-item {
        flex: 0 0 auto !important;
        flex-direction: row !important;
        width: 100% !important;
        padding: 16px 24px !important;
        border-radius: 12px !important;
        gap: 20px !important;
        justify-content: flex-start !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border: 1px solid transparent !important;
        margin: 2px 0 !important;
        background: transparent !important;
        height: auto !important;
        transform: none !important;
      }

      .nav-item i {
        border: 1px solid rgba(201,168,76,0.2) !important;
        color: var(--gold) !important;
        box-shadow: none !important;
      }
      
      .nav-item.active i {
        transform: scale(1.1) !important;
        color: var(--gold) !important;
      }

      .nav-item.active::after {
        content: '';
        position: absolute;
        left: 0;
        top: 20%;
        height: 60%;
        width: 4px;
        background: var(--gold);
        border-radius: 0 4px 4px 0;
        box-shadow: 2px 0 10px var(--gold);
      }

      /* Reset all nav-main specific mobile styles for desktop */
      .nav-item.nav-main {
        margin-bottom: 0 !important;
        box-shadow: none !important;
        border: 1px solid transparent !important;
        height: auto !important;
        width: 100% !important;
        border-radius: 12px !important;
        background: transparent !important;
        flex: 0 0 auto !important;
        padding: 12px 16px !important; /* Matches regular compact nav-item */
        margin: 4px 0 !important;
      }
      
      .nav-item.nav-main,
      .nav-item.nav-main span {
        color: rgba(255, 255, 255, 0.6) !important; /* Matches regular compact nav-item */
      }
      
      .nav-item.nav-main i {
        font-size: 18px !important;
        width: 24px !important;
        text-align: center !important;
        transition: all 0.3s ease !important;
        margin: 0 !important;
        opacity: 1;
        border: 1px solid rgba(201,168,76,0.2) !important;
        color: var(--gold) !important;
        box-shadow: none !important;
      }
      
      .nav-item.nav-main span {
        font-size: 14px !important;
        font-weight: 600 !important;
        display: block !important;
      }
      
      .nav-item.nav-main:hover,
      .nav-item.nav-main:hover i,
      .nav-item.nav-main:hover span {
        color: #fff !important;
      }
      
      .nav-item.nav-main:hover {
        background: rgba(255, 255, 255, 0.05) !important;
      }
      
      .nav-item.nav-main:hover i {
        opacity: 1;
      }

      .nav-item.nav-main.active {
        background: rgba(201, 168, 76, 0.1) !important; /* Matches active nav-item */
        border: 1px solid rgba(201, 168, 76, 0.2) !important;
      }
      
      .nav-item.nav-main.active,
      .nav-item.nav-main.active i,
      .nav-item.nav-main.active span {
        color: var(--gold) !important;
      }
      
      .nav-item.nav-main.active i {
        opacity: 1;
        transform: scale(1.1) !important;
      }
      
      .nav-item.nav-main::before {
        display: none !important;
      }
      
      .nav-item.nav-main::after {
        display: none;
      }
      
      .nav-item.nav-main.active::after {
        content: '';
        position: absolute;
        left: 0;
        top: 25%;
        height: 50%;
        width: 3px;
        background: var(--gold);
        border-radius: 0 4px 4px 0;
        box-shadow: 2px 0 10px var(--gold);
        display: block !important;
      }
      
      /* Removed redundant nav-main active indicators to fix 'stuck' animation */

      .panel {
        flex: 1;
        width: 100%;
        padding: 40px 60px;
        overflow-y: auto;
        background: #0a1628;
        padding-bottom: 40px !important;
      }


      .absen-desktop-grid {
        display: flex;
        flex-direction: column;
        gap: 30px;
        align-items: stretch;
        width: 100%;
      }

      .absen-actions-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
      }

      .wifi-bar, #btnAbsen, #btnGoToKet {
        width: 100% !important;
      }


      .pegawai-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
        gap: 25px;
      }

      /* Inline Admin Forms (Replaced Modals) */
      #pegawaiForm, #ketModal, .admin-modal-custom {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        overflow: visible !important;
        z-index: 10 !important;
        background: rgba(201, 168, 76, 0.05) !important;
        box-shadow: none !important;
        border: 1px solid rgba(201, 168, 76, 0.2) !important;
        padding: 25px !important;
        border-radius: 16px !important;
        margin-bottom: 30px !important;
      }

      /* Add Backdrop for Admin Modals */
      .modal-open-blur {
        filter: blur(4px);
        pointer-events: none;
      }
      /* Hide More Menu on Desktop - all items are in sidebar */
      .more-menu-overlay {
        display: none !important;
      }
      
      .nav-item {
        flex: 0 0 auto !important;
        flex-direction: row !important;
        width: 100% !important;
        padding: 12px 16px !important; /* Slightly more compact */
        border-radius: 12px !important;
        gap: 16px !important;
        justify-content: flex-start !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border: 1px solid transparent !important;
        margin: 4px 0 !important;
        background: transparent !important;
        height: auto !important;
        transform: none !important;
        color: rgba(255, 255, 255, 0.6) !important;
      }

      .nav-item i {
        font-size: 18px !important;
        width: 24px !important;
        text-align: center !important;
        transition: all 0.3s ease !important;
        margin: 0 !important;
        opacity: 0.7;
      }

      .nav-item span {
        font-size: 14px !important;
        font-weight: 600 !important;
        display: block !important;
      }

      .nav-item:hover {
        background: rgba(255, 255, 255, 0.05) !important;
        color: #fff !important;
      }
      .nav-item:hover i { opacity: 1; }

      .nav-item.active {
        background: rgba(201, 168, 76, 0.1) !important;
        border: 1px solid rgba(201, 168, 76, 0.2) !important;
        color: var(--gold) !important;
      }
      
      .nav-item.active i {
        color: var(--gold) !important;
        opacity: 1;
      }

      .nav-item.active::after {
        content: '';
        position: absolute;
        left: 0;
        top: 25%;
        height: 50%;
        width: 3px;
        background: var(--gold);
        border-radius: 0 4px 4px 0;
        box-shadow: 2px 0 10px var(--gold);
      }

      /* Admin specific styling in sidebar */
      .nav-item.admin-only {
        margin-top: 20px !important;
        border-top: 1px solid rgba(255,255,255,0.05) !important;
        padding-top: 20px !important;
        border-radius: 0 !important;
      }
      .nav-item.admin-only i { color: var(--admin); }

    }


    /* ════ PENUGASAN & LEMBUR CUSTOM STYLES ════ */
    .form-group {
      margin-bottom: 20px;
    }

    .form-label {
      display: block;
      font-size: 11px;
      font-weight: 800;
      color: var(--gold);
      margin-bottom: 8px;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .form-input, .form-textarea {
      width: 100%;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      color: var(--white);
      padding: 12px 15px;
      font-size: 13px;
      outline: none;
      transition: all 0.3s;
    }

    .form-input:focus, .form-textarea:focus {
      border-color: var(--gold);
      background: rgba(255, 255, 255, 0.08);
      box-shadow: 0 0 15px rgba(201, 168, 76, 0.15);
    }

    /* Searchable Dropdown Styling */
    .custom-search-dropdown {
      position: relative;
    }

    .dropdown-trigger {
      display: flex;
      align-items: center;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      padding: 0 15px;
      height: 48px;
      cursor: pointer;
      transition: all 0.3s;
    }

    .dropdown-trigger input {
      flex: 1;
      background: transparent;
      border: none;
      color: var(--white);
      font-size: 13px;
      outline: none;
      padding-left: 10px;
    }

    .dropdown-trigger .search-icon {
      color: var(--muted);
      font-size: 14px;
    }

    .dropdown-trigger .arrow-icon {
      color: var(--muted);
      font-size: 12px;
      transition: transform 0.3s;
    }

    .custom-search-dropdown.open .dropdown-trigger .arrow-icon {
      transform: rotate(180deg);
    }

    .dropdown-list-wrap {
      position: absolute;
      top: calc(100% + 5px);
      left: 0;
      right: 0;
      background: #111827;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      max-height: 250px;
      overflow-y: auto;
      z-index: 100;
      display: none;
      box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    .custom-search-dropdown.open .dropdown-list-wrap {
      display: block;
      animation: slideUp 0.2s ease;
    }

    .dropdown-item {
      padding: 12px 15px;
      cursor: pointer;
      border-bottom: 1px solid rgba(255,255,255,0.03);
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .dropdown-item:hover {
      background: rgba(201, 168, 76, 0.1);
    }

    .dropdown-item .item-name {
      font-size: 13px;
      font-weight: 700;
      color: var(--white);
    }

    .dropdown-item .item-nip {
      font-size: 10px;
      color: var(--muted);
    }

    /* Result Cards */
    .result-card {
      display: flex;
      align-items: center;
      gap: 15px;
      padding: 15px;
      border-radius: 16px;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.05);
    }

    .result-card .r-icon {
      font-size: 24px;
      width: 45px;
      height: 45px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 12px;
      background: rgba(255,255,255,0.05);
    }

    .result-card.success { border-color: rgba(34, 197, 94, 0.3); background: rgba(34, 197, 94, 0.05); }
    .result-card.success .r-icon { color: var(--success); background: rgba(34, 197, 94, 0.1); }
    
    .result-card.fail { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.05); }
    .result-card.fail .r-icon { color: var(--danger); background: rgba(239, 68, 68, 0.1); }

    .result-card .r-title {
      font-size: 14px;
      font-weight: 800;
      color: var(--white);
      margin-bottom: 2px;
    }

    .result-card .r-msg {
      font-size: 11px;
      color: var(--muted);
    }

    /* Pegawai Pill for Multi-select */
    .pegawai-pill {
      background: var(--gold-dim);
      border: 1px solid var(--border);
      color: var(--gold);
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 6px;
      animation: fadeIn .3s ease;
      margin-bottom: 4px;
    }
    
    .pegawai-pill i {
      font-size: 12px;
      cursor: pointer;
      opacity: 0.7;
    }
    
    .pegawai-pill i:hover {
      opacity: 1;
      color: var(--danger);
    }

    .dropdown-item.selected {
      background: rgba(34, 197, 94, 0.08) !important;
      border-left: 3px solid var(--success) !important;
    }

  /* --- FLOATING MENU (LAINNYA) --- */
  .floating-menu-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    display: none;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
  }
  .floating-menu-overlay.active { display: block; opacity: 1; }

  .floating-menu {
    position: fixed;
    bottom: 90px; /* Above nav bar */
    right: 20px;
    width: 180px;
    background: #0a192f;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  .floating-menu.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .floating-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.2s;
  }
  .floating-menu-item:last-child { border-bottom: none; }
  .floating-menu-item:active { background: rgba(255,255,255,0.05); }
  .floating-menu-item i {
    width: 20px;
    text-align: center;
    color: #D4AF37;
    font-size: 16px;
  }
  .floating-menu-item span { flex: 1; }
  
  .nav-item.active i { color: #D4AF37 !important; }
  .nav-item.admin-tab i { color: #D4AF37; }


  /* --- FINAL FORCE FULL WIDTH FOR DESKTOP --- */
  @media screen and (min-width: 768px) {
    body.desktop-mode .app {
      max-width: 100% !important;
      width: 100vw !important;
      margin: 0 !important;
    }
    body.desktop-mode .panel {
      width: calc(100vw - 280px) !important;
      max-width: none !important;
      padding: 30px 40px !important;
    }
    .absen-desktop-grid {
      width: 100% !important;
      max-width: 100% !important;
    }
    .glass-card, .card {
      width: 100% !important;
      max-width: 100% !important;
    }
    #logModal .card {
      max-width: 480px !important;
      margin: auto !important;
    }
  }

  /* --- FIX ABSEN LAYOUT WRAPPER GRID --- */
  @media screen and (min-width: 1024px) {
    .absen-layout-wrapper {
      display: block !important;
      width: 100% !important;
      max-width: 100% !important;
    }
    .absen-main-content {
      width: 100% !important;
      max-width: 100% !important;
    }
  }

  /* --- UNIVERSAL MOBILE SPACER --- */
  @media screen and (max-width: 767px) {
    .app {
      max-width: 540px !important; /* Slightly wider for better alignment */
      padding-bottom: 80px !important;
    }
    .panel {
      padding: 15px 12px 100px;
    }
  }

/* --- PREMIUM SWEETALERT2 --- */
.swal2-popup {
  background: rgba(18, 18, 20, 0.95) !important;
  backdrop-filter: blur(15px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 25px !important;
  color: #ffffff !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
  font-family: 'Inter', sans-serif !important;
}
.swal2-title {
  color: #d4af37 !important;
  font-weight: 800 !important;
}
.swal2-html-container {
  color: #ffffff !important;
  opacity: 0.8;
  font-size: 14px !important;
}
.swal2-confirm {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%) !important;
  color: #000 !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  padding: 12px 25px !important;
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3) !important;
  border: none !important;
}
.swal2-confirm.swal2-confirm-disabled {
  background: #333 !important;
  color: #888 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}
.swal2-cancel {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  padding: 12px 25px !important;
}
.swal2-icon.swal2-info { border-color: #d4af37 !important; color: #d4af37 !important; }
.swal2-icon.swal2-success { border-color: #10b981 !important; color: #10b981 !important; }
.swal2-icon.swal2-error { border-color: #ef4444 !important; color: #ef4444 !important; }
.swal2-timer-progress-bar { background: #d4af37 !important; }

/* Custom Toggle Switch for Lembur */
.lembur-toggle-wrap { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.lembur-toggle-wrap input { opacity: 0; width: 0; height: 0; position: absolute; }
.lembur-knob {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  transition: background-color .3s ease, border-color .3s ease;
  border-radius: 26px;
}
.lembur-knob::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  transition: transform .3s ease;
  border-radius: 50%;
}
.lembur-toggle-wrap input:checked + .lembur-knob {
  background-color: var(--primary, #d4af37);
  border-color: var(--primary, #d4af37);
}
.lembur-toggle-wrap input:checked + .lembur-knob::before {
  transform: translateY(-50%) translateX(20px);
}

/* ════════════════════════════════════════════════════════
   THEME TERANG (LIGHT THEME) SYSTEM OVERRIDES
════════════════════════════════════════════════════════ */

/* Transisi tema global */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}
.card, .clock-card, .user-card, .bottom-nav, .panel, .log-list, .today-card, .gps-card, .wifi-bar, .auth-card, .face-adm-item, .more-menu-content {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html.light-theme {
  --navy: #f1f5f9; /* Soft Slate-100 (Background utama, lebih bersahabat di mata) */
  --white: #1e293b; /* Slate-800 (Warna teks utama, tidak hitam pekat) */
  --muted: #64748b; /* Slate-500 (Teks sekunder) */
  --card-bg: #ffffff; /* Solid White (Kartu putih bersih untuk kontras lembut) */
  --border: rgba(201, 168, 76, 0.25); /* Border emas tipis lembut */
  --gold-dim: rgba(201, 168, 76, 0.08);
  
  /* Penyesuaian warna gold agar lebih terbaca di background putih */
  --gold-darker: #b38f36; 

  /* High contrast status colors for light theme */
  --success: #15803d; /* green-700 */
  --warning: #b45309; /* amber-700 */
  --info: #1d4ed8; /* blue-700 */
  --danger: #b91c1c; /* red-700 */
}

/* Ensure background of body, app and panel are light and allow body::before gradient to show */
html.light-theme,
html.light-theme body,
html.light-theme .app {
  background: var(--navy) !important;
}

@media (min-width: 768px) {
  html.light-theme .panel {
    background: transparent !important;
  }
}

/* Specific text color contrast fixes for Light Theme */
html.light-theme #akCepat,
html.light-theme #akTotalCepat {
  color: #ea580c !important; /* orange-600 for contrast */
}
html.light-theme .l-tugas .log-jenis {
  color: #7c3aed !important; /* violet-600 */
}
html.light-theme .l-pending .log-jenis {
  color: #ca8a04 !important; /* amber-600 */
}

html.light-theme .filter-chip.active {
  background: var(--gold-dim) !important;
  border-color: var(--gold-darker) !important;
  color: var(--gold-darker) !important;
}

/* 1. Latar Belakang & Efek Gradasi */
html.light-theme body::before {
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse 60% 40% at 100% 100%, rgba(241, 245, 249, 0.8) 0%, transparent 60%);
}

/* 2. Navigasi Bawah & Sidebar Desktop */
html.light-theme .bottom-nav {
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08);
}
@media (min-width: 768px) {
  html.light-theme .bottom-nav {
    background: #e2e8f0 !important; /* Soft slate-200 background to reduce glare */
    border-right: 1px solid rgba(0, 0, 0, 0.08);
  }
}
html.light-theme .nav-item {
  color: #334155 !important; /* slate-700 for softer contrast on soft backgrounds */
}
html.light-theme .nav-item i {
  color: #475569 !important;
  opacity: 0.8 !important;
}
html.light-theme .nav-item:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #0f172a !important;
}
html.light-theme .nav-item:hover i {
  color: #0f172a !important;
  opacity: 1 !important;
}
html.light-theme .nav-item.active {
  color: #b38f36 !important; /* gold-darker for readability */
}
html.light-theme .nav-item.active i {
  color: #b38f36 !important;
  opacity: 1 !important;
}

/* Mobile Specific Light Theme Nav Main */
@media (max-width: 767px) {
  html.light-theme .nav-item.nav-main {
    background: #ffffff !important;
    border-color: #f8fafc !important;
    color: #475569 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
  }
  html.light-theme .nav-item.nav-main i {
    color: #475569 !important;
  }
  html.light-theme .nav-item.nav-main.active {
    background: linear-gradient(135deg, #ffffff, #c9a84c) !important;
    border-color: #c9a84c !important;
    color: #ffffff !important;
    box-shadow: 0 10px 25px rgba(201, 168, 76, 0.3) !important;
  }
  html.light-theme .nav-item.nav-main.active i {
    color: #ffffff !important;
  }
}

/* Desktop Specific Light Theme Nav Main & Sidebar Header */
@media (min-width: 768px) {
  html.light-theme .bottom-nav::before {
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
    color: #b38f36 !important; /* gold-darker for better contrast on white background */
  }
  html.light-theme .nav-item.nav-main {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }
  html.light-theme .nav-item.nav-main,
  html.light-theme .nav-item.nav-main i,
  html.light-theme .nav-item.nav-main span {
    color: #334155 !important;
  }
  html.light-theme .nav-item.nav-main.active {
    background: rgba(201, 168, 76, 0.1) !important;
    border: 1px solid rgba(201, 168, 76, 0.2) !important;
    box-shadow: none !important;
  }
  html.light-theme .nav-item.nav-main.active,
  html.light-theme .nav-item.nav-main.active i,
  html.light-theme .nav-item.nav-main.active span {
    color: #b38f36 !important;
  }
  html.light-theme .nav-item.nav-main:hover,
  html.light-theme .nav-item.nav-main:hover i,
  html.light-theme .nav-item.nav-main:hover span {
    color: #0f172a !important;
  }
  html.light-theme .nav-item.nav-main:hover {
    background: rgba(0, 0, 0, 0.04) !important;
  }
  html.light-theme .nav-item.active {
    background: rgba(201, 168, 76, 0.1) !important;
    border: 1px solid rgba(201, 168, 76, 0.2) !important;
  }
  html.light-theme .nav-item.active::after {
    background: #c9a84c !important;
    box-shadow: 2px 0 10px rgba(201, 168, 76, 0.4) !important;
  }
  /* Theme toggle text and icon adjustments in desktop sidebar */
  html.light-theme #themeToggleBtnDesk {
    color: #475569 !important;
  }
  html.light-theme #themeToggleBtnDesk i {
    color: #475569 !important;
  }
}

/* 3. Panel & Kartu */
html.light-theme .panel {
  background: transparent;
}
html.light-theme .card, 
html.light-theme .clock-card, 
html.light-theme .user-card,
html.light-theme .today-card,
html.light-theme .gps-card,
html.light-theme .auth-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(201, 168, 76, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
html.light-theme .clock-left {
  border-right-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .clock-time {
  color: #0f172a;
}
html.light-theme .clock-loc-badge.unknown {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
html.light-theme .clock-weather-temp {
  color: #2563eb;
}
html.light-theme .clock-weather-cond {
  color: #334155;
}
html.light-theme .clock-weather-tag {
  background: rgba(0, 0, 0, 0.04);
  color: #475569;
}
html.light-theme .avatar {
  color: #0a1628;
}

/* 4. Form Controls, Inputs & Select Options */
html.light-theme .form-input,
html.light-theme .form-textarea,
html.light-theme .form-input-auth {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(201, 168, 76, 0.35);
}
html.light-theme .form-input:focus,
html.light-theme .form-textarea:focus,
html.light-theme .form-input-auth:focus {
  border-color: #c9a84c;
  background: #ffffff;
}
html.light-theme select.form-input,
html.light-theme select.date-range-input,
html.light-theme select.dok-input,
html.light-theme .dok-select {
  background-color: #ffffff;
  color: #0f172a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b38f36' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
html.light-theme select.form-input option,
html.light-theme select.date-range-input option,
html.light-theme select.dok-input option {
  background: #ffffff;
  color: #0f172a;
}
html.light-theme select.form-input option:checked,
html.light-theme select.date-range-input option:checked,
html.light-theme select.dok-input option:checked {
  background: rgba(201, 168, 76, 0.2);
  color: #b38f36;
}

/* 5. Pills, Lists, & Tables */
html.light-theme .jenis-pill {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(201, 168, 76, 0.25);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}
html.light-theme .jenis-pill:hover {
  background: rgba(201, 168, 76, 0.05);
}
html.light-theme .jenis-pill.active {
  background: var(--gold-dim);
  border-color: #c9a84c;
  color: #b38f36;
}
html.light-theme .log-list,
html.light-theme #dokumenList .dok-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(201, 168, 76, 0.25);
}
html.light-theme #dokumenList .dok-card:hover {
  background: #ffffff;
  border-color: #c9a84c;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}
html.light-theme #dokumenList .dok-title {
  color: #0f172a;
}
html.light-theme #dokumenList .dok-action-view {
  color: #475569;
}
html.light-theme .today-row,
html.light-theme .lokasi-item {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}
html.light-theme .admin-table-wrapper {
  background: #ffffff;
  border-color: rgba(201, 168, 76, 0.3);
}
html.light-theme .admin-table {
  color: #1e293b;
}
html.light-theme .admin-table thead {
  background: rgba(0, 0, 0, 0.02);
  border-bottom-color: rgba(201, 168, 76, 0.3);
}
html.light-theme .admin-table tr {
  border-bottom-color: rgba(0, 0, 0, 0.04);
}
html.light-theme .admin-table tr:hover {
  background: rgba(0, 0, 0, 0.015) !important;
}
html.light-theme .admin-nav {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(201, 168, 76, 0.3);
}
html.light-theme .admin-nav-btn.active {
  background: #7c3aed;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.15);
}
html.light-theme .floating-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
html.light-theme .floating-menu-item {
  color: #0f172a;
  border-bottom-color: rgba(0, 0, 0, 0.05);
}
html.light-theme .floating-menu-item:active {
  background: rgba(0, 0, 0, 0.03);
}

/* 6. Shimmer, Buttons, & Overlays */
html.light-theme .shimmer {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.03) 25%, rgba(0, 0, 0, 0.08) 50%, rgba(0, 0, 0, 0.03) 75%);
}
html.light-theme .btn-secondary-outline {
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #334155 !important;
}
html.light-theme .btn-secondary-outline:hover {
  background: rgba(0, 0, 0, 0.02) !important;
}
html.light-theme .more-menu-content {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}
html.light-theme .more-item {
  color: #1e293b;
}
html.light-theme .more-item:hover {
  background: rgba(201, 168, 76, 0.08);
}
html.light-theme .divider::before,
html.light-theme .divider::after {
  background: rgba(201, 168, 76, 0.25);
}
html.light-theme .divider span {
  color: #475569;
}
html.light-theme .wifi-bar.checking {
  background: rgba(201, 168, 76, 0.05);
  border-color: rgba(201, 168, 76, 0.2);
}
html.light-theme .gps-row-box {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.04);
}
html.light-theme .gps-row-box .gps-val {
  color: #0f172a;
}
html.light-theme .acc-bar {
  background: rgba(0, 0, 0, 0.05);
}
html.light-theme #appSplash {
  background: #ffffff !important;
}
html.light-theme #appSplash .splash-title {
  color: #0f172a !important;
}
html.light-theme #appSplash .splash-bar {
  background: rgba(0, 0, 0, 0.05) !important;
}
html.light-theme #appSplash .splash-progress {
  background: #c9a84c !important;
}

/* 7. Kalender Flatpickr */
html.light-theme .flatpickr-calendar {
  background: #ffffff !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
html.light-theme .flatpickr-calendar::before,
html.light-theme .flatpickr-calendar::after {
  display: none !important; /* Hilangkan panah segitiga flatpickr yang hitam */
}
html.light-theme .flatpickr-day {
  color: #334155 !important;
}
html.light-theme .flatpickr-day:hover,
html.light-theme .flatpickr-day.prevMonthDay:hover,
html.light-theme .flatpickr-day.nextMonthDay:hover {
  background: #f1f5f9 !important;
  color: #000000 !important;
}
html.light-theme .flatpickr-day.prevMonthDay,
html.light-theme .flatpickr-day.nextMonthDay {
  color: #94a3b8 !important;
}
html.light-theme .flatpickr-day.selected {
  background: #c9a84c !important;
  color: #ffffff !important;
  border-color: #c9a84c !important;
}
html.light-theme .flatpickr-day.inRange {
  background: rgba(201, 168, 76, 0.1) !important;
  box-shadow: none !important;
}
html.light-theme .flatpickr-months,
html.light-theme .flatpickr-month {
  color: #0f172a !important;
  fill: #0f172a !important;
}
html.light-theme .flatpickr-current-month input.cur-year {
  color: #0f172a !important;
}
html.light-theme .flatpickr-current-month .numInputWrapper span.arrowUp::after {
  border-bottom-color: #0f172a !important;
}
html.light-theme .flatpickr-current-month .numInputWrapper span.arrowDown::after {
  border-top-color: #0f172a !important;
}
html.light-theme .flatpickr-weekday {
  color: #475569 !important;
}

/* 8. SweetAlert2 */
html.light-theme .swal2-popup {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1) !important;
}
html.light-theme .swal2-title {
  color: #b38f36 !important;
}
html.light-theme .swal2-html-container {
  color: #1e293b !important;
}
html.light-theme .swal2-cancel {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}
html.light-theme .swal2-confirm {
  color: #ffffff !important;
}
html.light-theme .swal2-confirm.swal2-confirm-disabled {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
}

/* 9. Profile biometrics & documents */
html.light-theme #profilFaceThumbWrap,
html.light-theme .profil-sig-thumb {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(201, 168, 76, 0.3) !important;
}
html.light-theme .face-adm-thumb {
  background: rgba(0, 0, 0, 0.02) !important;
}
html.light-theme .dok-modal {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}
html.light-theme .dok-modal-title h3 {
  color: #0f172a !important;
}
html.light-theme .dok-modal-close {
  background: rgba(239, 68, 68, 0.08) !important;
}
html.light-theme .dok-tab {
  color: #64748b !important;
}
html.light-theme .dok-tab.active {
  background: var(--gold) !important;
  color: #000000 !important;
}
html.light-theme .dok-input {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
}
html.light-theme .dok-file-label {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #475569 !important;
}
html.light-theme .pdf-opt-label {
  color: #475569 !important;
}

/* 10. PDF Preview modal overrides */
html.light-theme #pdfPreviewModal > div {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}
html.light-theme #pdfPreviewModal h3 {
  color: #0f172a !important;
}
html.light-theme #pdfPreviewSidebar {
  background: rgba(0, 0, 0, 0.01) !important;
  border-right-color: rgba(0, 0, 0, 0.06) !important;
}
html.light-theme #pdfPreviewSidebar label {
  color: #475569 !important;
}
html.light-theme #pdfPreviewSidebar .form-input {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
}
html.light-theme #pdfPreviewViewer {
  background: #f1f5f9 !important;
}

/* 11. Overrides for Meja Absen card and Admin Input Keterangan Card in Light Theme */
html.light-theme .meja-absen-card {
  background: var(--card-bg) !important;
  border-color: var(--border) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
}

html.light-theme #adminKetCard {
  background: var(--card-bg) !important;
  border-color: var(--border) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04) !important;
}

html.light-theme .meja-title,
html.light-theme #adminKetCard div {
  color: var(--white);
}

html.light-theme .meja-status-bar,
html.light-theme .meja-loc-bar {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

html.light-theme #mejaAbsenCard div[style*="border-top"] {
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

html.light-theme #humanJsCacheControl {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.05) !important;
}

html.light-theme .admin-select-custom,
html.light-theme .admin-input-premium {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: var(--white) !important;
}

html.light-theme .admin-select-custom option {
  background: #ffffff !important;
  color: var(--white) !important;
}

html.light-theme .admin-upload-btn {
  background: rgba(99, 102, 241, 0.06) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

html.light-theme .dropdown-trigger {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

html.light-theme .dropdown-trigger input {
  color: var(--white) !important;
}

html.light-theme .dropdown-list-wrap {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
}

html.light-theme .dropdown-item {
  border-bottom-color: rgba(0, 0, 0, 0.04) !important;
}

html.light-theme .dropdown-item:hover {
  background: rgba(201, 168, 76, 0.08) !important;
}

/* --- PAGINATION BUTTONS --- */
.btn-pagination {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pagination:hover {
  background: rgba(96, 165, 250, 0.25);
  border-color: rgba(96, 165, 250, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.15);
}

.btn-pagination:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-pagination-all {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pagination-all:hover {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

html.light-theme .btn-pagination-all:hover {
  color: #0f172a;
  text-decoration-color: rgba(0, 0, 0, 0.5);
}
