* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #5955D1;
    --primary-dark: #4842b3;
    --primary-light: #7773e0;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

p, span, div, label, input, button {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-300);
}

.logo-container {
    text-align: center;
    margin-bottom: 24px;
}

.logo-container img {
    max-width: 180px;
    height: auto;
    opacity: 0;
    position: absolute;
}

.logo-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 15px;
    color: var(--gray-500);
    margin: 0;
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.alert-danger {
    background: #fef2f2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
    position: relative;
    overflow: hidden;
}

.alert-danger::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ef4444;
}

.alert-danger svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #ef4444;
}

.alert strong {
    font-weight: 700;
    color: #991b1b;
}

.alert div {
    flex: 1;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--gray-400);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus {
    border-color: #5955D1;
    box-shadow: 0 0 0 3px rgba(89, 85, 209, 0.08);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--gray-400);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: var(--gray-600);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5955D1;
}

.checkbox-wrapper label {
    font-size: 14px;
    color: var(--gray-600);
    cursor: pointer;
    user-select: none;
}

.btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
}

/* Icon styles */
.icon {
    display: inline-block;
    width: 20px;
    height: 20px;
}

/* Loading animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
