/* ============================================
   Authentication System - Global Styles
   ============================================ */

:root {
    --auth-primary: #007bff;
    --auth-primary-dark: #0056b3;
    --auth-success: #28a745;
    --auth-danger: #dc3545;
    --auth-warning: #ffc107;
    --auth-info: #17a2b8;
    --auth-light: #f8f9fa;
    --auth-dark: #343a40;
    --auth-gray: #6c757d;
    --auth-border: #dee2e6;
    --auth-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    --auth-transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ============================================
   Auth Page Wrapper
   ============================================ */

.auth-page-wrapper {
    display: flex;
    height: 100vh;
    align-items: stretch;
}

/* ============================================
   Auth Brand Section (Left Side)
   ============================================ */

.auth-brand-section {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #ccb23e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.auth-brand-section::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.auth-brand-section::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -80px;
    left: -80px;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-brand-logo {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.auth-brand-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.auth-brand-subtitle {
    font-size: 18px;
    opacity: 0.8;
    margin-bottom: 50px;
}

.auth-brand-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    opacity: 0.9;
}

.auth-feature-item i {
    font-size: 20px;
}

/* ============================================
   Auth Form Section (Right Side)
   ============================================ */

.auth-form-section {
    flex: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 500px;
}

.auth-form-wrapper {
    position: relative;
}

.auth-form-box {
    animation: slideInRight 0.6s ease-out;
    height: auto;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Form Header
   ============================================ */

.auth-form-header {
    margin-bottom: 30px !important;
    text-align: center;
}

.auth-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.auth-form-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* ============================================
   Form Groups
   ============================================ */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

/* ============================================
   Input Wrapper & Styling
   ============================================ */

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrapper i {
    position: absolute;
    left: 12px;
    color: var(--auth-gray);
    pointer-events: none;
    font-size: 16px;
}

.auth-form-input {
    width: 100%;
    padding: 12px 56px 12px 40px;
    border: 2px solid var(--auth-border);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--auth-transition);
    background: white;
}

.auth-form-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.auth-form-input::placeholder {
    color: #adb5bd;
}

.auth-form-input.is-invalid {
    border-color: var(--auth-danger);
}

.auth-form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* ============================================
   Toggle Password Button
   ============================================ */

.auth-toggle-password {
    position: absolute;
    right: 18px;
    z-index: 2;
    background: none;
    border: none;
    color: var(--auth-gray);
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--auth-transition);
}

.auth-toggle-password:hover {
    color: var(--auth-primary);
}

.auth-toggle-password:focus-visible {
    outline: none;
    color: var(--auth-primary);
}

.auth-input-wrapper .auth-form-input[type="password"]::-ms-reveal,
.auth-input-wrapper .auth-form-input[type="password"]::-ms-clear {
    display: none;
}

/* ============================================
   Form Error Messages
   ============================================ */

.auth-form-error {
    font-size: 12px;
    color: var(--auth-danger);
    display: none;
    margin-top: 4px;
}

.auth-form-error.show {
    display: block;
}

/* ============================================
   Password Strength Indicator
   ============================================ */

.auth-password-strength {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.auth-strength-bar {
    height: 4px;
    background: var(--auth-border);
    border-radius: 2px;
    overflow: hidden;
}

.auth-strength-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: var(--auth-danger);
    border-radius: 2px;
    transition: var(--auth-transition);
}

.auth-strength-bar.weak::after {
    width: 33%;
    background: var(--auth-danger);
}

.auth-strength-bar.medium::after {
    width: 66%;
    background: var(--auth-warning);
}

.auth-strength-bar.strong::after {
    width: 100%;
    background: var(--auth-success);
}

.auth-strength-text {
    font-size: 12px;
    color: var(--auth-gray);
}

/* ============================================
   Checkbox Group
   ============================================ */

.auth-checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.auth-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--auth-primary);
}

.auth-checkbox-label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    margin: 0;
}

.auth-checkbox-label .auth-link {
    color: var(--auth-primary);
    text-decoration: none;
}

.auth-checkbox-label .auth-link:hover {
    text-decoration: underline;
}

/* ============================================
   Form Options (Remember Me & Forgot Password)
   ============================================ */

.auth-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

/* ============================================
   Links
   ============================================ */

.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--auth-transition);
}

.auth-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

/* ============================================
   Divider
   ============================================ */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--auth-gray);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

/* ============================================
   Submit Button
   ============================================ */

.auth-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--auth-transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.3);
}

.auth-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-btn-loader {
    display: none;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.auth-btn-loader.show {
    display: inline-block;
}

/* ============================================
   Social Button
   ============================================ */

.auth-social-btn {
    width: 100%;
    padding: 12px;
    background: white;
    color: #333;
    border: 2px solid var(--auth-border);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--auth-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-social-btn:hover {
    border-color: var(--auth-primary);
    background: #f8f9fa;
    transform: translateY(-2px);
}

.auth-social-btn i {
    font-size: 18px;
}

/* ============================================
   Form Footer
   ============================================ */

.auth-form-footer {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* ============================================
   Info Box
   ============================================ */

.auth-info-box {
    background: #e7f3ff;
    border-left: 4px solid var(--auth-info);
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.auth-info-box i {
    color: var(--auth-info);
    margin-top: 3px;
}

.auth-info-box p {
    font-size: 13px;
    color: #0c63a6;
    margin: 0;
}

/* ============================================
   Success Box
   ============================================ */

.auth-success-box {
    text-align: center;
    padding: 40px 20px;
}

.auth-success-icon {
    font-size: 60px;
    color: var(--auth-success);
    margin-bottom: 20px;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.auth-success-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.auth-success-message {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ============================================
   Modal Styles
   ============================================ */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.auth-modal.show {
    display: flex;
}

.auth-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--auth-shadow);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--auth-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.auth-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--auth-gray);
    cursor: pointer;
    transition: var(--auth-transition);
}

.auth-modal-close:hover {
    color: #333;
}

.auth-modal-body {
    padding: 20px;
}

.auth-modal-body p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
}

.auth-modal-footer {
    padding: 20px;
    border-top: 1px solid var(--auth-border);
    display: flex;
    gap: 10px;
}

.auth-modal-btn {
    flex: 1;
    padding: 10px;
    background: var(--auth-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--auth-transition);
}

.auth-modal-btn:hover {
    background: var(--auth-primary-dark);
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablets */
@media (max-width: 1024px) {
    .auth-brand-section {
        flex: 0.8;
    }

    .auth-form-section {
        flex: 1.2;
    }

    .auth-brand-title {
        font-size: 36px;
    }

    .auth-form-title {
        font-size: 24px;
    }
}

/* Large Mobile Devices */
@media (max-width: 768px) {
    .auth-page-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .auth-brand-section {
        flex: none;
        min-height: 200px;
        padding: 30px 20px;
    }

    .auth-brand-logo {
        font-size: 50px;
    }

    .auth-brand-title {
        font-size: 28px;
        margin-bottom: 5px;
    }

    .auth-brand-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .auth-brand-features {
        align-items: center;
        gap: 15px;
    }

    .auth-form-section {
        padding: 30px 15px;
    }

    .auth-form-container {
        max-width: 100%;
    }

    .auth-form-title {
        font-size: 22px;
    }

    .auth-form-group {
        gap: 6px;
    }

    .auth-form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .auth-brand-section {
        min-height: 150px;
        padding: 20px 15px;
    }

    .auth-brand-logo {
        font-size: 40px;
        margin-bottom: 10px;
    }

    .auth-brand-title {
        font-size: 22px;
    }

    .auth-brand-subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .auth-brand-features {
        gap: 10px;
    }

    .auth-feature-item {
        font-size: 13px;
    }

    .auth-form-section {
        padding: 20px 12px;
    }

    .auth-form-header {
        margin-bottom: 20px;
    }

    .auth-form-title {
        font-size: 20px;
    }

    .auth-form-subtitle {
        font-size: 13px;
    }

    .auth-form {
        gap: 16px;
    }

    .auth-form-group {
        gap: 5px;
    }

    .auth-form-label {
        font-size: 13px;
    }

    .auth-form-input {
        padding: 11px 11px 11px 36px;
        font-size: 13px;
    }

    .auth-input-wrapper i {
        left: 10px;
        font-size: 14px;
    }

    .auth-submit-btn {
        padding: 11px;
        font-size: 14px;
    }

    .auth-social-btn {
        padding: 11px;
        font-size: 14px;
        gap: 8px;
    }

    .auth-form-footer {
        font-size: 13px;
    }

    .auth-divider {
        font-size: 12px;
        margin: 18px 0;
    }

    .auth-modal-content {
        width: 95%;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .auth-brand-title {
        font-size: 20px;
    }

    .auth-form-title {
        font-size: 18px;
    }

    .auth-form-input {
        padding: 10px 10px 10px 34px;
        font-size: 12px;
    }

    .auth-submit-btn {
        padding: 10px;
        font-size: 13px;
    }

    .auth-success-icon {
        font-size: 50px;
    }

    .auth-success-title {
        font-size: 20px;
    }

    .auth-modal-header h3 {
        font-size: 18px;
    }
}
