:root {
    /* Brand Colors */
  --primary-green: #09026c;
  --secondary-green: #0d00c2;
  --other-secondary-green: #1302ff;
  --accent-green: #4c43d0;
  --dark-forest: #030028;
  --sage-gray: #deddea;
  --natural-white: #FAFAFA;
  --earth-brown: #5D4037;
  --golden-yellow: #FFC107;
  --wheat-gold: #FFD54F;
  --sky-blue: #2196F3;
  --water-blue: #03A9F4;
  --success-green: #38ad46;
  --error-red: #ff0000;
  --warning-orange: #ff9800;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--sage-gray) 0%, var(--natural-white) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Main Container */
.login-container {
    min-height: 100vh;
    display: flex;
    background: var(--natural-white);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

/* Left Side - Image/Illustration */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-forest) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* Background Image Container */
.login-background-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 1;
    transition: all 0.3s ease;
    filter: blur(0.5px) brightness(1.1);
}

/* Patterns décoratifs en overlay */
.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="agricultural-bg" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="2" fill="%23FFFFFF" opacity="0.08"/><circle cx="25" cy="25" r="1" fill="%23FFC107" opacity="0.06"/><circle cx="75" cy="75" r="1.5" fill="%234CAF50" opacity="0.04"/><path d="M20 20 L80 20 M20 40 L80 40 M20 60 L80 60 M20 80 L80 80" stroke="%23FFFFFF" stroke-width="0.5" opacity="0.03"/></pattern></defs><rect width="1000" height="1000" fill="url(%23agricultural-bg)"/></svg>');
    opacity: 0.4;
    z-index: 2;
    animation: subtleMove 25s ease-in-out infinite;
}

/* Overlay graduel */
.login-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(46, 66, 125, 0.4) 0%,
            rgba(9, 26, 79, 0.3) 30%,
            rgba(46, 66, 125, 0.2) 70%,
            rgba(9, 26, 79, 0.5) 100%);
    z-index: 2;
}

@keyframes subtleMove {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    25%       { transform: translate(-5px, -10px) scale(1.01); opacity: 0.3; }
    50%       { transform: translate(10px, -5px) scale(0.99); opacity: 0.5; }
    75%       { transform: translate(-3px, 8px) scale(1.005); opacity: 0.35; }
}

/* Illustration Container */
.login-illustration {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 500px;
    padding: 40px;
    backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Brand Logo */
.login-illustration .brand-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.login-illustration .brand-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.login-illustration .brand-logo:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.login-illustration .brand-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.login-illustration .brand-logo:hover img {
    transform: scale(1.1) rotate(5deg);
}

/* Main Title */
.login-illustration h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ffffff, var(--golden-yellow), #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    letter-spacing: 2px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

/* Description Text */
.login-illustration p {
    font-size: 1.2rem;
    opacity: 0.95;
    line-height: 1.7;
    margin-bottom: 30px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 300;
}

/* Features List */
.features-list {
    list-style: none;
    text-align: left;
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.features-list li {
    padding: 12px 0;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    opacity: 0.95;
    transition: all 0.3s ease;
    position: relative;
}

.features-list li::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--golden-yellow);
    transition: height 0.3s ease;
}

.features-list li:hover { opacity: 1; transform: translateX(10px); }
.features-list li:hover::before { height: 100%; }

.features-list li i {
    margin-right: 15px;
    color: var(--golden-yellow);
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.features-list li:hover i { transform: scale(1.2) rotate(360deg); }

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

.login-right::before {
    content: '';
    position: absolute;
    top: 0; right: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(46, 66, 125, 0.02) 100%);
    z-index: 1;
}

/* Form Container */
.login-form-container {
    width: 100%;
    max-width: 450px;
    padding: 30px 20px;
    background: white;
    border-radius: 25px;
    box-shadow:
        0 25px 80px rgba(46, 66, 125, 0.15),
        0 0 0 1px rgba(46, 66, 125, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 2;
    transition: all 0.3s ease;
}

.login-form-container:hover {
    transform: translateY(-5px);
    box-shadow:
        0 35px 100px rgba(46, 66, 125, 0.2),
        0 0 0 1px rgba(46, 66, 125, 0.15);
}

.login-form-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg,
        var(--primary-green) 0%,
        var(--golden-yellow) 30%,
        var(--secondary-green) 70%,
        var(--primary-green) 100%);
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 20px;
}

.form-header h2 {
    color: var(--primary-green);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.form-header h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--golden-yellow), var(--secondary-green));
    border-radius: 2px;
}

.form-header p {
    color: var(--earth-brown);
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 300;
}

/* Alert Container */
#alertContainer {
    margin-bottom: 25px;
    animation: slideDown 0.3s ease;
}

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

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.alert-success {
    background: linear-gradient(135deg, rgba(56, 173, 70, 0.1), rgba(56, 173, 70, 0.05));
    color: var(--success-green);
    border-left: 4px solid var(--success-green);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(244, 67, 54, 0.05));
    color: var(--error-red);
    border-left: 4px solid var(--error-red);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 152, 0, 0.05));
    color: var(--warning-orange);
    border-left: 4px solid var(--warning-orange);
}

/* Form Styles */
.form-group {
    margin-bottom: 30px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-green);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.input-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.form-control {
    width: 100%;
    padding: 18px 55px 18px 18px;
    border: 2px solid var(--accent-green);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--natural-white);
    color: var(--dark-forest);
    font-weight: 400;
}

.form-control::placeholder {
    color: rgba(93, 64, 55, 0.6);
    font-weight: 300;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow:
        0 0 0 4px rgba(46, 66, 125, 0.1),
        0 8px 25px rgba(46, 66, 125, 0.15);
    background: white;
    transform: translateY(-2px);
}

.form-control:focus + .input-icon {
    color: var(--primary-green);
    transform: translateY(-50%) scale(1.1);
}

/* Input Icons */
.input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--earth-brown);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    z-index: 2;
}

/* Password Toggle */
.password-toggle {
    cursor: pointer;
    user-select: none;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.password-toggle:hover  { transform: translateY(-50%) scale(1.2); }
.password-toggle:active { transform: translateY(-50%) scale(0.9); }

/* Checkbox Styles */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 35px;
    cursor: pointer;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: var(--primary-green);
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-check-input:checked { transform: scale(1.1); }

.form-check-label {
    color: var(--earth-brown);
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 400;
    transition: color 0.3s ease;
    user-select: none;
}

.form-check:hover .form-check-label { color: var(--primary-green); }

/* Submit Button */
.btn-login {
    width: 100%;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login::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.6s ease;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow:
        0 15px 35px rgba(46, 66, 125, 0.4),
        0 5px 15px rgba(46, 66, 125, 0.2);
    background: linear-gradient(135deg, var(--dark-forest) 0%, var(--primary-green) 100%);
}

.btn-login:hover::before { left: 100%; }
.btn-login:active        { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(46, 66, 125, 0.3); }
.btn-login:disabled      { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Ripple on active */
.btn-login::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:active::after { width: 300px; height: 300px; }

/* Validation States */
.form-control.error {
    border-color: var(--error-red);
    background-color: rgba(244, 67, 54, 0.05);
    animation: shake 0.5s ease-in-out;
}

.form-control.success {
    border-color: var(--success-green);
    background-color: rgba(76, 175, 80, 0.05);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-5px); }
    75%       { transform: translateX(5px); }
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--error-red);
    font-weight: 500;
    padding-left: 5px;
}

.invalid-feedback.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(46, 66, 125, 0.1);
    color: var(--earth-brown);
    font-size: 0.9rem;
    line-height: 1.6;
}

.login-footer p { margin-bottom: 5px; opacity: 0.8; }

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    25%       { transform: translateY(-15px) translateX(8px); }
    50%       { transform: translateY(-25px) translateX(0px); }
    75%       { transform: translateY(-15px) translateX(-8px); }
}

.floating-element { animation: float 8s ease-in-out infinite; }

/* Slide In Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}

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

.slide-in-right { animation: slideInRight 0.6s ease forwards; }
.slide-in-up    { animation: slideInUp 0.6s ease forwards; }

.login-form-container { animation: slideInRight 0.8s ease; }
.login-illustration   { animation: slideInLeft 0.8s ease; }

/* Stagger for form elements */
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-check              { animation-delay: 0.4s; }
.btn-login               { animation-delay: 0.5s; }

@media (prefers-reduced-motion: no-preference) {
    .form-group { animation: slideInUp 0.6s ease both; }
}

/* Hover Effects */
.login-left:hover .login-background-image {
    opacity: 0.25;
    transform: scale(1.02);
    filter: blur(0.3px) brightness(1.2);
}

.login-left:hover .floating-element { animation-duration: 6s; }

/* Input wrapper underline animation */
.input-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.input-wrapper:focus-within::after { width: 100%; }

/* Particle Animation */
.login-left .particles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

.login-left .particles::before,
.login-left .particles::after {
    content: '';
    position: absolute;
    width: 4px; height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: floatParticles 15s linear infinite;
}

.login-left .particles::before { top: 20%; left: 20%; animation-delay: 0s; }
.login-left .particles::after  { top: 60%; right: 30%; animation-delay: 7s; }

@keyframes floatParticles {
    0%   { transform: translateY(100vh) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* Professional Login Page (full-page mode) */
.login-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-main .login-container {
    width: 100%;
    max-width: none;
    height: 100vh;
    box-shadow: none;
    border-radius: 0;
}

.login-main .login-left  { flex: 1.2; }

.login-main .login-right {
    flex: 0.8;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-main .login-form-container { max-width: 450px; margin: 0; }

.login-main .features-list li { font-size: 1rem; padding: 8px 0; }

.login-main .brand-logo img   { width: 100px; height: 100px; }

.login-main .typing-text {
    font-size: clamp(1.85rem, 4vw, 2.8rem);
    margin-bottom: 20px;
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
    line-height: 1.3;
    display: block;
}

.login-main .form-header h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 15px; }
.login-main .form-header p  { font-size: 1.1rem; margin-bottom: 25px; }

.login-main .btn-login { padding: 18px 24px; font-size: 1.1rem; font-weight: 600; margin-top: 20px; }

body:has(.login-main) { margin: 0; padding: 0; }

/* ── Accessibility ────────────────────────────────────────────────────────── */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.form-control:focus,
.btn-login:focus,
.form-check-input:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 8px; }
::-webkit-scrollbar-track { background: var(--sage-gray); }
::-webkit-scrollbar-thumb { background: var(--accent-green); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-green); }

::selection      { background: var(--accent-green); color: white; }
::-moz-selection { background: var(--accent-green); color: white; }

/* ── Preloader ─────────────────────────────────────────────────────────────── */
.preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(9, 2, 108, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: all 0.6s ease-in-out;
    opacity: 1;
    visibility: visible;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 2;
}

.preloader-spinner {
    position: relative;
    width: 80px; height: 80px;
    margin: 0 auto 20px auto;
}

.spinner-ring {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid var(--golden-yellow);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 90%; height: 90%; top: 5%; left: 5%;
    border-top-color: rgba(255, 255, 255, 0.8);
    animation-delay: -0.5s;
    animation-duration: 2s;
}

.spinner-ring:nth-child(3) {
    width: 80%; height: 80%; top: 10%; left: 10%;
    border-top-color: var(--secondary-green);
    animation-delay: -1s;
    animation-duration: 2.5s;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preloader-text {
    margin: 25px 0;
    animation: textPulse 2s ease-in-out infinite;
}

.preloader-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ffffff, var(--golden-yellow), #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

.preloader-text p { font-size: 1rem; opacity: 0.9; margin: 0; }

.preloader-progress {
    width: 200px; height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 20px auto 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--golden-yellow), var(--secondary-green), var(--golden-yellow));
    background-size: 200% 100%;
    border-radius: 2px;
    animation: progressLoad 3s ease-in-out, gradientMove 2s linear infinite;
    transform-origin: left;
}

@keyframes textPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.8; transform: scale(1.02); }
}

@keyframes progressLoad {
    0%   { width: 0%; }
    70%  { width: 85%; }
    100% { width: 100%; }
}

@keyframes gradientMove {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@supports not (backdrop-filter: blur(15px)) {
    .preloader {
        background: linear-gradient(135deg, rgba(9, 2, 108, 0.7) 0%, rgba(3, 0, 40, 0.7) 100%);
    }
}

/* ── Mobile Header (tablet / phone) ──────────────────────────────────────── */
.login-mobile-header {
    display: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-forest) 100%);
    padding: 48px 24px 72px;
    text-align: center;
}

.login-mobile-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    z-index: 0;
}

.login-mobile-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.06) 0%, rgba(76, 67, 208, 0.12) 100%);
    z-index: 1;
    pointer-events: none;
}

.login-mobile-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.login-mobile-logo {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid var(--golden-yellow);
    box-shadow:
        0 0 0 5px rgba(255, 193, 7, 0.18),
        0 12px 36px rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.login-mobile-logo img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 10px;
}

.login-mobile-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.login-mobile-brand h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.login-mobile-brand span {
    font-size: 0.78rem;
    color: var(--golden-yellow);
    font-style: italic;
    margin: 0;
    opacity: 0.9;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

/* Petits écrans d'ordinateur */
@media (max-width: 1366px) {
    .login-main .login-left { flex: 1; }
    .login-illustration { max-width: 440px; padding: 32px 28px; }
    .login-main .typing-text { font-size: 2.2rem; letter-spacing: 1px; margin-bottom: 16px; }
    .login-illustration .brand-logo { width: 104px; height: 104px; margin-bottom: 22px; }
    .login-main .brand-logo img { width: 78px; height: 78px; }
    .login-illustration p { font-size: 1.05rem; margin-bottom: 24px; }
    .features-list { margin-top: 28px; padding: 16px; }
    .login-main .features-list li { font-size: 0.95rem; }
    .login-main .login-right { padding: 32px 24px; }
}

@media (max-width: 1200px) {
    .login-illustration { max-width: 400px; padding: 28px 22px; }
    .login-main .typing-text { font-size: 1.85rem; letter-spacing: 0.5px; }
    .login-illustration .brand-logo { width: 92px; height: 92px; margin-bottom: 18px; }
    .login-main .brand-logo img { width: 68px; height: 68px; }
    .login-illustration p { font-size: 0.98rem; margin-bottom: 20px; }
    .login-main .features-list li { font-size: 0.9rem; padding: 6px 0; }
    .features-list li i { font-size: 1.1rem; margin-right: 12px; }
    .login-main .login-form-container { max-width: 420px; }
    .login-main .form-header h2 { font-size: 2.1rem; }
}

/* Desktop et laptop courts : garder le logo visible et compacter le contenu */
@media (min-width: 1025px) and (max-height: 760px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    .login-main,
    .login-main .login-container {
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    .login-left,
    .login-main .login-right {
        min-height: 100vh;
    }

    .login-illustration {
        max-width: min(440px, calc(100% - 48px));
        padding: 20px 24px;
        transform: none;
    }

    .floating-element {
        animation: none;
    }

    .login-illustration .brand-logo {
        width: 82px;
        height: 82px;
        margin-bottom: 14px;
    }

    .login-main .brand-logo img {
        width: 62px;
        height: 62px;
    }

    .login-main .typing-text {
        font-size: clamp(1.65rem, 3.2vw, 2.25rem);
        line-height: 1.22;
        margin-bottom: 12px;
        letter-spacing: 0.5px;
    }

    .login-illustration p {
        font-size: 0.95rem;
        line-height: 1.45;
        margin-bottom: 14px;
    }

    .features-list {
        margin-top: 14px;
        padding: 14px 16px;
        border-radius: 12px;
    }

    .login-main .features-list li {
        font-size: 0.88rem;
        line-height: 1.35;
        padding: 5px 0;
    }

    .features-list li i {
        font-size: 1rem;
        margin-right: 10px;
        flex: 0 0 auto;
    }

    .login-main .login-right {
        padding: 12px 24px;
        align-items: center;
        overflow: hidden;
    }

    .login-main .login-form-container {
        max-width: 390px;
        max-height: calc(100vh - 24px);
        padding: 18px 18px 16px;
        overflow: hidden;
        border-radius: 18px;
    }

    .login-main .form-header h2 {
        font-size: 1.75rem;
        margin-bottom: 8px;
    }

    .login-main .form-header p {
        font-size: 0.88rem;
        margin-bottom: 10px;
        line-height: 1.35;
    }

    .form-header {
        margin-bottom: 12px;
    }

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

    .form-group label {
        margin-bottom: 5px;
        font-size: 0.88rem;
    }

    .form-control {
        padding-top: 11px;
        padding-bottom: 11px;
        font-size: 0.92rem;
        border-radius: 10px;
    }

    .input-wrapper {
        border-radius: 10px;
    }

    .input-icon {
        font-size: 1.1rem;
    }

    .form-check {
        margin-bottom: 14px;
    }

    .form-check-input {
        width: 18px;
        height: 18px;
    }

    .form-check-label {
        font-size: 0.88rem;
    }

    .login-main .btn-login {
        margin-top: 4px;
        padding: 12px 18px;
        font-size: 0.92rem;
        border-radius: 10px;
    }

    .login-footer {
        margin-top: 10px;
        padding-top: 10px;
        font-size: 0.74rem;
        line-height: 1.35;
    }

    .login-footer p {
        margin-bottom: 2px;
    }
}

@media (min-width: 1025px) and (max-height: 620px) {
    .login-illustration {
        padding: 16px 20px;
    }

    .login-illustration .brand-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 10px;
    }

    .login-main .brand-logo img {
        width: 52px;
        height: 52px;
    }

    .login-main .typing-text {
        font-size: clamp(1.45rem, 2.8vw, 2rem);
        margin-bottom: 8px;
    }

    .login-illustration p {
        margin-bottom: 10px;
    }

    .features-list {
        margin-top: 10px;
        padding: 10px 14px;
    }

    .login-main .features-list li {
        font-size: 0.82rem;
        padding: 4px 0;
    }

    .login-main .login-form-container {
        max-width: 360px;
        max-height: calc(100vh - 16px);
        padding: 14px 16px 12px;
    }

    .form-header {
        margin-bottom: 8px;
    }

    .login-main .form-header h2 {
        font-size: 1.48rem;
        margin-bottom: 6px;
    }

    .login-main .form-header h2::after {
        width: 46px;
        height: 2px;
        bottom: -3px;
    }

    .login-main .form-header p {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

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

    .form-group label {
        margin-bottom: 3px;
        font-size: 0.8rem;
    }

    .form-control {
        padding: 8px 42px 8px 11px;
        font-size: 0.84rem;
    }

    .input-icon {
        right: 13px;
        font-size: 1rem;
    }

    .form-check {
        margin-bottom: 10px;
    }

    .form-check-input {
        width: 16px;
        height: 16px;
        margin-right: 9px;
    }

    .form-check-label {
        font-size: 0.8rem;
    }

    .login-main .btn-login {
        padding: 9px 14px;
        font-size: 0.82rem;
        gap: 8px;
    }

    .login-footer {
        margin-top: 8px;
        padding-top: 8px;
        font-size: 0.68rem;
    }
}

@media (max-width: 1024px) {
    .login-mobile-header { display: block; }

    .login-main .login-left  { display: none; }

    .login-main .login-right {
        flex: 1; width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        min-height: 100vh;
        padding: 0;
        overflow-y: auto;
    }

    .login-main .login-container {
        background: #f0f2f8;
        height: auto;
        min-height: 100vh;
    }

    .login-main .login-form-container {
        flex: 1;
        max-width: 100%; width: 100%;
        margin: -32px 0 0 0;
        border-radius: 28px 28px 0 0;
        padding: 36px 32px 48px;
        background: #ffffff;
        box-shadow: 0 -6px 32px rgba(9, 2, 108, 0.14);
        backdrop-filter: none;
        border: none;
    }
}

/* Tablette : en-tête horizontal (logo + nom côte à côte) et formulaire en carte centrée */
@media (min-width: 769px) and (max-width: 1024px) {
    .login-mobile-header { padding: 56px 48px 96px; }

    .login-mobile-header-content {
        flex-direction: row;
        justify-content: center;
        gap: 28px;
    }

    .login-mobile-logo { width: 112px; height: 112px; margin-bottom: 0; }

    .login-mobile-brand {
        align-items: flex-start;
        text-align: left;
        max-width: 520px;
    }
    .login-mobile-brand h1   { font-size: 1.8rem; }
    .login-mobile-brand span { font-size: 0.95rem; }

    .login-main .login-form-container {
        flex: 0 0 auto;
        width: calc(100% - 64px);
        max-width: 560px;
        margin: -44px auto 48px;
        border-radius: 24px;
        padding: 40px 44px 44px;
        box-shadow: 0 18px 48px rgba(9, 2, 108, 0.16);
    }
}

@media (max-width: 768px) {
    .login-mobile-header { padding: 40px 20px 64px; }
    .login-mobile-brand h1 { font-size: 1.25rem; }

    .login-main .login-right { padding: 0; }
    .login-main .login-form-container { padding: 32px 24px 40px; border-radius: 24px 24px 0 0; }
    .login-main .form-header h2 { font-size: 1.75rem; }
    .login-main .form-header p  { font-size: 0.95rem; }
    .form-control { padding: 15px 50px 15px 15px; font-size: 0.95rem; }
    .btn-login    { padding: 15px 20px; font-size: 1rem; }
}

@media (max-width: 480px) {
    .login-mobile-header { padding: 32px 16px 56px; }
    .login-mobile-logo   { width: 76px; height: 76px; margin-bottom: 16px; }
    .login-mobile-brand h1 { font-size: 1.1rem; }

    .login-main .login-form-container { padding: 28px 20px 36px; margin-top: -28px; border-radius: 20px 20px 0 0; }
    .login-main .form-header h2 { font-size: 1.5rem; }
    .form-control { padding: 12px 45px 12px 12px; font-size: 0.9rem; }
    .btn-login    { padding: 12px 15px; font-size: 0.95rem; }
    .input-icon   { right: 15px; font-size: 1.1rem; }
}

@media (max-width: 360px) {
    .login-mobile-logo   { width: 64px; height: 64px; }
    .login-mobile-brand h1 { font-size: 1rem; }
    .login-main .login-form-container { padding: 24px 16px 32px; }
}

@media (prefers-reduced-motion: no-preference) {
    .login-container { animation: containerFadeIn 1s ease; }
}

@keyframes containerFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

@media (prefers-contrast: high) {
    .form-control { border-width: 3px; }
    .btn-login    { border: 2px solid var(--primary-green); }
}

@media print { .login-container { display: none; } }

@media (max-width: 768px) {
    .preloader-text h3    { font-size: 1.4rem; }
    .preloader-text p     { font-size: 0.9rem; }
    .preloader-spinner    { width: 60px; height: 60px; }
    .preloader-progress   { width: 150px; }
}

/* ========================================================================== 
   PROFESSIONAL LOGIN REFRESH — SCHOOL-PLAT
   ========================================================================== */

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: #1e293b;
    background: #f4f6fb;
    overflow-x: hidden;
}

.login-main,
.login-main .login-container {
    min-height: 100vh;
    height: auto;
}

.login-main .login-container {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(460px, .92fr);
    background: #f7f8fc;
}

.login-main .login-left {
    min-height: 100vh;
    display: flex;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(145deg, #030028 0%, #09026c 56%, #1606ad 100%);
}

.login-background-image {
    opacity: .12;
    filter: grayscale(.25) contrast(1.08);
    transform: scale(1.02);
}

.login-left::before {
    z-index: 1;
    opacity: 1;
    animation: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(145deg, #000, transparent 72%);
    mask-image: linear-gradient(145deg, #000, transparent 72%);
}

.login-left::after {
    z-index: 2;
    background:
        radial-gradient(circle at 13% 10%, rgba(76, 67, 208, .5), transparent 33%),
        radial-gradient(circle at 88% 90%, rgba(255, 193, 7, .16), transparent 28%),
        linear-gradient(145deg, rgba(3, 0, 40, .16), rgba(3, 0, 40, .58));
}

.login-left .particles { z-index: 2; }
.login-left .particles::before,
.login-left .particles::after { animation: none; opacity: 0; }

/* Décor institutionnel du panneau de présentation */
.login-artwork {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.artwork-ring {
    position: absolute;
    display: block;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.artwork-ring-large {
    width: 430px;
    height: 430px;
    top: -115px;
    right: -175px;
    box-shadow:
        0 0 0 38px rgba(255, 255, 255, .025),
        0 0 0 82px rgba(255, 255, 255, .018);
}

.artwork-ring-small {
    width: 180px;
    height: 180px;
    right: 8%;
    bottom: 6%;
    border-color: rgba(255, 193, 7, .16);
    box-shadow: inset 0 0 45px rgba(255, 193, 7, .035);
}

.artwork-node {
    position: absolute;
    width: 7px;
    height: 7px;
    display: block;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--golden-yellow);
    box-shadow: 0 0 0 7px rgba(255, 193, 7, .1), 0 0 24px rgba(255, 193, 7, .35);
}

.artwork-node-one { top: 20%; right: 17%; }
.artwork-node-two { bottom: 18%; left: 8%; transform: scale(.7); opacity: .65; }

.artwork-spark {
    position: absolute;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 14px;
    color: rgba(255, 255, 255, .54);
    background: rgba(255, 255, 255, .055);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .12);
    font-size: 1rem;
    backdrop-filter: blur(8px);
}

.artwork-spark-one { top: 31%; right: 7%; transform: rotate(7deg); }
.artwork-spark-two { bottom: 12%; left: 5%; transform: rotate(-8deg); }

.login-side-caption {
    position: absolute;
    z-index: 3;
    right: 22px;
    bottom: 32px;
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255, 255, 255, .3);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .18em;
    writing-mode: vertical-rl;
    pointer-events: none;
}

.login-side-caption span {
    width: 1px;
    height: 36px;
    display: block;
    background: linear-gradient(to bottom, var(--golden-yellow), transparent);
}

.login-illustration,
.login-form-container,
.slide-in-right,
.slide-in-up,
.floating-element {
    animation: none;
}

.login-illustration {
    width: min(100% - 80px, 610px);
    max-width: 610px;
    padding: 0;
    text-align: left;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
}

.brand-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: rgba(255, 255, 255, .84);
    background: rgba(255, 255, 255, .08);
    font-size: .73rem;
    font-weight: 650;
    letter-spacing: .04em;
}

.brand-kicker i { color: var(--golden-yellow); }

.login-illustration .brand-logo {
    width: 112px;
    height: 112px;
    margin: 0 0 28px;
    padding: 7px;
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .26);
    backdrop-filter: none;
}

.login-main .brand-logo img,
.login-illustration .brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: none;
    border-radius: 17px;
}

.login-illustration .brand-logo:hover img { transform: none; }
.login-illustration .brand-logo::before { display: none; }

.login-main .typing-text {
    max-width: 590px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(2rem, 3.5vw, 3.35rem);
    font-weight: 760;
    line-height: 1.08;
    letter-spacing: -.045em;
    overflow-wrap: break-word;
    background: none;
    -webkit-text-fill-color: currentColor;
    animation: none;
}

.login-illustration > p {
    max-width: 530px;
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
    text-shadow: none;
}

.brand-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 20px;
    color: rgba(255, 255, 255, .72);
    font-size: .72rem;
    font-weight: 550;
}

.brand-status-row span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.brand-status-row i { color: var(--golden-yellow); font-size: .8rem; }
.brand-status-row span:first-child i { color: #67e8a5; }

.features-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 25px 0 0;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .065);
    backdrop-filter: blur(8px);
}

.login-main .features-list li {
    min-width: 0;
    padding: 4px 0;
    color: rgba(255, 255, 255, .85);
    font-size: .82rem;
    line-height: 1.45;
}

.features-list li::before { display: none; }
.features-list li:hover { transform: none; }
.features-list li i {
    flex: 0 0 auto;
    margin-right: 10px;
    color: var(--golden-yellow);
    font-size: 1rem;
    filter: none;
}
.features-list li:hover i { transform: none; }

.login-main .login-right {
    min-height: 100vh;
    padding: 48px clamp(30px, 5vw, 76px);
    background:
        radial-gradient(circle at 100% 0, rgba(76, 67, 208, .09), transparent 28%),
        radial-gradient(circle at 0 100%, rgba(255, 193, 7, .1), transparent 25%),
        #f7f8fc;
}

.login-right::before {
    background-image:
        linear-gradient(rgba(9, 2, 108, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(9, 2, 108, .025) 1px, transparent 1px);
    background-size: 36px 36px;
}

.login-main .login-form-container {
    width: 100%;
    max-width: 480px;
    margin: 0;
    padding: 46px 44px 34px;
    overflow: visible;
    border: 1px solid #e4e8f1;
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 70px rgba(9, 2, 108, .12);
    transition: box-shadow .25s ease, border-color .25s ease;
}

.login-form-container:hover {
    transform: none;
    border-color: #d9dcec;
    box-shadow: 0 28px 75px rgba(9, 2, 108, .15);
}

.login-form-container::before {
    height: 4px;
    border-radius: 22px 22px 0 0;
    background: linear-gradient(90deg, var(--primary-green) 0 72%, var(--golden-yellow) 72% 100%);
}

.form-header {
    margin-bottom: 32px;
    text-align: left;
}

.form-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 13px;
    color: var(--accent-green);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.login-main .form-header h2 {
    display: block;
    margin: 0 0 9px;
    color: var(--dark-forest);
    font-size: 2rem;
    font-weight: 760;
    line-height: 1.15;
    letter-spacing: -.035em;
}

.form-header h2::after { display: none; }
.login-main .form-header p {
    margin: 0;
    color: #64748b;
    font-size: .9rem;
    line-height: 1.6;
}

#alertContainer { margin-bottom: 20px; }
.alert { padding: 13px 15px; border-radius: 10px; font-size: .84rem; line-height: 1.5; }

.form-group { margin-bottom: 21px; }
.form-group label {
    margin-bottom: 8px;
    color: #334155;
    font-size: .78rem;
    font-weight: 650;
}

.input-wrapper { overflow: visible; border-radius: 11px; }
.input-wrapper::after { display: none; }

.form-control {
    min-height: 54px;
    padding: 14px 50px 14px 15px;
    border: 1px solid #d8deea;
    border-radius: 11px;
    background: #f9fafc;
    color: var(--dark-forest);
    font-size: .92rem;
    font-weight: 450;
}

.form-control::placeholder { color: #94a3b8; font-weight: 400; }
.form-control:hover { border-color: #b9c2d1; }
.form-control:focus {
    border-color: var(--accent-green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(76, 67, 208, .11);
    transform: none;
}

.input-icon {
    right: 16px;
    color: #778399;
    font-size: 1.1rem;
}

.password-toggle {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
}

.password-toggle:hover {
    color: var(--primary-green);
    background: #eef0fb;
    transform: translateY(-50%);
}

.form-check { margin: 3px 0 24px; }
.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border-radius: 5px;
}
.form-check-label { color: #64748b; font-size: .82rem; }

.login-main .btn-login {
    min-height: 54px;
    margin: 0;
    padding: 14px 20px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    box-shadow: 0 12px 24px rgba(9, 2, 108, .2);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: none;
}

.btn-login:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #070056, var(--primary-green));
    box-shadow: 0 16px 30px rgba(9, 2, 108, .26);
}

.login-footer {
    margin-top: 27px;
    padding-top: 20px;
    border-color: #edf0f5;
    color: #8a94a6;
    font-size: .74rem;
}

.login-footer p { margin-bottom: 3px; }

.preloader {
    background: linear-gradient(145deg, rgba(3, 0, 40, .96), rgba(9, 2, 108, .94));
    backdrop-filter: blur(10px);
}

.preloader-content {
    border: 1px solid rgba(255, 255, 255, .11);
    background: rgba(255, 255, 255, .055);
}

@media (max-width: 1250px) {
    .login-main .login-container { grid-template-columns: minmax(0, 1fr) minmax(430px, .9fr); }
    .login-illustration { width: min(100% - 56px, 540px); }
    .features-list { grid-template-columns: 1fr; gap: 7px; padding: 18px 20px; }
    .login-side-caption { display: none; }
    .artwork-spark-one { right: 3%; opacity: .55; }
    .login-main .login-right { padding-inline: 30px; }
}

@media (max-width: 1024px) {
    .login-main .login-container { display: block; background: #f4f6fb; }
    .login-main .login-left { display: none; }
    .login-main .login-right {
        display: flex;
        min-height: 100vh;
        padding: 0;
        background: #f4f6fb;
    }

    .login-mobile-header {
        display: block;
        padding: 48px 28px 88px;
        background: linear-gradient(145deg, #030028, #09026c 58%, #1606ad);
    }

    .login-mobile-header::before {
        background:
            radial-gradient(circle at 12% 15%, rgba(76, 67, 208, .42), transparent 35%),
            radial-gradient(circle at 90% 85%, rgba(255, 193, 7, .14), transparent 28%);
    }

    .login-mobile-logo {
        width: 92px;
        height: 92px;
        margin-bottom: 17px;
        padding: 5px;
        border: 0;
        border-radius: 20px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, .25);
    }

    .login-mobile-logo img { padding: 0; border-radius: 15px; }

    .login-main .login-form-container {
        flex: 0 0 auto;
        width: min(calc(100% - 40px), 540px);
        max-width: 540px;
        margin: -46px auto 44px;
        padding: 42px 40px 34px;
        border: 1px solid #e4e8f1;
        border-radius: 22px;
        box-shadow: 0 22px 60px rgba(9, 2, 108, .16);
    }
}

@media (max-width: 600px) {
    .login-mobile-header { padding: 32px 20px 72px; }
    .login-mobile-logo { width: 76px; height: 76px; margin-bottom: 14px; border-radius: 17px; }
    .login-mobile-brand h1 { font-size: 1.12rem; }
    .login-mobile-brand span { font-size: .72rem; }

    .login-main .login-form-container {
        width: calc(100% - 24px);
        min-width: 0;
        margin: -36px auto 20px;
        padding: 33px 24px 26px;
        border-radius: 18px;
    }

    .form-header { margin-bottom: 26px; }
    .login-main .form-header h2 { font-size: 1.65rem; }
    .form-control { min-height: 51px; font-size: .88rem; }
    .login-main .btn-login { min-height: 51px; }
}

@media (max-height: 700px) and (min-width: 1025px) {
    html, body { height: auto; overflow: auto; }
    .login-main .login-container,
    .login-main .login-left,
    .login-main .login-right { min-height: 700px; height: auto; overflow: visible; }
    .login-illustration { padding-block: 30px; }
    .login-main .login-form-container { max-height: none; padding-block: 34px 28px; }
    .login-illustration .brand-logo { width: 86px; height: 86px; margin-bottom: 20px; }
    .brand-kicker { margin-bottom: 18px; }
    .brand-status-row { margin-top: 13px; }
    .features-list { margin-top: 22px; }
    .artwork-spark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
