:root {
    --primary:       #006BFF;
    --primary-dark:  #0052CC;
    --primary-light: #E8F0FF;
    --text:          #1a1a2e;
    --muted:         #6b7280;
    --border:        #e5e7eb;
    --bg:            #f9fafb;
    --white:         #ffffff;
    --danger:        #dc2626;
    --success:       #16a34a;
    --radius:        12px;
    --shadow:        0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg:     0 10px 25px rgba(0,0,0,.10);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* ── Header ── */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.header-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem;
    flex-shrink: 0;
}
.header-name    { font-weight: 600; font-size: 1rem; }
.header-company { font-size: 0.8rem; color: var(--muted); }

/* ── Main ── */
main {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

/* ── Card ── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ── Meeting type cards ── */
.types-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.type-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    text-decoration: none;
    color: var(--text);
}
.type-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.type-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.type-name     { font-weight: 600; margin-bottom: .25rem; }
.type-desc     { font-size: .85rem; color: var(--muted); }
.type-duration { font-size: .8rem; color: var(--primary); margin-top: .25rem; font-weight: 500; }

/* ── Calendar layout ── */
.calendar-layout {
    display: grid;
    grid-template-columns: 1fr 270px;
}
@media (max-width: 640px) {
    .calendar-layout { grid-template-columns: 1fr; }
}
.calendar-section {
    padding: 1.5rem;
    border-right: 1px solid var(--border);
}
.calendar-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.month-label { font-weight: 600; font-size: 1rem; }
.nav-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 34px; height: 34px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    transition: background .15s;
}
.nav-btn:hover   { background: var(--bg); }
.nav-btn:disabled { opacity: .3; cursor: default; }
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cal-header {
    text-align: center;
    font-size: .72rem;
    font-weight: 600;
    color: var(--muted);
    padding: .3rem 0;
    text-transform: uppercase;
}
.cal-day {
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: .88rem;
    color: var(--muted);
}
.cal-day.available {
    cursor: pointer;
    color: var(--text);
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all .15s;
}
.cal-day.available:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.cal-day.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 700;
}
.cal-day.today-ring { box-shadow: 0 0 0 2px var(--primary); }
.cal-day.past       { opacity: .38; }

/* ── Time slots ── */
.slots-section {
    padding: 1.5rem;
    min-height: 260px;
}
.slots-date {
    font-weight: 600;
    font-size: .82rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 1rem;
}
.slots-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-height: 380px;
    overflow-y: auto;
}
.slot-btn {
    display: block; width: 100%;
    padding: .65rem;
    background: var(--white);
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600; font-size: .9rem;
    cursor: pointer;
    transition: all .15s;
    text-align: center;
}
.slot-btn:hover { background: var(--primary); color: #fff; }
.slot-btn.taken {
    border-color: var(--border);
    color: var(--muted);
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: .6;
}
.no-slots {
    color: var(--muted);
    font-size: .9rem;
    text-align: center;
    padding: 2.5rem 0;
}

/* ── Booking form ── */
.booking-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.booking-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: .25rem;
    flex-wrap: wrap;
}
.booking-type-name { font-size: 1.2rem; font-weight: 700; }
.booking-form-body { padding: 1.5rem; }

.form-group { margin-bottom: 1.2rem; }
label {
    display: block;
    font-weight: 600; font-size: .9rem;
    margin-bottom: .35rem;
}
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: .6rem .85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,107,255,.15);
}
textarea { resize: vertical; min-height: 80px; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .7rem 1.4rem;
    border-radius: 8px;
    font-size: .95rem; font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    border: none;
    gap: .4rem;
    font-family: inherit;
}
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-secondary { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); text-decoration: none; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover   { background: #b91c1c; }
.btn-sm { padding: .35rem .8rem; font-size: .82rem; }

/* ── Confirmation ── */
.confirm-card { max-width: 480px; margin: 0 auto; text-align: center; padding: 2.5rem; }
.confirm-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: #dcfce7; color: var(--success);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem; font-weight: 700;
}
.confirm-details {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}
.confirm-row {
    display: flex; justify-content: space-between;
    font-size: .88rem;
    padding: .4rem 0;
    border-bottom: 1px solid var(--border);
}
.confirm-row:last-child { border-bottom: none; }
.confirm-row span:first-child { color: var(--muted); }
.confirm-row span:last-child  { font-weight: 500; text-align: right; }

/* ── Admin table ── */
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th {
    text-align: left;
    padding: .7rem 1rem;
    border-bottom: 2px solid var(--border);
    color: var(--muted); font-size: .75rem;
    text-transform: uppercase; letter-spacing: .05em;
}
.admin-table td {
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg); }

.badge {
    display: inline-block;
    padding: .18rem .6rem;
    border-radius: 999px;
    font-size: .75rem; font-weight: 600;
}
.badge-confirmed { background: #dcfce7; color: #16a34a; }
.badge-cancelled { background: #fee2e2; color: #dc2626; }
.badge-past      { background: var(--bg); color: var(--muted); }

/* ── Misc ── */
.page-title    { font-size: 1.5rem; font-weight: 700; margin-bottom: .2rem; }
.page-subtitle { color: var(--muted); margin-bottom: 1.5rem; }

.steps {
    display: flex; gap: .5rem; margin-bottom: 1.5rem;
    font-size: .85rem; align-items: center; color: var(--muted);
}
.step.active { color: var(--primary); font-weight: 600; }

.alert {
    padding: .8rem 1rem;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 1rem;
}
.alert-error { background: #fee2e2; color: #dc2626; }

footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--muted); font-size: .8rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
