:root {
    color-scheme: dark;
    --bg: #071018;
    --surface: #0d1923;
    --surface-2: #13232f;
    --line: #27404f;
    --text: #e8f4f8;
    --muted: #8eabb8;
    --accent: #39c8e7;
    --accent-2: #9feeff;
    --success: #46d49b;
    --danger: #ff6f7d;
    --warning: #ffc857;
    --shadow: 0 18px 55px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: radial-gradient(circle at 20% -10%, #123346 0, transparent 34rem), var(--bg); font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif; line-height: 1.55; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: white; }
button, input, select, textarea { font: inherit; }
.site-header { min-height: 68px; padding: 0 4vw; display: flex; align-items: center; gap: 28px; border-bottom: 1px solid var(--line); background: rgba(7,16,24,.92); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); }
.brand { color: white; font-weight: 800; letter-spacing: .14em; font-size: 1.2rem; }
.main-nav, .account-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.main-nav { flex: 1; }
.main-nav a, .account-nav a, .link-button { color: var(--muted); font-size: .92rem; }
.main-nav a:hover, .account-nav a:hover, .link-button:hover { color: white; }
.account-nav { justify-content: flex-end; }
.link-button { border: 0; background: none; cursor: pointer; padding: 0; }
.inline-form { display: inline; margin: 0; }
.page-shell { width: min(1500px, 94vw); margin: 0 auto; padding: 42px 0 80px; min-height: calc(100vh - 136px); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; padding: 22px 4vw 40px; }
.hero { min-height: 360px; display: grid; align-items: center; padding: 54px clamp(24px,6vw,88px); border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(115deg, rgba(20,57,75,.95), rgba(9,24,34,.92) 55%, rgba(7,16,24,.98)), radial-gradient(circle at 80% 30%, rgba(57,200,231,.24), transparent 28rem); box-shadow: var(--shadow); }
.hero h1 { max-width: 850px; margin: 8px 0 16px; font-size: clamp(2rem,4.6vw,4.2rem); line-height: 1.08; letter-spacing: -.04em; }
.hero p:not(.eyebrow) { max-width: 720px; color: #b9d0da; font-size: 1.08rem; }
.eyebrow { color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .18em; margin: 0 0 8px; }
.hero-actions, .form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; border: 1px solid #375667; background: #142733; color: var(--text); border-radius: 9px; padding: 8px 15px; cursor: pointer; font-weight: 700; font-size: .9rem; }
.button:hover { color: white; border-color: var(--accent); }
.button.primary { background: var(--accent); color: #041017; border-color: var(--accent); }
.button.danger { background: rgba(255,111,125,.14); color: #ff9da7; border-color: rgba(255,111,125,.5); }
.button.small { min-height: 30px; padding: 4px 9px; font-size: .78rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 15px; margin: 24px 0; }
.stats-grid article { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 22px; display: grid; gap: 4px; }
.stats-grid strong { font-size: 1.65rem; }
.stats-grid span { color: var(--muted); font-size: .85rem; }
.stats-grid.compact { margin-top: 0; }
.grid-two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.panel { border: 1px solid var(--line); background: rgba(13,25,35,.94); border-radius: 15px; padding: 22px; box-shadow: 0 10px 35px rgba(0,0,0,.15); margin-bottom: 20px; }
.panel.narrow, .auth-card { width: min(720px,100%); margin-left: auto; margin-right: auto; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-header h1, .panel-header h2 { margin: 0; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-header { padding: 20px 22px 0; }
.table-scroll { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; color: #aac4cf; background: #0b1720; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; z-index: 2; }
th, td { border-bottom: 1px solid #1e3441; padding: 12px 13px; vertical-align: middle; white-space: nowrap; }
tbody tr:hover { background: rgba(57,200,231,.045); }
td small { display: block; color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.profit { color: var(--success); font-weight: 800; }
.wrap-cell { max-width: 400px; white-space: normal; word-break: break-word; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
.page-heading h1 { margin: 0; font-size: clamp(2rem,4vw,3.2rem); letter-spacing: -.035em; }
.page-heading p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); }
.page-heading.split { align-items: center; }
.filter-grid { display: grid; grid-template-columns: repeat(4,minmax(160px,1fr)); gap: 16px; }
.stack-form { display: grid; gap: 16px; }
.form-grid { margin-bottom: 4px; }
label { display: grid; gap: 7px; color: #bfd4dc; font-size: .84rem; font-weight: 700; }
label small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; border: 1px solid #31505f; background: #09151e; color: var(--text); border-radius: 8px; padding: 10px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(57,200,231,.12); }
textarea { resize: vertical; }
label.check { display: flex; align-items: center; gap: 9px; align-self: end; min-height: 42px; }
label.check input { width: auto; }
.search-bar { display: grid; grid-template-columns: minmax(220px,1fr) minmax(140px,260px) auto; gap: 10px; margin-bottom: 18px; }
.search-bar input:only-of-type { grid-column: span 1; }
.auth-card { border: 1px solid var(--line); background: var(--surface); padding: 28px; border-radius: 15px; box-shadow: var(--shadow); }
.auth-card h1 { margin-top: 0; }
.alert { border: 1px solid; border-radius: 10px; padding: 12px 15px; margin-bottom: 18px; }
.alert.success { color: #99f0cb; background: rgba(70,212,155,.1); border-color: rgba(70,212,155,.38); }
.alert.error { color: #ffadb5; background: rgba(255,111,125,.1); border-color: rgba(255,111,125,.38); }
.badge { display: inline-flex; align-items: center; border: 1px solid #3b5562; background: #13232d; color: #b9cfda; border-radius: 999px; padding: 2px 8px; font-size: .72rem; font-weight: 800; }
.badge.success, .badge.success { border-color: rgba(70,212,155,.4); color: #77e8b7; }
.badge.danger, .badge.failed { border-color: rgba(255,111,125,.45); color: #ff98a2; }
.badge.user, .badge.partial { border-color: rgba(255,200,87,.45); color: #ffd77d; }
.badge.running { border-color: rgba(57,200,231,.5); color: #83e6fa; }
.detail-list { display: grid; gap: 0; margin: 0; }
.detail-list div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid #1d3340; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; }
.detail-list.horizontal { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 22px; }
.detail-list.horizontal div { grid-template-columns: 1fr; gap: 3px; }
.sync-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-bottom: 22px; }
.sync-card { border: 1px solid var(--line); background: var(--surface); border-radius: 13px; padding: 19px; }
.sync-card h2 { margin: 0 0 4px; font-size: 1.05rem; }
.sync-card p { margin: 0 0 18px; color: var(--muted); font-size: .8rem; min-height: 2.5em; }
.inline-editor { display: flex; gap: 6px; align-items: center; }
.inline-editor select { min-width: 130px; padding: 6px; }
.empty, .muted { color: var(--muted); }
.empty-state { min-height: 50vh; display: grid; place-content: center; text-align: center; }
.empty-state h1 { font-size: 4rem; margin: 0; }
@media (max-width: 1100px) {
    .site-header { align-items: flex-start; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
    .main-nav { order: 3; flex-basis: 100%; }
    .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .sync-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
    .page-shell { width: min(94vw,100%); padding-top: 24px; }
    .account-nav { margin-left: auto; }
    .main-nav { gap: 12px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
    .hero { min-height: 300px; padding: 34px 22px; }
    .stats-grid, .grid-two, .filter-grid, .sync-grid, .detail-list.horizontal { grid-template-columns: 1fr; }
    .search-bar { grid-template-columns: 1fr; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .panel { padding: 16px; }
    .table-panel { padding: 0; }
}

.admin-tabs { display:flex; gap:8px; flex-wrap:wrap; margin:-8px 0 20px; }
.admin-tabs a { border:1px solid var(--line); background:var(--surface); padding:7px 11px; border-radius:8px; font-size:.82rem; }

/* Background UEX sync */
.sync-dashboard code { color: var(--accent-2); }
.sync-live-indicator { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:7px 11px; color:var(--muted); font-size:.78rem; font-weight:700; }
.sync-live-dot { width:8px; height:8px; border-radius:50%; background:var(--danger); box-shadow:0 0 0 4px rgba(255,111,125,.12); }
.sync-live-indicator.connected .sync-live-dot { background:var(--success); box-shadow:0 0 0 4px rgba(70,212,155,.12); }
.sync-active-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.sync-job-card { border:1px solid var(--line); background:var(--surface-2); border-radius:13px; padding:18px; }
.sync-job-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.sync-job-heading h3 { margin:0 0 12px; font-size:1.15rem; }
.sync-progress-track, .mini-progress { overflow:hidden; border:1px solid #31505f; background:#08131b; border-radius:999px; }
.sync-progress-track { height:14px; }
.sync-progress-track span, .mini-progress span { display:block; height:100%; background:linear-gradient(90deg,var(--accent),var(--success)); transition:width .35s ease; }
.sync-progress-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0 14px; color:var(--muted); font-size:.82rem; }
.sync-progress-summary strong { color:var(--text); font-size:1rem; }
.sync-job-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; margin:0 0 14px; }
.sync-job-details div { min-width:0; border-bottom:1px solid #1d3340; padding:8px 0; }
.sync-job-details dt { color:var(--muted); font-size:.72rem; }
.sync-job-details dd { margin:2px 0 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sync-job-details small { color:var(--muted); }
.sync-count-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:7px; margin:12px 0; }
.sync-count-grid span { border:1px solid #294452; border-radius:8px; padding:7px; color:var(--muted); font-size:.68rem; text-align:center; }
.sync-count-grid strong { display:block; color:var(--text); font-size:.9rem; }
.mini-progress { width:110px; height:7px; margin-bottom:4px; }
.sync-progress-cell small { color:var(--muted); }
.badge.queued, .badge.starting, .badge.cancel_requested { border-color:rgba(255,200,87,.45); color:#ffd77d; }
.badge.completed { border-color:rgba(70,212,155,.4); color:#77e8b7; }
.badge.cancelled, .badge.stale { border-color:#546974; color:#aabdc5; }
.diagnostic-panel { border-color:rgba(255,200,87,.55); }
.button:disabled { cursor:not-allowed; opacity:.45; }
@media (max-width:1100px) { .sync-active-list { grid-template-columns:1fr; } .sync-count-grid { grid-template-columns:repeat(3,1fr); } }
@media (max-width:720px) { .sync-job-details { grid-template-columns:1fr; } }

/* Inline autocomplete and immediate table filtering */
.autocomplete-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.inline-autocomplete { position: relative; min-width: 0; }
.inline-autocomplete-input { padding-right: 38px; }
.inline-autocomplete-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    z-index: 4;
    width: 26px;
    height: 26px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}
.inline-autocomplete-clear:hover,
.inline-autocomplete-clear:focus-visible { color: var(--text); background: rgba(57,200,231,.1); }
.inline-autocomplete-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 330px;
    overflow: auto;
    border: 1px solid #3b6172;
    border-radius: 10px;
    background: #0a1821;
    box-shadow: 0 18px 45px rgba(0,0,0,.45);
    padding: 6px;
}
.inline-autocomplete-option {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    padding: 9px 10px;
    text-align: left;
    cursor: pointer;
    font-size: .84rem;
    line-height: 1.35;
}
.inline-autocomplete-option:hover,
.inline-autocomplete-option.active { background: rgba(57,200,231,.14); color: #fff; }
.inline-autocomplete-option.selected { color: var(--accent); }
.inline-autocomplete-empty { padding: 13px 10px; color: var(--muted); font-size: .82rem; }
.form-help { margin: 12px 0 0; color: var(--muted); font-size: .78rem; }
.live-search-bar { grid-template-columns: minmax(220px,1fr) auto auto; align-items: stretch; }
.terminal-live-search { grid-template-columns: minmax(250px,1fr) minmax(180px,300px) auto auto; }
.live-clear { min-height: 40px; white-space: nowrap; }
.live-result-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -4px 0 12px; color: var(--muted); font-size: .78rem; }
.live-result-summary span { color: #bdd3dc; font-weight: 800; }
tr[hidden] { display: none !important; }
@media (max-width: 900px) {
    .live-search-bar,
    .terminal-live-search { grid-template-columns: 1fr auto; }
    .terminal-live-search .inline-autocomplete { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .live-search-bar,
    .terminal-live-search { grid-template-columns: 1fr; }
    .live-result-summary { align-items: flex-start; flex-direction: column; gap: 3px; }
}


/* Numeric formatting, responsive market tables and column sorting */
th.num,
td.num {
    text-align: right;
    font-variant-numeric: tabular-nums lining-nums;
}
.action-cell { text-align: right; white-space: nowrap; }
.sortable-column {
    cursor: pointer;
    user-select: none;
    padding-right: 28px;
    outline: none;
}
.sortable-column::after {
    content: '↕';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #597482;
    font-size: .72rem;
    opacity: .75;
}
.sortable-column:hover,
.sortable-column:focus-visible { color: #e8f4f8; background: #10232e; }
.sortable-column:focus-visible { box-shadow: inset 0 0 0 2px rgba(57,200,231,.55); }
.sortable-column.sort-asc::after { content: '▲'; color: var(--accent); opacity: 1; }
.sortable-column.sort-desc::after { content: '▼'; color: var(--accent); opacity: 1; }
th.not-sortable { cursor: default; }

.market-price-table {
    width: 100%;
    min-width: 1120px;
    table-layout: fixed;
    font-size: .82rem;
}
.market-price-table th,
.market-price-table td { padding: 10px 8px; }
.market-price-table th:nth-child(1),
.market-price-table td:nth-child(1) { width: 58px; }
.market-price-table th:nth-child(2),
.market-price-table td:nth-child(2) { width: 170px; }
.market-price-table th:nth-child(3),
.market-price-table td:nth-child(3) { width: 300px; }
.market-price-table th:nth-child(4),
.market-price-table td:nth-child(4) { width: 88px; }
.market-price-table th:nth-child(5),
.market-price-table td:nth-child(5),
.market-price-table th:nth-child(6),
.market-price-table td:nth-child(6),
.market-price-table th:nth-child(7),
.market-price-table td:nth-child(7),
.market-price-table th:nth-child(8),
.market-price-table td:nth-child(8) { width: 96px; }
.market-price-table th:nth-child(9),
.market-price-table td:nth-child(9) { width: 138px; }
.market-price-table th:nth-child(10),
.market-price-table td:nth-child(10) { width: 116px; }
.market-price-table td:nth-child(2),
.market-price-table td:nth-child(3) {
    overflow: hidden;
    text-overflow: ellipsis;
}
.market-price-table .button { width: 100%; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.market-price-panel .table-scroll { scrollbar-gutter: stable; }
@media (max-width: 1200px) {
    .market-price-table { min-width: 1060px; }
    .market-price-table th:nth-child(3),
    .market-price-table td:nth-child(3) { width: 250px; }
}

.hero > div {
    width: 100%;
    max-width: none;
}

.hero .hero-description {
    width: max-content;
    max-width: none;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    line-height: 1.7;
}

@media (max-width: 1100px) {
    .hero .hero-description {
        width: auto;
        white-space: normal;
    }
}
input.numeric-input,
input[data-number-input] {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.account-grid { align-items: start; }
.password-form { max-width: 560px; }
.password-form .button { justify-self: start; }
.target-user-summary {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(9, 24, 33, .72);
}
.target-user-summary span { color: var(--muted); }
.button.danger-outline {
    border-color: #8e4a58;
    color: #ff9cad;
    background: transparent;
}
.button.danger-outline:hover { background: rgba(154, 53, 74, .14); }

.detail-list dd.num { text-align: right; }

.localization-dashboard { display: grid; gap: 18px; }
.localization-import-panel { overflow: visible; }
.localization-import-panel .panel-header { align-items: flex-start; }
.path-hint {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 8px 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(7, 21, 29, .72);
}
.path-hint > span { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.path-hint code {
    overflow: hidden;
    color: #c7e3ec;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notice {
    margin: 0 0 16px;
    padding: 11px 13px;
    border-left: 3px solid var(--accent);
    background: rgba(57, 200, 231, .07);
    color: #a9c9d5;
    line-height: 1.65;
}
.localization-upload-form { display: grid; gap: 14px; }
.file-picker {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}
.file-picker > span:first-child { color: #bed3dc; font-weight: 700; }
.file-picker input[type="file"] {
    grid-column: 2;
    width: 100%;
    min-height: 42px;
    padding: 7px;
    border: 1px solid #2e4e5e;
    border-radius: 8px;
    background: #081821;
    color: var(--text);
}
.file-picker-display {
    grid-column: 2;
    color: var(--muted);
    font-size: .78rem;
    overflow-wrap: anywhere;
}
.localization-upload-form .form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 162px;
}
.localization-stats { margin: 0; }
.localization-dashboard .sync-active-panel { min-height: 160px; }
.localization-dashboard .table-panel table { min-width: 980px; }

@media (max-width: 760px) {
    .path-hint { grid-template-columns: 1fr auto; }
    .path-hint > span { grid-column: 1 / -1; }
    .path-hint code { white-space: normal; overflow-wrap: anywhere; }
    .file-picker { grid-template-columns: 1fr; }
    .file-picker input[type="file"],
    .file-picker-display { grid-column: 1; }
    .localization-upload-form .form-actions { padding-left: 0; flex-wrap: wrap; }
}

.resizable-table {
    table-layout: fixed;
    max-width: none;
}
.resizable-table th,
.resizable-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}
.resizable-table .wrap-cell {
    white-space: normal;
    overflow-wrap: anywhere;
}
.resizable-table th {
    position: sticky;
}
.resizable-table .sortable-column {
    padding-right: 34px;
}
.resizable-table .sortable-column::after {
    right: 15px;
}
.column-resize-handle {
    position: absolute;
    top: 0;
    right: -5px;
    z-index: 8;
    width: 11px;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
}
.column-resize-handle::after {
    content: '';
    position: absolute;
    top: 18%;
    bottom: 18%;
    left: 5px;
    width: 1px;
    background: rgba(128, 169, 187, .38);
    transition: background .15s ease, box-shadow .15s ease;
}
.column-resize-handle:hover::after,
.column-resize-handle.active::after {
    background: var(--accent);
    box-shadow: 0 0 0 1px rgba(57, 200, 231, .2), 0 0 10px rgba(57, 200, 231, .55);
}
body.column-resizing,
body.column-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}
.table-resize-scroll {
    width: 100%;
    overflow-x: auto;
    scrollbar-gutter: stable;
}

.button.disabled,
.button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .55;
    pointer-events: none;
}

.admin-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.admin-menu-card {
    display: grid;
    gap: 8px;
    min-height: 142px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(13,25,35,.94);
    color: var(--text);
    box-shadow: 0 10px 35px rgba(0,0,0,.14);
}
.admin-menu-card:hover {
    border-color: var(--accent);
    background: rgba(18,39,52,.98);
}
.admin-menu-card strong { font-size: 1.25rem; }
.admin-menu-card span { color: var(--muted); font-size: .9rem; }
.permission-summary { max-width: 980px; }

.favorite-route-list { display: grid; gap: 10px; }
.favorite-route-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 14px;
    border: 1px solid #203a48;
    border-radius: 10px;
    background: #0a1720;
}
.favorite-route-item > div:first-child { min-width: 0; }
.favorite-route-item strong,
.favorite-route-item small { display: block; }
.favorite-route-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-route-item small { color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-route-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.favorite-save-form .button { white-space: nowrap; }

.live-search-form.audit-search {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 280px) auto auto;
    gap: 10px;
    align-items: center;
}
.audit-actions { align-items: center; }
.audit-table { min-width: 1320px; }
.audit-table .select-column { width: 48px; min-width: 48px; text-align: center; }
.audit-table .select-column input { width: auto; }
.audit-context {
    margin: 0;
    min-width: 240px;
    max-width: 520px;
    max-height: 8.5em;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: #bcd3dc;
    font: 500 .76rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}

@media (max-width: 900px) {
    .admin-menu-grid { grid-template-columns: 1fr; }
    .live-search-form.audit-search { grid-template-columns: 1fr; }
    .favorite-route-item { align-items: flex-start; flex-direction: column; }
}
