.app-header { background: #fcfcfe; border-bottom: 1px solid var(--line); }
.app-header > .wrap { display: flex; align-items: center; gap: .95rem; min-height: 72px; }
.app-header .brand img { width: clamp(8.5rem, 19vw, 10.25rem); }
.app-header .btn { margin-left: auto; }
.app-caption { color: #646272; font-size: .9rem; }
.header-divider { width: 1px; height: 23px; background: var(--line); }
#workspace { padding-block: 1.65rem 4rem; outline: none; }
.loading { padding: 3rem 0; color: var(--muted); }
.work-layout { display: grid; align-items: start; grid-template-columns: minmax(185px, .21fr) minmax(0, 1fr); gap: clamp(1.2rem, 2.5vw, 2.5rem); }
.sidebar { position: sticky; top: 16px; }
.project-identity { display: flex; gap: .65rem; align-items: center; padding: .5rem .3rem 1.15rem; border-bottom: 1px solid var(--line); }
.project-identity > div { min-width: 0; }
.project-identity strong, .project-identity small { display: block; overflow-wrap: anywhere; }
.project-identity strong { font-size: 1rem; letter-spacing: -.025em; }
.project-identity small { color: var(--muted); font-size: .81rem; }
.project-symbol { display: inline-grid; place-items: center; width: 39px; height: 39px; flex: none; background: #ddd6ff; border: 1px solid #cfc4fa; color: #5b459c; border-radius: .75rem; }
.project-symbol .icon { width: 21px; height: 21px; }
.app-nav { display: grid; gap: .23rem; margin-block: 1rem; }
.app-nav a { display: flex; align-items: center; gap: .7rem; padding: .66rem .8rem; border-radius: .65rem; color: #54525f; font-size: .92rem; font-weight: 525; }
.app-nav a:hover { background: #eeedf4; }
.app-nav a[aria-current="page"] { color: #513e9f; background: #e8e2fa; font-weight: 620; }
.side-context { margin-top: 1rem; padding: 1rem .5rem 0; border-top: 1px solid var(--line); font-size: .83rem; color: var(--muted); }
.side-context p { display: flex; align-items: center; gap: .4rem; margin-bottom: .35rem; }
.side-context p .icon { width: 15px; }
.side-context .text-btn { margin-top: .2rem; font-size: .81rem; }
.main-panel { min-width: 0; }
.view-head, .project-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.view-head h1, .project-page-head h1 { font-size: clamp(1.95rem, 3.2vw, 3rem); font-weight: 635; line-height: 1.08; letter-spacing: -.06em; }
.view-head .demo-label { margin-bottom: .5rem; }
.view-head p, .project-page-head p { margin-top: .5rem; color: var(--muted); }
.head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.period-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding: .75rem 1rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: .85rem; background: #fff; }
.period-bar .field { display: flex; align-items: center; gap: .5rem; color: #605e6d; white-space: nowrap; }
.period-bar .select { min-width: 8rem; width: auto; max-width: 100%; padding-block: .35rem; background-color: #f9f8fc; font-size: .875rem; font-weight: 520; }
.rank-engines { display: inline-flex; gap: .16rem; padding: .18rem; border-radius: .65rem; background: #f0eef7; }
.rank-engines button { min-height: 2rem; padding: .2rem .75rem; border: 0; border-radius: .48rem; background: transparent; color: var(--muted); font-size: .84rem; font-weight: 560; }
.rank-engines button[aria-pressed=true] { color: var(--purple); background: white; box-shadow: 0 1px 3px #24144824; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .7rem; margin-bottom: 1rem; }
.kpi, .panel, .project-card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; }
.kpi { padding: 1rem 1.1rem; }
.kpi.primary { background: #e9e3ff; border-color: #d7cdf8; }
.kpi p { color: #605e70; font-size: .88rem; font-weight: 540; }
.kpi strong { display: block; margin-top: .5rem; font-size: clamp(1.7rem, 2.35vw, 2.5rem); line-height: 1.08; font-weight: 600; letter-spacing: -.06em; }
.kpi small { display: block; margin-top: .45rem; font-size: .78rem; color: var(--muted); }
.overview-pair { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr); gap: .85rem; margin-bottom: 1rem; }
.panel { padding: clamp(1rem, 1.65vw, 1.65rem); min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .55rem; margin-bottom: 1rem; }
.panel h2, .project-card h2 { font-size: clamp(1.15rem, 1.55vw, 1.5rem); font-weight: 625; line-height: 1.2; letter-spacing: -.04em; }
.panel-head > small, .panel-head > span { color: var(--muted); font-size: .8rem; }
.panel-head > a, .inline-link { color: var(--purple); font-weight: 570; }
.panel-head > a { font-size: .85rem; }
.panel-head > a:hover, .inline-link:hover { text-decoration: underline; }
.chart-plot { height: 159px; }
.chart-plot svg { width: 100%; height: 100%; overflow: visible; }
.chart-caption { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-top: .45rem; color: var(--muted); font-size: .78rem; }
.priority { display: flex; flex-direction: column; align-items: start; gap: .7rem; background: #ebe6fb; border-color: #dcd3f1; }
.priority .priority-symbol { width: 33px; height: 33px; display: grid; place-items: center; border-radius: .65rem; color: #645197; background: #ddd4f7; }
.priority h2 { overflow-wrap: anywhere; }
.priority p { color: #625974; font-size: .92rem; line-height: 1.48; }
.priority .btn { margin-top: auto; }
.toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: .7rem; margin-bottom: 1rem; }
.search-field { position: relative; flex: 1; min-width: min(205px, 100%); }
.search-field .icon { position: absolute; bottom: .78rem; left: .72rem; color: #777383; width: 17px; height: 17px; }
.search-field .input { padding-left: 2.15rem; }
.toolbar .field { font-size: .8125rem; color: #666273; }
.toolbar .select, .toolbar .input { min-height: 40px; font-size: .91rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.context-chip { display: inline-flex; gap: .5rem; align-items: center; max-width: 100%; overflow-wrap: anywhere; border: 1px solid #d7cfef; border-radius: 1rem; background: #f4f0ff; padding: .28rem .6rem; color: #5c498c; font-size: .84rem; }
.table-frame { overflow-x: auto; }
.app-table { min-width: 500px; }
.app-table th { background: #f7f7fa; }
.app-table td:first-child { font-weight: 525; }
.app-table td { vertical-align: middle; overflow-wrap: anywhere; }
.app-table .url { min-width: 110px; max-width: 220px; color: #6a6479; font-size: .82rem; }
.app-table tr:hover td { background: #fbfaff; }
.app-table input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--purple); }
.app-table .check-cell { width: 32px; padding-inline: .5rem; }
.row-link { color: var(--purple); font-weight: 550; text-decoration: underline; text-underline-offset: .16em; }
.select-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: .8rem; }
.select-actions .btn { min-height: 36px; padding: .45rem .7rem; font-size: .83rem; }
.select-actions small { color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; margin-top: .85rem; }
.pager span { color: var(--muted); font-size: .86rem; }
.pager-nav { display: inline-flex; align-items: center; gap: .35rem; }
.pager .btn { min-height: 34px; padding: .35rem .7rem; font-size: .82rem; }
.project-page-head { margin: 1rem 0 1.6rem; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%, 275px),1fr)); gap: 1rem; }
.project-card { display: grid; grid-template-rows: auto auto 1fr auto; align-items: start; gap: .55rem; min-height: 195px; padding: 1.3rem; transition: box-shadow .15s, border-color .15s; overflow-wrap: anywhere; }
.project-card:hover { border-color: #b7aade; box-shadow: 0 8px 24px #241c3d0c; }
.project-card.is-demo { background: linear-gradient(110deg, #ede9ff, #f7f4ff); }
.project-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem; }
.project-card p { color: var(--muted); font-size: .93rem; }
.project-card-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; padding-top: .65rem; margin-top: .45rem; border-top: 1px solid #dcd7e7; color: #625b72; font-size: .84rem; }
.empty { display: grid; justify-items: start; gap: .7rem; padding: 1.5rem; border: 1px dashed #c9c3d9; border-radius: .9rem; background: #fcfbff; }
.empty .icon { color: #8678ad; }
.empty h2 { font-size: 1.3rem; }
.empty p { max-width: 37rem; color: var(--muted); font-size: .95rem; }
.quiet { margin: .6rem 0; color: var(--muted); font-size: .9rem; }
.file-input { display: block; max-width: 100%; font-size: .9rem; font-weight: 400; }
.file-input::file-selector-button { font-family: inherit; margin-right: .55rem; padding: .5rem .75rem; border: 1px solid #ccc9d9; border-radius: .5rem; color: var(--ink); background: #f8f6fc; cursor: pointer; }
.import-format { padding: .75rem; border-radius: .65rem; background: #f5f2fb; color: #5d556e; font-size: .875rem; }
.import-format button { margin-top: .4rem; display: block; }
.import-preview { padding: .7rem; border: 1px solid #cbdfd7; border-radius: .65rem; background: #f0faf4; font-size: .9rem; }
.import-preview strong { color: #2a6852; }
.import-preview .table-frame { margin-top: .4rem; }
.import-preview table th, .import-preview table td { padding: .3rem; font-size: .8rem; }
#notice { position: fixed; z-index: 4; left: 50%; bottom: 1.25rem; transform: translateX(-50%); max-width: calc(100% - 2rem); width: max-content; color: white; background: #242135; border-radius: .65rem; padding: .68rem 1rem; box-shadow: 0 6px 20px #211d3725; font-size: .91rem; }
#notice:empty { display: none; }
@media (min-width: 1600px) { .work-layout { grid-template-columns: 220px minmax(0, 1fr); } }
@media (max-width: 1100px) {
  .work-layout { grid-template-columns: 175px minmax(0,1fr); gap: 1rem; }
  .overview-pair { grid-template-columns: 1.15fr 1fr; }
  .kpi { padding: .8rem; }
  .app-table td, .app-table th { padding-inline: .5rem; }
}
@media (max-width: 900px) {
  #workspace { padding-top: 1rem; }
  .work-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .project-identity { padding: 0; border: 0; }
  .project-identity > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
  .project-identity .project-symbol { width: 30px; height: 30px; }
  .app-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem; margin-block: .7rem .2rem; }
  .app-nav a { padding: .4rem .65rem; font-size: .88rem; }
  .side-context { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .7rem; border: none; }
  .side-context p { margin: 0; }
}
@media (max-width: 650px) {
  .app-header > .wrap { min-height: 62px; }
  .app-caption, .header-divider { display: none; }
  .app-header .btn { font-size: .83rem; min-height: 37px; }
  .view-head, .project-page-head { flex-direction: column; gap: .75rem; }
  .view-head h1, .project-page-head h1 { font-size: 1.9rem; }
  .view-head p { font-size: .91rem; }
  .head-actions { justify-content: flex-start; }
  .head-actions .btn { min-height: 37px; padding: .5rem .75rem; }
  .app-nav { gap: .15rem; }
  .app-nav a { min-height: 36px; gap: .3rem; padding: .3rem .47rem; }
  .app-nav .icon { width: 15px; }
  .period-bar { gap: .5rem; padding: .6rem; }
  .period-bar .field { display: grid; flex: 1 1 120px; white-space: normal; gap: .22rem; font-size: .8rem; }
  .period-bar .select { min-width: 0; width: 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
  .kpi small { margin-top: .3rem; }
  .overview-pair { grid-template-columns: 1fr; }
  .toolbar { gap: .5rem; }
  .toolbar .field { flex: 1 1 120px; }
  .toolbar .search-field { flex-basis: 100%; }
  .panel { padding: .9rem; }
  .app-table { min-width: 445px; }
}
