/* =========================================================
   Xentix — design tokens (light, premium, colorful)
   Brand colours sampled from the XentixBD logo.
   ========================================================= */
:root {
    --bg: #f4f7fc;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-solid: #ffffff;
    --border: rgba(148, 163, 196, 0.28);
    --border-strong: #d7deeb;
    --text: #0f1b3d;
    --text-soft: #56627e;
    --text-mute: #8a94ab;

    --blue: #1f5bff;
    --blue-deep: #0b3fd6;
    --cyan: #18c3ff;
    --orange: #ff8a00;
    --red: #ff3b3b;
    --violet: #8b5cf6;
    --green: #12b886;

    --grad-brand: linear-gradient(120deg, #18c3ff 0%, #1f5bff 45%, #8b5cf6 75%, #ff3b3b 100%);
    --grad-blue: linear-gradient(135deg, #18c3ff 0%, #1f5bff 100%);
    --grad-fire: linear-gradient(135deg, #ffb200 0%, #ff8a00 40%, #ff3b3b 100%);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 26px;
    --shadow-sm: 0 2px 8px rgba(15, 27, 61, 0.06);
    --shadow: 0 18px 50px -18px rgba(31, 91, 255, 0.28), 0 4px 14px rgba(15, 27, 61, 0.06);
    --shadow-glow: 0 10px 30px -8px rgba(31, 91, 255, 0.55);

    --font: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; font-weight: 600; }
a:hover { color: var(--blue-deep); }

/* ---------- Animated aurora background ---------- */
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: .55;
    animation: drift 22s ease-in-out infinite alternate;
}
.b1 { width: 520px; height: 520px; background: #8fdcff; top: -160px; left: -120px; }
.b2 { width: 480px; height: 480px; background: #a9b9ff; bottom: -180px; right: -100px; animation-delay: -6s; }
.b3 { width: 360px; height: 360px; background: #ffc89a; top: 40%; right: 18%; animation-delay: -12s; opacity: .45; }
.b4 { width: 300px; height: 300px; background: #d8c4ff; bottom: 8%; left: 14%; animation-delay: -3s; opacity: .45; }
.grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(31, 91, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 91, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
@keyframes drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(60px, 40px) scale(1.12); }
    100% { transform: translate(-40px, 70px) scale(.95); }
}

/* ---------- Auth / installer shell ---------- */
.auth-wrap {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 16px;
}
.auth-card {
    width: 100%; max-width: 460px;
    background: var(--surface);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 34px 34px 30px;
    position: relative;
    animation: rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
.auth-card.wide { max-width: 620px; }
.auth-card::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
    background: var(--grad-brand); opacity: .35;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    pointer-events: none;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

.auth-brand { text-align: center; margin-bottom: 22px; }
.brand-logo { display: block; height: 92px; width: auto; max-width: 100%; margin: 0 auto; }
.brand-tag {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 10px; padding: 5px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 600; letter-spacing: .3px; color: var(--text-soft);
    background: rgba(255, 255, 255, .7); border: 1px solid var(--border);
}
.orb-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--grad-brand);
    box-shadow: 0 0 0 3px rgba(31, 91, 255, .12);
    animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(31, 91, 255, 0); transform: scale(1.15); } }

.auth-title { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.auth-sub { margin: 0 0 22px; color: var(--text-soft); font-size: 14.5px; }
.gradient-text {
    background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-foot { margin-top: 22px; font-size: 12.5px; color: var(--text-mute); text-align: center; }

/* ---------- Installer steps ---------- */
.steps { display: flex; align-items: flex-start; justify-content: space-between; margin: 4px 0 26px; position: relative; }
.steps::before {
    content: ""; position: absolute; top: 17px; left: 10%; right: 10%; height: 3px;
    background: #e5eaf4; border-radius: 3px;
}
.steps .progress-line {
    position: absolute; top: 17px; left: 10%; height: 3px; border-radius: 3px;
    background: var(--grad-brand); transition: width .6s ease;
}
.step { position: relative; z-index: 1; flex: 1; text-align: center; }
.step-dot {
    width: 36px; height: 36px; margin: 0 auto 6px; border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 700; font-size: 14px;
    background: #fff; border: 2px solid #e1e7f2; color: var(--text-mute);
    transition: all .3s;
}
.step-name { font-size: 12px; font-weight: 600; color: var(--text-mute); }
.step.active .step-dot { border-color: transparent; background: var(--grad-blue); color: #fff; box-shadow: var(--shadow-glow); }
.step.active .step-name { color: var(--blue); }
.step.done .step-dot { border-color: transparent; background: var(--green); color: #fff; }
.step.done .step-name { color: var(--green); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.input-wrap input, .input-wrap select { min-width: 0; }
.form-grid .span-2 { grid-column: span 2; }
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.field-hint { display: block; font-size: 12px; color: var(--text-mute); margin-top: 5px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 14px; color: var(--text-mute); display: flex; pointer-events: none; transition: color .2s; }
.input-wrap input, .input-wrap select {
    width: 100%; height: 48px;
    padding: 0 44px 0 42px;
    font: inherit; font-size: 15px; color: var(--text);
    background: rgba(255, 255, 255, .92);
    border: 1.5px solid var(--border-strong); border-radius: 12px;
    outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none; appearance: none;
}
.input-wrap select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2356627e' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.input-wrap input:focus, .input-wrap select:focus {
    border-color: var(--blue); background: #fff;
    box-shadow: 0 0 0 4px rgba(31, 91, 255, .12);
}
.input-wrap:focus-within .input-icon { color: var(--blue); }
.pw-toggle {
    position: absolute; right: 8px; width: 34px; height: 34px;
    border: 0; background: transparent; border-radius: 8px;
    color: var(--text-mute); cursor: pointer; display: grid; place-items: center;
}
.pw-toggle:hover { background: #eef2fb; color: var(--blue); }
.pw-toggle.on { color: var(--blue); }

.strength { display: block; height: 5px; border-radius: 5px; background: #e8edf6; margin-top: 8px; overflow: hidden; }
.strength-bar { display: block; height: 100%; width: 0; border-radius: 5px; transition: width .3s, background .3s; }
.strength-text { display: block; font-size: 12px; margin-top: 4px; color: var(--text-mute); min-height: 18px; }

/* ---------- Buttons ---------- */
.btn {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 22px;
    font: inherit; font-size: 15px; font-weight: 700;
    border: 0; border-radius: 12px; cursor: pointer;
    transition: transform .15s, box-shadow .25s, background .25s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { color: #fff; background: var(--grad-blue); box-shadow: var(--shadow-glow); }
.btn-primary:hover { color: #fff; box-shadow: 0 14px 34px -8px rgba(31, 91, 255, .7); }
.btn-primary::after {
    content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg); transition: left .7s;
}
.btn-primary:hover::after { left: 140%; }
.btn-fire { color: #fff; background: var(--grad-fire); box-shadow: 0 10px 28px -8px rgba(255, 98, 0, .55); }
.btn-ghost { color: var(--text-soft); background: rgba(255, 255, 255, .8); border: 1.5px solid var(--border-strong); }
.btn-ghost:hover { color: var(--blue); border-color: var(--blue); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn.loading { pointer-events: none; }
.btn.loading .btn-label { opacity: 0; }
.btn.loading::before {
    content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff;
    animation: spin .7s linear infinite;
}
.btn-ghost.loading::before { border-color: rgba(31, 91, 255, .25); border-top-color: var(--blue); }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 12px; margin-top: 6px; }
.btn-row .btn-primary, .btn-row .btn-fire { flex: 1; }

/* ---------- Alerts ---------- */
.alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px; margin-bottom: 18px;
    border-radius: 12px; font-size: 14px; font-weight: 500;
    border: 1px solid transparent;
    animation: rise .35s ease both;
}
.alert-error   { background: #fff1f1; color: #b4232a; border-color: #ffd4d4; }
.alert-success { background: #ecfbf4; color: #0b7a55; border-color: #c4f0dc; }
.alert-info    { background: #eef4ff; color: #1d47b8; border-color: #d4e1ff; }
.alert-warning { background: #fff7e8; color: #9a5b00; border-color: #ffe3ad; }

/* ---------- Requirement checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checklist li {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 500; padding: 8px 10px; border-radius: 10px;
    background: rgba(255, 255, 255, .7); border: 1px solid var(--border);
}
.checklist .ok   { color: var(--green); }
.checklist .fail { color: var(--red); }
.checklist .fail-row { background: #fff4f4; border-color: #ffd6d6; }

.section-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    color: var(--text-mute); margin: 4px 0 12px;
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.question-box {
    display: flex; gap: 12px; align-items: center;
    padding: 14px 16px; margin-bottom: 18px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(24, 195, 255, .1), rgba(139, 92, 246, .1));
    border: 1px solid rgba(31, 91, 255, .18);
    font-weight: 600;
}
.question-box .q-icon {
    flex: none; width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center; color: #fff; background: var(--grad-blue);
}

.link-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 18px; font-size: 13.5px; }
.center { text-align: center; }
.muted { color: var(--text-mute); }

/* ---------- Success screen ---------- */
.success-orb {
    width: 92px; height: 92px; margin: 6px auto 18px; border-radius: 50%;
    display: grid; place-items: center; color: #fff;
    background: radial-gradient(circle at 30% 30%, #6fe0ff, #1f5bff 55%, #8b5cf6);
    box-shadow: 0 0 0 10px rgba(31, 91, 255, .08), 0 20px 50px -10px rgba(31, 91, 255, .6);
    animation: orbIn .8s cubic-bezier(.2, 1.4, .3, 1) both, float 4s ease-in-out .8s infinite;
}
.success-orb svg { width: 42px; height: 42px; stroke-width: 2.6; }
@keyframes orbIn { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes float { 50% { transform: translateY(-8px); } }

.info-list { list-style: none; padding: 0; margin: 0 0 22px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.info-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; font-size: 14px; background: rgba(255, 255, 255, .6); }
.info-list li + li { border-top: 1px solid var(--border); }
.info-list span:first-child { color: var(--text-soft); }
.info-list code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--blue-deep); word-break: break-all; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
    .auth-card { padding: 26px 20px 22px; border-radius: 22px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: auto; }
    .checklist { grid-template-columns: 1fr; }
    .step-name { font-size: 11px; }
    .btn-row { flex-direction: column-reverse; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
