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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: var(--bg, #ffffff);
    color: var(--text, #1a1a1a);
    line-height: 1.6;
    padding-top: 60px;
}

/* Main content area padding */
main {
    padding-top: 20px;
}

/* Modern color scheme */
:root {
    --primary: #0066cc;
    --primary-dark: #0052a3;
    --primary-light: #e6f2ff;
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
    --dark: #1a1a1a;
    --light: #f5f5f5;
    --border: #e0e0e0;
    --text: #555555;
    --text-light: #888888;
}

/* Auth Wrapper */
.auth-wrapper {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: var(--bg, #f9f9f9);
}

.auth-container {
    background: var(--surface, white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
    border: 1px solid var(--border, #f0f0f0);
}

.auth-header {
    background: var(--surface-2, #f9f9f9);
    padding: 30px;
    border-bottom: 1px solid var(--border, #f0f0f0);
    text-align: center;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    color: var(--text, #1a1a1a);
    font-size: 1.3em;
    font-weight: 700;
}

.auth-logo i {
    color: var(--accent, #0066cc);
    font-size: 1.5em;
}

.auth-header h1 {
    font-size: 1.6em;
    color: var(--text, #1a1a1a);
    font-weight: 700;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border, #f0f0f0);
}

.auth-tab {
    flex: 1;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-3, #888888);
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
}

.auth-tab:hover {
    color: var(--accent, #0066cc);
    background: var(--surface-2, #f9f9f9);
}

.auth-tab.active {
    color: var(--accent, #0066cc);
    border-bottom-color: var(--accent, #0066cc);
    background: transparent;
}

/* Auth Forms */
.auth-form {
    padding: 30px;
    display: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text, #1a1a1a);
    font-weight: 500;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--surface, white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent, #0066cc);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: var(--surface, white);
}

.form-group input::placeholder {
    color: var(--text-3, #aaa);
}

/* Form Hints */
.form-hint {
    font-size: 0.8em;
    margin-top: 5px;
    min-height: 18px;
}

.form-hint.success {
    color: var(--success-text, #28a745);
}

.form-hint.error {
    color: var(--danger-text, #dc3545);
}

.password-rule {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--text-3, #888888);
    font-size: 0.8em;
}

.password-rule i {
    font-size: 0.75em;
}

.password-rule.valid {
    color: var(--success-text, #28a745);
}

.password-rule.invalid {
    color: var(--danger-text, #dc3545);
}

/* Buttons */
.btn {
    background: #0066cc;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    background: #0052a3;
    transform: translateY(-1px);
}

.btn:disabled {
    background: var(--disabled-bg, #ccc);
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: #0066cc;
}

.btn-block {
    width: 100%;
}

.btn-block.btn-primary {
    height: 44px;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border, #f0f0f0);
}

.form-footer p {
    color: var(--text-3, #888888);
    margin-bottom: 10px;
    font-size: 0.9em;
}

.form-footer a {
    color: var(--accent, #0066cc);
    text-decoration: none;
    font-weight: 500;
}

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

.auth-footer {
    background: var(--surface-2, #f9f9f9);
    padding: 15px 30px;
    border-top: 1px solid var(--border, #f0f0f0);
    text-align: center;
    font-size: 0.85em;
    color: var(--text-3, #888888);
}

.auth-footer a {
    color: var(--accent, #0066cc);
    text-decoration: none;
}

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

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
    font-size: 0.9em;
    border: 1px solid transparent;
}

.alert.error {
    background: var(--danger-soft, #fee5e5);
    border-color: var(--danger-border, #f5a5a5);
    color: var(--danger-text, #d32f2f);
}

.alert.success {
    background: var(--success-soft, #e8f5e9);
    border-color: var(--success-border, #a5d6a7);
    color: var(--success-text, #2e7d32);
}

/* Flashes */
.flashes-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    margin-top: 20px;
}

.flash {
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9em;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash.success {
    background: var(--success-soft, #e8f5e9);
    color: var(--success-text, #2e7d32);
    border-color: var(--success-border, #a5d6a7);
}

.flash.error {
    background: var(--danger-soft, #fee5e5);
    color: var(--danger-text, #d32f2f);
    border-color: var(--danger-border, #f5a5a5);
}

.flash.warning {
    background: var(--warning-soft, #fff9e6);
    color: var(--warning-text, #f57f17);
    border-color: var(--warning-border, #ffe082);
}

.flash i {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 55px;
    }

    .auth-wrapper {
        padding: 40px 20px;
        min-height: calc(100vh - 55px);
    }

    .auth-container {
        max-width: 100%;
    }

    .auth-header, .auth-form {
        padding: 25px 20px;
    }

    .auth-tabs {
        flex-direction: column;
    }

    .auth-tab {
        padding: 14px;
        justify-content: center;
    }

    .flashes-container {
        padding: 0 20px;
    }
}