@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500..700&family=Sora:wght@300;400;500;600;700;800&display=swap");

@tailwind base;
@tailwind components;
@tailwind utilities;

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-alt: #10182c;
  --panel: linear-gradient(180deg, rgba(21, 31, 54, 0.96), rgba(28, 39, 68, 0.94));
  --panel-strong: linear-gradient(135deg, rgba(11, 16, 32, 0.98), rgba(16, 24, 44, 0.96), rgba(21, 31, 54, 0.94));
  --panel-soft: rgba(13, 21, 39, 0.92);
  --surface: rgba(15, 23, 40, 0.94);
  --surface-soft: rgba(15, 23, 40, 0.82);
  --ink: #eef4ff;
  --muted: #9fb0d3;
  --line: #2a375d;
  --line-strong: rgba(110, 168, 254, 0.22);
  --accent: #6ea8fe;
  --accent-strong: #4f92fb;
  --accent-soft: rgba(110, 168, 254, 0.14);
  --success: #28c76f;
  --warning: #ffb020;
  --danger: #ea5455;
  --cyan: #24c8db;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e8eef4;
  --bg-alt: #f2f6fa;
  --panel: linear-gradient(180deg, rgba(248, 251, 254, 0.98), rgba(238, 244, 250, 0.96));
  --panel-strong: linear-gradient(135deg, rgba(247, 250, 253, 0.98), rgba(241, 246, 251, 0.97), rgba(234, 241, 248, 0.95));
  --panel-soft: rgba(247, 250, 253, 0.92);
  --surface: rgba(246, 250, 253, 0.95);
  --surface-soft: rgba(241, 246, 251, 0.88);
  --ink: #182438;
  --muted: #5a708c;
  --line: rgba(30, 47, 75, 0.13);
  --line-strong: rgba(47, 104, 219, 0.2);
  --accent: #2f68db;
  --accent-strong: #1f57cf;
  --accent-soft: rgba(47, 104, 219, 0.12);
  --success: #209b65;
  --warning: #c88417;
  --danger: #d25555;
  --cyan: #229eb0;
  --shadow: 0 18px 40px rgba(44, 72, 114, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 14%, rgba(110, 168, 254, 0.2), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(36, 200, 219, 0.14), transparent 16%),
    radial-gradient(circle at 50% 100%, rgba(234, 84, 85, 0.08), transparent 20%),
    linear-gradient(180deg, var(--bg), #08101b 60%, #060b14 100%);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 12% 14%, rgba(47, 104, 219, 0.1), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(34, 158, 176, 0.08), transparent 16%),
    radial-gradient(circle at 50% 100%, rgba(200, 132, 23, 0.05), transparent 20%),
    linear-gradient(180deg, #f4f7fb 0%, #e9eff5 62%, #e3eaf2 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 140px 140px;
  opacity: 0.22;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select,
textarea,
button {
  font: inherit;
}

::selection {
  background: rgba(110, 168, 254, 0.22);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(159, 176, 211, 0.26);
  border: 2px solid rgba(11, 16, 32, 0.9);
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.site-frame {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.theme-toggle-floating {
  position: fixed;
  top: max(14px, calc(env(safe-area-inset-top, 0px) + 10px));
  right: max(14px, calc(env(safe-area-inset-right, 0px) + 10px));
  bottom: auto;
  z-index: 80;
  display: grid;
  gap: 1px;
  min-width: 110px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  text-align: left;
}

.theme-toggle-floating-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-toggle-floating strong {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.theme-toggle-floating:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.site-frame::before,
.site-frame::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.site-frame::before {
  top: 6%;
  left: -140px;
  width: 320px;
  height: 320px;
  background: rgba(110, 168, 254, 0.14);
}

.site-frame::after {
  right: -140px;
  bottom: 4%;
  width: 360px;
  height: 360px;
  background: rgba(36, 200, 219, 0.12);
}

.site-shell {
  position: relative;
  z-index: 1;
}

.page-stack {
  display: grid;
  gap: 1.5rem;
}

.site-hero {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.site-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
}

.site-hero-copy h1 {
  margin: 1rem 0 0;
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(2.65rem, 5vw, 4.65rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.site-hero-copy p {
  margin-top: 1rem;
  max-width: 52rem;
  color: rgba(238, 244, 255, 0.72);
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-proof-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 40, 0.78);
  color: rgba(238, 244, 255, 0.78);
  font-size: 0.9rem;
}

.hero-meta-grid {
  display: grid;
  gap: 0.75rem;
}

.hero-meta-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 40, 0.82);
  backdrop-filter: blur(10px);
}

.hero-meta-card p:first-child {
  margin: 0;
  color: rgba(159, 176, 211, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-meta-card p:last-child {
  margin: 0.55rem 0 0;
  color: var(--ink);
  font-weight: 600;
}

.hero-orb {
  pointer-events: none;
  position: absolute;
  border-radius: 999px;
  filter: blur(50px);
}

.app-nav {
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(8, 12, 20, 0.82);
  backdrop-filter: blur(12px);
}

.app-nav-inner {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.app-nav.is-sidebar {
  padding: 0.75rem;
}

.app-nav-inner.is-sidebar {
  grid-template-columns: 1fr;
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.app-nav-link.is-sidebar {
  justify-content: flex-start;
  padding: 0.85rem 1rem;
}

.app-nav-link:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 168, 254, 0.4);
  color: var(--ink);
}

.app-nav-link.is-active {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #08101b;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(110, 168, 254, 0.22);
}

.panel,
.panel-strong,
.stat-card,
.soft-card,
.metric-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel,
.stat-card,
.soft-card {
  padding: 1.5rem;
  background: var(--panel);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

.panel > *,
.panel-strong > * {
  position: relative;
  z-index: 1;
}

.panel-strong {
  padding: 1.5rem;
  color: var(--ink);
  background: var(--panel-strong);
}

.section-kicker {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title {
  color: var(--ink);
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.metric-tile {
  padding: 1.2rem;
  background: rgba(15, 23, 40, 0.82);
}

.metric-tile p:first-child {
  margin: 0;
  color: rgba(159, 176, 211, 0.7);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.metric-tile p:last-child {
  margin: 0.7rem 0 0;
  color: var(--ink);
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 2.6rem;
  line-height: 1;
}

.soft-card.dark {
  background: rgba(15, 23, 40, 0.92);
  color: var(--ink);
}

.field {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 40, 0.96);
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field::placeholder {
  color: rgba(159, 176, 211, 0.7);
}

.field:focus {
  border-color: rgba(110, 168, 254, 0.42);
  background: rgba(15, 23, 40, 0.98);
  box-shadow: 0 0 0 4px rgba(110, 168, 254, 0.1);
}

.button-primary,
.button-secondary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.2rem;
  border-radius: 18px;
  font-size: 0.94rem;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.button-primary {
  border: 1px solid transparent;
  color: #08101b;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 28px rgba(110, 168, 254, 0.22);
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.button-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(15, 23, 40, 0.74);
}

.button-primary:hover,
.button-secondary:hover,
.button-ghost:hover {
  transform: translateY(-1px);
}

.settings-drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition:
    grid-template-rows 220ms ease,
    margin-top 220ms ease;
}

.settings-drawer.is-open {
  margin-top: 1.25rem;
  grid-template-rows: 1fr;
}

.settings-drawer-inner {
  min-height: 0;
  overflow: hidden;
}

.notice {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(110, 168, 254, 0.18);
  border-radius: 18px;
  background: rgba(110, 168, 254, 0.1);
  color: var(--accent);
  font-size: 0.92rem;
}

.notice.is-success {
  border-color: rgba(40, 199, 111, 0.2);
  background: rgba(40, 199, 111, 0.12);
  color: var(--success);
}

.notice.is-error {
  border-color: rgba(234, 84, 85, 0.2);
  background: rgba(234, 84, 85, 0.12);
  color: var(--danger);
}

.table-shell {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(13, 21, 39, 0.82);
}

.data-table {
  min-width: 100%;
  color: var(--ink);
  font-size: 0.95rem;
  text-align: left;
}

.data-table thead {
  color: rgba(159, 176, 211, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.data-table th {
  padding-bottom: 1rem;
  font-weight: 700;
}

.data-table tbody tr {
  border-top: 1px solid rgba(42, 55, 93, 0.8);
}

.data-table tbody tr:hover {
  background: rgba(15, 23, 40, 0.4);
}

.data-table td {
  padding: 1rem 0;
  vertical-align: top;
}

.subtle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.icon-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.icon-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 40, 0.88);
  color: var(--ink);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.icon-action-button:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 168, 254, 0.4);
}

.icon-action-button.is-danger {
  color: #ffb6b6;
  border-color: rgba(234, 84, 85, 0.28);
}

.icon-action-button.is-danger:hover {
  border-color: rgba(234, 84, 85, 0.5);
}

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

.section-intro {
  max-width: 48rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.surface-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 40, 0.94);
  color: var(--ink);
  font-weight: 700;
}

.status-badge {
  border-width: 1px;
}

.status-badge.is-pending {
  border-color: rgba(255, 176, 32, 0.24);
  background: rgba(255, 176, 32, 0.12);
  color: var(--warning);
}

.status-badge.is-confirmed {
  border-color: rgba(40, 199, 111, 0.24);
  background: rgba(40, 199, 111, 0.12);
  color: var(--success);
}

.status-badge.is-seated {
  border-color: rgba(36, 200, 219, 0.24);
  background: rgba(36, 200, 219, 0.12);
  color: var(--cyan);
}

.status-badge.is-completed {
  border-color: var(--line);
  background: rgba(15, 23, 40, 0.9);
  color: var(--ink);
}

.status-badge.is-cancelled,
.status-badge.is-no-show {
  border-color: rgba(234, 84, 85, 0.24);
  background: rgba(234, 84, 85, 0.12);
  color: var(--danger);
}

.floor-plan-shell {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.floor-plan-canvas {
  min-width: 640px;
  background:
    radial-gradient(circle at 14% 18%, rgba(110, 168, 254, 0.12), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(36, 200, 219, 0.1), transparent 18%),
    linear-gradient(180deg, rgba(15, 23, 40, 0.98), rgba(13, 21, 39, 0.96));
}

.floor-plan-room-outline {
  position: absolute;
  inset: 2.5%;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(1px);
}

.floor-plan-background,
.layout-editor-background {
  position: absolute;
  inset: 2.5%;
  z-index: 0;
  border-radius: 24px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.36;
  filter: saturate(0.92) contrast(1.02);
  pointer-events: none;
}

.floor-plan-entrance {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 1px dashed rgba(255, 176, 32, 0.38);
  border-radius: 24px;
  background: rgba(255, 176, 32, 0.12);
  color: #ffd38b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: var(--shadow);
}

.floor-plan-bar {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(36, 200, 219, 0.24);
  border-radius: 22px;
  background: rgba(36, 200, 219, 0.16);
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: var(--shadow);
}

.floor-plan-table {
  position: absolute;
  z-index: 3;
  padding: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(15, 23, 40, 0.96);
  box-shadow: var(--shadow);
  color: var(--ink);
  transform-origin: center;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.floor-plan-table.is-free {
  border-color: rgba(110, 168, 254, 0.2);
}

.floor-plan-table.is-upcoming {
  border-color: rgba(255, 176, 32, 0.26);
  background: rgba(255, 176, 32, 0.12);
}

.floor-plan-table.is-current {
  border-color: rgba(234, 84, 85, 0.26);
  background: rgba(234, 84, 85, 0.14);
}

.floor-plan-step {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 40, 0.94);
}

.floor-plan-note {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 40, 0.9);
}

.layout-builder-actions {
  display: grid;
  gap: 0.9rem;
}

.layout-builder-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 40, 0.9);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: left;
}

.layout-builder-toggle span {
  font-size: 0.96rem;
  font-weight: 700;
}

.layout-builder-toggle small {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layout-builder-toggle:disabled {
  opacity: 0.55;
}

.layout-builder-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 40, 0.88);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.editor-page-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  align-items: start;
}

.editor-page-layout.is-sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.editor-sidebar-panel {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow: auto;
}

.editor-sidebar-panel.is-collapsed {
  display: none;
}

.editor-sidebar-header,
.editor-stage-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.editor-stage-copy {
  min-width: min(100%, 28rem);
  flex: 1 1 24rem;
}

.editor-sidebar-toggle {
  flex: 0 0 auto;
  width: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 18px;
}

.editor-sidebar-toggle.is-active {
  border-color: rgba(47, 104, 219, 0.18);
  background: var(--surface);
}

.editor-stage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-left: auto;
}

.editor-hamburger {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.editor-hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.editor-zoom-controls {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
}

.editor-zoom-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.editor-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.editor-zoom-button,
.editor-zoom-value {
  min-height: 42px;
  min-width: 42px;
  padding: 0 0.85rem;
}

.editor-zoom-value {
  min-width: 84px;
}

.editor-stage-panel {
  min-width: 0;
}

.editor-stage-canvas-shell {
  padding-bottom: 0.5rem;
}

.layout-editor-shell {
  width: 100%;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-bottom: 0.25rem;
  overscroll-behavior: contain;
}

.layout-editor-zoom-frame {
  width: 100%;
  min-width: 100%;
  flex: 0 0 auto;
  transition: width 0.18s ease;
}

.layout-editor-canvas {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: clamp(520px, 70vh, 860px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 14% 18%, rgba(110, 168, 254, 0.13), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(36, 200, 219, 0.1), transparent 20%),
    linear-gradient(180deg, rgba(15, 23, 40, 0.98), rgba(13, 21, 39, 0.96));
  box-shadow: var(--shadow);
}

.layout-editor-canvas.is-dragging {
  cursor: grabbing;
}

.layout-editor-grid {
  position: absolute;
  inset: 2.5%;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(
      to right,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px
    ),
    rgba(255, 255, 255, 0.02);
  background-size: 36px 36px;
}

.layout-editor-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.layout-editor-table {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 40px;
  min-height: 32px;
  padding: 0.5rem 0.45rem;
  box-sizing: border-box;
  border: 1px solid rgba(110, 168, 254, 0.28);
  border-radius: 18px;
  background: rgba(15, 23, 40, 0.95);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: grab;
  user-select: none;
  overflow: hidden;
  transform: rotate(var(--table-rotation, 0deg));
  transform-origin: center;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.layout-editor-table--square,
.layout-editor-table--round {
  min-height: 40px;
  padding: 0.35rem;
}

.layout-editor-table:hover {
  transform: rotate(var(--table-rotation, 0deg)) translateY(-1px);
  border-color: rgba(110, 168, 254, 0.48);
}

.layout-editor-table:active {
  cursor: grabbing;
}

.layout-editor-table.is-selected {
  border-color: rgba(36, 200, 219, 0.72);
  background: rgba(36, 200, 219, 0.2);
}

.layout-editor-table.is-inactive {
  opacity: 0.58;
}

.layout-editor-table span {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.layout-editor-table small {
  font-size: 0.63rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--muted);
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.layout-editor-counter {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.6rem;
  border: 1px solid rgba(36, 200, 219, 0.34);
  border-radius: 20px;
  background: rgba(36, 200, 219, 0.14);
  color: var(--cyan);
  box-shadow: var(--shadow);
  cursor: grab;
  user-select: none;
}

.layout-editor-counter:active {
  cursor: grabbing;
}

.layout-editor-counter span {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layout-editor-counter small {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238, 244, 255, 0.72);
}

.layout-editor-entrance {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.55rem;
  border: 1px dashed rgba(255, 176, 32, 0.5);
  border-radius: 20px;
  background: rgba(255, 176, 32, 0.12);
  color: #ffd38b;
  box-shadow: var(--shadow);
  cursor: grab;
  user-select: none;
}

.layout-editor-entrance:active {
  cursor: grabbing;
}

.layout-editor-entrance span {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layout-editor-entrance small {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 234, 198, 0.72);
}

.text-ink {
  color: var(--ink);
}

.text-slate {
  color: var(--ink);
}

.text-stone-500,
.text-stone-600 {
  color: var(--muted);
}

.text-stone-700,
.text-stone-800 {
  color: var(--ink);
}

.text-white\/60 {
  color: rgba(238, 244, 255, 0.62);
}

.text-white\/62 {
  color: rgba(238, 244, 255, 0.64);
}

.text-white\/72 {
  color: rgba(238, 244, 255, 0.74);
}

.bg-stone-100 {
  background: rgba(15, 23, 40, 0.94);
}

.bg-amber-50,
.bg-amber-100 {
  background: rgba(255, 176, 32, 0.12);
}

.bg-emerald-50,
.bg-emerald-100 {
  background: rgba(40, 199, 111, 0.12);
}

.bg-rose-50,
.bg-rose-100 {
  background: rgba(234, 84, 85, 0.12);
}

.bg-sky-50 {
  background: rgba(36, 200, 219, 0.12);
}

.bg-fuchsia-50 {
  background: rgba(181, 114, 255, 0.12);
}

.bg-white\/10 {
  background-color: rgba(255, 255, 255, 0.08);
}

.bg-white\/32 {
  background-color: rgba(15, 23, 40, 0.36);
}

.bg-white\/70 {
  background-color: rgba(15, 23, 40, 0.74);
}

.bg-white\/80 {
  background-color: rgba(15, 23, 40, 0.82);
}

.bg-white\/90 {
  background-color: rgba(15, 23, 40, 0.9);
}

.bg-white\/95 {
  background-color: rgba(15, 23, 40, 0.95);
}

.bg-copper\/25 {
  background-color: rgba(36, 200, 219, 0.18);
}

.border-stone-200,
.border-stone-300 {
  border-color: var(--line);
}

.border-amber-200,
.border-amber-300 {
  border-color: rgba(255, 176, 32, 0.24);
}

.border-emerald-200 {
  border-color: rgba(40, 199, 111, 0.24);
}

.border-rose-200,
.border-rose-300 {
  border-color: rgba(234, 84, 85, 0.24);
}

.border-sky-200 {
  border-color: rgba(36, 200, 219, 0.24);
}

.border-fuchsia-200 {
  border-color: rgba(181, 114, 255, 0.24);
}

.border-white\/10 {
  border-color: rgba(255, 255, 255, 0.08);
}

.border-white\/70 {
  border-color: rgba(255, 255, 255, 0.08);
}

.border-white\/80 {
  border-color: rgba(255, 255, 255, 0.12);
}

.text-amber-800,
.text-amber-900 {
  color: var(--warning);
}

.text-emerald-800,
.text-emerald-900 {
  color: var(--success);
}

.text-rose-700,
.text-rose-800,
.text-rose-900 {
  color: var(--danger);
}

.text-sky-900 {
  color: var(--cyan);
}

.text-fuchsia-900 {
  color: #d8a6ff;
}

.shadow-card {
  box-shadow: var(--shadow);
}

@media (max-width: 1200px) {
  .app-nav-inner:not(.is-sidebar) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .site-hero-copy h1 {
    font-size: clamp(2.4rem, 7vw, 4rem);
  }

  .hero-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-hero {
    padding: 1.2rem;
    border-radius: 28px;
  }

  .site-hero-copy h1 {
    font-size: 2.4rem;
  }

  .hero-meta-grid {
    grid-template-columns: 1fr;
  }

  .app-nav:not(.is-sidebar) {
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .app-nav-inner:not(.is-sidebar) {
    display: inline-flex;
    gap: 0.6rem;
    min-width: 100%;
    width: max-content;
    grid-template-columns: none;
  }

  .app-nav-link:not(.is-sidebar) {
    flex: 0 0 auto;
  }

  .app-nav:not(.is-sidebar)::-webkit-scrollbar {
    height: 7px;
  }

  .app-nav:not(.is-sidebar)::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(110, 168, 254, 0.34);
  }

  .app-nav:not(.is-sidebar)::-webkit-scrollbar-track {
    background: rgba(15, 23, 40, 0.3);
  }

  .panel,
  .panel-strong,
  .stat-card,
  .soft-card,
  .metric-tile {
    padding: 1rem;
    border-radius: 22px;
  }

  .table-shell {
    padding: 0.85rem;
    border-radius: 22px;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    display: grid;
    gap: 0.85rem;
  }

  .data-table tbody tr {
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: rgba(15, 23, 40, 0.72);
  }

  .data-table td {
    padding: 0.5rem 0;
    border: 0;
  }

  .data-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(88px, 108px) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
  }

  .data-table td[data-label]::before {
    content: attr(data-label);
    color: rgba(159, 176, 211, 0.7);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .empty-state-cell {
    display: block !important;
    padding: 0 !important;
  }

  .empty-state-cell::before {
    content: none !important;
  }

  .floor-plan-canvas {
    min-width: 680px;
  }
}

html[data-theme="light"] .site-frame::before {
  background: rgba(47, 104, 219, 0.1);
}

html[data-theme="light"] .site-frame::after {
  background: rgba(34, 158, 176, 0.08);
}

html[data-theme="light"] .site-hero,
html[data-theme="light"] .panel,
html[data-theme="light"] .panel-strong,
html[data-theme="light"] .soft-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .metric-tile,
html[data-theme="light"] .hero-proof-pill,
html[data-theme="light"] .hero-meta-card,
html[data-theme="light"] .button-secondary,
html[data-theme="light"] .table-shell,
html[data-theme="light"] .data-table tbody tr,
html[data-theme="light"] .layout-builder-panel,
html[data-theme="light"] .floor-plan-card,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: rgba(246, 250, 253, 0.92);
  border-color: rgba(24, 36, 56, 0.12);
  color: var(--ink);
}

html[data-theme="light"] .button-secondary:hover,
html[data-theme="light"] .button-secondary:focus-visible,
html[data-theme="light"] .app-nav-link:hover,
html[data-theme="light"] .app-nav-link.is-active {
  background: rgba(47, 104, 219, 0.1);
  border-color: rgba(47, 104, 219, 0.18);
  color: var(--accent-strong);
}

html[data-theme="light"] .site-hero-copy p,
html[data-theme="light"] .tenant-chip small,
html[data-theme="light"] .hero-meta-card p:first-child {
  color: var(--muted);
}

html[data-theme="light"] .app-nav {
  background: rgba(244, 248, 252, 0.9);
  border-color: rgba(24, 36, 56, 0.12);
  box-shadow: 0 16px 32px rgba(44, 72, 114, 0.08);
}

html[data-theme="light"] .button-ghost,
html[data-theme="light"] .layout-builder-panel,
html[data-theme="light"] .bg-white\/32,
html[data-theme="light"] .bg-white\/70,
html[data-theme="light"] .bg-white\/80,
html[data-theme="light"] .bg-white\/90,
html[data-theme="light"] .bg-white\/95,
html[data-theme="light"] .bg-stone-100 {
  border-color: rgba(24, 36, 56, 0.12);
  color: var(--ink);
  box-shadow: 0 16px 32px rgba(44, 72, 114, 0.08);
}

html[data-theme="light"] .button-ghost {
  background: rgba(243, 247, 251, 0.88);
}

html[data-theme="light"] .layout-builder-panel,
html[data-theme="light"] .bg-white\/95 {
  background: rgba(248, 251, 254, 0.96);
}

html[data-theme="light"] .bg-white\/90 {
  background-color: rgba(246, 250, 253, 0.92);
}

html[data-theme="light"] .bg-white\/80 {
  background-color: rgba(241, 247, 252, 0.86);
}

html[data-theme="light"] .bg-white\/70 {
  background-color: rgba(238, 244, 249, 0.8);
}

html[data-theme="light"] .bg-white\/32 {
  background-color: rgba(242, 247, 252, 0.5);
}

html[data-theme="light"] .bg-stone-100 {
  background: rgba(244, 248, 252, 0.98);
}

html[data-theme="light"] .layout-editor-canvas,
html[data-theme="light"] .floor-plan-canvas {
  border-color: rgba(24, 36, 56, 0.1);
  background:
    radial-gradient(circle at 14% 18%, rgba(47, 104, 219, 0.12), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(34, 158, 176, 0.1), transparent 20%),
    linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(240, 246, 252, 0.96));
  box-shadow: 0 20px 42px rgba(44, 72, 114, 0.12);
}

html[data-theme="light"] .layout-editor-grid {
  border-color: rgba(24, 36, 56, 0.08);
  background:
    linear-gradient(to right, rgba(24, 36, 56, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(24, 36, 56, 0.05) 1px, transparent 1px),
    rgba(255, 255, 255, 0.38);
  background-size: 36px 36px;
}

html[data-theme="light"] .floor-plan-room-outline {
  border-color: rgba(24, 36, 56, 0.08);
  background: rgba(255, 255, 255, 0.26);
}

html[data-theme="light"] .layout-editor-background,
html[data-theme="light"] .floor-plan-background {
  opacity: 0.22;
  filter: saturate(0.94) contrast(1.01) brightness(1.05);
}

html[data-theme="light"] .layout-editor-table,
html[data-theme="light"] .floor-plan-table,
html[data-theme="light"] .floor-plan-step,
html[data-theme="light"] .floor-plan-note {
  border-color: rgba(47, 104, 219, 0.2);
  background: rgba(248, 251, 254, 0.97);
  color: var(--ink);
  box-shadow: 0 14px 28px rgba(44, 72, 114, 0.12);
}

html[data-theme="light"] .layout-editor-table small {
  color: rgba(90, 112, 140, 0.92);
}

html[data-theme="light"] .layout-editor-table.is-selected {
  border-color: rgba(34, 158, 176, 0.48);
  background: rgba(34, 158, 176, 0.16);
}

html[data-theme="light"] .layout-editor-counter,
html[data-theme="light"] .floor-plan-bar {
  border-color: rgba(34, 158, 176, 0.3);
  background: rgba(34, 158, 176, 0.14);
  color: var(--cyan);
  box-shadow: 0 12px 24px rgba(34, 158, 176, 0.14);
}

html[data-theme="light"] .layout-editor-counter small {
  color: rgba(34, 158, 176, 0.78);
}

html[data-theme="light"] .layout-editor-entrance,
html[data-theme="light"] .floor-plan-entrance {
  border-color: rgba(200, 132, 23, 0.38);
  background: rgba(200, 132, 23, 0.12);
  color: #9b6714;
  box-shadow: 0 12px 24px rgba(200, 132, 23, 0.12);
}

html[data-theme="light"] .layout-editor-entrance small {
  color: rgba(155, 103, 20, 0.78);
}

html[data-theme="light"] .floor-plan-table.is-upcoming {
  border-color: rgba(200, 132, 23, 0.28);
  background: rgba(200, 132, 23, 0.12);
}

html[data-theme="light"] .floor-plan-table.is-current {
  border-color: rgba(210, 85, 85, 0.28);
  background: rgba(210, 85, 85, 0.12);
}

html[data-theme="light"] .app-nav:not(.is-sidebar)::-webkit-scrollbar-thumb {
  background: rgba(47, 104, 219, 0.28);
}

html[data-theme="light"] .app-nav:not(.is-sidebar)::-webkit-scrollbar-track {
  background: rgba(24, 36, 56, 0.06);
}

html[data-theme="light"] .editor-sidebar-panel {
  background: rgba(248, 251, 254, 0.95);
  border-color: rgba(24, 36, 56, 0.12);
}

html[data-theme="light"] .field,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  color: var(--ink);
  caret-color: var(--accent-strong);
  -webkit-text-fill-color: var(--ink);
}

html[data-theme="light"] .field::placeholder,
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: rgba(90, 112, 140, 0.72);
}

html[data-theme="light"] .field:focus,
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  background: rgba(251, 253, 255, 0.98);
  border-color: rgba(47, 104, 219, 0.22);
  color: var(--ink);
  box-shadow: 0 0 0 4px rgba(47, 104, 219, 0.1);
  outline: none;
}

html[data-theme="light"] input::selection,
html[data-theme="light"] textarea::selection {
  background: rgba(47, 104, 219, 0.18);
  color: var(--ink);
}
