html, body {
    height: 100%;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
}

.app-navbar {
    background: #12181f;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #0b0f14;
}

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

.sidebar {
    width: 280px;
    background: #1b2430;
    color: #c7ced9;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-section-title {
    padding: 10px 16px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7c8797;
    background: #161d27;
}

.database-list {
    border-bottom: 1px solid #232d3b;
}

.database-item {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c7ced9;
}

.database-item .db-access {
    margin-left: auto;
    opacity: 0.6;
    font-size: 11px;
}

.database-item:hover {
    background: #232d3b;
}

.database-item.selected {
    background: #2f6fed;
    color: #fff;
    font-weight: 600;
}

.tree-group-header {
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    background: #161d27;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tree-count {
    margin-left: auto;
    opacity: 0.6;
    font-weight: 400;
    font-size: 12px;
}

.tree-group-list.collapsed {
    display: none;
}

.tree-item {
    padding: 6px 20px;
    cursor: pointer;
    font-size: 13px;
}

.tree-item:hover {
    background: #232d3b;
}

.tree-item-details {
    margin: 4px 0 4px 16px;
    font-size: 12px;
    color: #8b96a5;
}

.tree-item-details.collapsed {
    display: none;
}

.tree-detail-line {
    padding: 2px 0;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #eef1f6;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e3e7ee;
}

.editor {
    height: 45%;
    border-bottom: 1px solid #e3e7ee;
}

.status-bar {
    padding: 6px 16px;
    font-size: 13px;
    background: #fff;
    border-bottom: 1px solid #e3e7ee;
}

.status-bar.status-ok {
    color: #1a7a3c;
}

.status-bar.status-error {
    color: #b3261e;
}

.results {
    flex: 1;
    overflow: auto;
    background: #fff;
    margin: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 56px);
    background: #eef1f6;
    padding: 24px;
}

body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #1b2430 0%, #2f6fed 150%);
}
