/* ================================================
   RERMIS Login Page Styles
   Modern, Professional & Responsive Design
   ================================================ */

/* ===== CSS Variables ===== */
:root {
    /* Primary Colors - Bold and Distinctive */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #8b9cf9;
    
    /* Secondary Colors */
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    
    /* Neutral Colors */
    --dark: #1a1a2e;
    --dark-light: #2d2d44;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    /* Background */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    
    /* Status Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Typography */
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Main Container ===== */
.login-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ===== Branding Section (Left Side) ===== */
.branding-section {
    flex: 1;
    background: var(--primary-gradient);
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.branding-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    animation: fadeInLeft 0.8s ease;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.brand-name {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0;
}

/* Brand Tagline */
.brand-tagline {
    margin-bottom: 60px;
}

.brand-tagline h2 {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.brand-tagline p {
    font-size: 18px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Feature List */
.feature-list {
    margin-bottom: 60px;
}

.feature-item {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    animation: fadeIn 0.8s ease;
    animation-fill-mode: both;
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }

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

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    transition: var(--transition-normal);
}

.feature-item:hover .feature-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.feature-text h4 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature-text p {
    font-size: 15px;
    opacity: 0.85;
    line-height: 1.5;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-normal);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.stat-item h3 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-item p {
    font-size: 14px;
    opacity: 0.85;
    margin: 0;
}

/* Decorative Circles */
.decor-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.decor-circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation: pulse 8s ease-in-out infinite;
}

.decor-circle-2 {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -80px;
    animation: pulse 6s ease-in-out infinite;
    animation-delay: 1s;
}

.decor-circle-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 10%;
    animation: pulse 10s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }
}

/* ===== Form Section (Right Side) ===== */
.form-section {
    flex: 1;
    background: var(--bg-white);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.form-wrapper {
    width: 100%;
    max-width: 480px;
    animation: fadeInRight 0.8s ease;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Logo (hidden on desktop) */
.mobile-logo {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
}

.mobile-logo .logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-md);
    font-size: 24px;
    animation: none;
}

.mobile-logo h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Header */
.form-header {
    margin-bottom: 32px;
    text-align: center;
}

.form-header h2 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-family: var(--font-body);
    background: var(--bg-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition-fast);
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border: 2px solid #d1d5db;
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    margin: 0;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition-normal);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::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: var(--transition-slow);
}

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

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-icon {
    transition: var(--transition-fast);
}

.btn-login:hover .btn-icon {
    transform: translateX(4px);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 32px 0;
    color: var(--text-light);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 16px;
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 24px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-light);
    color: var(--text-primary);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.quick-action-btn:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Register Section */
.register-section {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.register-text {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 15px;
}

.register-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.register-link {
    flex: 1;
    min-width: 180px;
    padding: 12px 20px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.register-link:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Alerts */
.alert {
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    font-size: 14px;
    border: none;
    animation: slideDown 0.3s ease;
}

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

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert i {
    font-size: 16px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition-fast);
}

.btn-close:hover {
    opacity: 1;
}

/* ===== Responsive Design ===== */

/* Tablet */
@media (max-width: 1024px) {
    .branding-section {
        padding: 40px;
    }
    
    .brand-tagline h2 {
        font-size: 36px;
    }
    
    .stats-container {
        gap: 16px;
    }
    
    .stat-item {
        padding: 16px;
    }
    
    .stat-item h3 {
        font-size: 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .branding-section {
        display: none;
    }
    
    .form-section {
        padding: 24px;
    }
    
    .mobile-logo {
        display: flex;
    }
    
    .form-header h2 {
        font-size: 28px;
    }
    
    .register-options {
        flex-direction: column;
    }
    
    .register-link {
        min-width: 100%;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .form-section {
        padding: 20px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .brand-name {
        font-size: 36px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Print Styles */
@media print {
    .branding-section,
    .register-section,
    .quick-actions {
        display: none;
    }
}