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

:root {
    --primary: #d50032;
    --primary-dark: #b0002a;
    --secondary: #e6335b;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-light: #64748b;
    --danger: #ef4444;
    --success: #10b981;
}

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    border: 1px solid #e2e8f0;
}

.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    height: 48px;
    width: auto;
    margin-bottom: 24px;
}

h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 15px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 32px;
    font-weight: 400;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--surface);
    color: var(--text);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
}

.form-input::placeholder {
    color: #cbd5e1;
}

.form-input.error {
    border-color: var(--danger);
}

.error-message {
    display: none;
    color: var(--danger);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

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

.loading-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.btn-primary:disabled .loading-spinner {
    display: block;
}

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

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    font-weight: 500;
}

.alert.show {
    display: block;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.footer {
    text-align: center;
    margin-top: 32px;
    font-size: 13px;
    color: var(--text-light);
}

@media (max-width: 480px) {
    .login-container {
        padding: 32px 24px;
    }

    h1 {
        font-size: 28px;
    }
}
