:root {
    --bg: #ffffff;
    --card: rgba(255, 255, 255, 0.94);
    --card-strong: #ffffff;
    --text: #3b3b3b;
    --muted: rgba(59, 59, 59, 0.74);
    --accent: #78e150;
    --accent-dark: #3b3b3b;
    --line: rgba(59, 59, 59, 0.14);
    --danger: #3b3b3b;
    --success: #78e150;
    --highlight: #a0d2c8;
    --shadow: 0 24px 60px rgba(59, 59, 59, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(120, 225, 80, 0.22), transparent 26%),
        radial-gradient(circle at bottom right, rgba(160, 210, 200, 0.36), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f6fcf8 54%, #eef7f4 100%);
}

.body-admin {
    background:
        radial-gradient(circle at top left, rgba(120, 225, 80, 0.18), transparent 24%),
        radial-gradient(circle at bottom right, rgba(160, 210, 200, 0.4), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f4fbf8 46%, #edf7f3 100%);
}

.page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    gap: 20px;
    padding: 32px 16px;
}

.card {
    width: min(100%, 620px);
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.card--wide {
    width: min(100%, 1120px);
    background: var(--card-strong);
}

.card__header {
    margin-bottom: 28px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.topbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

h1,
h2 {
    margin: 0 0 12px;
    line-height: 1;
}

h1 {
    font-size: clamp(32px, 5vw, 46px);
}

h2 {
    font-size: 28px;
}

.lead,
.table-empty {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.form {
    display: grid;
    gap: 18px;
}

.grid-2 {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 15px;
    font-weight: 700;
}

input,
select,
textarea,
.button {
    min-height: 52px;
    border-radius: 16px;
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 0 16px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.96);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(120, 225, 80, 0.95);
    box-shadow: 0 0 0 4px rgba(120, 225, 80, 0.18);
    transform: translateY(-1px);
}

textarea {
    min-height: 180px;
    padding: 14px 16px;
    resize: vertical;
}

select:disabled {
    color: rgba(59, 59, 59, 0.48);
    background: rgba(160, 210, 200, 0.18);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0 20px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    background: var(--accent);
    box-shadow: 0 14px 28px rgba(120, 225, 80, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(120, 225, 80, 0.34);
}

.button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(160, 210, 200, 0.65);
}

.button--secondary {
    color: var(--text);
    background: rgba(160, 210, 200, 0.42);
    box-shadow: none;
}

.button--ghost {
    color: var(--accent-dark);
    background: transparent;
    border: 1px solid var(--line);
    box-shadow: none;
}

.button--danger {
    color: #ffffff;
    background: var(--accent-dark);
    box-shadow: none;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
    box-shadow: none;
}

.field__error,
.alert {
    color: var(--danger);
}

.field__error {
    font-size: 14px;
}

.alert,
.flash {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
}

.alert {
    border: 1px solid rgba(59, 59, 59, 0.12);
    background: rgba(160, 210, 200, 0.22);
}

.flash {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.86);
}

.flash--error {
    color: var(--danger);
    border-color: rgba(59, 59, 59, 0.14);
    background: rgba(59, 59, 59, 0.06);
}

.flash--success {
    color: var(--success);
    border-color: rgba(120, 225, 80, 0.24);
    background: rgba(120, 225, 80, 0.12);
}

.text-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
}

.admin-sections {
    display: grid;
    gap: 24px;
}

.section-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
}

.section-panel__header {
    margin-bottom: 20px;
}

.schedule-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
}

.section-form {
    align-content: start;
}

.stack {
    display: grid;
    gap: 16px;
}

.schedule-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(160, 210, 200, 0.12);
}

.schedule-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.schedule-card__head h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.schedule-card__meta {
    margin: 0;
    color: var(--muted);
}

.slot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.slot-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(120, 225, 80, 0.2);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.slot-chip--reserved {
    border-color: rgba(59, 59, 59, 0.12);
    background: rgba(59, 59, 59, 0.08);
}

.admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inline-form {
    margin: 0;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(120, 225, 80, 0.18);
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 700;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
}

.modal--open {
    display: block;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(59, 59, 59, 0.42);
}

.modal__dialog {
    position: relative;
    width: min(calc(100% - 32px), 460px);
    margin: min(18vh, 120px) auto 0;
    padding: 28px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow);
    animation: rise 0.25s ease;
}

.modal__dialog p {
    margin-bottom: 20px;
    color: var(--muted);
    line-height: 1.6;
}

.modal__text {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(160, 210, 200, 0.18);
    color: var(--text);
}

.modal__actions {
    display: flex;
    gap: 12px;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .schedule-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .card {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar__actions,
    .inline-actions {
        width: 100%;
    }

    .section-panel,
    .schedule-card {
        padding: 18px;
    }

    .topbar__actions .button,
    .inline-actions .button,
    .inline-form,
    .inline-form .button {
        width: 100%;
    }

    .schedule-card__head {
        flex-direction: column;
    }

    .modal__dialog {
        padding: 22px;
    }

    .modal__actions {
        flex-direction: column;
    }
}
