﻿/* Custom CSS Properties / Color Palette */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --focus-ring: rgba(37, 99, 235, 0.25);
    --error-color: #ef4444;
    --radius-lg: 12px;
    --radius-md: 8px;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-surface: #ffffff;
    --bg-page: #f8fafc;
    --text-primary: #0f172a;
    --border-color: #e2e8f0;
    --border-focus: #93c5fd;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
}

/* Form Container Layout */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
}

    .auth-card.wide {
        max-width: 800px;
    }

/* Header Typography */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .auth-header h2 {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
    }

    .auth-header p {
        color: var(--text-muted);
        font-size: 0.95rem;
    }

/* Grid Layout for Multi-column forms (Register) */
.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .form-grid-2col {
        grid-template-columns: 1fr 1fr;
    }
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
}

/* Form Fields & Floating Labels */
.form-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-control-custom {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    height: 46px;
}

    .form-control-custom:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px var(--focus-ring);
    }

select.form-control-custom {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* Password Field Wrapper & Toggle Icon */
.password-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

    .password-toggle-btn:hover {
        color: var(--text-primary);
    }

.password-wrapper .form-control-custom {
    padding-right: 2.75rem;
}

/* Custom Checkbox & Radio Alignment */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

    .checkbox-group input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--primary-color);
        cursor: pointer;
    }

    .checkbox-group label {
        font-size: 0.9rem;
        color: var(--text-primary);
        cursor: pointer;
        margin: 0;
    }

/* Actions & Buttons */
.btn-primary-custom {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: var(--shadow-md);
}

    .btn-primary-custom:hover {
        background-color: var(--primary-hover);
    }

    .btn-primary-custom:active {
        transform: translateY(1px);
    }

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

    .auth-footer a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 600;
    }

        .auth-footer a:hover {
            text-decoration: underline;
        }

/* ASP.NET Validation Styling */
.field-validation-error {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.input-validation-error {
    border-color: var(--error-color) !important;
}

.validation-summary-errors {
    color: var(--error-color);
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 1.25rem;
    }

/* Divider & External Logins */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.75rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid var(--border-color);
    }

    .divider span {
        padding: 0 0.75rem;
    }




/* Password Strength Meter Component */
.password-strength-container {
    margin-top: 0.75rem;
    padding: 0.875rem;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.strength-bar-wrapper {
    height: 6px;
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

    .strength-bar-fill.score-1 {
        background-color: #ef4444;
    }
    /* Red */
    .strength-bar-fill.score-2 {
        background-color: #f97316;
    }
    /* Orange */
    .strength-bar-fill.score-3 {
        background-color: #f59e0b;
    }
    /* Yellow */
    .strength-bar-fill.score-4 {
        background-color: #3b82f6;
    }
    /* Blue */
    .strength-bar-fill.score-5 {
        background-color: #10b981;
    }
/* Green */

.strength-label-text {
    font-size: 0.825rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.password-criteria-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.375rem;
    font-size: 0.785rem;
}

    .password-criteria-list li {
        display: flex;
        align-items: center;
        transition: color 0.2s ease;
    }

        .password-criteria-list li::before {
            content: "•";
            margin-right: 0.5rem;
            font-size: 1rem;
        }

        .password-criteria-list li.valid {
            color: #10b981;
        }

            .password-criteria-list li.valid::before {
                content: "✓";
            }

        .password-criteria-list li.invalid {
            color: #94a3b8;
        }


/* Divider Styles */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #e2e8f0;
    }

    .divider span {
        padding: 0 0.75rem;
        color: #64748b;
        font-size: 0.875rem;
        font-weight: 500;
        text-transform: uppercase;
    }

/* Google Sign-In Button */
.btn-google-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

    .btn-google-custom:hover {
        background-color: #f9fafb;
        border-color: #9ca3af;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .btn-google-custom:active {
        background-color: #f3f4f6;
    }

    .btn-google-custom .google-icon {
        flex-shrink: 0;
    }
