:root {
    --cyan-50: #ecfeff;
    --cyan-100: #cffafe;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --blue-600: #2563eb;
    --navy-900: #0f172a;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --green: #16a34a;
    --amber: #d97706;
    --red: #dc2626;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--cyan-50), #f8fafc 340px);
    color: var(--navy-900);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    width: min(980px, 100%);
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(8, 145, 178, 0.18);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-hero {
    display: flex;
    min-height: 480px;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    background: linear-gradient(135deg, var(--cyan-600), var(--blue-600));
    color: var(--white);
}

.auth-hero h1,
.topbar h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
}

.auth-hero p {
    max-width: 440px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 17px;
}

.auth-card {
    display: grid;
    gap: 18px;
    align-content: center;
    padding: 36px;
    background: var(--white);
}

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

.brand,
.brand-mark {
    display: inline-flex;
    align-items: center;
}

.brand {
    gap: 10px;
    padding: 18px;
    font-weight: 800;
}

.brand-mark {
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--cyan-600);
    color: var(--white);
    font-weight: 900;
}

.auth-hero .brand-mark {
    width: 54px;
    height: 54px;
    margin-bottom: 22px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.34);
}

.app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: rgba(255, 255, 255, 0.92);
    border-right: 1px solid var(--slate-200);
    backdrop-filter: blur(14px);
}

.nav {
    display: grid;
    gap: 4px;
    padding: 8px 12px 24px;
}

.nav a {
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--slate-700);
    font-weight: 650;
}

.nav a.active,
.nav a:hover {
    background: var(--cyan-100);
    color: #155e75;
}

.main-shell {
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 30px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--cyan-600);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--slate-700);
}

.content {
    display: grid;
    gap: 18px;
    padding: 0 30px 36px;
}

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

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

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

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

.metric,
.panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.metric {
    display: grid;
    gap: 8px;
    min-height: 106px;
    padding: 18px;
}

.metric span {
    color: var(--slate-500);
    font-weight: 650;
}

.metric strong {
    font-size: 28px;
}

.panel {
    padding: 18px;
}

.panel h2,
.auth-card h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.form-grid.single {
    grid-template-columns: 1fr;
}

label {
    display: grid;
    gap: 7px;
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 750;
}

input,
select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: var(--white);
    color: var(--navy-900);
}

input:focus,
select:focus {
    outline: 3px solid rgba(6, 182, 212, 0.22);
    border-color: var(--cyan-500);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--slate-100);
    color: var(--navy-900);
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.btn-primary {
    background: var(--cyan-600);
    color: var(--white);
}

.btn-ghost {
    border-color: var(--slate-200);
    background: var(--white);
}

.btn-danger {
    background: #fee2e2;
    color: #991b1b;
}

.btn-small {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
}

.flash {
    margin: 0 30px 18px;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 750;
}

.auth-card .flash {
    margin: 0;
}

.flash.success {
    background: #dcfce7;
    color: #166534;
}

.flash.error {
    background: #fee2e2;
    color: #991b1b;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

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

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

th {
    color: var(--slate-500);
    font-size: 12px;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--slate-100);
    color: var(--slate-700);
    font-size: 12px;
    font-weight: 850;
}

.badge.confirmed,
.badge.completed {
    background: #dcfce7;
    color: #166534;
}

.badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.badge.cancelled,
.badge.no_show {
    background: #fee2e2;
    color: #991b1b;
}

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

.actions form,
.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.inline-form select {
    min-height: 34px;
    width: 112px;
    padding: 5px 8px;
}

.inline-form input[type="datetime-local"] {
    min-height: 34px;
    width: 172px;
    padding: 5px 8px;
}

.empty,
.muted {
    color: var(--slate-500);
}

@media (max-width: 1100px) {
    .cards-5,
    .cards-3,
    .two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 820px) {
    .auth-shell,
    .app-shell {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: 260px;
        padding: 30px;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--slate-200);
    }

    .nav {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        padding: 0 12px 12px;
    }

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

    .content {
        padding: 0 20px 28px;
    }

    .flash {
        margin: 0 20px 16px;
    }
}

@media (max-width: 560px) {
    .cards-5,
    .cards-3,
    .two-col,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .auth-page {
        padding: 12px;
    }

    .auth-card,
    .auth-hero {
        padding: 24px;
    }

    .topbar h1,
    .auth-hero h1 {
        font-size: 25px;
    }

    .user-box {
        width: 100%;
        justify-content: space-between;
    }
}
