:root {
    color-scheme: dark;
    --background: #202224;
    --sidebar: #1d1f21;
    --divider: #101112;
    --border: #383b3d;
    --sidebar-width: 299px;
    --sidebar-padding: 16px;
    --header-height: 115px;
    --header-block-height: 76px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: #d1d2d3;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sidebar {
    position: fixed;
    inset: var(--header-height) auto 0 0;
    width: var(--sidebar-width);
    background: var(--sidebar);
    border-right: 9px solid var(--divider);
    overflow-y: auto;
    padding: 21px var(--sidebar-padding);
    scrollbar-width: thin;
    scrollbar-color: #383b3d var(--sidebar);
}
.workspace {
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
}
.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 10;
    background: var(--background);
    height: var(--header-height);
    min-height: var(--header-height);
    border-bottom: 1px solid var(--border);
}
.content {
    min-height: calc(100vh - var(--header-height));
    padding: 25px 34px;
}
.header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px var(--sidebar-padding);
    overflow: visible;
}
.header-panel {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: var(--header-block-height);
    padding: 9px 16px;
    border: 1px solid #484c4f;
    border-radius: 8px;
    background: #292c2f;
    color: #f2f4f5;
    text-decoration: none;
    white-space: nowrap;
    font: inherit;
}
.brand { width: calc(var(--sidebar-width) - 9px); flex-direction: row; gap: 14px; text-align: left; }
.brand-icon { width: 46px; height: 46px; flex-shrink: 0; color: #54c8a9; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-size: 26px; font-weight: 750; line-height: 1; letter-spacing: 1px; }
.brand-name > span { color: #54c8a9; }
.brand-subtitle { font-size: 13px; line-height: 1.5; letter-spacing: .5px; color: #a5abad; }
.brand:hover { background: #34383b; }
.header :focus-visible { outline: 2px solid #389eff; outline-offset: 2px; }
@media (max-width: 828px) {
    :root { --sidebar-padding: 14px; }
    .header { padding: 9px var(--sidebar-padding); }
    .brand { font-size: 23px; }
}

.sidebar a { color: #c8cacc; text-decoration: none; }
.sidebar-create {
    display: block;
    margin: 0 0 25px;
    padding: 16px 12px;
    border: 1px solid #383b3d;
    border-radius: 5px;
    text-align: center;
    font-size: 17px;
    font-weight: 550;
    letter-spacing: 0;
}
.sidebar-group { margin-bottom: 18px; }
.sidebar-group summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #383b3d;
    border-radius: 3px;
    background: #25282a;
    color: #95999d;
    font-size: 13px;
    font-weight: 550;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group summary::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid #95999d;
    border-bottom: 2px solid #95999d;
    transform: rotate(-45deg);
    margin-right: 3px;
}
.sidebar-group[open] summary::after { transform: translateY(-2px) rotate(45deg); }
.sidebar-links { padding-top: 6px; }
.sidebar-links a {
    display: block;
    padding: 15px 14px;
    margin-bottom: 3px;
    border-radius: 3px;
    font-size: 16px;
    line-height: 1.4;
}
.sidebar-links a:hover { background: #292c2f; }
.sidebar-links a.is-active { background: #303437; color: #fff; box-shadow: inset 3px 0 #279d80; }
.sidebar :focus-visible { outline: 2px solid #389eff; outline-offset: 2px; }
.sidebar-create:hover { background: #292c2f; }
@media (max-width: 828px) {
    :root { --sidebar-width: min(322px, 72vw); --header-height: 103px; }
    .sidebar { padding-right: 14px; padding-left: 14px; }
    .sidebar-create { font-size: 16px; }
    .content { padding: 18px; }
}

.sidebar-create { background: #25282a; }
.sidebar-group summary:hover { background: #292c2f; color: #d1d2d3; }

.profile { position: relative; margin-left: auto; flex-shrink: 0; }
.profile > summary { display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 71px; height: var(--header-block-height); padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: #292c2f; color: #54c8a9; cursor: pointer; list-style: none; }
.profile > summary::-webkit-details-marker { display: none; }
.profile > summary:hover, .profile[open] > summary { background: #34383b; border-color: #54c8a9; }
.profile summary svg { width: 28px; height: 28px; }
.profile summary .profile-chevron { width: 16px; height: 16px; transition: transform .15s; }
.profile[open] .profile-chevron { transform: rotate(180deg); }
.profile-menu { position: absolute; top: calc(100% + 14px); right: 0; width: 276px; max-width: calc(100vw - 28px); padding: 9px; border: 1px solid var(--border); border-radius: 9px; background: #292c2f; box-shadow: 0 14px 37px #0006; }
.profile-info { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 16px; margin-bottom: 7px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.profile-info span { color: #a5abad; font-size: 14px; }
.profile-info strong { font-size: 16px; color: #f2f4f5; }
.profile-menu button { display: block; width: 100%; padding: 13px 14px; border: 0; border-radius: 5px; background: transparent; color: #d1d2d3; font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.profile-menu button:hover { background: #34383b; color: #fff; }
@media (max-width: 437px) {
    .header .brand { width: auto; flex-shrink: 1; padding: 9px; gap: 9px; }
    .header .brand-subtitle { font-size: 12px; letter-spacing: 0; }
    .profile > summary { min-width: 51px; gap: 5px; padding: 9px; }
}

.server-stats { display: flex; gap: 12px; margin-left: auto; }
.server-stat { min-width: 172px; gap: 2px; align-items: flex-start; }
.stat-label { color: #a5abad; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.server-stat strong { color: #54c8a9; font-size: 21px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-detail { color: #a5abad; font-size: 12px; }
.header:has(.server-stats) .profile { margin-left: 0; }
@media (max-width: 874px) {
    :root { --header-height: 195px; --header-block-height: 71px; }
    .header { flex-wrap: wrap; align-content: center; }
    .server-stats { order: 3; width: 100%; margin-left: 0; }
    .server-stat { flex: 1 1 0; min-width: 0; height: var(--header-block-height); padding: 8px 14px; }
    .header:has(.server-stats) .profile { margin-left: auto; }
    .profile-menu { z-index: 1; }
}

.profile-username { max-width: 184px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f2f4f5; font-size: 16px; font-weight: 550; }
@media (max-width: 552px) {
    .profile-username { max-width: 80px; font-size: 14px; }
    .header .brand { width: auto; flex-shrink: 1; gap: 9px; padding: 9px; }
    .header .brand-subtitle { font-size: 12px; letter-spacing: 0; }
    .profile > summary { min-width: 51px; padding: 9px; gap: 5px; }
}
@media (max-width: 414px) {
    .profile-username { max-width: 55px; }
    .profile summary .profile-chevron { display: none; }
}

.profile-identity { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.profile-employee-id { color: #a5abad; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 552px) {
    .profile-employee-id { font-size: 10px; }
    .header .brand { min-width: 0; }
    .header .brand-text { min-width: 0; }
    .header .brand-subtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.database-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px 9px; align-content: center; flex: 0 1 240px; min-width: 0; margin: 0; }
.database-picker label { grid-column: 1 / -1; color: #a5abad; font-size: 13px; }
.database-picker select { min-width: 0; max-width: 100%; padding: 6px 9px; border: 1px solid var(--border); border-radius: 5px; background: var(--sidebar); color: inherit; font: inherit; font-size: 14px; }
.database-picker select { width: 100%; }
@media (max-width: 1265px) {
    :root { --header-height: 195px; --header-block-height: 71px; }
    .header { flex-wrap: wrap; align-content: center; }
    .header .brand { flex-shrink: 1; }
    .server-stats { order: 3; width: 100%; margin-left: 0; }
    .server-stat { flex: 1 1 0; min-width: 0; padding: 8px 14px; }
    .database-picker { order: 4; flex: 0 1 240px; }
    .server-stats { flex: 1 1 368px; width: auto; }
    .header:has(.server-stats) .profile { margin-left: auto; }
}
@media (max-width: 747px) {
    :root { --header-height: 276px; }
    .server-stats { flex: 1 1 100%; width: 100%; }
    .database-picker { flex: 1 1 100%; }
}

.profile-menu > a { display: block; padding: 13px 14px; border-radius: 5px; color: #d1d2d3; font-size: 16px; text-decoration: none; }
.profile-menu > a:hover { background: #34383b; color: #fff; }
.database-picker { position: relative; }
.database-error { position: absolute; top: calc(100% + 9px); left: 0; width: max-content; max-width: min(414px, 80vw); padding: 12px 14px; border: 1px solid #ffb4b4; border-radius: 5px; background: var(--sidebar); color: #ffb4b4; font-size: 14px; white-space: normal; }
