:root{--blue:#151d48;--deep:#0e1538;--gold:#c2912e;--gold-light:#ddb54d;--ivory:#f8f6f0;--text:#202435;--muted:#626879;--border:#dfe2ea;--red:#a40000;--green:#176b42}
*{box-sizing:border-box}
body{min-width:320px;margin:0;background:#f3f4f8;color:var(--text);font-family:Inter,Arial,sans-serif;line-height:1.5}
button,input,select,textarea{font:inherit}
header{display:flex;height:84px;padding:0 max(20px,calc((100vw - 1400px)/2));align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);background:#fff}
header img{display:block;width:auto;height:64px}
header div{display:flex;align-items:center;gap:12px}
header a:not(:first-child),header button{padding:9px 13px;border:1px solid var(--blue);border-radius:6px;background:#fff;color:var(--blue);font-size:.82rem;font-weight:800;text-decoration:none;cursor:pointer}
.auth-shell{display:grid;min-height:calc(100vh - 84px);padding:24px;place-items:center;background:linear-gradient(135deg,var(--deep),#293574)}
.auth-card{display:grid;width:min(100%,460px);min-width:0;padding:40px;gap:16px;border-radius:14px;background:#fff;box-shadow:0 24px 70px #0005}
.auth-card h1,.title-row h1{margin:0;color:var(--deep);font-family:"Playfair Display",Georgia,serif;font-size:clamp(2.15rem,5vw,3.2rem);line-height:1.05;overflow-wrap:anywhere}
.auth-card p:not(.eyebrow),.title-row p{margin:0;color:var(--muted)}
.eyebrow{margin:0;color:var(--gold);font-size:.72rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase}
label{display:grid;min-width:0;gap:7px;color:var(--blue);font-size:.82rem;font-weight:800}
label span,legend span{color:var(--red)}
input,select,textarea{width:100%;min-height:48px;padding:10px 12px;border:1px solid #bfc4d1;border-radius:7px;background:#fff;color:var(--text)}
textarea{resize:vertical}
.button{display:inline-flex;min-height:46px;padding:0 18px;align-items:center;justify-content:center;border:2px solid transparent;border-radius:6px;font-weight:800;cursor:pointer}
.button.gold{border-color:var(--gold);background:var(--gold);color:var(--deep)}
.button.secondary{border-color:var(--blue);background:#fff;color:var(--blue)}
.button.danger{border-color:var(--red);background:var(--red);color:#fff}
.admin-shell{width:min(100% - 40px,1400px);margin:auto;padding:48px 0 80px}
.title-row,.panel-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}
.summary{display:grid;margin:30px 0;grid-template-columns:repeat(4,1fr);gap:14px}
.summary article{padding:20px;border:1px solid var(--border);border-radius:10px;background:#fff}
.summary span{display:block;color:var(--muted);font-size:.7rem;font-weight:800;text-transform:uppercase}
.summary strong{color:var(--blue);font-family:"Playfair Display",serif;font-size:2rem}
.panel{padding:26px;border:1px solid var(--border);border-radius:12px;background:#fff}
.panel h2{margin:0;color:var(--deep);font-family:"Playfair Display",serif;font-size:2rem}
.table-wrap{margin-top:20px;overflow:auto}
table{width:100%;border-collapse:collapse}
th,td{padding:12px;border-bottom:1px solid var(--border);text-align:left;white-space:nowrap}
th{background:#f6f7fa;color:var(--blue);font-size:.7rem;text-transform:uppercase}
td{font-size:.85rem}
.badge{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eef0f5;color:var(--blue);font-size:.68rem;font-weight:800;text-transform:capitalize}
.badge.published,.badge.yes{background:#e2f4e9;color:var(--green)}
.edit{padding:7px 10px;border:1px solid var(--blue);border-radius:5px;background:#fff;color:var(--blue);font-weight:800;cursor:pointer}
.status{min-height:22px;margin:12px 0 0;color:var(--red);font-weight:700}
.status.success{color:var(--green)}
dialog{width:min(100% - 24px,900px);max-height:92vh;padding:0;border:0;border-radius:14px;box-shadow:0 25px 80px #0007}
dialog::backdrop{background:#0e1538bd}
.dialog-head{position:sticky;z-index:3;top:0;display:flex;padding:22px 26px;align-items:start;justify-content:space-between;border-bottom:1px solid var(--border);background:#fff}
.dialog-head h2{margin:0;color:var(--deep);font-family:"Playfair Display",serif;font-size:2rem}
.dialog-head button{border:0;background:transparent;color:var(--deep);font-size:2rem;cursor:pointer}
.event-form{display:grid;padding:25px;gap:20px;background:var(--ivory)}
fieldset{display:grid;margin:0;padding:20px;gap:15px;border:1px solid var(--border);border-radius:9px;background:#fff}
legend{padding:0 8px;color:var(--blue);font-family:"Playfair Display",serif;font-size:1.2rem;font-weight:700}
.two,.three{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}
.three{grid-template-columns:repeat(3,1fr)}
.check{display:flex;min-height:42px;align-items:center;grid-template-columns:auto 1fr}
.check input,.weekday-checks input{width:18px;height:18px;min-height:0;margin:0;accent-color:var(--gold)}
label small{color:var(--muted);font-weight:500}
.field-label{color:var(--blue);font-size:.82rem;font-weight:800}
.weekday-checks{display:flex;flex-wrap:wrap;gap:8px}
.weekday-checks label{display:flex;padding:8px;align-items:center;gap:5px;border:1px solid var(--border);border-radius:5px}
.fieldset-help{margin:0;color:var(--muted);font-size:.86rem}
.exception-add{justify-self:start}
.exception-list{display:grid;gap:9px}
.empty-exceptions{margin:0;padding:14px;border:1px dashed var(--border);border-radius:7px;color:var(--muted);font-size:.82rem}
.exception-item{display:flex;padding:13px 14px;align-items:center;justify-content:space-between;gap:15px;border:1px solid #e0bcbc;border-radius:7px;background:#fff7f7}
.exception-item div{display:grid;gap:2px}
.exception-item strong{color:var(--red);font-size:.86rem}
.exception-item span,.exception-item small{color:var(--text);font-size:.8rem}
.exception-item small{color:var(--muted);white-space:pre-line}
.exception-item button{padding:7px 10px;border:1px solid var(--red);border-radius:5px;background:#fff;color:var(--red);font-size:.76rem;font-weight:800;cursor:pointer}
.form-actions{display:flex;justify-content:flex-end;gap:9px}
:focus-visible{outline:4px solid var(--gold-light);outline-offset:3px}
[hidden]{display:none!important}
@media(max-width:760px){header img{max-width:220px;height:auto}
.admin-shell{width:calc(100% - 24px);padding-top:30px}
.title-row,.panel-head{align-items:flex-start;flex-direction:column}
.summary{grid-template-columns:1fr 1fr}
.two,.three{grid-template-columns:1fr}
.form-actions{flex-direction:column}
.form-actions .button{width:100%}
.auth-card{padding:28px 22px}
}
