:root {
  --paper: #f4f1ea;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #676767;
  --line: #d8d1c5;
  --brand: #073d52;
  --teal: #d66b2a;
  --red: #a9152b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
textarea,
select,
button {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

button {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 800;
}

.admin-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(16px, 4vw, 48px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-top: 8px solid var(--red);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
}

.admin-brand small,
.panel-heading span,
.notes-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-header nav {
  display: flex;
  gap: 14px;
  font-weight: 800;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto;
}

.full-panel {
  grid-column: 1 / -1;
}

.editor-panel,
.notes-panel,
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading h1,
.panel-heading h2,
.login-card h1 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  line-height: 1.05;
}

.panel-heading span {
  color: var(--red);
}

.editor-form {
  display: grid;
  gap: 16px;
}

.compact-form {
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.actions button {
  width: auto;
  min-width: 180px;
}

.actions a,
.notes-list a,
.admin-header a {
  color: var(--teal);
}

.notes-list {
  display: grid;
  gap: 12px;
}

.data-list {
  display: grid;
  gap: 10px;
}

.data-list article {
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
}

.data-list p {
  margin: 6px 0;
  color: var(--muted);
}

.media-list article {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
}

.media-list img {
  width: 140px;
  height: 92px;
  object-fit: cover;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.notes-list article {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.notes-list strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.1;
}

.notes-list article > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.notes-list form {
  margin: 0;
}

.notes-list button {
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--red);
}

.alert {
  margin-bottom: 16px;
  padding: 12px;
  font-weight: 800;
}

.alert.success {
  background: #dfeee2;
  color: #245a2e;
}

.alert.error {
  background: #f6dddd;
  color: #8e2f24;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 16px;
}

.login-card {
  width: min(420px, 100%);
}

.login-card form {
  display: grid;
  gap: 14px;
}

.login-card p {
  color: var(--muted);
}

@media (max-width: 860px) {
  .admin-header,
  .admin-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
