/* ============================================
   FORGOT PASSWORD PAGE STYLES
   ============================================ */

:root {
    --brand-blue: #2c2f78;
    --brand-gold: #fbb040;
    --brand-dark: #1a1a2e;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
    --border-color: #e0e0e0;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.reset-container {
    width: 100%;
    max-width: 520px;
    animation: fadeInUp 0.5s ease;
}

.reset-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.reset-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-gold));
}

/* ============================================
   HEADER
   ============================================ */
.reset-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    height: 60px;
    margin-bottom: 15px;
}

.reset-header h1 {
    font-size: 26px;
    color: var(--brand-blue);
    margin-bottom: 8px;
}

.reset-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
#resetForm {
    margin-top: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background: #fafafa;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand-gold);
    background: white;
    box-shadow: 0 0 0 3px rgba(251, 176, 64, 0.1);
}

.form-group input.error {
    border-color: var(--error);
}

.form-group input.success {
    border-color: var(--success);
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-group select option {
    padding: 8px;
}

.form-group .hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   FORM ROW (Day & Month)
   ============================================ */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ============================================
   INPUT WRAPPER (Password Toggle)
   ============================================ */
.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-right: 48px;
}

.toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition);
    font-size: 16px;
}

.toggle-btn:hover {
    color: var(--brand-blue);
}

/* ============================================
   PASSWORD STRENGTH
   ============================================ */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    transition: var(--transition);
}

.strength-bar .bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.strength-bar .bar-fill.weak {
    background: var(--error);
}

.strength-bar .bar-fill.fair {
    background: var(--warning);
}

.strength-bar .bar-fill.good {
    background: #ff9800;
}

.strength-bar .bar-fill.strong {
    background: var(--success);
}

.strength-text {
    font-size: 12px;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.strength-text.weak { color: var(--error); }
.strength-text.fair { color: var(--warning); }
.strength-text.good { color: #ff9800; }
.strength-text.strong { color: var(--success); }

/* ============================================
   PASSWORD MATCH
   ============================================ */
.match-text {
    margin-top: 6px;
    font-size: 12px;
    min-height: 20px;
    font-weight: 500;
}

.match-text.match {
    color: var(--success);
}

.match-text.no-match {
    color: var(--error);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, var(--brand-blue), #3d3f8a);
    color: white;
    margin-top: 6px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 47, 120, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary i {
    font-size: 16px;
}

/* ============================================
   SPINNER (Loading State)
   ============================================ */
.btn-primary .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

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

/* ============================================
   FOOTER LINK
   ============================================ */
.reset-footer {
    margin-top: 24px;
    text-align: center;
}

.reset-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.reset-footer a:hover {
    color: var(--brand-blue);
}

.reset-footer a i {
    margin-right: 6px;
}

/* ============================================
   SUCCESS MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: white;
    border-radius: var(--radius) var(--radius) 0 0;
    z-index: 1;
}

.modal-header h2 {
    font-size: 20px;
    color: var(--brand-blue);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 8px;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--error);
    transform: rotate(90deg);
}

.modal-body {
    padding: 28px;
}

.modal-body > p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Credentials Display */
.credential {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border-left: 3px solid var(--brand-gold);
}

.credential:last-child {
    margin-bottom: 0;
}

.credential label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.credential span {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

.credential .phrase {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--brand-blue);
    letter-spacing: 0.5px;
}

.credential-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.credential-row span {
    flex: 1;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition);
    font-size: 14px;
    flex-shrink: 0;
}

.copy-btn:hover {
    color: var(--brand-blue);
}

/* Modal Actions */
.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .btn-secondary,
.modal-actions .btn-primary {
    padding: 12px 20px;
    font-size: 14px;
    margin-top: 0;
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-secondary);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: 100%;
}

.toast {
    padding: 14px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--error);
}

.toast.warning {
    background: var(--warning);
    color: var(--text-primary);
}

.toast.info {
    background: var(--brand-blue);
}

.toast i {
    font-size: 18px;
    flex-shrink: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .reset-card {
        padding: 24px 20px;
    }

    .reset-header h1 {
        font-size: 22px;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .modal-content {
        max-width: 100%;
        margin: 10px;
        border-radius: var(--radius);
    }

    .modal-header {
        padding: 18px 20px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }

    .credential span {
        font-size: 14px;
    }

    .toast {
        font-size: 13px;
        padding: 12px 16px;
    }

    #toastContainer {
        top: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }
}

@media (max-width: 400px) {
    .reset-card {
        padding: 18px 14px;
    }

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

    .btn-primary {
        font-size: 14px;
        padding: 12px 20px;
    }

    .modal-actions .btn-secondary,
    .modal-actions .btn-primary {
        font-size: 13px;
        padding: 10px 16px;
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
/* ============================================
   ADDITIONAL STYLES FOR EMAIL VERSION
   ============================================ */

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-secondary);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.form-group .hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}
