:root {
    --bg: #0f1419;
    --surface: #1a2332;
    --surface2: #243044;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #79b8ff;
    --success: #3fb950;
    --error: #f85149;
    --radius: 8px;
    --font: 'DM Sans', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--surface2);
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.logo:hover {
    color: var(--accent);
}

.logo-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--accent);
}

.main {
    flex: 1;
    padding: 2rem 0;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(248, 81, 73, 0.15);
    color: var(--error);
    border: 1px solid rgba(248, 81, 73, 0.3);
}

.alert-success, .alert-message {
    background: rgba(63, 185, 80, 0.12);
    color: var(--success);
    border: 1px solid rgba(63, 185, 80, 0.25);
}

.site-footer {
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--surface2);
}

/* Buttons & forms */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--surface2);
}

.btn-ghost:hover {
    background: var(--surface2);
    color: var(--text);
}

.btn-danger {
    background: rgba(248, 81, 73, 0.2);
    color: var(--error);
}

.btn-danger:hover {
    background: rgba(248, 81, 73, 0.35);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-danger {
    background: rgba(248, 81, 73, 0.25);
    color: var(--error);
}

select {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--surface2);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    min-width: 10rem;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--surface2);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1rem;
}

.form-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Admin index */
.page-title {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-list li {
    background: var(--surface);
    border: 1px solid var(--surface2);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.links-list .link-info {
    flex: 1;
    min-width: 0;
}

.links-list .link-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.links-list .link-url {
    font-size: 0.85rem;
    color: var(--text-muted);
    word-break: break-all;
}

.links-list .link-actions {
    display: flex;
    gap: 0.5rem;
}

/* Admin link detail */
.card {
    background: var(--surface);
    border: 1px solid var(--surface2);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.card h2 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.copy-url-wrap {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.copy-url-wrap input {
    flex: 1;
}

.qrcode-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.qrcode-img {
    display: block;
    border-radius: var(--radius);
    background: #fff;
    padding: 0.5rem;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.slot-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    background: var(--surface2);
    border-radius: 6px;
    font-size: 0.9rem;
}

.slot-chip.booked {
    background: rgba(63, 185, 80, 0.15);
    color: var(--success);
}

.slot-chip .remove-slot {
    margin-left: 0.5rem;
    padding: 0.1rem 0.35rem;
    font-size: 0.75rem;
}

.add-slots-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 0.75rem;
    align-items: end;
}

.duration-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

@media (max-width: 600px) {
    .add-slots-form {
        grid-template-columns: 1fr;
    }
}

.bookings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bookings-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--surface2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bookings-list li:last-child {
    border-bottom: none;
}

.bookings-list .booking-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Landing page */
.landing {
    text-align: center;
    padding: 3rem 0;
}

.landing-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-title-icon {
    font-size: 2rem;
    line-height: 1;
}

.landing-text {
    color: var(--text-muted);
    margin: 0;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.landing-admin {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--surface2);
    text-align: center;
    font-size: 0.85rem;
}

.landing-admin a {
    color: var(--text-muted);
    text-decoration: none;
}

.landing-admin a:hover {
    color: var(--accent);
}

/* Booking page (public) */
.body-book {
    background: linear-gradient(160deg, var(--bg) 0%, #0d1117 100%);
}

.body-book .site-header {
    background: transparent;
    border-bottom: none;
}

.booking-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.booking-hero h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.booking-hero p {
    color: var(--text-muted);
    margin: 0;
}

.booking-hero .booking-location {
    margin-top: 0.75rem;
    color: var(--text);
}

.booking-hero .location-text {
    white-space: pre-line;
    word-break: break-word;
}

.slots-by-date {
    margin-bottom: 2rem;
}

.slots-by-date h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: var(--text-muted);
}

.slot-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.slot-option {
    display: block;
}

.slot-option input {
    display: none;
}

.slot-option span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 2px solid var(--surface2);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.slot-option input:checked + span {
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent);
}

.slot-option span:hover {
    border-color: var(--text-muted);
}

.booking-form-actions {
    margin-top: 1.5rem;
}

.no-slots {
    color: var(--text-muted);
    padding: 1.5rem;
    text-align: center;
    background: var(--surface);
    border-radius: var(--radius);
}

.new-link-form .form-group {
    max-width: 360px;
}
