/* =========================================================
   admin/admin.css — Mombasa Mall Control Centre Dashboard
   Pure White Sidebar + Deep Solid Black Typography
   Full Window Smooth Scrolling Architecture
   Fluid Responsive Layout & Screen Word-Fitting System
   ========================================================= */

/* ── GOOGLE FONTS ───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=DM+Sans:wght@400;500;600;700;800;900&display=swap');

/* ── DESIGN TOKENS ───────────────────────────────────────── */
:root {
  /* Brand Accent Colors */
  --coral:           #FF6B47;
  --coral-hover:     #ff4d24;
  --coral-light:     rgba(255, 107, 71, 0.12);
  --coral-glow:      rgba(255, 107, 71, 0.35);
  --gold:            #F59E0B;
  --gold-light:      rgba(245, 158, 11, 0.12);
  --green:           #10B981;
  --green-light:     rgba(16, 185, 129, 0.12);
  --red:             #EF4444;
  --blue:            #3B82F6;
  --blue-light:      rgba(59, 130, 246, 0.12);
  --purple:          #8B5CF6;
  --amber:           #F59E0B;

  /* Sidebar Tokens (Pure White Background + Deep Solid Black Text) */
  --sidebar-bg:            #FFFFFF;
  --sidebar-border:        #E2E8F0;
  --sidebar-hover:         #F1F5F9;
  --sidebar-active-bg:     #000000;
  --sidebar-active-text:   #FFFFFF;
  --sidebar-text:          #000000;
  --sidebar-text-hi:       #000000;
  --sidebar-label:         #000000;

  /* Main Workspace Area */
  --admin-bg:            #F8FAFC;
  --admin-card:          #FFFFFF;
  --admin-border:        #E2E8F0;
  --admin-border-subtle: #F1F5F9;
  --admin-border-focus:  rgba(255, 107, 71, 0.4);
  --admin-text:          #0F172A;
  --admin-text-muted:    #475569;
  --admin-text-light:    #64748B;

  --sidebar-w:  264px;
  --topbar-h:   68px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.18);

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET & UNIVERSAL WORD-FITTING ─────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow-wrap: break-word;
}

/* ── MASTER WINDOW SCROLL ARCHITECTURE ───────────────────── */
/* html owns the master scroll container; body never traps it */
html, html:root {
  height: 100% !important;
  min-height: 100% !important;
  overflow-y: scroll !important; /* Always show scrollbar to prevent layout shift */
  overflow-x: hidden !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch;
}

body.admin-body {
  min-height: 100vh !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--admin-bg) !important;
  color: var(--admin-text) !important;
  font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  display: block !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
  position: relative !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ════════════════════════════════════════════════════════
   SIDEBAR (PURE WHITE BACKGROUND · DEEP SOLID BLACK TEXT)
   ════════════════════════════════════════════════════════ */
.admin-sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh;
  background: #FFFFFF !important;
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 500;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  transition: width var(--transition), transform var(--transition);
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.04);
}

.admin-sidebar::-webkit-scrollbar { width: 5px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }

/* ── SIDEBAR HEADER ─────────────────────────────────────── */
.admin-sidebar-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--topbar-h);
  flex-shrink: 0;
  border-bottom: 1px solid #F1F5F9;
  background: #FFFFFF !important;
  position: relative;
}

.admin-sidebar-header img {
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-label {
  font-size: 15px;
  font-weight: 900;
  color: #000000 !important;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

.sidebar-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: #15803D !important;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-top: 3px;
}

.status-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16A34A;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.7);
  flex-shrink: 0;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.25); opacity: 0.7; }
}

.sidebar-close-btn {
  display: none;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #000000;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  margin-left: auto;
  transition: all var(--transition);
}

.sidebar-close-btn:hover {
  background: #E2E8F0;
  color: #000000;
}

/* ── SIDEBAR NAV (DEEP SOLID BLACK TYPOGRAPHY) ──────────── */
.admin-nav {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #000000 !important;
  padding: 16px 12px 6px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0.85;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #000000 !important;
  font-size: 13.5px;
  font-weight: 700;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}

.admin-nav-item:hover {
  background: #F1F5F9;
  color: #000000 !important;
}

.admin-nav-item .nav-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000000 !important;
  transition: all var(--transition);
  opacity: 0.85;
}

.admin-nav-item:hover .nav-icon {
  opacity: 1;
  color: #000000 !important;
}

.admin-nav-item .nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.admin-nav-item .nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000000 !important;
}

/* Active Nav Item: Bold Black Pill with Crisp White Text */
.admin-nav-item.is-active {
  background: #000000 !important;
  color: #FFFFFF !important;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  border-color: transparent;
}

.admin-nav-item.is-active .nav-icon {
  opacity: 1;
  color: #FFFFFF !important;
}

.admin-nav-item.is-active .nav-label {
  color: #FFFFFF !important;
}

.admin-nav-item.is-active .nav-count {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
  border-color: transparent;
}

/* Nav Item Counter Badge */
.nav-count {
  margin-left: auto;
  background: #F1F5F9;
  color: #000000 !important;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  transition: all var(--transition);
  border: 1px solid #CBD5E1;
}

/* ── SIDEBAR FOOTER ─────────────────────────────────────── */
.admin-sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: #F8FAFC;
}

.sidebar-user-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #FFFFFF;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.admin-user-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.admin-user-email {
  font-size: 12.5px;
  font-weight: 800;
  color: #000000 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-role {
  font-size: 10.5px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.sidebar-action-row {
  display: flex;
  gap: 8px;
}

.btn-sidebar-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #000000 !important;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-sidebar-secondary:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #000000 !important;
}

/* ════════════════════════════════════════════════════════
   MAIN WORKSPACE AREA (FULL VERTICAL SCROLLING)
   ════════════════════════════════════════════════════════ */
.admin-main {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  min-height: 100vh;
  height: auto !important;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition), width var(--transition);
  background: var(--admin-bg);
  overflow-y: visible !important;
  overflow-x: hidden !important;
}

/* ── TOPBAR ─────────────────────────────────────────────── */
.admin-topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
  box-shadow: 0 1px 0 var(--admin-border), 0 4px 16px rgba(0,0,0,0.03);
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.sidebar-toggle-btn {
  display: none;
  background: #F1F5F9;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  color: var(--admin-text);
  width: 38px;
  height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.sidebar-toggle-btn:hover { background: #E2E8F0; }
.sidebar-toggle-btn svg { display: block; }

.admin-topbar-title {
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 900;
  color: #000000;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── CONTENT CONTAINER (PLENTY OF BOTTOM PADDING FOR FULL SCROLL) ── */
.admin-content {
  padding: 28px 32px 100px;
  flex: 1 0 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: auto !important;
  overflow-y: visible !important;
}

/* ── TAB PANELS ─────────────────────────────────────────── */
.tab-panel {
  display: none;
  animation: fadeTabIn 0.22s ease;
  height: auto !important;
  overflow-y: visible !important;
}

.tab-panel.is-active {
  display: block !important;
  height: auto !important;
}

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

/* ── SECTION HEADING ────────────────────────────────────── */
.section-heading {
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 900;
  color: #000000;
  letter-spacing: -0.02em;
  word-break: break-word;
}

/* ════════════════════════════════════════════════════════
   METRICS GRID
   ════════════════════════════════════════════════════════ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.metric-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: 0.06;
  transition: opacity 0.2s;
}

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

.metric-card:hover::before { opacity: 0.12; }

.metric-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.metric-card.accent-coral::before { background: var(--coral); }
.metric-card.accent-coral::after  { background: linear-gradient(180deg, var(--coral), #FF9B85); }

.metric-card.accent-blue::before  { background: var(--blue); }
.metric-card.accent-blue::after   { background: linear-gradient(180deg, var(--blue), #93C5FD); }

.metric-card.accent-green::before { background: var(--green); }
.metric-card.accent-green::after  { background: linear-gradient(180deg, var(--green), #6EE7B7); }

.metric-card.accent-gold::before  { background: var(--gold); }
.metric-card.accent-gold::after   { background: linear-gradient(180deg, var(--gold), #FCD34D); }

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  transition: transform 0.2s ease;
}

.metric-card:hover .metric-icon { transform: scale(1.08); }

.metric-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-card.accent-coral .metric-icon { background: rgba(255,107,71,0.1);  color: var(--coral); }
.metric-card.accent-blue  .metric-icon { background: rgba(59,130,246,0.1);  color: var(--blue);  }
.metric-card.accent-green .metric-icon { background: rgba(16,185,129,0.1);  color: var(--green); }
.metric-card.accent-gold  .metric-icon { background: rgba(245,158,11,0.1);  color: var(--gold);  }

.metric-title {
  font-size: 11px;
  color: var(--admin-text-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  word-break: break-word;
}

.metric-value {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 900;
  color: #000000;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.metric-foot {
  font-size: 11.5px;
  color: var(--admin-text-light);
  margin-top: 2px;
  word-break: break-word;
}

/* ════════════════════════════════════════════════════════
   QUICK ACTIONS
   ════════════════════════════════════════════════════════ */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  color: #000000;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  width: 100%;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  font-family: inherit;
  line-height: 1.35;
  word-break: break-word;
}

.quick-action-btn:hover {
  background: #FFF7F5;
  border-color: rgba(255,107,71,0.4);
  color: var(--coral);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,71,0.12);
}

.quick-action-btn .qa-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-action-btn .qa-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* ════════════════════════════════════════════════════════
   SYNC / SEEDER CARDS
   ════════════════════════════════════════════════════════ */
.seeder-card {
  padding: 24px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #FFFAF7, #FFFDFB);
  border: 1px solid #FDE8DB;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.seeder-card h3 {
  font-size: 15px;
  margin: 0 0 6px;
  color: #000000;
  font-weight: 800;
  word-break: break-word;
}

.seeder-card p {
  font-size: 13px;
  color: var(--admin-text-muted);
  margin: 0 0 18px;
  line-height: 1.65;
  max-width: 720px;
  word-break: break-word;
}

.sync-hub-card {
  background: linear-gradient(135deg, #FFFAF7 0%, #FFF8F5 50%, #FFFDFB 100%);
  border: 1px solid rgba(255,107,71,0.18);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(255,107,71,0.06);
}

.sync-hub-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sync-hub-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  padding: 16px 20px;
  background: rgba(255,107,71,0.03);
  border-top: 1px solid rgba(255,107,71,0.1);
}

/* ════════════════════════════════════════════════════════
   SECTION TOOLBAR
   ════════════════════════════════════════════════════════ */
.section-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.toolbar-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  align-items: center;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

.search-input-wrap::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center/contain;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  padding: 9px 14px 9px 36px;
  font-size: 13.5px;
  color: var(--admin-text);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-xs);
}

.search-input::placeholder { color: var(--admin-text-light); }

.search-input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-light);
}

.filter-select {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--admin-text);
  outline: none;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}

.filter-select:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-light);
}

.filter-select option { background: #FFFFFF; color: var(--admin-text); }

/* ════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════ */
.btn-primary {
  background: linear-gradient(135deg, var(--coral) 0%, #FF4B2B 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255,107,71,0.3);
  font-family: inherit;
  letter-spacing: -0.01em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,107,71,0.4);
}

.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(255,107,71,0.3); }

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--admin-card);
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  font-family: inherit;
}

.btn-secondary:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  box-shadow: var(--shadow-sm);
  color: var(--admin-text);
}

.btn-cancel {
  background: var(--admin-card);
  color: var(--admin-text-muted);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.btn-cancel:hover {
  background: #F1F5F9;
  color: var(--admin-text);
}

.btn-danger {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECDD3;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.btn-danger:hover {
  background: #FEE2E2;
  color: #B91C1C;
}

.btn-success-sm {
  background: rgba(16,185,129,0.08);
  color: #059669;
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-success-sm:hover {
  background: rgba(16,185,129,0.14);
  color: #047857;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

/* ════════════════════════════════════════════════════════
   TABLE CARD & RESPONSIVE WORD-FITTING TABLES
   ════════════════════════════════════════════════════════ */
.table-card {
  background: #FFFFFF;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  table-layout: auto;
}

.admin-table th {
  background: #F8FAFC;
  padding: 13px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #000000;
  border-bottom: 2px solid var(--admin-border);
  white-space: nowrap;
  font-weight: 900;
}

.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--admin-border-subtle);
  vertical-align: middle;
  color: #0F172A;
  font-size: 13px;
  line-height: 1.45;
}

.admin-table td strong {
  color: #000000;
  font-weight: 800;
  word-break: break-word;
}

.admin-table td small {
  color: var(--admin-text-muted);
  word-break: break-word;
}

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

.admin-table tbody tr {
  transition: background var(--transition);
}

.admin-table tbody tr:hover td {
  background: #F8FAFC;
}

.td-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
}

/* ════════════════════════════════════════════════════════
   STATUS PILLS & BADGES
   ════════════════════════════════════════════════════════ */
.admin-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--coral-light);
  color: var(--coral);
  border: 1px solid rgba(255,107,71,0.3);
  font-weight: 800;
  white-space: nowrap;
  display: inline-block;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-pill::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-pill.new, .status-pill.pending {
  background: rgba(245,158,11,0.1);
  color: #D97706;
  border: 1px solid rgba(245,158,11,0.2);
}

.status-pill.contacted {
  background: rgba(59,130,246,0.1);
  color: #2563EB;
  border: 1px solid rgba(59,130,246,0.2);
}

.status-pill.won, .status-pill.approved, .status-pill.active {
  background: rgba(16,185,129,0.1);
  color: #059669;
  border: 1px solid rgba(16,185,129,0.2);
}

.status-pill.lost, .status-pill.rejected, .status-pill.inactive {
  background: rgba(239,68,68,0.1);
  color: #DC2626;
  border: 1px solid rgba(239,68,68,0.2);
}

.status-pill.upcoming {
  background: rgba(139,92,246,0.1);
  color: #7C3AED;
  border: 1px solid rgba(139,92,246,0.2);
}

.status-pill.past {
  background: rgba(107,114,128,0.1);
  color: #6B7280;
  border: 1px solid rgba(107,114,128,0.2);
}

/* ════════════════════════════════════════════════════════
   GALLERY GRID
   ════════════════════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.gallery-item-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.22s ease;
  box-shadow: var(--shadow-xs);
}

.gallery-item-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255,107,71,0.2);
}

.gallery-item-img {
  width: 100%;
  height: 148px;
  object-fit: cover;
  display: block;
  background: #F3F4F6;
}

.gallery-item-body {
  padding: 12px 14px;
}

.gallery-item-cat {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 800;
  letter-spacing: 0.07em;
  margin-bottom: 3px;
}

.gallery-item-caption {
  font-size: 13px;
  color: #000000;
  font-weight: 700;
  margin-bottom: 10px;
  word-break: break-word;
}

/* ════════════════════════════════════════════════════════
   MODALS (SCROLLABLE & ADAPTIVE BOTTOM SHEETS)
   ════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s, visibility 0.22s;
  overflow-y: auto;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #FFFFFF;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.22);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #FFFFFF;
}

.modal-header h3 {
  margin: 0;
  font-size: 17px;
  color: #000000;
  font-weight: 800;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.modal-close {
  background: #F3F4F6;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  color: var(--admin-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all var(--transition);
}

.modal-close:hover {
  background: #E5E7EB;
  color: #000000;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  background: #FFFFFF;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  background: #F9FAFB;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid.full { grid-template-columns: 1fr; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.col-2 { grid-column: span 2; }

.form-group label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #000000;
  word-break: break-word;
}

.form-control {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius);
  padding: 9px 13px;
  font-size: 13.5px;
  color: var(--admin-text);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  width: 100%;
}

.form-control::placeholder { color: #9CA3AF; }

.form-control:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-light);
  background: #FFFFFF;
}

textarea.form-control {
  min-height: 88px;
  resize: vertical;
}

select.form-control option {
  background: #FFFFFF;
  color: var(--admin-text);
}

input[type="file"].form-control {
  padding: 7px 10px;
  cursor: pointer;
  color: #6B7280;
  font-size: 12.5px;
  background: #FAFAFA;
}

input[type="file"].form-control::-webkit-file-upload-button {
  background: var(--coral-light);
  border: 1px solid rgba(255,107,71,0.3);
  border-radius: 6px;
  color: var(--coral);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 10px;
  font-family: inherit;
  transition: background var(--transition);
}

input[type="file"].form-control::-webkit-file-upload-button:hover {
  background: rgba(255,107,71,0.2);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--coral);
  cursor: pointer;
}

.checkbox-row label {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  color: var(--admin-text) !important;
  cursor: pointer;
  margin: 0;
  font-weight: 600 !important;
}

/* ════════════════════════════════════════════════════════
   SKELETON LOADING
   ════════════════════════════════════════════════════════ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #F3F4F6 25%, #E9EAEC 50%, #F3F4F6 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  display: inline-block;
}

.skeleton-row td { padding: 16px 18px; }
.skeleton-cell { width: 100%; height: 16px; display: block; }
.skeleton-cell.sm { width: 60%; }
.skeleton-cell.xs { width: 35%; }

/* ════════════════════════════════════════════════════════
   SEED / LOG
   ════════════════════════════════════════════════════════ */
.seed-log {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  background: #F9FAFB;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11.5px;
  color: #374151;
  max-height: 220px;
  overflow-y: auto;
  line-height: 1.6;
}

.seed-log div { border-bottom: 1px solid #E5E7EB; padding: 2px 0; }
.seed-log div:last-child { border-bottom: none; }

/* ════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #0F172A;
  color: #F8FAFC;
  border-left: 4px solid var(--coral);
  padding: 13px 18px;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 380px;
  pointer-events: all;
  word-break: break-word;
}

.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }
.toast.info    { border-left-color: var(--blue); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ════════════════════════════════════════════════════════
   ACTIVATIONS CALENDAR WIDGET
   ════════════════════════════════════════════════════════ */
.activation-cal-card {
  background: #FFFFFF;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--admin-border-subtle);
}

.cal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #000000;
  letter-spacing: -0.02em;
}

.cal-nav-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--admin-border);
  background: var(--admin-card);
  color: var(--admin-text);
  cursor: pointer;
  font-weight: 700;
  transition: all var(--transition);
  font-size: 13px;
}

.cal-nav-btn:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: #FFFFFF;
  box-shadow: 0 3px 10px var(--coral-glow);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 8px;
  text-align: center;
}

.cal-weekday {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #000000;
  padding: 6px 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-cell {
  min-height: 96px;
  background: #FAFBFD;
  border: 1px solid var(--admin-border-subtle);
  border-radius: 10px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.cal-cell.other-month {
  background: #F9FAFB;
  opacity: 0.4;
}

.cal-cell.today {
  border-color: var(--coral);
  background: rgba(255,107,71,0.03);
  box-shadow: inset 0 0 0 1px rgba(255,107,71,0.15);
}

.cal-cell.has-booking {
  background: rgba(255,107,71,0.04);
  border-color: rgba(255,107,71,0.3);
  cursor: pointer;
}

.cal-cell.has-booking:hover {
  background: rgba(255,107,71,0.08);
  box-shadow: 0 4px 14px rgba(255,107,71,0.15);
  border-color: var(--coral);
  transform: translateY(-1px);
}

.cal-date-num {
  font-size: 12px;
  font-weight: 800;
  color: #000000;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cal-cell.today .cal-date-num { color: var(--coral); }

.cal-today-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--coral);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
}

.cal-booking-pill {
  display: block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255,107,71,0.12);
  color: #C2410C;
  border-left: 3px solid var(--coral);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.cal-booking-more {
  font-size: 10px;
  font-weight: 700;
  color: var(--admin-text-muted);
  margin-top: 3px;
  text-align: right;
}

/* ════════════════════════════════════════════════════════
   SHOP MULTI-PHOTO & LOGO PREVIEW
   ════════════════════════════════════════════════════════ */
.photo-gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  background: #F9FAFB;
  border: 2px dashed #E5E7EB;
  border-radius: var(--radius);
  min-height: 70px;
  transition: border-color 0.2s;
}

.photo-gallery-preview:hover {
  border-color: rgba(255,107,71,0.3);
}

.photo-thumb-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--admin-border);
  background: var(--admin-card);
  transition: transform 0.15s ease;
}

.photo-thumb-item:hover { transform: scale(1.04); }

.photo-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(239,68,68,0.9);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  transition: all 0.15s ease;
  opacity: 0;
}

.photo-thumb-item:hover .photo-thumb-remove { opacity: 1; }

.photo-thumb-remove:hover {
  transform: scale(1.15);
  background: #DC2626;
}

.logo-preview-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #F9FAFB;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  margin-top: 8px;
}

.logo-preview-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  padding: 4px;
}

/* ════════════════════════════════════════════════════════
   COMPREHENSIVE RESPONSIVE DESIGN (PHONES & TABLETS)
   ════════════════════════════════════════════════════════ */

/* Tablets / Medium Desktops (max-width: 1024px) */
@media (max-width: 1024px) {
  :root { --sidebar-w: 0px; }

  .sidebar-toggle-btn { display: inline-flex; }
  .sidebar-close-btn { display: inline-flex; }

  .admin-sidebar {
    transform: translateX(-100%);
    width: 280px;
    max-width: 85vw;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 500;
  }

  body.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 450;
    cursor: pointer;
    animation: fadeInOverlay 0.2s ease;
  }

  @keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .admin-topbar {
    padding: 0 20px;
  }

  .admin-content {
    padding: 22px 20px 100px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.col-2 {
    grid-column: span 1;
  }

  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table {
    min-width: 660px;
  }

  .sync-hub-links {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile Phones & Portrait Tablets (max-width: 768px) */
@media (max-width: 768px) {
  .admin-topbar {
    height: 62px;
    padding: 0 14px;
  }

  .admin-topbar-left {
    gap: 10px;
  }

  .admin-topbar-title {
    font-size: 15px;
  }

  .admin-topbar-actions a:not(.btn-primary) {
    display: none !important;
  }

  .admin-topbar-actions .btn-primary {
    padding: 6px 12px;
    font-size: 11.5px;
    gap: 4px;
  }

  .admin-content {
    padding: 16px 14px 100px;
  }

  /* Welcome Banner */
  #tab-overview > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 18px !important;
  }

  #dashGreeting {
    font-size: 19px !important;
  }

  #dashDateLine {
    font-size: 12px !important;
  }

  /* Metrics Grid */
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }

  .metric-card {
    padding: 16px 14px;
    border-radius: var(--radius);
  }

  .metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    margin-bottom: 4px;
  }

  .metric-icon svg {
    width: 18px;
    height: 18px;
  }

  .metric-value {
    font-size: 26px;
  }

  .metric-foot {
    font-size: 10.5px;
  }

  /* Section Toolbar */
  .section-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
  }

  .toolbar-left {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .search-input-wrap {
    min-width: 100%;
    max-width: 100%;
  }

  .filter-select {
    width: 100%;
  }

  .section-toolbar .btn-primary,
  .section-toolbar .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  /* Tables: smooth touch scrolling */
  .table-card {
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
    border: 1px solid var(--admin-border);
  }

  .admin-table {
    min-width: 620px;
  }

  .admin-table th {
    padding: 10px 14px;
    font-size: 10px;
  }

  .admin-table td {
    padding: 12px 14px;
    font-size: 12.5px;
  }

  .td-actions {
    gap: 4px;
  }

  .td-actions .btn-sm {
    padding: 5px 8px;
    font-size: 11px;
  }

  /* Activations Calendar on Mobile */
  .activation-cal-card {
    padding: 16px 12px;
    border-radius: var(--radius);
  }

  .cal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .cal-title {
    font-size: 15px;
  }

  .cal-nav-btns {
    width: 100%;
    justify-content: flex-end;
  }

  .cal-weekdays {
    gap: 3px;
    margin-bottom: 4px;
  }

  .cal-weekday {
    font-size: 9.5px;
    padding: 2px 0;
  }

  .cal-grid {
    gap: 3px;
  }

  .cal-cell {
    min-height: 56px;
    padding: 4px;
    border-radius: 6px;
  }

  .cal-date-num {
    font-size: 10.5px;
    margin-bottom: 2px;
  }

  .cal-today-badge {
    font-size: 7.5px;
    padding: 1px 3px;
  }

  .cal-booking-pill {
    font-size: 8.5px;
    padding: 2px 4px;
    border-left-width: 2px;
    margin-top: 2px;
    border-radius: 4px;
  }

  .cal-booking-more {
    font-size: 8.5px;
  }

  /* Sync Hub on Mobile */
  .sync-hub-card {
    border-radius: var(--radius);
  }

  .sync-hub-header {
    padding: 16px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sync-hub-header .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .sync-hub-links {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
    gap: 6px;
  }

  .sync-hub-links .quick-action-btn {
    padding: 8px 10px;
    font-size: 11.5px;
  }

  /* Quick Actions Grid */
  .quick-actions-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .quick-action-btn {
    padding: 10px 12px;
    font-size: 12px;
  }

  /* Modals on Mobile */
  .modal-backdrop {
    padding: 8px;
    align-items: flex-end;
  }

  .modal-card {
    max-height: 94vh;
    border-radius: 16px 16px 0 0;
    width: 100%;
    transform: translateY(40px);
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-header h3 {
    font-size: 15px;
  }

  .modal-body {
    padding: 16px 14px;
  }

  /* Prevent iOS automatic zoom by using 16px on inputs */
  .form-control,
  .search-input,
  .filter-select {
    font-size: 16px !important;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer button {
    width: 100%;
    justify-content: center;
  }

  /* Toast Notifications on Mobile */
  .toast-container {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .toast {
    max-width: 100%;
    font-size: 13px;
    padding: 11px 14px;
  }

  /* Seeder Card */
  .seeder-card {
    padding: 18px 14px;
  }
}

/* Very Small Smartphones (max-width: 420px) */
@media (max-width: 420px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .sync-hub-links {
    grid-template-columns: 1fr;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
}
/* Manual inquiry entry shares the dashboard's existing modal system. */
.lead-entry-modal .modal-card { max-width:820px; }
.lead-entry-modal form { display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.lead-entry-modal .modal-body { overflow-y:auto; min-height:0; }
.lead-entry-modal .form-control { width:100%; color:#172b3a !important; -webkit-text-fill-color:#172b3a; background:#fff !important; caret-color:#172b3a; }
.lead-entry-modal .form-grid { align-items:start; }
.lead-entry-intro { margin:0 0 20px; color:var(--admin-text-muted); font-size:13px; line-height:1.6; }
.lead-entry-modal small { font-size:11px; color:var(--admin-text-muted); line-height:1.6; }
.lead-entry-error { color:#b42318; font-size:13px; line-height:1.6; white-space:pre-wrap; margin-top:14px; }
.lead-entry-error:empty { display:none; }
.lead-media { background:#f7fafc; border:1px solid var(--admin-border); border-radius:12px; padding:16px; }
.lead-media-link { display:flex; gap:8px; margin-top:10px; }
.lead-media-link input { min-width:0; }
#leadMediaList { padding:0; list-style:none; margin:8px 0 0; }
#leadMediaList li { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--admin-border); }
#leadMediaList a, .lead-media-attachment { color:#165c88; font-size:12px; overflow-wrap:anywhere; }
.lead-media-attachment { display:block; margin-bottom:6px; max-width:230px; }
.lead-source-label { display:block; color:var(--admin-text-muted); font-size:11px; line-height:1.6; margin-top:4px; }
.lead-detail-extra { margin-top:18px; padding:16px; border:1px solid var(--admin-border); border-radius:12px; }
.lead-detail-extra h4 { font-size:13px; margin:12px 0 8px; }
.lead-detail-extra p { font-size:12px; line-height:1.7; }
.lead-notes { white-space:pre-wrap; overflow-wrap:anywhere; }
#tab-ledLeads .td-actions, #tab-activationLeads .td-actions, #tab-contactLeads .td-actions { flex-wrap:wrap; }
@media(max-width:600px) { .lead-entry-modal .modal-card { max-height:calc(100dvh - 16px); } .lead-entry-modal .form-grid { grid-template-columns:minmax(0,1fr); } .lead-entry-modal .form-group.col-2 { grid-column:auto; } .lead-media-link { flex-direction:column; } }
