/* ===================================
   TranscribeLegal Authentication Styles
   =================================== */

/* CSS Variables */
:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1e3a8a;
    --primary-blue-light: #3b82f6;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --border-gray: #e5e7eb;
    --success-green: #10b981;
    --error-red: #ef4444;
    --warning-yellow: #f59e0b;
}

[data-theme="dark"] {
    --primary-blue: #3b82f6;
    --primary-blue-dark: #60a5fa;
    --primary-blue-light: #1e3a8a;
    --text-dark: #f8fafc;
    /* Slate 50 */
    --text-gray: #94a3b8;
    /* Slate 400 */
    --text-light: #64748b;
    /* Slate 500 */
    --bg-white: #0f172a;
    /* Slate 900 */
    --bg-gray: #1e293b;
    /* Slate 800 */
    --border-gray: #334155;
    /* Slate 700 */
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-gray);
    overflow-x: hidden;
}

/* Layout Container */
.auth-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left Sidebar */
.auth-sidebar {
    flex: 0 0 40%;
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-sidebar::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar-content {
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 60px;
    font-size: 20px;
    font-weight: 600;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-weight: bold;
}

.sidebar-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.sidebar-description {
    font-size: 18px;
    line-height: 1.8;
    opacity: 0.9;
    max-width: 450px;
}

.sidebar-footer {
    position: relative;
    z-index: 1;
    font-size: 14px;
    opacity: 0.8;
}

.sidebar-footer p {
    margin-bottom: 8px;
}

/* Right Content Area */
.auth-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-gray);
}

.auth-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 48px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-gray);
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

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

.form-input::placeholder {
    color: var(--text-light);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--text-dark);
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 14px;
    color: var(--text-gray);
    cursor: pointer;
    user-select: none;
}

.checkbox-group a {
    color: var(--primary-blue);
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -8px;
}

.forgot-password {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

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

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.btn-google {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-gray);
    width: 100%;
}

.btn-google:hover {
    background: var(--bg-gray);
    border-color: var(--text-gray);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-gray);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-gray);
}

/* Footer Links */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-gray);
}

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

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

/* Error Message */
.error-message {
    background: #fee2e2;
    color: var(--error-red);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Success Message */
.success-message {
    background: #d1fae5;
    color: var(--success-green);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.success-message.show {
    display: block;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-gray);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-dark);
}

/* OTP Input */
.otp-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.otp-input {
    width: 56px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

/* Progress Indicator */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: var(--bg-gray);
    color: var(--text-gray);
}

.step-circle.active {
    background: var(--primary-blue);
    color: white;
}

.step-circle.completed {
    background: var(--success-green);
    color: white;
}

.step-label {
    font-size: 14px;
    color: var(--text-gray);
}

.step-label.active {
    color: var(--text-dark);
    font-weight: 600;
}

.step-arrow {
    color: var(--text-light);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: var(--border-gray);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 33%;
    background: var(--error-red);
}

.strength-fill.medium {
    width: 66%;
    background: var(--warning-yellow);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success-green);
}

.strength-text {
    font-size: 12px;
    color: var(--text-gray);
}

/* Loading State */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-sidebar {
        flex: 0 0 35%;
        padding: 40px;
    }

    .sidebar-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-sidebar {
        flex: none;
        padding: 40px 24px;
        min-height: 300px;
    }

    .sidebar-title {
        font-size: 32px;
    }

    .sidebar-description {
        font-size: 16px;
    }

    .auth-content {
        padding: 24px;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .otp-input {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .otp-container {
        gap: 8px;
    }

    .otp-input {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}