/* Modern Login Page Styles for SIRAMA */

:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --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;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: var(--gray-800);
    line-height: 1.6;
}

/* Modern Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
}

/* Floating Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.floating-elements::before,
.floating-elements::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-elements::before {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-elements::after {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 3s;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Login Container */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    width: 100%;
    max-width: 900px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    min-height: 500px;
}

/* Left Side - Branding */
.login-left {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    color: white;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: slideInRight 0.8s ease-out 0.2s both;
}

.brand-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 2rem;
    border: 3px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    animation: pulse 3s ease-in-out infinite;
}

.brand-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    font-weight: 400;
    max-width: 300px;
    margin: 0 auto;
}

/* Right Side - Form */
.login-right {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    font-size: 1rem;
    color: var(--gray-600);
}

.form-group {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1rem;
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--gray-50);
    color: var(--gray-900);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.form-input::placeholder {
    color: var(--gray-400);
}

.remember-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
}

.checkbox-input {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    margin-right: 0.5rem;
    accent-color: var(--primary-color);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.login-button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    animation: fadeInUp 0.8s ease-out 1s both;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}


.footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    animation: fadeInUp 0.8s ease-out 1.2s both;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 450px;
        min-height: 400px;
    }
    
    .login-left {
        display: none;
    }
    
    .login-right {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        min-height: auto;
        max-width: 400px;
    }
    
    .login-right {
        padding: 1.5rem;
    }
    
    .brand-logo {
        width: 100px;
        height: 100px;
    }
    
    .brand-logo img {
        width: 60px;
        height: 60px;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .brand-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .login-container {
        padding: 0.5rem;
    }
    
    .login-card {
        max-width: 350px;
    }
    
    .login-right {
        padding: 1rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .brand-logo {
        width: 80px;
        height: 80px;
    }
    
    .brand-logo img {
        width: 50px;
        height: 50px;
    }
    
    .brand-title {
        font-size: 1.5rem;
    }
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states */
.form-input:focus,
.login-button:focus,
.demo-account:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .form-input {
        border-color: var(--gray-900);
    }
    
    .login-button {
        background: var(--primary-color);
        border: 2px solid var(--gray-900);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    min-width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0.25rem;
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.error .toast-icon {
    color: var(--error-color);
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.success .toast-icon {
    color: var(--success-color);
}
