/* ============================================
   KonstruktorBot — Login page
   Product-screenshot background + sign-in surface
   ============================================ */

@font-face{
    font-family:'Gilroy';
    src:url('/a.php?f=font.ttf&v=1777586127') format('truetype'), url('/fonts/font.ttf') format('truetype');
    font-weight:100 900;font-style:normal;font-display:swap;
}

*{margin:0;padding:0;box-sizing:border-box}

/* ---------- Tokens ---------- */
:root{
    --primary:#00b365;--primary-light:#00d27a;--primary-dark:#009654;
    --btn:#00a35c;--btn-hover:#008f50;--btn-active:#007f47;
    --accent:#0095ff;--tg:#0088cc;--tg-light:#229ED9;
    --success:#00a35c;--error:#dc2626;--warning:#d97706;

    --bg:#f4f5f7;
    --surface:#ffffff;
    --surface-2:#f8f9fb;
    --surface-glass:rgba(255,255,255,.86);
    --border:#e4e7ec;
    --border-strong:#d0d5dd;
    --text:#101828;
    --text-muted:#475467;
    --text-dim:#8a94a6;
    --link:#008a4e;
    --input-bg:#ffffff;
    --input-border:#d0d5dd;
    --input-focus:rgba(0,163,92,.20);
    --ring:#00a35c;

    --radius-card:16px;--radius:10px;--radius-sm:10px;--radius-xs:8px;
    --shadow-card:0 1px 2px rgba(16,24,40,.04), 0 8px 24px -8px rgba(16,24,40,.10);
    --shadow-pop:0 12px 32px -8px rgba(16,24,40,.18), 0 2px 6px rgba(16,24,40,.06);

    /* background screenshots */
    --shot-border:rgba(16,24,40,.10);
    --shot-shadow:0 1px 2px rgba(16,24,40,.05), 0 10px 28px -10px rgba(16,24,40,.22);
    --shot-shadow-hover:0 2px 4px rgba(16,24,40,.06), 0 28px 56px -16px rgba(16,24,40,.34);
    --scrim:rgba(244,245,247,.78);
    --sc-dim:rgba(16,24,40,.38);
}
html.dark{
    --bg:#0b0d12;
    --surface:#14171e;
    --surface-2:#191d25;
    --surface-glass:rgba(20,23,30,.84);
    --border:#262b35;
    --border-strong:#353c48;
    --text:#eceef2;
    --text-muted:#a5adbb;
    --text-dim:#737c8c;
    --link:#2fd189;
    --input-bg:#0f1217;
    --input-border:#2e3440;
    --input-focus:rgba(0,200,115,.24);
    --ring:#1fc47e;
    --success:#2fd189;--error:#f87171;
    --shadow-card:0 1px 0 rgba(255,255,255,.03) inset, 0 16px 40px -12px rgba(0,0,0,.6), 0 40px 80px -32px rgba(0,0,0,.6);
    --shadow-pop:0 16px 40px -12px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.4);
    --shot-border:rgba(255,255,255,.09);
    --shot-shadow:0 1px 2px rgba(0,0,0,.4), 0 12px 32px -10px rgba(0,0,0,.7);
    --shot-shadow-hover:0 2px 6px rgba(0,0,0,.5), 0 32px 64px -16px rgba(0,0,0,.85);
    --scrim:rgba(11,13,18,.80);
    --sc-dim:rgba(0,0,0,.58);
}

html,body{height:100%}
body{
    font-family:'Gilroy','Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
    font-size:14px;line-height:1.45;
    color:var(--text);
    background:var(--bg);
    min-height:100vh;min-height:100dvh;
    -webkit-font-smoothing:antialiased;
    -webkit-user-select:none;user-select:none;
    overflow-x:hidden;
    transition:background-color .3s ease;
}
input,textarea{-webkit-user-select:text;user-select:text}
a{color:inherit}
:focus-visible{outline:2px solid var(--ring);outline-offset:2px}

/* ---------- Flags (language menu) ---------- */
.lang-flag{
    display:inline-block;width:18px;height:18px;border-radius:50%;
    object-fit:cover;vertical-align:middle;margin-right:2px;
    box-shadow:0 0 0 1px rgba(0,0,0,.08);background:#fff;
}
.lang-flag-trigger{width:16px;height:16px;margin-right:2px}
.lang-flag-emoji{display:inline-block;margin-right:4px;font-size:1em;vertical-align:middle}

/* ============================================
   Background: product screenshots in two strips
   ============================================ */
.shots{
    --row-h:calc((100vh - 64px - 24px) / 2);
    --row-h:calc((100dvh - 64px - 24px) / 2);
    --row-pad:16px;
    --card-h:calc(var(--row-h) - var(--row-pad) * 2);
    --bar-h:22px;
    --gap:24px;
    position:fixed;inset:0;z-index:0;overflow:hidden;
    display:flex;flex-direction:column;justify-content:center;gap:8px;
    padding-top:64px;
    pointer-events:none;
    opacity:0;animation:shotsIn 1s cubic-bezier(.16,1,.3,1) .05s forwards;
}
@keyframes shotsIn{from{opacity:0}to{opacity:1}}
/* soft scrim behind the sign-in surface; hovered cards rise above it */
.shots::after{
    content:"";position:absolute;inset:0;pointer-events:none;
    background:radial-gradient(ellipse 40% 56% at 50% 50%, var(--scrim) 0%, var(--scrim) 35%, transparent 100%);
    transition:background .3s ease;
}
.shot-row{height:var(--row-h);overflow:hidden;padding:var(--row-pad) 0;flex:none}
.shot-track{
    display:flex;height:100%;width:max-content;
    will-change:transform;
}
.shot-row-top    .shot-track{animation:shotsLeft  160s linear infinite}
.shot-row-bottom .shot-track{animation:shotsRight 150s linear infinite}
@keyframes shotsLeft { from{transform:translate3d(0,0,0)}    to{transform:translate3d(-50%,0,0)} }
@keyframes shotsRight{ from{transform:translate3d(-50%,0,0)} to{transform:translate3d(0,0,0)} }
/* pause a strip while one of its cards is hovered / focused; all strips while a card is open */
.shot-row:hover .shot-track,
.shot-row:focus-within .shot-track,
body.sc-open .shot-track{animation-play-state:paused}

.shot{
    flex:none;position:relative;
    height:var(--card-h);
    width:calc((var(--card-h) - var(--bar-h) - 2px) * 1.6 + 2px);
    margin-right:var(--gap);
    display:flex;flex-direction:column;
    padding:0;font:inherit;color:inherit;text-align:left;
    background:var(--surface);
    border:1px solid var(--shot-border);
    border-radius:12px;overflow:hidden;
    box-shadow:var(--shot-shadow);
    cursor:zoom-in;pointer-events:auto;
    transform:translateZ(0);
    transition:transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
    -webkit-tap-highlight-color:transparent;
}
.shot-bar{
    flex:none;height:var(--bar-h);
    display:flex;align-items:center;gap:5px;padding:0 10px;
    background:var(--surface-2);border-bottom:1px solid var(--shot-border);
}
.shot-bar i,.sc-dots i{width:7px;height:7px;border-radius:50%;background:var(--border-strong);display:block}
.shot img{
    display:block;width:100%;flex:1;min-height:0;
    object-fit:cover;object-position:top center;
    background:var(--surface-2);
    opacity:0;transition:opacity .6s ease;
}
.shot img.is-loaded{opacity:1}
@media (hover:hover){
    .shot:hover{
        z-index:2;
        transform:translateY(-4px) scale(1.04);
        box-shadow:var(--shot-shadow-hover);
    }
}
.shot:focus-visible{z-index:2;outline:2px solid var(--ring);outline-offset:3px;transform:scale(1.02)}
.shot.is-source{opacity:0;transition:none}

/* ---------- Header ---------- */
.login-header{
    position:fixed;top:0;left:0;right:0;z-index:100;
    display:flex;align-items:center;justify-content:space-between;
    padding:0 24px;height:64px;
    background:var(--bg);border-bottom:1px solid var(--border);
    transition:background-color .3s ease, border-color .3s ease;
}
.login-header > *{pointer-events:auto}
.brand{display:inline-flex;align-items:center;gap:10px;color:var(--text)}
.brand-logo{width:36px;height:36px;border-radius:9px;object-fit:cover;background:#fff;flex-shrink:0}
.brand-text{display:flex;flex-direction:column;line-height:1.2}
.brand-title{font-size:15px;font-weight:700;letter-spacing:-.1px;display:flex;align-items:flex-start;gap:2px}
.brand-title .copy{font-size:9px;font-weight:500;color:var(--text-dim);margin-top:1px}
.brand-tagline{font-size:11.5px;color:var(--text-muted);font-weight:500}

.header-actions{display:flex;align-items:center;gap:8px}
.topbar-btn{
    display:inline-flex;align-items:center;justify-content:center;gap:7px;
    height:40px;padding:0 12px;
    border:1px solid var(--border);border-radius:10px;
    background:var(--surface);
    color:var(--text);
    font-family:inherit;font-size:13px;font-weight:600;white-space:nowrap;cursor:pointer;
    box-shadow:0 1px 2px rgba(16,24,40,.05);
    transition:background .2s ease, border-color .2s ease, color .2s ease;
}
.topbar-btn:hover{background:var(--surface);border-color:var(--border-strong)}
.topbar-btn > svg{color:var(--text-muted);flex-shrink:0}
.topbar-btn-text{display:inline-flex;align-items:center;gap:6px}
.theme-toggle{width:40px;padding:0;color:var(--text-muted)}
.theme-toggle:hover{color:var(--text)}
.theme-icon-wrap{position:relative;width:18px;height:18px;display:inline-block}
.theme-icon{position:absolute;inset:0;transition:opacity .3s ease, transform .4s cubic-bezier(.2,.8,.2,1)}
html.light .theme-icon-sun {opacity:1;transform:none}
html.light .theme-icon-moon{opacity:0;transform:rotate(-60deg) scale(.6)}
html.dark  .theme-icon-sun {opacity:0;transform:rotate(60deg) scale(.6)}
html.dark  .theme-icon-moon{opacity:1;transform:none}

.topbar-lang{position:relative}
.lang-dropdown{
    display:none;position:absolute;top:calc(100% + 6px);right:0;z-index:200;
    min-width:168px;padding:4px;
    background:var(--surface);border:1px solid var(--border);border-radius:12px;
    box-shadow:var(--shadow-pop);
}
.lang-dropdown.show{display:block;animation:fadeUp .16s ease}
.lang-item{
    display:flex;align-items:center;gap:8px;
    height:38px;padding:0 10px;border-radius:8px;
    font-size:13.5px;font-weight:500;color:var(--text);text-decoration:none;
    transition:background .12s ease;
}
.lang-item:hover{background:var(--surface-2)}
.lang-item.active{color:var(--link);font-weight:600;background:var(--surface-2)}

/* ============================================
   Sign-in surface
   ============================================ */
.login-main{
    position:relative;z-index:2;
    min-height:100vh;min-height:100dvh;
    display:flex;align-items:center;justify-content:center;
    padding:96px 20px 76px;
    pointer-events:none;           /* empty areas let clicks reach the screenshots */
    overflow-x:clip;               /* the sliding surface must never widen the page */
}
.cards-wrap{
    pointer-events:auto;
    display:grid;grid-template-columns:minmax(0,1fr) 264px;
    width:100%;max-width:768px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-card);
    box-shadow:var(--shadow-card);
    animation:cardUp .55s cubic-bezier(.16,1,.3,1);
    transition:transform .55s cubic-bezier(.22,1,.36,1), opacity .45s ease, background-color .3s ease, border-color .3s ease;
}
.card{min-width:0}
.card-main{padding:36px 40px 32px}
.card-side{
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    padding:32px 28px;text-align:center;
    background:var(--surface-2);
    border-left:1px solid var(--border);
    border-radius:0 var(--radius-card) var(--radius-card) 0;
}

/* ---------- Titles ---------- */
.card-title{
    font-size:24px;line-height:1.25;font-weight:700;letter-spacing:-.3px;
    color:var(--text);margin-bottom:24px;
}
.card-title + .card-subtitle{margin-top:-18px}
.card-subtitle{font-size:14px;color:var(--text-muted);margin-bottom:24px}

/* ---------- Error banner ---------- */
.error-banner{
    display:flex;align-items:flex-start;gap:10px;
    padding:11px 12px;margin-bottom:20px;
    background:rgba(220,38,38,.06);border:1px solid rgba(220,38,38,.22);
    border-radius:var(--radius);
    font-size:13.5px;line-height:1.45;color:var(--error);
    animation:fadeUp .3s ease;
}
html.dark .error-banner{background:rgba(248,113,113,.08);border-color:rgba(248,113,113,.25)}
.error-banner .error-icon{flex-shrink:0;margin-top:1px}

/* ---------- Form ---------- */
.form-group{margin-bottom:16px}
.form-group label{
    display:block;font-size:13px;font-weight:600;
    color:var(--text);margin-bottom:6px;
}
.form-group-pwd{position:relative}
.form-group-pwd .forgot-link{position:absolute;top:0;right:0;line-height:1.45}
.form-group-pwd label{padding-right:45%}
.input{
    width:100%;height:44px;padding:0 14px;
    background:var(--input-bg);
    border:1px solid var(--input-border);
    border-radius:var(--radius);
    color:var(--text);font-family:inherit;font-size:15px;
    outline:none;
    box-shadow:0 1px 2px rgba(16,24,40,.04);
    transition:border-color .15s ease, box-shadow .15s ease, background-color .3s ease;
}
.input:hover:not(:focus){border-color:var(--text-dim)}
.input:focus{border-color:var(--ring);box-shadow:0 0 0 3px var(--input-focus)}
.input::placeholder{color:var(--text-dim)}

.pwd-wrap{position:relative}
.pwd-wrap .pwd-input{padding-right:46px}
.pwd-toggle{
    position:absolute;top:50%;right:4px;transform:translateY(-50%);
    width:36px;height:36px;border:0;background:transparent;padding:0;
    display:inline-flex;align-items:center;justify-content:center;
    color:var(--text-dim);border-radius:8px;cursor:pointer;
    transition:color .15s ease, background .15s ease;
}
.pwd-toggle:hover{color:var(--text);background:var(--surface-2)}
.pwd-toggle:focus-visible{outline-offset:-2px}
.pwd-toggle .pwd-eye{display:block}

/* ---------- Phone input (register) ---------- */
.phone-uni{position:relative;display:flex;align-items:stretch}
.phone-uni-flag{
    position:absolute;left:1px;top:1px;bottom:1px;z-index:2;
    display:flex;align-items:center;gap:6px;
    padding:0 10px 0 13px;
    background:transparent;border:none;cursor:pointer;font-family:inherit;color:var(--text-muted);
    appearance:none;-webkit-appearance:none;
    border-radius:var(--radius) 0 0 var(--radius);
    transition:background .15s ease;
}
.phone-uni-flag:hover{background:var(--surface-2)}
.phone-uni-flag:focus-visible{outline-offset:-2px}
.phone-uni-flag::after{content:'';position:absolute;right:0;top:25%;bottom:25%;width:1px;background:var(--input-border)}
.phone-uni-flag .cp-flag{
    width:22px;height:16px;border-radius:3px;display:inline-block;object-fit:cover;flex-shrink:0;
    box-shadow:0 0 0 1px rgba(0,0,0,.08);background:var(--surface-2);
}
html.dark .phone-uni-flag .cp-flag{box-shadow:0 0 0 1px rgba(255,255,255,.12)}
.phone-uni-flag .cp-flag-text{
    width:22px;height:16px;display:flex;align-items:center;justify-content:center;
    font-size:9px;font-weight:700;letter-spacing:.4px;
    background:var(--border-strong);color:var(--text);border-radius:3px;box-shadow:none;
}
.phone-uni-flag .cp-caret{opacity:.6;transition:transform .2s ease;flex-shrink:0}
.phone-uni-flag[aria-expanded="true"] .cp-caret{transform:rotate(180deg)}
.phone-uni-input{flex:1;padding-left:66px !important;font-variant-numeric:tabular-nums;letter-spacing:.2px}

.phone-hint{
    display:flex;align-items:center;gap:6px;min-height:16px;margin-top:6px;
    font-size:12px;color:var(--text-dim);
}
.phone-hint.ok{color:var(--success)}
.phone-hint.err{color:var(--error)}
.phone-hint .ph-ico{display:inline-flex;line-height:1}
.phone-hint .ph-ico svg{width:13px;height:13px}

.cp-dropdown{
    position:absolute;top:calc(100% + 6px);left:0;z-index:1000;
    width:min(360px,calc(100vw - 32px));max-height:340px;
    background:var(--surface);border:1px solid var(--border);border-radius:12px;
    box-shadow:var(--shadow-pop);
    flex-direction:column;overflow:hidden;
    animation:fadeUp .16s ease;
}
.cp-dropdown:not([hidden]){display:flex}
.cp-dropdown[hidden]{display:none !important}
.cp-search-wrap{
    position:sticky;top:0;display:flex;align-items:center;gap:8px;
    padding:8px 10px;background:inherit;border-bottom:1px solid var(--border);
}
.cp-search-ico{color:var(--text-dim);flex-shrink:0}
.cp-search{
    flex:1;height:34px;padding:0 10px;
    background:var(--surface-2);border:1px solid transparent;border-radius:8px;
    color:var(--text);font-family:inherit;font-size:13.5px;outline:none;
}
.cp-search:focus{border-color:var(--ring);box-shadow:0 0 0 3px var(--input-focus)}
.cp-list{flex:1;overflow-y:auto;padding:4px;scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent}
.cp-item{
    display:flex;align-items:center;gap:12px;width:100%;
    min-height:38px;padding:0 10px;border:none;border-radius:8px;background:none;
    color:var(--text);font-family:inherit;font-size:13.5px;text-align:left;cursor:pointer;
    transition:background .12s ease;
}
.cp-item:hover,.cp-item.cp-active{background:var(--surface-2)}
.cp-item.cp-selected{background:var(--surface-2);color:var(--link);font-weight:600}
.cp-item .cp-i-flag{width:24px;height:18px;border-radius:3px;flex-shrink:0;object-fit:cover;background:var(--surface-2);box-shadow:0 0 0 1px rgba(0,0,0,.08)}
html.dark .cp-item .cp-i-flag{box-shadow:0 0 0 1px rgba(255,255,255,.12)}
.cp-item .cp-i-name{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cp-item .cp-i-dial{color:var(--text-dim);font-weight:600;font-size:13px;flex-shrink:0;font-variant-numeric:tabular-nums}
.cp-item.cp-selected .cp-i-dial{color:var(--link)}
.cp-empty{padding:24px 14px;text-align:center;color:var(--text-dim);font-size:13px}
.cp-section{
    padding:10px 10px 4px;font-size:11px;font-weight:600;color:var(--text-dim);
    text-transform:uppercase;letter-spacing:.06em;pointer-events:none;
}
@media (max-width:480px){ .cp-dropdown{width:calc(100vw - 32px)} }

/* ---------- OTP ---------- */
.otp-container{display:flex;gap:8px;justify-content:center;align-items:center;margin:4px 0 20px}
.otp-separator{width:8px;height:2px;background:var(--border-strong);border-radius:2px;flex-shrink:0}
.otp-digit{
    width:46px;height:52px;
    text-align:center;font-size:22px;font-weight:600;font-variant-numeric:tabular-nums;
    background:var(--input-bg);
    border:1px solid var(--input-border);border-radius:var(--radius);
    color:var(--text);font-family:inherit;outline:none;caret-color:var(--ring);
    box-shadow:0 1px 2px rgba(16,24,40,.04);
    transition:border-color .15s ease, box-shadow .15s ease;
}
.otp-digit:hover:not(:focus){border-color:var(--text-dim)}
.otp-digit:focus{border-color:var(--ring);box-shadow:0 0 0 3px var(--input-focus)}
.otp-digit.filled{border-color:var(--border-strong)}
.otp-digit.error-shake{animation:shakeX .4s ease}

.sent-info{text-align:center;margin-bottom:20px}
.sent-icon{
    width:44px;height:44px;margin:0 auto 14px;border-radius:12px;
    display:flex;align-items:center;justify-content:center;
    color:var(--link);background:var(--surface-2);border:1px solid var(--border);
}
.sent-info .sent-title{font-size:18px;font-weight:700;letter-spacing:-.2px;color:var(--text)}
.sent-info .sent-phone{
    margin-top:6px;font-size:14px;color:var(--text-muted);
    font-variant-numeric:tabular-nums;line-height:1.5;
}
#panelForgot .sent-info .sent-phone{max-width:380px;margin:8px auto 0}
#panelForgot .sent-info .sent-phone b{color:var(--text);font-weight:700}

/* ---------- Buttons ---------- */
.btn{
    position:relative;width:100%;height:44px;padding:0 18px;
    display:flex;align-items:center;justify-content:center;gap:8px;
    border:1px solid transparent;border-radius:var(--radius);
    font-family:inherit;font-size:15px;font-weight:600;letter-spacing:.1px;
    cursor:pointer;
    transition:background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:disabled{opacity:.6;cursor:not-allowed}
.btn-primary{background:var(--btn);color:#fff;box-shadow:0 1px 2px rgba(16,24,40,.08), inset 0 1px 0 rgba(255,255,255,.12)}
.btn-primary:hover:not(:disabled){background:var(--btn-hover)}
.btn-primary:active:not(:disabled){background:var(--btn-active)}
.btn-telegram{background:var(--tg);color:#fff;text-decoration:none}
.btn-telegram svg{width:18px;height:18px;fill:#fff}

.spinner{width:18px;height:18px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:spin .6s linear infinite;display:none}
.btn.loading .spinner{display:block}
.btn.loading .btn-text{opacity:0;position:absolute}

/* secondary buttons (classes kept from the old markup) */
.otp-action-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.btn-3d,.btn-back-3d{
    display:inline-flex;align-items:center;justify-content:center;gap:8px;
    height:44px;padding:0 14px;
    background:var(--surface);color:var(--text);
    border:1px solid var(--border-strong);border-radius:var(--radius);
    font-family:inherit;font-size:14px;font-weight:600;
    box-shadow:0 1px 2px rgba(16,24,40,.04);
    cursor:pointer;-webkit-tap-highlight-color:transparent;
    transition:background-color .15s ease, border-color .15s ease;
}
.btn-3d:hover:not(:disabled),.btn-back-3d:hover:not(:disabled){background:var(--surface-2);border-color:var(--text-dim)}
.btn-3d:disabled{opacity:.6;cursor:not-allowed}
.btn-3d-ico,.btn-back-3d .btn-back-icon{display:inline-flex;width:16px;height:16px;color:var(--text-muted);flex-shrink:0}
.btn-3d-ico svg,.btn-back-3d .btn-back-icon svg{width:16px;height:16px}
.btn-3d-text{white-space:nowrap}
.btn-back-3d{margin-top:10px}
html.dark .btn-3d,html.dark .btn-back-3d{background:transparent}

/* ---------- Messages ---------- */
.msg{
    margin-top:12px;padding:10px 12px;border-radius:var(--radius);
    font-size:13.5px;font-weight:500;line-height:1.45;
    display:none;align-items:center;gap:6px;animation:fadeIn .2s ease;
}
.msg.show{display:flex}
.msg.error{background:rgba(220,38,38,.06);border:1px solid rgba(220,38,38,.22);color:var(--error)}
.msg.success{background:rgba(0,163,92,.07);border:1px solid rgba(0,163,92,.22);color:var(--success)}
.msg.info{background:rgba(0,149,255,.07);border:1px solid rgba(0,149,255,.22);color:var(--accent)}
html.dark .msg.error{background:rgba(248,113,113,.08);border-color:rgba(248,113,113,.25)}

/* ---------- Panels & steps ---------- */
.panel{display:none;animation:fadeUp .28s cubic-bezier(.16,1,.3,1)}
.panel.active{display:block}
.step{display:none;animation:fadeUp .24s cubic-bezier(.16,1,.3,1)}
.step.active{display:block}

/* ---------- Links ---------- */
.helper-row{display:flex;justify-content:space-between;align-items:center;margin-top:12px}
.helper-link{font-size:13px;font-weight:600;color:var(--text-muted);text-decoration:none;border-radius:4px}
.helper-link:hover{color:var(--text);text-decoration:underline;text-underline-offset:3px}
.helper-link.accent{color:var(--link)}
.helper-link.accent:hover{color:var(--link)}

/* ---------- Social ---------- */
.social-divider{
    display:flex;align-items:center;gap:12px;margin:24px 0 16px;
    color:var(--text-dim);font-size:12px;font-weight:500;
    text-transform:uppercase;letter-spacing:.08em;
}
.social-divider::before,.social-divider::after{content:"";flex:1;height:1px;background:var(--border)}
.social-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.social-btn{
    position:relative;
    display:flex;align-items:center;justify-content:center;gap:8px;
    height:44px;padding:0 8px;
    background:var(--surface);color:var(--text);
    border:1px solid var(--border-strong);border-radius:var(--radius);
    font-family:inherit;font-size:14px;font-weight:600;text-decoration:none;
    box-shadow:0 1px 2px rgba(16,24,40,.04);
    cursor:pointer;-webkit-tap-highlight-color:transparent;
    transition:background-color .15s ease, border-color .15s ease;
}
.social-btn:hover{background:var(--surface-2);border-color:var(--text-dim)}
html.dark .social-btn{background:transparent}
html.dark .social-btn:hover{background:var(--surface-2)}
.social-icon{width:18px;height:18px;flex-shrink:0;display:inline-flex}
.social-icon svg{width:100%;height:100%;display:block}
.social-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.social-label{
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
    clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

.switch-row{
    margin-top:24px;padding-top:20px;border-top:1px solid var(--border);
    text-align:center;font-size:14px;color:var(--text-muted);
}
.switch-row a{color:var(--link);font-weight:600;text-decoration:none;margin-left:4px;border-radius:4px;white-space:nowrap}
.switch-row a:hover{text-decoration:underline;text-underline-offset:3px}

/* ---------- Passwordless column ---------- */
.side-title{font-size:16px;font-weight:700;letter-spacing:-.15px;color:var(--text);margin-bottom:6px}
.side-text{font-size:13px;line-height:1.5;color:var(--text-muted);margin-bottom:20px;max-width:220px}
.qr-box{
    position:relative;width:176px;height:176px;margin:0 auto 12px;padding:10px;
    background:#fff;border:1px solid var(--border);border-radius:12px;
    display:flex;align-items:center;justify-content:center;
}
html.dark .qr-box{border-color:#fff}
.qr-box img,.qr-box svg{width:100%;height:100%;display:block;border-radius:4px;transition:filter .25s ease}
.qr-fallback{color:var(--text-dim);font-size:11px;text-align:center;padding:8px}
.qr-box.loading img,.qr-box.loading svg{filter:blur(5px) saturate(.85)}
.qr-overlay{
    position:absolute;inset:0;border-radius:12px;pointer-events:none;
    display:flex;align-items:center;justify-content:center;
    background:transparent;opacity:0;transition:opacity .2s ease;
}
.qr-box.loading .qr-overlay{opacity:1}
.qr-overlay[hidden]{display:none}
.qr-spinner{
    width:36px;height:36px;border-radius:50%;
    border:3px solid rgba(16,24,40,.12);border-top-color:#101828;
    background:rgba(255,255,255,.7);
    animation:spin .9s linear infinite;
}
.qr-meta{
    font-size:12px;line-height:1.45;color:var(--text-muted);
    margin:0 auto 20px;max-width:210px;min-height:17px;
    font-variant-numeric:tabular-nums;
}
.qr-meta b{color:var(--text);font-weight:600}
.bot-link-btn{
    display:inline-flex;align-items:center;justify-content:center;gap:8px;
    width:100%;height:44px;padding:0 14px;
    background:var(--surface);color:var(--text);
    border:1px solid var(--border-strong);border-radius:var(--radius);
    font-size:14px;font-weight:600;text-decoration:none;
    box-shadow:0 1px 2px rgba(16,24,40,.04);
    transition:background-color .15s ease, border-color .15s ease;
}
.bot-link-btn:hover{background:var(--surface-2);border-color:var(--text-dim)}
html.dark .bot-link-btn{background:transparent}
.bot-link-btn svg{width:16px;height:16px;fill:var(--tg-light);flex-shrink:0}

/* ---------- Footer ---------- */
.login-footer{
    position:fixed;left:0;right:0;bottom:16px;z-index:5;
    display:flex;justify-content:center;padding:0 16px;pointer-events:none;
}
.footer-meta{
    pointer-events:auto;
    font-size:12px;font-weight:500;color:var(--text-muted);text-align:center;
    padding:2px 8px;border-radius:6px;
    background:var(--bg);
}
.footer-brand{font-weight:700;color:var(--text);text-decoration:none;margin-left:2px}
.footer-brand:hover{text-decoration:underline;text-underline-offset:3px}

/* ============================================
   Showcase (opened screenshot)
   ============================================ */
.sc{position:fixed;inset:0;z-index:60}
.sc[hidden]{display:none}
.sc-backdrop{
    position:absolute;inset:0;background:var(--sc-dim);
    -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
    opacity:0;transition:opacity .45s ease;cursor:zoom-out;
}
.sc.is-open .sc-backdrop{opacity:1}
.sc-frame:focus{outline:none}
.sc-frame{
    position:fixed;left:0;top:0;
    display:flex;flex-direction:column;
    background:var(--surface);
    border:1px solid var(--shot-border);
    border-radius:14px;
    box-shadow:0 2px 6px rgba(0,0,0,.08), 0 40px 100px -20px rgba(0,0,0,.45);
    transform-origin:0 0;will-change:transform;
}
.sc-bar{
    flex:none;height:40px;position:relative;
    display:flex;align-items:center;gap:8px;padding:0 6px 0 14px;
    background:var(--surface-2);border-bottom:1px solid var(--shot-border);
    border-radius:13px 13px 0 0;
}
.sc-dots{display:flex;gap:6px}
.sc-count{
    position:absolute;left:50%;transform:translateX(-50%);
    font-size:12.5px;font-weight:600;color:var(--text-muted);font-variant-numeric:tabular-nums;
}
.sc-media{flex:1;min-height:0;overflow:hidden;border-radius:0 0 13px 13px;background:var(--surface-2)}
.sc-media img{
    display:block;width:100%;height:100%;object-fit:cover;object-position:top center;
    transition:opacity .2s ease, transform .28s cubic-bezier(.2,.8,.2,1);
}
.sc-media img.is-out-l{opacity:0;transform:translateX(-18px)}
.sc-media img.is-out-r{opacity:0;transform:translateX(18px)}
.sc-btn{
    display:inline-flex;align-items:center;justify-content:center;
    border:1px solid transparent;background:transparent;color:var(--text-muted);
    font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;
    transition:background-color .15s ease, color .15s ease, border-color .15s ease, opacity .25s ease;
}
.sc-close{margin-left:auto;width:32px;height:32px;border-radius:8px}
.sc-close:hover{background:var(--border);color:var(--text)}
.sc-nav{
    position:absolute;top:calc(50% + 20px);transform:translateY(-50%);
    width:44px;height:44px;border-radius:50%;
    background:var(--surface);border-color:var(--border);color:var(--text);
    box-shadow:var(--shadow-pop);
}
.sc-nav:hover{background:var(--surface-2);border-color:var(--border-strong)}
.sc-prev{left:-64px}
.sc-next{right:-64px}
/* controls appear once the frame has settled */
.sc-frame .sc-bar > *,.sc-frame .sc-nav{opacity:0}
.sc-frame.is-settled .sc-bar > *,.sc-frame.is-settled .sc-nav{opacity:1}

/* login surface slides aside while a screenshot is open */
body.sc-open{overflow:hidden}
body.sc-open .cards-wrap{
    transform:translateX(var(--auth-shift,70vw)) scale(.97);
    opacity:.5;pointer-events:none;
}
body.sc-open .login-footer{opacity:0;transition:opacity .3s ease}

/* ---------- Animations ---------- */
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes fadeUp{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes cardUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes shakeX{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-4px)}40%,80%{transform:translateX(4px)}}
@keyframes spin{to{transform:rotate(360deg)}}

/* ============================================
   Responsive
   ============================================ */
@media (max-width:1100px){
    .shots{--gap:20px}
}

/* tablet: one column, passwordless block under the form */
@media (max-width:900px){
    .cards-wrap{grid-template-columns:1fr;max-width:460px}
    .card-side{
        border-left:0;border-top:1px solid var(--border);
        border-radius:0 0 var(--radius-card) var(--radius-card);
        padding:24px 32px 28px;
    }
    .side-text{max-width:340px}
    .qr-box{width:152px;height:152px}
    .login-main{padding:88px 20px 80px}
    .sc-prev{left:-56px}.sc-next{right:-56px}
}

/* phones */
@media (max-width:640px){
    .shots{
        --row-h:212px;--row-pad:14px;--bar-h:16px;--gap:14px;
        justify-content:flex-end;padding:0 0 34px;
    }
    .shots::after{background:linear-gradient(180deg, transparent 0%, var(--scrim) 28%, var(--scrim) 72%, transparent 100%)}
    .shot{border-radius:10px}
    .shot-bar{gap:4px;padding:0 8px}
    .shot-bar i{width:5px;height:5px}
    .shot-row-top{display:none}          /* hidden behind the form on phones */
    .shot-row-bottom .shot-track{animation-duration:110s}

    .login-header{padding:0 16px;height:60px}
    .brand{gap:8px}
    .brand-logo{width:32px;height:32px;border-radius:8px}
    .brand-title{font-size:14.5px}
    .brand-tagline{display:none}
    .header-actions{gap:6px}
    #langToggle{width:40px;padding:0}
    #langToggle > svg{display:none}
    #langToggle .topbar-btn-text{font-size:0;gap:0}
    #langToggle .topbar-btn-text .lang-flag,
    #langToggle .topbar-btn-text .lang-flag-trigger{margin:0;width:18px;height:18px}

    .login-main{padding:76px 16px 64px;align-items:flex-start}
    .cards-wrap{max-width:440px;margin:0 auto}
    .card-main{padding:28px 20px 24px}
    .card-side{padding:20px 20px 24px}
    .card-title{font-size:21px;margin-bottom:20px}
    .card-title + .card-subtitle{margin-top:-14px}
    .card-subtitle{margin-bottom:20px}
    .side-text{margin-bottom:16px}
    /* scanning a QR with the same phone is not possible: keep the bot button only */
    .qr-box,.qr-meta{display:none}

    .otp-container{gap:6px}
    .otp-digit{width:42px;height:50px;font-size:20px}

    .login-footer{position:static;padding:0 16px 20px;margin-top:-40px}
    .footer-meta{background:transparent;border:0;-webkit-backdrop-filter:none;backdrop-filter:none;padding:0}

    .sc-frame{border-radius:12px}
    .sc-nav{top:auto;bottom:-60px;transform:none}
    .sc-prev{left:calc(50% - 52px)}
    .sc-next{right:calc(50% - 52px)}
    .sc-close{width:40px;height:40px}
}
@media (max-width:400px){
    .social-name{display:none}
    .social-icon{width:20px;height:20px}
    .otp-container{gap:5px}
    .otp-digit{width:38px;height:48px;font-size:19px}
    .otp-separator{width:6px}
    .btn-3d,.btn-back-3d{font-size:13.5px;padding:0 10px}
}
@media (max-width:360px){
    .shots{display:none}
    .brand-title .copy{display:none}
    .card-main{padding:24px 16px 20px}
    .otp-digit{width:34px;height:44px;font-size:17px}
    .otp-container{gap:4px}
}
/* landscape phones / very short windows: no background strips */
@media (max-height:560px){
    .shots{display:none}
    .login-main{padding:76px 16px 40px;align-items:flex-start}
    .login-footer{position:static;padding:0 16px 16px}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
    .shots{animation:none;opacity:1}
    .shot-row-top .shot-track{animation:none;transform:translate3d(-8%,0,0)}
    .shot-row-bottom .shot-track{animation:none;transform:translate3d(-30%,0,0)}
    .shot,.shot img{transition:opacity .2s ease}
    .shot:hover{transform:none}
    .cards-wrap,.panel,.step,.error-banner,.msg,.otp-digit,.lang-dropdown.show,.cp-dropdown{animation:none!important}
    .cards-wrap{transition:opacity .2s ease}
    body.sc-open .cards-wrap{transform:none;opacity:0}
    .sc-media img{transition:opacity .15s ease}
    .sc-media img.is-out-l,.sc-media img.is-out-r{transform:none}
}

/* ============================================
   Calmer background (owner, 2026-11-01): day mode was too bright and the strips moved too fast.
   Slower strips, a softer page tone, dimmed screenshots that brighten only on hover.
   ============================================ */
.shot-row-top    .shot-track{animation-duration:360s}
.shot-row-bottom .shot-track{animation-duration:340s}
@media (max-width:640px){ .shot-row-bottom .shot-track{animation-duration:260s} }
html.light{--bg:#e8ebe9;--surface-2:#f1f3f2;--scrim:rgba(232,235,233,.82)}
html.light .shot{opacity:.62;box-shadow:0 8px 24px -12px rgba(16,24,40,.18)}
html.light .shot img{filter:saturate(.8) brightness(.94) contrast(.94)}
html.dark .shot{opacity:.7}
html.dark .shot img{filter:saturate(.85) brightness(.88)}
.shot img{transition:opacity .6s ease, filter .45s ease}
@media (hover:hover){
    html.light .shot:hover,html.dark .shot:hover{opacity:1}
    .shot:hover img{filter:none}
}
.shot:focus-visible{opacity:1}
.shot:focus-visible img{filter:none}
html.light .card-main{box-shadow:0 1px 2px rgba(16,24,40,.06),0 24px 48px -16px rgba(16,24,40,.22)}

/* Phone (owner, 2026-11-01): a half-visible strip peeking under the card looked broken — on phones the page is just the
   sign-in card on a calm background; the full email/phone hint fits; quiet one-line footer. */
@media (max-width:640px){
    .shots{display:none!important}
    .login-main{padding-top:76px!important;padding-bottom:16px!important;align-items:flex-start!important}
    .card-main{box-shadow:0 1px 2px rgba(16,24,40,.05),0 12px 32px -18px rgba(16,24,40,.25)!important}
    .card-main input.input,.card-main .input,.card-main input[type=text],.card-main input[type=email],.card-main input[type=password],.card-main input[type=tel]{font-size:14px;padding-left:12px;padding-right:12px}
    .card-main input::placeholder{font-size:13.5px;letter-spacing:-.01em}
    .login-footer,footer{font-weight:400!important;font-size:11.5px!important;line-height:1.5!important;background:none!important;border:0!important;box-shadow:none!important;position:static!important;transform:none!important;margin:8px auto 16px!important;text-align:center;padding:0 16px!important}
}

/* Phone compact (owner, 2026-11-01: "kichikroq qil") — portal phone rule: 14px text, 12-12.5px meta, 40px controls */
@media (max-width:640px){
    .login-header{height:52px!important;padding:0 12px!important}
    .login-header .brand-logo{width:28px!important;height:28px!important}
    .login-header .brand-title{font-size:14.5px!important}
    .login-header .brand-tagline{display:none!important}
    .login-header .icon-btn,.login-header .theme-toggle,.login-header .lang-btn{width:36px!important;height:36px!important}
    .login-main{padding-top:64px!important;padding-left:12px!important;padding-right:12px!important}
    .cards-wrap{border-radius:14px!important}
    .card-main{padding:20px 16px 16px!important}
    .card-title{font-size:19px!important;margin-bottom:16px!important;letter-spacing:-.2px!important}
    .card-title + .card-subtitle{margin-top:-12px!important}
    .card-subtitle{font-size:12.5px!important;margin-bottom:14px!important}
    .form-group{margin-bottom:12px!important}
    .form-group label{font-size:12.5px!important;margin-bottom:5px!important}
    .form-group-pwd .forgot-link{font-size:12.5px!important}
    .input{height:40px!important;border-radius:9px!important}
    .btn{height:40px!important;font-size:14px!important;border-radius:9px!important}
    .social-divider{margin:14px 0 12px!important;font-size:11px!important}
    .social-row{gap:6px!important}
    .social-btn{height:40px!important;border-radius:9px!important}
    .switch-row{font-size:12.5px!important;margin-top:14px!important;padding-top:12px!important}
    .card-side{padding:14px 16px 16px!important}
    .side-title{font-size:14px!important;margin-bottom:4px!important}
    .side-desc,.card-side p{font-size:12px!important;line-height:1.45!important;margin-bottom:10px!important}
    .card-side .btn,.card-side a.btn{height:38px!important;font-size:13.5px!important}
    .error-banner{font-size:12.5px!important;padding:9px 10px!important;margin-bottom:12px!important}
    .otp-digit{height:44px!important;font-size:18px!important}
}

/* Phone (owner, 2026-11-01): no QR block on a phone (you can't scan your own screen; Telegram login is in the social row);
   the card sits centred in the screen with the footer at the bottom — no grey void under it; smaller fields */
@media (max-width:640px){
    .card-side{display:none!important}
    .cards-wrap{grid-template-columns:minmax(0,1fr)!important}
    body{min-height:100vh;min-height:100dvh}
    .login-main{min-height:100vh!important;min-height:100dvh!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:stretch!important;padding-top:60px!important;padding-bottom:40px!important;box-sizing:border-box}
    .login-footer,footer{position:fixed!important;left:0;right:0;bottom:0;margin:0!important;padding:0 16px calc(10px + env(safe-area-inset-bottom))!important}
    .input{height:38px!important;font-size:14px!important}
    .btn,.social-btn{height:38px!important}
    .card-title{font-size:18px!important;margin-bottom:14px!important}
}
@media (max-width:640px){.login-footer,.login-footer *{font-weight:400!important;font-size:11px!important;color:var(--text-dim)!important}.login-footer a{color:var(--text-muted)!important}}
.side-scan{margin:12px 0 0;font-size:13px;line-height:1.45;color:var(--text-muted);text-align:center;max-width:220px}
.side-scan .qr-sec{color:var(--text-dim);font-variant-numeric:tabular-nums;white-space:nowrap}

/* Users said the moving background made them dizzy (2026-11-01): the screenshot wall is now STILL.
   Nothing slides; hover still lifts a card and a click still opens the large view. */
/* owner (later the same day): keep it moving, but very slowly — one loop ≈ 10 minutes, barely noticeable */
.shot-row-top .shot-track{animation:shotsLeft 600s linear infinite!important}
.shot-row-bottom .shot-track{animation:shotsRight 640s linear infinite!important}
@media (prefers-reduced-motion:reduce){.shot-row-top .shot-track,.shot-row-bottom .shot-track{animation:none!important}}
