  /* =========================================
     1. GLOBAL & BASE STYLES
     ========================================= */
  * {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }

  body {
    background-color: #f1f5f9 !important;
  }
  
  html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
  }

  #app-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .view-section {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    min-height: 100vh;
  }

  /* =========================================
     2. LOGIN PAGE STYLES
     ========================================= */
  .login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
  }

  .login-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
  }

  /* =========================================
     3. EMPLOYEE UI (ATTENDANCE BUTTONS)
     ========================================= */
  .btn-circle {
    width: 160px;
    height: 160px;
    border-radius: 50% !important;
    color: white !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Efek Saat Tombol Di-sentuh/Klik */
  .btn-circle:active {
    transform: scale(0.92) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
  }

  /* Gradasi & Efek Berdenyut Check In */
  .btn-checkin {
    background: linear-gradient(135deg, #4f46e5, #3b82f6) !important;
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4) !important;
  }
  .btn-checkin:hover {
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.6) !important;
  }

  /* Gradasi & Efek Berdenyut Check Out */
  .btn-checkout {
    background: linear-gradient(135deg, #e11d48, #f43f5e) !important;
    box-shadow: 0 12px 24px rgba(244, 63, 94, 0.4) !important;
  }
  .btn-checkout:hover {
    box-shadow: 0 12px 30px rgba(244, 63, 94, 0.6) !important;
  }

  .btn-icon {
    font-size: 38px !important;
    margin-bottom: 2px;
    display: inline-block;
  }

  /* =========================================
     4. OWNER UI STYLES
     ========================================= */
  .nav-link {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: 0.3s;
    cursor: pointer;
  }
  .nav-link:hover, .nav-link.active {
    background: #334155;
    color: white;
  }
  .owner-input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    box-sizing: border-box;
  }
  #table-body-attendance td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #334155;
  }
  .owner-sidebar-link {
    color: #94a3b8;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
  }
  .owner-sidebar-link:hover, .owner-sidebar-link.active {
    background: #334155;
    color: #ffffff;
  }

  /* =========================================
     5. MODERN MODAL STYLES (POP-UP)
     ========================================= */
  .custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4); 
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); /* Tambahan untuk support beberapa browser */
    z-index: 1; /* KUNCI: Pastikan layer ini ada di bawah */
  }
  
  .modal-card {
    position: relative;
    background: white;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10; /* KUNCI: Pastikan form modal ada di urutan teratas */
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  @keyframes modalSlideUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* =========================================
     6. TABLE ACTION UTILITIES
     ========================================= */
  #employee-tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
  }
  
  #employee-tbody tr:hover {
    background-color: #f8fafc; /* Sorotan tipis saat baris tabel di-hover */
  }

  .btn-action-reset {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
  }
  
  .btn-action-reset:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
  }
  
  .badge-active {
    background: #dcfce7;
    color: #15803d;
    padding: 4px 10px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
  }

  /* =========================================
     7. LEAVE HISTORY TR UTILITIES
     ========================================= */
  .row-history-inactive {
    background-color: #f8fafc !important;
    color: #94a3b8 !important;
    opacity: 0.75;
  }
  .row-history-inactive td {
    color: #94a3b8 !important;
  }

  /* =========================================
   8. OWNER MOBILE RESPONSIVE UTILITIES
   ========================================= */
/* Default: Sembunyikan versi mobile jika dibuka di desktop */
.owner-mobile-container {
  display: none;
}

@media screen and (max-width: 768px) {
  /* Sembunyikan container desktop bawaanmu */
  .owner-container {
    display: none !important;
  }
  
  /* Aktifkan container mobile */
  .owner-mobile-container {
    display: block;
    background-color: #f8fafc;
    min-height: 100vh;
    box-sizing: border-box;
  }

  /* Desain Navigasi Bawah Mobile */
  .owner-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom); /* Support notch iPhone */
  }

  .mob-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    gap: 4px;
    transition: color 0.2s ease;
  }

  .mob-nav-link i {
    font-size: 20px;
  }

  /* Style ketika menu navigasi bawah aktif */
  .mob-nav-link.active {
    color: #4f46e5;
    font-weight: 700;
  }
}

/* =========================================
   9. ATTENDANCE STATUS BADGES
   ========================================= */
.att-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.att-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.att-badge-present    { background: #dcfce7; color: #15803d; border: 0.5px solid #86efac; }
.att-badge-late       { background: #fff7ed; color: #c2410c; border: 0.5px solid #fdba74; }
.att-badge-forgot     { background: #f5f3ff; color: #6d28d9; border: 0.5px solid #c4b5fd; }
.att-badge-leave      { background: #eff6ff; color: #1d4ed8; border: 0.5px solid #93c5fd; }
.att-badge-permission { background: #ecfeff; color: #0e7490; border: 0.5px solid #67e8f9; }
.att-badge-rejected   { background: #fef2f2; color: #b91c1c; border: 0.5px solid #fca5a5; }
.att-late-mins {
  font-size: 12px;
  font-weight: 500;
  color: #c2410c;
  white-space: nowrap;
}