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

:root {
  /* Theme */
  --bg: #050505;
  --card: rgba(10, 10, 10, 0.62);
  --card-solid: #0b0b0b;

  --text: rgba(245, 232, 205, 0.96);
  --muted: rgba(245, 232, 205, 0.72);
  --border: rgba(202, 163, 92, 0.28);

  /* Accents */
  --gold: #caa35c;
  --gold-soft: #f1d79a;

  /* Keep semantic names used across app */
  --blue: var(--gold);
  --red: #dc2626;
  --green: #10b981;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Decorative background (optional image + subtle vignette) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 70% 40%, rgba(202, 163, 92, 0.10), transparent 60%),
    radial-gradient(900px 500px at 20% 20%, rgba(202, 163, 92, 0.08), transparent 55%),
    radial-gradient(900px 500px at 80% 90%, rgba(202, 163, 92, 0.06), transparent 55%),
    linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.85)),
    url("public/assets/fain-bg.png");
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.02);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(1200px 600px at 50% 0%, transparent 40%, rgba(0,0,0,0.75) 80%);
  z-index: -1;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 44px 16px 70px;
}

h1 {
  margin: 0 0 10px;
  font-size: 42px;
  line-height: 1.1;
  font-family: "Playfair Display", serif;
  letter-spacing: 0.3px;
}

h2 {
  margin: 0 0 10px;
  font-size: 20px;
  font-family: "Playfair Display", serif;
  letter-spacing: 0.2px;
}

h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-family: "Playfair Display", serif;
  letter-spacing: 0.15px;
}

.card {
  background: linear-gradient(180deg, rgba(10,10,10,0.70), rgba(10,10,10,0.52));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(202, 163, 92, 0.06) inset;
  backdrop-filter: blur(6px);
}

.stack {
  display: grid;
  gap: 14px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.row.space {
  justify-content: space-between;
  align-items: flex-start;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(245, 232, 205, 0.92);
}

input {
  width: 100%;
  padding: 12px 12px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid rgba(202, 163, 92, 0.32);
  outline: none;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset;
}

input::placeholder {
  color: rgba(245, 232, 205, 0.45);
}

input:focus {
  border-color: rgba(241, 215, 154, 0.75);
  box-shadow:
    0 0 0 4px rgba(202, 163, 92, 0.18),
    0 0 0 1px rgba(202, 163, 92, 0.45) inset;
}

button,
.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 16px;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(241,215,154,0.98), rgba(202,163,92,0.98));
  color: #1a1208;
  font-weight: 700;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(202, 163, 92, 0.25) inset;
}

button:hover,
.btn:hover {
  filter: brightness(1.02);
}

button:active,
.btn:active {
  transform: translateY(1px);
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.btn.danger,
.danger button {
  background: linear-gradient(180deg, rgba(255, 90, 90, 0.98), rgba(220, 38, 38, 0.98));
  color: white;
}

button.outline,
.btn.outline {
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(202, 163, 92, 0.32);
  color: var(--text);
  box-shadow: none;
}

button.outline:hover,
.btn.outline:hover {
  border-color: rgba(241, 215, 154, 0.7);
  color: rgba(241, 215, 154, 0.95);
  background: rgba(202, 163, 92, 0.10);
}

.row.align-start {
  align-items: flex-start;
}

.muted {
  color: var(--muted);
  margin: 6px 0 0;
}

.kv {
  margin: 6px 0;
}

.hint {
  margin-top: 10px;
  color: rgba(245, 232, 205, 0.68);
  font-size: 14px;
}

code {
  color: rgba(241, 215, 154, 0.95);
}

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

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

@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.link {
  color: rgba(241, 215, 154, 0.95);
  text-decoration: none;
  font-weight: 700;
}

.link:hover {
  text-decoration: underline;
}

/* Skeleton adapted to dark */
.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(241,215,154,0.10), rgba(255,255,255,0.06));
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* MAP STYLES */
.map-container {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(202, 163, 92, 0.28);
  background: rgba(0,0,0,0.35);
}

.map-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

/* The first image (Ground Floor) sets the container height */
.map-layer:first-of-type {
  position: relative;
}

.map-layer.active { opacity: 1; }
.map-layer.dimmed { opacity: 0.4; }
.map-layer.hidden { opacity: 0; }

.map-table {
  position: absolute;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.map-table:hover {
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 20;
}

/* The central table circle */
.table-center {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(245, 232, 205, 0.18);
  border: 2px solid rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: rgba(245, 232, 205, 0.92);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 2;
}

/* Status colors for the table center */
.map-table.status-empty .table-center {
  background: linear-gradient(180deg, rgba(241,215,154,0.98), rgba(202,163,92,0.98));
  color: #1a1208;
}

.map-table.status-partial .table-center {
  background: linear-gradient(180deg, rgba(255, 196, 92, 0.98), rgba(245, 158, 11, 0.98));
  color: #1a1208;
}

.map-table.status-full .table-center {
  background: linear-gradient(180deg, rgba(255, 90, 90, 0.98), rgba(220, 38, 38, 0.98));
  color: white;
}

.map-table.status-current .table-center {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.98), rgba(16, 185, 129, 0.98));
  box-shadow:
    0 0 0 4px rgba(16, 185, 129, 0.26),
    0 10px 18px rgba(0, 0, 0, 0.45);
  color: #062014;
}

/* Chairs */
.chair {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.chair.free {
  background: linear-gradient(180deg, rgba(241,215,154,0.98), rgba(202,163,92,0.98));
}

.chair.occupied {
  background: linear-gradient(180deg, rgba(255, 90, 90, 0.98), rgba(220, 38, 38, 0.98));
}

.map-table.standing-table .table-center {
  border-radius: 6px;
  width: 40px;
  height: 40px;
  background: rgba(245, 232, 205, 0.10);
  border: 2px solid rgba(241, 215, 154, 0.55);
}

/* If standing table is selected/etc, override */
.map-table.standing-table.status-current .table-center {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.98), rgba(16, 185, 129, 0.98));
  border-color: rgba(255,255,255,0.2);
}

.map-table.standing-table.status-full .table-center {
  background: linear-gradient(180deg, rgba(255, 90, 90, 0.98), rgba(220, 38, 38, 0.98));
}

/* =========================================================
   INDEX TWO-PAGE / SPREAD LAYOUT + 130% SCALE (APPEND ONLY)
   ========================================================= */

/* Wrapper for index page (use <main class="page">) */
.page{
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: clamp(16px, 3vw, 40px);
  display: grid;
  place-items: center;

  /* allow scroll if scaled layout exceeds viewport */
  overflow: auto;
}

/* IMPORTANT: prevent .container max-width from limiting the spread
   (only when container is inside .page, other pages stay unchanged) */
.page .container{
  max-width: none;
  padding: 0;
}

/* The two "pages" grid (use <div class="spread">) */
.spread{
  width: min(1200px, 96vw);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 2vw, 24px);
  align-items: stretch;

  /* 130% scale on big desktop */
  transform: scale(1.3);
  transform-origin: center center;
}

@media (min-width: 980px){
  .spread{
    grid-template-columns: 1fr 1fr;
  }
}

/* Responsive scaling so it doesn’t cut off on smaller desktops */
@media (max-width: 1400px){
  .spread{ transform: scale(1.18); }
}
@media (max-width: 1200px){
  .spread{ transform: scale(1.08); }
}
@media (max-width: 980px){
  .spread{ transform: none; } /* tablet/mobil normal size */
}

/* Optional: panel styling (if you use .panel/.panel__inner in index.php) */
.panel{
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(10,10,10,0.70), rgba(10,10,10,0.52));
  border: 1px solid var(--border);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(202, 163, 92, 0.06) inset;
  backdrop-filter: blur(6px);
  overflow: hidden;
  position: relative;
  min-height: 640px;
  display: flex;
}

.panel::before{
  content:"";
  position:absolute;
  inset: 18px;
  border-radius: 18px;
  border: 1px solid rgba(202, 163, 92, 0.14);
  pointer-events:none;
}

.panel__inner{
  width: 100%;
  padding: clamp(28px, 3.2vw, 56px);
  text-align: center;
  margin: auto;
}
