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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    min-height: 100vh;
}

/* Login Container */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.background-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 
        0 10px 20px rgba(220, 38, 38, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #6b7280;
    font-size: 16px;
    font-weight: 400;
    margin-top: 4px;
}

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

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

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    letter-spacing: 0.025em;
}

.form-group input, .form-group select, .form-group textarea {
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
    font-weight: 400;
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #dc2626;
    background: white;
    box-shadow: 
        0 0 0 3px rgba(220, 38, 38, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -8px 0 8px 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    position: relative;
    font-weight: 500;
}

.checkbox-container input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: white;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #dc2626;
    border-color: #dc2626;
    transform: scale(1.1);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    color: #dc2626;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 12px rgba(220, 38, 38, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(220, 38, 38, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.login-btn:hover::before {
    left: 100%;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.demo-accounts {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.demo-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.demo-list small {
    color: #9ca3af;
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', monospace;
    background: #f9fafb;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.login-footer a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid;
    animation: slideInAlert 0.5s ease-out;
}

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

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.alert-warning {
    background: #fefce8;
    color: #ca8a04;
    border-color: #fde047;
}

.alert-info {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.alert-icon {
    font-size: 18px;
}

/* Form Validation Styles */
.form-group input.error, .form-group select.error, .form-group textarea.error {
    border-color: #dc2626;
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group input.success, .form-group select.success, .form-group textarea.success {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.error-text, .validation-feedback.error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}

.form-help {
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
    font-style: italic;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        padding: 32px 24px;
        margin: 16px;
        border-radius: 20px;
        max-width: 100%;
    }
    
    .login-header h1 {
        font-size: 28px;
    }
    
    .logo {
        flex-direction: column;
        gap: 12px;
    }
    
    .logo-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .demo-list {
        gap: 4px;
    }
    
    .demo-list small {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 12px;
    }
    
    .login-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .form-group input, .form-group select, .form-group textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* Focus and Accessibility */
.form-group.focused label {
    color: #dc2626;
    transform: translateY(-2px);
}

input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
a, button, input, select, textarea, .checkmark {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-card {
        background: white;
        border: 2px solid #000;
    }
    
    .form-group input, .form-group select, .form-group textarea {
        border-color: #000;
    }
    
    .login-btn {
        background: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.hidden { display: none; }
.visible { display: block; }

/* Color Utilities */
.text-red { color: #dc2626; }
.text-green { color: #16a34a; }
.text-blue { color: #2563eb; }
.text-gray { color: #6b7280; }
.text-dark { color: #1f2937; }

.bg-red { background-color: #dc2626; }
.bg-white { background-color: white; }
.bg-gray { background-color: #f9fafb; }

/* Documentation Page Styles */
.documentation-container {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.documentation-main {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
    max-width: 1200px;
    transition: margin-left 0.3s ease;
}

.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: white;
    border: 1px solid #e5e7eb;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    gap: 3px;
}

.mobile-sidebar-toggle .hamburger-line {
    width: 18px;
    height: 2px;
    background: #374151;
    border-radius: 1px;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .documentation-main {
        margin-left: 0;
        padding: 80px 20px 40px 20px;
    }
    
    .mobile-sidebar-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        top: 0;
        height: 100vh;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .documentation-main {
        padding: 80px 16px 40px 16px;
    }
}
/* Toast Notifications - Add this to your style.css */

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    min-width: 280px;
    max-width: 90%;
    animation: slideUp 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

.toast-success {
    border-left: 4px solid #15803d;
    color: #15803d;
}

.toast-success::before {
    content: '✅';
    font-size: 18px;
}

.toast-error {
    border-left: 4px solid #dc2626;
    color: #dc2626;
}

.toast-error::before {
    content: '❌';
    font-size: 18px;
}

.toast-warning {
    border-left: 4px solid #b45309;
    color: #b45309;
}

.toast-warning::before {
    content: '⚠️';
    font-size: 18px;
}

.toast-info {
    border-left: 4px solid #0ea5e9;
    color: #0ea5e9;
}

.toast-info::before {
    content: 'ℹ️';
    font-size: 18px;
}