/* ============================================================================
   Authentication Pages - Elegant Styling
   ============================================================================ */

:root {
    --auth-primary: #2c5530;
    --auth-primary-light: #3a6b3f;
    --auth-primary-dark: #1e3a21;
    --auth-gold: #D4AF37;
    --auth-gold-light: #E6C55A;
    --auth-white: #FFFFFF;
    --auth-gray-50: #F8F9FA;
    --auth-gray-100: #E9ECEF;
    --auth-gray-200: #DEE2E6;
    --auth-gray-300: #CED4DA;
    --auth-gray-500: #6C757D;
    --auth-gray-700: #495057;
    --auth-gray-900: #212529;
    --auth-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --auth-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
    --auth-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Auth Container */
.auth-container {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(44, 85, 48, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.auth-container .container {
    position: relative;
    z-index: 2;
}

/* Auth Card */
.auth-card {
    background: var(--auth-white);
    border-radius: 20px;
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    transition: var(--auth-transition);
}

.auth-card:hover {
    box-shadow: var(--auth-shadow-hover);
    transform: translateY(-5px);
}

/* Auth Header */
.auth-header {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    color: var(--auth-white);
    text-align: center;
    padding: 3rem 2rem 2rem;
    position: relative;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="b" cx="1" cy="0" r="0.8"><stop offset="0%" stop-color="rgba(255,255,255,0.1)"/><stop offset="100%" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><path d="m0,20c20,-20 40,0 60,-10c20,-10 40,10 40,10l0,20l-100,0z" fill="url(%23b)"/></svg>') repeat-x;
    background-size: 100px 20px;
    opacity: 0.3;
}

.auth-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.auth-header p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

/* Auth Body */
.auth-body {
    padding: 2.5rem 2rem;
}

/* Form Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--auth-gray-700);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--auth-gray-200);
    border-radius: 12px;
    background-color: var(--auth-white);
    transition: var(--auth-transition);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: var(--auth-gray-500);
    font-size: 0.95rem;
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    gap: 0.5rem;
}

.country-code-select {
    width: 120px;
    padding: 0.875rem 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--auth-gray-200);
    border-radius: 12px;
    background-color: var(--auth-white);
    transition: var(--auth-transition);
    font-family: inherit;
    font-weight: 500;
}

.country-code-select:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.phone-input {
    flex: 1;
}

/* Checkbox Styling */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--auth-gray-300);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    position: relative;
    transition: var(--auth-transition);
}

.form-checkbox input[type="checkbox"]:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.form-checkbox label {
    color: var(--auth-gray-700);
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}

/* Submit Button */
.btn-auth {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    color: var(--auth-white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--auth-transition);
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-auth:hover {
    background: linear-gradient(135deg, var(--auth-primary-dark) 0%, var(--auth-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(44, 85, 48, 0.3);
}

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

/* Auth Footer */
.auth-footer {
    background-color: var(--auth-gray-50);
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--auth-gray-100);
}

.auth-footer p {
    margin: 0;
    color: var(--auth-gray-700);
    font-size: 0.95rem;
}

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

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

/* Alert Styling */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: none;
    font-size: 0.9rem;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* Invalid Feedback */
.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem 0;
        min-height: calc(100vh - 60px);
    }
    
    .auth-card {
        margin: 0 1rem;
        border-radius: 16px;
    }
    
    .auth-header {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.875rem;
    }
    
    .auth-body {
        padding: 2rem 1.5rem;
    }
    
    .auth-footer {
        padding: 1.25rem 1.5rem;
    }
    
    .phone-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .country-code-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-header h1 {
        font-size: 1.625rem;
    }
    
    .auth-body {
        padding: 1.5rem 1rem;
    }
    
    .form-input,
    .country-code-select {
        padding: 0.75rem;
    }
    
    .btn-auth {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Loading State */
.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-auth:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Focus States for Accessibility */
.form-input:focus,
.country-code-select:focus,
.btn-auth:focus,
.form-checkbox input:focus {
    outline: 2px solid var(--auth-primary);
    outline-offset: 2px;
}

/* Animation for form elements */
.form-group {
    animation: slideUp 0.3s ease-out;
}

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

/* Staggered animation */
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

.btn-auth {
    animation: slideUp 0.3s ease-out 0.6s both;
}

.auth-footer {
    animation: slideUp 0.3s ease-out 0.7s both;
}
