/* LOV Angels — The Roy Private Residence
   Luxury editorial styling. Warm ivory, fine gold accents, generous space. */

:root {
  --bg: #F6F0E7;
  --card: #FFFCF7;
  --text: #1F1B17;
  --text-soft: #746B61;
  --gold: #B99A62;
  --gold-dark: #8E7248;
  --border: #DCCDBA;
  --success: #506A57;
  --error: #8B4A45;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(31, 27, 23, 0.04), 0 12px 32px -16px rgba(31, 27, 23, 0.18);
  --font-display: "Cormorant Garamond", "Georgia", serif;
  --font-body: "Inter", -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--text);
}

p { margin: 0; }
button { font-family: var(--font-body); }
a { color: var(--gold-dark); text-decoration: none; }

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 88px;
}

/* ---------- Utility ---------- */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
}
.text-soft { color: var(--text-soft); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.spacer { height: 16px; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-dark);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: rgba(185, 154, 98, 0.1); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 2px; }

.btn-primary {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #FFFCF7;
  box-shadow: 0 8px 20px -10px rgba(142, 114, 72, 0.6);
}
.btn-primary:hover { background: #7a6039; }

.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(31, 27, 23, 0.04); }

.btn-danger { border-color: var(--error); color: var(--error); }
.btn-danger:hover { background: rgba(139, 74, 69, 0.08); }

.btn-sm { min-height: 34px; padding: 6px 14px; font-size: 12.5px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--card); cursor: pointer;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.card + .card { margin-top: 14px; }

.section-title {
  font-family: var(--font-display);
  font-size: 21px;
  margin-bottom: 12px;
}

/* ---------- Forms ---------- */
label { display: block; font-size: 12.5px; color: var(--text-soft); margin-bottom: 6px; font-weight: 500; }
.field { margin-bottom: 14px; }
input[type="text"], input[type="number"], input[type="password"], input[type="time"], input[type="date"], select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #FFFEFC;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14.5px;
  font-family: var(--font-body);
  color: var(--text);
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(185, 154, 98, 0.18);
}
.checkbox-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.checkbox-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--gold-dark); }
.toggle-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  background: #FFFEFC;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}
.chip.active { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.chip:hover { border-color: var(--gold); }

/* ---------- Badges / status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
  background: rgba(185, 154, 98, 0.14); color: var(--gold-dark);
}
.badge.success { background: rgba(80, 106, 87, 0.14); color: var(--success); }
.badge.error { background: rgba(139, 74, 69, 0.14); color: var(--error); }
.badge.neutral { background: rgba(116, 107, 97, 0.14); color: var(--text-soft); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.allergy-banner {
  border: 1px solid var(--error);
  background: rgba(139, 74, 69, 0.06);
  color: var(--error);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ---------- Header / hero ---------- */
.hero {
  position: relative;
  padding: 40px 24px 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 0%, rgba(185, 154, 98, 0.30), transparent 55%),
    radial-gradient(circle at 90% 20%, rgba(142, 114, 72, 0.22), transparent 45%),
    linear-gradient(160deg, #2b241c 0%, #1f1b17 55%, #171310 100%);
  color: #F6F0E7;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(246,240,231,0.035) 0px, rgba(246,240,231,0.035) 1px, transparent 1px, transparent 26px);
  pointer-events: none;
}
.hero-brand { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.hero-monogram {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(246,240,231,0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.05em;
}
.hero-title { font-size: 30px; margin-top: 22px; position: relative; z-index: 1; }
.hero-sub { color: rgba(246,240,231,0.7); font-size: 13px; margin-top: 6px; position: relative; z-index: 1; }
.hero-dates { margin-top: 18px; display: flex; gap: 18px; position: relative; z-index: 1; }
.hero-dates div { font-size: 12px; color: rgba(246,240,231,0.55); }
.hero-dates strong { display: block; font-family: var(--font-display); font-size: 17px; color: #F6F0E7; font-weight: 500; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 8px;
}
.topbar .eyebrow { font-size: 10.5px; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 40;
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 2px;
  border-radius: 12px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  min-height: 44px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-item svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
.nav-item.active { color: var(--gold-dark); background: rgba(185, 154, 98, 0.12); }
.nav-item:active { transform: scale(0.96); }

/* ---------- Main content ---------- */
.view { padding: 18px 18px 24px; animation: fadein 0.28s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.quick-action {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; background: var(--card); cursor: pointer; text-align: left;
  min-height: 78px; transition: border-color 0.15s ease, transform 0.15s ease;
}
.quick-action:hover { border-color: var(--gold); }
.quick-action:active { transform: scale(0.98); }
.quick-action .qa-title { font-weight: 600; font-size: 13px; }
.quick-action svg { width: 20px; height: 20px; stroke: var(--gold-dark); fill: none; }

.list-item {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }

.empty-state { text-align: center; padding: 40px 16px; color: var(--text-soft); }
.empty-state svg { width: 44px; height: 44px; stroke: var(--gold); margin-bottom: 12px; }

.skeleton {
  background: linear-gradient(100deg, rgba(220,205,186,0.3) 30%, rgba(220,205,186,0.55) 50%, rgba(220,205,186,0.3) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
  height: 64px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Toasts ---------- */
.toast-root {
  position: fixed; top: 14px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 200; pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--text); color: #fff;
  padding: 12px 18px; border-radius: 999px;
  font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: toastin 0.2s ease;
  max-width: 90vw;
}
.toast.error { background: var(--error); }
.toast.success { background: var(--success); }
@keyframes toastin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Login ---------- */
.login-screen { min-height: 100vh; display: flex; flex-direction: column; }
.login-body { padding: 28px 24px; flex: 1; }
.guest-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.guest-select-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 12px;
  background: var(--card); cursor: pointer; text-align: center; font-size: 13.5px; font-weight: 500;
  transition: all 0.15s ease; min-height: 60px; display: flex; align-items: center; justify-content: center;
}
.guest-select-item:hover { border-color: var(--gold); background: rgba(185,154,98,0.06); }

.link-btn {
  background: none; border: none; color: var(--gold-dark); font-size: 12.5px;
  cursor: pointer; padding: 6px 0; text-decoration: underline; font-weight: 500;
}

/* ---------- Experience cards ---------- */
.exp-card { position: relative; overflow: hidden; }
.exp-card .exp-kind { position: absolute; top: 14px; right: 14px; }
.exp-title { font-family: var(--font-display); font-size: 19px; margin-top: 4px; }
.exp-desc { color: var(--text-soft); font-size: 13px; margin-top: 6px; }

/* ---------- Tables (admin) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; min-width: 640px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { background: rgba(185,154,98,0.08); font-weight: 600; color: var(--gold-dark); position: sticky; top: 0; }
tr:hover td { background: rgba(185,154,98,0.04); }
.cell-missing { background: rgba(139,74,69,0.1) !important; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.stat-tile .stat-num { font-family: var(--font-display); font-size: 26px; }
.stat-tile .stat-label { font-size: 11px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

.tab-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.tab-btn {
  border: 1px solid var(--border); background: var(--card); border-radius: 999px;
  padding: 8px 14px; font-size: 12.5px; white-space: nowrap; cursor: pointer; min-height: 38px;
}
.tab-btn.active { background: var(--text); color: #fff; border-color: var(--text); }

.two-col-timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.timeline-col h4 { font-size: 13px; text-align: center; margin-bottom: 8px; }
.timeline-slot { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; font-size: 12px; background: var(--card); }
.timeline-slot.blocked { background: rgba(116,107,97,0.1); }
.timeline-slot.cancelled { opacity: 0.5; text-decoration: line-through; }

@media print {
  .bottom-nav, .no-print { display: none !important; }
  body { background: #fff; }
  .view { padding: 0; }
}

@media (min-width: 640px) {
  .app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}
