* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(31, 143, 255, 0.22), transparent 35%),
        linear-gradient(135deg, #061527, #0a2544 45%, #071b33);
    color: #ffffff;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

.portal {
    max-width: 1300px;
    margin: 0 auto;
    padding: 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.07);
    border-radius: 22px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-text h1 {
    margin: 0 0 6px;
    font-size: 28px;
}

.brand-text p {
    margin: 2px 0;
    color: #cfe8ff;
}

.user-corner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.22);
    padding: 12px;
    border-radius: 16px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #3aa7ff, #004b91);
    color: #fff;
    font-weight: 800;
}

.login-tagline {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #f5b21b;
}


.login-brand img,
.brand-logo {
    object-fit: contain;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    animation: logoPulseGlow 2.2s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(245, 178, 27, 0.45));
}

.login-brand img {
    width: 95px;
    height: 95px;
}

.brand-logo {
    width: 82px;
    height: 82px;
}

@keyframes logoPulseGlow {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 6px rgba(245, 178, 27, 0.35));
    }

    50% {
        transform: scale(1.06);
        filter:
            drop-shadow(0 0 10px rgba(245, 178, 27, 0.75))
            drop-shadow(0 0 18px rgba(13, 71, 161, 0.55));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 6px rgba(245, 178, 27, 0.35));
    }
}


.password-wrap {
    position: relative;
    width: 100%;
}

.password-wrap input {
    padding-right: 56px !important;
}

.login-form .toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;

    margin: 0 !important;
    padding: 0 !important;

    border: none;
    border-radius: 12px;
    background: rgba(22, 134, 217, 0.85);
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    font-weight: normal;
}

.login-form .toggle-password span {
    display: block;
    line-height: 1;
    transform: translateY(-1px);
}

.login-form .toggle-password:hover {
    background: rgba(245, 178, 27, 0.35);
    filter: none;
}




.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-info span {
    font-size: 13px;
    color: #b9d7ef;
}

.logout-btn {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.16);
}

.logout-btn:hover {
    background: rgba(255,255,255,0.22);
}

.section-title {
    margin: 34px 4px 18px;
}

.section-title h2 {
    margin: 0;
    letter-spacing: 1px;
}

.section-title p {
    color: #cfe8ff;
    margin: 8px 0 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card {
    min-height: 180px;
    padding: 22px;
    border-radius: 22px;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 18px 40px rgba(0,0,0,0.22);
    transition: 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.14);
}

.card.disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.card.disabled:hover {
    transform: none;
}

.card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.card h2 {
    margin: 0;
    font-size: 21px;
}

.card p {
    color: #d7ecff;
    line-height: 1.5;
}

.card small {
    display: inline-block;
    margin-top: 12px;
    color: #aad7ff;
}

.badge {
    font-size: 11px;
    padding: 6px 9px;
    border-radius: 999px;
    white-space: nowrap;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.16);
}

.badge.active {
    background: rgba(18, 185, 129, 0.22);
    border-color: rgba(18, 185, 129, 0.35);
}

.badge.coming_soon {
    background: rgba(255, 193, 7, 0.20);
    border-color: rgba(255, 193, 7, 0.35);
}

.badge.disabled {
    background: rgba(255, 80, 80, 0.20);
    border-color: rgba(255, 80, 80, 0.35);
}

.portal-footer,
.login-footer {
    text-align: center;
    color: #a9c7df;
    padding: 18px;
    font-size: 13px;
}

/* Login */
.login-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-shell {
    width: 100%;
    max-width: 460px;
}

.login-card {
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.35);
    backdrop-filter: blur(14px);
}

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

.login-brand img {
    width: 95px;
    height: 95px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
    border-radius: 22px;
}

.login-brand h1 {
    margin: 14px 0 6px;
}

.login-brand p {
    margin: 0;
    color: #cfe8ff;
}

.alert-error {
    background: rgba(255, 80, 80, 0.18);
    border: 1px solid rgba(255, 80, 80, 0.35);
    color: #ffdcdc;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding: 11px;
    border-radius: 12px;
    cursor: pointer;
}

.tab-btn.active,
.tab-btn:hover {
    background: linear-gradient(135deg, #1686d9, #0d4f91);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-form label {
    font-size: 13px;
    color: #cfe8ff;
}

.login-form input {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(0,0,0,0.25);
    color: #fff;
    padding: 13px 14px;
    border-radius: 13px;
    outline: none;
}

.login-form input:focus {
    border-color: rgba(83, 181, 255, 0.8);
}

.login-form button {
    margin-top: 8px;
    border: none;
    background: linear-gradient(135deg, #1686d9, #0d4f91);
    color: #fff;
    padding: 14px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
}

.login-form button:hover {
    filter: brightness(1.1);
}

.hidden {
    display: none;
}

.rfid-note {
    margin-top: 10px;
    font-size: 12px;
    color: #b9d7ef;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .portal {
        padding: 16px;
    }

    .brand {
        align-items: flex-start;
    }

    .brand-logo {
        width: 64px;
        height: 64px;
    }

    .brand-text h1 {
        font-size: 22px;
    }

    .user-corner {
        width: 100%;
        justify-content: space-between;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}
