:root {
    --color-primary: #1f4e8c;
    --color-border: #dfe3e8;
    --color-bg: #f5f6f8;
    --color-text: #222;
    --color-muted: #6b7280;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Pretendard", "Malgun Gothic", -apple-system, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
}

.gnb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background-color: var(--color-primary);
    color: #fff;
}

.gnb .brand {
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: #fff;
    font-size: 16px;
}

.gnb nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.gnb nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.gnb-profile {
    color: #fff;
    margin-left: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.container {
    max-width: 1080px;
    margin: 0 auto 32px;
    padding: 0 24px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.search-form input {
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 14px;
}

.search-form button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: var(--color-primary);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

/* 긴 텍스트(회사명/법인명/이메일 등)가 행 높이를 늘리지 않도록 한 줄로 자르고 "..." 처리.
   전체 값은 title 속성(브라우저 기본 툴팁)으로 hover 시 보여준다. */
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

th {
    color: var(--color-muted);
    font-weight: 600;
    background-color: #fafbfc;
}

tbody tr:hover {
    background-color: #f9fafb;
}

tr.row-click {
    cursor: pointer;
}

tr.row-click:hover {
    background-color: #eceff3;
}

a.row-link {
    color: var(--color-text);
    text-decoration: none;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
    justify-content: center;
    align-items: center;
}

.pagination button {
    min-width: 36px;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #fff;
    color: var(--color-text);
    font-size: 13px;
    cursor: pointer;
}

.pagination button:hover:not(:disabled) {
    background-color: var(--color-bg);
}

.pagination button.active {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.footer {
    text-align: center;
    color: var(--color-muted);
    font-size: 12px;
    padding: 24px;
}

.error-box {
    text-align: center;
    padding: 80px 20px;
}

.error-box .code {
    font-size: 64px;
    font-weight: 800;
    color: var(--color-primary);
}

.error-box .message {
    margin-top: 12px;
    color: var(--color-muted);
}

.meta {
    color: var(--color-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.content-box {
    white-space: pre-wrap;
    line-height: 1.6;
    padding: 16px 0;
}

/* sidebar는 position:fixed라 일반 흐름에서 빠진다 — admin-layout은 사실상 admin-content만
   감싸고, 왼쪽에 사이드바 폭(220px) + 간격(24px)만큼 padding-left로 자리를 비워둔다. */
.admin-layout {
    width: 100%;
    margin: 0 0 32px;
    padding: 0 24px 0 244px;
}

.sidebar {
    /* top/bottom을 모두 고정값으로 박아서, 내용(대메뉴 접힘/펼침)과 무관하게 항상
       "헤더 바로 아래 ~ 뷰포트 맨 아래"까지 정확히 채운다(flex-grow/grid 1fr의 퍼센트 높이
       계산에 기대지 않는, 가장 확실한 방법). */
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 220px;
    background: #fff;
    border-right: 1px solid var(--color-border);
    padding: 16px 10px;
    overflow-y: auto;
    z-index: 10;
}

.sidebar-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-weight: 700;
    font-size: 13px;
    color: var(--color-muted);
    padding: 5px 10px 7px 15px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.sidebar-group-arrow {
    font-size: 10px;
    color: var(--color-muted);
    transition: transform 0.15s ease;
}

.sidebar-group.collapsed .sidebar-group-arrow {
    transform: rotate(-90deg);
}

.sidebar-group.collapsed .sidebar-group-links {
    display: none;
}

.sidebar-group + .sidebar-group {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.sidebar a {
    display: block;
    padding: 7px 14px 7px 21px;
    margin: 2px 0;
    border-radius: 6px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
}

.sidebar a:hover {
    background-color: var(--color-bg);
}

.sidebar a.active {
    background-color: #e8f0fb;
    color: var(--color-primary);
    font-weight: 700;
}

.admin-content {
    min-width: 0;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    margin-bottom: 16px;
}

.form-grid label {
    font-size: 13px;
    color: var(--color-muted);
    margin-bottom: 4px;
    display: block;
}

.form-grid input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 14px;
}

.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-dropdown-btn {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #fff;
    color: var(--color-text);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.filter-dropdown-btn:hover {
    background-color: var(--color-bg);
}

.filter-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 10;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    min-width: 140px;
    overflow: hidden;
}

.filter-menu.open {
    display: block;
}

.filter-menu button {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: #fff;
    color: var(--color-text);
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}

.filter-menu button:hover {
    background-color: var(--color-bg);
}

.filter-menu button.active {
    color: var(--color-primary);
    font-weight: 700;
}

.result-box {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    min-height: 60px;
    font-size: 13px;
    white-space: pre-wrap;
}

.result-message {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
}

.result-message.success {
    color: #16a34a;
}

.result-message.error {
    color: #dc2626;
}

.result-trip-dates {
    margin-top: 6px;
    font-size: 13px;
    color: var(--color-muted);
}

.selected-label {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    background-color: var(--color-primary);
    color: #fff;
    font-size: 14px;
    margin-left: 8px;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 8px;
    width: 480px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    font-size: 16px;
    margin: 0;
}

.modal-close-btn {
    border: none;
    background: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-muted);
}

.modal-search {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-border);
}

.modal-search input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 14px;
}

.modal-list {
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
}

.modal-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid var(--color-border);
}

.modal-list-item:hover {
    background-color: #eceff3;
}

.modal-list-item.selected {
    background-color: #dbeafe;
}

.modal-list-item .corp-id {
    color: var(--color-muted);
    font-size: 12px;
}

.modal-selected-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--color-border);
}

.modal-selected-summary:empty::before {
    content: '선택된 항목이 없습니다.';
    color: var(--color-muted);
    font-size: 13px;
}

.modal-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    background-color: var(--color-primary);
    color: #fff;
    font-size: 12px;
}

.modal-selected-chip button {
    border: none;
    background: none;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 0;
}

.modal-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-footer .pagination {
    margin-top: 0;
}

.modal-box.wide {
    width: 1140px;
}

.calendar-box {
    width: 320px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}

.calendar-header button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--color-primary);
    padding: 0 8px;
}

.calendar-header .calendar-title {
    font-size: 14px;
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 12px 16px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    color: var(--color-muted);
    padding: 4px 0;
}

.calendar-day {
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
}

.calendar-day:hover {
    background-color: #eceff3;
}

.calendar-day.empty {
    cursor: default;
    visibility: hidden;
}

.calendar-day.range-start,
.calendar-day.range-end {
    background-color: var(--color-primary);
    color: #fff;
}

.calendar-day.range-between,
.calendar-day.range-hover {
    background-color: #dbeafe;
    color: #1e3a8a;
}

.event-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 12px 20px;
    max-height: 630px;
    overflow-y: auto;
}

.event-type-grid label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: none;
}

.event-type-grid label:hover {
    background-color: #eceff3;
}

.event-type-grid label .corp-id {
    color: #b0b7c3;
}

.sortable-th {
    cursor: pointer;
    user-select: none;
}

.sortable-th .sort-arrow {
    margin-left: 4px;
    color: var(--color-muted);
}

.partner-tree,
.partner-tree ul {
    list-style: none;
    margin: 0;
    padding-left: 60px;
}

.partner-tree {
    padding-left: 0;
}

.partner-tree li {
    margin: 6px 0;
    line-height: 1.6;
}

.partner-tree li.collapsed > ul {
    display: none;
}

.tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    margin-right: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    background: #fff;
    user-select: none;
}

.tree-toggle:hover {
    background-color: #eceff3;
}

.tree-leaf-spacer {
    display: inline-block;
    width: 24px;
}

.modal-footer-actions {
    padding: 12px 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.detail-list {
    overflow-y: auto;
    flex: 1;
}

.detail-row {
    display: flex;
    padding: 10px 20px;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}

.detail-row .detail-label {
    width: 150px;
    flex-shrink: 0;
    color: var(--color-muted);
}

.detail-row .detail-value {
    flex: 1;
    word-break: break-all;
}

.detail-value input[type="number"] {
    width: 120px;
    padding: 6px 8px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 14px;
}

a.row-click {
    color: var(--color-text);
    text-decoration: none;
    cursor: pointer;
}

a.row-click:hover {
    text-decoration: underline;
    color: var(--color-primary);
}

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.tab-btn {
    padding: 10px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
}

.tab-btn.active {
    color: var(--color-primary);
    font-weight: 700;
    border-bottom-color: var(--color-primary);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.card-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.radio-field {
    padding: 4px;
    border-radius: 6px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    padding: 6px 2px;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    cursor: pointer;
}

/* 네이티브 라디오는 브라우저마다 폰트/accent-color 영향으로 크기가 들쭉날쭉해서
   appearance:none으로 직접 그린다 (작은 원 + 체크 시 안쪽 점).
   .form-grid input에 걸린 width:100%/min-height:44px 계열 규칙과 명시도가 같아서
   순서로 밀릴 수 있어 .form-grid를 선택자에 포함해 명시도를 더 높여둔다. */
.form-grid .radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    width: 13px;
    height: 13px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1.5px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    position: relative;
    cursor: pointer;
}

.form-grid .radio-option input[type="radio"]:checked {
    border-color: var(--color-primary, #01AFDE);
}

.form-grid .radio-option input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary, #01AFDE);
    transform: translate(-50%, -50%);
}

.radio-field.invalid {
    border: 1px solid #dc2626;
    background-color: #fef2f2;
}

.field-warning {
    display: none;
    color: #dc2626;
    font-size: 12px;
    margin: 2px 0 0;
}

.radio-field.invalid .field-warning {
    display: block;
}

@media (max-width: 900px) {
    .admin-layout {
        padding: 0 16px;
    }

    .sidebar {
        position: static;
        width: 100%;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .admin-layout > .sidebar {
        margin: 0 -16px 20px;
        width: calc(100% + 32px);
    }

    .card {
        padding: 16px;
        overflow-x: auto;
    }

    .search-form input {
        flex: 1 1 220px;
    }
}

/* aid admin 2026 visual system */
:root {
    --color-primary: #01afde;
    --color-primary-hover: #0098c2;
    --color-primary-soft: #e6f8fd;
    --color-primary-strong: #007da3;
    --color-border: #e5e9f0;
    --color-bg: #f5f7fa;
    --color-surface: #ffffff;
    --color-surface-raised: #ffffff;
    --color-surface-muted: #f8fafc;
    --color-text: #172033;
    --color-muted: #667085;
    --color-subtle: #98a2b3;
    --color-danger: #e5484d;
    --color-success: #12a66a;
    --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.03), 0 12px 32px rgba(16, 24, 40, 0.06);
    --shadow-popover: 0 16px 40px rgba(16, 24, 40, 0.14);
    --header-height: 72px;
    --sidebar-width: 264px;
}

:root[data-theme="dark"] {
    --color-primary: #22c7f2;
    --color-primary-hover: #50d4f5;
    --color-primary-soft: rgba(34, 199, 242, 0.13);
    --color-primary-strong: #63dcfa;
    --color-border: #253246;
    --color-bg: #0b111a;
    --color-surface: #111a26;
    --color-surface-raised: #162130;
    --color-surface-muted: #0f1722;
    --color-text: #f1f5f9;
    --color-muted: #a0aec0;
    --color-subtle: #7d8ba0;
    --color-danger: #ff6b70;
    --color-success: #39d98a;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.2), 0 18px 44px rgba(0, 0, 0, 0.22);
    --shadow-popover: 0 20px 48px rgba(0, 0, 0, 0.4);
}

html {
    background: var(--color-bg);
}

body {
    min-height: 100vh;
    padding-top: var(--header-height);
    font-family: "Pretendard Variable", "Pretendard", "SUIT Variable", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    background: var(--color-bg);
    color: var(--color-text);
    transition: background-color 0.2s ease, color 0.2s ease;
}

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

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(1, 175, 222, 0.24);
    outline-offset: 2px;
}

.gnb {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: var(--header-height);
    padding: 0 24px;
    color: var(--color-text);
    background: color-mix(in srgb, var(--color-surface) 88%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--color-border) 82%, transparent);
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
    backdrop-filter: blur(18px) saturate(140%);
}

.gnb .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    color: var(--color-text);
    font-size: 16px;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand-logo {
    position: relative;
    display: grid;
    place-items: center;
    width: 74px;
    height: 48px;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.brand-logo img {
    position: absolute;
    width: 74px;
    height: 74px;
    max-width: none;
    object-fit: contain;
}

.brand-logo-white {
    display: none;
}

:root[data-theme="dark"] .brand-logo-color {
    display: none;
}

:root[data-theme="dark"] .brand-logo-white {
    display: block;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-copy small {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 600;
}

.gnb-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-muted);
    color: var(--color-muted);
    cursor: pointer;
    transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    color: var(--color-primary-strong);
    border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
    background: var(--color-primary-soft);
}

.theme-icon {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 18px;
    transition: opacity 0.16s ease, transform 0.2s ease;
}

.theme-icon-moon,
:root[data-theme="dark"] .theme-icon-sun {
    opacity: 0;
    transform: rotate(-24deg) scale(0.72);
}

:root[data-theme="dark"] .theme-icon-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-left: 4px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #01afde, #0787d0);
    box-shadow: 0 6px 16px rgba(1, 175, 222, 0.25);
    font-size: 13px;
    font-weight: 800;
}

.gnb-profile {
    margin-left: 0;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 700;
    opacity: 1;
}

.admin-layout {
    min-height: calc(100vh - var(--header-height));
    margin: 0;
    padding: 32px 32px 48px calc(var(--sidebar-width) + 32px);
}

.sidebar {
    top: var(--header-height);
    width: var(--sidebar-width);
    padding: 24px 16px 32px;
    color: var(--color-text);
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.sidebar-group + .sidebar-group {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.sidebar-group-title {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: -0.01em;
    transition: background 0.16s ease, color 0.16s ease;
}

.sidebar-group-title:hover {
    color: var(--color-text);
    background: var(--color-surface-muted);
}

.sidebar-group-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav-glyph {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
    font-size: 14px;
    font-weight: 800;
}

.sidebar-group-arrow {
    font-size: 15px;
    transition: transform 0.2s ease;
}

.sidebar a {
    position: relative;
    margin: 2px 0 2px 38px;
    padding: 9px 12px;
    border-radius: 9px;
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 570;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.sidebar a:hover {
    color: var(--color-text);
    background: var(--color-surface-muted);
    transform: translateX(2px);
}

.sidebar a.active {
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
    font-weight: 750;
}

.sidebar a.active::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -14px;
    width: 4px;
    height: 18px;
    border-radius: 999px;
    background: var(--color-primary);
    transform: translateY(-50%);
}

.admin-content {
    width: min(100%, 1500px);
    margin: 0;
}

.page-title {
    margin: 0 0 24px;
    color: var(--color-text);
    font-size: clamp(24px, 2vw, 30px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.page-title::after {
    content: "";
    display: block;
    width: 34px;
    height: 4px;
    margin-top: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary), #0878d5);
}

.card {
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.card + .card {
    margin-top: 20px;
}

.meta {
    margin: 0 0 20px;
    padding: 13px 15px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
    border-radius: 11px;
    color: var(--color-muted);
    background: var(--color-primary-soft);
    font-size: 13px;
    line-height: 1.65;
}

.meta:empty {
    display: none;
}

code {
    color: var(--color-primary-strong);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.92em;
}

.search-form,
.modal-search {
    align-items: center;
    gap: 10px;
}

.search-form {
    margin: -4px 0 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.search-form input,
.form-grid input,
.modal-search input,
.detail-value input[type="number"] {
    min-height: 44px;
    padding: 9px 12px;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.search-form input {
    min-width: 260px;
}

.search-form input:hover,
.form-grid input:hover,
.modal-search input:hover {
    border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
}

.search-form input:focus,
.form-grid input:focus,
.modal-search input:focus,
.detail-value input[type="number"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(1, 175, 222, 0.12);
}

input::placeholder {
    color: var(--color-subtle);
}

.search-form button,
.form-grid > button,
.modal-search button,
.modal-footer-actions button,
.card-toolbar button {
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid var(--color-primary);
    border-radius: 10px;
    color: #fff;
    background: var(--color-primary);
    box-shadow: 0 5px 14px rgba(1, 175, 222, 0.18);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-form button:hover,
.form-grid > button:hover,
.modal-search button:hover,
.modal-footer-actions button:hover,
.card-toolbar button:hover {
    transform: translateY(-1px);
    border-color: var(--color-primary-hover);
    background: var(--color-primary-hover);
    box-shadow: 0 8px 20px rgba(1, 175, 222, 0.25);
}

.filter-dropdown-btn,
#reset-btn,
#detail-close-btn,
#detail-reset-password-btn {
    color: var(--color-muted) !important;
    background: var(--color-surface) !important;
    border-color: var(--color-border) !important;
    box-shadow: none !important;
}

.filter-dropdown-btn:hover,
#reset-btn:hover,
#detail-close-btn:hover,
#detail-reset-password-btn:hover {
    color: var(--color-text) !important;
    background: var(--color-surface-muted) !important;
}

.filter-dropdown-btn {
    min-height: 44px;
    padding: 9px 13px;
    border-radius: 10px;
}

.filter-menu {
    top: calc(100% + 8px);
    padding: 6px;
    border-color: var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-raised);
    box-shadow: var(--shadow-popover);
}

.filter-menu button {
    border-radius: 8px;
    color: var(--color-muted);
    background: transparent;
}

.filter-menu button:hover,
.filter-menu button.active {
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
}

.form-grid {
    gap: 18px;
    max-width: 560px;
    margin: 2px 0 0;
}

.form-grid label {
    margin-bottom: 7px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 700;
}

.selected-label {
    border-radius: 9px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
    font-weight: 700;
}

table {
    color: var(--color-text);
    font-size: 14px;
}

th,
td {
    height: 52px;
    padding: 12px 14px;
    border-bottom-color: var(--color-border);
}

th {
    color: var(--color-muted);
    background: var(--color-surface-muted);
    font-size: 13px;
    font-weight: 750;
}

thead th:first-child {
    border-radius: 10px 0 0 10px;
}

thead th:last-child {
    border-radius: 0 10px 10px 0;
}

tbody tr {
    transition: background-color 0.15s ease;
}

tbody tr:hover,
tr.row-click:hover {
    background: var(--color-primary-soft);
}

.pagination {
    gap: 8px;
    margin-top: 22px;
}

.pagination button {
    min-width: 38px;
    min-height: 38px;
    padding: 6px 10px;
    border-color: var(--color-border);
    border-radius: 10px;
    color: var(--color-muted);
    background: var(--color-surface);
    font-weight: 700;
}

.pagination button:hover:not(:disabled) {
    color: var(--color-primary-strong);
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

.pagination button.active {
    color: #fff;
    border-color: var(--color-primary);
    background: var(--color-primary);
    box-shadow: 0 6px 16px rgba(1, 175, 222, 0.2);
}

.modal-overlay {
    padding: 24px;
    background: rgba(9, 17, 29, 0.54);
    backdrop-filter: blur(8px);
}

.modal-box {
    width: min(520px, 100%);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    color: var(--color-text);
    background: var(--color-surface-raised);
    box-shadow: 0 28px 80px rgba(9, 17, 29, 0.28);
}

.modal-header,
.modal-search,
.modal-footer,
.modal-footer-actions,
.detail-row,
.modal-list-item {
    border-color: var(--color-border);
}

.modal-header {
    padding: 20px 22px;
}

.modal-header h2 {
    color: var(--color-text);
    font-size: 18px;
    font-weight: 800;
}

.modal-close-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--color-muted);
    transition: color 0.15s ease, background 0.15s ease;
}

.modal-close-btn:hover {
    color: var(--color-text);
    background: var(--color-surface-muted);
}

.modal-list-item {
    min-height: 52px;
    color: var(--color-text);
}

.modal-list-item:hover,
.modal-list-item.selected {
    background: var(--color-primary-soft);
}

.detail-row .detail-label,
.modal-list-item .corp-id,
.result-trip-dates {
    color: var(--color-muted);
}

.tabs {
    gap: 8px;
    border-color: var(--color-border);
}

.tab-btn {
    border-radius: 9px 9px 0 0;
    color: var(--color-muted);
    font-weight: 650;
}

.tab-btn.active {
    color: var(--color-primary-strong);
    border-bottom-color: var(--color-primary);
    background: var(--color-primary-soft);
}

.radio-field.invalid {
    border-color: var(--color-danger);
    background: color-mix(in srgb, var(--color-danger) 8%, var(--color-surface));
}

.field-warning,
.result-message.error {
    color: var(--color-danger);
}

.result-message.success {
    color: var(--color-success);
}

.footer {
    margin-left: var(--sidebar-width);
    padding: 8px 32px 28px;
    color: var(--color-subtle);
    font-size: 12px;
}

:root[data-theme="dark"] .result-box,
:root[data-theme="dark"] .u-result-panel {
    background: #080d14;
}

@media (max-width: 900px) {
    :root {
        --header-height: 64px;
    }

    .gnb {
        padding: 0 16px;
    }

    .brand-logo {
        width: 64px;
        height: 44px;
        border-radius: 0;
    }

    .brand-logo img {
        width: 64px;
        height: 64px;
    }

    .brand-copy small,
    .gnb-profile {
        display: none;
    }

    .admin-layout {
        display: flex;
        flex-direction: column;
        padding: 0 16px 32px;
    }

    .sidebar {
        position: static;
        order: 0;
        width: calc(100% + 32px);
        margin: 0 -16px 24px;
        padding: 14px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .sidebar-group-links {
        display: flex;
        gap: 6px;
        padding-bottom: 4px;
        overflow-x: auto;
    }

    .sidebar a {
        flex: 0 0 auto;
        margin-left: 0;
        white-space: nowrap;
    }

    .sidebar a.active::before {
        display: none;
    }

    .admin-content {
        order: 1;
    }

    .page-title {
        margin-bottom: 18px;
        font-size: 24px;
    }

    .card {
        padding: 18px;
        border-radius: 15px;
    }

    .search-form input {
        min-width: 0;
    }

    .footer {
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .brand-copy strong {
        font-size: 15px;
    }

    .gnb-actions {
        gap: 7px;
    }

    .profile-avatar {
        width: 32px;
        height: 32px;
    }

    .search-form,
    .modal-search {
        align-items: stretch;
    }

    .search-form > *,
    .search-form input,
    .filter-dropdown,
    .filter-dropdown-btn {
        width: 100%;
    }

    .search-form button {
        flex: 1;
    }

    .modal-overlay {
        padding: 12px;
    }
}

/* Luno-inspired dashboard refinements: denser desktop canvas and clearer form flows. */
:root {
    --sidebar-bg: #111827;
    --sidebar-bg-hover: rgba(255, 255, 255, 0.07);
    --sidebar-text: #aeb8c7;
    --sidebar-heading: #f8fafc;
}

:root[data-theme="dark"] {
    --sidebar-bg: #070c13;
    --sidebar-bg-hover: rgba(255, 255, 255, 0.06);
    --sidebar-text: #93a1b5;
    --sidebar-heading: #f8fafc;
}

.brand-logo {
    width: 78px;
    height: 62px;
    overflow: visible;
}

.brand-logo img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    color: var(--color-text);
    background: var(--color-surface-muted);
    cursor: pointer;
}

.sidebar-toggle span {
    width: 17px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

body.sidebar-open .sidebar-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

body.sidebar-open .sidebar-toggle span:nth-child(2) {
    opacity: 0;
}

body.sidebar-open .sidebar-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.sidebar {
    background: var(--sidebar-bg);
    border-right: 0;
    box-shadow: 12px 0 32px rgba(15, 23, 42, 0.08);
}

.sidebar-group + .sidebar-group {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.sidebar-group-title,
.sidebar-group-title:hover {
    color: var(--sidebar-heading);
}

.sidebar-group-title:hover {
    background: var(--sidebar-bg-hover);
}

.nav-glyph {
    color: #ffffff;
    background: rgba(1, 175, 222, 0.2);
    box-shadow: inset 0 0 0 1px rgba(1, 175, 222, 0.16);
}

.sidebar-group-arrow {
    color: #718096;
}

.sidebar a {
    color: var(--sidebar-text);
}

.sidebar a:hover {
    color: #ffffff;
    background: var(--sidebar-bg-hover);
}

.sidebar a.active {
    color: #ffffff;
    background: linear-gradient(100deg, rgba(1, 175, 222, 0.3), rgba(1, 175, 222, 0.12));
    box-shadow: inset 0 0 0 1px rgba(34, 199, 242, 0.18);
}

.sidebar a.active::before {
    background: #22c7f2;
    box-shadow: 0 0 12px rgba(34, 199, 242, 0.7);
}

.admin-layout {
    padding-top: 28px;
}

.page-title {
    margin-bottom: 20px;
    font-size: 26px;
}

.page-title::after {
    width: 30px;
    height: 3px;
    margin-top: 10px;
}

/* Create/change workflows use a split information + workspace composition. */
.form-page .admin-content {
    max-width: 1180px;
}

.form-page .admin-content > .card {
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(480px, 1.55fr);
    column-gap: clamp(28px, 3vw, 52px);
    row-gap: 16px;
    align-items: start;
    min-height: 0;
    max-width: 1120px;
    padding: clamp(24px, 2vw, 34px);
}

.form-page .admin-content > .card > .meta {
    position: relative;
    grid-column: 1;
    margin: 0;
    padding: 56px 2px 0;
    border: 0;
    color: var(--color-muted);
    background: transparent;
    font-size: 14px;
    line-height: 1.75;
}

.form-page .admin-content > .card > .meta::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background:
        linear-gradient(135deg, rgba(1, 175, 222, 0.96), rgba(8, 120, 213, 0.94));
    box-shadow: 0 10px 24px rgba(1, 175, 222, 0.24);
}

.form-page .admin-content > .card > .meta::after {
    content: "i";
    position: absolute;
    top: 8px;
    left: 17px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    font-family: Georgia, serif;
}

.form-page .admin-content > .card > .form-grid {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 18px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: var(--color-surface-muted);
}

.form-page .form-grid > div {
    min-width: 0;
}

.form-page .form-grid > div:only-of-type {
    grid-column: 1 / -1;
}

.form-page .form-grid > .radio-field {
    grid-column: 1 / -1;
}

.form-page .form-grid > button {
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 112px;
    margin-top: 4px;
}

.form-page .admin-content > .card > .result-message,
.form-page .admin-content > .card > .result-trip-dates,
.form-page .admin-content > .card > .content-box,
.form-page .admin-content > .card > .partner-tree {
    grid-column: 2;
}

.form-page .admin-content > .page-title.u-mt-32 {
    margin-top: 36px;
}

.form-page .form-grid input,
.form-page .filter-dropdown-btn {
    width: 100%;
}

.form-page .selected-label {
    display: block;
    width: 100%;
    margin: 8px 0 0;
}

.form-page .selected-label.u-hidden {
    display: none;
}

.card table {
    min-width: 780px;
}

.card:has(table) {
    overflow-x: auto;
}

@media (min-width: 1600px) {
    .admin-layout {
        padding: 34px 40px 52px calc(var(--sidebar-width) + 40px);
    }

    .admin-content {
        max-width: none;
    }

    .card {
        padding: 26px 28px;
    }

    .form-page .admin-content > .card {
        grid-template-columns: 300px minmax(620px, 1fr);
        min-height: 0;
    }
}

@media (max-width: 1360px) {
    .form-page .admin-content > .card {
        grid-template-columns: 230px minmax(0, 1fr);
        column-gap: 28px;
    }

    .form-page .admin-content > .card > .form-grid {
        grid-template-columns: 1fr;
    }

    .form-page .form-grid > div,
    .form-page .form-grid > button {
        grid-column: 1;
    }
}

@media (max-width: 1100px) {
    body::after {
        content: "";
        position: fixed;
        inset: var(--header-height) 0 0;
        z-index: 35;
        background: rgba(7, 12, 19, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        backdrop-filter: blur(2px);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open::after {
        opacity: 1;
    }

    .sidebar-toggle {
        display: flex;
        flex: 0 0 auto;
    }

    .gnb .brand {
        min-width: 0;
        margin-right: auto;
    }

    .admin-layout {
        display: block;
        padding: 28px 24px 40px;
    }

    .sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        bottom: 0;
        z-index: 40;
        display: block;
        width: 286px;
        margin: 0;
        padding: 20px 16px 32px;
        overflow-y: auto;
        border: 0;
        transform: translateX(-102%);
        transition: transform 0.22s ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-group-links {
        display: block;
        overflow: visible;
    }

    .sidebar a {
        display: block;
        margin-left: 38px;
    }

    .sidebar a.active::before {
        display: block;
    }

    .footer {
        margin-left: 0;
    }
}

@media (max-width: 820px) {
    .form-page .admin-content > .card {
        display: block;
        min-height: 0;
        padding: 20px;
    }

    .form-page .admin-content > .card > .meta {
        margin-bottom: 20px;
        padding: 0 0 0 54px;
        min-height: 42px;
    }

    .form-page .admin-content > .card > .meta::before {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .form-page .admin-content > .card > .meta::after {
        top: 6px;
        left: 15px;
    }

    .form-page .admin-content > .card > .form-grid {
        padding: 18px;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 16px;
    }

    .gnb {
        gap: 8px;
        padding: 0 12px;
    }

    .brand-logo {
        width: 54px;
        height: 52px;
    }

    .brand-logo img {
        width: 52px;
        height: 52px;
    }

    .brand-copy {
        display: none;
    }

    .admin-layout {
        padding: 22px 14px 32px;
    }

    .page-title {
        font-size: 22px;
    }

    .card,
    .form-page .admin-content > .card {
        padding: 16px;
        border-radius: 14px;
    }

    .form-page .admin-content > .card > .form-grid {
        padding: 14px;
        border-radius: 12px;
    }

    .form-page .form-grid > button {
        width: 100%;
    }

    th,
    td {
        height: 48px;
        padding: 10px 12px;
    }
}

/* Compact interaction refinements for event management and responsive navigation. */
.gnb .brand {
    gap: 9px;
    min-width: 190px;
}

.brand-logo {
    width: 64px;
    height: 54px;
}

.brand-logo img {
    width: 54px;
    height: 54px;
}

.brand-copy {
    gap: 3px;
}

.brand-copy strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1;
}

.brand-copy strong::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.brand-copy small {
    margin-top: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.page-description {
    margin: -2px 0 20px;
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
}

.filter-menu {
    top: calc(100% + 6px);
    min-width: 136px;
    padding: 4px;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(9, 17, 29, 0.11);
}

.filter-menu button {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
}

.filter-menu button:hover {
    color: var(--color-text);
    background: var(--color-surface-muted);
}

.filter-menu button.active {
    color: var(--color-primary-strong);
    background: transparent;
    font-weight: 700;
}

.modal-list-item {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 14px;
}

.modal-list-item:hover {
    background: var(--color-surface-muted);
}

.modal-list-item.selected {
    color: var(--color-primary-strong);
    background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
}

.event-type-grid {
    gap: 0;
    padding: 10px 20px 16px;
}

.event-type-grid label {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
}

.event-type-grid label:hover {
    background: var(--color-surface-muted);
}

.vehicle-modal-footer {
    justify-content: center;
}

.vehicle-modal-footer .pagination {
    width: 100%;
    justify-content: center;
}

.modal-helper {
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.55;
}

.modal-primary-btn {
    min-width: 88px;
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid var(--color-primary);
    border-radius: 9px;
    color: #fff;
    background: var(--color-primary);
    box-shadow: 0 5px 14px rgba(1, 175, 222, 0.2);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.modal-primary-btn:hover {
    transform: translateY(-1px);
    background: var(--color-primary-hover);
    box-shadow: 0 8px 20px rgba(1, 175, 222, 0.24);
}

@media (max-width: 1100px) {
    .gnb .brand {
        min-width: 0;
    }

    .brand-logo {
        width: 58px;
        height: 50px;
    }

    .brand-logo img {
        width: 50px;
        height: 50px;
    }

    .sidebar-toggle {
        order: 4;
    }
}

@media (max-width: 700px) {
    .event-type-grid {
        grid-template-columns: 1fr 1fr;
    }

    .event-filter-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .event-filter-footer .modal-primary-btn {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .brand-logo {
        width: 50px;
        height: 46px;
    }

    .brand-logo img {
        width: 46px;
        height: 46px;
    }

    .event-page .page-description {
        margin-bottom: 16px;
        font-size: 13px;
    }

    .event-type-grid {
        grid-template-columns: 1fr;
        padding-inline: 14px;
    }
}

/* Shared hierarchy and component scale across aid admin. */
:root {
    --font-body: 1rem;
    --font-control: 0.9375rem;
    --font-label: 0.9375rem;
    --font-meta: 0.875rem;
    --radius-control: 9px;
    --radius-card: 16px;
    --space-component: 16px;
    --space-section: 24px;
}

body {
    font-size: var(--font-body);
}

.admin-content {
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--color-muted) 45%, transparent) transparent;
}

.admin-content::-webkit-scrollbar {
    height: 8px;
}

.admin-content::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-muted) 42%, transparent);
}

.page-title {
    margin-bottom: var(--space-section);
    font-size: 28px;
    line-height: 1.3;
}

.page-title::after {
    width: 32px;
    height: 3px;
    margin-top: 10px;
}

.card {
    padding: 26px 28px;
    border-radius: var(--radius-card);
}

.card + .card {
    margin-top: var(--space-section);
}

.admin-content > .card,
.card:has(table) {
    overflow: visible;
}

.admin-content .u-overflow-x {
    overflow-x: visible;
}

.card > .page-title {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.card > .page-title::after {
    display: none;
}

.page-description {
    font-size: 15px;
}

.meta {
    font-size: var(--font-meta);
    line-height: 1.6;
}

.search-form {
    gap: 10px;
    margin-bottom: var(--space-component);
    padding-bottom: var(--space-component);
}

.search-form input,
.form-grid input,
.modal-search input,
.detail-value input[type="number"],
.filter-dropdown-btn,
.search-form button,
.form-grid > button,
.modal-search button,
.modal-footer-actions button,
.card-toolbar button,
.modal-primary-btn {
    min-height: 44px;
    border-radius: var(--radius-control);
    font-size: var(--font-control);
}

.form-grid {
    gap: 18px;
}

.form-grid label,
.detail-row,
.selected-label,
.result-message,
.result-trip-dates {
    font-size: var(--font-label);
    line-height: 1.55;
}

.form-grid label {
    margin-bottom: 8px;
    font-weight: 700;
}

table {
    font-size: 15px;
}

th {
    font-size: 14px;
    font-weight: 700;
}

th,
td {
    height: 52px;
    padding: 12px 14px;
    line-height: 1.45;
}

.tabs {
    margin-bottom: 20px;
}

.tab-btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 15px;
}

.sidebar-group-title {
    min-height: 44px;
    font-size: 15px;
}

.sidebar a {
    min-height: 40px;
    padding-block: 9px;
    font-size: 14px;
    line-height: 1.55;
}

.sidebar-group-links {
    padding-top: 3px;
}

.sidebar-group.collapsed .sidebar-group-links {
    display: none;
}

.modal-header h2 {
    font-size: 19px;
}

.modal-list-item {
    font-size: 15px;
    line-height: 1.5;
}

.pagination button {
    min-width: 38px;
    min-height: 38px;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .admin-content {
        width: 100%;
    }

    .page-title {
        font-size: 25px;
    }
}

@media (max-width: 700px) {
    :root {
        --font-body: 0.9375rem;
        --font-control: 0.9375rem;
        --font-label: 0.875rem;
    }

    .admin-content {
        padding-bottom: 12px;
    }

    .page-title {
        margin-bottom: 18px;
        font-size: 22px;
    }

    .card,
    .form-page .admin-content > .card {
        padding: 18px;
        border-radius: 14px;
    }

    .card > .page-title {
        font-size: 17px;
    }

    .page-description {
        font-size: 14px;
    }

    .search-form {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .search-form > *,
    .search-form input,
    .search-form button,
    .search-form .filter-dropdown,
    .search-form .filter-dropdown-btn {
        width: 100%;
        flex: none;
    }

    .search-form input,
    .form-grid input,
    .modal-search input,
    .detail-value input[type="number"] {
        font-size: 16px;
    }

    table {
        font-size: 14px;
    }

    th {
        font-size: 13px;
    }

    th,
    td {
        height: 48px;
        padding: 10px 12px;
    }

    .sidebar-group-title {
        font-size: 15px;
    }

    .sidebar a,
    .modal-list-item,
    .tab-btn {
        font-size: 14px;
    }
}

/* Minimal motion and clearly separated light/dark surfaces. */
:root {
    --shadow-card: none;
    --motion-fast: 160ms;
    --motion-base: 240ms;
    --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="dark"] {
    --color-bg: #0a1119;
    --color-surface: #131f2c;
    --color-surface-raised: #1b2b3c;
    --color-surface-muted: #0e1823;
    --color-border: #344a63;
    --color-text: #f4f7fb;
    --color-muted: #b3c0d1;
    --color-subtle: #8999ae;
    --shadow-card: none;
    --shadow-popover: 0 18px 48px rgba(0, 0, 0, 0.38);
    --sidebar-bg: #050a10;
    --sidebar-bg-hover: rgba(255, 255, 255, 0.09);
    --sidebar-text: #b1bed0;
}

.gnb,
.sidebar,
.card,
.form-grid,
.meta,
input,
select,
textarea,
.filter-dropdown-btn,
.pagination button,
th,
td {
    transition:
        color var(--motion-fast) ease,
        background-color var(--motion-base) ease,
        border-color var(--motion-base) ease;
}

.sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: none;
}

.card {
    box-shadow: none;
    transition:
        background-color var(--motion-base) ease,
        border-color var(--motion-base) ease;
}

.sidebar-group-links {
    display: block;
    max-height: var(--submenu-height, 0px);
    padding-top: 3px;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transform-origin: top;
    transition: none;
}

.sidebar.sidebar-ready .sidebar-group-links {
    transition:
        max-height 280ms var(--motion-ease),
        opacity 180ms ease,
        transform 240ms var(--motion-ease),
        padding-top 240ms var(--motion-ease);
}

.sidebar-group.collapsed .sidebar-group-links {
    display: block;
    max-height: 0;
    padding-top: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-5px);
}

.sidebar-group-arrow {
    transform-origin: center;
    transition: none;
}

.sidebar.sidebar-ready .sidebar-group-arrow {
    transition: color var(--motion-fast) ease, transform 260ms var(--motion-ease);
}

.sidebar-group.collapsed .sidebar-group-arrow {
    transform: rotate(-90deg);
}

.sidebar-group-title,
.sidebar a,
.tab-btn,
.filter-menu button,
.pagination button,
.modal-list-item,
.calendar-day {
    transition:
        color var(--motion-fast) ease,
        background-color var(--motion-fast) ease,
        border-color var(--motion-fast) ease,
        transform var(--motion-fast) var(--motion-ease);
}

.sidebar-group-title:active,
.sidebar a:active,
button:active:not(:disabled) {
    transform: scale(0.985);
}

.sidebar-group-title:active {
    transform: none;
}

tbody tr {
    transition: background-color var(--motion-fast) ease;
}

tbody tr:hover,
tr.row-click:hover {
    background: color-mix(in srgb, var(--color-primary) 7%, var(--color-surface));
}

.modal-overlay.open .modal-box {
    animation: modal-enter 200ms var(--motion-ease) both;
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

:root[data-theme="dark"] .gnb {
    background: rgba(15, 25, 36, 0.97);
    border-bottom-color: #34485f;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .modal-box {
    border-color: #354b64;
    background: var(--color-surface);
}

:root[data-theme="dark"] .form-page .admin-content > .card > .form-grid,
:root[data-theme="dark"] .form-grid,
:root[data-theme="dark"] th {
    background: var(--color-surface-muted);
}

:root[data-theme="dark"] .meta,
:root[data-theme="dark"] .selected-label {
    border-color: rgba(34, 199, 242, 0.22);
    background: rgba(34, 199, 242, 0.1);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .filter-dropdown-btn,
:root[data-theme="dark"] .pagination button {
    border-color: #3a5069;
    background: #09131d !important;
}

:root[data-theme="dark"] th {
    border-bottom-color: #3a5069;
    background: #0c1722;
}

:root[data-theme="dark"] td {
    border-bottom-color: #283b50;
    background: var(--color-surface);
}

:root[data-theme="dark"] .modal-footer,
:root[data-theme="dark"] .account-summary,
:root[data-theme="dark"] .settings-section {
    border-color: #3a5069;
    background: var(--color-surface-raised);
}

:root[data-theme="dark"] tbody tr:hover,
:root[data-theme="dark"] tr.row-click:hover {
    background: rgba(34, 199, 242, 0.08);
}

/* Account list: keep the wide table inside its card while the content pane owns overflow. */
.account-list-card {
    width: 100%;
    min-width: 1496px;
}

.account-list-card .u-overflow-x {
    width: 100%;
}

/* Compact select menus: one quiet surface instead of a stack of outlined buttons. */
.filter-menu {
    min-width: 140px;
    padding: 4px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface-raised);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.11);
}

.filter-menu button,
.search-form .filter-menu button,
.detail-value .filter-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 8px 10px;
    border: 0 !important;
    border-radius: 6px;
    color: var(--color-text);
    background: transparent !important;
    box-shadow: none !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transform: none !important;
    transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.filter-menu button + button {
    margin-top: 2px;
}

.filter-menu button:hover,
.filter-menu button:focus-visible {
    color: var(--color-text);
    background: var(--color-surface-muted) !important;
    outline: none;
}

.filter-menu button.active {
    color: var(--color-primary-strong);
    background: var(--color-primary-soft) !important;
    font-weight: 700;
}

.filter-menu button.active::after {
    content: "\2713";
    margin-left: 14px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 800;
}

:root[data-theme="dark"] .filter-menu {
    border-color: #304055;
    background: #101923;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .filter-menu button:hover,
:root[data-theme="dark"] .filter-menu button:focus-visible {
    background: #182535 !important;
}

:root[data-theme="dark"] .filter-menu button.active {
    background: rgba(34, 199, 242, 0.12) !important;
}

/* Shared task forms: a single readable workflow surface for create/change pages. */
.form-page .admin-content {
    width: min(100%, 1040px);
    max-width: 1040px;
}

.form-page .admin-content > .card {
    display: block;
    width: 100%;
    max-width: 960px;
    min-height: 0;
    padding: 24px;
}

.form-page .admin-content > .card:has(> .form-grid) {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
}

.form-page .admin-content > .card > .meta {
    position: relative;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 20px 24px 20px 66px;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    color: var(--color-muted);
    background: color-mix(in srgb, var(--color-surface-muted) 72%, var(--color-surface));
    font-size: 15px;
    line-height: 1.65;
}

.form-page .admin-content > .card > .meta::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 24px;
    width: 28px;
    height: 28px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 24%, var(--color-border));
    border-radius: 9px;
    background: var(--color-primary-soft);
    box-shadow: none;
}

.form-page .admin-content > .card > .meta::after {
    content: "i";
    position: absolute;
    top: 21px;
    left: 35px;
    color: var(--color-primary-strong);
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.form-page .admin-content > .card > .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 28px 24px 24px;
    border: 0;
    border-radius: 0;
    background: var(--color-surface);
}

.form-page .form-grid > div {
    min-width: 0;
}

.form-page .form-grid > div:only-of-type {
    grid-column: 1 / -1;
    width: min(100%, 560px);
}

.form-page .form-grid label {
    margin-bottom: 9px;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

.form-page .form-grid input,
.form-page .filter-dropdown-btn {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
}

.form-page .form-grid > button {
    grid-column: 1 / -1;
    justify-self: end;
    min-width: 128px;
    min-height: 46px;
    margin-top: 2px;
    padding-inline: 24px;
}

.form-page .selected-label {
    margin-top: 9px;
    padding: 9px 11px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 20%, var(--color-border));
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.form-page .admin-content > .card > .result-message,
.form-page .admin-content > .card > .result-trip-dates {
    width: auto;
    margin: 0 24px 24px;
}

.form-page .admin-content > .card > .result-message:not(:empty) {
    padding: 12px 14px;
    border: 1px solid currentColor;
    border-radius: 9px;
    background: color-mix(in srgb, currentColor 7%, transparent);
}

.form-page .result-message:empty,
.form-page .result-trip-dates:empty {
    display: none;
}

:root[data-theme="dark"] .form-page .admin-content > .card > .meta {
    border-bottom-color: #32445a;
    background: #152130;
}

@media (max-width: 820px) {
    .form-page .admin-content > .card,
    .form-page .admin-content > .card:has(> .form-grid) {
        padding: 0;
    }

    .form-page .admin-content > .card:not(:has(> .form-grid)) {
        padding: 20px;
    }

    .form-page .admin-content > .card > .meta {
        margin: 0;
        padding: 18px 20px 18px 60px;
        min-height: 0;
    }

    .form-page .admin-content > .card > .meta::before {
        top: 16px;
        left: 20px;
        width: 28px;
        height: 28px;
    }

    .form-page .admin-content > .card > .meta::after {
        top: 19px;
        left: 31px;
    }

    .form-page .admin-content > .card > .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 22px 20px 20px;
    }

    .form-page .form-grid > div,
    .form-page .form-grid > div:only-of-type,
    .form-page .form-grid > button {
        grid-column: 1;
        width: 100%;
        max-width: none;
    }

    .form-page .form-grid > button {
        justify-self: stretch;
    }

    .form-page .admin-content > .card > .result-message,
    .form-page .admin-content > .card > .result-trip-dates {
        margin: 0 20px 20px;
    }
}

/* Shared selection modal: spacious rows, clear hierarchy, centered pagination. */
.modal-overlay {
    padding: 24px;
    background: rgba(10, 18, 30, 0.58);
    backdrop-filter: blur(6px);
}

.modal-box:has(.modal-list) {
    width: min(680px, 100%);
    max-height: min(760px, calc(100dvh - 48px));
    border-radius: 18px;
}

.modal-box:has(.modal-list) .modal-header {
    min-height: 76px;
    padding: 20px 24px;
}

.modal-box:has(.modal-list) .modal-header h2 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.modal-box:has(.modal-list) .modal-close-btn {
    width: 38px;
    height: 38px;
    font-size: 22px;
}

.modal-box:has(.modal-list) .modal-search {
    gap: 10px;
    padding: 16px 20px;
    background: var(--color-surface);
}

.modal-box:has(.modal-list) .modal-search input {
    min-width: 0;
    min-height: 48px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 16px;
}

.modal-box:has(.modal-list) .modal-search button {
    flex: 0 0 auto;
    min-width: 86px;
    min-height: 48px;
    padding-inline: 18px;
    font-size: 15px;
}

.modal-box:has(.modal-list) .modal-list {
    min-height: 300px;
    background: var(--color-surface);
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--color-muted) 38%, transparent) transparent;
}

.modal-box:has(.modal-list) .modal-list-item {
    min-height: 60px;
    gap: 16px;
    padding: 14px 20px;
    color: var(--color-text);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.5;
}

.modal-box:has(.modal-list) .modal-list-item > span:first-child {
    min-width: 0;
}

.modal-box:has(.modal-list) .modal-list-item .corp-id {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.modal-box:has(.modal-list) .modal-list-item > .corp-id {
    flex: 0 0 auto;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

.modal-box:has(.modal-list) .modal-list-item:hover {
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface));
}

.modal-box:has(.modal-list) .modal-list-item.selected {
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
}

.modal-box:has(.modal-list) .modal-selected-summary {
    gap: 8px;
    padding: 12px 20px;
}

.modal-box:has(.modal-list) .modal-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    min-height: 72px;
    padding: 12px 20px;
    background: var(--color-surface-raised);
}

.modal-box:has(.modal-list) .modal-footer .pagination {
    grid-column: 2;
    justify-self: center;
    justify-content: center;
    width: max-content;
    margin: 0;
}

.modal-box:has(.modal-list) .modal-footer > button {
    grid-column: 3;
    justify-self: end;
}

.modal-box:has(.modal-list) .pagination button {
    min-width: 40px;
    min-height: 40px;
    border-radius: 9px;
    font-size: 14px;
}

:root[data-theme="dark"] .modal-box:has(.modal-list) .modal-search,
:root[data-theme="dark"] .modal-box:has(.modal-list) .modal-list {
    background: var(--color-surface);
}

:root[data-theme="dark"] .modal-box:has(.modal-list) .modal-footer {
    background: var(--color-surface-raised);
}

@media (max-width: 560px) {
    .modal-overlay {
        padding: 10px;
    }

    .modal-box:has(.modal-list) {
        max-width: 100%;
        max-height: calc(100dvh - 20px);
        border-radius: 15px;
    }

    .modal-box:has(.modal-list) .modal-header {
        min-height: 66px;
        padding: 15px 16px;
    }

    .modal-box:has(.modal-list) .modal-header h2 {
        font-size: 18px;
    }

    .modal-box:has(.modal-list) .modal-search {
        padding: 12px 14px;
    }

    .modal-box:has(.modal-list) .modal-search input {
        min-height: 46px;
    }

    .modal-box:has(.modal-list) .modal-search button {
        min-width: 72px;
        min-height: 46px;
        padding-inline: 14px;
    }

    .modal-box:has(.modal-list) .modal-list {
        min-height: 240px;
    }

    .modal-box:has(.modal-list) .modal-list-item {
        min-height: 58px;
        gap: 8px;
        padding: 12px 15px;
        font-size: 15px;
    }

    .modal-box:has(.modal-list) .modal-list-item > .corp-id {
        max-width: 42%;
        white-space: normal;
    }

    .modal-box:has(.modal-list) .modal-footer {
        grid-template-columns: 1fr;
        gap: 10px;
        min-height: 66px;
        padding: 10px 14px;
    }

    .modal-box:has(.modal-list) .modal-footer .pagination,
    .modal-box:has(.modal-list) .modal-footer > button {
        grid-column: 1;
        justify-self: center;
    }
}

/* Modal footer actions share the same primary action treatment. */
.modal-footer > button {
    min-width: 96px;
    min-height: 44px;
    padding: 9px 18px;
    border: 1px solid var(--color-primary);
    border-radius: 9px;
    color: #fff;
    background: var(--color-primary);
    box-shadow: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        color var(--motion-fast) ease,
        background-color var(--motion-fast) ease,
        border-color var(--motion-fast) ease,
        transform var(--motion-fast) var(--motion-ease);
}

.modal-footer > button:hover {
    border-color: var(--color-primary-hover);
    background: var(--color-primary-hover);
    transform: translateY(-1px);
}

.modal-footer > button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 24%, transparent);
    outline-offset: 2px;
}

/* Keep the final settings group anchored to the bottom of the sidebar. */
.sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-settings {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Minimal responsive login. */
.login-page {
    min-height: 100dvh;
    padding-top: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 8% 4%, rgba(1, 175, 222, 0.1), transparent 32%),
        radial-gradient(circle at 94% 94%, rgba(8, 120, 213, 0.07), transparent 30%),
        var(--color-bg);
}

.login-shell {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: 48px 20px 64px;
}

.login-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2;
    background: var(--color-surface);
}

.login-card {
    width: min(100%, 480px);
    padding: 46px 50px 50px;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    background: var(--color-surface);
    box-shadow: 0 24px 70px rgba(18, 35, 58, 0.12);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    margin-bottom: 42px;
}

.login-brand img {
    width: 84px;
    height: 84px;
    object-fit: contain;
}

.login-brand > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-brand strong {
    color: var(--color-text);
    font-size: 26px;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.login-brand span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.login-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 700;
}

.login-field input {
    width: 100%;
    min-height: 54px;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text);
    background: var(--color-surface);
    font-size: 16px;
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.login-field input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(1, 175, 222, 0.12);
}

.login-submit {
    width: 100%;
    min-height: 54px;
    margin-top: 6px;
    border: 1px solid var(--color-primary);
    border-radius: 10px;
    color: #fff;
    background: var(--color-primary);
    font-size: 16px;
    font-weight: 750;
    cursor: pointer;
    transition: background-color var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease);
}

.login-submit:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
}

.login-error {
    margin: -6px 0 0;
    color: var(--color-danger);
    font-size: 13px;
    font-weight: 600;
}

.login-footer {
    position: absolute;
    bottom: 22px;
    margin: 0;
    color: var(--color-subtle);
    font-size: 12px;
}

:root[data-theme="dark"] .login-card {
    border-color: #3b526d;
    background: #142130;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

:root[data-theme="dark"] .login-brand img {
    filter: saturate(1.08) brightness(1.08);
}

/* Account settings. */
.settings-page .admin-content {
    width: min(100%, 1180px);
}

.settings-page .page-title {
    margin-bottom: 8px;
}

.settings-page .page-title::after {
    display: none;
}

.settings-page .page-description {
    margin: 0 0 24px;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.6;
}

.account-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px 22px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
}

.account-summary-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), #0878d5);
    font-size: 19px;
    font-weight: 800;
}

.account-summary > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
}

.account-summary strong {
    color: var(--color-text);
    font-size: 17px;
    font-weight: 800;
}

.account-summary > div span {
    overflow: hidden;
    color: var(--color-muted);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-role {
    margin-left: auto;
    padding: 7px 10px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
    border-radius: 999px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.settings-card {
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
}

.settings-card-header {
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--color-border);
}

.settings-card-header h2 {
    margin: 0;
    color: var(--color-text);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.settings-card-header p {
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.55;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 24px 24px;
}

.settings-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 700;
}

.settings-field input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    color: var(--color-text);
    background: var(--color-surface);
    font-size: 15px;
}

.settings-field input[readonly] {
    color: var(--color-muted);
    background: var(--color-surface-muted);
}

.settings-field input:not([readonly]):focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(1, 175, 222, 0.11);
}

.settings-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-height: 44px;
    margin-top: 2px;
}

.settings-actions button {
    flex: 0 0 auto;
    min-width: 126px;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid var(--color-primary);
    border-radius: 9px;
    color: #fff;
    background: var(--color-primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.settings-actions button:hover {
    background: var(--color-primary-hover);
}

.settings-result {
    margin: 0 auto 0 0;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.settings-result:empty {
    display: none;
}

.settings-result.success {
    color: var(--color-success);
}

.settings-result.error {
    color: var(--color-danger);
}

@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .login-shell {
        align-items: center;
        padding: 72px 14px 56px;
    }

    .login-theme-toggle {
        top: 14px;
        right: 14px;
    }

    .login-card {
        padding: 28px 22px 26px;
        border-radius: 17px;
    }

    .login-brand {
        margin-bottom: 30px;
    }

    .account-summary {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 18px;
    }

    .account-role {
        margin-left: 68px;
    }

    .settings-card-header,
    .settings-form {
        padding-inline: 18px;
    }

    .settings-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-actions button {
        width: 100%;
    }
}

/* Header account menu. */
.profile-menu {
    position: relative;
}

.profile-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 4px 7px;
    border: 0;
    border-radius: 11px;
    color: var(--color-text);
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: background-color var(--motion-fast) ease;
}

.profile-menu-toggle:hover,
.profile-menu-toggle:focus-visible,
.profile-menu.open .profile-menu-toggle {
    background: var(--color-surface-muted);
    outline: none;
}

.profile-menu-toggle .profile-avatar {
    margin-left: 0;
}

.profile-menu-arrow {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: var(--color-muted);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform-origin: 50% 50%;
    transition: transform 180ms var(--motion-ease);
}

.profile-menu.open .profile-menu-arrow {
    transform: rotate(180deg);
}

.profile-menu-toggle:active:not(:disabled) {
    transform: none;
}

.profile-menu-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    display: none;
    flex-direction: column;
    width: 164px;
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface-raised);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

.profile-menu.open .profile-menu-popover {
    display: flex;
    animation: profile-menu-enter 150ms var(--motion-ease) both;
}

.gnb .profile-menu-popover a,
.gnb .profile-menu-popover button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    color: var(--color-text);
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    margin-left: 0;
    opacity: 1;
    cursor: pointer;
}

.gnb .profile-menu-popover a:hover,
.gnb .profile-menu-popover button:hover,
.gnb .profile-menu-popover a:focus-visible,
.gnb .profile-menu-popover button:focus-visible {
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
    text-decoration: none;
    outline: none;
}

.profile-menu-popover span[aria-hidden="true"] {
    display: inline-grid;
    place-items: center;
    width: 18px;
    color: var(--color-muted);
}

:root[data-theme="dark"] .profile-menu-popover {
    border-color: #405873;
    background: #1a2a3b;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.46);
}

@keyframes profile-menu-enter {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 900px) {
    .profile-menu-toggle {
        gap: 5px;
        padding-inline: 5px;
    }

    .profile-menu-popover {
        right: -4px;
    }
}

/* Secondary information stays quiet across list, selection, and form screens. */
.meta {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--color-muted);
    background: transparent;
    font-size: 14px;
    font-weight: 550;
    line-height: 1.55;
}

.card > .meta {
    margin-bottom: 16px;
}

.form-page .admin-content > .card > .meta {
    position: static;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 22px 24px 0;
    border: 0;
    color: var(--color-muted);
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.65;
}

.form-page .admin-content > .card > .meta::before,
.form-page .admin-content > .card > .meta::after {
    content: none;
    display: none;
}

:root[data-theme="dark"] .meta,
:root[data-theme="dark"] .form-page .admin-content > .card > .meta {
    border-color: transparent;
    background: transparent;
}

@media (max-width: 560px) {
    .login-brand img {
        width: 72px;
        height: 72px;
    }

    .form-page .admin-content > .card > .meta {
        padding: 18px 20px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
