/* ============================================================
   FishCount AI - Main Stylesheet
   Premium glassmorphism UI · Light/Dark themes · Responsive
   ============================================================ */

:root {
  --primary: #0ea5a4;
  --primary-2: #06b6d4;
  --primary-3: #3b82f6;
  --primary-soft: rgba(14, 165, 164, 0.12);
  --gradient: linear-gradient(135deg, var(--primary), var(--primary-2) 55%, var(--primary-3));
  --gradient-soft: linear-gradient(135deg, rgba(14,165,164,.14), rgba(59,130,246,.14));

  --bg: #f1f5f9;
  --bg-2: #e2e8f0;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --border: rgba(15, 23, 42, 0.08);
  --border-2: rgba(15, 23, 42, 0.14);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 6px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .16);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;

  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #38bdf8;
  --success-soft: rgba(34,197,94,.12);
  --danger-soft: rgba(239,68,68,.12);
  --warning-soft: rgba(245,158,11,.14);
  --info-soft: rgba(56,189,248,.14);

  --font-head: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --navbar-h: 66px;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --bg-2: #101a2e;
  --surface: rgba(30, 41, 59, .62);
  --surface-2: rgba(30, 41, 59, .88);
  --surface-solid: #16213a;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #64748b;
  --border: rgba(148, 163, 184, .12);
  --border-2: rgba(148, 163, 184, .22);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 6px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 18px 50px rgba(0,0,0,.5);
  --primary-soft: rgba(14,165,164,.2);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  background-image:
    radial-gradient(1000px 500px at 85% -5%, rgba(14,165,164,.10), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(59,130,246,.10), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  transition: background .3s ease, color .3s ease;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--text); font-weight: 600; }

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

code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: 13px; }

::selection { background: var(--primary); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .35); border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, .55); background-clip: content-box; }

/* ─── Typography utilities ─────────────────────────────────── */
.text-muted { color: var(--text-2) !important; }
.text-faint { color: var(--text-3) !important; }
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
}
.fw-500 { font-weight: 500; }
.fw-700 { font-weight: 700; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-20 { font-size: 20px; }

/* ─── Glassmorphism surfaces ───────────────────────────────── */
.glass {
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card {
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-body { padding: 22px; }
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { margin: 0; font-size: 16px; font-weight: 600; }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px; border: 1px solid transparent;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all .22s ease; text-decoration: none;
  line-height: 1.4; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient); color: #fff; box-shadow: 0 6px 18px var(--primary-soft);
}
.btn-primary:hover { color: #fff; box-shadow: 0 8px 26px rgba(14,165,164,.35); transform: translateY(-1px); }

.btn-outline {
  background: transparent; color: var(--text); border-color: var(--border-2);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: rgba(14,165,164,.22); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16a34a; color: #fff; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 12px; }

.icon-circle {
  width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px; font-size: 19px;
  background: var(--gradient-soft); color: var(--primary);
}
.icon-circle.sm { width: 36px; height: 36px; font-size: 15px; border-radius: 11px; }

/* ─── Forms ────────────────────────────────────────────────── */
.form-control, .form-select {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px var(--primary-soft);
  background: var(--surface-2);
  color: var(--text);
}
.form-control::placeholder { color: var(--text-3); }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; display: block; }
.form-text { color: var(--text-3); font-size: 12px; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.input-group-text {
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text-2);
  border-radius: 12px; border-right: 0;
}

.invalid-feedback, .form-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; }
.form-control.is-invalid { border-color: var(--danger); }

/* ─── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge-active, .badge-approved, .badge-na { background: var(--success-soft); color: var(--success); }
.badge-pending, .badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-inactive, .badge-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-expired { background: #f1f5f9; color: var(--text-2); }
.badge-trial { background: var(--info-soft); color: var(--info); }
.badge-paid { background: var(--primary-soft); color: var(--primary); }

/* ─── Tables ───────────────────────────────────────────────── */
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: 13px 14px; border-bottom-color: var(--border); color: var(--text); vertical-align: middle; }
.table thead th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
  color: var(--text-3); background: var(--surface-2); border: 0;
}
.table tbody tr { transition: background .15s; }
.table-hover tbody tr:hover { background: var(--primary-soft); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gradient); color: #fff; font-weight: 700; font-size: 14px;
  object-fit: cover; flex-shrink: 0;
}

/* ─── Navbar ───────────────────────────────────────────────── */
.navbar-app {
  position: sticky; top: 0; z-index: 1030;
  height: var(--navbar-h);
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.navbar-app .navbar-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; color: var(--text); }
.navbar-app .nav-link { color: var(--text-2); font-weight: 500; font-size: 14px; border-radius: 10px; padding: 8px 13px; }
.navbar-app .nav-link:hover, .navbar-app .nav-link.active { color: var(--primary); background: var(--primary-soft); }

.brand-logo {
  width: 40px; height: 40px; border-radius: 12px; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gradient); color: #fff; font-size: 20px;
}

.dropdown-menu {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
}
.dropdown-item { border-radius: 9px; padding: 9px 13px; font-size: 14px; color: var(--text); }
.dropdown-item:hover { background: var(--primary-soft); color: var(--primary); }
.dropdown-divider { border-color: var(--border); }

.search-box { position: relative; width: 260px; }
.search-box i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 14px; }
.search-box input { padding-left: 36px; }

/* ─── Bottom navigation (mobile) ───────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1020;
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 600; color: var(--text-3); padding: 6px 10px; border-radius: 12px; flex: 1;
}
.bottom-nav a i { font-size: 19px; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active i { transform: translateY(-2px); }
.bottom-nav a.active span { color: var(--primary); }

/* ─── Admin sidebar ────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: 264px; z-index: 1040;
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex; flex-direction: column;
  transition: transform .3s ease;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--text); }
.sidebar .nav-link {
  display: flex; align-items: center; gap: 12px; color: var(--text-2);
  padding: 11px 13px; border-radius: 12px; font-weight: 500; font-size: 14px; margin-bottom: 3px;
}
.sidebar .nav-link i { width: 20px; text-align: center; font-size: 16px; }
.sidebar .nav-link:hover { color: var(--primary); background: var(--primary-soft); }
.sidebar .nav-link.active { color: #fff; background: var(--gradient); box-shadow: 0 8px 20px var(--primary-soft); }
.sidebar .section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 14px 13px 6px; font-weight: 700; }
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1035;
  backdrop-filter: blur(2px); display: none;
}

.main-content { margin-left: 264px; padding: 26px 30px 90px; }
.admin-topbar {
  position: sticky; top: 0; z-index: 1020;
  background: var(--surface); backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  height: var(--navbar-h); display: flex; align-items: center; gap: 16px; padding: 0 24px;
}

/* ─── Dashboard widgets ────────────────────────────────────── */
.stat-card {
  position: relative; overflow: hidden;
  padding: 20px 22px; display: flex; align-items: center; gap: 16px;
}
.stat-card .stat-icon {
  width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 23px; color: #fff;
}
.stat-card .stat-value { font-size: 26px; font-weight: 700; line-height: 1.1; font-family: var(--font-head); }
.stat-card .stat-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.stat-card::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px;
  border-radius: 50%; background: radial-gradient(circle, var(--primary-soft), transparent 70%);
}
.stat-card .stat-trend { font-size: 12px; color: var(--success); font-weight: 600; }

.grad-a { background: linear-gradient(135deg,#0ea5a4,#06b6d4); }
.grad-b { background: linear-gradient(135deg,#3b82f6,#6366f1); }
.grad-c { background: linear-gradient(135deg,#f59e0b,#f97316); }
.grad-d { background: linear-gradient(135deg,#ef4444,#ec4899); }
.grad-e { background: linear-gradient(135deg,#10b981,#22d3ee); }
.grad-f { background: linear-gradient(135deg,#8b5cf6,#d946ef); }

/* ─── Quick action tiles ───────────────────────────────────── */
.quick-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 22px 12px; text-align: center; color: var(--text); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  transition: all .25s ease; position: relative; overflow: hidden;
}
.quick-tile i { font-size: 28px; color: var(--primary); transition: transform .25s; }
.quick-tile span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.quick-tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); color: var(--text); border-color: rgba(14,165,164,.3); }
.quick-tile:hover i { transform: scale(1.18); }
.quick-tile::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--gradient); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.quick-tile:hover::before { transform: scaleX(1); }

/* ─── Skeleton loaders ─────────────────────────────────────── */
.skeleton {
  position: relative; overflow: hidden; background: var(--surface-2); border-radius: 10px;
}
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(148,163,184,.18), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ─── Toasts ───────────────────────────────────────────────── */
.toast-stack { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.fc-toast {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); animation: toastIn .35s cubic-bezier(.2,.9,.3,1.2);
  font-size: 14px; color: var(--text);
}
.fc-toast.hide { animation: toastOut .3s ease forwards; }
.fc-toast i { font-size: 18px; margin-top: 2px; }
.fc-toast .toast-title { font-weight: 700; font-size: 13.5px; }
.fc-toast .toast-msg { color: var(--text-2); font-size: 13px; }
.toast-success i { color: var(--success); }
.toast-error i { color: var(--danger); }
.toast-warning i { color: var(--warning); }
.toast-info i { color: var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(.9); } }

/* ─── Alerts ───────────────────────────────────────────────── */
.alert { border-radius: 14px; border: 0; font-size: 14px; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-info { background: var(--info-soft); color: var(--info); }

/* ─── Auth pages ───────────────────────────────────────────── */
.auth-body {
  background: linear-gradient(135deg, #082f49 0%, #042f2e 45%, #0c4a6e 100%);
  min-height: 100vh; display: flex;
  padding: 24px; position: relative; overflow-x: hidden; overflow-y: auto;
}
.auth-body::before, .auth-body::after {
  content: ''; position: fixed; border-radius: 50%; filter: blur(90px); opacity: .5;
}
.auth-body::before { width: 460px; height: 460px; background: #06b6d4; top: -140px; left: -120px; animation: floatBlob 9s ease-in-out infinite; }
.auth-body::after { width: 420px; height: 420px; background: #3b82f6; bottom: -140px; right: -120px; animation: floatBlob 11s ease-in-out infinite reverse; }

.auth-card {
  position: relative; z-index: 2; width: 100%; max-width: 460px; margin: auto;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  padding: 36px 34px;
  color: #e2e8f0;
  animation: fadeUp .6s ease both;
}
.auth-card.wide { max-width: 600px; }
.auth-card h1, .auth-card h2, .auth-card .form-label { color: #f1f5f9; }
.auth-card .form-label { color: rgba(241,245,249,.85); }
.auth-card .form-control {
  background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); color: #f1f5f9;
}
.auth-card .form-control:focus { background: rgba(255,255,255,.14); border-color: #22d3ee; box-shadow: 0 0 0 4px rgba(34,211,238,.18); color: #fff; }
.auth-card .form-control::placeholder { color: rgba(226,232,240,.45); }
.auth-card .btn-primary { background: linear-gradient(135deg,#22d3ee,#3b82f6); color: #fff; }
.auth-card .text-muted { color: rgba(226,232,240,.7) !important; }
.auth-card .form-check-label, .auth-card a { color: rgba(226,232,240,.85); }
.auth-card a:hover { color: #22d3ee; }
.auth-card .input-group-text { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); border-right: 0; color: rgba(226,232,240,.8); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; }
.auth-brand .brand-logo { width: 54px; height: 54px; font-size: 26px; border-radius: 16px; }
.auth-brand .brand-name { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: #fff; letter-spacing: -.02em; }

/* ─── Password strength ────────────────────────────────────── */
.pw-meter { display: flex; gap: 6px; margin-top: 9px; }
.pw-meter div { flex: 1; height: 5px; border-radius: 99px; background: rgba(255,255,255,.16); transition: background .3s; }
.pw-label { font-size: 12px; font-weight: 600; margin-top: 6px; }

/* ─── Camera page ──────────────────────────────────────────── */
.camera-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); }
.camera-wrap video { width: 100%; height: auto; display: block; max-height: 62vh; object-fit: cover; }
.camera-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.camera-overlay { position: absolute; inset: 0; pointer-events: none; }
.count-display {
  position: absolute; top: 16px; left: 16px; z-index: 5;
  background: rgba(0,0,0,.55); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2); border-radius: 16px;
  color: #fff; padding: 12px 18px; text-align: center; min-width: 110px;
}
.count-display .num { font-size: 32px; font-weight: 800; font-family: var(--font-head); line-height: 1; }
.count-display .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.cam-timer { position: absolute; top: 16px; right: 16px; z-index: 5; background: rgba(0,0,0,.5); color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2); }

.cam-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.cam-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.cam-status .dot { width: 8px; height: 8px; border-radius: 50%; animation: pulseDot 1.2s infinite; }
.cam-status.live { background: var(--success-soft); color: var(--success); }
.cam-status.live .dot { background: var(--success); }
.cam-status.stopped { background: var(--danger-soft); color: var(--danger); }
.cam-status.stopped .dot { background: var(--danger); animation: none; }
.cam-status.standby { background: var(--info-soft); color: var(--info); }
.cam-status.standby .dot { background: var(--info); animation: none; }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.zoom-range { width: 180px; }

.detection-badge {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.6); backdrop-filter: blur(10px); color: #fff;
  padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.detection-badge .engine { color: #6ee7b7; }

/* ─── Floating calculator ──────────────────────────────────── */
.fab {
  position: fixed; right: 20px; bottom: 84px; z-index: 1045;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gradient); color: #fff; font-size: 24px;
  box-shadow: 0 12px 30px var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.fab:hover { transform: scale(1.08); }
@media (min-width: 992px) { .fab { bottom: 24px; } }

.calc-pop {
  position: fixed; right: 20px; bottom: 154px; z-index: 1050; width: 300px;
  background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden;
  display: none;
}
.calc-pop.open { display: block; animation: calcIn .3s cubic-bezier(.2,.9,.3,1.15); }
@keyframes calcIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
.calc-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--gradient); color: #fff; }
.calc-head .calc-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.calc-head button { background: transparent; border: 0; color: #fff; font-size: 15px; cursor: pointer; padding: 3px 7px; border-radius: 8px; }
.calc-head button:hover { background: rgba(255,255,255,.2); }
.calc-screen { padding: 16px; background: var(--bg); text-align: right; font-family: var(--font-head); }
.calc-screen .expr { font-size: 13px; color: var(--text-3); min-height: 20px; word-break: break-all; }
.calc-screen .result { font-size: 32px; font-weight: 700; color: var(--text); }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; padding: 14px; }
.calc-key {
  height: 48px; border: 0; border-radius: 13px; font-size: 17px; font-weight: 600; cursor: pointer;
  background: var(--surface-2); color: var(--text); transition: all .15s;
}
.calc-key:hover { background: var(--primary-soft); color: var(--primary); }
.calc-key.op { background: var(--primary-soft); color: var(--primary); font-size: 19px; }
.calc-key.equals { background: var(--gradient); color: #fff; }
.calc-key.clear { background: var(--danger-soft); color: var(--danger); }
.calc-key:active { transform: scale(.94); }

/* ─── Modals ───────────────────────────────────────────────── */
.modal-content {
  background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: 22px; box-shadow: var(--shadow-lg); color: var(--text);
}
.modal-header { border-bottom-color: var(--border); padding: 18px 22px; }
.modal-body { padding: 22px; }
.modal-footer { border-top-color: var(--border); padding: 14px 22px; }

/* ─── Misc ─────────────────────────────────────────────────── */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; }
.page-head .sub { color: var(--text-2); font-size: 13px; margin: 2px 0 0; }

.recent-item { display: flex; align-items: center; gap: 13px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.recent-item:last-child { border-bottom: 0; }
.recent-item .meta { font-size: 12px; color: var(--text-3); }

.list-group-item { background: var(--surface); border-color: var(--border); color: var(--text); }
.list-group-item-action:hover { background: var(--primary-soft); color: var(--text); }

.nav-tabs { border-bottom-color: var(--border); }
.nav-tabs .nav-link { color: var(--text-2); border: 0; border-radius: 10px; font-weight: 600; font-size: 14px; padding: 9px 16px; }
.nav-tabs .nav-link.active { color: var(--primary); background: var(--primary-soft); }
.tab-content { padding-top: 18px; }

.report-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.report-preview { background: var(--surface-2); border: 1px dashed var(--border-2); border-radius: var(--radius); padding: 22px; }

.gallery-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; cursor: zoom-in; transition: transform .2s; }
.gallery-img:hover { transform: scale(1.03); }

.empty-state { text-align: center; padding: 46px 20px; color: var(--text-3); }
.empty-state i { font-size: 54px; opacity: .5; display: block; margin-bottom: 14px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes floatBlob { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-30px) scale(1.08); } }
@keyframes floatFish { 0% { transform: translateX(-10%) translateY(0); } 50% { transform: translateX(10%) translateY(-14px); } 100% { transform: translateX(-10%) translateY(0); } }

.fade-up { animation: fadeUp .5s ease both; }
.delay-1 { animation-delay: .06s; }
.delay-2 { animation-delay: .12s; }
.delay-3 { animation-delay: .18s; }
.delay-4 { animation-delay: .24s; }

.chart-box { position: relative; height: 300px; }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .main-content { margin-left: 0; padding: 20px 16px 100px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; }
  .search-box { width: 150px; }
  .desktop-only { display: none !important; }
  .mobile-bottom-pad { padding-bottom: 78px; }
}
@media (min-width: 992px) {
  .mobile-only { display: none !important; }
}

/* ─── Print ────────────────────────────────────────────────── */
@media print {
  .navbar-app, .bottom-nav, .sidebar, .admin-topbar, .fab, .btn-print, .toast-stack { display: none !important; }
  .main-content { margin: 0; padding: 0; }
  .card, .glass { box-shadow: none; background: #fff; border: 1px solid #ddd; }
  body { background: #fff; }
}

/* ─── Registration pay box ─────────────────────────────────── */
.pay-box {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  padding: 18px;
}
