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

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-active: #1e40af;
    --primary-500: #3b82f6;
    --primary-700: #1d4ed8;
    --text-900: #0f172a;
    --text-700: #334155;
    --text-500: #64748b;
    --text-400: #94a3b8;
    --text-primary: #0f172a;
    --border-light: #e2e8f0;
    --border-default: #e2e8f0;
    --border-medium: #cbd5e1;
    --success: #16a34a;
    --success-border: #bbf7d0;
    --error: #dc2626;
    --error-border: #fecaca;
    --primary-border: #bfdbfe;
    --radius-md: 8px;
    --radius-xl: 16px;
    --font-size-sm: 14px;
    --font-size-base: 15px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0ff 35%, #f0f5ff 70%, #eef2ff 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

.circle-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 65%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
    animation-duration: 10s;
}

.circle-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 65%);
    bottom: -150px;
    left: -150px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circle-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.3) 0%, transparent 65%);
    top: 45%;
    left: 5%;
    animation-delay: 4s;
    animation-duration: 15s;
}

.circle-4 {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.2) 0%, transparent 65%);
    top: 15%;
    right: 15%;
    border-radius: 50%;
    animation: float 9s ease-in-out infinite;
    animation-delay: 1s;
}

.circle-5 {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(191, 219, 254, 0.4) 0%, transparent 65%);
    bottom: 25%;
    right: 8%;
    border-radius: 50%;
    animation: float 11s ease-in-out infinite;
    animation-delay: 3s;
}

.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

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

.login-card {
    position: relative;
    z-index: 10;
    background: white;
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.15);
    border: 1px solid var(--border-light);
    animation: cardIn 0.5s ease;
}

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

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

.logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 20px -5px rgba(59, 130, 246, 0.35);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 18px;
}

.login-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-900);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-500);
    font-weight: 400;
}

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

.form-group label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-700);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: inherit;
    transition: all var(--transition-fast);
    background: white;
    color: var(--text-primary);
}

.form-group input:hover {
    border-color: var(--border-medium);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder {
    color: var(--text-400);
}

.form-group:last-of-type {
    position: relative;
}

.show-password {
    position: absolute;
    right: 12px;
    top: calc(50% + 10px);
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.show-password:hover { opacity: 0.8; }
.show-password.active { opacity: 1; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    height: 46px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    justify-content: center;
    width: 100%;
    border-radius: 10px;
    letter-spacing: 2px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

.btn-text { 
    display: inline !important; 
    color: white !important;
}
.btn-loading { display: none; }

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-10px);
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2100;
    min-width: 200px;
    text-align: center;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.toast.success {
    color: #16a34a !important;
}

.toast.error {
    color: #dc2626 !important;
}

.toast.info {
    color: #2563eb !important;
}

@media (max-width: 480px) {
    .login-card {
        padding: 36px 24px;
        margin: 16px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
}
