/* ================================================
   Modern & Clean Authentication Styles (OISIPAN)
   ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a4d2e;
    --primary-light: #2d6a3e;
    --primary-dark: #0f3620;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-medium: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --error-color: #dc2626;
    --success-color: #16a34a;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
}

body {
    background-color: #f3f4f6;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a4d2e 0%, #0f3620 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    bottom: -50px;
    left: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: white;
    border-radius: 5px;
    padding: 40px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out;
}

.login-card .subtitle {
    color: var(--accent-color);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.login-card h1 {
    color: var(--text-dark);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 28px;
    text-align: center;
}

.login-form {
    width: 100%;
}

/* ===== FORM GROUPS ===== */
.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
}

.form-icon {
    position: absolute;
    left: 14px;
    top: 36px;
    color: var(--text-light);
    font-size: 16px;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--border-light);
    border-radius: 5px;
    font-size: 14px;
    color: var(--text-dark);
    background-color: #fafbfc;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

.password-field {
    position: relative;
}

.password-field .form-icon {
    top: 50%;
    transform: translateY(-50%);
}

.password-field .form-control {
    padding-right: 44px;
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s ease;
    padding: 0;
    display: flex;
    align-items: center;
}

.toggle-password-btn:hover {
    color: var(--primary-color);
}

/* ===== REMEMBER & FORGOT PASSWORD ===== */
.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0 20px 0;
    gap: 8px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin: 0;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
    border-radius: 5px;
}

.forgot-password-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.forgot-password-link:hover {
    color: #d97706;
}

/* ===== BUTTONS ===== */
.submit-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(26, 77, 46, 0.2);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-login {
    padding: 12px 16px;
}

.btn-login::after {
    content: '→';
    margin-left: 4px;
}

/* ===== DIVIDER ===== */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.divider span {
    margin: 0 12px;
}

/* ===== SOCIAL BUTTONS ===== */
.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-social {
    padding: 11px 14px;
    border: 1.5px solid var(--border-light);
    background-color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-dark);
}

.btn-social:hover {
    border-color: var(--primary-color);
    background-color: var(--border-light);
}

/* ===== SIGNUP LINK ===== */
.signup-link {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-dark);
}

.signup-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover {
    color: #d97706;
}

/* ===== FORGOT PASSWORD PAGE ===== */
.forgot-password-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a4d2e 0%, #0f3620 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.forgot-password-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.forgot-password-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    bottom: -50px;
    left: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

.forgot-password-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.forgot-password-card {
    background: white;
    border-radius: 5px;
    padding: 40px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out;
}

.forgot-password-card h1 {
    color: var(--text-dark);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

.forgot-password-form {
    width: 100%;
}

.btn-submit {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(26, 77, 46, 0.2);
}

.btn-submit::after {
    content: '✉️';
}

.back-to-login {
    text-align: center;
    margin-top: 16px;
}

.back-to-login a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.back-to-login a::before {
    content: '←';
}

.back-to-login a:hover {
    color: var(--primary-light);
}

/* ===== REGISTER PAGE ===== */
.register-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a4d2e 0%, #0f3620 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.register-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.register-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    bottom: -50px;
    left: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

.register-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.register-card {
    background: white;
    border-radius: 5px;
    padding: 40px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

.register-card .subtitle {
    color: var(--accent-color);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.register-card h1 {
    color: var(--text-dark);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 28px;
    text-align: center;
}

.register-form {
    width: 100%;
}

/* ===== PASSWORD STRENGTH ===== */
.password-strength-container {
    margin-top: 8px;
    margin-bottom: 12px;
}

.password-strength-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
}

.password-strength-text {
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.password-strength-text.weak {
    color: #dc2626;
}

.password-strength-text.fair {
    color: #f59e0b;
}

.password-strength-text.good {
    color: #3b82f6;
}

.password-strength-text.strong {
    color: var(--primary-color);
}

.password-strength-bar {
    width: 100%;
    height: 4px;
    background-color: var(--border-light);
    border-radius: 5px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    background-color: #e5e7eb;
    width: 0;
    transition: all 0.3s ease;
}

.password-strength-fill.weak {
    width: 25%;
    background-color: #dc2626;
}

.password-strength-fill.fair {
    width: 50%;
    background-color: #f59e0b;
}

.password-strength-fill.good {
    width: 75%;
    background-color: #3b82f6;
}

.password-strength-fill.strong {
    width: 100%;
    background-color: var(--primary-color);
}

/* ===== TERMS CHECKBOX ===== */
.form-check-terms {
    margin: 16px 0 20px 0;
    font-size: 13px;
}

.form-check-terms input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* ===== LOGIN LINK ===== */
.login-link {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-dark);
}

.login-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    color: #d97706;
}

/* ===== VALIDATION ERRORS ===== */
.validation-summary-errors {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: var(--error-color);
    padding: 12px 14px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 13px;
}

.validation-summary-errors ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.validation-summary-errors li {
    margin-bottom: 4px;
}

.validation-summary-errors li:last-child {
    margin-bottom: 0;
}

.form-error {
    border-color: var(--error-color) !important;
    background-color: #fef2f2 !important;
}

.field-validation-error {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(20px) translateX(15px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ===== SCROLLBAR ===== */
.register-card::-webkit-scrollbar {
    width: 6px;
}

.register-card::-webkit-scrollbar-track {
    background: transparent;
}

.register-card::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

.register-card::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .login-card,
    .forgot-password-card,
    .register-card {
        padding: 28px 20px;
        border-radius: 5px;
    }

    .login-card h1,
    .register-card h1 {
        font-size: 26px;
        margin-bottom: 24px;
    }

    .forgot-password-card h1 {
        font-size: 24px;
    }

    .social-buttons {
        grid-template-columns: 1fr;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .register-card {
        max-height: 95vh;
    }

    .form-check {
        font-size: 13px;
    }

    .auth-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .forgot-password-link {
        margin-left: 0;
    }
}
