/* AUTH PAGES - DUOLINGO STYLE */
:root {
    --green: #58cc02;
    --green-dark: #46a302;
    --blue: #1cb0f6;
    --red: #ff4b4b;
    --orange: #ff9600;
    --gold: #ffc800;
    --purple: #a560e8;
    --gray: #e5e5e5;
    --text: #3c3c3c;
    --text2: #777;
    --font: 'Nunito', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); background: #f7f7f7; min-height: 100vh; }

/* AUTH CONTAINER */
.auth-container {
    display: flex; min-height: 100vh;
}

/* LEFT SIDE - BRANDING */
.auth-brand {
    flex: 1;
    background: linear-gradient(160deg, #58cc02 0%, #46a302 40%, #1cb0f6 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 60px; position: relative; overflow: hidden;
}
.auth-brand::before {
    content: ''; position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.08' fill-rule='evenodd'/%3E%3C/svg%3E");
}
.auth-brand::after {
    content: ''; position: absolute; bottom: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.brand-content {
    max-width: 440px; color: #fff; position: relative; z-index: 1;
}
.brand-logo {
    display: flex; align-items: center; gap: 14px; margin-bottom: 48px;
}
.brand-logo .logo-icon {
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.brand-logo .logo-text {
    font-size: 26px; font-weight: 900;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.brand-content h1 {
    font-size: 38px; font-weight: 900; line-height: 1.15;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
.brand-content > p {
    font-size: 17px; opacity: 0.95; line-height: 1.7;
    margin-bottom: 40px;
}
.brand-features {
    display: flex; flex-direction: column; gap: 14px;
}
.feature {
    display: flex; align-items: center; gap: 16px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.3s ease;
}
.feature:hover {
    background: rgba(255,255,255,0.18);
    transform: translateX(8px);
}
.feature i {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.feature span { font-size: 15px; font-weight: 700; }
.brand-mascot { display: none; }

/* Stats at bottom */
.brand-stats {
    display: flex; gap: 32px; margin-top: 48px;
    padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.2);
}
.brand-stat {
    display: flex; flex-direction: column;
}
.brand-stat-value {
    font-size: 28px; font-weight: 900;
}
.brand-stat-label {
    font-size: 13px; opacity: 0.8;
}

/* RIGHT SIDE - FORMS */
.auth-forms {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 40px; background: #fff;
}
.auth-card {
    width: 100%; max-width: 420px;
}
.auth-card.hidden { display: none; }
.auth-card h2 {
    font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 8px;
}
.auth-subtitle {
    font-size: 15px; color: var(--text2); margin-bottom: 32px;
}
.back-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 700; color: var(--text2);
    text-decoration: none; margin-bottom: 24px;
}
.back-link:hover { color: var(--text); }

/* FORM ELEMENTS */
.form-group { margin-bottom: 20px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-group label {
    display: block; font-size: 14px; font-weight: 700;
    color: var(--text); margin-bottom: 8px;
}
.input-wrapper {
    position: relative; display: flex; align-items: center;
}
.input-wrapper i:first-child {
    position: absolute; left: 16px; color: #aaa; font-size: 16px;
}
.input-wrapper input {
    width: 100%; padding: 14px 16px 14px 48px;
    border: 2px solid var(--gray); border-radius: 12px;
    font-size: 15px; font-family: var(--font);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-wrapper input:focus {
    outline: none; border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(28,176,246,0.1);
}
.input-wrapper input::placeholder { color: #bbb; }
.toggle-password {
    position: absolute; right: 12px; background: none; border: none;
    color: #aaa; cursor: pointer; padding: 8px;
}
.toggle-password:hover { color: var(--text); }

/* PASSWORD STRENGTH */
.password-strength { margin-top: 8px; }
.strength-bar {
    height: 4px; background: var(--gray); border-radius: 2px; overflow: hidden;
}
.strength-fill {
    height: 100%; background: var(--green); border-radius: 2px;
    transition: width 0.3s;
}
.strength-text { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* FORM OPTIONS */
.form-options {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
}
.form-options a {
    font-size: 14px; font-weight: 700; color: var(--blue); text-decoration: none;
}
.form-options a:hover { text-decoration: underline; }

/* CHECKBOX */
.checkbox-wrapper {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 14px; color: var(--text); cursor: pointer;
}
.checkbox-wrapper input { display: none; }
.checkmark {
    width: 20px; height: 20px; border: 2px solid var(--gray);
    border-radius: 6px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.2s;
}
.checkbox-wrapper input:checked + .checkmark {
    background: var(--green); border-color: var(--green);
}
.checkbox-wrapper input:checked + .checkmark::after {
    content: '✓'; color: #fff; font-size: 12px; font-weight: 800;
}
.checkbox-wrapper a { color: var(--blue); text-decoration: none; }


/* PRIMARY BUTTON */
.btn-primary {
    width: 100%; padding: 16px 24px; border-radius: 14px;
    background: var(--green); color: #fff; border: none;
    font-size: 16px; font-weight: 800; font-family: var(--font);
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 5px 0 var(--green-dark);
    transition: all 0.15s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 var(--green-dark);
}
.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--green-dark);
}

/* DIVIDER */
.divider {
    display: flex; align-items: center; gap: 16px;
    margin: 24px 0; color: var(--text2);
}
.divider::before, .divider::after {
    content: ''; flex: 1; height: 1px; background: var(--gray);
}
.divider span { font-size: 13px; font-weight: 700; }

/* SOCIAL LOGIN */
.social-login { display: flex; flex-direction: column; gap: 12px; }
.btn-social {
    width: 100%; padding: 14px 20px; border-radius: 12px;
    background: #fff; border: 2px solid var(--gray);
    font-size: 14px; font-weight: 700; font-family: var(--font);
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px;
    transition: all 0.2s;
}
.btn-social:hover { background: #f7f7f7; border-color: #ccc; }
.btn-social.google i { color: #ea4335; }
.btn-social.facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.btn-social.facebook:hover { background: #166fe5; }

/* AUTH FOOTER */
.auth-footer {
    text-align: center; margin-top: 24px;
    font-size: 14px; color: var(--text2);
}
.auth-footer a {
    color: var(--blue); font-weight: 700; text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* AUTH ALERTS - Inside Card */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    animation: authAlertSlide 0.3s ease;
}
@keyframes authAlertSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.auth-alert i:first-child {
    font-size: 18px;
    flex-shrink: 0;
}
.auth-alert span {
    flex: 1;
    line-height: 1.4;
}
.auth-alert-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.auth-alert-close:hover {
    opacity: 1;
}
.auth-alert-danger {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    color: #c53030;
    border-left: 4px solid #fc8181;
}
.auth-alert-danger i { color: #e53e3e; }
.auth-alert-danger .auth-alert-close { color: #c53030; }

.auth-alert-success {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    color: #276749;
    border-left: 4px solid #68d391;
}
.auth-alert-success i { color: #48bb78; }
.auth-alert-success .auth-alert-close { color: #276749; }

.auth-alert-warning {
    background: linear-gradient(135deg, #fffaf0 0%, #feebc8 100%);
    color: #c05621;
    border-left: 4px solid #f6ad55;
}
.auth-alert-warning i { color: #ed8936; }

.auth-alert-info {
    background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
    color: #2b6cb0;
    border-left: 4px solid #63b3ed;
}
.auth-alert-info i { color: #4299e1; }

/* Old Bootstrap alerts override - hide them */
.auth-forms > .alert {
    display: none !important;
}

/* SUCCESS ICON */
.success-icon {
    width: 80px; height: 80px; margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--green), #7ed321);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.success-icon i { font-size: 40px; color: #fff; }

/* RESPONSIVE */
@media (max-width: 992px) {
    .auth-brand { display: none; }
    .auth-forms { padding: 24px; }
}
@media (max-width: 480px) {
    .auth-card h2 { font-size: 24px; }
    .form-row { flex-direction: column; gap: 0; }
    .btn-primary { padding: 14px 20px; font-size: 15px; }
}
