:root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-light: #eff6ff;
    --bg: #f4f6fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --pending: #d97706;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }




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

.topbar a { color: var(--brand); text-decoration: none; font-weight: 600; }
.topbar .brand { font-weight: 700; font-size: 18px; color: var(--text); }
.topbar .brand .dot { color: var(--brand); }
.topbar nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.topbar nav a {
    margin-left: 4px;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
}
.topbar nav a:hover { background: var(--brand-light); }
.topbar nav a.active { background: var(--brand-light); color: var(--brand-dark); }

/* ---------------- Layout ---------------- */
.wrap {
    max-width: 460px;
    margin: 48px auto;
    padding: 0 16px;
}

.wrap.wide { max-width: 720px; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.06);
}

h1 { font-size: 23px; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 0 0 16px; }
p.sub { color: var(--muted); margin: 0 0 24px; font-size: 14.5px; line-height: 1.5; }

/* ---------------- Forms ---------------- */
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 16px 0 6px;
    color: var(--text);
}

input[type=text], input[type=email], input[type=tel],
input[type=password], input[type=date], input[type=time],
textarea, select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

textarea { resize: vertical; min-height: 80px; }

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Password field with eye toggle */
.pw-field { position: relative; }
.pw-field input { padding-right: 44px; }
.pw-toggle {
    position: absolute !important;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--muted);
}
.pw-toggle:hover { background: var(--brand-light); color: var(--brand-dark); }
.pw-toggle svg,
.pw-toggle svg.eye-on,
.pw-toggle svg.eye-off {
    width: 19px !important;
    height: 19px !important;
    max-width: 19px !important;
    max-height: 19px !important;
    flex-shrink: 0;
}
.pw-toggle .eye-off { display: none; }
.pw-toggle.is-visible .eye-on { display: none; }
.pw-toggle.is-visible .eye-off { display: block; }

button, .btn {
    display: inline-block;
    width: 100%;
    margin-top: 24px;
    padding: 13px 16px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .15s ease, transform .05s ease;
}

button:hover, .btn:hover { background: var(--brand-dark); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; }

.btn.secondary {
    background: #fff;
    color: var(--brand);
    border: 1.5px solid var(--border);
    margin-top: 12px;
}
.btn.secondary:hover { background: var(--brand-light); border-color: var(--brand); }

.btn.link-btn {
    width: auto;
    display: inline-block;
    padding: 10px 24px;
    margin-top: 0;
}

.foot-link { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.foot-link a { font-weight: 600; text-decoration: none; }
.foot-link a:hover { text-decoration: underline; }

/* ---------------- Alerts ---------------- */
.alert {
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.alert.error { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }
.alert.success { background: var(--success-bg); color: var(--success); border: 1px solid #bbf7d0; }
.alert.info { background: var(--brand-light); color: var(--brand-dark); border: 1px solid #bfdbfe; }

/* ---------------- OTP boxes ---------------- */
.otp-boxes {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    max-width: 340px;
    margin: 8px auto 4px;
}
.otp-boxes input[type="text"] {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 52px !important;
    flex: 0 0 44px !important;
    text-align: center !important;
    font-size: 20px !important;
    font-weight: 700;
    padding: 0 !important;
    letter-spacing: 0;
    border-radius: 10px;
}
.otp-meta {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 14px;
}
.otp-meta strong { color: var(--text); }
.resend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.resend-row button {
    width: auto;
    margin-top: 0;
    background: transparent;
    color: var(--brand);
    padding: 6px 10px;
    font-size: 13.5px;
}
.resend-row button:hover { background: var(--brand-light); }
.cooldown-text { font-size: 13px; color: var(--muted); }

/* ---------------- Booking list ---------------- */
.booking-list { list-style: none; margin: 0; padding: 0; }
.booking-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.booking-item .when { font-weight: 600; }
.booking-item .notes { color: var(--muted); font-size: 13px; margin-top: 4px; }

.badge {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
    white-space: nowrap;
}
.badge.pending { background: #fffbeb; color: var(--pending); }
.badge.confirmed { background: #eff6ff; color: var(--brand); }
.badge.completed { background: #f0fdf4; color: var(--success); }
.badge.cancelled { background: #fef2f2; color: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 44px 0; }

/* ---------------- Booking confirmation card ---------------- */
.confirm-card {
    text-align: center;
    padding: 8px 0 4px;
}
.confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.confirm-icon svg { width: 28px; height: 28px; }
.confirm-when {
    font-size: 19px;
    font-weight: 700;
    margin: 4px 0 2px;
}
.confirm-sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.confirm-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.confirm-actions .btn { width: auto; margin-top: 0; padding: 11px 20px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 600px) {
    .wrap { margin: 24px auto; padding: 0 12px; }
    .card { padding: 22px; border-radius: 12px; }
    h1 { font-size: 20px; }
    .topbar { padding: 12px 14px; }
    .topbar .brand { font-size: 16px; }
    .topbar nav a { padding: 7px 9px; font-size: 13px; margin-left: 0; }
    .otp-boxes { gap: 7px; max-width: 300px; }
    .otp-boxes input[type="text"] {
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 46px !important;
        flex-basis: 38px !important;
        font-size: 17px !important;
    }
    .confirm-actions { flex-direction: column; }
    .confirm-actions .btn { width: 100%; }
}

@media (max-width: 380px) {
    .otp-boxes { gap: 5px; max-width: 260px; }
    .otp-boxes input[type="text"] {
        width: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        height: 42px !important;
        flex-basis: 32px !important;
        font-size: 15px !important;
    }
}
