@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --navy: #5A4A46;
  --magenta: #E8D1CC;
  --blue: #6F847A;
  --line: #E8D1CC;
  --soft: #F7F3EE;
  --white: #FFFFFF;
  --ink: #5A4A46;
  --muted: #7B6A64;
  --danger: #9B4A45;
  --success: #6F847A;
  --shadow: 0 24px 70px rgba(90, 74, 70, 0.10);
  --shadow-soft: 0 14px 34px rgba(90, 74, 70, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--soft);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 4%, rgba(232, 209, 204, 0.55), transparent 24rem),
    radial-gradient(circle at 88% 12%, rgba(111, 132, 122, 0.18), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--soft) 58%, #ffffff 100%);
}

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(111, 132, 122, 0.34);
  outline-offset: 3px;
}

h1, h2, h3,
.metric b,
.brand-mark {
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 22px;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(90, 74, 70, 0.92), rgba(90, 74, 70, 0.86)),
    url("https://images.unsplash.com/photo-1519225421980-715cb0215aed?auto=format&fit=crop&w=900&q=80") center/cover;
  border-right: 1px solid rgba(255, 255, 255, 0.10);
}

.brand {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, rgba(199, 169, 120, 0.95), rgba(111, 132, 122, 0.95));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
}

.brand h1 {
  margin: 0;
  color: var(--white);
  font-size: 2rem;
  line-height: 0.95;
  letter-spacing: 0;
}

.brand span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.6;
}

.brand-contact {
  display: grid;
  gap: 7px;
  padding: 16px;
  color: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.brand-contact a {
  color: var(--white);
  text-decoration: none;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  text-align: left;
}

.nav button.active {
  color: var(--navy);
  background: var(--white);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
}

.nav small {
  color: inherit;
  opacity: 0.62;
}

.main {
  min-width: 0;
  padding: clamp(22px, 4vw, 48px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 26px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--magenta);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar h2 {
  margin: 0;
  max-width: 780px;
  color: var(--navy);
  font-size: clamp(2.25rem, 5vw, 4.85rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: 0;
}

.topbar p {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(90, 74, 70, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(199, 169, 120, 0.45);
  box-shadow: 0 14px 30px rgba(90, 74, 70, 0.10);
}

.btn.primary {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.btn.danger {
  color: var(--white);
  background: var(--danger);
  border-color: var(--danger);
}

.btn.small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.86rem;
}

.ora-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: 22px;
  margin-bottom: 22px;
}

.hero-panel {
  min-height: 330px;
  padding: clamp(26px, 4vw, 46px);
  color: var(--white);
  border-radius: 20px;
  background:
    linear-gradient(115deg, rgba(90, 74, 70, 0.88) 0%, rgba(90, 74, 70, 0.62) 48%, rgba(232, 209, 204, 0.28) 100%),
    url("https://images.unsplash.com/photo-1523438885200-e635ba2c371e?auto=format&fit=crop&w=1400&q=80") center/cover;
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(2.7rem, 6vw, 5.7rem);
  font-weight: 600;
  line-height: 0.9;
}

.hero-panel p {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.75;
}

.contact-card {
  display: grid;
  align-content: space-between;
  gap: 20px;
  padding: 26px;
  color: var(--white);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(90, 74, 70, 0.76), rgba(90, 74, 70, 0.92)),
    url("https://images.unsplash.com/photo-1464366400600-7168b8af9bc3?auto=format&fit=crop&w=900&q=80") center/cover;
  box-shadow: var(--shadow);
}

.contact-card h3 {
  margin: 0;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
}

.contact-card a {
  color: var(--white);
  text-decoration: none;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
}

.card, .panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 226, 226, 0.92);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.card {
  padding: 22px;
}

.metric {
  display: grid;
  gap: 12px;
  min-height: 154px;
}

.metric b {
  color: var(--navy);
  font-size: clamp(2rem, 3vw, 3.1rem);
  font-weight: 600;
  line-height: 0.94;
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.progress {
  height: 7px;
  overflow: hidden;
  background: var(--soft);
  border-radius: 999px;
}

.progress div {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #C7A978);
  border-radius: inherit;
}

.panel {
  padding: 24px;
}

.panel h3 {
  margin: 0 0 16px;
  color: var(--navy);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--magenta);
}

.consent-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--navy);
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  line-height: 1.55;
}

.span-2 { grid-column: 1 / -1; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th, td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--navy);
  background: var(--soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

tr:last-child td { border-bottom: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  color: var(--navy);
  background: rgba(111, 132, 122, 0.14);
  border: 1px solid rgba(111, 132, 122, 0.26);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill.warn {
  color: var(--navy);
  background: rgba(232, 209, 204, 0.55);
  border-color: rgba(232, 209, 204, 0.95);
}

.pill.bad {
  color: var(--danger);
  background: var(--soft);
  border-color: var(--magenta);
}

.pill.blue {
  color: #5A4A46;
  background: rgba(111, 132, 122, 0.14);
  border-color: rgba(111, 132, 122, 0.26);
}

.empty {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 190px;
  padding: 34px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, var(--soft));
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(90, 74, 70, 0.48);
  backdrop-filter: blur(12px);
}

.modal-card {
  width: min(920px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 24px;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(90, 74, 70, 0.28);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 2rem;
}

.seating-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.floor {
  position: relative;
  height: 610px;
  overflow: hidden;
  background:
    linear-gradient(rgba(90, 74, 70, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 74, 70, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, #fff, #F7F3EE);
  background-size: 30px 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.floor-item {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--navy);
  background: var(--white);
  border: 2px solid rgba(111, 132, 122, 0.58);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(90, 74, 70, 0.14);
  user-select: none;
  touch-action: none;
  overflow: visible;
}

.floor-item.round { border-radius: 50%; }
.floor-item.rect { width: 154px; height: 86px; }
.floor-item.square { width: 108px; height: 108px; }
.floor-item.round { width: 120px; height: 120px; }
.floor-item.feature {
  border-color: rgba(199, 169, 120, 0.66);
  background: linear-gradient(135deg, #fff, #F7F3EE);
}

.floor-item strong {
  font-size: 0.86rem;
  text-align: center;
  line-height: 1.15;
}

.floor-item small {
  color: var(--muted);
  font-size: 0.72rem;
}

.table-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.chair-ring {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.chair {
  position: absolute;
  display: grid;
  place-items: center;
  width: 18px;
  height: 14px;
  padding: 0;
  color: var(--navy);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 999px 999px 6px 6px;
  box-shadow: 0 4px 10px rgba(90, 74, 70, 0.10);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.chair::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 3px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.32;
}

.chair::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -4px;
  height: 4px;
  border-left: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  opacity: 0.45;
}

.chair span {
  position: relative;
  z-index: 1;
  display: block;
  padding-top: 2px;
  font-size: 0.44rem;
  font-weight: 800;
  line-height: 1;
}

.chair.occupied {
  color: var(--white);
  background: var(--navy);
  border-color: transparent;
}

.chair.occupied.bride {
  color: var(--navy);
  background: var(--magenta);
  border-color: rgba(90, 74, 70, 0.18);
}

.chair.occupied.groom {
  color: var(--white);
  background: var(--blue);
}

.chair.occupied.couple {
  color: var(--navy);
  background: #C7A978;
  border-color: rgba(90, 74, 70, 0.20);
}

.chair.empty {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(90, 74, 70, 0.20);
  box-shadow: none;
  opacity: 0.72;
}

.chair.child {
  width: 15px;
  height: 12px;
}

.chair.vip {
  outline: 2px solid rgba(199, 169, 120, 0.55);
}

.chair.selected {
  outline: 3px solid rgba(199, 169, 120, 0.42);
  box-shadow: 0 0 0 5px rgba(111, 132, 122, 0.18), 0 8px 18px rgba(90, 74, 70, 0.18);
}

.chair:hover {
  z-index: 8;
  transform: translate(-50%, -50%) scale(1.22);
}

.export-options {
  display: grid;
  gap: 16px;
}

.callout-mini {
  padding: 14px 16px;
  color: var(--navy);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  line-height: 1.6;
}

.guest-stack {
  display: grid;
  gap: 10px;
  max-height: 610px;
  overflow: auto;
}

.chair-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.chair-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.chair-sample {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 12px;
  color: var(--muted);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px 999px 5px 5px;
}

.chair-sample::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -4px;
  height: 4px;
  border-left: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  opacity: 0.45;
}

.chair-sample.occupied {
  color: var(--navy);
  background: var(--navy);
  border-color: var(--navy);
}

.chair-sample.bride {
  color: var(--navy);
  background: var(--magenta);
  border-color: var(--navy);
}

.chair-sample.groom {
  color: var(--blue);
  background: var(--blue);
  border-color: var(--blue);
}

.chair-sample.couple {
  color: var(--navy);
  background: #C7A978;
  border-color: var(--navy);
}

.guest-chip {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.guest-chip[draggable="true"] { cursor: grab; }

.mini-list {
  display: grid;
  gap: 10px;
}

.inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.stat-list {
  display: grid;
  gap: 10px;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.print-area {
  display: grid;
  gap: 18px;
}

.print-sheet {
  padding: 34px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.print-sheet h2, .print-sheet h3 {
  text-align: center;
}

.print-columns {
  column-count: 3;
  column-gap: 28px;
}

.print-line {
  break-inside: avoid;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.cards-print {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.table-card {
  min-height: 160px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(380px, calc(100vw - 36px));
  padding: 14px 18px;
  color: var(--white);
  background: var(--navy);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.hidden { display: none !important; }

.planner-state,
.ora-planner-login {
  display: grid;
  place-items: center;
  gap: 16px;
  min-height: 540px;
  padding: 48px 22px;
  color: var(--navy);
  text-align: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(232, 209, 204, 0.55), transparent 22rem),
    radial-gradient(circle at 80% 10%, rgba(111, 132, 122, 0.18), transparent 24rem),
    var(--soft);
  border-radius: 20px;
}

.planner-state h1,
.ora-planner-login h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 0.92;
}

.planner-state p,
.ora-planner-login p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.ora-planner-login__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 22px;
  color: var(--white);
  text-decoration: none;
  background: linear-gradient(135deg, var(--magenta), var(--blue));
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 1100px) {
  .grid.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ora-hero { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }
  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid.two, .seating-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .main { padding: 20px 12px; }
  .topbar { flex-direction: column; }
  .topbar h2, .hero-panel h2 { font-size: 2.7rem; }
  .nav { grid-template-columns: 1fr; }
  .grid.cards, .form-grid { grid-template-columns: 1fr; }
  .floor { height: 460px; }
  .print-columns { column-count: 1; }
  .cards-print { grid-template-columns: 1fr; }
  .hero-panel, .contact-card, .panel, .card { border-radius: 20px; }
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .toolbar, .no-print, .toast, .ora-hero { display: none !important; }
  .app-shell, .main { display: block; padding: 0; }
  .panel, .card, .print-sheet {
    box-shadow: none;
    border: 0;
    background: #fff;
  }
  .print-sheet { page-break-after: always; }
}
