* {
    box-sizing: border-box;
}

html {
    min-width: min(320px, 100%);
    background: var(--surface-subtle);
}

body {
    margin: 0;
    color: var(--ink-950);
    background: var(--surface-subtle);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

.app-layout {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    color: #eaf0f3;
    background: var(--nav);
    border-right: 1px solid rgb(255 255 255 / 8%);
}

.brand {
    display: flex;
    min-height: var(--header-height);
    align-items: center;
    gap: var(--space-2);
    padding: 0 12px;
    border-bottom: 1px solid rgb(255 255 255 / 10%);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: #fff;
    background: #2c5282;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.brand-copy strong,
.brand-copy span {
    display: block;
}

.brand-copy strong {
    font-size: 13px;
    letter-spacing: .01em;
}

.brand-copy span {
    margin-top: 0;
    color: rgb(255 255 255 / 65%);
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 5px 20px;
}

.nav-group + .nav-group {
    margin-top: var(--space-4);
}

.nav-group-label {
    margin: 0 0 4px;
    padding: 0 12px;
    color: rgb(255 255 255 / 50%);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
}

.nav-list {
    display: grid;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: rgb(255 255 255 / 85%);
    border-left: 3px solid transparent;
    border-radius: 0;
    text-decoration: none;
}

.nav-link:hover {
    color: #fff;
    background: rgb(255 255 255 / 10%);
}

.nav-link[aria-current="page"] {
    color: #fff;
    background: rgb(255 255 255 / 10%);
    border-left-color: #63b3ed;
}

.nav-icon {
    width: 18px;
    color: rgb(255 255 255 / 65%);
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.sidebar-footer {
    padding: 10px;
    border-top: 1px solid rgb(255 255 255 / 10%);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    background: #344b59;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.sidebar-user-copy {
    min-width: 0;
    flex: 1;
}

.sidebar-user-copy strong,
.sidebar-user-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-copy strong {
    font-size: 13px;
}

.sidebar-user-copy span {
    color: #8fa1ad;
    font-size: 11px;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    min-height: var(--header-height);
    align-items: center;
    gap: var(--space-4);
    padding: 0 20px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}

.header-context {
    min-width: 0;
    flex: 1;
}

.header-context h1 {
    margin: 0;
    overflow: hidden;
    font-size: 16px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-context p {
    margin: 1px 0 0;
    color: var(--ink-600);
    font-size: 12px;
}

.button.menu-toggle,
.button.sidebar-close {
    display: none;
}

.app-content {
    width: min(100%, var(--content-max));
    margin: 0 auto;
    padding: 15px;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1030;
    background: rgb(9 18 25 / 55%);
}

.sidebar-backdrop[hidden] {
    display: none;
}

/* 메뉴가 길어도 배포 버전은 스크롤 영역 밖의 하단에 표시한다. */
.deployment-version { flex-shrink: 0; font-size: 11px; overflow-wrap: anywhere; }
.deployment-version span { display: block; margin-top: 3px; color: #ffd38a; }
