/* ==========================================================================
   MODERN LOGIN & REGISTER CSS – 2025 Edition
   ========================================================================== */

:root {
    /* Brand Colors */
    --primary: #4FBDF9;
    --primary-dark: #3aa8e6;
    --accent: #0BBAA5;
    --accent-dark: #089989;
    --tertiary: #D6DF22;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;

    /* Neutral & UI */
    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --input-bg: #f8fafc;
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* Base */
body,
input, button, select, textarea {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    font-weight: 450;                    /* Slightly bolder than normal = crisp */
    line-height: 1.6;
    letter-spacing: -0.012em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Load Inter font (free & beautiful) */
@import url('https://rsms.me/inter/inter.css');
@supports (font-variation-settings: normal) {
    body { font-family: 'Inter var', ui-sans-serif, system-ui, sans-serif; }
}

/* Headings – bold & modern */
h1, h2, h3, h4, h5, h6 {
    font-weight: 750;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #0f172a;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4, h5 { font-size: 1.25rem; }
/* ==========================================================================
   AUTH CONTAINER – Centered Card Layout
   ========================================================================== */
.card {
    margin-top:0%!important;
}
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(79, 189, 249, 0.05) 0%, rgba(11, 186, 165, 0.05) 100%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    max-width: 460px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    padding: 52px 44px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--tertiary));
}
.auth-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.12), 0 12px 28px rgba(0, 0, 0, 0.08);
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, 
        var(--primary) 0%, 
        var(--accent) 50%, 
        var(--tertiary) 100%
    );
    border-radius: 28px 28px 0 0;
    box-shadow: 0 4px 12px rgba(79, 189, 249, 0.4);
}

/* Optional subtle inner glow */
.auth-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(79, 189, 249, 0.08) 0%, 
        rgba(11, 186, 165, 0.06) 100%
    );
    pointer-events: none;
    border-radius: 28px;
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(79, 189, 249, 0.3);
}

.auth-logo img {
    width: 50px;
    height: 50px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ==========================================================================
   FORM ELEMENTS – Clean & Modern
   ========================================================================== */
.form-group {
    margin-bottom: 24px;
}

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

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text);
    background: var(--input-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(79, 189, 249, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Input with Icon */
.input-with-icon {
    position: relative;
}

.input-with-icon .form-control {
    padding-left: 44px;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.form-control:focus+.input-icon {
    color: var(--primary);
}

/* ==========================================================================
   PASSWORD STRENGTH METER – Modern & Minimal
   ========================================================================== */
#pass-meter {
    display: flex;
    gap: 6px;
    height: 6px;
    margin-top: 10px;
}

#pass-meter .segment {
    flex: 1;
    background: #e2e8f0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

#pass-meter.good .segment {
    background: var(--success);
}

#pass-meter.warn .segment {
    background: var(--warning);
}

#pass-meter.bad .segment {
    background: var(--danger);
}

#pass-meter.str-1 .segment:nth-child(n+2),
#pass-meter.str-2 .segment:nth-child(n+3),
#pass-meter.str-3 .segment:nth-child(4) {
    background: #e2e8f0;
}

#pass-suggestions {
    min-height: 1.5rem;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: left;
}

/* Password Match Icons */
.pass-match-wrap {
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pass-match,
.pass-not-match {
    font-size: 20px;
    font-weight: 700;
}

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

.pass-not-match {
    color: var(--danger);
}

/* Eye Toggle – Clean */
.pass-eye-parent {
    position: relative;
}

.pass-eye {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
    z-index: 5;
    padding: 4px;
}

.pass-eye:hover {
    color: var(--primary);
}

.pass-eye-register {
    right: 16px;
}

/* ==========================================================================
   BUTTONS – Modern Gradient Style
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 16px rgba(79, 189, 249, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 189, 249, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ==========================================================================
   CHECKBOX & REMEMBER ME
   ========================================================================== */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-check-label {
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

/* ==========================================================================
   LINKS & FOOTER
   ========================================================================== */
.auth-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.forgot-password {
    display: block;
    text-align: right;
    margin-top: -12px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ==========================================================================
   ALERTS – Floating, Clean, Modern
   ========================================================================== */
#alerts-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 340px;
    max-width: 420px;
}

#alerts-wrapper .alert {
    background: var(--card-bg);
    border: none;
    border-left: 5px solid;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.4s ease;
}

#alerts-wrapper .alert-success {
    border-color: var(--success);
}

#alerts-wrapper .alert-info {
    border-color: var(--info);
}

#alerts-wrapper .alert-warning {
    border-color: var(--warning);
}

#alerts-wrapper .alert-danger {
    border-color: var(--danger);
}

#alerts-wrapper .alert-message {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}

#alerts-wrapper .btn-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

#alerts-wrapper .btn-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* ==========================================================================
   DIVIDER – Social Login Separator
   ========================================================================== */
.divider {
    display: flex;
    align-items: center;
    margin: 32px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider::before {
    margin-right: 16px;
}

.divider::after {
    margin-left: 16px;
}

/* ==========================================================================
   SOCIAL BUTTONS
   ========================================================================== */
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 12px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-social:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-social img,
.btn-social i {
    margin-right: 12px;
    font-size: 20px;
}

/* ==========================================================================
   TEXT UTILITIES
   ========================================================================== */
.text-primary {
    color: var(--primary) !important;
}

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

.text-info {
    color: var(--info) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-center {
    text-align: center !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 576px) {
    .auth-card {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 24px;
    }

    .auth-logo {
        width: 64px;
        height: 64px;
    }

    .form-control {
        padding: 12px 14px;
        font-size: 14px;
    }

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

    #alerts-wrapper {
        min-width: auto;
        left: 20px;
        right: 20px;
    }
}

/* ==========================================================================
   ADDITIONAL FORM ELEMENTS
   ========================================================================== */
.invalid-feedback {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--danger);
}

.valid-feedback {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--success);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid {
    border-color: var(--success);
}

/* Terms & Privacy Links */
.terms-text {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 20px;
    line-height: 1.5;
}

.terms-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.terms-text a:hover {
    text-decoration: underline;
}