/* ============================================================
   Custom CSS – Website Database Keamanan Penerbangan
   OTBAN Wilayah VII
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   CSS Variables – Design Tokens
   ============================================================ */
:root {
  --primary:        #003580;
  --primary-light:  #0057B8;
  --primary-dark:   #002560;
  --accent:         #FFB800;
  --accent-dark:    #E09E00;
  --neutral-50:     #F4F6FA;
  --neutral-100:    #E8ECF2;
  --neutral-200:    #D1D9E6;
  --neutral-400:    #8899B2;
  --neutral-600:    #4B5F7A;
  --neutral-800:    #1A2A3D;
  --danger:         #E63946;
  --success:        #2DC653;
  --warning:        #FFB800;
  --info:           #0EA5E9;
  --white:          #FFFFFF;
  
  --sidebar-width:  260px;
  --header-height:  64px;
  --border-radius:  12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:    0 4px 16px rgba(0,53,128,.12), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:    0 8px 32px rgba(0,53,128,.16), 0 4px 12px rgba(0,0,0,.08);
  --shadow-xl:    0 20px 60px rgba(0,53,128,.2), 0 8px 24px rgba(0,0,0,.1);

  --transition: all .25s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--neutral-800);
  background: var(--neutral-50);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  margin: 0;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--primary); }

/* ============================================================
   Layout – Main Wrapper
   ============================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: 4px 0 24px rgba(0,35,96,.18);
}

.sidebar-brand {
  padding: 24px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar-brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: white;
  padding: 4px;
  flex-shrink: 0;
}

.sidebar-brand-text {
  flex: 1;
  min-width: 0;
}

.sidebar-brand-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: .6px;
  line-height: 1.3;
}

.sidebar-brand-sub {
  font-size: 10px;
  color: rgba(255,255,255,.6);
  line-height: 1.3;
  margin-top: 2px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 8px 4px;
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,.75);
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255,255,255,.12);
  color: white;
  transform: translateX(2px);
}

.nav-item.active {
  background: rgba(255,255,255,.18);
  color: white;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.nav-item.active .nav-icon { color: var(--accent); }

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.sidebar-footer-version {
  text-align: center;
  font-size: 10px;
  color: rgba(255,255,255,.3);
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   HEADER (Top Bar)
   ============================================================ */
.app-header {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--neutral-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-page-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.header-page-subtitle {
  font-size: 12px;
  color: var(--neutral-400);
  margin-top: 1px;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--neutral-600);
  border-radius: 8px;
  transition: var(--transition);
}

.hamburger-btn:hover { background: var(--neutral-100); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 40px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.header-user:hover { background: var(--neutral-50); }

.header-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-light);
}

.header-user-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--neutral-800);
}

.header-user-role {
  font-size: 11px;
  color: var(--neutral-400);
}

/* ============================================================
   PAGE BODY
   ============================================================ */
.page-body {
  padding: 24px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title {
  font-size: 22px;
  color: var(--primary-dark);
}

.page-sub {
  font-size: 13px;
  color: var(--neutral-400);
  font-weight: 400;
  margin-top: 4px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--neutral-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
}

.card-body {
  padding: 20px;
}

/* Stat icon for dashboard cards */
.stat-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* ============================================================
   PERSONEL CARDS – Duty Status Grid
   ============================================================ */
.personel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.personel-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.personel-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.personel-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--neutral-100);
  transition: var(--transition);
}

.personel-card:hover .personel-avatar { border-color: var(--primary-light); }

.personel-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--neutral-800);
  line-height: 1.3;
}

.personel-jabatan {
  font-size: 11.5px;
  color: var(--neutral-400);
  line-height: 1.3;
}

.duty-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.duty-on  { background: #d1fae5; color: #065f46; }
.duty-off { background: #fee2e2; color: #991b1b; }

/* Toggle Switch */
.duty-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.duty-toggle input { opacity: 0; width: 0; height: 0; }

.duty-toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 12px;
  transition: var(--transition);
}

.duty-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.duty-toggle input:checked + .duty-toggle-slider { background: var(--success); }
.duty-toggle input:checked + .duty-toggle-slider::before { transform: translateX(20px); }

/* ============================================================
   TOOLS GRID
   ============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.tool-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}

.tool-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--neutral-100);
}

.tool-title { font-size: 14px; font-weight: 700; color: var(--neutral-800); }

.tool-desc {
  font-size: 12.5px;
  color: var(--neutral-400);
  line-height: 1.5;
  flex: 1;
}

.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.badge-type {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.badge-website { background: #dbeafe; color: #1e40af; }
.badge-application { background: #ede9fe; color: #5b21b6; }

/* ============================================================
   TEAM CARDS
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.team-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
  overflow: hidden;
  transition: var(--transition);
}

.team-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.team-card-top {
  padding: 24px 20px 16px;
  text-align: center;
  background: linear-gradient(135deg, var(--neutral-50), white);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: var(--shadow-md);
  margin: 0 auto 12px;
  display: block;
}

.team-name { font-size: 15px; font-weight: 700; color: var(--neutral-800); margin-bottom: 4px; }
.team-nip { font-size: 11px; color: var(--neutral-400); margin-bottom: 4px; }
.team-jabatan { font-size: 12px; color: var(--neutral-600); }

.team-card-actions {
  display: flex;
  border-top: 1px solid var(--neutral-100);
}

.team-card-actions a {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.team-card-actions .btn-profil {
  color: var(--primary);
  background: white;
  border-right: 1px solid var(--neutral-100);
}

.team-card-actions .btn-profil:hover { background: var(--neutral-50); }

.team-card-actions .btn-wa {
  color: #16a34a;
  background: white;
}

.team-card-actions .btn-wa:hover { background: #f0fdf4; }

/* ============================================================
   PROFILE DETAIL PAGE
   ============================================================ */
.profile-detail-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

.profile-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
  overflow: hidden;
}

.profile-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 32px 24px 24px;
  text-align: center;
}

.profile-avatar-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.4);
  margin: 0 auto 16px;
  display: block;
}

.profile-name-lg { color: white; font-size: 17px; margin-bottom: 4px; }
.profile-jabatan-lg { color: rgba(255,255,255,.75); font-size: 13px; }

.profile-info-list { padding: 20px; }

.profile-info-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-50);
}

.profile-info-item:last-child { border-bottom: none; }

.profile-info-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--neutral-400);
  text-transform: uppercase;
  letter-spacing: .5px;
  min-width: 100px;
  flex-shrink: 0;
}

.profile-info-value {
  font-size: 13px;
  color: var(--neutral-800);
  font-weight: 500;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th {
  background: var(--neutral-50);
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--neutral-600);
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 1px solid var(--neutral-100);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--neutral-50);
  color: var(--neutral-800);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: var(--neutral-50); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(0,53,128,.35);
  transform: translateY(-1px);
  color: white;
}

.btn-accent {
  background: var(--accent);
  color: var(--primary-dark);
}
.btn-accent:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 16px rgba(255,184,0,.4);
  transform: translateY(-1px);
}

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #24a644; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c42d39; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--neutral-200);
  color: var(--neutral-600);
}
.btn-outline:hover { background: var(--neutral-50); border-color: var(--neutral-400); }

.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-icon { padding: 7px; border-radius: 8px; }
.btn-full { width: 100%; }

.btn-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--neutral-600);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--border-radius-sm);
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  color: var(--neutral-800);
  background: white;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(0,87,184,.12);
}

.form-control::placeholder { color: var(--neutral-400); }

.form-control-icon {
  position: relative;
}

.form-control-icon input {
  padding-left: 40px;
}

.form-control-icon .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-400);
}

.password-toggle-wrapper {
  position: relative;
}

.password-toggle-wrapper .form-control {
  padding-right: 44px;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--neutral-400);
  padding: 4px;
  transition: var(--transition);
}

.password-toggle-btn:hover { color: var(--neutral-600); }

.form-select { appearance: none; }

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--neutral-600);
  cursor: pointer;
}

.form-check input { cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-error {
  font-size: 11.5px;
  color: var(--danger);
  margin-top: 4px;
}

/* ============================================================
   FILE UPLOAD DROP ZONE
   ============================================================ */
.drop-zone {
  border: 2px dashed var(--neutral-200);
  border-radius: var(--border-radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--neutral-50);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary-light);
  background: #eff6ff;
}

.drop-zone-icon { font-size: 28px; margin-bottom: 8px; }
.drop-zone-text { font-size: 13px; color: var(--neutral-600); }
.drop-zone-sub { font-size: 11px; color: var(--neutral-400); margin-top: 4px; }

.drop-zone input[type="file"] {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.drop-zone-preview {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 10px 14px;
}

.drop-zone-preview img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
}

.drop-zone-preview-name { font-size: 13px; font-weight: 600; }
.drop-zone-preview-size { font-size: 11px; color: var(--neutral-400); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(24px) scale(.97);
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s;
  opacity: 0;
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--neutral-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 16px; color: var(--primary-dark); }

.modal-close {
  width: 32px; height: 32px;
  background: var(--neutral-100);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-600);
  transition: var(--transition);
}

.modal-close:hover { background: var(--neutral-200); color: var(--neutral-800); }

.modal-body { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--neutral-100);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0,35,96,.95) 0%, rgba(0,53,128,.8) 50%, rgba(0,87,184,.7) 100%);
  z-index: 0;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(255,184,0,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0,87,184,.2) 0%, transparent 50%);
  z-index: 1;
}

.login-card {
  position: relative;
  z-index: 10;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  animation: slideInUp .5s cubic-bezier(.4,0,.2,1);
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
  display: block;
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  object-fit: contain;
}

.login-title {
  font-size: 20px;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 12px;
  color: var(--neutral-400);
  text-align: center;
  margin-bottom: 32px;
  font-weight: 400;
}

.login-divider {
  height: 1px;
  background: var(--neutral-100);
  margin: 20px 0;
}

.alert-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ============================================================
   DATABASE TABS
   ============================================================ */
.db-tabs {
  display: flex;
  gap: 4px;
  background: var(--neutral-100);
  padding: 4px;
  border-radius: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 24px;
}

.db-tabs::-webkit-scrollbar { display: none; }

.db-tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--neutral-600);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
}

.db-tab:hover { color: var(--primary); }

.db-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--neutral-100);
}

.pagination-info {
  font-size: 12px;
  color: var(--neutral-400);
}

.pagination {
  display: flex;
  gap: 4px;
}

.page-btn {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--neutral-200);
  background: white;
  color: var(--neutral-600);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.page-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-toast {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  animation: slideInRight .3s cubic-bezier(.4,0,.2,1);
  border-left: 4px solid;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

.app-toast.success { border-left-color: var(--success); color: #065f46; }
.app-toast.error   { border-left-color: var(--danger); color: #991b1b; }
.app-toast.info    { border-left-color: var(--info); color: #075985; }
.app-toast.warning { border-left-color: var(--warning); color: #92400e; }

.app-toast-icon { font-size: 18px; flex-shrink: 0; }
.app-toast-msg  { flex: 1; }

.app-toast-close {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: .5;
  padding: 0 2px;
  transition: var(--transition);
}

.app-toast-close:hover { opacity: 1; }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar {
  display: flex;
  align-items: center;
  background: white;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(0,87,184,.12);
}

.search-bar input {
  flex: 1;
  border: none;
  padding: 9px 14px;
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  outline: none;
  color: var(--neutral-800);
}

.search-bar-icon {
  padding: 0 12px;
  color: var(--neutral-400);
}

/* ============================================================
   SECTION DIVIDER
   ============================================================ */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0 20px;
}

.section-divider-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}

.section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--neutral-100);
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
}

.badge-admin    { background: #ede9fe; color: #5b21b6; }
.badge-readonly { background: #f3f4f6; color: #374151; }
.badge-active   { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--neutral-400);
}

.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: .4; }
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--neutral-600); margin-bottom: 6px; }
.empty-state-desc  { font-size: 13px; }

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--neutral-100) 25%, var(--neutral-50) 50%, var(--neutral-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--neutral-50); }
::-webkit-scrollbar-thumb { background: var(--neutral-200); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neutral-400); }

/* ============================================================
   RESPONSIVE – Mobile & Tablet
   ============================================================ */
@media (max-width: 1024px) {
  .profile-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Sidebar slide off-screen on mobile */
  .sidebar {
    transform: translateX(-100%);
    z-index: 1050;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .hamburger-btn { display: flex; }
  
  .header-user-name, .header-user-role { display: none; }
  
  .login-card { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .login-card { padding: 28px 18px; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-primary  { color: var(--primary); }
.text-accent   { color: var(--accent); }
.text-muted    { color: var(--neutral-400); }
.text-danger   { color: var(--danger); }
.text-success  { color: var(--success); }

.bg-primary    { background: var(--primary); }
.bg-accent     { background: var(--accent); }

.fw-bold       { font-weight: 700; }
.fw-medium     { font-weight: 500; }

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.d-flex   { display: flex; }
.d-none   { display: none; }

.align-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end   { justify-content: flex-end; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.overflow-hidden { overflow: hidden; }
.position-relative { position: relative; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
}

.sidebar-overlay.active { display: block; }
