* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f1f3f6;
    min-height: 100vh;
    color: #111827;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

.brand {
    text-align: center;
    margin-bottom: 26px;
}

.brand-logo {
    width: 220px;
    max-width: 85%;
    height: auto;
    object-fit: contain;
    margin-bottom: 18px;
}

.brand h1 {
    color: #2453a6;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.brand p {
    color: #ff7a00;
    font-size: 16px;
    font-weight: 700;
}

.alert-success,
.alert-error {
    padding: 12px 14px;
    border-radius: 9px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

.alert-success {
    background: #dcfce7;
    color: #047857;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #000000;
    margin-bottom: 7px;
    font-weight: 700;
}

.form-group input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #c9cdd3;
    border-radius: 9px;
    outline: none;
    font-size: 15px;
    background: #ffffff;
    transition: 0.2s ease;
}

.form-group input:focus {
    border-color: #2453a6;
    background: #eef4ff;
    box-shadow: 0 0 0 3px rgba(36, 83, 166, 0.12);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 48px;
}

.password-wrapper button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    color: #374151;
}

.btn-login {
    margin-top: 2px;
    width: 100%;
    border: none;
    background: #2855aa;
    color: #ffffff;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-login:hover {
    background: #1e4692;
    transform: translateY(-1px);
}

.login-links {
    text-align: center;
    margin-top: 18px;
}

.login-links a {
    color: #0645ad;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    color: #6b7280;
    font-size: 12px;
}

@media (max-width: 520px) {
    .login-page {
        align-items: flex-start;
        padding: 18px;
    }

    .login-card {
        margin-top: 18px;
        padding: 26px 20px;
        border-radius: 14px;
    }

    .brand-logo {
        width: 190px;
    }

    .brand h1 {
        font-size: 25px;
    }

    .brand p {
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .brand-logo {
        width: 165px;
    }

    .brand h1 {
        font-size: 22px;
    }
}

.pin-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.pin-box {
    background: white;
    width: 90%;
    max-width: 320px;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    animation: modalPop 0.25s ease;
}

.pin-box h3 {
    margin-bottom: 6px;
}

.pin-box p {
    color: #64748b;
    margin-bottom: 14px;
}

.pin-display {
    font-size: 26px;
    letter-spacing: 10px;
    margin-bottom: 16px;
}

.pin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pin-btn {
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #f1f5f9;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.pin-btn:active {
    background: #e2e8f0;
}

.pin-ok {
    background: #2563eb;
    color: white;
}

.pin-clear {
    background: #fee2e2;
}

.pin-cancel {
    margin-top: 14px;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #e5e7eb;
    font-weight: 700;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

@keyframes modalPop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}