/* TopBar chuẩn Request Log Desktop & Mobile */
.top, .app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    background: var(--cd);
    border-bottom: 1px solid var(--ln);
    position: sticky;
    top: 0;
    z-index: 50;
    height: 48px;
}

.top b, .app-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--tx);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: normal;
}

.lang {
    display: flex;
    align-items: center;
    gap: 3px;
}

.lang button {
    border: 1px solid var(--ln);
    background: var(--sf);
    color: var(--tx);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s;
}

.lang button.on {
    background: var(--pr);
    color: #fff;
    border-color: var(--pr);
    font-weight: 700;
}

/* Thân ứng dụng 2 cột */
.body {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* Sidebar Cố Định Trái 190px */
.desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 190px;
    background: var(--cd);
    border-right: 1px solid var(--ln);
    padding: 8px 0;
    flex-shrink: 0;
}

.desktop-sidebar button {
    border: 0;
    background: none;
    color: var(--mu);
    padding: 10px 16px;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}

.desktop-sidebar button b {
    font-size: 16px;
    font-weight: 400;
}

.desktop-sidebar button:hover {
    background: var(--sf);
    color: var(--tx);
}

.desktop-sidebar button.on, .desktop-sidebar button.active {
    color: var(--pr);
    font-weight: 700;
    background: var(--sf);
    border-right: 3px solid var(--pr);
}

/* Vùng nội dung chính */
.col {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    background: var(--bg);
}

.app-main {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 40px;
    width: 100%;
}

/* Form Controls chuẩn Enterprise từ Request Log Prototype */
label {
    display: block;
    font-size: 12px;
    color: var(--mu);
    margin: 8px 0 3px;
    font-weight: 500;
}

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--ln);
    border-radius: 8px;
    background: var(--cd);
    color: var(--tx);
    font: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--pr);
}

/* Ẩn hiện Responsive giữa Desktop Table và Mobile Cards chuẩn Request Log */
@media (min-width: 769px) {
    .cards { display: none !important; }
    .tbl { display: table !important; width: 100% !important; }
    .bottom-nav { display: none !important; }
    .fab-btn { display: none !important; }
    .desktop-sidebar { display: flex !important; }
    .sheet {
        position: fixed !important;
        top: 48px !important;
        bottom: 0 !important;
        right: 0 !important;
        left: auto !important;
        width: 760px !important;
        max-width: calc(100vw - 190px) !important;
        background: var(--bg) !important;
        border-left: 1px solid var(--ln) !important;
        box-shadow: -6px 0 24px rgba(0,0,0,0.12) !important;
        z-index: 100 !important;
        overflow-y: auto !important;
        padding: 16px 20px 40px !important;
    }
}

@media (max-width: 768px) {
    .cards { display: block !important; }
    .tbl { display: none !important; }
    .desktop-sidebar { display: none !important; }
    .bottom-nav { display: flex !important; }
    .fab-btn { display: flex !important; }
    .sheet {
        position: fixed !important;
        inset: 0 !important;
        background: var(--bg) !important;
        z-index: 10000 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-top: calc(env(safe-area-inset-top, 20px) + 16px) !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        padding-bottom: calc(85px + max(env(safe-area-inset-bottom, 0px), 16px)) !important;
        box-sizing: border-box !important;
    }
}

/* Bottom Navigation Bar trên Di động */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cd);
    border-top: 1px solid var(--ln);
    padding-top: 6px;
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 16px);
    height: auto;
    min-height: 52px;
    z-index: 100;
    justify-content: space-around;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--mu);
    padding: 7px 2px;
    font-size: 11px;
    cursor: pointer;
}

.nav-item b {
    font-size: 19px;
    font-weight: 400;
}

.nav-item.active {
    color: var(--pr);
    font-weight: 700;
}

/* ================= FROSTED TEAL/CYAN GLASSMORPHISM LOGIN PAGE (CHUẨN 9000) ================= */
.login-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 999;
    background: linear-gradient(145deg, #064e3b 0%, #047857 28%, #0d9488 65%, #0284c7 100%) !important;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 38px 34px 30px;
    background: rgba(45, 212, 191, 0.42) !important;
    backdrop-filter: blur(28px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
    border: 2px solid rgba(255, 255, 255, 0.48) !important;
    border-radius: 28px !important;
    box-shadow: 0 25px 60px -10px rgba(4, 120, 87, 0.45), 0 10px 30px rgba(0, 0, 0, 0.22), inset 0 1px 2px rgba(255, 255, 255, 0.65) !important;
    position: relative;
    overflow: hidden;
    animation: loginCardFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 8%; right: 8%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
    border-radius: 50%;
}

@keyframes loginCardFadeIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-emblem-box {
    width: 90px;
    height: 90px;
    margin: 0 auto 14px;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 2.5px solid rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(14px);
    animation: emblemFloat 4s ease-in-out infinite alternate;
}

.login-emblem-box img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

@keyframes emblemFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffffff !important;
    margin-bottom: 6px;
    line-height: 1.15;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.logo-sub {
    display: inline-block;
    font-size: 11.5px;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    background: rgba(13, 148, 136, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    padding: 4px 14px;
    border-radius: 20px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.login-card .form-group {
    margin-bottom: 16px;
}

.login-card .form-label {
    display: block;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 16px;
    color: #ffffff !important;
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
}

.login-card .form-input {
    width: 100%;
    height: 48px;
    background: rgba(17, 94, 89, 0.62) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.38) !important;
    border-radius: 16px !important;
    padding: 0 44px 0 48px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) inset;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.login-card .form-input:focus {
    background: rgba(15, 118, 110, 0.88) !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 0 3.5px rgba(255, 255, 255, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    outline: none !important;
}

.login-card .input-icon-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8) !important;
    cursor: pointer;
    padding: 6px;
    font-size: 16px;
    z-index: 2;
}

.btn-login-luxury {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 48px;
    background: rgba(37, 99, 235, 0.88) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    font-size: 14.5px !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-login-luxury::after {
    content: '';
    position: absolute;
    top: -50%; left: -75%; width: 50%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: rotate(25deg);
    animation: btnShimmerSweep 4.5s infinite ease-in-out;
}

@keyframes btnShimmerSweep {
    0% { left: -75%; }
    30% { left: 130%; }
    100% { left: 130%; }
}

.btn-login-luxury:hover {
    transform: translateY(-2px);
    background: rgba(29, 78, 216, 0.98) !important;
    border-color: #ffffff !important;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.6), inset 0 1px 0 #ffffff !important;
}

.login-biometric-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
    text-align: center;
}

.login-biometric-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff !important;
    font-size: 12.5px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 6px 14px;
    border-radius: 20px;
}

.login-security-tag {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
