body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
}

/* =========================
   Accessibility Foundation
   ========================= */

:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 12px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    border: 2px solid #2563eb;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 12px;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

.site-header,
.admin-header {
    background: #2b2b2b;
    color: white;
    padding: 12px 20px;
}

.site-nav .nav-links,
.admin-nav .nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.site-nav a,
.admin-nav a {
    text-decoration: none;
}

.site-header a,
.admin-header a,
.site-nav a {
    color: white;
}

.site-nav li.active > a,
.admin-nav li.active > a {
    font-weight: 700;
    text-decoration: underline;
}

.site-nav a,
.admin-nav a {
    text-decoration: none;
    border-radius: 6px;
}

.site-nav a:focus-visible,
.admin-nav a:focus-visible {
    text-decoration: underline;
}

.admin-nav li.active a {
    font-weight: 700;
    background: #f3f4f6;
    border-radius: 6px;
}

.site-nav li.active > a,
.admin-nav li.active > a {
    font-weight: 700;
    text-decoration: underline;
}

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    padding: 20px;
}

.admin-nav ul li {
    margin-bottom: 10px;
}

.admin-nav a {
    color: #222;
}

.nav-form {
    display: inline;
    margin: 0;
}

.nav-link,
.nav-link-button {
    display: inline-block;
    padding: 2px 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link-button:hover,
.nav-link-button:focus-visible {
    text-decoration: underline;
}

.site-nav .nav-link,
.site-nav .nav-link-button {
    color: white;
}

.admin-nav .nav-link,
.admin-nav .nav-link-button {
    color: #222;
}

.admin-content {
    min-width: 0;
}

/* =========================
   Admin Dashboard Cards
   ========================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.dashboard-card {
    display: block;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    text-decoration: none;
    color: #111827;
    transition: all 0.15s ease;
}

.dashboard-card:hover {
    border-color: #cbd5f5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.dashboard-card:focus-visible {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    transform: translateY(-2px);
}

.dashboard-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.dashboard-card-link {
    font-size: 13px;
    color: #6b7280;
}

.dashboard-card-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 10px;
}

.dashboard-card-description {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
}

.admin-nav-group + .admin-nav-group {
    margin-top: 18px;
}

.admin-nav-group-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4b5563;
    margin: 0 0 6px;
}

.admin-nav-group + .admin-nav-group {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.admin-nav-icon {
    display: inline-block;
    width: 20px;
    margin-right: 6px;
    text-align: center;
}

.admin-nav li a {
    display: flex;
    align-items: center;
}

.dashboard-section + .dashboard-section {
    margin-top: 28px;
}

.dashboard-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #4b5563;
    margin: 0 0 12px;
}

.dashboard-card.active {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.admin-nav li.active a {
    font-weight: 700;
    background: #f3f4f6;
    border-radius: 6px;
}

/* =========================
   Auth / Login Page
   ========================= */

.site-content {
    padding: 24px;
}

.auth-container {
    max-width: 420px;
    margin: 48px auto;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.auth-container h1 {
    margin: 0 0 20px;
    font-size: 32px;
    line-height: 1.2;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    gap: 6px;
}

.auth-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
}

.auth-form input:focus-visible {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.auth-form button {
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
}

.auth-form button:hover {
    background: #1d4ed8;
}

.auth-form button:focus-visible {
    background: #1d4ed8;
}

.error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #f5c2c7;
    background: #f8d7da;
    color: #842029;
    border-radius: 6px;
}

.admin-flash {
    margin: 0 0 10px;
    padding: 8px 12px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.2;
    background: #f8fafc;
}

.admin-flash-success {
    border-color: #b7e4c7;
    background: #e9f7ef;
    color: #1e4620;
}

.admin-flash-error {
    border-color: #f5c2c7;
    background: #f8d7da;
    color: #842029;
}

/* =========================
   Pages Admin Index
   ========================= */

.pages-admin-index {
    padding: 28px 32px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.pages-admin-index__header {
    margin-bottom: 22px;
}

.pages-admin-index__title {
    margin: 0 0 8px;
    font-size: 2rem;
    line-height: 1.2;
    color: #111827;
}

.pages-admin-index__intro {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
}

.pages-admin-index__panel {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    overflow: hidden;
}

.pages-admin-index__panel-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.pages-admin-index__panel-title {
    margin: 0 0 6px;
    font-size: 1.1rem;
    line-height: 1.3;
    color: #111827;
}

.pages-admin-index__panel-note {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #6b7280;
}

.pages-admin-index__table-wrap {
    margin-top: 0;
    width: 100%;
    overflow-x: auto;
}

.pages-admin-index__table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.pages-admin-index__table th,
.pages-admin-index__table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #e5e7eb;
}

.pages-admin-index__table thead th {
    font-size: 0.92rem;
    font-weight: 700;
    color: #374151;
    background: #f8fafc;
    white-space: nowrap;
}

.pages-admin-index__table tbody tr:hover {
    background: #f9fafb;
}

.pages-admin-index__slug {
    display: inline-block;
    min-width: 72px;
    font-weight: 700;
    color: #111827;
}

.pages-admin-index__actions-col {
    width: 140px;
}

.pages-admin-index__actions {
    white-space: nowrap;
}

.pages-admin-index__edit-link {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pages-admin-index__edit-link:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.pages-admin-index__edit-link:focus-visible {
    background: #f3f4f6;
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

@media (max-width: 900px) {
    .pages-admin-index {
        padding: 20px;
    }

    .pages-admin-index__title {
        font-size: 1.7rem;
    }

    .pages-admin-index__table th,
    .pages-admin-index__table td {
        padding: 12px 14px;
    }
}

.pages-admin-index__table tbody tr:nth-child(even) {
    background: #fcfcfd;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge--yes {
    background: #e6f4ea;
    color: #166534;
}

.badge--no {
    background: #fbeaea;
    color: #991b1b;
}

.pages-admin-index__table td:nth-child(6) {
    color: #6b7280;
    font-size: 0.92rem;
}

.admin-content {
    max-width: 1200px;
}

/* =========================
   Pages Admin Edit
   ========================= */

.pages-admin-edit {
    padding: 28px 32px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.pages-admin-edit__header {
    margin-bottom: 24px;
}

.pages-admin-edit__title {
    margin: 0 0 8px;
    font-size: 2rem;
    line-height: 1.2;
    color: #111827;
}

.pages-admin-edit__intro {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
}

.pages-admin-edit__form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.pages-admin-edit__panel {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.pages-admin-edit__panel--secondary {
    margin-top: 24px;
    background: #f9fafb;
}

.pages-admin-edit__panel-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.pages-admin-edit__panel-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
    color: #111827;
}

.pages-admin-edit__panel-note {
    margin: 6px 0 0;
    font-size: 0.95rem;
    color: #6b7280;
}

.pages-admin-edit__settings-grid,
.pages-admin-edit__content-grid {
    display: grid;
    gap: 18px;
    padding: 20px;
}

.pages-admin-edit__settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-bottom: 14px;
}

.pages-admin-edit__content-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pages-admin-edit__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.pages-admin-edit__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
}

.pages-admin-edit__input,
.pages-admin-edit__textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
}

.pages-admin-edit__input:focus-visible,
.pages-admin-edit__textarea:focus-visible {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.pages-admin-edit__textarea {
    resize: vertical;
    line-height: 1.5;
    min-height: 140px;
}

.pages-admin-edit__textarea--large {
    min-height: 360px;
}

.pages-admin-edit__checks {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 0 20px 20px;
}

.pages-admin-edit__check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
}

.pages-admin-edit__actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pages-admin-edit__button {
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid #2563eb;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
}

.pages-admin-edit__button:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.pages-admin-edit__button:focus-visible {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.pages-admin-edit__back {
    color: #374151;
    text-decoration: none;
    font-weight: 600;
}

.pages-admin-edit__back:hover {
    text-decoration: underline;
}

.pages-admin-edit__back:focus-visible {
    text-decoration: underline;
}

.pages-admin-edit__photo-form {
    padding: 20px;
}

.pages-admin-edit__current-file {
    margin: 0;
    padding: 0 20px 20px;
    color: #6b7280;
    font-size: 0.95rem;
}

@media (max-width: 1000px) {
    .pages-admin-edit {
        padding: 22px;
    }

    .pages-admin-edit__settings-grid,
    .pages-admin-edit__content-grid--two {
        grid-template-columns: 1fr;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.admin-toolbar h1 {
    margin: 0;
}

.text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #8aa7c7;
    border-radius: 6px;
    background: #fff;
    color: #1c4a7e;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    box-sizing: border-box;
    vertical-align: middle;
}

.text-btn:hover {
    background: #eef5ff;
}

.text-btn.secondary {
    border-color: #8aa7c7;
    color: #1c4a7e;
}

.text-btn.secondary:hover {
    background: #eef5ff;
}

.danger-link {
    border-color: #d99;
    color: #a11;
}

.danger-link:hover {
    background: #fff5f5;
}

.admin-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.admin-table th,
.admin-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: #f3f4f6;
}

.action-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.inline-action {
    display: inline-flex;
    margin: 0;
}

.items-actions {
    white-space: nowrap;
}

.calendar-status {
    margin: 0 0 10px;
    padding: 8px 12px;
    border: 1px solid #cfe2ff;
    border-radius: 6px;
    background: #eef5ff;
    color: #1f3c63;
    font-size: 0.95rem;
    line-height: 1.2;
}

.calendar-status-success {
    border-color: #b7e4c7;
    background: #e9f7ef;
    color: #1e4620;
}

.calendar-status-error {
    border-color: #f5c2c7;
    background: #f8d7da;
    color: #842029;
}

.calendar-empty-state {
    margin: 12px 0 18px;
    padding: 12px 14px;
    border: 1px solid #d6e9c6;
    background: #f6fbf2;
    color: #355e2b;
    border-radius: 8px;
}

.calendar-more {
    font-size: 12px;
    color: #666;
}

.admin-form {
    display: grid;
    gap: 16px;
    max-width: 700px;
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row label {
    font-weight: 600;
}

.form-row input,
.form-row select,
.form-row textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font: inherit;
}

.checkbox-row {
    flex-direction: row;
    align-items: center;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.form-error {
    color: #842029;
    font-size: 14px;
}

.form-help {
    color: #666;
    font-size: 14px;
}

.form-required {
    color: #842029;
}