/* ==========================================================================
   ArchSaga Worldwide — Unified Spatial Monochrome Design System
   Palette: #F4F5F7 Canvas | #FFFFFF Elevated Surface | #111111 Obsidian Ink
   ========================================================================== */

:root {
  --bg-canvas: #F4F5F7;
  --bg-surface: #FFFFFF;
  --bg-muted: #F0F1F3;
  --ink-primary: #111111;
  --ink-secondary: #6E7179;
  --ink-muted: #9FA3AD;
  --border-subtle: #E5E7EB;
  --border-strong: #D1D5DB;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --accent-rose: #EF4444;
  --accent-blue: #2563EB;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --shadow-sm: 0 4px 16px rgba(17, 17, 17, 0.05);
  --shadow-md: 0 12px 32px rgba(17, 17, 17, 0.08);
  --shadow-lg: 0 20px 48px rgba(17, 17, 17, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* Broadcast Top Ribbon */
.broadcast-ribbon {
  background: var(--ink-primary);
  color: #FFFFFF;
  padding: 9px 24px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.broadcast-ribbon-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Global Top Navbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 70px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  background: var(--ink-primary);
  color: #FFFFFF;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 8px 13px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.nav-link:hover { color: var(--ink-primary); background: var(--bg-muted); }
.nav-link.active { color: var(--ink-primary); font-weight: 700; }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2.5px;
  background: var(--ink-primary);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons & Pills */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.btn-primary { background: var(--ink-primary); color: #FFFFFF; }
.btn-primary:hover { background: #27272A; transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn-secondary { background: var(--bg-surface); color: var(--ink-primary); border-color: var(--border-subtle); }
.btn-secondary:hover { border-color: var(--ink-primary); background: #FAFAFA; }

.btn-success { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
.btn-danger { background: #FEF2F2; color: var(--accent-rose); border-color: #FECACA; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }

.pill-dark {
  background: var(--ink-primary);
  color: #FFFFFF;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.pill-light {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--border-subtle);
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
}

.badge-verified { background: #ECFDF5; color: #065F46; }
.badge-dark { background: var(--ink-primary); color: #FFFFFF; }
.badge-muted { background: var(--bg-muted); color: var(--ink-secondary); }
.badge-amber { background: #FFFBEB; color: #92400E; }
.badge-rose { background: #FEF2F2; color: #991B1B; }
.badge-blue { background: #EFF6FF; color: #1E40AF; }

/* Containers & Cards */
.container { max-width: 1380px; margin: 0 auto; padding: 28px; }
.card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }

/* Landing Hero Strip */
.landing-hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 24px 28px;
}

.landing-hero-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: center;
}

.quick-finder-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  background: var(--bg-canvas);
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  margin-top: 14px;
}

/* Split Screen Map Directory */
.split-shell {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  height: 760px;
  border-bottom: 1px solid var(--border-subtle);
}

.map-pane { position: relative; height: 100%; background: #E8ECEF; }
#directoryMap { width: 100%; height: 100%; z-index: 1; }

.map-floating-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; pointer-events: auto; }
.filter-select { border: none; background: transparent; font-weight: 700; font-size: 12.5px; color: inherit; cursor: pointer; outline: none; }
.pill-dark .filter-select option { color: var(--ink-primary); background: #FFFFFF; }

.search-box-floating {
  pointer-events: auto;
  max-width: 390px;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box-floating input { border: none; outline: none; width: 100%; font-size: 13.5px; font-weight: 600; }

.map-tools-bottom { position: absolute; bottom: 22px; left: 16px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.map-tool-btn {
  width: 40px; height: 40px; border-radius: 12px; background: #FFFFFF;
  border: 1px solid var(--border-subtle); box-shadow: var(--shadow-md);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-primary);
  transition: all 0.15s ease;
}
.map-tool-btn.active, .map-tool-btn:hover { background: var(--ink-primary); color: #FFFFFF; }

.arch-pin {
  background: #FFFFFF; color: var(--ink-primary); border: 1.5px solid #FFFFFF;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  transition: all 0.18s ease; display: inline-flex; align-items: center; gap: 6px;
}
.arch-pin.active, .arch-pin:hover { background: #111111; color: #FFFFFF; transform: scale(1.07); z-index: 999 !important; }

.listings-pane {
  height: 100%; overflow-y: auto; padding: 20px 24px;
  display: flex; flex-direction: column; gap: 18px; background: var(--bg-canvas);
}

.featured-studio-card {
  background: #FFFFFF; border-radius: 24px; padding: 18px;
  border: 1px solid var(--border-subtle); box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 20px;
}

.featured-media { position: relative; border-radius: 18px; overflow: hidden; min-height: 290px; background: #18181B; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-overlay-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; }
.rating-pill { background: rgba(255, 255, 255, 0.95); padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }
.carousel-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; background: rgba(17, 17, 17, 0.45); padding: 5px 10px; border-radius: 999px; }
.carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); cursor: pointer; }
.carousel-dot.active { background: #FFFFFF; transform: scale(1.2); }
.featured-body { display: flex; flex-direction: column; justify-content: space-between; }

.specs-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  margin: 12px 0; padding: 10px 12px; background: var(--bg-canvas);
  border-radius: 14px; font-size: 12px; font-weight: 600; color: var(--ink-secondary);
}

.studio-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mini-studio-card {
  background: #FFFFFF; border-radius: 18px; padding: 10px;
  border: 2px solid transparent; box-shadow: var(--shadow-sm);
  cursor: pointer; transition: all 0.18s ease;
}
.mini-studio-card.active { border-color: var(--ink-primary); }
.mini-studio-card:hover { transform: translateY(-2px); }
.mini-studio-thumb { width: 100%; height: 102px; border-radius: 12px; object-fit: cover; margin-bottom: 10px; }

/* Forms & Grids */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 12.5px; font-weight: 700; color: var(--ink-primary); }
.form-control {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--border-subtle); background: #FAFAFA;
  font-size: 13.5px; color: var(--ink-primary); transition: all 0.15s ease;
}
.form-control:focus { outline: none; background: #FFFFFF; border-color: var(--ink-primary); box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

/* Dashboard & Super Admin Sidebar Shells */
.dash-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.dash-sidebar { background: #FFFFFF; border-radius: 22px; padding: 18px; border: 1px solid var(--border-subtle); position: sticky; top: 94px; }
.dash-nav-btn {
  width: 100%; text-align: left; padding: 11px 14px; border-radius: 12px;
  border: none; background: transparent; font-size: 13.5px; font-weight: 600;
  color: var(--ink-secondary); display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; margin-bottom: 4px; transition: all 0.15s ease;
}
.dash-nav-btn:hover { background: var(--bg-muted); color: var(--ink-primary); }
.dash-nav-btn.active { background: var(--ink-primary); color: #FFFFFF; }

.admin-shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--bg-surface); border-right: 1px solid var(--border-subtle);
  padding: 24px 18px; display: flex; flex-direction: column; justify-content: space-between;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.nav-section-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); padding: 12px 12px 6px; }
.side-link {
  display: flex; align-items: center; justify-content: space-between; padding: 10px 14px;
  border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-secondary);
  margin-bottom: 4px; transition: all 0.16s ease;
}
.side-link:hover { background: var(--bg-muted); color: var(--ink-primary); }
.side-link.active { background: var(--ink-primary); color: #FFFFFF; font-weight: 700; }
.side-link-left { display: flex; align-items: center; gap: 10px; }
.admin-topbar {
  height: 70px; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle); padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 900;
}
.admin-content { padding: 28px; max-width: 1440px; width: 100%; margin: 0 auto; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; text-align: left; }
table.data-table th { padding: 12px 16px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; color: var(--ink-secondary); background: #FAFAFA; border-bottom: 1px solid var(--border-subtle); }
table.data-table td { padding: 14px 16px; font-size: 13.5px; border-bottom: 1px solid var(--border-subtle); }

/* OTP & Toggle Switch */
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.otp-box { width: 48px; height: 54px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: #FAFAFA; text-align: center; font-size: 20px; font-weight: 800; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: #D1D5DB; transition: 0.2s; border-radius: 999px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: 0.2s; border-radius: 50%; }
input:checked + .slider { background-color: var(--ink-primary); }
input:checked + .slider:before { transform: translateX(18px); }

/* Modal Backdrop */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(17, 17, 17, 0.55); backdrop-filter: blur(6px);
  z-index: 2500; place-items: center; padding: 24px;
}

/* Toast Notification */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--ink-primary); color: #FFFFFF; padding: 13px 18px;
  border-radius: 14px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1080px) {
  .landing-hero-inner, .split-shell, .dash-layout, .admin-shell { grid-template-columns: 1fr; height: auto; }
  .map-pane { height: 460px; }
  .featured-studio-card, .quick-finder-bar { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; height: auto; }
  .studio-strip, .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
}
