.mg-pwreset-page {
    position: relative;
    min-height: clamp(520px, calc(100vh - 180px), 920px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 14px 52px;
    overflow: hidden;
}

.mg-pwreset-container {
    position: relative;
    z-index: 2;
    width: min(100%, 560px);
}

.mg-pwreset-card {
    background: linear-gradient(145deg, rgba(0, 23, 31, 0.82), rgba(0, 52, 89, 0.58));
    border: 1px solid rgba(0, 168, 232, 0.24);
    border-radius: 20px;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 168, 232, 0.08) inset;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 34px 32px;
    animation: mgResetCardIn 320ms ease-out;
}

@keyframes mgResetCardIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mg-pwreset-header {
    text-align: center;
    margin-bottom: 18px;
}

.mg-pwreset-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    display: block;
    margin: 0 auto 12px;
    filter: drop-shadow(0 0 10px rgba(0, 168, 232, 0.25));
}

.mg-pwreset-title {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.18rem, 2.8vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.gradient-text {
    background: linear-gradient(95deg, #7de3ff, #00a8e8 45%, #56c5ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mg-pwreset-subtitle {
    margin: 9px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
    line-height: 1.45;
}

.mg-pwreset-page .form-group {
    margin-bottom: 16px;
}

.mg-pwreset-page label {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mg-pwreset-page .input-group {
    position: relative;
}

.mg-pwreset-page .input-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: rgba(0, 168, 232, 0.8);
    font-size: 0.95rem;
    z-index: 2;
    pointer-events: none;
}

.mg-pwreset-page .form-control {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(0, 168, 232, 0.24);
    background: rgba(0, 52, 89, 0.36);
    color: #eaf9ff;
    padding: 11px 12px 11px 40px;
    box-shadow: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.mg-pwreset-page .form-control::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.mg-pwreset-page .form-control:focus {
    border-color: rgba(0, 168, 232, 0.56);
    background: rgba(0, 52, 89, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.14);
}

.mg-reset-captcha {
    margin: 8px 0 16px;
}

.mg-btn-reactive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    padding: 0 16px;
    background: linear-gradient(135deg, #007ea7, #00a8e8);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.94rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: transform 170ms ease, box-shadow 170ms ease, filter 170ms ease;
    box-shadow: 0 8px 22px rgba(0, 168, 232, 0.24);
}

.mg-btn-reactive:hover,
.mg-btn-reactive:focus {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 12px 26px rgba(0, 168, 232, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.mg-pwreset-secondary-link {
    margin-top: 14px;
    text-align: center;
}

.mg-pwreset-secondary-link a {
    color: rgba(154, 233, 255, 0.95);
    font-weight: 600;
    text-decoration: none;
}

.mg-pwreset-secondary-link a:hover,
.mg-pwreset-secondary-link a:focus {
    color: #b6eeff;
    text-decoration: underline;
}

.mg-reset-info {
    margin: 12px 0 18px;
}

.mg-info-message {
    margin: 0;
    padding: 10px 12px;
    border-radius: 11px;
    border: 1px solid rgba(0, 168, 232, 0.2);
    background: rgba(0, 168, 232, 0.08);
    color: rgba(231, 249, 255, 0.9);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mg-info-message i {
    color: #56d2ff;
}

.mg-strength-container {
    border-radius: 12px;
    border: 1px solid rgba(0, 168, 232, 0.16);
    background: rgba(0, 52, 89, 0.24);
    padding: 12px;
}

.mg-form-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mg-form-actions .btn {
    flex: 1 1 180px;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.mg-btn-submit.btn {
    border: 0;
    background: linear-gradient(135deg, #007ea7, #00a8e8) !important;
    color: #fff !important;
}

.mg-btn-cancel.btn {
    border: 1px solid rgba(0, 168, 232, 0.25) !important;
    background: rgba(0, 52, 89, 0.34) !important;
    color: rgba(224, 246, 255, 0.95) !important;
}

.mg-pwreset-success-copy {
    margin: 14px 0 0;
    color: rgba(236, 249, 255, 0.88);
    text-align: center;
    line-height: 1.5;
}

.mg-pwreset-actions {
    margin-top: 16px;
}

.mg-pwreset-page .alert {
    border-radius: 12px;
}

@media (max-width: 576px) {
    .mg-pwreset-page {
        padding: 22px 12px 34px;
        min-height: clamp(420px, calc(100vh - 150px), 820px);
    }

    .mg-pwreset-card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .mg-form-actions .btn {
        flex: 1 1 100%;
    }
}

/* Password strength meter (password-reset-change-prompt.tpl) */
.mg-pw-meter.progress {
    height: 8px;
    margin: 2px 0 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.mg-pw-meter .progress-bar {
    width: 0;
    border-radius: 999px;
    transition: width 0.3s ease, background 0.3s ease;
}

.mg-pw-meter .progress-bar.bg-danger { background: linear-gradient(90deg, #ff4f4f, #ff7a59) !important; }
.mg-pw-meter .progress-bar.bg-warning { background: linear-gradient(90deg, #f5a623, #ffcc4d) !important; }
.mg-pw-meter .progress-bar.bg-success { background: linear-gradient(90deg, #00a8e8, #00e0a4) !important; }

.mg-pw-meter-label {
    margin: 8px 0 0;
    font-size: 12px;
    color: rgba(224, 246, 255, 0.7);
}

.mg-pw-mismatch {
    margin: 6px 0 0;
    font-size: 12px;
    color: #ff6b6b;
}

.mg-pw-tips {
    margin: 12px 0 0;
}
