*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #0d0f1a;
    --bg2:       #12152a;
    --surface:   #1a1e35;
    --surface2:  #212645;
    --border:    rgba(255,255,255,0.07);
    --border2:   rgba(255,255,255,0.14);
    --accent:    #e8a230;
    --accent2:   #f0c060;
    --text:      #e8e8f0;
    --muted:     #7a7d9a;
    --danger:    #e05555;
    --success:   #3db87a;
    --radius:    14px;
}

html, body {
    height: 100%;
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #b6f3c9 0%, #4766f4 100%);
    background-attachment: fixed;
    color: var(--text);
    overflow: hidden;
}

/* Animated background grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 48px 48px;
    animation: gridShift 20s linear infinite;
    pointer-events: none;
}

@keyframes gridShift {
    from { transform: translateY(0); }
    to   { transform: translateY(48px); }
}

/* Ambient blobs */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.18;
}

.blob-1 { width: 500px; height: 500px; background: #b6f3c9; top: -150px; right: -100px; animation: float1 12s ease-in-out infinite; }
.blob-2 { width: 400px; height: 400px; background: #4766f4; bottom: -100px; left: -80px; animation: float2 15s ease-in-out infinite; }

@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px, 40px) scale(1.05); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px, -30px) scale(1.08); } }

/* Layout */
.page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 48px;
    background: rgba(245,239,255,0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(71,102,244,0.2), 0 4px 16px rgba(0,0,0,0.08);
    animation: cardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo / Header */
.logo-area {
    text-align: center;
    margin-bottom: 36px;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, var(--accent), #c87820);
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(232,162,48,0.3);
}

.logo-icon svg { width: 28px; height: 28px; fill: #0d0f1a; }

.logo-image { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }

.logo-title {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a2d4a;
    letter-spacing: -0.3px;
}

.logo-sub {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 400;
}

/* Divider */
.divider {
    height: 1px;
    background: rgba(71,102,244,0.15);
    margin: 0 0 28px;
}

/* Form */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #4b5563;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(71,102,244,0.2);
    border-radius: 10px;
    color: #1a2d4a;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-control::placeholder { color: #9ca3af; font-weight: 400; }

.form-control:focus {
    border-color: #4766f4;
    box-shadow: 0 0 0 3px rgba(71,102,244,0.12);
    background: white;
}

.form-control.input-error {
    border-color: var(--danger);
}

/* Error message */
.error-msg {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(224,85,85,0.1);
    border: 1px solid rgba(224,85,85,0.25);
    border-radius: 8px;
    color: #ff8080;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
    animation: shakeIn 0.3s ease;
}

.error-msg.visible { display: flex; }

@keyframes shakeIn {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Submit button */
.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #b6f3c9 0%, #4766f4 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 6px 20px rgba(71,102,244,0.3);
    margin-top: 8px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(71,102,244,0.4);
    opacity: 0.88;
}

.btn-login:active {
    transform: translateY(0) scale(0.98);
}

.btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    pointer-events: none;
}

/* Loading spinner on button */
.btn-login .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(13,15,26,0.3);
    border-top-color: #0d0f1a;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn-login.loading .btn-text { display: none; }
.btn-login.loading .spinner { display: block; }

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--muted);
}

/* Validation */
.asp-validation-summary-errors { display: none; }

@media (max-width: 480px) {
    .login-card { padding: 32px 24px; border-radius: 16px; }
}
