:root {
  --navy: #092956;
  --blue: #123b78;
  --red: #c53030;
  --gold: #e8b447;
  --ink: #26364b;
  --muted: #65758a;
  --paper: #f5f7fa;
  --line: #dbe3ec;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'DM Sans', sans-serif; line-height: 1.6; }
.admin-header { display: flex; align-items: center; justify-content: space-between; padding: 16px max(21px, calc((100% - 1180px) / 2)); background: #fff; border-bottom: 4px solid var(--red); box-shadow: 0 2px 12px #0929561c; }
.admin-brand { display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; }
.admin-brand img { width: 55px; height: 55px; object-fit: contain; }
.admin-brand strong, .admin-brand small { display: block; }
.admin-brand strong { font-family: 'Playfair Display', serif; font-size: 17px; }
.admin-brand small { color: var(--muted); font-size: 11px; }
.admin-nav { display: flex; align-items: center; gap: 10px; }
.view-site { padding: 9px 15px; border: 1px solid var(--navy); color: var(--navy); font-size: 12px; font-weight: 700; text-decoration: none; }
.admin-shell { width: min(920px, calc(100% - 36px)); margin: 0 auto; padding: 60px 0; }
.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.eyebrow { color: var(--red); font-size: 11px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.page-intro h1 { max-width: 620px; margin: 10px 0; color: var(--navy); font-family: 'Playfair Display', serif; font-size: clamp(35px, 5vw, 55px); line-height: 1.1; }
.page-intro p { margin: 0; color: var(--muted); }
.header-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip { padding: 8px 12px; border: 1px solid var(--blue); background: #fff; color: var(--blue); font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.chip:hover, .chip:focus-visible { transform: translateY(-1px); box-shadow: 0 8px 18px #123b7817; }
.status { padding: 10px 14px; border-left: 4px solid var(--gold); background: #fff; color: var(--muted); font-size: 12px; white-space: nowrap; }
.status[data-tone='success'] { border-left-color: #2a9d5d; color: #206d43; }
.status[data-tone='error'] { border-left-color: #c53030; color: #9c1f1f; }
.status[data-tone='info'] { border-left-color: var(--gold); color: var(--navy); }
.panel { margin: 16px 0; padding: 27px 30px; background: #fff; border: 1px solid var(--line); box-shadow: 0 5px 18px #123b780b; transition: border-color .2s ease, box-shadow .2s ease; }
.panel:focus-within { border-color: #b0c5ea; box-shadow: 0 10px 22px #123b7820; }
.panel-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 23px; }
.panel-number { color: var(--red); font-weight: 900; }
.panel h2 { margin: 0; color: var(--navy); font-family: 'Playfair Display', serif; font-size: 24px; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.panel label, .login-card label { display: block; margin: 15px 0; color: var(--navy); font-size: 12px; font-weight: 700; }
.panel input, .panel textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 2px; outline: 0; color: var(--ink); font: inherit; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
.form-actions { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.button { padding: 11px 18px; border: 1px solid transparent; border-radius: 2px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.button.primary { background: var(--red); color: #fff; }
.button.primary:hover, .button.primary:focus-visible { background: #a62323; }
.button.secondary { border-color: var(--blue); background: #fff; color: var(--blue); }
.logout-button { padding: 8px 12px; font-size: 11px; }
#formMessage { min-height: 18px; color: #27864d; font-size: 12px; font-weight: 700; }
.admin-note { display: flex; gap: 12px; margin-top: 32px; padding: 18px 20px; border-left: 4px solid var(--gold); background: #fff; font-size: 12px; }
.admin-note strong { color: var(--navy); white-space: nowrap; }
.admin-note span { color: var(--muted); }

.login-page { display: grid; min-height: 100vh; place-items: center; padding: 30px; background: linear-gradient(135deg, #092956 0%, #123b78 58%, #1b5083 100%); }
.login-page::before { position: fixed; inset: 0; content: ''; background: linear-gradient(90deg, transparent 49.8%, #ffffff0d 50%, transparent 50.2%), linear-gradient(0deg, transparent 49.8%, #ffffff0d 50%, transparent 50.2%); background-size: 56px 56px; pointer-events: none; }
.login-card { position: relative; width: min(455px, 100%); padding: 40px 42px; background: #fff; border-top: 5px solid var(--gold); box-shadow: 0 22px 60px #041a3d66; }
.login-card .admin-brand { margin-bottom: 36px; }
.login-card .admin-brand img { width: 64px; height: 64px; }
.login-card h1 { margin: 11px 0 8px; color: var(--navy); font-family: 'Playfair Display', serif; font-size: 43px; line-height: 1.1; }
.login-card p { margin: 0 0 27px; color: var(--muted); font-size: 14px; }
.login-card label { margin: 17px 0; }
.login-card input { display: block; width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 2px; outline: 0; font: inherit; transition: border-color .2s, box-shadow .2s; }
.login-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #123b7820; }
.password-field { position: relative; display: block; }.password-field input { padding-right: 46px; }.password-toggle { position: absolute; top: 7px; right: 0; display: grid; width: 42px; height: 42px; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }.password-toggle:hover,.password-toggle:focus-visible { color: var(--blue); }.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.password-toggle .eye-closed { display: none; }.password-toggle.is-visible .eye-open { display: none; }.password-toggle.is-visible .eye-closed { display: block; }
.login-card .button { width: 100%; min-height: 46px; margin-top: 9px; background: var(--red); font-size: 14px; }
.login-card .button:hover { background: #a62323; }
.login-error { min-height: 21px; margin-top: 12px; color: var(--red); font-size: 12px; font-weight: 700; }
.back-link { display: block; margin-top: 23px; color: var(--blue); font-size: 12px; font-weight: 700; text-align: center; }
.login-card::after { display: block; margin-top: 27px; padding-top: 14px; border-top: 1px solid var(--line); content: 'Authorized administrator access'; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-align: center; text-transform: uppercase; }

.file-upload-group { margin: 15px 0; }
.file-upload-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 28px; border: 2px dashed var(--line); border-radius: 4px; background: #f9fafb; cursor: pointer; transition: all .2s ease; text-align: center; }
.file-upload-box:hover { border-color: var(--blue); background: #f0f4fa; }
.file-upload-box.is-loading { opacity: 0.6; pointer-events: none; }
.file-input { display: none; }
.file-label { color: var(--navy); font-weight: 700; font-size: 14px; }
.file-upload-box small { color: var(--muted); font-size: 12px; }
.media-preview { display: block; max-width: 100%; max-height: 280px; margin: 8px 0; border-radius: 4px; background: #f9fafb; object-fit: cover; }
.media-preview:empty { display: none; }

@media (max-width: 620px) {
  .admin-header { padding: 12px 18px; }
  .admin-brand img { width: 46px; height: 46px; }
  .admin-brand strong { font-size: 14px; }
  .admin-brand small { font-size: 9px; }
  .view-site { padding: 7px 9px; font-size: 11px; }
  .admin-nav { gap: 6px; }
  .logout-button { padding: 7px 8px; font-size: 10px; }
  .admin-shell { width: min(100% - 26px, 920px); padding: 38px 0; }
  .page-intro { display: block; }
  .status { display: inline-block; margin-top: 18px; white-space: normal; }
  .panel { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { flex-wrap: wrap; }
  .admin-note { display: block; }
  .admin-note strong, .admin-note span { display: block; }
  .admin-note span { margin-top: 5px; }
  .login-page { padding: 20px 13px; }
  .login-card { width: 100%; padding: 30px 24px; }
  .login-card .admin-brand { gap: 9px; }
  .login-card .admin-brand img { width: 52px; height: 52px; }
  .login-card .admin-brand strong { font-size: 14px; }
  .login-card h1 { font-size: 37px; }
}
