@import url("./man-hinh-ket-qua.css");
@import url("./man-hinh-to-khai.css");
@import url("./lich-su.css");

#newSidebar.sidebar-flex {
    width: 260px;
    background: #f7f7f8;
    padding: 6px 10px 10px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    border-right: 1px solid #ececf1;
    z-index: 1001;
    transition: transform 0.25s ease, left 0.25s ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(0);
}

#newSidebar.sidebar-flex.sidebar-closed {
    transform: translateX(-100%);
}

#newSidebar .sidebar-top-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0;
}

#newSidebar .sidebar-toggle-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#newSidebar .history-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0 6px;
}

#newSidebar .bottom-actions {
    border-top: 1px solid #e6edf5;
    margin: 2px -10px 0 -10px;
    padding: 4px 10px calc(4px + env(safe-area-inset-bottom)) 10px;
    background: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

#newSidebar .bottom-actions a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

#newSidebar .bottom-actions a:hover {
    background: #edf4ff;
    color: #1d4ed8;
}

#newSidebar .bottom-actions.bottom-actions-primary {
    order: 1;
    margin-top: -12px !important;
    margin-bottom: 2px !important;
    border-top: none !important;
    background: transparent !important;
}

#newSidebar .history-list {
    order: 2;
    flex: 1 1 auto;
    margin-top: 6px !important;
    padding-top: 2px !important;
}

#newSidebar #historyToggleLink {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

#newSidebar .history-list > :first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#newSidebar .history-list > .history-group-title:first-child,
#newSidebar .history-list > .history-group-toggle:first-child,
#newSidebar .history-list > .history-group-items:first-child {
    margin-top: 0 !important;
}

#newSidebar .bottom-actions.bottom-actions-account {
    order: 3;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

#newSidebar .history-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#sidebarOverlayNew.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

@media (min-width: 769px) {
    body.result-view #topDeclarationToolbar,
    body.result-view.declaration-active #topDeclarationToolbar,
    body.result-view.history-view #topDeclarationToolbar,
    body.result-view.declaration-active.history-view #topDeclarationToolbar {
        margin-top: -8px !important;
        padding-top: 6px !important;
        overflow: visible !important;
    }
}

