/* ============================================================
   MV-AUTH — Dark Trading Platform Theme
   Matches the BK-style design from screenshots
   ============================================================ */

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

:root {
    --bg:          #000000;
    --card-bg:     #0d0d0d;
    --card-border: #1e1e1e;
    --input-bg:    #111111;
    --input-border:#222222;
    --input-focus: #2563eb;
    --text-primary:#ffffff;
    --text-muted:  #6b7280;
    --text-label:  #d1d5db;
    --accent:      #2563eb;
    --accent-hover:#1d4ed8;
    --link:        #3b82f6;
    --link-hover:  #60a5fa;
    --radius-card: 12px;
    --radius-input:6px;
    --radius-btn:  6px;
    --font:        'Inter', system-ui, sans-serif;
    --success-bg:  #052e16;
    --success-border: #166534;
    --error-bg:    #1c0505;
    --error-border:#7f1d1d;
}

html, body {
    min-height: 100vh;
    background: var(--bg);
    font-family: var(--font);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ── Top Navigation Bar ── */
.mv-auth-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 60px;
    background: transparent;
}

.mv-topbar-left {
    display: flex;
    align-items: center;
}

.mv-topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mv-theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.mv-theme-toggle:hover { color: var(--text-primary); }
.mv-theme-toggle svg { width: 18px; height: 18px; }

.mv-topbar-link {
    color: var(--link);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.mv-topbar-link:hover { color: var(--link-hover); }

.mv-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    padding: 4px 0;
}
.mv-lang-btn img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }

/* ── Logo Badge ── */
.mv-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.mv-logo-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--card-border);
    overflow: hidden;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mv-logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ── Page Layout ── */
.mv-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
}

/* ── Card Container ── */
.mv-auth-container {
    width: 100%;
    max-width: 360px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 32px 28px;
    margin: 0 auto;
}

/* Register has wider card */
.mv-auth-container--wide {
    max-width: 375px;
}

/* ── Banner image inside card ── */
.mv-card-banner {
    width: calc(100% + 56px);
    margin: -32px -28px 24px;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    overflow: hidden;
    height: 175px;
}
.mv-card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Centered icon (for password reset) ── */
.mv-icon-center {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.mv-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #1a2a4a;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mv-icon-circle svg {
    width: 24px;
    height: 24px;
    color: var(--link);
}

/* ── Headings ── */
.mv-auth-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.mv-auth-heading--center {
    text-align: center;
}

.mv-auth-subheading {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}
.mv-auth-subheading--center {
    text-align: center;
}
.mv-auth-subheading a,
.mv-auth-subheading--center a {
    color: var(--link);
    text-decoration: none;
}

/* ── Form ── */
.mv-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mv-field-label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-label);
    margin-bottom: 6px;
}

.mv-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-input);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 13.5px;
    padding: 10px 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}
.mv-input::placeholder { color: #4b5563; }
.mv-input:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.18);
}

/* Select */
.mv-select-wrap {
    position: relative;
}
.mv-select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-input);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 13.5px;
    padding: 10px 36px 10px 13px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.mv-select:focus { border-color: var(--input-focus); }
.mv-select option { background: #111111; color: var(--text-primary); }

.mv-select-wrap::after {
    content: '';
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-muted);
    pointer-events: none;
    margin-top: 3px;
}

/* Phone row */
.mv-phone-row {
    display: flex;
    gap: 8px;
}
.mv-phone-code {
    width: 62px;
    flex-shrink: 0;
    text-align: center;
    padding: 10px 8px;
}
.mv-phone-row .mv-input:last-child {
    flex: 1;
}

/* Password with toggle */
.mv-pw-wrap {
    position: relative;
}
.mv-pw-wrap .mv-input {
    padding-right: 40px;
}
.mv-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 2px;
    transition: color 0.2s;
}
.mv-pw-toggle:hover { color: var(--text-primary); }
.mv-pw-toggle svg { width: 17px; height: 17px; }

/* Password strength */
.mv-pw-strength {
    display: flex;
    gap: 5px;
    margin-top: 6px;
}
.mv-pw-strength-bar {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: var(--input-border);
    transition: background 0.3s;
}
.mv-pw-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Remember / Forgot row */
.mv-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -2px;
}

/* Checkbox */
.mv-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}
.mv-checkbox-wrap input[type="checkbox"] {
    margin-top: 2px;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    accent-color: var(--accent);
    cursor: pointer;
}
.mv-checkbox-label {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.4;
    cursor: pointer;
}
.mv-checkbox-label a {
    color: var(--link);
    text-decoration: none;
}
.mv-checkbox-label a:hover { color: var(--link-hover); }

/* Forgot link */
.mv-forgot-link {
    text-align: right;
    margin-top: -4px;
}
.mv-forgot-link a {
    font-size: 12.5px;
    color: var(--link);
    text-decoration: none;
}
.mv-forgot-link a:hover { color: var(--link-hover); }

/* Submit button */
.mv-btn-submit {
    width: 100%;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-btn);
    color: #ffffff;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    padding: 11px 20px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 2px;
}
.mv-btn-submit:hover { background: var(--accent-hover); }
.mv-btn-submit:active { transform: scale(0.98); }

/* Footer row below form */
.mv-auth-footer-link {
    text-align: center;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 16px;
}
.mv-auth-footer-link a {
    color: var(--link);
    text-decoration: none;
    font-weight: 500;
}
.mv-auth-footer-link a:hover { color: var(--link-hover); }

/* Footer row inline (for register) */
.mv-footer-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.mv-footer-inline span {
    font-size: 12.5px;
    color: var(--text-muted);
}
.mv-footer-inline a {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
}
.mv-footer-inline a:hover { color: var(--text-primary); }

/* ── Alerts ── */
.mv-alert {
    border-radius: 6px;
    padding: 10px 13px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 4px;
}
.mv-alert ul { padding-left: 16px; }
.mv-alert li { margin-bottom: 2px; }

.mv-alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: #4ade80;
}
.mv-alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: #f87171;
}

/* ── Info box ── */
.mv-info-box {
    background: #0c1a2e;
    border: 1px solid #1e3a5f;
    border-radius: 6px;
    padding: 10px 13px;
    font-size: 13px;
    color: #93c5fd;
    line-height: 1.5;
    margin-bottom: 4px;
}

/* ── Field row (two columns) ── */
.mv-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Register heading section ── */
.mv-register-header {
    margin-bottom: 20px;
}
.mv-register-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}
.mv-register-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Scrollable register card ── */
.mv-auth-container--scroll {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #1e1e1e #0d0d0d;
}
.mv-auth-container--scroll::-webkit-scrollbar { width: 4px; }
.mv-auth-container--scroll::-webkit-scrollbar-track { background: #0d0d0d; }
.mv-auth-container--scroll::-webkit-scrollbar-thumb { background: #1e1e1e; border-radius: 4px; }

/* ── OTP input ── */
.mv-otp-input {
    letter-spacing: 8px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .mv-auth-page { padding: 72px 12px 24px; }
    .mv-auth-container { padding: 24px 18px; }
    .mv-field-row { grid-template-columns: 1fr; }
    .mv-auth-topbar { padding: 0 16px; }
    .mv-footer-inline { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ── PIN Pad ── */
.mv-pin-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 24px 0;
}

.mv-pin-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1e1e1e;
    transition: background 0.2s, transform 0.2s;
}

.mv-pin-dot.active {
    background: var(--accent);
    transform: scale(1.1);
}

.mv-pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.mv-pin-btn {
    aspect-ratio: 1/1;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    outline: none;
}

.mv-pin-btn:hover {
    background: #1a1a1a;
    border-color: #333;
}

.mv-pin-btn:active {
    background: #222;
    transform: scale(0.95);
}

.mv-pin-btn.backspace svg {
    width: 24px;
    height: 24px;
}

.mv-pin-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.mv-pin-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #1a2a4a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 12px;
    border: 2px solid var(--card-border);
}

.mv-pin-username {
    font-size: 14px;
    color: var(--text-muted);
}
