/* Portugal Travel Concierge — shared visual system.
   Tokens extracted from ptc-client-portal trip pages (Playfair + Inter,
   gold on dark, with a light theme). Extended with form + dashboard components. */

:root {
  --gold: #c9a96e;
  --gold-light: #d4b97e;
  --dark: #0a0a0a;
  --dark-card: #111111;
  --dark-surface: #1a1a1a;
  --text: #e8e4df;
  --text-muted: #9a958e;
  --text-light: #c4bfb8;
  --heading: #ffffff;
  --nav-bg: rgba(10, 10, 10, 0.85);
  --border-gold: rgba(201, 169, 110, 0.12);
  --border-gold-stronger: rgba(201, 169, 110, 0.25);
  --tag-bg: rgba(201, 169, 110, 0.08);
  --tag-border: rgba(201, 169, 110, 0.18);
  --danger: #c47a6e;
  --ok: #7ea98a;
}

[data-theme="light"] {
  --dark: #faf7ef;
  --dark-card: #ffffff;
  --dark-surface: #f1ede3;
  --text: #2a2620;
  --text-muted: #6b6558;
  --text-light: #3a3630;
  --heading: #1a1612;
  --nav-bg: rgba(250, 247, 239, 0.88);
  --border-gold: rgba(201, 169, 110, 0.22);
  --border-gold-stronger: rgba(201, 169, 110, 0.38);
  --tag-bg: rgba(201, 169, 110, 0.15);
  --tag-border: rgba(201, 169, 110, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
  min-height: 100vh;
}

h1, h2, h3, .serif { font-family: 'Playfair Display', serif; color: var(--heading); font-weight: 600; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

.brand {
  font-family: 'Playfair Display', serif;
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
}

.divider { width: 48px; height: 1px; background: var(--gold); opacity: 0.4; margin: 1.5rem 0; }
.divider.center { margin-left: auto; margin-right: auto; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: fixed; top: 1.2rem; right: 1.4rem; z-index: 60;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.35);
  color: var(--gold); cursor: pointer;
  backdrop-filter: blur(10px); transition: background 0.2s;
}
.theme-toggle:hover { background: rgba(201, 169, 110, 0.2); }

/* ---------- Layout ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding: 4rem 1.5rem 6rem; }
.wrap-wide { max-width: 1180px; margin: 0 auto; padding: 3rem 1.5rem 6rem; }

.page-head { text-align: center; margin-bottom: 3rem; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.2; margin: 0.4rem 0; }
.page-head .sub { color: var(--text-muted); font-weight: 300; font-size: 1.02rem; }

.hero-tag {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold);
  background: var(--tag-bg); border: 1px solid var(--tag-border);
  padding: 0.35rem 0.9rem; border-radius: 2px; margin-bottom: 1.2rem;
}

/* ---------- Cards / form sections ---------- */
.card {
  background: var(--dark-card);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 1.8rem 1.8rem;
  margin-bottom: 1.4rem;
}
.card h2 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.card .hint { color: var(--text-muted); font-size: 0.85rem; font-weight: 300; margin-bottom: 1.2rem; }

.field { margin-bottom: 1.4rem; }
.field:last-child { margin-bottom: 0; }
.field > label { display: block; font-size: 0.92rem; color: var(--text-light); margin-bottom: 0.55rem; }
.field .opt { color: var(--text-muted); font-size: 0.78rem; }

input[type="text"], input[type="email"], textarea, select {
  width: 100%; font-family: inherit; font-size: 0.95rem;
  color: var(--text); background: var(--dark-surface);
  border: 1px solid var(--border-gold-stronger); border-radius: 3px;
  padding: 0.75rem 0.85rem; transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

/* ---------- Star rating ---------- */
.stars { display: inline-flex; flex-direction: row-reverse; gap: 0.25rem; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label {
  font-size: 1.7rem; line-height: 1; color: var(--border-gold-stronger);
  cursor: pointer; transition: color 0.15s; margin: 0;
}
.stars label:hover, .stars label:hover ~ label,
.stars input:checked ~ label { color: var(--gold); }

/* ---------- NPS 0-10 ---------- */
.nps { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nps input { position: absolute; opacity: 0; pointer-events: none; }
.nps label {
  min-width: 2.2rem; text-align: center; padding: 0.45rem 0; cursor: pointer;
  border: 1px solid var(--border-gold-stronger); border-radius: 3px;
  color: var(--text-muted); font-size: 0.9rem; transition: all 0.15s;
}
.nps label:hover { border-color: var(--gold); color: var(--gold); }
.nps input:checked + label { background: var(--gold); color: #1a1612; border-color: var(--gold); font-weight: 600; }
.nps-ends { display: flex; justify-content: space-between; font-size: 0.74rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ---------- Checkbox ---------- */
.check { display: flex; gap: 0.7rem; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 0.25rem; width: 16px; height: 16px; accent-color: var(--gold); flex-shrink: 0; }
.check span { font-size: 0.9rem; color: var(--text-light); font-weight: 300; }

/* ---------- File input ---------- */
.file-row { display: flex; flex-direction: column; gap: 0.5rem; }
.file-names { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: inherit; font-size: 0.82rem; letter-spacing: 0.12em;
  text-transform: uppercase; cursor: pointer;
  padding: 0.85rem 2rem; border-radius: 3px; transition: all 0.2s;
  border: 1px solid var(--gold); background: var(--gold); color: #1a1612; font-weight: 600;
}
.btn:hover { background: var(--gold-light); border-color: var(--gold-light); color: #1a1612; }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.ghost:hover { background: var(--tag-bg); color: var(--gold-light); }
.btn.small { padding: 0.5rem 1rem; font-size: 0.72rem; }
.btn.danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-row { display: flex; gap: 0.8rem; align-items: center; margin-top: 2rem; }

/* ---------- Centered message page ---------- */
.message-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; text-align: center; }
.message-page .inner { max-width: 540px; padding: 2rem; }
.message-page h1 { font-size: 2rem; font-weight: 400; color: var(--gold); margin-bottom: 0.5rem; }
.message-page p { color: var(--text-muted); font-weight: 300; }
.message-page .subtext { font-size: 0.8rem; color: var(--text-muted); opacity: 0.7; margin-top: 1rem; }

/* ---------- Admin ---------- */
.admin-nav {
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-gold);
  background: var(--nav-bg); backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 40;
}
.admin-nav .brand { margin-right: auto; }
.admin-nav a { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.admin-nav a.active, .admin-nav a:hover { color: var(--gold); }
.admin-nav .who { font-size: 0.78rem; color: var(--text-muted); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.stat {
  background: var(--dark-card); border: 1px solid var(--border-gold);
  border-radius: 4px; padding: 1.3rem 1.4rem;
}
.stat .label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem; }
.stat .value { font-family: 'Playfair Display', serif; font-size: 1.9rem; color: var(--gold); }
.stat .value .of { font-size: 0.9rem; color: var(--text-muted); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--border-gold); }
th { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }
tr:hover td { background: var(--tag-bg); }
td .stars-static { color: var(--gold); letter-spacing: 2px; }

.pill { display: inline-block; font-size: 0.7rem; padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid var(--tag-border); color: var(--text-muted); }
.pill.gold { color: var(--gold); border-color: var(--tag-border); background: var(--tag-bg); }
.pill.ok { color: var(--ok); border-color: rgba(126, 169, 138, 0.4); }

.notice { background: var(--tag-bg); border: 1px solid var(--tag-border); border-radius: 4px; padding: 1rem 1.2rem; margin-bottom: 1.5rem; font-size: 0.88rem; }
.notice.warn { border-color: rgba(196, 122, 110, 0.4); color: var(--danger); }

.link-copy { display: flex; gap: 0.5rem; align-items: center; }
.link-copy code {
  font-family: ui-monospace, monospace; font-size: 0.82rem; color: var(--gold);
  background: var(--dark-surface); padding: 0.4rem 0.6rem; border-radius: 3px;
  border: 1px solid var(--border-gold); overflow-x: auto; white-space: nowrap;
}

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.8rem; margin-top: 1rem; }
.photo-grid img { width: 100%; height: 140px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border-gold); }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }

@media (max-width: 600px) {
  .wrap { padding: 2.5rem 1.1rem 4rem; }
  .btn-row { flex-direction: column; align-items: stretch; }
}
