:root {
    --sidebar-width: 260px;
    --top-nav-height: 60px;
    --primary-color: #4e73df;
    --sidebar-bg: #1a1c23;
    --content-bg: #f8f9fc;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--content-bg);
    overflow-x: hidden;
}

/* Sidebar Style */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: var(--sidebar-bg);
    color: #fff;
    z-index: 1000;
    transition: all 0.3s;
}

.sidebar-brand {
    height: var(--top-nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.sidebar-brand-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
}

.sidebar-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#sidebar-logo {
    max-height: 40px;
    max-width: 40px;
    object-fit: contain;
}

#sidebar-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

#sidebar-system-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1c23;
    text-align: center;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    display: block;
    white-space: pre-line;
}

.nav-menu {
    padding: 1rem 0;
}

.nav-item {
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    color: #fff;
    background-color: rgba(255,255,255,0.1);
}

.nav-item.active {
    border-left: 4px solid var(--primary-color);
    background-color: rgba(78, 115, 223, 0.1);
}

.org-node.active .btn-link {
    color: #fff !important;
}

.org-indent {
    display: inline-block;
    width: 1.5rem;
}

.nav-item-tab {
    cursor: pointer;
}

.nav-item i {
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* Main Content Style */
#main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s;
}

#top-nav {
    height: var(--top-nav-height);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    position: sticky;
    top: 0;
    z-index: 999;
}

.content-body {
    padding: 1.5rem;
}

.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 700;
    color: #4e73df;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.show {
        left: 0;
    }
    #main-wrapper {
        margin-left: 0;
    }
}
/* 紧凑型表格样式 */
.table-compact th, .table-compact td {
    padding: 0.6rem 0.4rem !important;
    font-size: 0.85rem;
}
.table-compact .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
}
.font-monospace-sm {
    font-family: var(--bs-font-monospace);
    font-size: 0.75rem;
}
.text-truncate-max {
    max-width: 120px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 确保下拉菜单悬浮显示 */
.dropdown-menu {
    position: absolute !important;
    z-index: 9999 !important;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 0.875rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
}

.dropdown-menu.show {
    display: block !important;
}

.btn-group {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}

/* 防止表格单元格限制下拉菜单 */
table td {
    overflow: visible !important;
}

table {
    overflow: visible !important;
}

.table-responsive {
    overflow: visible !important;
}
