/* auth.css */

/* Auth Pages Styles */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --dark-bg: #0f172a;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--light-bg);
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
}

.navbar-brand .logo {
    height: 40px;
    margin-right: 0.5rem;
}

.brand-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: -2px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* Auth Section */
.auth-section {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo {
    margin-bottom: 1.5rem;
}

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

.auth-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.auth-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.trial-badge {
    background: linear-gradient(135deg, var(--warning-color), #f97316);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-block;
}

.trial-badge i {
    margin-right: 0.5rem;
}

/* Auth Form */
.auth-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.input-group {
    position: relative;
}

.input-group-text {
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-right: none;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px 0 0 8px;
}

.form-control {
    border: 2px solid var(--border-color);
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

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

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

.form-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Password Toggle Button */
#togglePassword {
    border: 2px solid var(--border-color);
    border-left: none;
    background: white;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

#togglePassword:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.form-check-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

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

.forgot-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    opacity: 0.7;
    transform: none;
}

/* Auth Divider */
.auth-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

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

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Social Auth */
.social-auth {
    margin-bottom: 2rem;
}

.social-auth .btn {
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-auth .btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--light-bg);
}

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

.auth-footer p {
    color: var(--text-secondary);
    margin: 0;
}

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

.auth-footer a:hover {
    text-decoration: underline;
}

/* Auth Message */
.auth-message {
    margin-top: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

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

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.alert:hover {
    box-shadow: var(--shadow-md);
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-danger i {
    color: #dc2626;
}

.alert strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Help Section */
.help-section {
    background: white;
    padding: 4rem 0;
}

.help-card {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.help-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.help-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.help-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.help-options .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.help-options .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Benefits Section (Sign Up Page) */
.benefits-section {
    background: white;
    padding: 4rem 0;
}

.benefit-card {
    text-align: center;
    padding: 2rem 1.5rem;
    height: 100%;
}

.benefit-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.benefit-icon i {
    font-size: 2rem;
    color: white;
}

.benefit-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.benefit-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-brand {
    margin-bottom: 2rem;
}

.footer-brand .logo {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-brand h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #94a3b8;
    line-height: 1.6;
}

.footer h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    margin-top: 3rem;
}

.footer-bottom p {
    color: #94a3b8;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Apply 7% cushion to prevent content from going off-screen */
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    /* Apply 7% horizontal padding to main content containers */
    .container {
        padding-left: 7% !important;
        padding-right: 7% !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure navbar stays full width (no cushion) */
    .navbar .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .auth-section {
        padding: 2rem 0 !important;
    }
    
    .auth-card {
        padding: 2rem !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .auth-header h1 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }
    
    .auth-header p {
        font-size: 1rem !important;
    }
    
    .form-options {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    
    .benefit-card {
        margin-bottom: 2rem !important;
        padding: 1.5rem !important;
    }
    
    .help-options {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    
    .help-card {
        padding: 2rem !important;
    }
    
    /* Footer adjustments */
    .footer .container {
        padding-left: 7% !important;
        padding-right: 7% !important;
    }
}

@media (max-width: 576px) {
    /* Maintain 7% cushion on very small screens */
    .container {
        padding-left: 7% !important;
        padding-right: 7% !important;
    }
    
    .auth-card {
        padding: 1.5rem !important;
        margin: 0 !important;
    }

    .auth-header h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    .auth-header p {
        font-size: 0.95rem !important;
    }

    .trial-badge {
        font-size: 0.9rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    .help-card {
        padding: 1.5rem !important;
    }
    
    /* Form adjustments for very small screens */
    .form-group {
        margin-bottom: 1.25rem !important;
    }
    
    .input-group-text,
    .form-control {
        padding: 0.625rem 0.875rem !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading Spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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