:root {
    --primary-blue: #0f172a;
    --accent-indigo: #6366f1;
    --accent-violet: #8b5cf6;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    /* Premium Mesh Gradient */
    background: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0, transparent 50%),
                radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0, transparent 50%),
                radial-gradient(at 100% 100%, rgba(244, 114, 182, 0.1) 0, transparent 50%),
                radial-gradient(at 0% 100%, rgba(56, 189, 248, 0.1) 0, transparent 50%),
                #f8fafc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 440px;
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.portal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-indigo) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    transition: filter 0.3s ease;
}

.brand-name:hover {
    filter: brightness(1.2);
}

.portal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.portal-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 1.5px solid rgba(203, 213, 225, 0.5);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    color: var(--text-main);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-indigo);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--accent-indigo);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.5rem;
    letter-spacing: 0.05em;
}

.form-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
}

.forgot-password {
    color: var(--accent-indigo);
    text-decoration: none;
    font-weight: 700;
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-indigo) 100%);
    color: white;
    padding: 1.125rem;
    border: none;
    border-radius: 1.25rem;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.2);
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.3);
    filter: brightness(1.1);
}

.portal-footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.7;
}

#error-msg {
    background: #fef2f2;
    color: #dc2626;
    padding: 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    display: none;
    border: 1px solid #fee2e2;
    font-weight: 600;
    text-align: center;
}

.identifying-access {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    animation: pulse-access 1.5s infinite ease-in-out;
    pointer-events: none;
}

@keyframes pulse-access {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.97); opacity: 0.9; }
}