/* ============================================================
   AEROBUILD DESIGN SYSTEM — Sky-Blue Drone Company Aesthetic
   Primary:   Sky Blue   #0ea5e9
   Deep:      Sky Dark   #0284c7
   Light:     Sky Pale   #e0f2fe
   Vibrant:   Multi-tone gradient accents (DJI / Skydio feel)
   ============================================================ */

:root {
  --ab-sky:        #0ea5e9;
  --ab-sky-dark:   #0284c7;
  --ab-sky-mid:    #38bdf8;
  --ab-sky-pale:   #e0f2fe;
  --ab-teal:       #06b6d4;
  --ab-violet:     #8b5cf6;
  --ab-emerald:    #10b981;
  --ab-rose:       #f43f5e;
  --ab-amber:      #f59e0b;
  --ab-red:        #ef4444;
  --ab-green:      #22c55e;

  /* Text */
  --ab-text:       #0f172a;
  --ab-text-muted: #64748b;

  /* Card & body */
  --ab-body-bg:    #f0f7ff;
  --ab-card-bg:    #ffffff;
  --ab-card-border:#e0edf7;

  /* Shadows */
  --ab-shadow:     0 2px 16px rgba(14,165,233,0.10);
  --ab-shadow-lg:  0 8px 40px rgba(14,165,233,0.18);

  /* Radii */
  --ab-radius:     12px;
  --ab-radius-sm:  8px;

  /* Dim */
  --ab-sky-dim:    rgba(14,165,233,0.10);
}

/* ── Global ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--ab-body-bg);
  color: var(--ab-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.6;
}

main { flex: 1; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ab-body-bg); }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 99px; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.text-accent { color: var(--ab-sky) !important; }
.text-amber  { color: var(--ab-amber) !important; }

/* ============================================================
   NAVBAR — White with sky-blue accents
   ============================================================ */
.navbar {
  background: #ffffff !important;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ab-card-border);
  box-shadow: 0 2px 16px rgba(14,165,233,0.10);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar-brand .brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 2px solid var(--ab-sky-pale);
}

.navbar-brand .brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.navbar-brand .brand-name span { color: var(--ab-sky); }

.navbar-nav .nav-link {
  color: #475569 !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--ab-radius-sm);
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--ab-sky-dark) !important;
  background: var(--ab-sky-pale) !important;
}

.navbar-toggler {
  border: 1px solid var(--ab-card-border) !important;
  padding: 0.3rem 0.6rem;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2871%2C85%2C105%2C1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Dropdown */
.navbar .dropdown-menu {
  background: #ffffff;
  border: 1px solid var(--ab-card-border);
  border-radius: var(--ab-radius);
  box-shadow: 0 12px 40px rgba(14,165,233,0.15);
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.navbar .dropdown-item {
  color: #334155 !important;
  border-radius: var(--ab-radius-sm);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.navbar .dropdown-item:hover {
  background: var(--ab-sky-pale) !important;
  color: var(--ab-sky-dark) !important;
}

.navbar .dropdown-divider {
  border-color: var(--ab-card-border) !important;
  margin: 0.4rem 0.5rem;
}

.navbar .dropdown-toggle {
  color: #334155 !important;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Role badges in navbar */
.navbar .badge {
  font-size: 0.65rem;
  padding: 0.25em 0.6em;
  border-radius: 99px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* PWA install button */
#installPWABtn {
  border-color: var(--ab-sky);
  color: var(--ab-sky-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
}

#installPWABtn:hover {
  background: var(--ab-sky-pale);
}

/* ============================================================
   PAGE HEADER / HERO BANDS — Sky Blue Gradient
   ============================================================ */
.ab-page-header {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #38bdf8 100%);
  padding: 2.5rem 0 2rem;
  margin-bottom: 2rem;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

.ab-page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 50%, rgba(255,255,255,0.12) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(56,189,248,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.ab-page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.6), rgba(255,255,255,0.2));
}

.ab-page-header h1,
.ab-page-header h2,
.ab-page-header p {
  color: #fff !important;
}

.ab-page-header p { color: rgba(255,255,255,0.80) !important; font-size: 0.95rem; }

.ab-breadcrumb .breadcrumb-item a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.85rem;
}

.ab-breadcrumb .breadcrumb-item a:hover { color: #fff; }

.ab-breadcrumb .breadcrumb-item.active {
  color: rgba(255,255,255,0.95);
  font-size: 0.85rem;
}

.ab-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,0.5);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  border: 1px solid var(--ab-card-border) !important;
  border-radius: var(--ab-radius) !important;
  box-shadow: var(--ab-shadow) !important;
  background: var(--ab-card-bg) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-header {
  background: #ffffff !important;
  border-bottom: 1px solid var(--ab-card-border) !important;
  border-radius: var(--ab-radius) var(--ab-radius) 0 0 !important;
  padding: 1rem 1.25rem !important;
  font-weight: 700;
}

.card-header h4, .card-header h5 { margin: 0; font-size: 1rem; color: #0f172a; }

.card-footer {
  background: #f8fbfe !important;
  border-top: 1px solid var(--ab-card-border) !important;
  border-radius: 0 0 var(--ab-radius) var(--ab-radius) !important;
  padding: 0.75rem 1.25rem !important;
}

/* Hover lift for clickable cards */
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--ab-shadow-lg) !important;
}

/* Accent-left card variant */
.card-accent-left {
  border-left: 3px solid var(--ab-sky) !important;
}

/* ============================================================
   PROJECT / CLIENT CARDS
   ============================================================ */
.project-card {
  border-radius: var(--ab-radius) !important;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ab-shadow-lg) !important;
}

.project-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--ab-sky), var(--ab-sky-dark));
  color: white;
  flex-shrink: 0;
}

.project-card .card-icon.amber {
  background: linear-gradient(135deg, var(--ab-amber), #d97706);
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.25em 0.75em;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-active    { background: #dcfce7; color: #166534; }
.status-completed { background: #dbeafe; color: #1e40af; }
.status-on-hold   { background: #fef9c3; color: #854d0e; }

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-weight: 600;
  border-radius: var(--ab-radius-sm) !important;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  transition: all 0.2s ease !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 2px 10px rgba(14,165,233,0.35) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(14,165,233,0.45) !important;
}

.btn-outline-primary {
  border: 1.5px solid var(--ab-sky) !important;
  color: var(--ab-sky-dark) !important;
  background: transparent !important;
}

.btn-outline-primary:hover {
  background: var(--ab-sky-pale) !important;
  color: var(--ab-sky-dark) !important;
}

.btn-secondary {
  background: #e2e8f0 !important;
  border: none !important;
  color: #475569 !important;
}

.btn-secondary:hover {
  background: #cbd5e1 !important;
  color: #334155 !important;
}

.btn-outline-secondary {
  border: 1.5px solid #cbd5e1 !important;
  color: #64748b !important;
  background: transparent !important;
}

.btn-outline-secondary:hover {
  background: #f1f5f9 !important;
  color: #334155 !important;
}

.btn-danger {
  background: linear-gradient(135deg, #f87171, #dc2626) !important;
  border: none !important;
  color: white !important;
}

.btn-outline-danger {
  border: 1.5px solid #fca5a5 !important;
  color: #dc2626 !important;
  background: transparent !important;
}

.btn-outline-danger:hover {
  background: #fef2f2 !important;
}

.btn-success {
  background: linear-gradient(135deg, #34d399, #059669) !important;
  border: none !important;
  color: white !important;
}

.btn-outline-success {
  border: 1.5px solid #6ee7b7 !important;
  color: #059669 !important;
  background: transparent !important;
}

.btn-outline-success:hover { background: #f0fdf4 !important; }

.btn-sm { font-size: 0.8rem !important; padding: 0.3rem 0.7rem !important; }
.btn-lg { font-size: 1rem !important; padding: 0.75rem 1.75rem !important; }

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
  border: 1.5px solid #e0edf7 !important;
  border-radius: var(--ab-radius-sm) !important;
  font-size: 0.9rem !important;
  padding: 0.55rem 0.85rem !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  color: #1e293b !important;
  background: #fff !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--ab-sky) !important;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.12) !important;
  outline: none !important;
}

.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #374151;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.form-text { color: #94a3b8; font-size: 0.8rem; }

.input-group-text {
  background: #f0f7ff !important;
  border: 1.5px solid #e0edf7 !important;
  color: var(--ab-sky-dark) !important;
  border-radius: var(--ab-radius-sm) !important;
}

.input-group .form-control { border-left: 0 !important; border-radius: 0 var(--ab-radius-sm) var(--ab-radius-sm) 0 !important; }
.input-group .input-group-text:first-child { border-right: 0 !important; border-radius: var(--ab-radius-sm) 0 0 var(--ab-radius-sm) !important; }

/* ============================================================
   TABLES
   ============================================================ */
.table { font-size: 0.875rem; }

.table thead th {
  background: #f0f7ff !important;
  color: #475569 !important;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--ab-card-border) !important;
  padding: 0.75rem 1rem !important;
  white-space: nowrap;
}

.table tbody td {
  vertical-align: middle;
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid #f0f7ff !important;
  color: #334155;
}

.table tbody tr:hover td { background: #f8fbfe !important; }
.table tbody tr:last-child td { border-bottom: none !important; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  border-radius: 6px !important;
  padding: 0.3em 0.65em;
}

.bg-primary   { background: var(--ab-sky) !important; }
.bg-success   { background: #22c55e !important; }
.bg-danger    { background: #ef4444 !important; }
.bg-warning   { background: #f59e0b !important; color: #fff !important; }
.bg-info      { background: #06b6d4 !important; }
.bg-secondary { background: #94a3b8 !important; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  border: none !important;
  border-radius: var(--ab-radius) !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1rem !important;
}

.alert-success { background: #f0fdf4; color: #166534; border-left: 3px solid #22c55e !important; }
.alert-danger  { background: #fef2f2; color: #991b1b; border-left: 3px solid #ef4444 !important; }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 3px solid #f59e0b !important; }
.alert-info    { background: #eff6ff; color: #1e40af; border-left: 3px solid var(--ab-sky) !important; }

/* ============================================================
   MODALS — Sky-blue header
   ============================================================ */
/* Lock z-index/pointer-events so transforms elsewhere on the page
   (e.g. GSAP-animated cards / page header) cannot trap the modal
   below the backdrop. */
.modal-backdrop      { z-index: 1050 !important; }
.modal               { z-index: 1060 !important; pointer-events: none; }
.modal.show          { pointer-events: auto; }
.modal-dialog,
.modal-content       { pointer-events: auto !important; }

.modal-content {
  border: none !important;
  border-radius: var(--ab-radius) !important;
  box-shadow: 0 24px 64px rgba(14,165,233,0.18) !important;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, #0284c7, #0ea5e9) !important;
  color: #fff !important;
  border-bottom: none !important;
  padding: 1.25rem 1.5rem !important;
}

.modal-header .modal-title { color: #fff !important; font-size: 1rem; font-weight: 700; }
.modal-header .btn-close { filter: invert(1) !important; opacity: 0.85; }

.modal-body { padding: 1.5rem !important; }
.modal-footer {
  background: #f8fbfe !important;
  border-top: 1px solid var(--ab-card-border) !important;
  padding: 1rem 1.5rem !important;
}

/* ============================================================
   TABS
   ============================================================ */
.nav-tabs {
  border-bottom: 2px solid var(--ab-card-border) !important;
  gap: 2px;
}

.nav-tabs .nav-link {
  border: none !important;
  border-radius: var(--ab-radius-sm) var(--ab-radius-sm) 0 0 !important;
  color: #64748b;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.1rem !important;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  background: transparent !important;
}

.nav-tabs .nav-link:hover {
  color: var(--ab-sky-dark);
  background: var(--ab-sky-pale) !important;
}

.nav-tabs .nav-link.active {
  color: var(--ab-sky) !important;
  background: #fff !important;
  border-bottom: 2px solid var(--ab-sky) !important;
  margin-bottom: -2px;
  box-shadow: none !important;
}

/* ============================================================
   LIST GROUPS
   ============================================================ */
.list-group-item {
  border: 1px solid var(--ab-card-border) !important;
  font-size: 0.875rem;
  padding: 0.75rem 1rem !important;
  transition: background 0.15s ease;
}

.list-group-item:first-child { border-radius: var(--ab-radius-sm) var(--ab-radius-sm) 0 0 !important; }
.list-group-item:last-child  { border-radius: 0 0 var(--ab-radius-sm) var(--ab-radius-sm) !important; }
.list-group-item:hover { background: #f8fbfe; }

/* ============================================================
   STAT CARDS — Vibrant colorful gradients
   ============================================================ */
.stat-card {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  border-radius: var(--ab-radius) !important;
  padding: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
  border: none !important;
  box-shadow: 0 4px 24px rgba(14,165,233,0.30) !important;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: rgba(255,255,255,0.20);
  color: #fff;
  margin-bottom: 1rem;
}

.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.04em;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

/* Colorful variants */
.stat-card.blue   { background: linear-gradient(135deg, #0284c7, #0ea5e9); box-shadow: 0 4px 24px rgba(14,165,233,0.30) !important; }
.stat-card.green  { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 4px 24px rgba(16,185,129,0.30) !important; }
.stat-card.amber  { background: linear-gradient(135deg, #d97706, #f59e0b); box-shadow: 0 4px 24px rgba(245,158,11,0.30) !important; }
.stat-card.violet { background: linear-gradient(135deg, #7c3aed, #8b5cf6); box-shadow: 0 4px 24px rgba(139,92,246,0.30) !important; }
.stat-card.rose   { background: linear-gradient(135deg, #e11d48, #f43f5e); box-shadow: 0 4px 24px rgba(244,63,94,0.30) !important; }
.stat-card.teal   { background: linear-gradient(135deg, #0891b2, #06b6d4); box-shadow: 0 4px 24px rgba(6,182,212,0.30) !important; }

/* ============================================================
   TOUR CARDS / MEDIA CARDS
   ============================================================ */
.media-card {
  border-radius: var(--ab-radius) !important;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  border: 1px solid var(--ab-card-border) !important;
}

.media-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ab-shadow-lg) !important;
}

.media-card .media-thumb {
  height: 160px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.media-card .media-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.15), transparent 60%);
}

.media-card .media-thumb i {
  font-size: 3rem;
  color: rgba(255,255,255,0.4);
  z-index: 1;
}

.media-card .media-thumb .thumb-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.20);
  border: 2px solid rgba(255,255,255,0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  z-index: 1;
}

.media-card .card-body  { padding: 1rem 1.1rem !important; }
.media-card .card-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.25rem; }
.media-card .card-footer { padding: 0.6rem 1.1rem !important; }

/* ============================================================
   FOOTER — Deep sky
   ============================================================ */
footer {
  background: linear-gradient(135deg, #0c4a6e, #0284c7) !important;
  border-top: none !important;
  padding: 2rem 0 1.25rem !important;
  margin-top: auto;
}

footer .footer-brand { color: #fff; font-weight: 800; font-size: 1.1rem; }
footer .footer-brand span { color: #7dd3fc; }
footer p, footer a { color: rgba(255,255,255,0.65) !important; font-size: 0.82rem; }
footer a:hover { color: #7dd3fc !important; text-decoration: none !important; }
footer .footer-socials a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s ease;
}
footer .footer-socials a:hover { background: rgba(255,255,255,0.22) !important; color: #fff !important; }
footer .copyright { color: rgba(255,255,255,0.45) !important; font-size: 0.78rem; }

/* ============================================================
   LOGIN PAGE — Sky Blue Split
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  background: #0284c7;
  overflow: hidden;
}

.login-left {
  flex: 1;
  background:
    linear-gradient(135deg, rgba(2,132,199,0.55) 0%, rgba(14,165,233,0.30) 55%, rgba(14,165,233,0.05) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
}

.login-left::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}

.login-left .tagline {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.login-left .tagline span { color: #7dd3fc; }

.login-left .sub-tagline {
  color: rgba(255,255,255,0.80);
  font-size: 1rem;
  max-width: 380px;
  line-height: 1.6;
}

.login-left .feature-list {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-left .feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
}

.login-left .feature-item i {
  color: #7dd3fc;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.login-right {
  width: 440px;
  min-width: 440px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  box-shadow: -20px 0 60px rgba(2,132,199,0.20);
}

.login-right .login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2rem;
}

.login-right .login-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.login-right .login-logo .logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}

.login-right .login-logo .logo-text span { color: var(--ab-sky); }

.login-right h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.login-right .welcome-sub {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.login-right .form-control { height: 48px; font-size: 0.95rem !important; }

.login-right .btn-login {
  height: 48px;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(14,165,233,0.40) !important;
  transition: all 0.2s ease !important;
  color: white !important;
  width: 100%;
}

.login-right .btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(14,165,233,0.50) !important;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state .empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--ab-sky-pale), #bae6fd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--ab-sky);
  margin: 0 auto 1.5rem;
}

.empty-state h5 { font-size: 1.1rem; color: #374151; margin-bottom: 0.5rem; }
.empty-state p  { color: #94a3b8; font-size: 0.875rem; max-width: 300px; margin: 0 auto 1.5rem; }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 1rem;
}

/* ============================================================
   UTILITY
   ============================================================ */
.shadow-card  { box-shadow: var(--ab-shadow) !important; }
.rounded-ab   { border-radius: var(--ab-radius) !important; }
.bg-sky       { background: var(--ab-sky) !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  .navbar-collapse {
    background: #ffffff;
    border-radius: var(--ab-radius);
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--ab-card-border);
    box-shadow: 0 8px 24px rgba(14,165,233,0.12);
  }

  .login-left  { display: none; }
  .login-right { width: 100%; min-width: unset; }
  .login-page  { background: #0284c7; }
}

@media (max-width: 768px) {
  .ab-page-header { padding: 1.75rem 0 1.25rem; }
  .login-right { padding: 2.5rem 1.75rem; }
  .stat-card .stat-number { font-size: 2rem; }
}

/* Force light mode everywhere */
@media (prefers-color-scheme: dark) {
  body, .card, .modal-body, .form-control, .form-select,
  .dropdown-menu, .list-group-item, .table, .alert {
    color-scheme: light !important;
  }
}

/* ============================================================
   CINEMATIC ANIMATIONS
   ============================================================ */

/* ── Page entry fade ── */
@keyframes ab-page-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
main {
  animation: ab-page-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Cartoon drone + construction site background (login) ── */
@keyframes ab-bg-drift {
  0%   { background-position: 50% 50%; }
  50%  { background-position: 52% 48%; }
  100% { background-position: 50% 50%; }
}

.login-page {
  background:
    linear-gradient(180deg, rgba(14,165,233,0.10) 0%, rgba(14,165,233,0.0) 35%, rgba(255,255,255,0.0) 100%),
    url('/static/images/login-bg-construction.png') center center / cover no-repeat,
    #bae6fd !important;
  background-attachment: scroll, scroll, scroll;
  animation: ab-bg-drift 22s ease-in-out infinite !important;
}

@media (prefers-reduced-motion: reduce) {
  .login-page { animation: none !important; }
}

/* ── Floating particles ── */
@keyframes float-up {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  8%   { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-110vh) scale(0.7); opacity: 0; }
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  animation: float-up linear infinite;
  pointer-events: none;
}

/* ── Drone rotor spin ── */
@keyframes spin-rotor {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.rotor-group {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin-rotor 0.11s linear infinite;
}
.rotor-group-r {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin-rotor 0.11s linear infinite reverse;
}

/* ── LED blinking ── */
@keyframes led-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}
.drone-led-green { animation: led-blink 1.1s ease-in-out infinite; }
.drone-led-red   { animation: led-blink 0.75s ease-in-out infinite 0.38s; }

/* ── Login shimmer button ── */
@keyframes login-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.btn-login {
  position: relative;
  overflow: hidden;
}
.btn-login::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255,255,255,0.38) 50%,
    transparent 65%
  );
  background-size: 200% 100%;
  background-position: -200% center;
  animation: none;
  transition: background-position 0s;
}
.btn-login:hover::after {
  animation: login-shimmer 0.75s linear 1;
}

/* ── Button ripple ── */
.btn { position: relative; overflow: hidden; }

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  transform: scale(0);
  animation: ripple-expand 0.65s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple-expand {
  to { transform: scale(1); opacity: 0; }
}

/* ── Status badge pulse glow ── */
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.45); }
  50%       { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
}
@keyframes pulse-blue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.45); }
  50%       { box-shadow: 0 0 0 7px rgba(59,130,246,0); }
}
@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.45); }
  50%       { box-shadow: 0 0 0 7px rgba(245,158,11,0); }
}
.status-active    { animation: pulse-green 2.6s ease infinite; }
.status-completed { animation: pulse-blue  2.6s ease infinite; }
.status-on-hold   { animation: pulse-amber 2.6s ease infinite; }

/* ── Page header shimmer sweep ── */
@keyframes header-sweep {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.ab-page-header::after {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.0)  0%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0.0) 100%
  ) !important;
  background-size: 200% 100% !important;
  animation: header-sweep 4s linear infinite !important;
  height: 2px !important;
}

/* ── Nav link underline sweep ── */
.navbar-nav .nav-link { position: relative; }
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--ab-sky);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  border-radius: 2px;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { transform: scaleX(1); }

/* ── 3-D card tilt ── */
.card-hover {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ── Drone overlay intro ── */
#drone-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Intro brand caption ── */
#intro-brand {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -120px);
  text-align: center;
  z-index: 301;
  pointer-events: none;
}

/* ── Stat card entrance will-change hint ── */
.stat-card { will-change: transform, opacity; }

/* ============================================================
   SNAG MANAGEMENT
   ============================================================ */

/* Status & priority chips */
.snag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}
.snag-chip i { font-size: 0.7rem; }

.snag-status { background: #f1f5f9; color: #475569; }
.snag-status-open        { background: #fee2e2; color: #b91c1c; }
.snag-status-in_progress { background: #fef3c7; color: #92400e; }
.snag-status-resolved    { background: #dbeafe; color: #1e40af; }
.snag-status-closed      { background: #dcfce7; color: #166534; }

.snag-priority-low      { background: #e2e8f0; color: #475569; }
.snag-priority-medium   { background: #fef3c7; color: #92400e; }
.snag-priority-high     { background: #fed7aa; color: #c2410c; }
.snag-priority-critical { background: #fecaca; color: #991b1b; }

.snag-category { background: var(--ab-sky-pale); color: var(--ab-sky-dark); }

/* Stats row */
.snag-stats .snag-stat {
  background: #fff;
  border: 1px solid var(--ab-card-border);
  border-radius: var(--ab-radius);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--ab-shadow);
  transition: transform 0.18s ease;
}
.snag-stats .snag-stat:hover { transform: translateY(-2px); }
.snag-stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1; color: #0f172a; }
.snag-stat-label { font-size: 0.78rem; color: #64748b; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.snag-stat-open       .snag-stat-label i { color: #ef4444; }
.snag-stat-inprogress .snag-stat-label i { color: #f59e0b; }
.snag-stat-resolved   .snag-stat-label i { color: #2563eb; }
.snag-stat-closed     .snag-stat-label i { color: #16a34a; }

/* Filter bar */
.snag-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.snag-filter-bar .btn-group .btn.active {
  background: var(--ab-sky);
  color: #fff;
  border-color: var(--ab-sky);
}
.snag-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 280px;
}
.snag-search-wrap i {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
}
.snag-search-wrap input { padding-left: 30px; }

/* Snag cards (project tab grid) */
.snag-card-link { color: inherit; }
.snag-card {
  background: #fff;
  border: 1px solid var(--ab-card-border);
  border-radius: var(--ab-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border-left: 4px solid #cbd5e1;
}
.snag-card:hover { transform: translateY(-3px); box-shadow: var(--ab-shadow-lg); }
.snag-card-open       { border-left-color: #ef4444; }
.snag-card-in_progress{ border-left-color: #f59e0b; }
.snag-card-resolved   { border-left-color: #2563eb; }
.snag-card-closed     { border-left-color: #16a34a; }

.snag-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
  overflow: hidden;
}
.snag-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.snag-card-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #94a3b8;
  font-size: 2.5rem;
}
.snag-card-priority {
  position: absolute;
  top: 8px;
  right: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.snag-card-body { padding: 0.85rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; }
.snag-card-title { font-size: 0.95rem; font-weight: 700; color: #0f172a; line-height: 1.3; }
.snag-card-desc { font-size: 0.82rem; color: #64748b; line-height: 1.4; margin: 0; }
.snag-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: auto;
}
.snag-card-meta i { color: #94a3b8; margin-right: 2px; }

/* ── Snag detail page ── */
.snag-detail .snag-card {
  border-left: 1px solid var(--ab-card-border);
  border-radius: var(--ab-radius);
  box-shadow: var(--ab-shadow);
  border: 1px solid var(--ab-card-border);
}

.snag-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.snag-gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  display: block;
  border: 1px solid var(--ab-card-border);
  transition: transform 0.15s ease;
}
.snag-gallery-item:hover { transform: scale(1.03); }
.snag-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.snag-gallery-video {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--ab-sky-dark);
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  font-weight: 600;
  font-size: 0.8rem;
  gap: 4px;
}
.snag-gallery-video i { font-size: 2rem; }
.snag-gps-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 0.65rem;
}

.snag-upload-form {
  padding: 0.85rem;
  background: #f8fafc;
  border: 1px dashed var(--ab-card-border);
  border-radius: var(--ab-radius-sm);
}

/* Comment thread */
.snag-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}
.snag-comment {
  border: 1px solid var(--ab-card-border);
  border-radius: var(--ab-radius-sm);
  padding: 10px 12px;
  background: #fff;
}
.snag-comment.from-client { background: #eff6ff; border-color: #bfdbfe; }
.snag-comment.from-admin  { background: #f0fdf4; border-color: #bbf7d0; }
.snag-comment-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.snag-role-badge {
  font-size: 0.65rem;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 600;
}
.snag-comment-body { font-size: 0.9rem; color: #1e293b; line-height: 1.5; }
.snag-system-msg {
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
  padding: 6px 10px;
  background: #f8fafc;
  border-radius: 999px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  align-self: center;
  margin: 0 auto;
}
.snag-system-msg .snag-status { font-size: 0.7rem; }

.snag-reply-form textarea { resize: vertical; }

/* Lifecycle timeline (sidebar) */
.snag-lifecycle {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.snag-lifecycle::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #e2e8f0;
  z-index: 0;
}
.snag-lifecycle li {
  position: relative;
  padding: 6px 0 6px 28px;
  font-size: 0.88rem;
  color: #94a3b8;
}
.snag-lifecycle .dot {
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #e2e8f0;
  z-index: 1;
}
.snag-lifecycle li.done    { color: #16a34a; }
.snag-lifecycle li.done .dot    { background: #16a34a; box-shadow: 0 0 0 1px #16a34a; }
.snag-lifecycle li.current { color: #0284c7; font-weight: 700; }
.snag-lifecycle li.current .dot {
  background: var(--ab-sky);
  box-shadow: 0 0 0 1px var(--ab-sky), 0 0 0 5px rgba(14,165,233,0.18);
}

/* Mobile tweaks */
@media (max-width: 575.98px) {
  .snag-stat-value { font-size: 1.3rem; }
  .snag-filter-bar .btn-group { width: 100%; }
  .snag-search-wrap { max-width: 100%; }
}

/* ============================================================
   SKELETON LOADERS — Pulsing grey placeholders
   ============================================================ */
@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.skeleton-block {
  background: linear-gradient(
    90deg,
    #e2e8f0 25%,
    #f1f5f9 50%,
    #e2e8f0 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--ab-radius-sm);
  display: block;
}

.skeleton-card {
  border-radius: var(--ab-radius) !important;
  border: 1px solid var(--ab-card-border) !important;
  background: #ffffff !important;
  box-shadow: var(--ab-shadow) !important;
  overflow: hidden;
  padding: 1rem;
}

.skeleton-stat-card {
  border-radius: var(--ab-radius) !important;
  background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06) !important;
  overflow: hidden;
  padding: 1.5rem;
  height: 100%;
  min-height: 130px;
  position: relative;
}

.skeleton-stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(255,255,255,0.55) 50%,
    transparent 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

/* Visibility helpers */
.skeleton-section { display: block; }
.real-section      { display: none; }
.skeleton-ready .skeleton-section { display: none !important; }
.skeleton-ready .real-section      { display: block !important; }
.skeleton-ready .real-row           { display: flex !important; }

/* Fade-in when skeletons are replaced */
@keyframes skeleton-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.skeleton-ready .real-section,
.skeleton-ready .real-row {
  animation: skeleton-reveal 0.35s ease both;
}
