/* ============================================
   DUA — Admin Console
   Espresso-led admin authority on caramel/cream
   ============================================ */

:root {
  --bleu: #BE8848;
  --bleu-700: #8A6234;
  --bleu-500: #CFA67D;
  --bleu-bg: #F5ECE2;
  --bleu-grad: linear-gradient(135deg, #BE8848 0%, #8A6234 100%);
  --bleu-grad-soft: linear-gradient(135deg, #FFFCF5 0%, #F5ECE2 100%);

  --espresso: #1A1410;
  --admin-grad: linear-gradient(135deg, #BE8848 0%, #8A6234 100%);
  --admin-grad-warm: linear-gradient(135deg, #BE8848 0%, #8A6234 100%);

  --green: #16A34A;
  --green-bg: #DCFCE7;
  --green-grad: linear-gradient(135deg, #16A34A 0%, #22C55E 100%);
  --whatsapp: #25D366;
  --red: #DC2626;
  --red-bg: #FEE2E2;
  --amber: #F59E0B;
  --amber-bg: #FEF3C7;
  --violet: #7C3AED;
  --violet-bg: #F3E8FF;
  --teal: #14B8A6;
  --teal-bg: #CCFBF1;

  --ink-900: #1A1410;
  --ink-700: #3D2F22;
  --ink-500: #786458;
  --ink-400: #A89580;
  --ink-300: #D8C9B8;

  --cream: #FBF6EE;
  --card-cream: #FFFCF5;
  --bg: #FBF6EE;
  --bg-soft: #F5ECE2;
  --bg-input: #F1E8DA;
  --line: #E5D8C5;
  --line-soft: #F1E8DA;

  --shadow-card: 0 1px 2px rgba(26,20,16,0.04), 0 4px 18px rgba(138,98,52,0.06);
  --shadow-strong: 0 12px 28px rgba(26,20,16,0.10);
  --shadow-bleu: 0 12px 26px rgba(138,98,52,0.28);
  --shadow-green: 0 10px 22px rgba(22,163,74,0.24);
  --shadow-admin: 0 16px 34px rgba(26,20,16,0.30);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
}

.mobile-frame { background: var(--cream); }
html.in-iframe, html.in-iframe body, body.in-iframe { background: var(--cream) !important; }

.screen-content > * { flex-shrink: 0; }

button {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cormorant {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; font-style: italic;
  letter-spacing: 0.2px;
}

/* Status / App bar */
.bleu-status {
  height: 44px; padding: 14px 24px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 600; color: var(--ink-900);
  flex-shrink: 0;
}
.bleu-status .icons { display: flex; gap: 6px; font-size: 12px; }

.bleu-appbar {
  padding: 6px 18px 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.bleu-appbar .ab-back {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--card-cream);
  border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-700);
}
.bleu-appbar .ab-title {
  flex: 1; text-align: center;
  font-size: 16px; font-weight: 700;
  color: var(--ink-900);
}
.bleu-appbar .ab-spacer { width: 38px; }

/* Premium head block */
.head-block { padding: 12px 22px 6px; }
.head-eyebrow {
  font-size: 10.5px; font-weight: 700;
  color: var(--bleu); letter-spacing: 2.4px;
}
.head-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px; font-weight: 600; font-style: italic;
  color: var(--ink-900); line-height: 1.06; margin-top: 4px;
}
.head-sub {
  font-size: 12.5px; color: var(--ink-500);
  margin-top: 6px; line-height: 1.5;
}

/* Primary CTA */
.bleu-cta {
  width: 100%;
  background: var(--bleu-grad); color: var(--cream);
  border: none; padding: 15px 20px; border-radius: 14px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 14.5px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--shadow-bleu);
}
.bleu-cta.green { background: var(--green-grad); box-shadow: var(--shadow-green); }
.bleu-cta.dark { background: var(--bleu); color: var(--cream); box-shadow: var(--shadow-bleu); }
.bleu-cta.outline {
  background: var(--card-cream); color: var(--bleu);
  border: 1.5px solid var(--bleu); box-shadow: none;
}
.bleu-cta.danger { background: var(--red); color: white; box-shadow: 0 10px 22px rgba(220,38,38,0.28); }

/* Admin hero — espresso for authority */
.admin-hero {
  background:
    radial-gradient(ellipse 260px 160px at 88% 12%, rgba(190,136,72,0.30), transparent 70%),
    var(--bleu-grad);
  border-radius: 22px;
  padding: 20px 22px;
  color: var(--cream);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-bleu);
}
.admin-hero::after {
  content: '';
  position: absolute; right: -40px; bottom: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(190,136,72,0.18), transparent 70%);
  border-radius: 50%;
}
.admin-hero-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 1.8px;
  color: var(--bleu-500);
  position: relative; z-index: 2;
}
.admin-hero-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px; font-weight: 600; font-style: italic;
  margin-top: 4px; line-height: 1.05;
  position: relative; z-index: 2;
}
.admin-hero-row {
  display: flex; justify-content: space-between; align-items: center;
  position: relative; z-index: 2;
}
.admin-hero-chip {
  background: rgba(190,136,72,0.30);
  border: 1px solid rgba(190,136,72,0.45);
  color: var(--cream);
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.2px;
  padding: 5px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}

/* Caramel hero (lighter alternative) */
.hero-card {
  background:
    radial-gradient(ellipse 240px 150px at 88% 12%, rgba(255,255,255,0.18), transparent 70%),
    var(--bleu-grad);
  border-radius: 22px;
  padding: 20px 22px;
  color: var(--cream);
  position: relative; overflow: hidden;
  box-shadow: 0 16px 34px rgba(138,98,52,0.28);
}
.hero-card::after {
  content: '';
  position: absolute; right: -40px; bottom: -50px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.10), transparent 70%);
  border-radius: 50%;
}
.hero-card-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 1.8px;
  opacity: 0.85;
  position: relative; z-index: 2;
}
.hero-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px; font-weight: 600; font-style: italic;
  margin-top: 4px; line-height: 1.05;
  position: relative; z-index: 2;
}
.hero-card-row {
  display: flex; justify-content: space-between; align-items: center;
  position: relative; z-index: 2;
}
.hero-card-chip {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.2px;
  padding: 5px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}

/* Form */
.input-block { margin-bottom: 14px; }
.input-block .lbl {
  font-size: 10.5px; color: var(--ink-500);
  margin-bottom: 6px; margin-left: 4px;
  font-weight: 600; letter-spacing: 0.4px;
  text-transform: uppercase;
}
.input-bleu {
  width: 100%; padding: 14px 16px;
  background: var(--bg-input);
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px; font-weight: 500;
  color: var(--ink-900);
  outline: none;
}
.input-bleu:focus { background: var(--card-cream); border-color: var(--bleu); }
.input-bleu::placeholder { color: var(--ink-400); font-weight: 400; }

/* OTP */
.otp-row {
  display: flex; justify-content: center; gap: 10px;
  margin: 24px 0 14px;
}
.otp-box {
  width: 46px; height: 54px;
  background: var(--card-cream);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  text-align: center;
  font-size: 22px; font-weight: 700;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  color: var(--ink-900);
}
.otp-box.filled { border-color: var(--bleu); background: var(--bleu-bg); color: var(--bleu); }

/* Search */
.search-box {
  background: var(--card-cream); border: 1px solid var(--line);
  padding: 11px 14px; border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
}
.search-box i { color: var(--ink-400); font-size: 13px; }
.search-box input {
  flex: 1; border: none; outline: none;
  background: transparent; font-family: 'Poppins'; font-size: 13px;
  color: var(--ink-900);
}
.search-box input::placeholder { color: var(--ink-400); }

/* Bottom nav */
.bleu-nav {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--card-cream);
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-around;
  padding: 8px 4px 22px;
  z-index: 20;
}
.bleu-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none;
  color: var(--ink-400);
  font-size: 9.5px; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  flex: 1; padding: 4px 2px; cursor: pointer;
}
.bleu-nav-item i { font-size: 17px; }
.bleu-nav-item.active { color: var(--bleu); }
.bleu-nav-item.active i { transform: translateY(-1px); }

/* ============================================
   Admin-specific
   ============================================ */

/* Admin badge */
.admin-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bleu); color: var(--cream);
  padding: 4px 10px; border-radius: 6px;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.6px; text-transform: uppercase;
}

/* Section header */
.sec-h {
  padding: 8px 18px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.sec-h h3 {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px; font-weight: 600; font-style: italic;
  color: var(--ink-900);
  letter-spacing: 0.2px;
}
.sec-h h3.terse {
  font-family: 'Poppins', sans-serif;
  font-size: 13px; font-weight: 800; font-style: normal;
  color: var(--ink-900); letter-spacing: -0.2px;
}
.sec-h a { font-size: 11px; color: var(--bleu); font-weight: 700; }

/* Stat tile */
.stat-tile {
  background: var(--card-cream); border: 1px solid var(--line-soft);
  border-radius: 14px; padding: 12px;
}
.stat-tile .st-lbl {
  font-size: 10px; font-weight: 700; color: var(--ink-500);
  text-transform: uppercase; letter-spacing: 0.6px;
}
.stat-tile .st-val {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px; font-weight: 600; font-style: italic;
  color: var(--ink-900);
  margin-top: 4px; line-height: 1.1;
}
.stat-tile .st-delta {
  font-size: 10px; font-weight: 700;
  margin-top: 4px;
  display: inline-flex; align-items: center; gap: 3px;
}
.stat-tile .st-delta.up { color: var(--green); }
.stat-tile .st-delta.down { color: var(--red); }

/* Status pills */
.s-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 800;
  padding: 4px 8px; border-radius: 999px;
  letter-spacing: 0.4px; text-transform: uppercase;
}
.s-pill.ok { background: var(--green-bg); color: var(--green); }
.s-pill.warn { background: var(--amber-bg); color: #B45309; }
.s-pill.low { background: var(--red-bg); color: var(--red); }
.s-pill.info { background: var(--bleu-bg); color: var(--bleu); }
.s-pill.violet { background: var(--violet-bg); color: var(--violet); }
.s-pill.live { background: var(--bleu); color: var(--cream); }
.s-pill.dark { background: var(--bleu); color: var(--cream); }

/* Tab pills */
.tab-pills {
  display: flex; gap: 6px;
  overflow-x: auto; overflow-y: visible;
  padding: 6px 0;
}
.tab-pills::-webkit-scrollbar { display: none; }
.tab-pills button {
  flex-shrink: 0; padding: 0 14px;
  background: var(--card-cream); color: var(--ink-700);
  border: 1px solid var(--line); border-radius: 999px;
  font-family: 'Poppins'; font-size: 12px; font-weight: 600;
  height: 32px; line-height: 1;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer;
}
.tab-pills button.on {
  background: var(--bleu); color: var(--cream); border-color: var(--bleu);
  box-shadow: 0 6px 14px rgba(138,98,52,0.25); font-weight: 700;
}
.tab-pills button .count {
  background: rgba(0,0,0,0.10); padding: 1px 6px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
}
.tab-pills button.on .count { background: rgba(255,252,245,0.20); }

/* Data row */
.data-row {
  background: var(--card-cream); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px;
}
.data-row .dr-head { display: flex; align-items: center; gap: 10px; }

/* Step bar */
.step-bar { display: flex; gap: 6px; padding: 6px 0 14px; }
.step-bar > div { flex: 1; height: 4px; border-radius: 999px; background: var(--line); }
.step-bar > div.done { background: var(--green); }
.step-bar > div.active { background: var(--bleu); }

/* Map mock */
.map-bg {
  background:
    linear-gradient(135deg, #F5ECE2 0%, #EDD9BD 60%, #E5C9A0 100%);
  background-image:
    linear-gradient(rgba(255,252,245,0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,252,245,0.45) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* Greeting hero — espresso */
.greet-hero {
  margin: 0 18px 14px;
  background:
    radial-gradient(ellipse 260px 160px at 88% 12%, rgba(190,136,72,0.30), transparent 70%),
    var(--bleu-grad);
  color: var(--cream);
  border-radius: 22px;
  padding: 20px 22px;
  box-shadow: var(--shadow-bleu);
  position: relative; overflow: hidden;
}
.greet-hero::after {
  content: '';
  position: absolute;
  right: -40px; bottom: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(190,136,72,0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* CTA bar */
.cta-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--card-cream);
  border-top: 1px solid var(--line-soft);
  padding: 12px 22px 22px;
  z-index: 10;
  box-shadow: 0 -6px 18px rgba(20,12,4,0.06);
}

/* Avatar circle */
.avatar-circle {
  width: 44px; height: 44px;
  background: var(--bleu-grad);
  color: var(--cream);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px; font-weight: 600; font-style: italic;
  flex-shrink: 0;
}
.avatar-circle.dark { background: var(--bleu); color: var(--cream); }
