:root {
    --bg: #f4f7f8;
    --card: #ffffff;
    --text: #173035;
    --muted: #60777d;
    --primary: #008595;
    --primary-dark: #006979;
    --border: #d9e5e8;
    --danger: #b42318;
    --success: #027a48;
    --warning: #b54708;
    --shadow: 0 12px 30px rgba(23, 48, 53, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand a {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

nav a {
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
}

.footer {
    text-align: center;
    color: var(--muted);
    padding: 30px;
    font-size: 14px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.hero {
    background: linear-gradient(135deg, #ffffff, #e8f8fa);
}

.hero h1,
.page-title h1,
.card h1 {
    margin-top: 0;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    min-height: 42px;
}

.btn:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.btn.secondary {
    background: #e7f2f4;
    color: var(--primary-dark);
}

.btn.danger {
    background: var(--danger);
}

.btn.small {
    min-height: 34px;
    padding: 8px 12px;
    font-size: 14px;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.compact {
    gap: 12px;
}

.stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats .card strong {
    display: block;
    font-size: 34px;
    color: var(--primary-dark);
}

.stats .card span {
    color: var(--muted);
}

.page-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.page-title p {
    margin-top: 0;
    color: var(--muted);
}

.list-item,
.request-card {
    border-top: 1px solid var(--border);
    padding: 18px 0;
}

.list-item:first-of-type,
.request-card:first-of-type {
    border-top: 0;
}

.list-item h3,
.request-card h2,
.slot-card h2 {
    margin-bottom: 8px;
}

.request-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
}

.request-card.admin {
    grid-template-columns: 1fr 320px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #edf7f8;
    color: var(--primary-dark);
    padding: 4px 10px;
    font-weight: 700;
    font-size: 13px;
}

.meta {
    color: var(--muted);
    font-size: 14px;
}

.admin-comment {
    background: #fff7ed;
    border-left: 4px solid var(--warning);
    padding: 10px 12px;
    border-radius: 10px;
}

.auth-page {
    min-height: 70vh;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(480px, 100%);
}

.form-card {
    max-width: 850px;
}

label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}

textarea {
    resize: vertical;
}

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin: 12px 0;
    font-weight: 700;
}

.alert.success {
    background: #ecfdf3;
    color: var(--success);
}

.alert.error {
    background: #fef3f2;
    color: var(--danger);
}

.small {
    color: var(--muted);
    font-size: 14px;
}

.inline-form {
    background: #f8fbfc;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fbfc;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-actions form {
    margin: 0;
}

.details {
    padding-left: 20px;
}

@media (max-width: 820px) {
    .topbar,
    .page-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .grid.two,
    .stats,
    .request-card,
    .request-card.admin {
        grid-template-columns: 1fr;
    }

    nav {
        width: 100%;
    }
}
