﻿@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ripple-animation {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

.custom-toast {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.toast-title {
    font-weight: 500 !important;
    font-size: 14px !important;
}

/* Additional responsive improvements */
@media (max-width: 480px) {
    .brand-title {
        font-size: 24px !important;
    }

    .form-title {
        font-size: 24px !important;
    }

    .login-wrapper {
        margin: 10px;
        border-radius: 16px;
    }

    .brand-section,
    .form-section {
        padding: 20px !important;
    }

    .features-grid {
        gap: 12px;
    }

    .feature-item {
        padding: 12px;
    }

    .stats-section {
        gap: 20px;
    }

    .stat-number {
        font-size: 24px;
    }

    .welcome-badge {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Enhanced hover effects */
.feature-item:hover .feature-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.stat-item:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* Loading states */
.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

    .login-btn:disabled:hover {
        box-shadow: var(--shadow) !important;
    }

/* Accessibility improvements */
.form-input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.login-btn:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .brand-section {
        background: #000066;
    }

    .form-input {
        border-width: 3px;
    }

    .login-btn {
        background: #000066;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-shapes,
    .grid-pattern,
    .floating-elements {
        animation: none !important;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #1e293b;
        --gray-100: #334155;
        --gray-200: #475569;
    }
}

/* Print styles */
@media print {
    .background-animation,
    .floating-elements,
    .brand-section::before,
    .brand-section::after {
        display: none !important;
    }

    .login-wrapper {
        box-shadow: none !important;
        border: 1px solid #000;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --light: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 75%, #64748b 100%);
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    top: 10%;
    left: 10%;
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation-delay: 0s;
}

.shape-2 {
    top: 20%;
    right: 15%;
    width: 80px;
    height: 80px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    animation-delay: 2s;
}

.shape-3 {
    bottom: 20%;
    left: 20%;
    width: 100px;
    height: 100px;
    background: var(--secondary);
    border-radius: 20px;
    transform: rotate(45deg);
    animation-delay: 4s;
}

.shape-4 {
    bottom: 30%;
    right: 10%;
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: 50% 0 50% 0;
    animation-delay: 6s;
}

.shape-5 {
    top: 60%;
    left: 50%;
    width: 90px;
    height: 90px;
    background: var(--success);
    border-radius: 30px;
    animation-delay: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
    }

    25% {
        transform: translateY(-20px) translateX(10px) rotate(5deg) scale(1.1);
    }

    50% {
        transform: translateY(-10px) translateX(-10px) rotate(-5deg) scale(0.9);
    }

    75% {
        transform: translateY(-30px) translateX(15px) rotate(10deg) scale(1.05);
    }
}

/* Grid Pattern */
.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 30s linear infinite;
}

@keyframes grid-move {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Main Container */
.main-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    min-height: 580px;
}

    .login-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--gradient-primary);
    }

/* Brand Side */
.brand-section {
    background: var(--gradient-primary);
    padding: 40px 35px;
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .brand-section::before {
        content: '';
        position: absolute;
        top: -40%;
        right: -25%;
        width: 150px;
        height: 150px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 50%;
        animation: pulse 4s ease-in-out infinite;
    }

    .brand-section::after {
        content: '';
        position: absolute;
        bottom: -25%;
        left: -15%;
        width: 120px;
        height: 120px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        animation: pulse 6s ease-in-out infinite reverse;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.1;
    }
}

.brand-content {
    position: relative;
    z-index: 2;
}

.gov-logo {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.logo-emblem {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

    .logo-emblem i {
        font-size: 24px;
        color: white;
    }

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.brand-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 15px;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 25px;
    font-weight: 400;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 25px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

    .feature-item:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateX(5px);
    }

.feature-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .feature-icon i {
        font-size: 10px;
        color: white;
    }

.feature-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.stats-section {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 22px;
    font-weight: 800;
    display: block;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 500;
}

/* Form Section */
.form-section {
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: white;
}

.form-container {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 64, 175, 0.1);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(30, 64, 175, 0.2);
}

    .welcome-badge i {
        font-size: 10px;
    }

.form-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.2;
}

.form-description {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.4;
}

/* Alert Messages */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: none;
    animation: slideInDown 0.3s ease;
    border: 1px solid;
}

    .alert.error {
        background: rgba(239, 68, 68, 0.1);
        border-color: rgba(239, 68, 68, 0.2);
        color: #dc2626;
    }

    .alert.success {
        background: rgba(16, 185, 129, 0.1);
        border-color: rgba(16, 185, 129, 0.2);
        color: #059669;
    }

    .alert i {
        margin-right: 8px;
    }

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
    font-size: 13px;
}

.input-container {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 18px 14px 42px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--gray-50);
    color: var(--gray-900);
}

    .form-input:focus {
        outline: none;
        border-color: var(--primary);
        background: white;
        box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    }

    .form-input::placeholder {
        color: var(--gray-400);
        font-size: 13px;
    }

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-input:focus + .input-icon {
    color: var(--primary);
}

.validation-error {
    color: var(--error);
    font-size: 11px;
    margin-top: 3px;
    display: block;
}

.forgot-password {
    text-align: right;
    margin-bottom: 24px;
}

    .forgot-password a {
        color: var(--primary);
        text-decoration: none;
        font-size: 12px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

        .forgot-password a:hover {
            color: var(--primary-dark);
            text-decoration: underline;
        }

/* Button Styles */
.login-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

    .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.5s ease;
    }

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

        .login-btn:hover::before {
            left: 100%;
        }

    .login-btn:active {
        transform: translateY(0);
    }

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

/* Loading Animation */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

    .loading-overlay.active {
        display: flex;
    }

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(30, 64, 175, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Security Badge */
.security-info {
    margin-top: 25px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

.security-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

    .security-header i {
        color: var(--success);
        font-size: 16px;
    }

.security-title {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 13px;
}

.security-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 11px;
    color: var(--gray-600);
}

.security-feature {
    display: flex;
    align-items: center;
    gap: 4px;
}

    .security-feature i {
        color: var(--success);
        font-size: 8px;
    }

/* Responsive Design */
@media (max-width: 1024px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        max-width: 420px;
        min-height: auto;
    }

    .brand-section {
        order: 2;
        padding: 30px 25px;
        text-align: center;
    }

    .brand-title {
        font-size: 28px;
    }

    .brand-subtitle {
        font-size: 14px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .feature-item {
        padding: 10px 12px;
    }

    .feature-text {
        font-size: 12px;
    }

    .stats-section {
        justify-content: space-around;
    }

    .stat-number {
        font-size: 20px;
    }

    .form-section {
        order: 1;
        padding: 30px 25px;
    }
}

@media (max-width: 640px) {
    .main-container {
        padding: 15px;
    }

    .login-wrapper {
        max-width: 100%;
        border-radius: 16px;
    }

    .brand-section,
    .form-section {
        padding: 25px 20px;
    }

    .brand-title {
        font-size: 24px;
    }

    .form-title {
        font-size: 22px;
    }

    .form-input {
        padding: 12px 16px 12px 38px;
        font-size: 13px;
    }

    .input-icon {
        left: 12px;
        font-size: 14px;
    }

    .security-features {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Additional Enhancements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(30, 64, 175, 0.3);
    border-radius: 50%;
    animation: floatDot 8s infinite ease-in-out;
}

    .floating-dot:nth-child(1) {
        top: 20%;
        left: 10%;
        animation-delay: 0s;
    }

    .floating-dot:nth-child(2) {
        top: 60%;
        left: 80%;
        animation-delay: 2s;
    }

    .floating-dot:nth-child(3) {
        top: 80%;
        left: 30%;
        animation-delay: 4s;
    }

    .floating-dot:nth-child(4) {
        top: 40%;
        left: 70%;
        animation-delay: 6s;
    }

@keyframes floatDot {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-50px) scale(1.5);
        opacity: 0.8;
    }
}