/* Atlas & Isla Planner — visual identity matched to atlasislarentals.com:
   Cormorant Garamond serif display type, warm antique gold, deep ink,
   ivory surfaces, and a forest-green secondary accent pulled from the
   logo mark. Deeper/more saturated tones than the marketing site's own
   palette are used for interactive elements so they hold contrast on a
   light, working application surface rather than a dark hero image. */

:root {
  color-scheme: light; /* this app is light-themed only; opt out of browser/OS auto-dark
                           repainting so surfaces, images, and the logo render as authored
                           instead of being heuristically inverted/adjusted */
  --ink: #211d1b;
  --ink-muted: #6d6259;
  --ink-faint: #a39687;
  --surface: #faf6f0;
  --surface-card: #fffdfa;
  --surface-sunken: #f2eadf;
  --border: #e6dcce;
  --border-soft: #efe7db;

  --brand: #a9772e;         /* deep antique gold - primary interactive color */
  --brand-dark: #8a5f22;
  --brand-tint: #f3e6cf;
  --gold-bright: #d7b67c;   /* true marketing-site gold, for decorative use on dark */

  --forest: #33463a;        /* secondary accent, pulled from the logo wordmark */
  --forest-tint: #e4e9e2;

  --good: #2f6b48;
  --good-bg: #e3efe6;
  --warn: #a06a12;
  --warn-bg: #f8edd8;
  --critical: #a3392c;
  --critical-bg: #f8e6e2;

  --radius: 12px;
  --radius-sm: 8px;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top nav ---------- */
.topnav {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand img.logo-mark { height: 40px; width: auto; display: block; }
.brand .brand-word { color: var(--forest); }
.brand .brand-word.accent { color: var(--brand); }
.nav-links { display: flex; gap: 22px; align-items: center; font-size: 0.86rem; }
.nav-links a { color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; font-size: 0.78rem; }
.nav-links a.active { color: var(--brand-dark); }
.nav-user { font-size: 0.84rem; color: var(--ink-faint); margin-right: 4px; font-style: italic; font-family: var(--serif); }

.event-subnav {
  background: var(--forest);
}
.event-subnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 11px 24px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.event-subnav a {
  padding: 7px 15px;
  border-radius: 999px;
  color: #dfe6e1;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.event-subnav a.active { background: var(--gold-bright); color: #2b2109; }
.event-subnav a:hover { text-decoration: none; background: rgba(255,255,255,0.12); }
.event-subnav a.active:hover { background: var(--gold-bright); }
.event-subnav .event-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin-right: 14px; color: #fff; }

main.page { padding: 32px 0 64px; }

h1.page-title { font-family: var(--serif); font-weight: 600; font-size: 2.1rem; margin: 0 0 6px; color: var(--ink); }
p.page-subtitle { color: var(--ink-muted); margin: 0 0 26px; font-size: 0.96rem; max-width: 640px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(33, 29, 27, 0.03);
}
.card h2 { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; margin: 0 0 16px; color: var(--ink); }
.card-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.card-header h2 { margin: 0; }

/* ---------- Stat tiles ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-tile {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat-tile .num { font-family: var(--serif); font-size: 2rem; font-weight: 600; color: var(--ink); line-height: 1; }
.stat-tile .label { font-size: 0.78rem; color: var(--ink-muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--brand-dark); }
.btn.secondary:hover { background: var(--brand-tint); }
.btn.small { padding: 6px 13px; font-size: 0.76rem; }
.btn.danger { background: var(--critical); border-color: var(--critical); }
.btn.danger:hover { background: #7f2a20; border-color: #7f2a20; }
.btn.navy, .btn.forest { background: var(--forest); border-color: var(--forest); }
.btn.navy:hover, .btn.forest:hover { background: #24312a; border-color: #24312a; }

/* ---------- Forms ---------- */
label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ink-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.03em; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], input[type=url], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
textarea { resize: vertical; min-height: 64px; }
.field { margin-bottom: 15px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
.checkbox-row label { text-transform: none; font-weight: 500; }
.field-hint { font-size: 0.76rem; color: var(--ink-faint); margin-top: -10px; margin-bottom: 14px; }

/* ---------- Tables ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); padding: 9px 10px; border-bottom: 1px solid var(--border); font-weight: 700; }
table.data td { padding: 11px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.critical { background: var(--critical-bg); color: var(--critical); }
.badge.neutral { background: var(--forest-tint); color: var(--forest); }
.badge.gold { background: var(--brand-tint); color: var(--brand-dark); }

/* ---------- Progress bar (budget) ---------- */
.progress-track { background: var(--border-soft); border-radius: 999px; height: 9px; overflow: hidden; position: relative; }
.progress-fill { height: 100%; border-radius: 999px; }
.progress-fill.good { background: var(--good); }
.progress-fill.warn { background: var(--warn); }
.progress-fill.critical { background: var(--critical); }

/* ---------- Budget allocation chart ---------- */
.budget-chart-bar {
  display: flex;
  width: 100%;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border-soft);
  gap: 2px;
}
.budget-chart-segment { height: 100%; min-width: 2px; }
.budget-chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 0.82rem; }
.budget-chart-legend .legend-item { display: flex; align-items: center; gap: 7px; color: var(--ink-muted); }
.budget-chart-legend .swatch { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.budget-chart-legend .legend-item strong { color: var(--ink); font-weight: 700; }

/* ---------- Flash messages ---------- */
.flash { padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 0.9rem; border: 1px solid transparent; }
.flash.success { background: var(--good-bg); color: var(--good); border-color: rgba(47,107,72,0.18); }
.flash.error { background: var(--critical-bg); color: var(--critical); border-color: rgba(163,57,44,0.18); }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--ink); background: radial-gradient(circle at 50% 0%, #2c2620 0%, #17130f 70%); padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 36px; box-shadow: 0 20px 60px rgba(0,0,0,0.35); }
.auth-card .brand { display: flex; justify-content: center; text-align: center; margin-bottom: 26px; font-size: 1.6rem; }
.auth-card .brand img.logo-mark { height: 44px; width: auto; }
.auth-footnote { text-align: center; font-size: 0.82rem; color: var(--ink-faint); margin-top: 18px; }

/* ---------- Empty state ---------- */
.empty { color: var(--ink-faint); font-size: 0.9rem; padding: 22px 0; text-align: center; font-style: italic; font-family: var(--serif); }

/* ---------- Seating ---------- */
.chart-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.chart-tabs a {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted);
  background: var(--surface-sunken, var(--border-soft));
  border: 1px solid var(--border);
}
.chart-tabs a.active { background: var(--forest); color: #fff; border-color: var(--forest); }
.chart-tabs a:hover { text-decoration: none; }

.seating-canvas {
  position: relative;
  width: 100%;
  height: 520px;
  background: var(--surface-card);
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.seating-table {
  position: absolute;
  background: var(--brand-tint);
  border: 2px solid var(--brand);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 110px;
  cursor: grab;
  user-select: none;
  font-size: 0.78rem;
}
.seating-table.round { border-radius: 50%; text-align: center; width: 120px; height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.seating-table .t-name { font-weight: 700; font-size: 0.85rem; font-family: var(--serif); }
.seating-table .t-count { color: var(--ink-muted); }

/* ---------- Collaborators / sharing ---------- */
.collab-list { list-style: none; margin: 0 0 16px; padding: 0; }
.collab-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 0.9rem; }
.collab-list li:last-child { border-bottom: none; }

@media (max-width: 640px) {
  .topnav-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
