:root {
    --bg: #f4f6f8;
    --card: #fff;
    --text: #1a1a2e;
    --accent: #0f4c81;
    --border: #dde3ea;
    --success: #1b7f4a;
    --error: #b42318;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container { max-width: 960px; margin: 0 auto; padding: 1rem; }

.header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.logo {
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}
.nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--accent); }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    display: block;
    text-decoration: none;
    color: inherit;
}
.card--narrow { max-width: 420px; margin: 2rem auto; }
.card h2 { margin-top: 0; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: 8px;
    overflow: hidden;
}
.table th, .table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.table th { background: #eef2f6; }
.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-badge--booked {
    background: #e8f2ff;
    color: #0f4c81;
}
.status-badge--no-show {
    background: #fdecea;
    color: #b42318;
}
.status-badge--cancelled {
    background: #f4f4f5;
    color: #374151;
}
.status-badge--reaccess {
    background: #fff7e6;
    color: #9a5b00;
}
.status-badge--visited {
    background: #e8f7ee;
    color: #1b7f4a;
}

.row-actions {
    position: relative;
    display: inline-block;
}
.row-actions__trigger {
    list-style: none;
    cursor: pointer;
    color: var(--accent);
    font-size: 1.1rem;
    line-height: 1;
    user-select: none;
}
.row-actions__trigger::-webkit-details-marker {
    display: none;
}
.row-actions[open] .row-actions__menu {
    display: block;
}
.row-actions__menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 150px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(15, 76, 129, 0.12);
    padding: 0.35rem;
    z-index: 10;
}
.row-actions__item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.55rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 4px;
    background: transparent;
    font: inherit;
}
.row-actions__item:hover {
    background: #eef2f6;
}
.row-actions__item--button {
    border: none;
    cursor: pointer;
}
.row-actions__item--disabled {
    color: #8b93a1;
    cursor: not-allowed;
}

label { display: block; margin-bottom: 1rem; }
input, select, textarea {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
}
button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
}
button:hover { opacity: 0.9; }
.btn-link {
    background: none;
    color: var(--accent);
    padding: 0;
    text-decoration: underline;
}

.list { list-style: none; padding: 0; }
.list li {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.messages { list-style: none; padding: 0; }
.message {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}
.message--success { background: #e8f7ee; color: var(--success); }
.message--error { background: #fdecea; color: var(--error); }

.muted { color: #667; }
