:root {
  --ic-ink: #153874;
  --ic-ink-deep: #0d333f;
  --ic-accent: #03a4ed;
  --ic-accent-hot: #ce1b28;
  --ic-ok: #0fd46c;
  --ic-ok-deep: #469820;
  --ic-paper: #f4f7fb;
  --ic-panel: #eef3f9;
  --ic-line: #d5dee9;
  --ic-muted: #5a6b7d;
  --ic-radius: 10px;
  --font-ui: "Segoe UI", "Avenir Next", Helvetica, Arial, sans-serif;
  --font-brand: "Segoe UI Semibold", "Segoe UI", Helvetica, Arial, sans-serif;
  --max: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  color: #1e1617;
  background: var(--ic-paper);
}

a { color: var(--ic-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

.proto-bar {
  background: var(--ic-ink-deep);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 1rem;
  text-align: center;
}

.page-hero {
  background: linear-gradient(135deg, var(--ic-ink) 0%, #0a4f7a 55%, #026089 100%);
  color: #fff;
  padding: 2.5rem 0;
}

.page-hero h1 {
  font-family: var(--font-brand);
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.page-hero p {
  margin: 0;
  opacity: 0.85;
}

.section { padding: 1.5rem 0 2.5rem; }

.lede {
  color: var(--ic-muted);
  margin: 0 0 1.5rem;
  max-width: 42rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 2rem);
  background: var(--ic-panel);
}

.admin-side {
  background: var(--ic-ink);
  color: #fff;
  padding: 1.25rem;
}

.admin-side h1 {
  font-family: var(--font-brand);
  font-size: 1.1rem;
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
}

.admin-side a,
.admin-side a:link,
.admin-side a:visited {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
  text-decoration: none;
}

.admin-side a.is-active,
.admin-side a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-main {
  padding: 1.5rem 1.75rem 2.5rem;
}

.admin-main h2 {
  font-family: var(--font-brand);
  margin: 0 0 0.35rem;
  color: var(--ic-ink);
}

.admin-main > .lede { margin-top: 0; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.admin-stat {
  background: #fff;
  border: 1px solid var(--ic-line);
  border-radius: 12px;
  padding: 1rem;
}

.admin-stat strong {
  display: block;
  font-family: var(--font-brand);
  font-size: 1.45rem;
  color: var(--ic-ink);
}

.admin-stat span {
  color: var(--ic-muted);
  font-size: 0.85rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--ic-line);
  border-radius: var(--ic-radius);
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ic-line);
  font-size: 0.92rem;
  vertical-align: top;
}

.admin-table th {
  background: #f8fafc;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ic-muted);
}

.admin-table tr:last-child td { border-bottom: 0; }

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.status-dot::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ic-ok);
}

.status-dot.is-draft::before { background: #c4a035; }

.upload-zone {
  border: 1.5px dashed rgba(21, 56, 116, 0.28);
  border-radius: var(--ic-radius);
  padding: 2rem 1.25rem;
  text-align: center;
  background: #fff;
  margin-bottom: 1.25rem;
}

.upload-zone strong {
  display: block;
  font-family: var(--font-brand);
  margin-bottom: 0.35rem;
  color: var(--ic-ink);
}

.media-band {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}

.media-band figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--ic-line);
  border-radius: 10px;
  overflow: hidden;
}

.media-band img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: #e8eef5;
}

.media-band figcaption {
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  color: var(--ic-muted);
  word-break: break-all;
}

.form-stack {
  display: grid;
  gap: 0.85rem;
}

.form-stack label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ic-ink-deep);
}

.form-stack input,
.form-stack textarea,
.form-stack select {
  font: inherit;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--ic-line);
  background: #fff;
}

.form-stack textarea {
  min-height: 6rem;
  resize: vertical;
}

.photo-preview {
  display: grid;
  place-items: center;
  width: 9rem;
  height: 9rem;
  border-radius: 12px;
  border: 1px dashed var(--ic-line);
  background: #fff;
  overflow: hidden;
}

.photo-preview__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-preview__empty {
  margin: 0;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ic-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn--primary {
  background: var(--ic-ok);
  color: #1e1617;
}

.btn--primary:hover { background: var(--ic-ok-deep); color: #fff; }

.btn--dark {
  background: var(--ic-ink);
  color: #fff;
}

.btn--soft {
  background: #d9ecf8;
  color: var(--ic-ink);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.login-box {
  max-width: 24rem;
  margin: 2rem auto;
  padding: 1.75rem;
  border: 1px solid var(--ic-line);
  border-radius: var(--ic-radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(21, 56, 116, 0.08);
}

.login-box h2 {
  font-family: var(--font-brand);
  margin: 0 0 1rem;
  color: var(--ic-ink);
}

.todo-note {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: #fff8e8;
  border: 1px solid #f0d78c;
  color: #6a5200;
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .admin-layout,
  .admin-stats {
    grid-template-columns: 1fr;
  }
}
