* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #f4f5f7;
    color: #222;
}

/* HEADER */

.top-bar {
    height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111827;
    color: #fff;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.brand-main {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.06em;
}

.brand-sub {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
}

.search-box input {
    width: 260px;
    max-width: 60vw;
    padding: 6px 10px;
    border-radius: 999px;
    border: none;
    outline: none;
    font-size: 14px;
}

/* LAYOUT */

.layout {
    display: flex;
    height: calc(100vh - 56px);
}

/* SIDEBAR (chap tomondagi gruppalar) */

.sidebar {
    width: 260px;
    min-width: 220px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    text-transform: uppercase;
    color: #6b7280;
}

.group-tree {
    flex: 1;
    overflow-y: auto;
    padding: 4px 4px 8px;
    font-size: 14px;
}

.tree-node {
    padding-left: 8px;
}

.tree-node-header {
    display: flex;
    align-items: center;
    padding: 3px 6px;
    border-radius: 4px;
    cursor: pointer;
}

.tree-node-header:hover {
    background: #f3f4f6;
}

.tree-node-header.active {
    background: #e5f0ff;
    color: #1d4ed8;
}

.tree-toggle {
    width: 16px;
    display: inline-flex;
    justify-content: center;
    margin-right: 4px;
    font-size: 10px;
    color: #9ca3af;
}

.tree-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CONTENT (o‘ng tomon) */

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.content-header h1 {
    font-size: 18px;
    margin-bottom: 2px;
}

.breadcrumb {
    font-size: 12px;
    color: #6b7280;
}

.badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e5e7eb;
}

/* TABLE */

.table-wrapper {
    flex: 1;
    overflow: auto;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.items-table thead {
    position: sticky;
    top: 0;
    background: #f9fafb;
    z-index: 1;
}

.items-table th,
.items-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}

.items-table th {
    font-weight: 600;
    color: #6b7280;
    font-size: 12px;
}

.items-table tbody tr:nth-child(even) {
    background: #fcfcfd;
}

.items-table tbody tr:hover {
    background: #eff6ff;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 260px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .content {
        height: calc(100vh - 56px - 260px);
    }
}
