/* ===================================================================
   Blubime — Minimal Blue Design System
   Refined, calm, trustworthy. RTL-first. Vazirmatn typography.
   Author: redesign — front-facing only
   =================================================================== */

@font-face {
    font-family: 'Vazirmatn';
    src: url('../image-generator/vazirmatn.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Blue scale */
    --blu-950: #07142e;
    --blu-900: #0b1f44;
    --blu-800: #112a5c;
    --blu-700: #173a7a;
    --blu-600: #1e4fb0;
    --blu-500: #2563eb;
    --blu-400: #3b82f6;
    --blu-300: #93c5fd;
    --blu-200: #bfdbfe;
    --blu-100: #dbeafe;
    --blu-50:  #eff6ff;
    --sky:     #38bdf8;

    /* Neutrals */
    --ink:     #0f1c34;
    --body:    #475569;
    --muted:   #94a3b8;
    --line:    #e6ecf5;
    --line-2:  #eef2f9;
    --surface: #ffffff;
    --bg:      #f3f7ff;

    /* Feedback */
    --ok:      #0f9d6b;
    --ok-bg:   #e7f8f1;
    --err:     #dc2b4b;
    --err-bg:  #fdeef0;
    --warn:    #b7791f;
    --warn-bg: #fdf6e7;

    /* System */
    --radius:   14px;
    --radius-sm: 10px;
    --radius-lg: 22px;
    --ring: 0 0 0 4px rgba(37, 99, 235, .14);
    --shadow-sm: 0 1px 2px rgba(15, 28, 52, .05), 0 2px 6px rgba(15, 28, 52, .04);
    --shadow-md: 0 8px 28px rgba(17, 42, 92, .10);
    --shadow-lg: 0 24px 60px rgba(11, 31, 68, .18);
    --ease: cubic-bezier(.4, 0, .2, 1);
    --font: 'Vazirmatn', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 800; line-height: 1.35; margin: 0 0 .5em; letter-spacing: -.01em; }
p { color: var(--body); margin: 0 0 1em; }
a { color: var(--blu-600); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--blu-500); }
::selection { background: var(--blu-200); color: var(--blu-900); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--blu-200); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--blu-300); }

/* ===== Layout helpers ===== */
.blu-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.blu-muted { color: var(--muted); }
.blu-center { text-align: center; }

/* ===================================================================
   AUTH — split screen
   =================================================================== */
.auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: var(--bg);
}

/* Brand / aurora panel */
.auth__aside {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(120% 120% at 80% 0%, var(--blu-700) 0%, var(--blu-900) 45%, var(--blu-950) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 56px 48px;
}
.auth__aside::before {
    /* aurora glow */
    content: '';
    position: absolute;
    inset: -30% -10% auto -20%;
    height: 80%;
    background:
        radial-gradient(closest-side, rgba(56, 189, 248, .45), transparent 70%),
        radial-gradient(closest-side, rgba(59, 130, 246, .40), transparent 70%);
    background-position: 20% 10%, 75% 30%;
    background-size: 60% 60%, 55% 55%;
    background-repeat: no-repeat;
    filter: blur(10px);
    opacity: .9;
    animation: auroraFloat 14s var(--ease) infinite alternate;
}
.auth__aside::after {
    /* fine grid texture */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(120% 90% at 70% 20%, #000 30%, transparent 80%);
    pointer-events: none;
}
@keyframes auroraFloat {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(4%, 6%, 0) scale(1.12); }
}

.auth__brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.auth__brand img { height: 42px; width: auto; }
.auth__brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }

.auth__hero { position: relative; z-index: 2; max-width: 30ch; }
.auth__hero h1 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.3; margin-bottom: .5em; }
.auth__hero p { color: rgba(226, 240, 255, .78); font-size: 1.02rem; margin: 0; }

.auth__points { position: relative; z-index: 2; list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.auth__points li { display: flex; align-items: center; gap: 12px; color: rgba(231, 242, 255, .9); font-size: .95rem; }
.auth__points .dot {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    color: var(--blu-200);
    backdrop-filter: blur(6px);
}
.auth__points svg { width: 17px; height: 17px; }

/* Form side */
.auth__main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    overflow-y: auto;
}
.auth__card {
    width: 100%;
    max-width: 440px;
    animation: rise .6s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.auth__head { margin-bottom: 28px; }
.auth__eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: .76rem; font-weight: 700; color: var(--blu-600);
    background: var(--blu-50); border: 1px solid var(--blu-100);
    padding: 5px 12px; border-radius: 99px; margin-bottom: 16px;
}
.auth__head h2 { font-size: 1.6rem; margin: 0 0 6px; }
.auth__head p { margin: 0; color: var(--muted); font-size: .95rem; }

.auth__mobile-brand { display: none; }

.auth__foot { margin-top: 26px; text-align: center; color: var(--muted); font-size: .9rem; }
.auth__foot a { font-weight: 700; }

/* ===================================================================
   FORM ELEMENTS
   =================================================================== */
.field { margin-bottom: 16px; }
.field > label,
.form-group > label,
.col-form-label,
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; }

.input,
.form-control {
    width: 100%;
    font-family: var(--font);
    font-size: .95rem;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
    outline: none;
}
.input::placeholder,
.form-control::placeholder { color: #b6c2d6; }
.input:hover,
.form-control:hover { border-color: var(--blu-200); }
.input:focus,
.form-control:focus { border-color: var(--blu-400); box-shadow: var(--ring); background: #fff; }
.form-control[readonly], .form-control:disabled { background: var(--bg); color: var(--muted); }

textarea.form-control { min-height: 120px; resize: vertical; line-height: 1.8; }

select.form-control,
.form-select {
    width: 100%; font-family: var(--font); font-size: .95rem; color: var(--ink);
    background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    padding: 12px 14px; outline: none; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-select:focus { border-color: var(--blu-400); box-shadow: var(--ring); }

/* password show/hide (daypanel markup compatibility) */
.form-input { position: relative; }
.form-input .show-hide {
    position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: var(--muted); font-size: .78rem; font-weight: 700; user-select: none;
}
.form-input .show-hide .show::before { content: 'نمایش'; }
.form-input .show-hide .show.active::before,
.form-input .show-hide .hide::before { content: 'پنهان'; }

/* Checkbox */
.form-check { display: flex; align-items: flex-start; gap: 9px; margin: 6px 0 4px; }
.form-check-input {
    appearance: none; -webkit-appearance: none;
    flex: 0 0 auto; width: 19px; height: 19px; margin: 3px 0 0;
    border: 1.5px solid var(--line); border-radius: 6px; background: #fff;
    cursor: pointer; transition: all .18s var(--ease); position: relative;
}
.form-check-input:checked { background: var(--blu-500); border-color: var(--blu-500); }
.form-check-input:checked::after {
    content: ''; position: absolute; inset: 0; margin: auto;
    width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}
.form-check-input:focus-visible { box-shadow: var(--ring); }
.form-check-label { font-size: .88rem; color: var(--body); line-height: 1.6; cursor: pointer; }

/* ===================================================================
   BUTTONS
   =================================================================== */
.btn,
button[type="submit"].btn,
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    font-family: var(--font); font-size: .98rem; font-weight: 700;
    border: none; border-radius: var(--radius-sm); cursor: pointer;
    padding: 13px 22px; transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
    text-decoration: none; line-height: 1;
}
.btn-primary,
.btn.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--blu-500), var(--blu-600));
    box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 99, 235, .36); }
.btn-primary:active { transform: translateY(0); }
.btn-block, .w-100 { width: 100%; }

.btn-ghost,
.btn-outline-secondary {
    background: #fff; color: var(--blu-700); border: 1.5px solid var(--line);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font); font-weight: 700; border-radius: var(--radius-sm);
    padding: 11px 16px; cursor: pointer; transition: all .2s var(--ease);
}
.btn-ghost:hover,
.btn-outline-secondary:hover { border-color: var(--blu-300); background: var(--blu-50); color: var(--blu-700); }
.btn-sm { padding: 8px 12px; font-size: .85rem; }

/* ===================================================================
   ALERTS
   =================================================================== */
.alert {
    border-radius: var(--radius-sm); padding: 12px 15px; margin-bottom: 16px;
    font-size: .88rem; border: 1px solid transparent; line-height: 1.7;
}
.alert ul { margin: 0; padding-inline-start: 18px; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: rgba(15, 157, 107, .2); }
.alert-danger { background: var(--err-bg); color: var(--err); border-color: rgba(220, 43, 75, .18); }
.alert-info { background: var(--blu-50); color: var(--blu-700); border-color: var(--blu-100); }
.alert-warning { background: var(--warn-bg); color: var(--warn); border-color: rgba(183, 121, 31, .2); }

/* ===================================================================
   CAPTCHA row
   =================================================================== */
.captcha-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.captcha-row img { height: 46px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; }
.captcha-refresh {
    flex: 0 0 auto; width: 42px; height: 46px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--line); background: #fff; color: var(--blu-600);
    cursor: pointer; display: grid; place-items: center; transition: all .2s var(--ease);
}
.captcha-refresh:hover { background: var(--blu-50); border-color: var(--blu-300); }
.captcha-refresh svg { width: 18px; height: 18px; }
.captcha-refresh.spin svg { animation: spin .6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* OTP / code field */
.code-input { text-align: center; letter-spacing: .6em; font-size: 1.4rem; font-weight: 700; padding-inline: 8px; }

.text-primary { color: var(--blu-600) !important; }
.text-center { text-align: center; }
.text-small { font-size: .88rem; }
.mt-2 { margin-top: .5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: 1.5rem; }
hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }

/* ===================================================================
   PUBLIC layout (header / footer / hero / content)
   =================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.site-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); }
.site-logo img { height: 70px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--body); font-weight: 600; font-size: .94rem; }
.site-nav a:hover { color: var(--blu-600); }

.site-footer { background: var(--blu-950); color: rgba(226, 240, 255, .7); margin-top: 80px; }
.site-footer__top { padding: 56px 0 36px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.site-footer a { color: rgba(226, 240, 255, .72); font-size: .92rem; display: block; padding: 5px 0; }
.site-footer a:hover { color: var(--sky); }
.site-footer__about { max-width: 38ch; line-height: 2; font-size: .92rem; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 20px 0; text-align: center; font-size: .85rem; }

.btn-on-dark {
    color: var(--blu-900); background: #fff; padding: 11px 22px; border-radius: var(--radius-sm);
    font-weight: 700; display: inline-flex; align-items: center; gap: 8px; transition: all .2s var(--ease);
}
.btn-on-dark:hover { color: var(--blu-900); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }

/* Card + content surfaces */
.card-surface {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 28px;
}
.page-hero {
    background: radial-gradient(120% 120% at 85% 0%, var(--blu-700), var(--blu-900) 60%, var(--blu-950));
    color: #fff; padding: 60px 0; position: relative; overflow: hidden;
}
.page-hero::after {
    content: ''; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 40px 40px; mask-image: radial-gradient(100% 100% at 80% 0, #000, transparent 75%);
}
.page-hero h1 { color: #fff; position: relative; z-index: 1; font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.page-hero p { color: rgba(226, 240, 255, .8); position: relative; z-index: 1; margin: 0; }

/* Long-form legal/contract content */
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: clamp(24px, 4vw, 52px); }
.prose h1, .prose h2 { font-size: 1.35rem; margin-top: 1.6em; padding-bottom: .4em; border-bottom: 2px solid var(--blu-100); }
.prose h3 { font-size: 1.08rem; color: var(--blu-700); margin-top: 1.4em; }
.prose p, .prose li { color: var(--body); line-height: 2.1; font-size: .98rem; }
.prose ul, .prose ol { padding-inline-start: 22px; }
.prose li { margin-bottom: .5em; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .92rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: start; }
.prose thead th { background: var(--blu-50); color: var(--blu-700); }

/* Scroll-to-top */
.scroll-top {
    position: fixed; inset-block-end: 26px; inset-inline-end: 26px; z-index: 60;
    width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--blu-500), var(--blu-700)); color: #fff;
    box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all .3s var(--ease); border: none; cursor: pointer;
}
.scroll-top.on { opacity: 1; visibility: visible; transform: none; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 980px) {
    .auth { grid-template-columns: 1fr; }
    .auth__aside { display: none; }
    .auth__mobile-brand {
        display: none; align-items: center; justify-content: center; gap: 10px;
        margin-bottom: 26px; font-weight: 800; color: var(--blu-800);
    }
    .auth__mobile-brand img { height: 50vw; }
    .site-footer__top { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
    .site-nav { display: none; }
    .auth__main { padding: 28px 18px; }
}
