* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
}

body {
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
}

/* ── Background slideshow ── */
.bg-slideshow {
    position: fixed;
    inset: 0;
    z-index: -1;
}

.bg-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateX(100%);
    transition: transform 1s ease-in-out;
}

.bg-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.08);
}

.bg-slide.active {
    transform: translateX(0);
}

.bg-slide.exit {
    transform: translateX(-100%);
}

.container {
    display: flex;
    width: min(820px, 100%);
    min-height: unset;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255,255,255,0.25);
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.welcome-section {
    flex: 1;
    background: linear-gradient(135deg, rgba(26,42,108,0.22), rgba(178,31,31,0.18), rgba(253,187,45,0.14));
    color: white;
    padding: 36px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-shadow: 0 1px 8px rgba(0,0,0,0.75);
    border-right: 1px solid rgba(255,255,255,0.15);
}

.welcome-section h1 {
    font-size: 1.9rem;
    margin-bottom: 12px;
}

.welcome-section p {
    line-height: 1.55;
    margin-bottom: 20px;
    font-size: 0.91rem;
}

.features {
    list-style: none;
}

.features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 0.91rem;
}

.features i {
    margin-right: 10px;
    color: #fdbb2d;
}

.login-section {
    flex: 1;
    background: rgba(255, 255, 255, 0.18);
    padding: 32px 34px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo {
    text-align: center;
    margin-bottom: 14px;
}

.logo-img {
    height: 80px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    filter: drop-shadow(0 1px 6px rgba(0,0,0,0.55));
}



.login-form h3 {
    text-align: center;
    margin-bottom: 18px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

.input-with-icon input,
.input-with-icon select {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.85);
    color: #1a1a2e;
    transition: all 0.3s;
}

.input-with-icon.has-right-icon input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    color: #777;
    cursor: pointer;
}

.toggle-password:focus {
    outline: none;
}

.input-with-icon input:focus,
.input-with-icon select:focus {
    border-color: #1a2a6c;
    box-shadow: 0 0 0 2px rgba(26, 42, 108, 0.2);
    outline: none;
}

.input-with-icon select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
}

.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 5px;
}

.forgot-password {
    color: #fdbb2d;
    text-decoration: none;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 11px;
    background: linear-gradient(to right, #1a2a6c, #b21f1f);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.4px;
}

.login-btn:hover {
    background: linear-gradient(to right, #23358a, #c52a2a);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: #777;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #ddd;
    z-index: 1;
}

.divider span {
    background-color: white;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.facebook {
    background-color: #3b5998;
}

.google {
    background-color: #db4437;
}

.twitter {
    background-color: #1da1f2;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.signup-link {
    text-align: center;
    font-size: 0.9rem;
    color: #555;
}

.signup-link a {
    color: #1a2a6c;
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover {
    text-decoration: underline;
}

.alert {
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

@media (max-width: 960px) {
    .container {
        width: 100%;
    }

    .welcome-section h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding: 15px;
    }

    .container {
        flex-direction: column;
        width: 100%;
        min-height: unset;
        border-radius: 12px;
    }

    .welcome-section {
        padding: 30px 25px;
    }

    .welcome-section h1 {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }

    .welcome-section p {
        margin-bottom: 20px;
        font-size: 0.95rem;
    }

    .login-section {
        padding: 30px 25px;
    }

    .logo {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 10px;
    }

    .welcome-section {
        padding: 25px 20px;
    }

    .welcome-section h1 {
        font-size: 1.5rem;
    }

    .features li {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .login-section {
        padding: 25px 20px;
    }

    .logo-img {
        height: 68px;
    }

    .login-form h3 {
        font-size: 1.2rem;
        margin-bottom: 18px;
    }

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

    .input-with-icon input {
        font-size: 0.95rem;
        padding: 10px 10px 10px 40px;
    }

    .login-btn {
        padding: 10px;
        font-size: 0.95rem;
    }

    .divider {
        margin: 18px 0;
    }

    .social-login {
        margin-bottom: 10px;
    }
}