:root {
  --ink: #111714;
  --paper: #f5f3ee;
  --white: #fff;
  --blue: #0575c8;
  --muted: #5c6661;
  --line: rgba(17,23,20,.15);
  --danger: #a82424;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
button, input, textarea { font: inherit; }
.admin-header { min-height: 92px; display: flex; align-items: center; gap: 1rem; padding: .5rem max(20px, calc((100% - 1120px) / 2)); color: var(--white); background: var(--ink); }
.admin-brand { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: var(--white); }
.admin-brand img { width: 100%; height: 100%; object-fit: contain; }
.admin-header p { margin: 0; font-weight: 800; }
.admin-header span { color: rgba(255,255,255,.67); font-size: .82rem; }
.back-link { margin-left: auto; color: var(--white); text-underline-offset: .3em; }
main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) 0; }
.login-card { width: min(520px, 100%); margin: 3rem auto; padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--line); border-radius: 1.5rem; background: var(--white); box-shadow: 0 24px 70px rgba(17,23,20,.1); }
.eyebrow { margin: 0 0 .5rem; color: #075e78; font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.04em; line-height: 1.05; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.login-card > p:not(.eyebrow):not(.status) { color: var(--muted); }
form label { display: grid; gap: .4rem; font-size: .84rem; font-weight: 750; }
input, textarea { width: 100%; padding: .85rem 1rem; color: var(--ink); border: 1px solid #c9c6bd; border-radius: .65rem; background: var(--white); outline: 0; }
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(5,117,200,.13); }
button { min-height: 46px; padding: .7rem 1.25rem; color: var(--white); border: 1px solid var(--blue); border-radius: 999px; background: var(--blue); font-weight: 780; cursor: pointer; }
button:hover, button:focus-visible { background: #075e9c; }
button:disabled { cursor: wait; opacity: .6; }
#login-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.status { min-height: 1.5rem; margin: .8rem 0 0; color: #116333; font-size: .88rem; font-weight: 700; }
.status.is-error { color: var(--danger); }
.dashboard-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dashboard-heading { margin-bottom: 2rem; }
.button-secondary { color: var(--ink); border-color: var(--line); background: transparent; }
.button-secondary:hover, .button-secondary:focus-visible { color: var(--white); background: var(--ink); }
.admin-panel { margin-top: 1.25rem; padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: 1.4rem; background: var(--white); }
.admin-panel--compact { max-width: 760px; }
.faq-editor { display: grid; gap: 1rem; margin: 1.5rem 0; }
.faq-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: .8rem; align-items: end; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #faf9f6; }
.remove-button { min-width: 46px; padding-inline: .8rem; color: var(--danger); border-color: rgba(168,36,36,.3); background: transparent; }
.remove-button:hover, .remove-button:focus-visible { color: var(--white); background: var(--danger); }
.upload-form { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: .8rem; align-items: end; margin-top: 1.5rem; }
.form-note { margin: .7rem 0 0; color: var(--muted); font-size: .8rem; }
.gallery-editor { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; }
.gallery-item { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: #faf9f6; }
.gallery-item img { width: 100%; aspect-ratio: 4/3; display: block; object-fit: cover; background: #d9ded8; }
.gallery-item__body { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .8rem; }
.gallery-item p { margin: 0; font-size: .86rem; font-weight: 700; }
.gallery-item button { min-height: 38px; flex: 0 0 auto; padding: .4rem .75rem; font-size: .78rem; }
.gallery-empty { grid-column: 1/-1; margin: 0; padding: 2rem; color: var(--muted); border: 1px dashed #aaa; border-radius: 1rem; text-align: center; }
.password-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.password-form label:first-child { grid-column: 1/-1; }
.password-form button { justify-self: start; }

@media (max-width: 760px) {
  .admin-header { min-height: 76px; }
  .admin-brand { width: 54px; height: 54px; }
  .admin-header span { display: none; }
  .dashboard-heading, .panel-heading { align-items: flex-start; }
  .faq-row, .upload-form, .password-form { grid-template-columns: 1fr; }
  .password-form label:first-child { grid-column: auto; }
  .remove-button { justify-self: start; }
  .gallery-editor { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .gallery-editor { grid-template-columns: 1fr; }
  .back-link { font-size: .82rem; }
}
