/* ==========================================================================
   ورودچی — Auth UI design system (page / modal / inline partial)
   Prefix: vc-   |  RTL-first  |  Theming via CSS custom properties
   ========================================================================== */

@font-face { font-family: "Yekan Bakh FaNum"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/yekanbakh/YekanBakhFaNum-Light.woff2") format("woff2"); }
@font-face { font-family: "Yekan Bakh FaNum"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/yekanbakh/YekanBakhFaNum-Regular.woff2") format("woff2"); }
@font-face { font-family: "Yekan Bakh FaNum"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/yekanbakh/YekanBakhFaNum-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Yekan Bakh FaNum"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/yekanbakh/YekanBakhFaNum-Bold.woff2") format("woff2"); }
@font-face { font-family: "Yekan Bakh FaNum"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/yekanbakh/YekanBakhFaNum-ExtraBold.woff2") format("woff2"); }

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
.vc {
    --vc-primary: #6C5CE7;
    --vc-primary-rgb: 108, 92, 231;
    --vc-primary-2: color-mix(in srgb, var(--vc-primary) 70%, #00CEC9);
    --vc-primary-soft: color-mix(in srgb, var(--vc-primary) 12%, white);
    --vc-accent: #00CEC9;
    --vc-pink: #FD79A8;
    --vc-amber: #FDCB6E;

    --vc-bg: #ffffff;
    --vc-bg-muted: #F6F7FB;
    --vc-surface: rgba(255, 255, 255, 0.86);
    --vc-border: #E6E8F0;
    --vc-border-strong: #CBD0E0;
    --vc-text: #1B1D2A;
    --vc-text-2: #5B6079;
    --vc-text-3: #8B90A8;
    --vc-danger: #E5484D;
    --vc-danger-soft: #FFEDEE;
    --vc-success: #22A06B;
    --vc-success-soft: #E6F7EF;
    --vc-warning: #D98A00;

    --vc-radius-lg: 24px;
    --vc-radius: 14px;
    --vc-radius-sm: 10px;
    --vc-shadow: 0 24px 60px -20px rgba(27, 29, 42, 0.28), 0 4px 14px -6px rgba(27, 29, 42, 0.10);
    --vc-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --vc-ring: 0 0 0 4px rgba(var(--vc-primary-rgb), 0.16);

    --vc-font: "Yekan Bakh FaNum", "Vazirmatn", Tahoma, system-ui, sans-serif;
    --vc-ease: cubic-bezier(.2, .8, .2, 1);

    font-family: var(--vc-font);
    font-size: 14px;
    line-height: 1.7;
    color: var(--vc-text);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}
.vc *, .vc *::before, .vc *::after { box-sizing: inherit; font-family: inherit; }
.vc img { max-width: 100%; height: auto; display: inline-block; }
.vc button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
.vc a { color: var(--vc-primary); text-decoration: none; }
.vc a:hover { color: var(--vc-primary-2); }
.vc [vc-cloak], .vc [voroodchi-cloak] { display: none !important; }

/* --------------------------------------------------------------------------
   Full page
   -------------------------------------------------------------------------- */
.vc-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--vc-bg-muted);
    position: relative;
    overflow-x: hidden;
}
.vc-page__bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    background:
        radial-gradient(60% 50% at 85% 10%, rgba(var(--vc-primary-rgb), .28), transparent 65%),
        radial-gradient(50% 45% at 10% 90%, rgba(0, 206, 201, .26), transparent 65%),
        radial-gradient(40% 40% at 20% 15%, rgba(253, 121, 168, .18), transparent 60%),
        linear-gradient(160deg, #F8F7FF 0%, #F1F6FB 55%, #FFF7F2 100%);
}
.vc-page__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    will-change: transform;
    animation: vc-float 18s var(--vc-ease) infinite alternate;
}
.vc-page__blob--1 { width: 46vw; height: 46vw; right: -12vw; top: -14vw; background: var(--vc-primary); }
.vc-page__blob--2 { width: 38vw; height: 38vw; left: -10vw; bottom: -12vw; background: var(--vc-accent); animation-delay: -6s; }
.vc-page__blob--3 { width: 22vw; height: 22vw; left: 20vw; top: 10vh; background: var(--vc-pink); animation-delay: -12s; opacity: .35; }
@keyframes vc-float {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-4vw, 4vh, 0) scale(1.12); }
}
.vc-page__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(27, 29, 42, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(27, 29, 42, .04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(70% 60% at 50% 40%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 30%, transparent 100%);
}
.vc-page__center {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.vc-page__footer {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--vc-text-3);
    font-size: 12px;
    padding: 0 16px 20px;
    margin-top: -8px;
}
.vc-page__footer a { color: var(--vc-text-2); font-weight: 600; }

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.vc-card {
    position: relative;
    width: 420px;
    max-width: 100%;
    background: var(--vc-surface);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: var(--vc-radius-lg);
    box-shadow: var(--vc-shadow);
    padding: 32px 28px 28px;
    overflow: hidden;
    animation: vc-rise .5s var(--vc-ease) both;
}
.vc-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--vc-primary), var(--vc-accent), var(--vc-pink));
    opacity: .9;
}
@keyframes vc-rise {
    from { opacity: 0; transform: translateY(16px) scale(.985); }
    to   { opacity: 1; transform: none; }
}
.vc-card--flat {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    box-shadow: none;
    padding: 8px 0 0;
    animation: none;
}
.vc-card--flat::before { display: none; }

@media (max-width: 480px) {
    .vc-card { padding: 26px 20px 22px; border-radius: 20px; }
}

/* Header */
.vc-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-bottom: 22px;
}
.vc-head__nav {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--vc-text-2);
    transition: background .2s, color .2s, transform .2s;
}
.vc-head__nav:hover { background: var(--vc-primary-soft); color: var(--vc-primary); }
.vc-head__nav:active { transform: translateY(-50%) scale(.94); }
.vc-head__close { right: auto; left: 0; }
.vc-head__nav svg { width: 22px; height: 22px; }
.vc-logo { display: block; max-height: 56px; width: auto; }
.vc-brand {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -.01em;
    background: linear-gradient(90deg, var(--vc-primary), var(--vc-primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Steps */
.vc-step { animation: vc-step-in .35s var(--vc-ease) both; }
@keyframes vc-step-in {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: none; }
}
.vc-title { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: var(--vc-text); }
.vc-subtitle { color: var(--vc-text-2); margin: 0 0 20px; font-size: 13.5px; }
.vc-subtitle b, .vc-subtitle strong { color: var(--vc-text); font-weight: 700; }
.vc-subtitle img { vertical-align: middle; }
.vc-subtitle [dir="ltr"] { font-weight: 700; color: var(--vc-text); unicode-bidi: isolate; }

/* Fields */
.vc-field { margin-bottom: 16px; }
.vc-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 8px; color: var(--vc-text-2); }
.vc-control { position: relative; }
.vc-input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1.5px solid var(--vc-border);
    border-radius: var(--vc-radius);
    background: #fff;
    color: var(--vc-text);
    font-size: 15px;
    box-shadow: var(--vc-shadow-sm);
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
.vc-input::placeholder { color: var(--vc-text-3); font-size: 13.5px; }
.vc-input:hover { border-color: var(--vc-border-strong); }
.vc-input:focus { border-color: var(--vc-primary); box-shadow: var(--vc-ring); }
.vc-input--error, .vc-input.vc-input--error:focus { border-color: var(--vc-danger); box-shadow: 0 0 0 4px rgba(229, 72, 77, .12); }
.vc-input--ltr { direction: ltr; text-align: left; }
.vc-input--pad-end { padding-left: 48px; }
.vc-input--otp {
    direction: ltr;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: .55em;
    text-indent: .55em;
    height: 60px;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #fff, #FBFBFE);
}
.vc-input--otp::placeholder { letter-spacing: .55em; font-size: 22px; font-weight: 400; }
.vc-eye {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--vc-text-3);
    transition: background .2s, color .2s;
}
.vc-eye:hover { background: var(--vc-bg-muted); color: var(--vc-text-2); }
.vc-eye svg { width: 20px; height: 20px; }
.vc-error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--vc-danger);
    font-size: 12.5px;
    margin-top: 8px;
    animation: vc-step-in .25s var(--vc-ease) both;
}
.vc-error::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}
.vc-hint { color: var(--vc-text-3); font-size: 12.5px; margin-top: 8px; }

/* Buttons */
.vc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    padding: 0 18px;
    border-radius: var(--vc-radius);
    font-weight: 700;
    font-size: 15px;
    transition: transform .15s var(--vc-ease), box-shadow .2s, background .2s, color .2s, opacity .2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.vc-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.vc-btn svg { width: 20px; height: 20px; flex: none; }
.vc-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--vc-primary) 0%, var(--vc-primary-2) 100%);
    box-shadow: 0 10px 24px -10px rgba(var(--vc-primary-rgb), .75);
}
.vc-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(var(--vc-primary-rgb), .85); }
.vc-btn--primary:active { transform: translateY(0) scale(.99); }
.vc-btn--ghost {
    color: var(--vc-text-2);
    background: #fff;
    border: 1.5px solid var(--vc-border);
}
.vc-btn--ghost:hover:not(:disabled) { border-color: var(--vc-primary); color: var(--vc-primary); background: var(--vc-primary-soft); }
.vc-btn--ghost:disabled { background: var(--vc-bg-muted); }
.vc-btn--soft {
    color: var(--vc-primary);
    background: var(--vc-primary-soft);
}
.vc-btn--soft:hover { background: color-mix(in srgb, var(--vc-primary) 18%, white); }
.vc-btn + .vc-btn { margin-top: 10px; }

/* Text links / actions */
.vc-actions { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 18px; }
.vc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--vc-primary);
    font-weight: 700;
    font-size: 13.5px;
    padding: 6px 0;
    width: max-content;
    transition: gap .2s, color .2s;
}
.vc-link:hover { gap: 10px; color: var(--vc-primary-2); }
.vc-link svg { width: 18px; height: 18px; }

/* Timer */
.vc-timer {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    direction: ltr;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--vc-text);
    background: var(--vc-bg-muted);
    padding: 2px 10px;
    border-radius: 999px;
    margin-inline-end: 6px;
}
.vc-timer span { display: inline-block; width: 10px; text-align: center; }

/* Terms */
.vc-terms { margin-top: 16px; font-size: 12.5px; color: var(--vc-text-3); text-align: center; }
.vc-terms a { font-weight: 700; }

/* Divider */
.vc-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--vc-text-3);
    font-size: 12px;
    margin: 18px 0;
}
.vc-divider::before, .vc-divider::after { content: ""; flex: 1; height: 1px; background: var(--vc-border); }

/* Password strength */
.vc-strength { margin: -6px 0 16px; }
.vc-strength__bar { display: flex; gap: 6px; margin-bottom: 8px; }
.vc-strength__seg { flex: 1; height: 5px; border-radius: 999px; background: var(--vc-border); transition: background .3s; }
.vc-strength--weak .vc-strength__seg:nth-child(1) { background: var(--vc-danger); }
.vc-strength--fair .vc-strength__seg:nth-child(-n+2) { background: var(--vc-warning); }
.vc-strength--strong .vc-strength__seg { background: var(--vc-success); }
.vc-strength__label { font-size: 12px; font-weight: 700; }
.vc-strength--weak .vc-strength__label { color: var(--vc-danger); }
.vc-strength--fair .vc-strength__label { color: var(--vc-warning); }
.vc-strength--strong .vc-strength__label { color: var(--vc-success); }
.vc-rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.vc-rules li {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--vc-text-3);
    transition: color .2s;
}
.vc-rules li::before {
    content: "";
    width: 16px; height: 16px; flex: none;
    border-radius: 50%;
    border: 1.5px solid var(--vc-border-strong);
    background: #fff;
    transition: all .2s;
}
.vc-rules li.is-ok { color: var(--vc-success); }
.vc-rules li.is-ok::before {
    border-color: var(--vc-success);
    background: var(--vc-success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat;
}

/* Loader overlay */
.vc-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: inherit;
}
.vc-spinner {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(var(--vc-primary-rgb), .18);
    border-top-color: var(--vc-primary);
    animation: vc-spin .8s linear infinite;
}
@keyframes vc-spin { to { transform: rotate(360deg); } }

/* Channel badge in messages */
.vc-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 1px 8px; border-radius: 999px;
    background: var(--vc-primary-soft); color: var(--vc-primary);
    font-weight: 700; font-size: 12px;
    vertical-align: middle;
}
.vc-badge img { height: 14px !important; width: auto; display: inline-block !important; }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.vc-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: auto;
}
.vc-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 18, 30, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: vc-fade .25s ease both;
}
@keyframes vc-fade { from { opacity: 0; } to { opacity: 1; } }
.vc-modal .vc-card { margin: auto; z-index: 1; }

/* --------------------------------------------------------------------------
   Dark mode (full page only)
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    .vc-page {
        --vc-bg: #0F1118;
        --vc-bg-muted: #171A24;
        --vc-surface: rgba(24, 26, 38, .82);
        --vc-border: #2A2E40;
        --vc-border-strong: #3A3F55;
        --vc-text: #F2F3F8;
        --vc-text-2: #B7BBD0;
        --vc-text-3: #7E8399;
        --vc-danger-soft: rgba(229, 72, 77, .15);
        --vc-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
        background: var(--vc-bg);
    }
    .vc-page .vc-page__bg {
        background:
            radial-gradient(60% 50% at 85% 10%, rgba(var(--vc-primary-rgb), .30), transparent 65%),
            radial-gradient(50% 45% at 10% 90%, rgba(0, 206, 201, .18), transparent 65%),
            linear-gradient(160deg, #0F1118 0%, #12141F 60%, #171321 100%);
    }
    .vc-page .vc-page__grid { background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); }
    .vc-page .vc-card { border-color: rgba(255, 255, 255, .08); }
    .vc-page .vc-input, .vc-page .vc-btn--ghost { background: #1E2130; color: var(--vc-text); }
    .vc-page .vc-input--otp { background: #1E2130; }
    .vc-page .vc-timer { background: #232738; }
    .vc-page .vc-loading { background: rgba(15, 17, 24, .6); }
    .vc-page .vc-rules li::before { background: #1E2130; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .vc *, .vc *::before, .vc *::after { animation: none !important; transition: none !important; }
}

/* Notyf tweaks */
.notyf { z-index: 9999999 !important; font-family: var(--vc-font, inherit); }
.notyf__toast { border-radius: 14px !important; }
.notyf__message { font-size: 14px !important; font-weight: 600 !important; }
