/* ─────────────────────────────────────────────────────────────
   FITCALIX shared styles for the new pages (admin + Transformations).
   Mirrors index.html's palette, fonts and button classes so everything
   looks like one site. index.html keeps its own inline styles.
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #0b0f0c;
  --panel: #10150f;
  --panel-2: #0b0f0c;
  --accent: #22d95e;
  --accent-hi: #7aeea1;
  --text: #f5f7f3;
  --muted: #8f9a8f;
  --muted-2: #b8c2b8;
  --line: rgba(245, 247, 243, 0.1);
  --line-strong: rgba(245, 247, 243, 0.18);
  --danger: #ff6b6b;
  --danger-hi: #ff8080;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }

/* Header / nav (shared with the public pages) */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 12, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245, 247, 243, 0.08);
}
.site-nav {
  max-width: 1200px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--text); }
.brand b { font-family: 'Anton', sans-serif; font-weight: 400; font-size: 22px; letter-spacing: 1px; color: var(--text); }
.brand span { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 3px; color: var(--accent); }
.brand-logo { height: 34px; width: auto; border-radius: 6px; align-self: center; }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav-link { color: #c9d1c9; font-weight: 600; font-size: 14px; letter-spacing: 0.5px; padding: 8px 10px; border-radius: 6px; transition: color 0.2s; }
.nav-link:hover { color: var(--accent); }
.nav-cta { color: var(--bg); background: var(--accent); font-weight: 700; font-size: 14px; letter-spacing: 0.5px; padding: 8px 14px; border-radius: 6px; transition: background 0.2s; }
.nav-cta:hover { background: var(--accent-hi); color: var(--bg); }

/* Mobile hamburger nav (shared) */
.nav-toggle { display: none; background: transparent; border: none; color: var(--text); cursor: pointer; padding: 6px 8px; border-radius: 8px; transition: color 0.2s; }
.nav-toggle:hover { color: var(--accent); }
.nav-toggle-icon { font-size: 26px; line-height: 1; display: block; }
.nav-backdrop { display: none; }

@media (max-width: 768px) {
  .site-nav { flex-wrap: nowrap; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 65; }
  .nav-links {
    position: fixed; top: 0; right: 0; z-index: 60;
    width: min(80vw, 300px); height: 100vh; height: 100dvh;
    flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 4px;
    background: var(--panel); border-left: 1px solid var(--line);
    padding: 82px 20px 28px; box-shadow: -18px 0 50px rgba(0, 0, 0, 0.55);
    transform: translateX(100%); transition: transform 0.28s ease; overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links .nav-link { font-size: 17px; padding: 13px 12px; border-radius: 8px; }
  .nav-links .nav-link:hover { background: rgba(34, 217, 94, 0.08); color: var(--accent); }
  .nav-links .nav-cta { text-align: center; font-size: 16px; padding: 14px; margin-top: 10px; }
  .nav-backdrop { display: block; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 55; background: rgba(4, 7, 5, 0.6); opacity: 0; pointer-events: none; transition: opacity 0.28s ease; }
  .nav-backdrop.open { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
}

/* Section shell */
.wrap { max-width: 1200px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 20px; }
.wrap-narrow { max-width: 720px; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; }
h1.page-title, h2.page-title {
  margin: 8px 0 0; font-family: 'Anton', sans-serif; font-weight: 400;
  font-size: clamp(30px, 4.5vw, 48px); text-transform: uppercase; letter-spacing: 0.5px;
}
.lead { color: var(--muted-2); font-size: 17px; line-height: 1.6; max-width: 560px; }

/* Buttons (match index.html) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-family: inherit; font-weight: 700; border-radius: 10px; transition: background 0.2s, border-color 0.2s, color 0.2s; border: none; }
.btn-primary { background: var(--accent); color: var(--bg); font-size: 16px; padding: 13px 24px; }
.btn-primary:hover { background: var(--accent-hi); color: var(--bg); }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--line-strong); font-size: 15px; padding: 9px 18px; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: transparent; color: var(--danger-hi); border: 1px solid rgba(255, 107, 107, 0.5); font-size: 14px; padding: 7px 14px; }
.btn-danger:hover { background: rgba(255, 107, 107, 0.12); }
.btn-sm { font-size: 13px; padding: 6px 12px; border-radius: 8px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Cards / panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.field label { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted-2); }
.field input, .field select, .field textarea {
  background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 12px 14px; color: var(--text); font-family: inherit; font-size: 15px; transition: border-color 0.2s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field input[type="file"] { padding: 10px; }
.field .hint { color: var(--muted); font-size: 12.5px; }

/* Status message strip */
.status { margin-top: 14px; font-size: 14px; line-height: 1.5; min-height: 1px; }
.status.ok { color: var(--accent); }
.status.err { color: var(--danger-hi); }

/* Tables */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 12px; }
.search { flex: 1; min-width: 220px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 720px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data thead th { position: sticky; top: 0; background: var(--panel); color: var(--muted-2); font-family: 'Barlow Condensed', sans-serif; letter-spacing: 1.5px; text-transform: uppercase; font-size: 12.5px; cursor: pointer; user-select: none; white-space: nowrap; }
table.data thead th .arrow { color: var(--accent); }
table.data tbody tr:hover { background: rgba(34, 217, 94, 0.05); }
table.data td input, table.data td select { width: 100%; }

/* Pills */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.pill.active, .pill.approved, .pill.published { background: rgba(34, 217, 94, 0.15); color: var(--accent); }
.pill.paused, .pill.pending, .pill.draft { background: rgba(245, 197, 66, 0.15); color: #f5c542; }
.pill.expired, .pill.rejected { background: rgba(255, 107, 107, 0.15); color: var(--danger-hi); }
.pill.kind-event { background: rgba(34, 217, 94, 0.15); color: var(--accent); }
.pill.kind-update { background: rgba(122, 162, 247, 0.16); color: #9db4ff; }
.pill.past { background: rgba(245, 247, 243, 0.08); color: var(--muted); }

/* Transformation cards (public page + admin thumbnails) */
.tx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; margin-top: 28px; }
.tx-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.tx-images { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); }
.tx-images figure { margin: 0; position: relative; background: var(--panel-2); }
.tx-images img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.tx-images figcaption { position: absolute; top: 8px; left: 8px; background: rgba(11, 15, 12, 0.8); color: var(--text); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; }
.tx-images figcaption.after { color: var(--bg); background: var(--accent); }
.tx-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.tx-body h3 { margin: 0; font-family: 'Anton', sans-serif; font-weight: 400; font-size: 22px; text-transform: uppercase; letter-spacing: 0.5px; }
.tx-body p { margin: 0; color: var(--muted-2); font-size: 14.5px; line-height: 1.55; }

/* Events & Updates (public page + admin summaries) */
.ev-section { margin-top: 40px; }
.ev-section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ev-section-head h2 { margin: 0; font-family: 'Anton', sans-serif; font-weight: 400; font-size: clamp(22px, 3.2vw, 30px); text-transform: uppercase; letter-spacing: 0.5px; }
.ev-section-head .count { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; color: var(--muted); }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 20px; }
.ev-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.ev-media { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--panel-2); border-bottom: 1px solid var(--line); cursor: zoom-in; }
.ev-card-inner { padding: 18px; display: grid; grid-template-columns: 62px 1fr; gap: 16px; align-items: start; }
.ev-date { background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 6px; text-align: center; line-height: 1; }
.ev-date .mon { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; color: var(--accent); }
.ev-date .day { font-family: 'Anton', sans-serif; font-size: 26px; margin-top: 4px; }
.ev-date .yr { font-size: 11px; color: var(--muted); margin-top: 4px; }
.ev-body { min-width: 0; }
.ev-body .ev-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ev-body h3 { margin: 0; font-family: 'Anton', sans-serif; font-weight: 400; font-size: 20px; text-transform: uppercase; letter-spacing: 0.5px; }
.ev-body p { margin: 8px 0 0; color: var(--muted-2); font-size: 14.5px; line-height: 1.55; }
.ev-meta { margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.ev-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Lightbox — click a card photo to view it full size */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(4, 7, 5, 0.92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; border-radius: 8px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); cursor: default; }
.lightbox-close { position: absolute; top: 14px; right: 20px; background: transparent; border: none; color: #f5f7f3; font-size: 42px; line-height: 1; cursor: pointer; padding: 4px 10px; border-radius: 8px; }
.lightbox-close:hover { color: var(--accent); }

/* Empty / loading states */
.state { text-align: center; padding: 56px 20px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 16px; margin-top: 24px; }
.state h3 { margin: 0 0 6px; color: var(--text); font-family: 'Anton', sans-serif; font-weight: 400; font-size: 24px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Spinner */
.spinner { width: 16px; height: 16px; border: 2px solid rgba(11, 15, 12, 0.35); border-top-color: var(--bg); border-radius: 50%; display: inline-block; animation: spin 0.7s linear infinite; }
.spinner.dark { border: 2px solid rgba(245, 247, 243, 0.25); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.site-footer { background: #060907; border-top: 1px solid rgba(245, 247, 243, 0.08); }
.site-footer .inner { max-width: 1200px; margin: 0 auto; padding: 32px 20px; color: var(--muted); font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.foot-link { color: var(--muted); }
.foot-link:hover { color: var(--accent); }

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