:root {
  --bg: #050a14;
  --bg-elev: #0b1426;
  --bg-card: rgba(14, 25, 45, 0.78);
  --bg-card-hover: rgba(20, 35, 62, 0.92);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --crimson: #e11d48;
  --crimson-soft: rgba(225, 29, 72, 0.16);
  --gold: #f59e0b;
  --silver: #cbd5e1;
  --bronze: #d97706;
  --water: #38bdf8;
  --emerald: #10b981;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(56, 189, 248, 0.11), transparent 36%),
    radial-gradient(circle at 86% 14%, rgba(225, 29, 72, 0.12), transparent 38%),
    var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.container {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(5, 10, 20, 0.82);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.poland-flag {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  background: linear-gradient(to bottom, #ffffff 50%, #dc143c 50%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.brand-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.16);
  color: #fda4af;
  border: 1px solid rgba(225, 29, 72, 0.35);
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 5px 11px;
  border-radius: 999px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* HERO */
.hero {
  padding: 52px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.32fr 0.88fr;
  gap: 36px;
  align-items: center;
}

.national-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 7px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.13);
  border: 1px solid rgba(225, 29, 72, 0.36);
  color: #fecdd3;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eagle-pill {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 48%, #dc143c 52%, #be123c 100%);
  color: #0f172a;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
}

.hero-title {
  margin: 18px 0 14px;
  font-size: clamp(2.5rem, 5vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.accent-text {
  background: linear-gradient(125deg, #ffffff 20%, #7dd3fc 62%, #fb7185 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-bio {
  margin: 0 0 24px;
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 65ch;
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.chip {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chip-highlight {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(14, 42, 71, 0.55);
}

.chip-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.chip strong {
  font-size: 0.92rem;
  color: var(--text);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff;
  box-shadow: 0 10px 26px rgba(225, 29, 72, 0.32);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn.small {
  padding: 8px 15px;
  font-size: 0.83rem;
}

/* PORTRAIT CARD */
.hero-portrait-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 3.5;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #0f1f3a, #1e132a);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 5%;
  display: block;
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.85);
  background: radial-gradient(circle at 30% 25%, rgba(56, 189, 248, 0.35), rgba(225, 29, 72, 0.28));
}

.portrait-change-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(5, 10, 20, 0.78);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.18s ease;
  cursor: pointer;
}

.portrait-frame:hover .portrait-change-btn {
  opacity: 1;
}

.portrait-caption {
  margin-top: 14px;
  display: grid;
  gap: 7px;
}

.caption-medal {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.83rem;
  font-weight: 600;
  color: #e2e8f0;
}

.medal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.medal-dot.gold { background: var(--gold); box-shadow: 0 0 8px rgba(245, 158, 11, 0.7); }
.medal-dot.silver { background: var(--silver); box-shadow: 0 0 8px rgba(203, 213, 225, 0.5); }
.medal-dot.blue { background: var(--water); box-shadow: 0 0 8px rgba(56, 189, 248, 0.6); }

/* KPI BANNER */
.kpi-banner {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kpi-card {
  background: linear-gradient(180deg, rgba(16, 29, 53, 0.88), rgba(10, 19, 36, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--water), var(--crimson));
  opacity: 0.85;
}

.kpi-eyebrow {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
}

.kpi-value {
  font-size: clamp(1.75rem, 2.7vw, 2.35rem);
  font-weight: 800;
  margin: 7px 0 4px;
  color: #ffffff;
}

.kpi-sub {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* SECTIONS */
.section {
  padding: 58px 0 18px;
}

.section-head {
  margin-bottom: 24px;
}

.section-kicker {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #38bdf8;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.section-title {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  letter-spacing: -0.025em;
}

.section-desc {
  margin: 0;
  color: var(--text-muted);
  max-width: 74ch;
  font-size: 0.98rem;
}

/* CONTROLS BAR */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.period-pills,
.metric-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill-btn,
.metric-btn {
  background: rgba(15, 25, 45, 0.85);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pill-btn:hover,
.metric-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.pill-btn.active {
  background: rgba(225, 29, 72, 0.2);
  color: #fff;
  border-color: rgba(244, 63, 94, 0.65);
}

.metric-btn.active {
  background: rgba(56, 189, 248, 0.18);
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.6);
}

.pill-btn.small {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.pill-btn.danger {
  border-color: rgba(244, 63, 94, 0.5);
  color: #fda4af;
}

.month-select {
  background: rgba(15, 25, 45, 0.95);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.active-filter-notice[hidden],
.pill-btn[hidden],
.btn[hidden],
.hm-tooltip[hidden],
.gallery-actions[hidden],
.role-preview-btn[hidden],
.portrait-change-btn[hidden],
.modal-backdrop[hidden],
.exif-banner[hidden],
.form-error[hidden],
.source-link-btn[hidden],
.modal-preview-img[hidden],
.modal-drop-prompt[hidden] {
  display: none !important;
}

.role-preview-btn {
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.38);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.role-preview-btn.guest {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border-color: var(--border-strong);
}

.active-filter-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: #e0f2fe;
}

.clear-filter-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

/* PERIOD SUMMARY STRIP */
.period-summary-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  background: rgba(12, 22, 40, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.ps-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ps-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ps-val {
  font-size: 1.05rem;
  color: #fff;
}

/* ANALYTICS PANELS */
.analytics-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.12rem;
}

.panel-hint,
.panel-sub {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* DONUT + DISCIPLINE BARS */
.donut-and-bars {
  display: grid;
  grid-template-columns: 195px 1fr;
  gap: 22px;
  align-items: center;
}

.donut-wrap {
  position: relative;
  width: 195px;
  height: 195px;
  margin: 0 auto;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}

.donut-center-val {
  font-size: 1.25rem;
  font-weight: 800;
}

.donut-center-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.discipline-bars {
  display: grid;
  gap: 10px;
}

.disc-row {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 11px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.disc-row:hover,
.disc-row.selected {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
}

.disc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.disc-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.disc-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.disc-stats {
  font-size: 0.8rem;
  color: #cbd5e1;
}

.disc-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.disc-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* MONTHLY CHART */
.monthly-chart-wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100% - 42px);
}

.monthly-bars {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 8px;
  align-items: end;
  height: 235px;
  padding-top: 22px;
}

.m-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  cursor: pointer;
}

.m-val {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.m-stack {
  width: 100%;
  max-width: 30px;
  border-radius: 7px 7px 3px 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.m-col:hover .m-stack,
.m-col.selected .m-stack {
  transform: scaleX(1.08);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.m-seg {
  width: 100%;
  transition: height 0.3s ease;
}

.m-lbl {
  margin-top: 7px;
  font-size: 0.73rem;
  font-weight: 700;
  color: #cbd5e1;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* HEATMAP */
.heatmap-panel {
  margin-bottom: 18px;
}

.heatmap-scale {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.heatmap-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.heatmap-months {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  min-width: 780px;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.heatmap-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 14px);
  grid-auto-columns: 14px;
  gap: 4px;
  min-width: 780px;
}

.hm-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.hm-cell.lvl-0 { background: rgba(148, 163, 184, 0.12); }
.hm-cell.lvl-1 { background: rgba(56, 189, 248, 0.32); }
.hm-cell.lvl-2 { background: rgba(56, 189, 248, 0.62); }
.hm-cell.lvl-3 { background: #0ea5e9; }
.hm-cell.lvl-4 { background: #f43f5e; box-shadow: 0 0 6px rgba(244, 63, 94, 0.5); }
.hm-cell.empty { background: transparent; pointer-events: none; }

.hm-tooltip {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  background: rgba(7, 13, 25, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 0.78rem;
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  max-width: 310px;
}

/* SESSION TABLE */
.session-table-wrap {
  overflow-x: auto;
}

.session-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.session-table th {
  text-align: left;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.session-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: #e2e8f0;
}

.session-table th.num,
.session-table td.num {
  text-align: right;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
}

.log-footer {
  margin-top: 14px;
  text-align: center;
}

/* CAMPS */
.camps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.camp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.camp-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.5);
  background: var(--bg-card-hover);
}

.camp-period {
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.camp-place {
  margin: 6px 0 8px;
  font-size: 1.08rem;
  font-weight: 800;
}

.camp-desc {
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.camp-metrics {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: #e2e8f0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ACHIEVEMENTS */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.ach-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.ach-card.gold { border-color: rgba(245, 158, 11, 0.45); }
.ach-card.silver { border-color: rgba(203, 213, 225, 0.38); }
.ach-card.bronze { border-color: rgba(217, 119, 6, 0.42); }
.ach-card.final { border-color: rgba(56, 189, 248, 0.38); }

.ach-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ach-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
}

.ach-month {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ach-place {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.ach-card.gold .ach-place { color: #fbbf24; }
.ach-card.silver .ach-place { color: #f1f5f9; }
.ach-card.bronze .ach-place { color: #fb923c; }
.ach-card.final .ach-place { color: #7dd3fc; }

.ach-event {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
}

.ach-boat {
  display: inline-block;
  font-size: 0.78rem;
  color: #fda4af;
  background: rgba(225, 29, 72, 0.14);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
  font-weight: 700;
}

.ach-detail {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-muted);
}

/* NEWS */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.news-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.news-meta {
  font-size: 0.75rem;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 8px;
}

.news-title {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.38;
}

.news-summary {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.news-link-lbl {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fda4af;
}

/* GALLERY */
.gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.dropzone {
  border: 1.5px dashed rgba(56, 189, 248, 0.36);
  background: rgba(14, 29, 53, 0.4);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.dropzone.dragover {
  background: rgba(56, 189, 248, 0.16);
  border-color: #38bdf8;
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d182d;
  cursor: pointer;
}

.gallery-item img,
.gallery-item .poster-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.gallery-item:hover img,
.gallery-item:hover .poster-svg {
  transform: scale(1.03);
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 14px 12px;
  background: linear-gradient(to top, rgba(4, 8, 18, 0.96) 18%, rgba(4, 8, 18, 0.65) 68%, transparent);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gc-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}

.gc-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
}

.gc-source-badge {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 700;
}

.gc-source-badge:hover {
  text-decoration: underline;
}

.lightbox-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lightbox-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.source-link-btn {
  text-decoration: none;
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.4);
}

/* ADMIN PHOTO MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 350;
  background: rgba(3, 7, 16, 0.86);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-card {
  width: min(640px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #0b1426;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
}

.modal-dropzone {
  border: 1.5px dashed rgba(56, 189, 248, 0.42);
  background: rgba(15, 28, 52, 0.65);
  border-radius: 14px;
  min-height: 150px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.modal-dropzone.dragover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.16);
}

.modal-drop-prompt {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #cbd5e1;
  font-size: 0.88rem;
}

.modal-drop-prompt span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal-preview-img {
  max-height: 210px;
  max-width: 100%;
  border-radius: 10px;
  object-fit: contain;
}

.url-fetch-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.exif-banner {
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 0.8rem;
  background: rgba(16, 185, 129, 0.13);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #d1fae5;
}

.exif-banner.neutral {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: #bae6fd;
}

.form-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #cbd5e1;
}

.form-input {
  width: 100%;
  background: rgba(5, 10, 20, 0.75);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 0.86rem;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: #38bdf8;
}

.checkbox-row {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding-top: 4px;
}

.checkbox-row label {
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

.form-error {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(225, 29, 72, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fecdd3;
  font-size: 0.82rem;
}

.modal-footer {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(3, 7, 15, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1040px, 92vw);
  max-height: 76vh;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 26px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
}

.lightbox-bar {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.lightbox-actions {
  display: flex;
  gap: 8px;
}

/* FOOTER */
.footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding: 26px 0 40px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer code {
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
  color: #bae6fd;
}

@media (max-width: 980px) {
  .hero-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  .kpi-banner {
    grid-template-columns: repeat(2, 1fr);
  }
  .period-summary-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 620px) {
  .kpi-banner,
  .period-summary-strip,
  .donut-and-bars,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .url-fetch-row {
    flex-direction: column;
  }
}
