/* =======================================================================
   QT Albums — Complaints
   Color/font variables at the top of the file — REPLACE with QT Albums branding
   (the colors/fonts from gallery.qtalbums.com couldn't be fetched automatically;
   once Iwona sends the hex codes / font names, just swap the values below —
   the rest of the file uses them through these variables).
   ======================================================================= */

:root {
  color-scheme: light;

  /* --- Brand: values to replace ------------------------------------ */
  --brand-primary:      #2a78d6;  /* TODO: QT Albums brand color */
  --brand-primary-dark: #184f95;
  --font-ui: system-ui, -apple-system, "Segoe UI", sans-serif; /* TODO: brand font */

  /* --- Surfaces and text (neutral palette, light theme) ------------ */
  --surface-page:    #f9f9f7;
  --surface-card:    #ffffff;
  --surface-hover:   #f0efec;
  --text-primary:    #0b0b0b;
  --text-secondary:  #52514e;
  --text-muted:      #898781;
  --border-hairline: #e1e0d9;

  /* --- Statuses (fixed, don't change with the theme) --------------- */
  --status-new-bg:         #fff3d6;
  --status-new-fg:         #8a6400;
  --status-in-progress-bg: #dce9fb;
  --status-in-progress-fg: #184f95;
  --status-resolved-bg:    #dcf3dc;
  --status-resolved-fg:    #0a6a0a;
  --status-rejected-bg:    #fbdcdc;
  --status-rejected-fg:    #a32323;

  /* --- Categorical chart palette (keep this order!) ---------------- */
  --series-1: #2a78d6; /* blue   */
  --series-2: #eb6834; /* orange */
  --series-3: #1baf7a; /* aqua   */
  --series-4: #eda100; /* yellow */
  --series-5: #e87ba4; /* magenta*/
  --series-6: #008300; /* green  */
  --series-7: #4a3aa7; /* violet */
  --series-8: #e34948; /* red    */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--brand-primary); }
a:hover { color: var(--brand-primary-dark); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header ----------------------------------------------------------- */
.site-header {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-hairline);
  padding: 16px 0;
  margin-bottom: 32px;
}
.site-header .container,
.site-header .container-narrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header .logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
}
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-nav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
}
.admin-nav a:hover, .admin-nav a.active {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.admin-user { font-size: 0.88rem; color: var(--text-muted); display:flex; align-items:center; gap:10px;}

/* Public pages: small centred logo above the page heading */
.public-main { padding-top: 32px; }
.logo-link { display: block; width: fit-content; margin: 0 auto 24px; line-height: 0; }
.logo-img { display: block; width: 140px; height: auto; }

/* --- Cards / sections ----------------------------------------------------- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}

/* --- Forms ---------------------------------------------------------------- */
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.help-text { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
.field { margin-bottom: 18px; }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 220px; }

input[type=text], input[type=email], input[type=date], input[type=month],
input[type=password], input[type=number], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--text-primary);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(42,120,214,0.15);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 16px;
}
.checkbox-grid label, .checkbox-row label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.checkbox-grid input, .checkbox-row input { width: auto; }

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  border: none;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--brand-primary-dark); }
.btn-secondary { background: var(--surface-hover); color: var(--text-primary); }
.btn-secondary:hover { background: var(--border-hairline); }
.btn-danger { background: var(--status-rejected-fg); }
.btn-small { padding: 6px 12px; font-size: 0.85rem; }

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.94rem;
}
.alert-success { background: var(--status-resolved-bg); color: var(--status-resolved-fg); }
.alert-error   { background: var(--status-rejected-bg); color: var(--status-rejected-fg); }
.alert ul { margin: 6px 0 0 18px; padding: 0; }

/* --- Status badge ----------------------------------------------------- */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-new          { background: var(--status-new-bg); color: var(--status-new-fg); }
.status-in-progress  { background: var(--status-in-progress-bg); color: var(--status-in-progress-fg); }
.status-resolved     { background: var(--status-resolved-bg); color: var(--status-resolved-fg); }
.status-rejected     { background: var(--status-rejected-bg); color: var(--status-rejected-fg); }

/* --- Table -------------------------------------------------------------- */
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.data-table th, .data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-hairline);
  vertical-align: top;
}
.data-table th { color: var(--text-muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .02em; }
.data-table tr:hover td { background: var(--surface-hover); }
.table-scroll { overflow-x: auto; }

/* --- Filters ----------------------------------------------------------- */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 20px;
}
.filters .field { margin-bottom: 0; min-width: 160px; }

/* --- Photo gallery ------------------------------------------------------ */
.gallery { display: flex; flex-wrap: wrap; gap: 12px; }
.gallery figure { margin: 0; width: 140px; }
.gallery img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
  display: block;
}
.gallery figcaption { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; word-break: break-all; }
.archival-note {
  width: 140px; height: 140px; display:flex; align-items:center; justify-content:center;
  text-align:center; font-size:0.72rem; color: var(--text-muted);
  border: 1px dashed var(--border-hairline); border-radius: 8px; padding: 8px;
}

/* --- Stat tiles ---------------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-tile { background: var(--surface-card); border: 1px solid var(--border-hairline); border-radius: 10px; padding: 18px; }
.stat-tile .value { font-size: 1.8rem; font-weight: 700; }
.stat-tile .label { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }

/* --- Chart container ------------------------------------------------------ */
.chart-card canvas { max-width: 100%; }

/* --- Public site footer --------------------------------------------------- */
.site-footer { text-align: center; color: var(--text-muted); font-size: 0.82rem; padding: 32px 0; }

/* --- Intro text above the public form ---------------------------------- */
.lead { color: var(--text-secondary); margin-bottom: 28px; }

/* --- Policy page ------------------------------------------------------------ */
.policy h2 { margin-top: 1.8em; }
.policy ul { margin: 0 0 1em; padding-left: 1.3em; }
.policy li { margin-bottom: 0.3em; }
.policy .table-scroll { margin-bottom: 1em; }

/* --- Anti-bot ---------------------------------------------------------------- */
/* Honeypot field: off-screen rather than display:none, which some bots detect. */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* The text notice (recaptcha-note) replaces Google's floating badge, as Google's terms allow. */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-note { margin-top: 12px; }

/* --- Report printing ------------------------------------------------------- */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .card { border: none; padding: 0; }
}
