/* Modern Login Page CSS */

:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --border-color: #e2e8f0;
}

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

.login-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    overflow-x: hidden;
}

.login-container {
    display: flex;
    min-height: 100vh;
}

/* Left Side - Image Section */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #43e97b 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animated background pattern */
.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.2)"/><circle cx="0" cy="0" r="2" fill="rgba(255,255,255,0.2)"/><circle cx="60" cy="60" r="2" fill="rgba(255,255,255,0.2)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)" /></svg>');
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(60px, 60px);
    }
}

/* Floating shapes */
.login-left::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
}

.login-image-overlay {
    position: relative;
    z-index: 1;
    color: #fff;
    padding: 60px;
    text-align: center;
}

.login-brand {
    margin-bottom: 40px;
}

.login-brand i {
    font-size: 72px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.login-brand h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.login-brand p {
    font-size: 20px;
    opacity: 0.95;
    font-weight: 500;
}

/* USSD Phone Mockup */
.ussd-phone-mockup {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 15px;
    max-width: 300px;
    margin: 0 auto 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.phone-screen-demo {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 20px;
    min-height: 320px;
    position: relative;
}

.phone-header-demo {
    text-align: center;
    color: #1e293b;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.ussd-menu-demo {
    font-family: 'Courier New', monospace;
    color: #1e293b;
    font-size: 13px;
    line-height: 1.8;
}

.ussd-menu-demo .menu-title {
    font-weight: 700;
    margin-bottom: 10px;
    color: #4f46e5;
}

.ussd-menu-demo .menu-option {
    padding: 5px 0;
    transition: all 0.2s;
}

.ussd-menu-demo .menu-option:hover {
    padding-left: 5px;
    color: #4f46e5;
}

.phone-footer-demo {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px solid #e2e8f0;
    color: #64748b;
    font-size: 11px;
}

.login-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s;
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.feature-item i {
    font-size: 36px;
    margin-bottom: 12px;
    animation: featureIconFloat 3s ease-in-out infinite;
}

.feature-item:nth-child(1) i {
    animation-delay: 0s;
}

.feature-item:nth-child(2) i {
    animation-delay: 0.5s;
}

.feature-item:nth-child(3) i {
    animation-delay: 1s;
}

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

.feature-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.feature-item p {
    font-size: 13px;
    opacity: 0.95;
    margin-bottom: 0;
}

/* Right Side - Login Form */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-primary);
}

.login-form-wrapper {
    width: 100%;
    max-width: 440px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

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

/* Form Styles */
.site-login {
    margin-bottom: 30px;
}

.site-login h1 {
    display: none;
}

.site-login > p:first-of-type {
    display: none;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control.is-invalid {
    border-color: #ef4444;
}

.invalid-feedback {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

.help-block {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
}

/* Checkbox */
.custom-control {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.custom-control input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.custom-control label {
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}

/* Submit Button */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

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

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

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

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Additional Info */
.site-login > div[style*="color:#999"] {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.site-login > div[style*="color:#999"] {
    color: var(--text-secondary) !important;
    font-size: 13px;
    line-height: 1.6;
}

.site-login code {
    background: #e0e7ff;
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-left {
        display: none;
    }
    
    .login-right {
        flex: 1;
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .login-right {
        padding: 30px 20px;
    }
    
    .login-form-wrapper {
        max-width: 100%;
    }
    
    .login-header h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .login-header h2 {
        font-size: 24px;
    }
    
    .login-header {
        margin-bottom: 30px;
    }
}

/* Loading State */
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

