/* ===================================================
   Authentication Pages - Shared Styles
   Modern, clean design for Login, Register, etc.
   =================================================== */

:root {
    --auth-primary: #667eea;
    --auth-primary-dark: #5568d3;
    --auth-secondary: #764ba2;
    --auth-gradient-start: #667eea;
    --auth-gradient-end: #764ba2;
    --auth-text-dark: #1a202c;
    --auth-text-muted: #718096;
    --auth-border: #e2e8f0;
    --auth-bg-light: #f7fafc;
}

/* Reset and Base */
body.auth-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, var(--auth-gradient-start) 0%, var(--auth-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container */
.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

/* Card */
.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.auth-header {
    background: linear-gradient(135deg, var(--auth-gradient-start) 0%, var(--auth-gradient-end) 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.auth-logo-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
}

.auth-logo-icon i {
    font-size: 32px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.auth-header p {
    margin: 0;
    opacity: 0.95;
    font-size: 15px;
}

/* Body */
.auth-body {
    padding: 40px 30px;
}

/* Forms - Normal Labels */
.auth-form .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--auth-text-dark);
    font-size: 14px;
}

.auth-form .form-label i {
    color: var(--auth-primary);
}

.auth-form .form-control {
    height: 50px;
    border: 2px solid var(--auth-border);
    border-radius: 10px;
    font-size: 15px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.auth-form .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.auth-form .form-control::placeholder {
    color: #a0aec0;
}

/* Password Toggle */
.password-wrapper {
    position: relative;
    display: block;
}

.password-wrapper .form-control {
    padding-right: 3.5rem; /* Space for toggle button */
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    padding: 8px;
    z-index: 10;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--auth-primary);
}

.password-toggle i {
    font-size: 18px;
}

/* Checkboxes */
.auth-form .form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0.125rem;
    border-radius: 6px;
    border: 2px solid #dee2e6;
}

.auth-form .form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-form .form-check-label {
    margin-left: 8px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
}

/* Buttons */
.btn-auth-primary {
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, #5568d3 0%, #5a3d7a 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(85, 104, 211, 0.4);
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(85, 104, 211, 0.5);
    color: white;
}

.btn-auth-primary:active {
    transform: translateY(0);
}

/* Small variant for home page */
.btn-auth-primary.btn-auth-small {
    width: auto;
    height: 40px;
    padding: 0 24px;
    font-size: 14px;
}

.btn-auth-secondary {
    width: 100%;
    height: 54px;
    background: white;
    border: 2px solid var(--auth-border);
    border-radius: 10px;
    color: var(--auth-text-dark);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-auth-secondary:hover {
    border-color: var(--auth-primary);
    color: var(--auth-primary);
    transform: translateY(-2px);
}

/* Footer Links */
.auth-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--auth-border);
    text-align: center;
}

.auth-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-footer a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-footer .divider {
    margin: 0 12px;
    color: #dee2e6;
}

/* Validation */
.validation-summary-errors {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 20px;
}

.validation-summary-errors li {
    color: #856404;
    font-size: 14px;
}

.text-danger {
    font-size: 13px;
    margin-top: 6px;
    display: block;
    color: #dc3545;
}

/* Info/Success Messages */
.auth-info-box {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.auth-info-box.success {
    background: #d4edda;
    border-color: #c3e6cb;
}

.auth-info-box.warning {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.auth-info-box i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.auth-info-box h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--auth-text-dark);
}

.auth-info-box p {
    margin: 0;
    color: var(--auth-text-muted);
    font-size: 14px;
}

/* Debug Badge */
.debug-badge {
    margin-top: 20px;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    color: white;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
}

/* Back to App Link */
.auth-back-link {
    text-align: center;
    margin-top: 20px;
}

.auth-back-link a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.auth-back-link a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Language Selector */
.auth-lang-selector {
    text-align: center !important;
    margin-top: 12px;
    color: white !important;
    font-size: 13px;
    width: 100%;
}

.auth-lang-selector i {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7) !important;
}

.auth-lang-selector .auth-lang-option,
.auth-lang-selector .auth-lang-option:link,
.auth-lang-selector .auth-lang-option:visited {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.auth-lang-selector .auth-lang-option:hover {
    color: white !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.1);
}

.auth-lang-selector .auth-lang-option.active,
.auth-lang-selector .auth-lang-option.active:link,
.auth-lang-selector .auth-lang-option.active:visited {
    color: white !important;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
}

.auth-lang-sep {
    margin: 0 4px;
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Responsive */
@media (max-width: 576px) {
    .auth-container {
        padding: 10px;
    }

    .auth-header {
        padding: 30px 20px;
    }

    .auth-body {
        padding: 30px 20px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .auth-header p {
        font-size: 14px;
    }
}

/* Additional spacing utilities */
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
