* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(
            rgba(0, 0, 0, 0.32),
            rgba(0, 0, 0, 0.32)
        ),
        url('../img/backgrounds/nunzi.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

.login-wrapper {
    width: 100%;
    max-width: 430px;
    animation: fadeInLogin 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
    opacity: 0;
    transform: translateY(24px) scale(0.98);
}

@keyframes fadeInLogin {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card {
    background: rgba(248, 242, 242, 0.67);
    border-radius: 22px;
    padding: 36px;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.brand {
    text-align: center;
    margin-bottom: 28px;
}

.brand-icon {
    width: 100px;
    height: 100px;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: none;
}

.brand-icon img {
    width: 98px;
    height: 98px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.18));
}

.brand h1 {
    font-size: 28px;
    color: #0a090976;
    margin-bottom: 6px;
}

.brand p {
    color: rgba(14, 13, 13, 0.82);
    font-size: 14px;
}

.alert {
    padding: 13px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

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

label {
    display: block;
    color: #050404;
    font-weight: bold;
    margin-bottom: 7px;
    font-size: 14px;
}

input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 15px;
    color: #ffffff;
    outline: none;
    transition: 0.2s ease;
    background: rgba(255, 255, 255, 0.08);
}

input:focus {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.toggle-password:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.toggle-password::before {
    content: "";
    width: 17px;
    height: 11px;
    border: 2px solid currentColor;
    border-radius: 999px / 700px;
}

.toggle-password::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.toggle-password.is-visible::after {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(-42deg);
}

.btn-login {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 14px;
    background: #1d4ed8;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-login:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(29, 78, 216, 0.25);
}

.security-note {
    margin-top: 18px;
    padding: 12px;
    border-radius: 10px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.footer {
    text-align: center;
    margin-top: 22px;
    color: #6b7280;
    font-size: 13px;
}

.developer-credit {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.85;
}

[data-theme="dark"] body {
    background:
        linear-gradient(
            rgba(7, 12, 24, 0.72),
            rgba(7, 12, 24, 0.72)
        ),
        url('../img/backgrounds/nunzi.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

[data-theme="dark"] .login-card {
    background: rgba(31, 41, 55, 0.86);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .brand h1,
[data-theme="dark"] label {
    color: #e5e7eb;
}

[data-theme="dark"] .brand p,
[data-theme="dark"] .footer {
    color: #cbd5e1;
}

[data-theme="dark"] input {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.32);
    color: #e5e7eb;
}

[data-theme="dark"] .security-note {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.28);
    color: #cbd5e1;
}

@media (max-width: 430px) {
    body {
        align-items: flex-start;
        overflow-y: auto;
        padding: 14px;
    }

    .login-card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .brand-icon {
        width: 78px;
        height: 78px;
    }

    .brand-icon img {
        width: 76px;
        height: 76px;
    }

    .brand h1 {
        font-size: 24px;
        line-height: 1.2;
    }

    .alert,
    .security-note,
    .footer {
        overflow-wrap: anywhere;
    }

    .toggle-password {
        min-width: 34px;
        min-height: 34px;
    }
}
