/* ─── Geist font import fallback ─── */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

/* ─── Design tokens ─── */
:root {
    --hx-bg:         oklch(0.985 0.005 230);
    --hx-surface:    #ffffff;
    --hx-surface-2:  oklch(0.97 0.008 230);
    --hx-fg:         oklch(0.20 0.015 240);
    --hx-fg-muted:   oklch(0.55 0.020 240);
    --hx-border:     oklch(0.92 0.010 240);
    --hx-accent:     #5b3fd6;
    --hx-accent-bg:  oklch(0.96 0.03 290);
    --hx-ok-bg:      oklch(0.94 0.07 155);
    --hx-ok-fg:      oklch(0.38 0.10 155);
    --hx-font: 'Geist', 'Segoe UI', system-ui, sans-serif;
    --hx-mono: 'Geist Mono', 'Consolas', monospace;
    --hx-radius-card: 14px;
    --hx-shadow-hover: 0 4px 14px -6px rgba(15, 30, 60, 0.10);
}

body { background: var(--hx-bg) !important; font-family: var(--hx-font) !important; color: var(--hx-fg); -webkit-font-smoothing: antialiased; }

/* ─── Top bar ─── */
.hx-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 28px; background: var(--hx-surface); border-bottom: 1px solid var(--hx-border);
}
.hx-topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--hx-fg); font-size: 16px; }
.hx-topbar-brand i { color: var(--hx-accent); font-size: 20px; }

.hx-content { max-width: 960px; margin: 0 auto; padding: 28px 20px; }

/* ─── SubHeader ─── */
.hx-subheader { margin-bottom: 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hx-eyebrow { font-size: 13px; color: var(--hx-fg-muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; font-family: var(--hx-mono); margin: 0; }
.hx-greeting { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--hx-fg); margin: 6px 0 0; }
.hx-subheader-back {
    width: 36px; height: 36px; border-radius: 10px;
    border: 1px solid var(--hx-border); background: var(--hx-surface);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--hx-fg-muted); flex-shrink: 0;
    text-decoration: none; transition: border-color 150ms, color 150ms;
}
.hx-subheader-back:hover { border-color: var(--hx-accent); color: var(--hx-accent); }
.hx-subheader-titles { flex: 1; }
.hx-subheader-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--hx-fg); margin: 0; line-height: 1.2; }
.hx-subheader-sub { font-size: 13px; color: var(--hx-fg-muted); margin: 2px 0 0; }

/* ─── Home menu card grid ─── */
.hx-menu-card {
    background: var(--hx-surface); border: 1px solid var(--hx-border);
    border-radius: var(--hx-radius-card); padding: 22px; display: block;
    text-decoration: none !important; color: var(--hx-fg) !important;
    transition: border-color 150ms, box-shadow 150ms, transform 150ms;
    height: 100%; min-height: 150px;
}
.hx-menu-card:hover { border-color: var(--hx-accent); box-shadow: var(--hx-shadow-hover); transform: translateY(-1px); }
.hx-menu-icon-chip {
    width: 44px; height: 44px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: var(--hx-accent-bg); color: var(--hx-accent);
    font-size: 20px; margin-bottom: 14px;
}
.hx-menu-card-arrow { float: right; color: var(--hx-fg-muted); opacity: 0.4; transition: opacity 150ms; }
.hx-menu-card:hover .hx-menu-card-arrow { opacity: 1; color: var(--hx-accent); }
.hx-menu-card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--hx-fg); margin-bottom: 4px; }
.hx-menu-card-desc { font-size: 12.5px; color: var(--hx-fg-muted); line-height: 1.4; margin: 0; }

/* ─── Doctor list cards ─── */
.hx-doctor-card { background: var(--hx-surface); border: 1px solid var(--hx-border); border-radius: var(--hx-radius-card); padding: 16px; height: 100%; }
.hx-doctor-avatar {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    background: var(--hx-surface-2); display: flex; align-items: center; justify-content: center;
    font-weight: 600; color: var(--hx-fg-muted);
}

/* ─── Card ─── */
.box {
    background: var(--hx-surface);
    border: 1px solid var(--hx-border);
    border-radius: var(--hx-radius-card);
    margin-bottom: 0;
}
.box-header { padding: 18px 20px; border-bottom: 1px solid var(--hx-border); }
.box-title { font-size: 16px; font-weight: 600; color: var(--hx-fg); }
.box-body { padding: 20px; }

/* ─── Tabs ─── */
.hx-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--hx-border); margin-bottom: 0; padding: 0 20px; }
.hx-tab {
    padding: 14px 16px; font-size: 14px; font-weight: 500;
    color: var(--hx-fg-muted); cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    background: none; border-top: none; border-left: none; border-right: none;
    transition: color .15s, border-color .15s;
}
.hx-tab:hover { color: var(--hx-fg); }
.hx-tab.active { color: var(--hx-accent); border-bottom-color: var(--hx-accent); font-weight: 600; }

/* ─── Pill / badge ─── */
.hx-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
}
.hx-pill-ok { background: var(--hx-ok-bg); color: var(--hx-ok-fg); }
.hx-pill-muted { background: var(--hx-surface-2); color: var(--hx-fg-muted); }
.hx-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ─── Buttons ─── */
.btn-hx-accent {
    background: var(--hx-accent); color: #fff; border: none; border-radius: 8px;
    padding: 8px 16px; font-size: 14px; font-weight: 500; font-family: var(--hx-font);
    cursor: pointer; transition: opacity 150ms;
}
.btn-hx-accent:hover { opacity: 0.88; color: #fff; }
.btn-hx-ghost {
    background: transparent; color: var(--hx-fg-muted); border: 1px solid var(--hx-border);
    border-radius: 8px; padding: 8px 16px; font-size: 14px; font-weight: 500; font-family: var(--hx-font);
    cursor: pointer; transition: border-color 150ms, color 150ms;
}
.btn-hx-ghost:hover { border-color: var(--hx-accent); color: var(--hx-accent); }

/* ─── Spinner ─── */
.hx-spinner {
    width: 28px; height: 28px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--hx-accent);
    border-radius: 50%;
    animation: hx-spin 0.75s linear infinite;
}
@keyframes hx-spin { to { transform: rotate(360deg); } }

/* ─── Auth (login) page ─── */
.hx-auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--hx-bg); padding: 20px;
}
.hx-auth-card {
    width: 100%; max-width: 380px; background: var(--hx-surface);
    border: 1px solid var(--hx-border); border-radius: var(--hx-radius-card);
    padding: 32px 28px; box-shadow: var(--hx-shadow-hover);
}
.hx-auth-logo { text-align: center; margin-bottom: 22px; }
.hx-auth-logo i { font-size: 30px; color: var(--hx-accent); }
.hx-auth-logo h4 { margin: 8px 0 0; font-weight: 700; color: var(--hx-fg); }
.hx-auth-logo p { margin: 2px 0 0; color: var(--hx-fg-muted); font-size: 13px; }
.hx-auth-card-wide { max-width: 560px; }
.hx-auth-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--hx-fg-muted); }
.hx-auth-link a { color: var(--hx-accent); text-decoration: none; font-weight: 600; }

/* ─── Wizard step indicator ─── */
.hx-wizard-nav { display: flex; align-items: center; justify-content: center; margin-bottom: 26px; }
.hx-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hx-step-circle {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--hx-border); color: var(--hx-fg-muted);
    font-weight: 600; font-size: 13px; background: var(--hx-surface);
}
.hx-step.active .hx-step-circle { border-color: var(--hx-accent); color: var(--hx-accent); }
.hx-step.done .hx-step-circle { border-color: var(--hx-accent); background: var(--hx-accent); color: #fff; }
.hx-step-label { font-size: 12px; color: var(--hx-fg-muted); }
.hx-step.active .hx-step-label { color: var(--hx-fg); font-weight: 600; }
.hx-step-line { width: 60px; height: 2px; background: var(--hx-border); margin: 0 8px 20px; }
.hx-step-line.done { background: var(--hx-accent); }

/* ─── Registration wizard dropzones ─── */
.hx-doc-dropzone {
    border: 2px dashed var(--hx-border); border-radius: 10px;
    min-height: 100px; display: flex; align-items: center; justify-content: center;
    background: var(--hx-surface-2); cursor: pointer; text-align: center;
    color: var(--hx-fg-muted); font-size: 13px; padding: 12px;
}
.hx-doc-dropzone .dz-message { margin: 0; }
.hx-doc-dropzone.dz-drag-hover { border-color: var(--hx-accent); }

/* ─── Toast ─── */
#hx-toast-container { position: fixed; top: 20px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.hx-toast {
    min-width: 260px; padding: 12px 16px; border-radius: 10px;
    background: var(--hx-surface); border: 1px solid var(--hx-border);
    box-shadow: var(--hx-shadow-hover); font-size: 13px;
}
.hx-toast strong { display: block; margin-bottom: 2px; }
.hx-toast.success { border-left: 3px solid var(--hx-ok-fg); }
.hx-toast.error { border-left: 3px solid #c0392b; }
