body.admin {
    margin: 0;
    background: #f3f4f6;
    color: #1f2933;
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}
body.admin * { box-sizing: border-box; }
body.admin img { max-width: 100%; display: block; }
body.admin a { color: #1d4f73; }
body.admin a:hover { color: #163a52; }
body.admin h1,
body.admin h2,
body.admin h3,
body.admin h4 {
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3;
    color: #1f2933;
    margin: 0 0 8px;
}
body.admin h1 { font-size: 20px; }
body.admin h2 { font-size: 20px; }
body.admin h3 { font-size: 16px; }
body.admin p { margin: 0 0 12px; }
body.admin ul { margin: 0; padding-left: 1.2rem; }
body.admin li { margin: 0 0 6px; }

.skip {
    position: absolute;
    left: -999px;
    top: 0;
    background: #1f2933;
    color: #fff;
    padding: 8px 12px;
}
.skip:focus { left: 12px; top: 12px; }

.admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}
.admin-side {
    background: #1f2937;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
}
.side-brand {
    padding: 4px 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
}
.side-brand strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}
.admin-side .muted,
.side-brand .muted { margin: 2px 0 0; font-size: 16px; color: #9ca3af; }
.admin-side .brand-logo { height: 32px; width: auto; max-width: 160px; margin-bottom: 8px; object-fit: contain; }
.admin-side nav { display: grid; gap: 2px; }
body.admin .admin-side a {
    color: #e5e7eb;
    text-decoration: none;
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 16px;
}
body.admin .admin-side a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
body.admin .admin-side a.active { background: #111827; color: #fff; font-weight: 600; }
.admin-side .nav-label {
    margin: 16px 10px 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
}
.side-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.admin-bar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 24px;
    position: sticky;
    top: 0;
    z-index: 5;
}
.admin-bar strong { font-size: 16px; font-weight: 600; }
.admin-bar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}
.admin-bar-user form { margin: 0; }
.admin-body { padding: 24px; }
.admin-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}
.admin-top p { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.stat strong { display: block; font-size: 20px; font-weight: 600; color: #1f2933; }
.stat span { color: #6b7280; font-size: 16px; }

.panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.submitted-value { white-space: pre-wrap; margin: 0 0 12px; }
.submitted-value strong,
.submitted-value span,
.submitted-value a { display: block; }
.submitted-value strong { margin-bottom: 2px; }
.panel > h3:first-child {
    margin: -16px -16px 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 8px 8px 0 0;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 16px;
    vertical-align: top;
}
th { background: #f9fafb; font-weight: 600; color: #1f2933; }
tr:last-child td { border-bottom: 0; }

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}
.badge-submitted, .badge-in_review, .badge-draft, .badge-paused { background: #e8eef3; color: #1d4f73; }
.badge-approved, .badge-published { background: #e7f5ef; color: #146c43; }
.badge-declined { background: #fdecec; color: #9b2c2c; }
.badge-on_hold, .badge-information_requested { background: #fbf3e4; color: #8a5a12; }
.badge-closed, .badge-archived { background: #f3f4f6; color: #4b5563; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stack { display: grid; gap: 12px; }
.muted { color: #6b7280; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input, .copy-row select { flex: 1; }

label, .label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 16px; }
.help { display: block; color: #6b7280; font-size: 16px; font-weight: 400; margin-top: 4px; }
form .field { margin-bottom: 12px; }
input, select, textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
    font-size: 16px;
    background: #fff;
    color: #1f2933;
}
textarea { min-height: 96px; resize: vertical; }
.choice { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 8px 0; }
.choice input { width: auto; margin-top: 3px; }
.error { color: #9b2c2c; font-size: 16px; margin-top: 4px; }
.flash {
    background: #e7f5ef;
    border: 1px solid #b7e0cc;
    color: #146c43;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    padding: 8px 14px;
    line-height: 1.25;
    background: #fff;
    color: #1f2933;
}
.btn-primary, .btn-green { background: #1f7a4d; color: #fff; border-color: #1f7a4d; }
.btn-blue { background: #1d4f73; color: #fff; border-color: #1d4f73; }
.btn-outline, .btn-ghost { background: #fff; color: #1f2933; border-color: #d1d5db; }
.btn-small { padding: 6px 10px; }
.btn:hover { filter: brightness(0.97); }

.logo-preview {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    margin-bottom: 8px;
}
.logo-preview.dark { background: #1f2933; }
.logo-preview.wide { min-height: 140px; }
.logo-preview img { max-height: 72px; max-width: 100%; width: auto; }
.logo-preview.wide img { max-height: 160px; }
.token-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.token-list code, p code {
    background: #f3f4f6;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 14px;
}
textarea.codebox {
    min-height: 280px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
}
.award-admin-photo {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}
.repeater { display: grid; gap: 12px; margin-bottom: 12px; }
.repeater-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    background: #f9fafb;
}
.photo-picks { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.photo-pick { width: 140px; font-weight: 400; font-size: 14px; }
.photo-pick img { width: 140px; height: 90px; object-fit: cover; border-radius: 6px; margin-bottom: 4px; }
.photo-pick input { width: auto; }

.mail-preview {
    width: 100%;
    height: 520px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.auth-card {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
}
.auth-card h1 { margin-bottom: 8px; }

@media (max-width: 900px) {
    .admin-shell, .stats, .row, .row-3 { grid-template-columns: 1fr; }
    .admin-side { position: static; height: auto; }
    .admin-side nav { display: flex; flex-wrap: wrap; }
    .side-foot { margin-top: 12px; }
    .admin-bar { align-items: flex-start; flex-direction: column; }
    .copy-row { flex-wrap: wrap; }
}
