/* ==========================================================================
   MODERN AUTHENTICATION CSS - HAYSIFACOM
   ========================================================================== */

/* AUTH VARIABLES */
:root {
    /* Brand Colors */
    --auth-primary: #2d5016;
    --auth-primary-light: #4a7c29;
    --auth-primary-dark: #1e3a0f;
    --auth-accent: #f39c12;
    --auth-success: #10b981;
    --auth-error: #ef4444;
    --auth-warning: #f59e0b;
    
    /* Neutral Colors */
    --auth-white: #ffffff;
    --auth-gray-50: #f9fafb;
    --auth-gray-100: #f3f4f6;
    --auth-gray-200: #e5e7eb;
    --auth-gray-300: #d1d5db;
    --auth-gray-400: #9ca3af;
    --auth-gray-500: #6b7280;
    --auth-gray-600: #4b5563;
    --auth-gray-700: #374151;
    --auth-gray-800: #1f2937;
    --auth-gray-900: #111827;
    
    /* Typography */
    --auth-font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --auth-font-size-sm: 0.875rem;
    --auth-font-size-base: 1rem;
    --auth-font-size-lg: 1.125rem;
    --auth-font-size-xl: 1.25rem;
    --auth-font-size-2xl: 1.5rem;
    --auth-font-size-3xl: 1.875rem;
    --auth-font-size-4xl: 2.25rem;
    
    /* Spacing */
    --auth-space-2: 0.5rem;
    --auth-space-3: 0.75rem;
    --auth-space-4: 1rem;
    --auth-space-5: 1.25rem;
    --auth-space-6: 1.5rem;
    --auth-space-8: 2rem;
    --auth-space-10: 2.5rem;
    --auth-space-12: 3rem;
    --auth-space-16: 4rem;
    
    /* Effects */
    --auth-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --auth-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --auth-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --auth-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --auth-border-radius: 12px;
    --auth-border-radius-lg: 16px;
    --auth-transition: all 0.2s ease;
}

/* GLOBAL RESET */
.auth-body {
    margin: 0;
    padding: 0;
    font-family: var(--auth-font-family);
    background: linear-gradient(135deg, #466707 0%, #cfcbd4 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.auth-body * {
    box-sizing: border-box;
}

/* BACKGROUND EFFECTS */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 400px;
    height: 400px;
    bottom: -10%;
    left: 40%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(20px) rotate(240deg); }
}

/* MAIN CONTAINER */
.auth-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--auth-space-6);
}

/* BRANDING SECTION */
.auth-branding {
    flex: 1;
    max-width: 500px;
    padding: var(--auth-space-8);
    color: var(--auth-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.branding-content {
    text-align: center;
    animation: slideInLeft 0.8s ease;
}

.logo-container {
    margin-bottom: var(--auth-space-8);
}

.auth-logo {
    height: 200px;
    width: auto;
   
    transition: var(--auth-transition);
}

.auth-logo:hover {
    transform: scale(1.05);
}

.branding-content h1 {
    font-size: var(--auth-font-size-4xl);
    font-weight: 700;
    margin: 0 0 var(--auth-space-6);
    line-height: 1.2;
}

.branding-content p {
    font-size: var(--auth-font-size-lg);
    margin: 0 0 var(--auth-space-8);
    opacity: 0.9;
    line-height: 1.6;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: var(--auth-space-4);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--auth-space-3);
    font-size: var(--auth-font-size-base);
    font-weight: 500;
}

.feature-item .material-symbols-outlined {
    font-size: 24px;
    color: var(--auth-accent);
}

/* FORM SECTION */
.auth-form-section {
    flex: 1;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-container {
    width: 100%;
    background: var(--auth-white);
    border-radius: var(--auth-border-radius-lg);
    box-shadow: var(--auth-shadow-xl);
    padding: var(--auth-space-8);
    animation: slideInRight 0.8s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* FORM HEADER */
.form-header {
    text-align: center;
    margin-bottom: var(--auth-space-8);
}

.form-header h2 {
    font-size: var(--auth-font-size-3xl);
    font-weight: 700;
    color: var(--auth-gray-900);
    margin: 0 0 var(--auth-space-3);
}

.form-header p {
    color: var(--auth-gray-600);
    font-size: var(--auth-font-size-base);
    margin: 0;
}

/* FORM STYLES */
.auth-form {
    margin-bottom: var(--auth-space-6);
}

.form-group {
    margin-bottom: var(--auth-space-6);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: var(--auth-space-2);
    font-weight: 500;
    color: var(--auth-gray-700);
    margin-bottom: var(--auth-space-3);
    font-size: var(--auth-font-size-sm);
}

.form-group label .material-symbols-outlined {
    font-size: 20px;
    color: var(--auth-gray-400);
}

.form-group input {
    width: 100%;
    padding: var(--auth-space-4);
    border: 2px solid var(--auth-gray-200);
    border-radius: var(--auth-border-radius);
    font-size: var(--auth-font-size-base);
    font-family: inherit;
    background-color: var(--auth-white);
    transition: var(--auth-transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--auth-error);
}

.form-group input::placeholder {
    color: var(--auth-gray-400);
}

/* PASSWORD FIELD */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: var(--auth-space-3);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-gray-400);
    cursor: pointer;
    padding: var(--auth-space-2);
    border-radius: 6px;
    transition: var(--auth-transition);
}

.password-toggle:hover {
    color: var(--auth-gray-600);
    background-color: var(--auth-gray-100);
}

/* FORM OPTIONS */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--auth-space-6);
    flex-wrap: wrap;
    gap: var(--auth-space-3);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: var(--auth-space-2);
    cursor: pointer;
    font-size: var(--auth-font-size-sm);
    color: var(--auth-gray-600);
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
    margin: 0;
    opacity: 0;
    position: absolute;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--auth-gray-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--auth-transition);
    flex-shrink: 0;
}

.checkbox-container input:checked + .checkmark {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    color: var(--auth-white);
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-size: var(--auth-font-size-sm);
    font-weight: 500;
    transition: var(--auth-transition);
}

.forgot-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

/* SUBMIT BUTTON */
.auth-submit-btn {
    width: 100%;
    padding: var(--auth-space-4);
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    color: var(--auth-white);
    border: none;
    border-radius: var(--auth-border-radius);
    font-size: var(--auth-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--auth-transition);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--auth-space-4);
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--auth-shadow-lg);
}

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

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--auth-space-2);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--auth-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ERROR MESSAGES */
.form-error,
.field-error {
    color: var(--auth-error);
    font-size: var(--auth-font-size-sm);
    margin-top: var(--auth-space-2);
    display: flex;
    align-items: center;
    gap: var(--auth-space-2);
}

.form-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--auth-border-radius);
    padding: var(--auth-space-3) var(--auth-space-4);
    margin-top: var(--auth-space-4);
}

/* SOCIAL LOGIN */
.social-login {
    margin-bottom: var(--auth-space-6);
}

.divider {
    position: relative;
    text-align: center;
    margin: var(--auth-space-6) 0;
    color: var(--auth-gray-500);
    font-size: var(--auth-font-size-sm);
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--auth-gray-200);
    z-index: 1;
}

.divider span {
    background-color: var(--auth-white);
    padding: 0 var(--auth-space-4);
    position: relative;
    z-index: 2;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--auth-space-3);
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--auth-space-3);
    width: 100%;
    padding: var(--auth-space-3) var(--auth-space-4);
    border: 2px solid var(--auth-gray-200);
    border-radius: var(--auth-border-radius);
    background-color: var(--auth-white);
    font-size: var(--auth-font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--auth-transition);
}

.social-btn:hover {
    border-color: var(--auth-gray-300);
    box-shadow: var(--auth-shadow-sm);
}

.google-btn {
    color: var(--auth-gray-700);
}

.facebook-btn {
    color: var(--auth-gray-700);
}

/* AUTH FOOTER */
.auth-footer {
    text-align: center;
    margin-bottom: var(--auth-space-6);
}

.auth-footer p {
    color: var(--auth-gray-600);
    font-size: var(--auth-font-size-sm);
    margin: 0;
}

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

.auth-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

/* BACK TO HOME */
.back-to-home {
    text-align: center;
    padding-top: var(--auth-space-4);
    border-top: 1px solid var(--auth-gray-200);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--auth-space-2);
    color: var(--auth-gray-500);
    text-decoration: none;
    font-size: var(--auth-font-size-sm);
    font-weight: 500;
    transition: var(--auth-transition);
}

.back-link:hover {
    color: var(--auth-primary);
}

.back-link .material-symbols-outlined {
    font-size: 18px;
}


/* ANIMATIONS */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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


/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .auth-container {
        flex-direction: column;
        padding: var(--auth-space-4);
    }
    
    .auth-branding {
        max-width: none;
        padding: var(--auth-space-6) var(--auth-space-4);
    }
    
    .branding-content h1 {
        font-size: var(--auth-font-size-3xl);
    }
    
    .features-list {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: var(--auth-space-3);
    }
    
    .form-container {
        padding: var(--auth-space-6);
    }
    
    .form-header h2 {
        font-size: var(--auth-font-size-2xl);
    }
    
    .branding-content h1 {
        font-size: var(--auth-font-size-2xl);
    }
    
    .branding-content p {
        font-size: var(--auth-font-size-base);
    }
    
    .features-list {
        flex-direction: column;
        align-items: center;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .social-buttons {
        gap: var(--auth-space-2);
    }
    
}

@media (max-width: 480px) {
    .auth-container {
        padding: var(--auth-space-2);
        min-height: 100vh;
    }
    
    .auth-branding {
        padding: var(--auth-space-4) var(--auth-space-2);
    }
    
    .form-container {
        padding: var(--auth-space-4);
    }
    
    .form-header h2 {
        font-size: var(--auth-font-size-xl);
    }
    
    .branding-content h1 {
        font-size: var(--auth-font-size-xl);
    }
    
    .auth-logo {
        height: 60px;
    }
    
    .bg-shape {
        display: none; /* Hide floating shapes on very small screens */
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .form-options {
        gap: var(--auth-space-4);
    }
}

/* DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
    :root {
        --auth-white: #1f2937;
        --auth-gray-50: #374151;
        --auth-gray-100: #4b5563;
        --auth-gray-900: #f9fafb;
        --auth-gray-800: #e5e7eb;
        --auth-gray-700: #d1d5db;
        --auth-gray-600: #9ca3af;
    }
    
    .form-container {
        background: rgba(31, 41, 55, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .divider::before {
        background-color: var(--auth-gray-600);
    }
    
    .social-btn {
        background-color: rgba(55, 65, 81, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
        color: var(--auth-gray-300);
    }
    
    .social-btn:hover {
        border-color: rgba(255, 255, 255, 0.2);
        background-color: rgba(75, 85, 99, 0.8);
    }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    .form-container {
        border: 2px solid var(--auth-gray-900);
    }
    
    .form-group input {
        border-width: 2px;
    }
    
    .form-group input:focus {
        border-width: 3px;
    }
}

/* FOCUS STYLES FOR KEYBOARD NAVIGATION */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 2px;
}

/* PRINT STYLES */
@media print {
    .auth-background,
    .social-login,
    .back-to-home {
        display: none !important;
    }
    
    .auth-container {
        background: white !important;
    }
    
    .form-container {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}
  /* ============================================
   REGISTER PAGE SPECIFIC STYLES
   ============================================ */

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    background-color: #e74c3c;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 50px;
    text-align: right;
}

/* Terms Checkbox Styling */
.terms-checkbox {
    margin-top: 20px;
}

.terms-text {
    font-size: 0.875rem;
    line-height: 1.5;
}

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

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

/* Success Message */
.form-success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.875rem;
}

.form-success .material-symbols-outlined {
    font-size: 20px;
}

/* OAuth Success Message */
.oauth-success-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: var(--auth-space-8);
}

.success-content {
    text-align: center;
    max-width: 400px;
    animation: slideInUp 0.6s ease;
}

.success-icon {
    margin-bottom: var(--auth-space-6);
}

.success-icon .material-symbols-outlined {
    font-size: 64px;
    color: var(--auth-success);
}

.success-content h2 {
    font-size: var(--auth-font-size-2xl);
    font-weight: 700;
    color: var(--auth-gray-800);
    margin: 0 0 var(--auth-space-4);
}

.success-content p {
    font-size: var(--auth-font-size-lg);
    color: var(--auth-gray-600);
    margin: 0 0 var(--auth-space-6);
    line-height: 1.6;
}

.success-details {
    display: flex;
    flex-direction: column;
    gap: var(--auth-space-3);
    margin-bottom: var(--auth-space-6);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: var(--auth-space-3);
    padding: var(--auth-space-3);
    background-color: var(--auth-gray-50);
    border-radius: var(--auth-border-radius);
    font-size: var(--auth-font-size-sm);
    color: var(--auth-gray-700);
}

.detail-item .material-symbols-outlined {
    font-size: 20px;
    color: var(--auth-success);
}

.redirect-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--auth-space-2);
    padding: var(--auth-space-4);
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-light));
    color: var(--auth-white);
    border-radius: var(--auth-border-radius);
    font-size: var(--auth-font-size-sm);
    font-weight: 500;
}

.redirect-info .material-symbols-outlined {
    font-size: 18px;
    animation: pulse 2s infinite;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Mobile Responsive for Register */
@media (max-width: 768px) {
    .password-strength {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .strength-bar {
        width: 100%;
    }
    
    .strength-text {
        text-align: left;
    }
    
    /* OAuth Success Message Mobile */
    .oauth-success-message {
        min-height: 300px;
        padding: var(--auth-space-6);
    }
    
    .success-content h2 {
        font-size: var(--auth-font-size-xl);
    }
    
    .success-content p {
        font-size: var(--auth-font-size-base);
    }
    
    .success-icon .material-symbols-outlined {
        font-size: 48px;
    }
    
    .detail-item {
        padding: var(--auth-space-2);
        font-size: 0.75rem;
    }
}
