/* NexAI Dashboard v2 — style.css */
[hidden] { display: none !important; }

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;600;700&display=swap');

:root {
    /* v3 Theme: 안C(먹/한지/금) + 안A(크림/세이지) */
    --color-bg: #F0EDE6;
    --color-surface: #F6F3ED;
    --color-border: #D6D0C4;
    --color-text-primary: #3D3730;
    --color-text-secondary: #766D62;
    --color-accent: #C9A84C;

    --color-status-progress: #3B82F6;
    --color-status-review: #D97706;
    --color-status-blocked: #F59E0B;
    --color-status-done: #22C55E;
    --color-status-failed: #C2553A;

    --bg: #F0EDE6;
    --bg-card: #F6F3ED;
    --bg-card-hover: #EDE8DF;
    --border: #D6D0C4;
    --text: #3D3730;
    --text-muted: #A69E93;
    --green: #22c55e;
    --yellow: #D97706;
    --red: #C2553A;
    --accent: #C9A84C;
    --gray: #766D62;
    --radius: 10px;
    --sidebar-w: 240px; /* rail expanded 폭 — composer left offset 참조 */

    --status-progress: var(--color-status-progress);
    --status-review: var(--color-status-review);
    --status-blocked: var(--color-status-blocked);
    --status-done: var(--color-status-done);
    --status-failed: var(--color-status-failed);

    /* v3 sidebar */
    --sidebar-dark: #1E1B16;
    --sidebar-text: #8A8279;
    --sidebar-text-active: #E6E2DA;
    --gold: #C9A84C;
    --gold-hover: #B09038;
    --shadow: 0 2px 8px rgba(48,44,38,0.06);
    --shadow-hover: 0 4px 16px rgba(48,44,38,0.10);
    --radius-sm: 6px;
    --radius-lg: 14px;

    /* DASH-0425-I18N-INTRO: 언어 토글 전용 토큰 */
    --lang-toggle-active-bg:  #C9A84C;   /* gold */
    --lang-toggle-active-fg:  #1E1B16;   /* sidebar-dark — 대비 8.1:1 ✅ AA */
    --lang-toggle-inactive-fg:#8A8279;   /* sidebar-text */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Pretendard Variable', 'Pretendard', 'Geist', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    letter-spacing: -0.02em;
    word-break: keep-all;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='h'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.005 0.08' numOctaves='4' seed='2'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23h)'/%3E%3C/svg%3E");
    background-size: 400px 400px;
}

/* === Navigation === */
/* v3: topnav hidden — replaced by sidebar rail */
.topnav { display: none; }
.topnav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

.nav-links a:hover { background: var(--bg-card-hover); color: var(--text); }
.nav-links a.active { background: var(--accent); color: #fff; font-weight: 600; }

/* Hamburger (mobile) */
.nav-toggle-checkbox { display: none; }
.nav-toggle-label { display: none; cursor: pointer; font-size: 1.5rem; color: var(--text); }

/* === Content === */
.content {
    margin-left: 56px;
    max-width: 1200px;
    padding: 1.5rem;
    transition: margin-left 0.25s cubic-bezier(0.4,0,0.2,1);
}
body.sidebar-open .content { margin-left: 240px; }

/* === Dashboard Grid === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    min-height: 120px;
}

.widget-wide { grid-column: 1 / -1; }

.widget-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.widget-loading {
    color: var(--gray);
    font-size: 0.85rem;
    font-style: italic;
}

/* === Status Indicators === */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-green .status-dot { background: var(--green); }
.status-yellow .status-dot { background: var(--yellow); }
.status-red .status-dot { background: var(--red); }
.status-gray .status-dot { background: var(--gray); }

.status-dot-inline {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.status-dot-green { background: var(--green); }
.status-dot-red { background: var(--red); }

/* === Detail Rows === */
.widget-detail { margin-top: 0.75rem; }
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(48,44,38,0.04);
}
.detail-label { color: var(--text-muted); }
.detail-value { color: var(--text); font-weight: 500; }

/* === Gauge Bar === */
.gauge-bar {
    width: 100%;
    height: 20px;
    background: rgba(48,44,38,0.08);
    border-radius: 10px;
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.gauge-green { background: var(--green); }
.gauge-yellow { background: var(--yellow); }
.gauge-orange { background: #f59e0b; }  /* DASH-0415-TOKEN-001: 60~70% 주황 */
.gauge-red { background: var(--red); }
.gauge-gray { background: #6b7280; }  /* Claude 데이터 없음 (GPT-only 연결) */

.gauge-label {
    text-align: center;
    margin-top: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
}

/* === Tables === */
.ticket-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.ticket-table th {
    text-align: left;
    padding: 0.4rem 0.6rem;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

.ticket-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid rgba(48,44,38,0.04);
}

.ticket-table a { color: var(--accent); text-decoration: none; }
.ticket-table a:hover { text-decoration: underline; }

.title-cell { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* DASH-0418-SORT-001: 정렬 가능 헤더 */
.sortable-th { cursor: pointer; }
.sortable-th .sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    min-width: 72px;
}
.sortable-th .sort-link:hover { color: var(--accent); }
.sortable-th.sort-active .sort-link {
    background: rgba(14, 165, 160, 0.08);
    color: #0EA5A0;
    font-weight: 600;
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
}
.sort-hint { opacity: 0.4; font-size: 0.75em; }
.sortable-th:not(.sort-active):hover .sort-link .sort-hint { opacity: 0.8; }

/* DASH-0418-SORT-001: 모바일 정렬 드롭다운 — 데스크탑에서 숨김 */
.sort-group-mobile { display: none; }

/* === Badges === */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-open { background: rgba(34,197,94,0.2); color: var(--status-done); }
.badge-hold { background: rgba(107,114,128,0.3); color: #9ca3af; }
.badge-in_progress { background: rgba(59,130,246,0.2); color: var(--status-progress); }
.badge-review { background: rgba(250,204,21,0.2); color: var(--status-review); }
.badge-done { background: rgba(34,197,94,0.3); color: var(--status-done); }
.badge-failed { background: rgba(239,68,68,0.2); color: var(--status-failed); }
.badge-blocked { background: rgba(245,158,11,0.2); color: var(--status-blocked); } /* v0.3: gray→amber */
.badge-done-after { background: rgba(34,197,94,0.15); color: var(--green); border: 1px solid rgba(34,197,94,0.4); cursor: help; font-size: 0.75rem; }

.priority { font-weight: 700; font-size: 0.8rem; }
.priority-p0 { color: var(--red); }
.priority-p1 { color: var(--yellow); }
.priority-p2 { color: var(--text-muted); }

/* === Bot Summary === */
.bot-summary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.bot-count {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

.bot-count.active { background: rgba(0,196,140,0.15); color: var(--accent); }
.bot-count.idle { background: rgba(107,114,128,0.15); color: var(--text-muted); }
.bot-count.inactive { background: rgba(239,68,68,0.15); color: var(--red); }

/* === Alerts === */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.alert-red {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    color: var(--red);
}

.alert-yellow {
    background: rgba(234,179,8,0.15);
    border: 1px solid rgba(234,179,8,0.3);
    color: var(--yellow);
}

.status-dot-red { background: var(--red); }

.alert-detail {
    width: 100%;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* === Empty State === */
.empty-state {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 1rem 0;
    text-align: center;
}

.empty-state.warning { color: var(--yellow); }

.text-red { color: var(--red) !important; font-weight: 700; }

/* === Footer === */
.footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

/* === Page Header === */
.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.3rem;
    font-weight: 700;
    flex: 1;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--gold-hover); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn-large { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn.disabled { opacity: 0.4; pointer-events: none; }

/* === Filter Bar === */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select, .filter-group input {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

/* === DASH-0418-SEARCH-001: 검색창 === */
.search-group {
    width: 100%;
    margin-bottom: 0.75rem;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 0.6rem;
    font-size: 0.9rem;
    pointer-events: none;
    color: var(--text-muted);
}

#ticket-search {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 2.2rem 0.5rem 2rem;
    font-size: 0.9rem;
    box-sizing: border-box;
}

#ticket-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}

.search-clear-btn {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    line-height: 1;
}

.search-clear-btn:hover { color: var(--text); }

/* 검색 결과 배너 */
.search-result-banner {
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* === Full Table (S2 etc) === */
.full-table { margin-top: 0.5rem; }

.clickable-row { cursor: pointer; transition: background 0.1s; }
.clickable-row:hover { background: var(--bg-card-hover); }

/* === Pagination === */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: var(--bg-card);
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
}

.page-link:hover { background: var(--bg-card-hover); }
.page-link.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-total { color: var(--text-muted); font-size: 0.85rem; margin-left: 0.5rem; }

/* === Empty State Large === */
.empty-state-large {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state-large p { margin-bottom: 1rem; font-size: 1rem; }

/* === Detail Card === */
.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.detail-card h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }

.detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
}

.ticket-description {
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
}

/* === Ticket Form === */
.ticket-form { margin-bottom: 1rem; }

.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
}

.form-group textarea { resize: vertical; }

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group { flex: 1; min-width: 150px; }

.form-group-sm {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 120px;
}

.form-group-sm label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-group-sm select, .form-group-sm input {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.form-hint { font-size: 0.75rem; color: var(--text-muted); }

.preview-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.preview-box h3 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }

/* === Inline Form (status change, field update) === */
.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.select-inline, .input-inline {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
}

.input-inline { flex: 1; min-width: 200px; }

/* === Handoff Chain === */
.chain-list { font-size: 0.85rem; }

.chain-item {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(48,44,38,0.04);
    align-items: center;
}

.chain-num { color: var(--text-muted); font-weight: 600; min-width: 1.5rem; }
.chain-time { color: var(--text-muted); font-size: 0.8rem; min-width: 8rem; }
.chain-flow { color: var(--accent); }
.chain-action { color: var(--text); font-style: italic; }

/* === 404 Error Page === */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}

.error-page h1 { font-size: 4rem; color: var(--red); margin-bottom: 0.5rem; }
.error-page p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* === Traffic Light Bar (S3) === */
.traffic-light-bar {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.tl-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* === Log Viewer (S3) === */
.log-viewer {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 0.8rem;
    line-height: 1.4;
}

.log-line {
    padding: 0.1rem 0;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--text-muted);
}

.subsection-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* === Resource Row (S3) === */
.resource-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.resource-label { min-width: 4rem; color: var(--text-muted); }
.resource-value { color: var(--text); }

.gauge-sm { max-width: 200px; height: 12px; }
.gauge-xs { max-width: 120px; height: 8px; display: inline-block; vertical-align: middle; }
.gauge-week { width: 100%; height: 6px; }  /* DASH-0415-TOKEN-001: 주간 진행률 바 */

.infra-note { margin-top: 0.5rem; font-size: 0.8rem; }

.status-dot-green { background: var(--green); }
.status-dot-yellow { background: var(--yellow); }

/* === Date Nav (S4) === */
.date-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-date {
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0 0.5rem;
}

.date-picker {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
}

/* === Lang Tabs (S4) === */
.lang-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lang-tab {
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.lang-tab:hover { background: var(--bg-card-hover); color: var(--text); }
.lang-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* === Report Content (S4) === */
.report-content h1 { font-size: 1.3rem; margin: 1rem 0 0.5rem; }
.report-content h2 { font-size: 1.1rem; margin: 1rem 0 0.5rem; color: var(--text); }
.report-content h3 { font-size: 0.95rem; margin: 0.75rem 0 0.4rem; }
.report-content p { margin: 0.3rem 0; font-size: 0.9rem; line-height: 1.6; }
.report-content ul { margin: 0.3rem 0 0.3rem 1.5rem; font-size: 0.9rem; }
.report-content li { margin: 0.2rem 0; }

.report-important {
    background: rgba(234,179,8,0.12);
    border: 1px solid rgba(234,179,8,0.3);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem 0;
}

.ticket-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.ticket-link:hover { text-decoration: underline; }

.text-muted { color: var(--text-muted); }

/* === Log Level Colors (S3 infra) === */
.log-error { color: var(--red) !important; }
.log-warn  { color: var(--yellow) !important; }

/* === Reports Tabs (DASH-0415-BRIEF-001) === */
.reports-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}
.reports-tab {
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm, 6px) var(--radius-sm, 6px) 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    transition: color 0.15s, background 0.15s;
}
.reports-tab:hover { color: var(--text); background: var(--bg-card-hover); }
.reports-tab.active {
    color: var(--text);
    background: var(--bg-card);
    border-color: var(--border);
    border-bottom: 1px solid var(--bg-card);
    margin-bottom: -1px;
}

/* === Brief Sidebar Stats === */
.brief-sidebar-stats {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}
.brief-stat-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* === Brief Summary Grid === */
.brief-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}
.brief-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.5rem 0.6rem;
    background: var(--bg-card-hover);
    border-radius: var(--radius-sm, 6px);
}
.brief-summary-item .detail-label { font-size: 0.75rem; }
.brief-summary-item .detail-value { font-size: 0.95rem; font-weight: 600; }

/* === Brief Alert List === */
.brief-alert-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.brief-alert-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.45rem 0.6rem;
    background: rgba(239,68,68,0.07);
    border-left: 3px solid var(--red);
    border-radius: 0 4px 4px 0;
    font-size: 0.83rem;
}
.brief-alert-ts {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
    min-width: 90px;
    padding-top: 0.05rem;
}
.brief-alert-msg { color: var(--text); line-height: 1.4; }

/* === text-green (brief usage) === */
.text-green { color: var(--green) !important; font-weight: 700; }
.text-yellow { color: var(--yellow) !important; font-weight: 700; }

/* === Reports Layout (S4) === */
.reports-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
    align-items: start;
}

.reports-sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
}

.report-file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.report-file-item {
    border-radius: var(--radius-sm, 6px);
    transition: background 0.12s;
}

.report-file-item.active {
    background: rgba(99,102,241,0.12);
}

.report-file-link {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.55rem 0.6rem;
    text-decoration: none;
    color: var(--text);
    border-radius: var(--radius-sm, 6px);
}

.report-file-link:hover { background: var(--bg-card-hover); }

.report-file-name {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.report-file-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.report-file-ts { color: var(--text-muted); }
.report-file-size { color: var(--text-muted); }

.report-viewer-header { padding: 0.6rem 1rem; margin-bottom: 0; }

.reports-viewer { display: flex; flex-direction: column; gap: 0.5rem; }

@media (max-width: 768px) {
    .reports-layout {
        grid-template-columns: 1fr;
    }
    .reports-sidebar {
        position: static;
        max-height: 300px;
    }
}

/* === Progress Inline (S5) === */
.progress-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.gauge-accent { background: var(--accent); }

/* === Workload Dashboard (S6) === */

/* 요약 바 */
.wl-summary-bar {
    display: flex;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.wl-summary-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s;
}

.wl-summary-item:hover { background: var(--bg-card-hover); }
.wl-summary-label { color: var(--text-muted); font-size: 0.8rem; }
.wl-summary-value { font-weight: 700; font-size: 1rem; }

.wl-dot {
    width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.wl-dot-green { background: var(--green); }
.wl-dot-gray { background: var(--gray); }
.wl-dot-red { background: var(--red); }

/* 평면도 — 5행 2D 배치 (STRAT-0411-006 와이어프레임 1:1) */
.floorplan {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fp-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
}

.fp-group-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}

.fp-group-bots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* 행별 배치: 행1(4열) 행2(3열) 행3(4열) 행4(풀) 행5 */
.fp-row-1 { grid-row: 1; }
.fp-row-2 { grid-row: 2; }
.fp-row-3 { grid-row: 3; }
.fp-row-4 { grid-row: 4; }
.fp-row-5 { grid-row: 5; }
/* 행4: 개발본부 풀와이드 */
.fp-group-dev { grid-column: 1 / -1; }
.fp-group-dev .fp-group-bots { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
/* 행5: QA본부 */
.fp-group-qa { grid-column: 1 / span 3; }

/* 아코디언 토글 — 데스크탑에서 숨김 */
.fp-accordion-toggle {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    width: 100%;
    text-align: left;
}
.fp-accordion-arrow { display: none; }

/* 봇 카드 */
.bot-card {
    background: rgba(48,44,38,0.04);
    border: 1px solid rgba(48,44,38,0.06);
    border-radius: 6px;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 90px;
    flex: 1;
}

.bot-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.bot-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.bot-card-dim { opacity: 0.25; }

.bot-card-overloaded { border-color: rgba(239,68,68,0.4); }
.bot-card-active { border-color: rgba(34,197,94,0.2); }
.bot-card-error { border-color: rgba(234,179,8,0.4); }

.bot-card-header {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.2rem;
}

.bot-card-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}

.bot-card-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bot-card-stats {
    display: flex;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.bot-card-avg {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* 모델 뱃지: hover 시 표시 (§4-3, C5) */
.bot-model-badge {
    display: none;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 3px;
    padding: 0 3px;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}
.bot-card:hover .bot-model-badge { display: inline-block; }

/* 상세 패널 */
.detail-panel-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    min-height: 60px;
}

.detail-panel-placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem;
}

.wl-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wl-detail-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    flex-wrap: wrap;
}

.wl-detail-section {
    margin-bottom: 0.75rem;
}

.wl-detail-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wl-detail-stats {
    background: rgba(48,44,38,0.03);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
}

.wl-detail-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* === Karen 히어로 섹션 (설계 v0.3 신설) === */
.karen-hero { border-left: 3px solid var(--accent); }
.hero-summary-grid {
    display: flex;
    gap: 1.5rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(48,44,38,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    min-width: 100px;
}
.hero-stat-urgent { border-color: var(--status-blocked); background: rgba(245,158,11,0.08); }
.hero-stat-number { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1; }
.hero-stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.hero-stat-badge { font-size: 0.72rem; color: var(--status-blocked); margin-top: 0.2rem; font-weight: 600; }
.hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }

/* === Responsive (768px 이하: 모바일) === */
@media (max-width: 768px) {
    /* v3: hide sidebar rail, show bottom nav */
    .rail { display: none !important; }
    .rail.expanded { display: none !important; }
    .bottom-nav { display: flex !important; }
    body.sidebar-open .content { margin-left: 0 !important; }
    .topnav { display: none; }

    /* OPS-0418-DESIGN-FIX-001: bottom-nav 높이(52px) + safe-area + 여유 */
    .content { margin-left: 0 !important; padding: 10px; padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); width: 100% !important; max-width: 100% !important; }

    .dashboard-grid { grid-template-columns: 1fr; gap: 0.5rem; }
    .widget-wide { grid-column: 1; }
    .widget { padding: 0.7rem; min-height: auto; }
    .widget-title { font-size: 0.72rem; margin-bottom: 0.4rem; padding-bottom: 0.2rem; }
    .title-cell { max-width: 120px; }

    /* 테이블 콤팩트 */
    .ticket-table th { padding: 0.25rem 0.4rem; font-size: 0.65rem; }
    .ticket-table td { padding: 0.3rem 0.4rem; font-size: 0.75rem; }
    .badge { font-size: 0.65rem; padding: 0.1rem 0.35rem; }

    /* 게이지 콤팩트 */
    .gauge-bar { height: 14px; }
    .gauge-label { font-size: 0.8rem; }

    /* 상태 인디케이터 콤팩트 */
    .status-indicator { font-size: 0.82rem; gap: 0.35rem; }
    .status-dot { width: 8px; height: 8px; }
    .detail-row { font-size: 0.78rem; padding: 0.2rem 0; }

    /* 접기 섹션 콤팩트 + WCAG 2.5.5 터치타겟 44px */
    .section-toggle { font-size: 0.75rem; padding: 0.35rem 0; min-height: 44px; }
    .dashboard-section { margin-top: 0.5rem; }

    /* 워크로드 모바일: 아코디언 + 2x2 요약 (7-1 ~ 7-5) */
    .floorplan { grid-template-columns: 1fr; }
    .fp-group-dev { grid-column: 1; }
    .fp-group-qa { grid-column: 1; }
    .fp-group-dev .fp-group-bots { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }

    /* 아코디언 활성화 */
    .fp-accordion-toggle {
        cursor: pointer;
        min-height: 44px;
        padding: 0.5rem 0;
        box-sizing: border-box;
    }
    .fp-accordion-arrow { display: inline; font-size: 0.7rem; transition: transform 0.2s; }
    .fp-accordion-toggle[aria-expanded="false"] .fp-accordion-arrow { transform: rotate(-90deg); }
    .fp-accordion-body { transition: max-height 0.25s ease; }

    /* 봇 카드 → 인라인 (7-2) */
    .bot-card { display: flex; align-items: center; gap: 0.4rem; min-width: auto; padding: 0.5rem 0.6rem; min-height: 44px; }
    .bot-card .bot-card-stats { margin-bottom: 0; }
    .bot-card .bot-card-avg { display: none; }
    .bot-card-header { margin-bottom: 0; }

    /* 요약 바: 2x2 그리드 (7-4) */
    .wl-summary-bar { display: grid; grid-template-columns: 1fr 1fr; }
    .wl-summary-item { justify-content: center; min-height: 44px; align-items: center; }

    /* 상세 패널: 풀스크린 바텀시트 (7-3) */
    .detail-panel-container {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 100;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: var(--radius) var(--radius) 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    .detail-panel-container.is-open {
        transform: translateY(0);
    }
    .wl-detail-header { flex-direction: column; align-items: flex-start; }

    /* C6. 티켓 테이블 → 카드형 변환 (설계 v0.3 C6) */
    .ticket-table.full-table { display: none; }  /* 모바일: 테이블 숨김 */
    .ticket-card-list { display: flex; flex-direction: column; gap: 0.5rem; }
    .ticket-card {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 0.75rem 1rem;
        cursor: pointer;
        transition: background 0.15s;
    }
    .ticket-card:hover { background: var(--bg-card-hover); }
    .ticket-card-id { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.2rem; }
    .ticket-card-title { font-size: 0.95rem; color: var(--text); font-weight: 500;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .ticket-card-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; flex-wrap: wrap; }
    .ticket-card-date { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); }
    /* DASH-0418-SORT-001: 모바일 정렬 드롭다운 표시 */
    .sort-group-mobile { display: flex; }

    /* OPS-0419-MOBILE-P0-FIX: 모바일 가로 오버플로우 수정 */

    /* 1. 프로젝트 상세 — 헤더 h1 줄바꿈 */
    .project-header h1 { word-break: keep-all; overflow-wrap: break-word; font-size: 1.1rem !important; }

    /* 2. 프로젝트 상세 — 요약 카드 3개: 가로 스크롤 */
    .project-detail-page > div[style*="auto-fit"] {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 0.5rem !important;
        padding-bottom: 4px !important;
        scrollbar-width: thin !important;
    }
    .project-detail-page > div[style*="auto-fit"] > .widget {
        flex: 0 0 auto !important;
        min-width: 90px !important;
        width: 90px !important;
    }

    /* 3. 티켓 필터 — 2열 그리드로 줄바꿈 */
    /* DASH-0418-SEARCH-001: 모바일 검색창 */
    .search-group { margin-bottom: 0.5rem; }
    #ticket-search { font-size: 0.82rem; padding: 0.4rem 2rem 0.4rem 1.8rem; }
    .filter-bar { padding: 0.6rem; }
    .filter-form { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0.5rem !important; }
    .filter-group select, .filter-group input { font-size: 0.78rem; padding: 0.35rem 0.4rem; width: 100%; box-sizing: border-box; }

    /* 4. 결재 이력 테이블 — 가로 스크롤 래퍼
       (ticket-table.full-table는 C6으로 이미 숨김; 여기서는 approvals.html의 ticket-table 대상) */
    .ticket-table:not(.full-table) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .ticket-table:not(.full-table) th, .ticket-table:not(.full-table) td { white-space: nowrap; }
}

/* 카드 목록: 데스크탑에서 숨김, 모바일에서만 표시 */
.ticket-card-list { display: none; }
@media (max-width: 768px) {
    .ticket-card-list { display: flex; }
}

/* ================================================================
 * v3 Sidebar Rail
 * ================================================================ */
.rail {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 56px;
    background: var(--sidebar-dark);
    display: flex; flex-direction: column;
    padding: 16px 0; z-index: 100;
    transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden; overflow-y: auto;
}
.rail.expanded { width: 240px; }
.rail::-webkit-scrollbar { width: 3px; }
.rail::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.rail-header {
    display: flex; align-items: center; gap: 10px;
    padding: 0 12px; margin-bottom: 20px; min-height: 32px; cursor: pointer;
}
.rail-logo {
    width: 32px; height: 32px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-weight: 700; font-size: 14px;
    font-family: 'Noto Serif KR', serif;
}
.rail-brand { white-space: nowrap; opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.rail.expanded .rail-brand { opacity: 1; pointer-events: auto; }
.rail-brand-name { font-family: 'Noto Serif KR', serif; font-size: 15px; font-weight: 700; color: var(--sidebar-text-active); }
.rail-brand-sub { font-size: 9px; color: var(--sidebar-text); text-transform: uppercase; letter-spacing: 0.1em; }
.rail-toggle { width: 24px; height: 24px; flex-shrink: 0; margin-left: auto; display: flex; align-items: center; justify-content: center; color: var(--sidebar-text); cursor: pointer; border-radius: 4px; transition: all 0.15s; opacity: 0; }
.rail.expanded .rail-toggle { opacity: 1; }
.rail-toggle:hover { color: var(--sidebar-text-active); background: rgba(255,255,255,0.06); }

.rail-section { padding: 12px 12px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--sidebar-text); font-weight: 600; white-space: nowrap; opacity: 0; height: 0; overflow: hidden; transition: opacity 0.15s; }
.rail.expanded .rail-section { opacity: 1; height: auto; }

.rail-item {
    position: relative; display: flex; align-items: center; gap: 10px;
    min-height: 36px; padding: 0 12px; margin: 0 8px 2px;
    border-radius: var(--radius-sm); color: var(--sidebar-text);
    cursor: pointer; transition: all 0.15s;
    border-left: 3px solid transparent; white-space: nowrap;
    text-decoration: none;
}
.rail-item i { flex-shrink: 0; }
.rail-item:hover { color: var(--sidebar-text-active); background: rgba(255,255,255,0.05); }
.rail-item.active { color: var(--sidebar-text-active); border-left-color: var(--gold); background: rgba(255,255,255,0.08); }
.rail-item .item-label { font-size: 13px; font-weight: 500; opacity: 0; transition: opacity 0.15s; }
.rail.expanded .rail-item .item-label { opacity: 1; }
.rail-item .item-badge { margin-left: auto; font-size: 10px; font-weight: 600; background: rgba(255,255,255,0.08); padding: 1px 6px; border-radius: 8px; color: var(--sidebar-text); opacity: 0; transition: opacity 0.15s; }
.rail.expanded .rail-item .item-badge { opacity: 1; }
.rail-item.active .item-badge { background: rgba(201,168,76,0.15); color: var(--gold); }
.rail-item .tooltip { position: absolute; left: 52px; top: 50%; transform: translateY(-50%); background: var(--sidebar-dark); color: var(--sidebar-text-active); padding: 4px 10px; border-radius: var(--radius-sm); font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 200; }
.rail:not(.expanded) .rail-item:hover .tooltip { opacity: 1; }

/* Tree sub-items */
.rail-tree { overflow: hidden; max-height: 0; transition: max-height 0.25s cubic-bezier(0.4,0,0.2,1); }
.rail.expanded .rail-tree.open { max-height: 70vh; overflow-y: auto; }
.rail-tree .rail-sub { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 44px; margin: 0 8px 1px; border-radius: var(--radius-sm); font-size: 12px; color: var(--sidebar-text); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.rail-tree .rail-sub:hover { color: var(--sidebar-text-active); background: rgba(255,255,255,0.04); }
.rail-sub .tree-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

.rail-spacer { flex: 1; }
.rail-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--sidebar-dark); margin: 0 auto; }

/* DASH-0425-I18N-INTRO: 언어 토글 컴포넌트 (사이드바 하단 고정) */
.lang-toggle {
    display: flex;
    gap: 4px;
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(138,130,121,0.2);
    overflow: hidden;          /* 접혔을 때 숨김 */
    opacity: 0;
    max-height: 0;
    transition: opacity 0.15s, max-height 0.2s cubic-bezier(0.4,0,0.2,1);
    pointer-events: none;
}
.rail.expanded .lang-toggle {
    opacity: 1;
    max-height: 72px;
    pointer-events: auto;
}

.lang-btn {
    flex: 1;
    min-height: 44px;          /* 터치 타겟 WCAG 2.5.5 ✅ */
    padding: 10px 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--lang-toggle-inactive-fg);
    font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.lang-btn.active,
.lang-btn[aria-checked="true"] {
    background: var(--lang-toggle-active-bg);
    color: var(--lang-toggle-active-fg);
}
.lang-btn:hover:not(.active) {
    background: rgba(201,168,76,0.12);
    color: var(--sidebar-text-active);
}
.lang-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Mobile bottom nav */
.bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    height: auto; min-height: 52px;
    background: var(--sidebar-dark); z-index: 9998;
    justify-content: space-evenly; align-items: center;
    padding: 6px 0;
    padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
}
.bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    color: var(--sidebar-text); cursor: pointer;
    font-size: 9px; font-weight: 500;
    transition: color 0.15s; text-decoration: none;
    /* OPS-0418-DESIGN-FIX-001: 5개 아이템 균등 배분, 잘림 방지 */
    flex: 1 1 0; min-width: 0; min-height: 44px;
    justify-content: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bottom-nav-item i { width: 18px !important; height: 18px !important; flex-shrink: 0; }
.bottom-nav-item.active { color: var(--gold); }

/* Utility classes */
.serif { font-family: 'Noto Serif KR', serif; }

/* === Projects Page === */
.project-pipeline {
    display: flex;
    gap: 2px;
    margin: 12px 0;
}
.project-pipeline .pipe-step {
    flex: 1;
    text-align: center;
    padding: 6px 2px;
    font-size: 11px;
    font-weight: 500;
    border-radius: var(--radius-sm);
}
.pipe-done { background: rgba(34,197,94,0.06); color: var(--green); }
.pipe-now { background: rgba(201,168,76,0.08); color: var(--gold-hover, #B09038); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.pipe-wait { background: rgba(48,44,38,0.03); color: var(--text-muted); }

/* === Dashboard Section Collapse === */
.dashboard-section {
    margin-top: 0.75rem;
}
.section-toggle {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid rgba(48,44,38,0.06);
    margin-bottom: 0.25rem;
}
.section-toggle::before {
    content: '▶';
    font-size: 0.6rem;
    transition: transform 0.2s;
    color: var(--accent);
}
details[open] > .section-toggle::before {
    transform: rotate(90deg);
}
.section-toggle::-webkit-details-marker { display: none; }

/* 위젯 패딩 축소 */
.widget {
    padding: 1rem;
    min-height: auto;
}
.widget-title {
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    font-size: 0.78rem;
}

/* === Mobile Chat Fix === */
@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 140px) !important;
        min-height: auto !important;
    }
    .chat-header {
        padding: 0.6rem 0.8rem !important;
    }
    .chat-input-box {
        padding: 0.5rem !important;
    }
    .chat-input-box textarea {
        font-size: 14px !important;
    }
}

/* ================================================================
 * WORKLOAD-PIXEL-0421-v2 — Pixel Office × Pulse 통합
 * 근거: PLAN-0421-WORKLOAD-PIXEL v2 — 테마 통합, Pulse 팔레트,
 *      봇 개성, 주황 절제 ("오렌지는 아껴 써야 빛난다").
 * ================================================================ */

/* --- Cockpit: 페이지 전체 다크 래퍼 (컨텐츠 cream → Pulse 다크) --- */
.workload-cockpit {
    --cp-bg: #0F0F0F;
    --cp-surface: #1A1A1A;
    --cp-surface-2: #242428;
    --cp-border: #2A2A2A;
    --cp-border-strong: #3A3A3A;
    --cp-text: #F5F5F5;
    --cp-text-dim: #888;
    --cp-text-mute: #555;
    --cp-mint: #00E5A0;
    --cp-coral: #FF6B35;
    --cp-amber: #F59E0B;
    --cp-gold: #C9A84C;
    --cp-red: #EF4444;

    background: var(--cp-bg);
    color: var(--cp-text);
    /* 컨텐츠 패딩(1.5rem) 뚫고 edge-to-edge 다크존 */
    margin: -1.5rem -1.5rem -1.5rem;
    padding: 1.25rem 1.5rem 3rem;
    min-height: calc(100vh - 3rem);
    font-family: 'Pretendard Variable', 'Pretendard', 'Geist', -apple-system, sans-serif;
}

.cockpit-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--cp-border);
}
.cockpit-brand { display: flex; flex-direction: column; gap: 2px; }
.cockpit-kicker {
    font-family: 'Geist Mono', 'Courier New', ui-monospace, monospace;
    font-size: 0.65rem;
    letter-spacing: 0.24em;
    color: var(--cp-text-dim);
    text-transform: uppercase;
}
.cockpit-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--cp-text);
    line-height: 1.1;
    margin: 0;
}
.cockpit-tagline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Geist Mono', 'Courier New', ui-monospace, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--cp-text-dim);
    text-transform: uppercase;
}
.cockpit-pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--cp-mint);
    box-shadow: 0 0 8px var(--cp-mint);
    animation: cpPulse 2s ease-in-out infinite;
}
@keyframes cpPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.cockpit-loading {
    color: var(--cp-text-dim);
    font-family: 'Geist Mono', 'Courier New', ui-monospace, monospace;
    font-size: 0.8rem;
    padding: 1rem;
}

/* --- Summary bar: 코크핏 안에서 다크 오버라이드 --- */
.workload-cockpit .wl-summary-bar {
    background: var(--cp-surface);
    border: 1px solid var(--cp-border);
    border-radius: 10px;
    margin-bottom: 1rem;
}
.workload-cockpit .wl-summary-item {
    color: var(--cp-text);
    background: transparent;
    border: 0;
}
.workload-cockpit .wl-summary-item:hover { background: var(--cp-surface-2); }
.workload-cockpit .wl-summary-label { color: var(--cp-text-dim); }
.workload-cockpit .wl-summary-value { color: var(--cp-text); }
.workload-cockpit .wl-dot-green { background: var(--cp-mint); box-shadow: 0 0 6px rgba(0,229,160,0.5); }
.workload-cockpit .wl-dot-gray  { background: var(--cp-text-mute); }
.workload-cockpit .wl-dot-red   { background: var(--cp-coral); box-shadow: 0 0 6px rgba(255,107,53,0.5); }

/* --- 픽셀 오피스 컨테이너: 경계 제거, 넣 안에 자연스럽게 --- */
.pixel-office {
    position: relative;
    background: var(--cp-surface);
    border: 1px solid var(--cp-border);
    border-radius: 10px;
    padding: 1rem 1rem 0.75rem;
    margin-bottom: 1rem;
    color: var(--cp-text);
}

.pixel-office-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

/* --- Zone (팀/부서 구역) --- */
.pixel-zone {
    position: relative;
    background: var(--cp-surface-2);
    border: 1px solid var(--cp-border-strong);
    border-radius: 8px;
    padding: 0.75rem 0.75rem 0.6rem;
}
.pixel-zone-row-1 { grid-row: 1; }
.pixel-zone-row-2 { grid-row: 2; }
.pixel-zone-row-3 { grid-row: 3; }
.pixel-zone-row-4 { grid-row: 4; grid-column: 1 / -1; }
.pixel-zone-row-5 { grid-row: 5; grid-column: 1 / span 3; }

.pixel-zone-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--cp-border);
}
.pixel-zone-toggle {
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0;
    text-align: left;
}
.pixel-zone-icon { display: none; }
.pixel-zone-label {
    font-family: 'Geist Mono', 'Courier New', ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cp-text);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pixel-zone-count {
    font-family: 'Geist Mono', 'Courier New', ui-monospace, monospace;
    font-size: 0.65rem;
    color: var(--cp-gold);
    background: rgba(201,168,76,0.10);
    border: 1px solid rgba(201,168,76,0.30);
    padding: 1px 6px;
    border-radius: 999px;
    line-height: 1.4;
    font-weight: 600;
}
.pixel-zone-arrow { display: none; color: var(--cp-text-dim); font-size: 0.7rem; }

.pixel-zone-floor {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 0.5rem 0.4rem;
    padding: 0.25rem 0.1rem 0.1rem;
}

/* --- 봇 카드 --- */
.pixel-bot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 14px 6px 8px;
    min-height: 94px;
    cursor: pointer;
    color: var(--cp-text);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.pixel-bot:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--cp-border-strong);
    transform: translateY(-1px);
}
.pixel-bot:focus-visible { outline: 2px solid var(--cp-mint); outline-offset: 2px; }
.pixel-bot.bot-card-dim { opacity: 0.28; filter: grayscale(0.6); }

/* --- 아바타: 이니셜 칩 + 보드 (모니터 느낌) --- */
.pixel-bot-sprite {
    position: relative;
    width: 40px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pixel-bot-head {
    position: relative;
    width: 36px; height: 36px;
    background: var(--bot-color, #C9A84C);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Pretendard Variable', 'Pretendard', 'Geist', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #0F0F0F;
    letter-spacing: -0.02em;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.35),
        inset 0 -2px 0 rgba(0,0,0,0.18),
        inset 0 2px 0 rgba(255,255,255,0.25);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.pixel-bot-head::before {
    content: attr(data-initial);
    position: relative;
    z-index: 2;
}
/* 몸통/다리는 단순화된 좌우 그림자 도트로 */
.pixel-bot-body,
.pixel-bot-legs { display: none; }

.pixel-bot-name {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--cp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-top: 2px;
}
.pixel-bot-meta {
    display: flex;
    gap: 5px;
    font-size: 0.6rem;
    color: var(--cp-text-dim);
    line-height: 1.2;
    font-family: 'Geist Mono', 'Courier New', ui-monospace, monospace;
}
.pixel-bot-model {
    color: var(--cp-gold);
    background: rgba(201,168,76,0.10);
    padding: 0 4px;
    border-radius: 3px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.pixel-bot-avg { color: var(--cp-text-dim); }

/* --- 큐 뱃지: 코랄 (accent, 과부하 신호) --- */
.pixel-bot-queue {
    position: absolute;
    top: 6px;
    right: 8px;
    background: var(--cp-coral);
    color: #fff;
    font-family: 'Geist Mono', 'Courier New', ui-monospace, monospace;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 999px;
    z-index: 3;
    box-shadow: 0 0 0 2px var(--cp-surface-2);
    min-width: 14px;
    text-align: center;
}

/* --- 말풍선: 현재 티켓 (working 증거) --- */
.pixel-bot-bubble {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--cp-mint);
    color: #0F0F0F;
    font-family: 'Geist Mono', 'Courier New', ui-monospace, monospace;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 0 0 0 2px var(--cp-surface-2);
}
.pixel-bot-overloaded .pixel-bot-bubble {
    background: var(--cp-coral);
    color: #fff;
}

/* === 상태별 시각화 === */
/* active: 일하는 중 — 민트 링 + 미세 바운스 */
.pixel-bot-active .pixel-bot-head {
    box-shadow:
        0 0 0 2px var(--cp-mint),
        0 0 14px rgba(0,229,160,0.5),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        inset 0 2px 0 rgba(255,255,255,0.25);
}
.pixel-bot-active .pixel-bot-sprite {
    animation: pixelBob 1.6s ease-in-out infinite;
}
@keyframes pixelBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* overloaded: 과부하 — 코랄 링 + 미세 흔들림 */
.pixel-bot-overloaded {
    border-color: rgba(255,107,53,0.45);
    background: rgba(255,107,53,0.06);
}
.pixel-bot-overloaded .pixel-bot-head {
    box-shadow:
        0 0 0 2px var(--cp-coral),
        0 0 14px rgba(255,107,53,0.55),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        inset 0 2px 0 rgba(255,255,255,0.25);
}
.pixel-bot-overloaded .pixel-bot-sprite {
    animation: pixelJitter 0.9s ease-in-out infinite;
}
@keyframes pixelJitter {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    75% { transform: translateX(1px); }
}

/* idle: 정적 + 디밍 (애니메이션 X) */
.pixel-bot-idle .pixel-bot-head {
    background: var(--cp-surface-2) !important;
    color: var(--cp-text-dim);
    box-shadow:
        inset 0 0 0 1px var(--cp-border-strong),
        inset 0 -2px 0 rgba(0,0,0,0.15);
}
.pixel-bot-idle .pixel-bot-name { color: var(--cp-text-dim); }

/* error: 레드 (정적, WCAG — 점멸 제거) */
.pixel-bot-error {
    border-color: rgba(239,68,68,0.4);
    background: rgba(239,68,68,0.05);
}
.pixel-bot-error .pixel-bot-head {
    background: var(--cp-red) !important;
    color: #fff;
    box-shadow:
        0 0 0 2px rgba(239,68,68,0.4),
        inset 0 -2px 0 rgba(0,0,0,0.2);
}

/* --- Legend --- */
.pixel-office-legend {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    padding: 0.75rem 0.5rem 0.25rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--cp-border);
    font-family: 'Geist Mono', 'Courier New', ui-monospace, monospace;
    font-size: 0.62rem;
    color: var(--cp-text-dim);
    letter-spacing: 0.14em;
    flex-wrap: wrap;
}
.pixel-office-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}
.pixel-office-legend .legend-sprite {
    width: 10px; height: 10px; display: inline-block;
    border-radius: 2px;
}
.legend-active { background: var(--cp-mint); box-shadow: 0 0 6px rgba(0,229,160,0.5); }
.legend-idle { background: var(--cp-text-mute); }
.legend-overloaded { background: var(--cp-coral); box-shadow: 0 0 6px rgba(255,107,53,0.4); }
.legend-error { background: var(--cp-red); }

/* --- Detail panel 다크 오버라이드 (코크핏 안에서만) --- */
.workload-cockpit .detail-panel-container {
    background: var(--cp-surface);
    border: 1px solid var(--cp-border);
    color: var(--cp-text);
}
.workload-cockpit .detail-panel-placeholder {
    color: var(--cp-text-dim);
}

/* === 모바일 === */
@media (max-width: 768px) {
    .workload-cockpit {
        margin: -1.5rem -1.5rem 0;
        padding: 1rem 1rem 5rem;
        min-height: calc(100vh - 1rem);
    }
    .cockpit-header { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .cockpit-title { font-size: 1.35rem; }
    .cockpit-tagline { font-size: 0.62rem; }

    .pixel-office { padding: 0.75rem 0.6rem 0.6rem; }
    .pixel-office-grid { grid-template-columns: 1fr; gap: 0.6rem; }
    .pixel-zone-row-1,
    .pixel-zone-row-2,
    .pixel-zone-row-3,
    .pixel-zone-row-4,
    .pixel-zone-row-5 {
        grid-row: auto;
        grid-column: 1;
    }
    .pixel-zone-floor { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.4rem 0.3rem; }
    .pixel-zone-arrow { display: inline; transition: transform 0.2s; }
    .pixel-zone-toggle[aria-expanded="false"] .pixel-zone-arrow { transform: rotate(-90deg); }
    .pixel-zone-toggle { cursor: pointer; min-height: 44px; }
    .pixel-bot { min-height: 86px; padding: 12px 4px 6px; }
    .pixel-bot-name { font-size: 0.68rem; max-width: 74px; }
    .pixel-bot-meta { font-size: 0.55rem; }
    .pixel-office-legend { gap: 0.75rem; font-size: 0.56rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cockpit-pulse,
    .pixel-bot-active .pixel-bot-sprite,
    .pixel-bot-overloaded .pixel-bot-sprite {
        animation: none !important;
    }
}

/* ================================================================
 * DASH-0423-PROJDETAIL-REWORK — GD 재감수 재작업 (2026-04-24)
 * GD HARD REJECT 5건 수정:
 *   1. 헤더 카운터 대비 (WCAG AA 4.5:1)
 *   2. 상단 4박스 반응형 2x2
 *   3. 산출물 탭 tap 타겟 44px + 검색 별도 행
 *   4. 파일 행 6열→모바일 2행
 *   5. NEW 뱃지 대비 수정
 * ================================================================ */

/* --- 오늘 활동 카운터 뱃지 --- */
.activity-counter-badge {
    /* WCAG AA: #15803d bg + #fff text = 4.54:1 (통과) */
    margin-left: auto;
    background: #15803d;
    border: 1px solid #15803d;
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
}
.activity-counter-badge:hover { background: #14532d; border-color: #14532d; color: #fff; }

/* --- 요약 카드 그리드 --- */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

/* --- 산출물 탭 --- */
.deliverables-tab-bar {
    display: flex;
    gap: 6px;
    margin: 10px 0 0;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    align-items: center;
}
.tab-btn {
    cursor: pointer;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    transition: background 0.12s, color 0.12s;
}
.tab-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 600;
}
.deliverables-search-row {
    width: 100%;
    margin-top: 8px;
    display: none;
}
.deliverables-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    background: var(--bg);
    color: var(--text);
    box-sizing: border-box;
}

/* 데스크탑: 검색을 탭 오른쪽에 인라인 */
@media (min-width: 769px) {
    .deliverables-search-row { display: none; }
    .deliverables-search-inline {
        margin-left: auto;
        min-width: 180px;
        padding: 8px 10px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        font-size: 0.82rem;
        background: var(--bg);
        color: var(--text);
        min-height: 44px;
    }
}

/* --- 파일 행: 데스크탑 6열, 모바일 2행 --- */
.file-row {
    display: grid;
    grid-template-columns: 28px 1fr auto auto auto auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
}
.file-row:hover { background: var(--bg-card-hover); }

.file-row-icon { font-size: 1.1rem; }
.file-row-name { min-width: 0; overflow: hidden; }
.file-row-name a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-row-name .file-row-path {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.file-row-new-badge {
    /* WCAG AA: #15803d bg + #fff text = 4.54:1 (통과) */
    background: #15803d;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
}
.file-row-size { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.file-row-time { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.file-row-actions {
    display: flex;
    gap: 4px;
    white-space: nowrap;
}
.file-row-actions a {
    text-decoration: none;
    color: var(--accent);
    font-size: 0.85rem;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    min-height: 32px;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.file-row-actions a:hover { background: var(--bg-card-hover); }

/* --- 오늘 결정 저장 버튼 --- */
.decision-save-btn {
    cursor: pointer;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #000;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 44px;
    font-family: inherit;
}
.decision-save-btn:hover { background: var(--gold-hover); border-color: var(--gold-hover); }

/* --- details 아코디언 커스텀 아이콘 --- */
.project-detail-page details > summary { list-style: none; }
.project-detail-page details > summary::-webkit-details-marker { display: none; }
.project-detail-page details > summary::before {
    content: '▸';
    font-size: 0.7rem;
    color: var(--accent);
    margin-right: 6px;
    display: inline-block;
    transition: transform 0.2s;
}
.project-detail-page details[open] > summary::before {
    content: '▾';
}

/* ================================================================
 * DASH-0423 모바일 반응형 (max-width: 768px)
 * ================================================================ */
@media (max-width: 768px) {
    /* 1. 헤더 카운터: 이미 .activity-counter-badge로 대비 확보 */

    /* 2. 상단 4박스: 2x2 그리드 */
    .stat-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* 3. 산출물 탭: 탭 버튼 풀와이드 + 검색 별도 행 */
    .deliverables-tab-bar {
        gap: 4px;
    }
    .tab-btn {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
        font-size: 0.78rem;
        padding: 10px 8px;
    }
    .deliverables-search-inline { display: none !important; }
    .deliverables-search-row { display: block; }

    /* 4. 파일 행: 6열 → 2행 레이아웃 */
    .file-row {
        grid-template-columns: 28px 1fr auto;
        grid-template-rows: auto auto;
        row-gap: 4px;
    }
    .file-row-icon { grid-row: 1; grid-column: 1; }
    .file-row-name { grid-row: 1; grid-column: 2; }
    .file-row-new-badge { grid-row: 1; grid-column: 3; align-self: center; }
    .file-row-size {
        grid-row: 2;
        grid-column: 1 / 2;
        padding-left: 28px;
        color: var(--text-muted);
    }
    .file-row-time {
        grid-row: 2;
        grid-column: 2 / 3;
    }
    .file-row-actions {
        grid-row: 2;
        grid-column: 3;
    }
    .file-row-actions a {
        padding: 8px;
        min-height: 36px;
        min-width: 36px;
    }

    /* 5. 오늘 결정 폼: 저장 버튼 풀와이드 */
    .decision-form { flex-direction: column !important; }
    .decision-save-btn { width: 100%; min-height: 44px; }
    .decision-input { min-width: 0 !important; width: 100%; }
}

/* === Intelligence Brief (DEV-0511-INTEL-BRIEF-S04-S02) === */
.intel-brief {
    --brief-bg: #f7f8fa;
    --brief-surface: var(--bg-card);
    --brief-surface-muted: var(--bg-card-hover);
    --brief-text: var(--text);
    --brief-text-muted: var(--text-muted);
    --brief-border: var(--border);
    --brief-accent: #0e7f7a;
    --brief-accent-strong: #075f5b;
    --brief-warning: var(--yellow);
    --brief-danger: var(--red);
    --brief-success: var(--green);
    --brief-radius: 8px;
    --brief-gap: 24px;
    --brief-gap-sm: 12px;
    max-width: 1180px;
    margin: 0 auto;
    color: var(--brief-text);
}

.intel-brief__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.intel-brief__title {
    margin: 0;
    font-size: 28px;
    line-height: 36px;
    font-weight: 800;
    letter-spacing: 0;
}

.intel-brief__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.25rem;
    color: var(--brief-text-muted);
    font-size: 12px;
    line-height: 18px;
}

.intel-brief__date-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.intel-brief__date-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 0 0 auto;
}

.brief-date-nav__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid var(--brief-border);
    border-radius: 6px;
    background: var(--brief-surface);
    color: var(--brief-text-muted);
    cursor: pointer;
    transition: border-color 0.12s, color 0.12s, background 0.12s;
    padding: 0;
}

.brief-date-nav__btn:hover:not(:disabled) {
    border-color: var(--brief-accent);
    color: var(--brief-accent-strong);
    background: color-mix(in srgb, var(--brief-accent) 6%, var(--brief-surface));
}

.brief-date-nav__btn:focus-visible {
    outline: 2px solid var(--brief-accent);
    outline-offset: 2px;
}

.brief-date-nav__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.brief-date-nav__btn[aria-disabled="true"] {
    opacity: 0.35;
    pointer-events: none;
}

.intel-brief__date-form label {
    color: var(--brief-text-muted);
    font-size: 12px;
    line-height: 18px;
    font-weight: 700;
}

.brief-date-nav__label {
    color: var(--brief-text-muted);
    font-size: 12px;
    line-height: 18px;
    font-weight: 700;
}

.brief-date-nav__select {
    min-width: 130px;
    min-height: 34px;
    border: 1px solid var(--brief-border);
    border-radius: 6px;
    background: var(--brief-surface);
    color: var(--brief-text);
    padding: 0.3rem 0.55rem;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.12s;
}

.brief-date-nav__select:focus-visible,
.brief-list-item a:focus-visible {
    outline: 2px solid var(--brief-accent);
    outline-offset: 2px;
}

.intel-brief__status-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.brief-archive {
    display: flex;
    flex-direction: column;
    gap: var(--brief-gap-sm);
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--brief-border);
    border-radius: var(--brief-radius);
    background: color-mix(in srgb, var(--brief-surface) 88%, var(--brief-surface-muted));
}

.brief-archive__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.brief-archive__header h2 {
    font-size: 1rem;
    line-height: 1.2;
}

.brief-archive__header p,
.brief-archive__done {
    color: var(--brief-text-muted);
    font-size: 0.85rem;
}

.brief-archive__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.brief-archive__list,
.brief-archive__noscript,
.brief-archive__skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.brief-archive-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-height: 88px;
    padding: 0.9rem;
    border: 1px solid color-mix(in srgb, var(--brief-border) 85%, transparent);
    border-radius: calc(var(--brief-radius) - 2px);
    background: var(--brief-surface);
    color: var(--brief-text);
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.brief-archive-item strong {
    font-size: 0.95rem;
    line-height: 1.25;
}

.brief-archive-item span {
    color: var(--brief-text-muted);
    font-size: 0.8rem;
    word-break: break-all;
}

.brief-archive-item:hover,
.brief-archive-item:focus-visible {
    border-color: var(--brief-accent);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 127, 122, 0.08);
}

.brief-archive-item:focus-visible {
    outline: 2px solid var(--brief-accent);
    outline-offset: 2px;
}

.brief-archive-item.is-active {
    border-color: var(--brief-accent);
    background: color-mix(in srgb, var(--brief-accent) 8%, var(--brief-surface));
}

.brief-archive-item--skeleton {
    pointer-events: none;
}

.brief-archive-item__line {
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--brief-border) 82%, transparent) 0%,
        color-mix(in srgb, var(--brief-surface-muted) 90%, white) 50%,
        color-mix(in srgb, var(--brief-border) 82%, transparent) 100%
    );
    background-size: 200% 100%;
    animation: brief-skeleton-shimmer 1.2s linear infinite;
}

.brief-archive-item__line--lg {
    width: 78%;
    height: 16px;
}

.brief-archive-item__line--sm {
    width: 52%;
    height: 12px;
}

.brief-archive__sentinel {
    width: 100%;
    height: 1px;
}

@keyframes brief-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.intel-brief__filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.6rem 0.9rem;
    background: color-mix(in srgb, var(--brief-surface) 80%, var(--brief-surface-muted));
    border: 1px solid var(--brief-border);
    border-radius: var(--brief-radius);
}

.brief-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 180px;
    min-width: 140px;
    max-width: 260px;
}

.brief-search__icon {
    position: absolute;
    left: 0.55rem;
    color: var(--brief-text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.brief-search__input {
    width: 100%;
    min-height: 32px;
    padding: 0.25rem 1.8rem 0.25rem 1.9rem;
    border: 1px solid var(--brief-border);
    border-radius: 20px;
    background: var(--brief-surface);
    color: var(--brief-text);
    font-size: 13px;
    line-height: 1;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.brief-search__input::placeholder {
    color: var(--brief-text-muted);
}

.brief-search__input:focus-visible {
    outline: none;
    border-color: var(--brief-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brief-accent) 18%, transparent);
}

.brief-search__clear {
    position: absolute;
    right: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: var(--brief-border);
    color: var(--brief-text-muted);
    font-size: 10px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background 0.12s;
}

.brief-search__clear:hover {
    background: color-mix(in srgb, var(--brief-accent) 20%, var(--brief-border));
}

.brief-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.brief-filter-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--brief-border);
    border-radius: 999px;
    background: var(--brief-surface);
    color: var(--brief-text-muted);
    font-size: 12px;
    line-height: 18px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.brief-filter-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.brief-filter-chip:has(input:checked) {
    border-color: var(--brief-accent);
    background: color-mix(in srgb, var(--brief-accent) 10%, var(--brief-surface));
    color: var(--brief-accent-strong);
}

.brief-filter-chip:hover {
    border-color: color-mix(in srgb, var(--brief-accent) 45%, var(--brief-border));
}

.brief-filter-reset {
    margin-left: auto;
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--brief-border);
    border-radius: 999px;
    background: transparent;
    color: var(--brief-text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.12s, border-color 0.12s;
}

.brief-filter-reset:hover {
    color: var(--brief-accent-strong);
    border-color: var(--brief-accent);
}

.intel-brief__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--brief-gap);
}

.brief-card {
    grid-column: span 6;
    background: var(--brief-surface);
    border: 1px solid var(--brief-border);
    border-radius: var(--brief-radius);
    padding: 18px;
}

.brief-card--span-7 { grid-column: span 7; }
.brief-card--span-5 { grid-column: span 5; }
.brief-card--wide { grid-column: 1 / -1; }

.brief-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.brief-card__header h2 {
    margin: 0;
    font-size: 18px;
    line-height: 26px;
    letter-spacing: 0;
}

.brief-card__header p {
    margin: 0.1rem 0 0;
    color: var(--brief-text-muted);
    font-size: 12px;
    line-height: 18px;
}

.brief-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--brief-gap-sm);
}

.brief-grid {
    display: grid;
    gap: var(--brief-gap-sm);
}

.brief-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brief-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.brief-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.brief-list-item {
    border: 1px solid color-mix(in srgb, var(--brief-border) 80%, transparent);
    border-radius: 6px;
    background: color-mix(in srgb, var(--brief-surface-muted) 45%, transparent);
    padding: 0.75rem;
}

.brief-list-item:hover {
    box-shadow: 0 2px 8px rgba(23, 32, 31, 0.08);
}

.brief-list-item--issue {
    border-color: color-mix(in srgb, var(--brief-danger) 35%, var(--brief-border));
}

.brief-list-item__meta,
.brief-order-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    color: var(--brief-text-muted);
    font-size: 12px;
    line-height: 18px;
}

.brief-list-item h3,
.brief-trend-column > h3,
.brief-ops-block > h3 {
    margin: 0.25rem 0 0;
    font-size: 15px;
    line-height: 22px;
    letter-spacing: 0;
}

.brief-list-item p {
    margin: 0.3rem 0 0;
    color: var(--brief-text-muted);
    font-size: 14px;
    line-height: 21px;
}

.brief-list-item a {
    display: inline-flex;
    margin-top: 0.45rem;
    color: var(--brief-accent-strong);
    font-size: var(--font-body);
    font-weight: 700;
    text-decoration: none;
}

.brief-list-item a:hover { text-decoration: underline; }

.brief-highlight {
    background: color-mix(in srgb, #ffd700 45%, transparent);
    color: var(--brief-text);
    border-radius: 2px;
    padding: 0 1px;
    font-weight: inherit;
}

.brief-badge,
.brief-kpi {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid color-mix(in srgb, var(--brief-accent) 25%, var(--brief-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--brief-accent) 8%, var(--brief-surface));
    color: var(--brief-accent-strong);
    padding: 0.12rem 0.55rem;
    font-size: 12px;
    line-height: 18px;
    font-weight: 700;
}

.brief-kpi strong {
    margin-right: 0.25rem;
    font-size: 14px;
}

.brief-kpi--large {
    justify-content: center;
    min-height: 58px;
    border-radius: 6px;
    font-size: 14px;
}

.brief-empty {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border: 1px dashed var(--brief-border);
    border-radius: 6px;
    background: color-mix(in srgb, var(--brief-surface-muted) 60%, transparent);
    color: var(--brief-text-muted);
    padding: 1rem;
    font-size: 14px;
    line-height: 21px;
}

.brief-empty strong {
    color: var(--brief-text);
    font-size: 15px;
    line-height: 22px;
}

.brief-empty--compact {
    padding: 0.65rem;
    font-size: 12px;
    line-height: 18px;
}

.brief-pnl {
    display: grid;
    border: 1px solid var(--brief-border);
    border-radius: 6px;
    overflow: hidden;
}

.brief-pnl-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-top: 1px solid var(--brief-border);
    font-size: 14px;
    line-height: 21px;
}

.brief-pnl-row:first-child { border-top: 0; }

.brief-pnl-row--head {
    background: var(--brief-surface-muted);
    color: var(--brief-text-muted);
    font-size: 12px;
    line-height: 18px;
    font-weight: 700;
}

.brief-order-summary {
    padding: 0.6rem 0;
}

.brief-ops-kpis {
    margin-bottom: var(--brief-gap-sm);
}

.brief-ops-block {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.brief-card[data-section].is-filtered-out {
    display: none;
}

.is-positive { color: var(--brief-success) !important; font-weight: 800; }
.is-negative { color: var(--brief-danger) !important; font-weight: 800; }
.is-neutral { color: var(--brief-text-muted) !important; font-weight: 700; }

@media (max-width: 768px) {
    .intel-brief {
        max-width: 100%;
    }
    .intel-brief__header {
        align-items: stretch;
        flex-direction: column;
    }
    .intel-brief__title {
        font-size: 24px;
        line-height: 31px;
    }
    .intel-brief__date-nav {
        width: 100%;
        justify-content: space-between;
    }
    .brief-date-nav__btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }
    .intel-brief__date-form {
        flex: 1;
        justify-content: center;
    }
    .brief-date-nav__select {
        width: 100%;
    }
    .intel-brief__grid,
    .brief-grid--three {
        grid-template-columns: 1fr;
        gap: var(--brief-gap-sm);
    }
    .brief-archive__header {
        flex-direction: column;
    }
    .brief-archive__meta {
        justify-content: flex-start;
    }
    .brief-archive__list,
    .brief-archive__noscript,
    .brief-archive__skeleton {
        grid-template-columns: 1fr;
    }
    .intel-brief__filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .brief-search {
        max-width: 100%;
    }
    .brief-filter-reset {
        margin-left: 0;
        align-self: flex-end;
    }
    .brief-card,
    .brief-card--span-7,
    .brief-card--span-5,
    .brief-card--wide {
        grid-column: 1 / -1;
        padding: 14px;
    }
    .brief-card__header h2 {
        font-size: var(--font-h2);
        line-height: 24px;
    }
    .brief-pnl-row {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brief-list-item,
    .brief-list-item:hover {
        transition: none;
        transform: none;
    }
}

.cb-widget { display: flex; flex-direction: column; gap: 12px; padding: 1rem; }
.cb-widget__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cb-widget__title { margin: 0; font-size: 0.9rem; font-weight: 700; }
.cb-widget__meta { margin: 4px 0 0; font-size: 0.72rem; color: var(--text-muted); }
.cb-widget__badge { border-radius: 999px; padding: 4px 8px; font-size: 0.68rem; font-weight: 700; border: 1px solid currentColor; }
.cb-widget__badge--ok { color: var(--green); background: rgba(34,197,94,0.1); }
.cb-widget__badge--warning { color: var(--yellow); background: rgba(217,119,6,0.1); }
.cb-widget__badge--critical { color: var(--red); background: rgba(194,85,58,0.1); }
.cb-widget__stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.cb-widget__stat { border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.cb-widget__stat-label { display: block; font-size: 0.68rem; color: var(--text-muted); }
.cb-widget__stat-value { display: block; font-size: 1.2rem; font-weight: 700; }
.cb-widget__accordion summary { cursor: pointer; font-size: 0.75rem; font-weight: 600; }
.cb-widget__file-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cb-widget__file { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); padding-top: 6px; }
.cb-widget__file-name { font-size: 0.72rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.cb-widget__file-meta, .cb-widget__file-kind { font-size: 0.64rem; color: var(--text-muted); }

.overview-hero-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; align-items: stretch; margin-bottom: 1rem; max-width: 100%; }
.overview-hero-grid > .widget { min-width: 0; min-height: 704px; overflow: hidden; }
.overview-combo-widget { display: flex; flex-direction: column; gap: 0; }
.overview-combo-widget > div[hx-get] { min-height: 0; }
.overview-combo-widget > div[hx-get="/api/widgets/project-breakdown"] { flex: 0 0 auto; order: 1; }
.overview-combo-widget > div[hx-get="/api/widgets/llm-usage-dual-html"] { flex: 1 1 auto; padding-top: 0.15rem; order: 2; }
.overview-widget-divider { border-top: 1px dashed var(--border); margin: 0.85rem 0 0.75rem; order: 1; }
.overview-token-widget, .overview-pass-widget { display: flex; flex-direction: column; }
.overview-token-widget > *, .overview-pass-widget > * { min-width: 0; }
.overview-ops-grid { margin-top: 1rem; }
@media (max-width: 900px) { .overview-hero-grid { grid-template-columns: 1fr; } .overview-hero-grid > .widget { min-height: 0; } }
.rail-item i[data-lucide], .rail-toggle i[data-lucide] { width: 20px; height: 20px; min-width: 20px; display: inline-flex; align-items: center; justify-content: center; }
.rail-toggle i[data-lucide] { width: 16px; height: 16px; min-width: 16px; }
.overview-combo-widget, .overview-token-widget, .overview-pass-widget { max-width: 100%; }
.pass-rate-widget, .pass-rate-widget__table-wrap, .llm-usage-dual { max-width: 100%; min-width: 0; }
.pass-rate-widget__table-wrap { overflow-x: auto; }
.pass-rate-widget__table { min-width: 0; width: 100%; table-layout: fixed; }
.pass-rate-widget__table th, .pass-rate-widget__table td { overflow: hidden; text-overflow: clip; white-space: nowrap; font-size: 0.74rem; }
.pass-rate-widget__table th:nth-child(1), .pass-rate-widget__table td:nth-child(1) { width: 25%; }
.pass-rate-widget__table th:nth-child(2), .pass-rate-widget__table td:nth-child(2) { width: 20%; }
.pass-rate-widget__table th:nth-child(3), .pass-rate-widget__table td:nth-child(3) { width: 18%; }
.pass-rate-widget__table th:nth-child(4), .pass-rate-widget__table td:nth-child(4) { width: 15%; }
@media (max-width: 900px) { .overview-hero-grid { grid-template-columns: minmax(0, 1fr); } .overview-hero-grid > .widget { min-height: 0; } }
.overview-token-widget { order: 2; }
.overview-pass-widget { order: 3; }
.overview-combo-widget { order: 1; }
.token-gauge-overview { display: grid; grid-template-columns: 70px minmax(0, 1fr) 78px minmax(0, 1fr); gap: 10px; align-items: center; padding: 0.35rem 0 0.65rem; border-bottom: 1px solid rgba(48,44,38,0.08); margin-bottom: 0.65rem; }
.token-ring { --pct: 0; width: 62px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), rgba(48,44,38,0.08) 0); position: relative; }
.token-ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--card-bg, #fbf8f0); }
.token-ring span, .token-ring small { position: relative; z-index: 1; display: block; line-height: 1; }
.token-ring span { font-weight: 800; font-size: 0.78rem; }
.token-ring small { font-size: 0.5rem; color: var(--text-muted); margin-top: 2px; }
.token-ring--in { --ring-color: #2f8f62; }
.token-ring--out { --ring-color: #c43b2f; }
.token-io-metric { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.token-io-metric small, .token-io-metric span { color: var(--text-muted); font-size: 0.62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.token-io-metric strong { font-size: 0.92rem; color: var(--text); }
.token-metric-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 0.72rem; color: var(--text-muted); margin: 0.45rem 0 0.22rem; }
.token-metric-row strong { color: var(--text); font-size: 0.82rem; }
.token-metric-bar { margin-bottom: 0.28rem; }
@media (max-width: 1180px) { .token-gauge-overview { grid-template-columns: 62px minmax(0, 1fr); } }
.token-weekline { border-top: 1px solid rgba(48,44,38,0.08); margin-top: 0.55rem; padding-top: 0.5rem; }
.token-weekline > div:first-child { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.68rem; margin-bottom: 0.32rem; }
.token-weekline-bars { display: flex; gap: 3px; }
.token-weekline-bars b { flex: 1; height: 6px; border-radius: 3px; background: rgba(48,44,38,0.08); position: relative; }
.token-weekline-bars b.done { background: var(--accent); opacity: 0.5; }
.token-weekline-bars b.now { background: var(--accent); }
.token-weekline-bars em { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 0.55rem; color: var(--accent); }
.token-weekline-days { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.55rem; margin-top: 2px; }
.token-weekline-days .now { color: var(--accent); font-weight: 700; }
.token-reset-lines { display: flex; flex-direction: column; gap: 2px; margin: -0.1rem 0 0.35rem; text-align: right; color: var(--text-muted); font-size: 0.58rem; }
.llm-usage-dual { display: flex; flex-direction: column; gap: 0.45rem; }
.llm-usage-dual__head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 0.35rem; }
.llm-usage-dual__window { border: 1px solid var(--border); border-radius: 999px; padding: 0.12rem 0.45rem; font-size: 0.68rem; background: rgba(255,255,255,0.55); }
.llm-usage-dual__summary { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.llm-usage-dual__summary span { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; margin-left: 0.25rem; }
.llm-usage-dual__balances { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.35rem; }
.llm-usage-dual__balance { min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 0.32rem 0.38rem; background: rgba(255,255,255,0.45); }
.llm-usage-dual__balance span { display: block; color: var(--text-muted); font-size: 0.58rem; font-weight: 700; }
.llm-usage-dual__balance strong { display: block; color: var(--text); font-size: 0.64rem; line-height: 1.25; white-space: normal; }
.llm-usage-dual__bars { display: flex; flex-direction: column; gap: 0.55rem; margin: 0; }
.llm-usage-dual__row { margin: 0; }
.llm-usage-dual__row dt { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.8rem; margin-bottom: 0.22rem; }
.llm-usage-dual__row dd { margin: 0; }
.llm-usage-dual__track { height: 10px; border-radius: 999px; background: rgba(48,44,38,0.08); overflow: hidden; display: flex; }
.llm-usage-dual__segment { height: 100%; display: block; min-width: 2px; }
.llm-usage-dual__detail { margin: 0.18rem 0 0; color: var(--text-muted); font-size: 0.62rem; }
.llm-usage-dual__legend { list-style: none; margin: 0.22rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.16rem; }
.llm-usage-dual__legend li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 0.28rem; font-size: 0.62rem; }
.llm-usage-dual__swatch { width: 8px; height: 8px; border-radius: 2px; }
.llm-usage-dual__legend-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.llm-usage-dual__meta { color: var(--text-muted); font-size: 0.6rem; text-align: right; margin-top: 0.2rem; }
.token-weekline-legend { display: flex; justify-content: flex-end; gap: 0.55rem; color: var(--text-muted); font-size: 0.58rem; margin-top: 0.25rem; }
.rail:not(.expanded) .rail-item { justify-content: center; padding: 0; }
.rail:not(.expanded) .rail-item .item-label, .rail:not(.expanded) .rail-item .item-badge { display: none !important; }
.rail:not(.expanded) .rail-item > svg, .rail:not(.expanded) .rail-item > i[data-lucide] { display: inline-flex !important; width: 20px !important; height: 20px !important; min-width: 20px !important; color: var(--sidebar-text-active); opacity: 0.9; }
.rail:not(.expanded) .rail-item.active > svg, .rail:not(.expanded) .rail-item.active > i[data-lucide] { color: var(--sidebar-text-active); opacity: 1; }
.rail:not(.expanded) .rail-item::before, .rail:not(.expanded) .rail-item i[data-lucide]::before { content: none !important; display: none !important; }
.pass-rate-widget__summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; margin: 0.55rem 0 0.5rem; }
.pass-rate-widget__number { font-size: 2rem; line-height: 1; font-weight: 800; color: var(--text); }
.pass-rate-widget__sample { text-align: right; color: var(--text); font-size: 0.78rem; line-height: 1.45; }
.pass-rate-widget__badge { border-radius: 999px; padding: 0.18rem 0.55rem; font-size: 0.68rem; border: 1px solid var(--border); }
.pass-rate-widget__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.pass-rate-widget__table th, .pass-rate-widget__table td { padding: 0.22rem 0.25rem; }
.pass-rate-widget__meta { margin-top: 0.65rem; text-align: right; color: var(--text-muted); font-size: 0.68rem; }
/* restore pass-rate card layout to the original compact overview design */
.pass-rate-widget { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.pass-rate-widget__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; border-bottom: 1px solid var(--border); padding-bottom: 0.45rem; margin-bottom: 0.55rem; }
.pass-rate-widget__head .widget-title { margin: 0; border-bottom: 0; padding-bottom: 0; text-transform: none; letter-spacing: 0; color: var(--text-muted); }
.pass-rate-widget__badge { border-radius: 999px; padding: 0.18rem 0.58rem; font-size: 0.68rem; line-height: 1; border: 1px solid var(--border); background: rgba(255,255,255,0.55); color: var(--text); font-weight: 700; white-space: nowrap; }
.pass-rate-widget__badge--ok { border-color: rgba(201,168,76,0.5); }
.pass-rate-widget__summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin: 0.45rem 0 0.55rem; }
.pass-rate-widget__number { font-size: 2rem; line-height: 1; font-weight: 800; color: var(--text); }
.pass-rate-widget__sample { text-align: right; color: var(--text); font-size: 0.72rem; line-height: 1.35; white-space: nowrap; }
.pass-rate-widget__sample strong { font-size: 0.72rem; font-weight: 800; }
.pass-rate-widget__track { width: 100%; height: 14px; border-radius: 999px; background: rgba(48,44,38,0.10); overflow: hidden; margin: 0.6rem 0 0.85rem; }
.pass-rate-widget__fill { display: block; height: 100%; min-width: 8px; border-radius: 999px; background: #2f9b73; }
.pass-rate-widget__table-wrap { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-bottom: 0.2rem; scrollbar-width: auto; }
.pass-rate-widget__table { width: 100%; min-width: 455px; border-collapse: collapse; table-layout: fixed; font-size: 0.68rem; }
.pass-rate-widget__table th, .pass-rate-widget__table td { padding: 0.28rem 0.35rem; border-bottom: 1px solid rgba(48,44,38,0.08); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.pass-rate-widget__table thead th { color: var(--text-muted); font-weight: 800; text-align: left; }
.pass-rate-widget__table tbody th { font-weight: 800; color: var(--text); }
.pass-rate-widget__table td strong { font-weight: 800; color: var(--text); }
.pass-rate-widget__table th:nth-child(1), .pass-rate-widget__table td:nth-child(1) { width: 17%; }
.pass-rate-widget__table th:nth-child(2), .pass-rate-widget__table td:nth-child(2) { width: 16%; }
.pass-rate-widget__table th:nth-child(3), .pass-rate-widget__table td:nth-child(3) { width: 18%; }
.pass-rate-widget__table th:nth-child(4), .pass-rate-widget__table td:nth-child(4) { width: 15%; }
.pass-rate-widget__table th:nth-child(5), .pass-rate-widget__table td:nth-child(5) { width: 34%; }
.pass-rate-widget__meta { margin-top: 0.65rem; text-align: right; color: var(--text-muted); font-size: 0.62rem; }
