:root {
  --ink: #152018;
  --muted: #5c6b60;
  --paper: #f3f6f1;
  --panel: #ffffff;
  --line: #d5e0d6;
  --accent: #e85d04;
  --accent-deep: #9b2c00;
  --ok: #1b7f4a;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(21, 32, 24, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(232, 93, 4, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(27, 127, 74, 0.14), transparent 50%),
    linear-gradient(160deg, #eef3eb 0%, #f7f4ee 45%, #ebe8e0 100%);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(21, 32, 24, 0.035) 1px, transparent 1px);
  background-size: 100% 28px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}

.stage {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 4rem;
}

.brand {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  letter-spacing: 0.04em;
  line-height: 0.9;
  color: var(--ink);
  animation: rise 0.7s ease-out both;
}
.brand--sm {
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
}
.headline {
  margin: 0.4rem 0 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.02em;
  font-weight: 400;
  animation: rise 0.7s ease-out 0.08s both;
}
.lede {
  margin: 0.75rem 0 2rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
  animation: rise 0.7s ease-out 0.16s both;
}

.login-form {
  display: grid;
  gap: 1rem;
  max-width: 24rem;
  animation: rise 0.7s ease-out 0.24s both;
}
label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
input, textarea, button {
  font: inherit;
}
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 4px;
  padding: 0.8rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.15);
}
textarea { resize: vertical; min-height: 10rem; }

button {
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
button:hover { background: var(--accent-deep); }
button:active { transform: translateY(1px); }
button.ghost, a.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
}
button.ghost:hover, a.ghost:hover {
  border-color: var(--ink);
  background: rgba(21, 32, 24, 0.04);
}

.error { color: var(--danger); margin: 0; }
.status { margin: 0.5rem 0 0; color: var(--ok); font-size: 0.9rem; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2rem;
  animation: rise 0.55s ease-out both;
}
.top h1 {
  margin: 0.15rem 0 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}
.top-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
  align-items: start;
  animation: rise 0.55s ease-out 0.1s both;
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: start; }
}

.editor, .list-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 1.25rem;
}
.editor { display: grid; gap: 0.9rem; }
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
@media (max-width: 600px) {
  .row { grid-template-columns: 1fr; }
}
.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
}
.check input { width: auto; }
.form-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.8rem;
}
.list-head h2 {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}
#itemCount {
  font-size: 0.85rem;
  color: var(--muted);
}
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  max-height: 70vh;
  overflow: auto;
}
.news-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.85rem;
  display: grid;
  gap: 0.45rem;
  transition: border-color 0.2s, transform 0.2s;
}
.news-item:hover {
  border-color: rgba(232, 93, 4, 0.45);
  transform: translateY(-1px);
}
.news-item.is-draft { opacity: 0.65; }
.news-item h3 {
  margin: 0;
  font-size: 1rem;
}
.meta {
  color: var(--muted);
  font-size: 0.8rem;
}
.item-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.item-actions button {
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
}
.item-actions .danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(180, 35, 24, 0.35);
}
.item-actions .danger:hover {
  background: rgba(180, 35, 24, 0.08);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
