/* ==========================================================================
   MANGA.ag – Login Page
   Premium redesign aligned with the mobile app aesthetic
   ========================================================================== */

/* ── CSS variables ────────────────────────────────────────────────────────── */
:root {
    --mg-bg:           #050A0F;
    --mg-panel:        rgba(8, 14, 20, 0.78);
    --mg-text:         #F4F7FB;
    --mg-muted:        #A7B4C2;
    --mg-orange:       #FF8A1C;
    --mg-orange-hover: #FF9B3A;
    --mg-orange-glow:  rgba(255, 138, 28, 0.18);
    --mg-border:       rgba(255, 255, 255, 0.08);
    --mg-input-bg:     rgba(255, 255, 255, 0.04);
    --mg-input-border: rgba(255, 255, 255, 0.12);

    /* ── Configurable background image ──────────────────────────────────── */
    --mg-login-bg: url('/images/background-login.png');
}

/* ── Full-screen body ─────────────────────────────────────────────────────── */
.mg-login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--mg-bg);
    background-image:
        linear-gradient(
            180deg,
            rgba(180, 80, 0, 0.18) 0%,
            rgba(0, 0, 0, 0.00) 25%
        ),
        var(--mg-login-bg);
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ── Dark overlay on top of the bg image ─────────────────────────────────── */
.mg-bg-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.32) 0%,
        rgba(0, 0, 0, 0.70) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* ── Centered main area ───────────────────────────────────────────────────── */
.mg-login-main {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 88px 16px 40px;
    min-height: 100vh;
    overflow-y: auto;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.mg-card {
    width: 100%;
    max-width: 480px;
    background: var(--mg-panel);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--mg-border);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.50);
    padding: 40px 40px 36px;
    margin: 0 auto;
}

/* ── Logo block ───────────────────────────────────────────────────────────── */
.mg-logo-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
}

.mg-logo-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.mg-logo-mark img {
    width: auto;
    max-height: 58px;
    height: auto;
    object-fit: contain;
}

.mg-logo-wordmark {
    color: var(--mg-text);
    font-family: 'Germania One', 'Segoe UI', sans-serif;
    font-size: 1.95rem;
    letter-spacing: 0.06em;
    line-height: 1;
}

.mg-logo-name {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.mg-logo-name-main {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Germania One', 'Segoe UI', sans-serif;
    color: var(--mg-text);
    letter-spacing: 0.06em;
    line-height: 1;
    display: block;
    white-space: nowrap;
}

.mg-logo-name-sub {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--mg-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: justify;
    text-align-last: justify;
    margin-top: 3px;
}

/* ── Heading ──────────────────────────────────────────────────────────────── */
.mg-card-title {
    color: var(--mg-text);
    font-size: 1.45rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
}

.mg-card-subtitle {
    color: var(--mg-muted);
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ── Divider ──────────────────────────────────────────────────────────────── */
.mg-logo-divider {
    width: 48px;
    height: 2px;
    background: var(--mg-orange);
    border-radius: 2px;
    margin: 0 auto 28px;
    opacity: 0.55;
}

/* ── Form labels ──────────────────────────────────────────────────────────── */
.mg-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mg-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

/* ── Input group ──────────────────────────────────────────────────────────── */
.mg-input-group {
    position: relative;
    margin-bottom: 16px;
}

.mg-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mg-muted);
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s;
}

.mg-input-group:focus-within .mg-input-icon {
    color: var(--mg-orange);
}

.mg-input {
    width: 100%;
    height: 56px;
    padding: 0 44px 0 44px;
    background: var(--mg-input-bg) !important;
    border: 1px solid var(--mg-input-border) !important;
    border-radius: 14px !important;
    color: var(--mg-text) !important;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-shadow: none !important;
}

.mg-input::placeholder {
    color: rgba(167, 180, 194, 0.55);
}

.mg-input:focus {
    border-color: var(--mg-orange) !important;
    box-shadow: 0 0 0 4px var(--mg-orange-glow) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Autofill override (dark theme) */
.mg-input:-webkit-autofill,
.mg-input:-webkit-autofill:hover,
.mg-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--mg-text) !important;
    box-shadow: 0 0 0 1000px rgba(8, 14, 20, 0.95) inset !important;
    caret-color: var(--mg-text);
    transition: background-color 0s 600000s, color 0s 600000s;
}

/* Show/hide password button */
.mg-pw-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--mg-muted);
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    z-index: 2;
    transition: color 0.2s;
}

.mg-pw-toggle:hover {
    color: var(--mg-text);
}

/* ── Remember / Forgot row ────────────────────────────────────────────────── */
.mg-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.mg-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.mg-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--mg-orange);
    cursor: pointer;
}

.mg-remember span,
.mg-remember label {
    font-size: 0.85rem;
    color: var(--mg-muted);
    cursor: pointer;
}

.mg-terms-link {
    padding: 0;
    color: var(--mg-primary, #2f7650);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.mg-terms-link:hover,
.mg-terms-link:focus-visible {
    color: var(--mg-primary-dark, #235d3e);
}

.mg-terms-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(21, 45, 32, .24);
}

.mg-terms-modal {
    z-index: 1060;
}

.modal-backdrop.show {
    z-index: 1050;
}

.mg-terms-modal .modal-header,
.mg-terms-modal .modal-footer {
    padding: 1.15rem 1.4rem;
    border-color: #e5ece7;
}

.mg-terms-modal .modal-title {
    color: #173d29;
    font-size: 1.3rem;
    font-weight: 750;
}

.mg-terms-meta {
    margin-top: .2rem;
    color: #6c7d72;
    font-size: .78rem;
}

.mg-terms-body {
    padding: 1.35rem 1.5rem;
    color: #33473a;
    line-height: 1.62;
}

.mg-terms-summary {
    padding: .9rem 1rem;
    margin-bottom: 1.25rem;
    color: #24583c;
    background: #eef7f1;
    border-left: 4px solid #3f8b60;
    border-radius: 8px;
}

.mg-terms-section + .mg-terms-section {
    margin-top: 1.3rem;
}

.mg-terms-section h3 {
    margin-bottom: .45rem;
    color: #173d29;
    font-size: 1rem;
    font-weight: 750;
}

.mg-terms-section p,
.mg-terms-section ul {
    margin-bottom: .55rem;
}

.mg-terms-section ul {
    padding-left: 1.25rem;
}

.mg-terms-close {
    width: auto;
    min-width: 120px;
    padding: .65rem 1.25rem;
}

/* ── Login flow feedback modal ───────────────────────────────────────────── */
.mg-feedback-modal {
    z-index: 1070;
}

.mg-feedback-content {
    overflow: hidden;
    color: var(--mg-text);
    background: #10171d;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 20px;
    box-shadow: 0 26px 80px rgba(0, 0, 0, .58);
}

.mg-feedback-header {
    align-items: center;
    padding: 1.25rem 1.25rem .9rem;
    border: 0;
}

.mg-feedback-heading {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.mg-feedback-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    color: #ff8c75;
    font-size: 1.05rem;
    background: rgba(255, 92, 72, .14);
    border: 1px solid rgba(255, 116, 96, .22);
    border-radius: 13px;
}

.mg-feedback-header .modal-title {
    margin: 0;
    color: #f6f8fa;
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.2;
}

.mg-feedback-kicker {
    display: block;
    margin-top: .2rem;
    color: #73828f;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .14em;
}

.mg-feedback-header .btn-close {
    margin: 0;
    opacity: .62;
}

.mg-feedback-header .btn-close:hover,
.mg-feedback-header .btn-close:focus-visible {
    opacity: 1;
}

.mg-feedback-body {
    padding: .45rem 1.3rem 1.25rem;
}

.mg-feedback-body p {
    margin: 0;
    color: #c8d0d7;
    font-size: .94rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.mg-feedback-footer {
    padding: .85rem 1.25rem 1.2rem;
    border-color: rgba(255, 255, 255, .07);
}

.mg-feedback-close {
    min-width: 112px;
    padding: .68rem 1.15rem;
    color: #111820;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--mg-orange);
    border: 0;
    border-radius: 11px;
    box-shadow: 0 8px 22px rgba(255, 138, 28, .18);
    transition: background .2s, transform .15s, box-shadow .2s;
}

.mg-feedback-close:hover,
.mg-feedback-close:focus-visible {
    background: var(--mg-orange-hover);
    box-shadow: 0 10px 26px rgba(255, 138, 28, .26);
    transform: translateY(-1px);
}

.mg-forgot-link {
    font-size: 0.85rem;
    color: var(--mg-orange);
    text-decoration: none;
    transition: color 0.2s;
}

.mg-forgot-link:hover {
    color: var(--mg-orange-hover);
    text-decoration: underline;
}

/* ── Error message ────────────────────────────────────────────────────────── */
.mg-error-message {
    display: block;
    min-height: 20px;
    font-size: 0.82rem;
    color: #ff6b6b;
    margin-bottom: 12px;
    text-align: center;
}

/* ── Primary button (Ingresar) ────────────────────────────────────────────── */
.mg-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 56px;
    background: var(--mg-orange);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 24px rgba(255, 138, 28, 0.30);
}

.mg-btn-primary:hover {
    background: var(--mg-orange-hover);
    box-shadow: 0 6px 32px rgba(255, 138, 28, 0.42);
    color: #fff;
    transform: translateY(-1px);
}

.mg-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(255, 138, 28, 0.25);
}

.mg-login-spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid rgba(255, 255, 255, 0.38);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
}

.mg-btn-primary.is-loading {
    pointer-events: none;
    cursor: wait;
    box-shadow: 0 4px 28px rgba(255, 138, 28, 0.38);
}

.mg-btn-primary.is-loading .mg-login-spinner {
    display: inline-block;
    animation: mg-login-spin .75s linear infinite;
}

.mg-login-progress {
    min-height: 20px;
    margin-top: 10px;
    color: var(--mg-muted);
    font-size: .8rem;
    text-align: center;
    opacity: 0;
    transition: opacity .2s ease;
}

.mg-login-progress.is-visible {
    opacity: 1;
}

@keyframes mg-login-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .mg-btn-primary.is-loading .mg-login-spinner {
        animation-duration: 1.5s;
    }
}

/* ── Separator "o" ────────────────────────────────────────────────────────── */
.mg-separator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    color: rgba(167, 180, 194, 0.4);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

.mg-separator::before,
.mg-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

/* ── Google button ────────────────────────────────────────────────────────── */
.mg-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--mg-text);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--mg-input-border);
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
}

.mg-btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--mg-text);
}

.mg-btn-google svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Register link ────────────────────────────────────────────────────────── */
.mg-register-row {
    text-align: center;
    margin-top: 22px;
    font-size: 0.85rem;
    color: var(--mg-muted);
}

.mg-register-row a {
    color: var(--mg-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.mg-register-row a:hover {
    color: var(--mg-orange-hover);
    text-decoration: underline;
}

.mg-login-alternatives {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.mg-login-alternatives-title {
    margin-bottom: 2px;
    color: var(--mg-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: center;
    text-transform: uppercase;
}

.mg-login-alternative {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 10px 14px;
    color: var(--mg-text);
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--mg-input-border);
    border-radius: 12px;
    font-size: .86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, border-color .2s, transform .2s;
}

.mg-login-alternative:hover,
.mg-login-alternative:focus-visible {
    color: var(--mg-text);
    background: rgba(255, 255, 255, .08);
    border-color: var(--mg-orange);
    transform: translateY(-1px);
}

.mg-login-alternative i {
    width: 18px;
    color: var(--mg-orange);
    text-align: center;
}

.mg-login-alternative-button { width: 100%; text-align: left; }

.mg-registration-code-note {
    margin: 12px 0 0;
    color: var(--mg-muted);
    font-size: .82rem;
    line-height: 1.45;
    text-align: center;
}

/* ── Language selector (floating top-right) ───────────────────────────────── */
.mg-lang-selector {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 100;
}

.mg-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(8, 14, 20, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 30px;
    color: var(--mg-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.mg-lang-btn:hover,
.mg-lang-btn.show {
    background: rgba(8, 14, 20, 0.92);
    color: var(--mg-text);
    border-color: rgba(255, 255, 255, 0.20);
}

.mg-lang-btn::after {
    /* Bootstrap dropdown caret override */
    margin-left: 2px;
    opacity: 0.55;
}

.mg-lang-menu {
    background: rgba(8, 14, 20, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 14px !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    min-width: 140px;
}

.mg-lang-menu .dropdown-item {
    color: var(--mg-muted) !important;
    font-size: 0.85rem;
    padding: 9px 16px;
    transition: background 0.15s, color 0.15s;
}

.mg-lang-menu .dropdown-item:hover,
.mg-lang-menu .dropdown-item.active {
    background: rgba(255, 138, 28, 0.12) !important;
    color: var(--mg-orange) !important;
}

/* ── Grouped inputs (side by side) ──────────────────────────────────────────── */
.mg-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.mg-input-row .mg-input-group {
    margin-bottom: 0;
}

.mg-input-col {
    display: flex;
    flex-direction: column;
}

.mg-input-col .mg-form-label {
    margin-bottom: 6px;
}

/* ── OTP Code inputs (6 digits) ──────────────────────────────────────────────── */
.mg-code-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0 24px;
}

.mg-code-input {
    width: 52px;
    height: 56px;
    padding: 0;
    background: var(--mg-input-bg) !important;
    border: 1px solid var(--mg-input-border) !important;
    border-radius: 12px;
    color: var(--mg-text) !important;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    line-height: 1;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    box-shadow: none !important;
    font-family: 'Courier New', monospace;
    -webkit-text-security: none;
}

.mg-code-input::placeholder {
    color: rgba(167, 180, 194, 0.35);
    -webkit-text-security: none;
}

.mg-code-input:focus {
    border-color: var(--mg-orange) !important;
    box-shadow: 0 0 0 4px var(--mg-orange-glow) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    -webkit-text-security: none;
}

.mg-code-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Autofill override */
.mg-code-input:-webkit-autofill,
.mg-code-input:-webkit-autofill:hover,
.mg-code-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--mg-text) !important;
    box-shadow: 0 0 0 1000px rgba(8, 14, 20, 0.95) inset !important;
    caret-color: var(--mg-text);
    transition: background-color 0s 600000s, color 0s 600000s;
    -webkit-text-security: none;
}

.mg-resend-countdown {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--mg-muted);
}

.mg-btn-primary[disabled],
.mg-btn-primary.is-disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    transform: none;
}

.mg-btn-primary[disabled]:hover,
.mg-btn-primary.is-disabled:hover {
    background: var(--mg-orange);
}

/* ── Destination pill ────────────────────────────────────────────────────────── */
.mg-destination-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 138, 28, 0.10);
    border: 1px solid rgba(255, 138, 28, 0.25);
    border-radius: 12px;
    padding: 10px 16px;
    margin: 12px 0 20px;
    font-size: 0.85rem;
    color: var(--mg-text);
}

.mg-destination-pill i {
    color: var(--mg-orange);
    font-size: 0.95rem;
}

/* ── Code timer / resend section ────────────────────────────────────────────── */
.mg-code-timer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--mg-muted);
    margin: 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mg-code-timer i {
    font-size: 0.9rem;
}

.mg-code-timer-value {
    font-weight: 600;
    color: var(--mg-orange);
    font-family: 'Courier New', monospace;
}

/* ── Resend section ──────────────────────────────────────────────────────────── */
.mg-resend-section {
    text-align: center;
    margin: 20px 0;
    font-size: 0.85rem;
    color: var(--mg-muted);
}

.mg-resend-link {
    color: var(--mg-orange);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.mg-resend-link:hover:not(.disabled) {
    color: var(--mg-orange-hover);
    text-decoration: underline;
}

.mg-resend-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: none;
}

/* ── Change destination link ─────────────────────────────────────────────────── */
.mg-change-destination {
    text-align: center;
    margin-top: 16px;
    font-size: 0.8rem;
}

.mg-change-destination a {
    color: var(--mg-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.mg-change-destination a:hover {
    color: var(--mg-text);
    text-decoration: underline;
}

/* ── Hidden sections ────────────────────────────────────────────────────────── */
.mg-section-hidden {
    display: none !important;
}

/* ── Forgot Password – destination card ─────────────────────────────────────── */
.mg-fp-destination-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--mg-input-bg);
    border: 1px solid var(--mg-input-border);
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--mg-text);
}

.mg-fp-destination-card i {
    color: var(--mg-orange);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.mg-fp-destination-card span {
    flex: 1;
    word-break: break-all;
}

.mg-fp-change-link {
    font-size: 0.82rem;
    color: var(--mg-orange);
    text-decoration: none;
    font-weight: 600;
    flex-shrink: 0;
    transition: color 0.2s;
}

.mg-fp-change-link:hover {
    color: var(--mg-orange-hover);
    text-decoration: underline;
}

/* ── Password hint ───────────────────────────────────────────────────────────── */
.mg-fp-pw-hint {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.78rem;
    color: var(--mg-muted);
    margin: -4px 0 16px;
    line-height: 1.4;
}

.mg-fp-pw-hint i {
    font-size: 0.8rem;
    margin-top: 1px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* ── Success icon ────────────────────────────────────────────────────────────── */
.mg-fp-success-icon {
    font-size: 3.5rem;
    color: var(--mg-green, #30D158);
    line-height: 1;
}


/* ── Responsive ───────────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 640px) {
    .mg-login-main {
        padding: 76px 12px 28px;
    }

    .mg-card {
        max-width: 100%;
        border-radius: 20px;
        padding: 32px 24px 28px;
    }

    .mg-input-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Mobile */
@media (max-width: 440px) {
    .mg-login-main {
        align-items: flex-start;
        padding: 68px 10px 20px;
    }

    .mg-card {
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        padding: 28px 20px 32px;
    }

    .mg-logo-mark img {
        max-height: 52px;
        height: auto;
    }

    .mg-logo-wordmark {
        font-size: 1.6rem;
    }

    .mg-logo-name-main {
        font-size: 2.35rem;
    }

    .mg-card-title {
        font-size: 1.25rem;
    }

    .mg-code-container {
        gap: 6px;
        margin: 24px 0 18px;
    }

    .mg-code-input {
        width: 44px;
        height: 52px;
        font-size: 22px;
    }

    .mg-lang-selector {
        top: 12px;
        right: 14px;
    }
}
