:root {
  --navy: #111d35;
  --navy-2: #1b2944;
  --blue: #2268e9;
  --blue-dark: #174eb5;
  --cyan: #1ba7b6;
  --green: #20a36a;
  --violet: #7857d7;
  --orange: #e6812f;
  --red: #d84b5d;
  --ink: #192238;
  --muted: #66728a;
  --line: #dfe5ef;
  --soft: #f4f7fb;
  --white: #fff;
  --shadow: 0 12px 32px rgba(24, 42, 75, .08);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f5f7fb;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 1080px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 104, 233, .07), transparent 25rem),
    #f5f7fb;
}

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

.hidden { display: none !important; }

.topbar {
  height: 76px;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: white;
  box-shadow: 0 5px 24px rgba(17, 29, 53, .18);
}

.brand, .top-actions, .dataset-strip > div, .filter-heading, .card-heading,
.table-toolbar, .tabs, .modal-header, .modal-footer, .filter-actions {
  display: flex;
  align-items: center;
}

.brand { gap: 13px; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255,255,255,.08);
}
.brand-mark svg { width: 29px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark svg .accent { stroke: #4ccfbe; }
.brand h1 { margin: 0 0 2px; font-size: 19px; letter-spacing: .1px; }
.brand p { margin: 0; font-size: 11px; color: #9facc3; letter-spacing: .35px; }
.top-actions { gap: 12px; }
.privacy-pill { font-size: 12px; color: #b5c1d4; display: inline-flex; align-items: center; gap: 8px; }
.privacy-pill em { font-style: normal; }
.privacy-pill > span { width: 8px; height: 8px; border-radius: 50%; background: #43c68a; box-shadow: 0 0 0 4px rgba(67,198,138,.12); }
.language-control { height: 32px; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; background: rgba(255,255,255,.06); }
.language-control > span { font-size: 12px; }
.language-control select { padding: 0 16px 0 2px; color: white; background: transparent; border: 0; outline: 0; font-size: 11px; font-weight: 700; cursor: pointer; }
.language-control option { color: var(--ink); background: white; }

.page-shell { width: min(1560px, calc(100% - 64px)); margin: 0 auto; padding: 26px 0 44px; }

.upload-view { min-height: calc(100vh - 146px); display: grid; place-items: center; }
.upload-card {
  width: min(760px, 90vw);
  padding: 42px 48px 34px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.upload-icon { width: 68px; height: 68px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 18px; color: var(--blue); background: #edf3ff; }
.upload-icon svg { width: 38px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { margin: 0 0 7px; font-size: 10px; line-height: 1; font-weight: 800; letter-spacing: 1.25px; color: var(--blue); }
.upload-card h2 { margin: 0; font-size: 25px; }
.upload-copy { max-width: 560px; margin: 11px auto 25px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.drop-zone { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; border: 2px dashed #bdc9da; border-radius: 15px; color: var(--muted); background: #fafcff; cursor: pointer; transition: .18s ease; }
.drop-zone strong { color: var(--ink); font-size: 15px; }
.drop-zone.dragging { border-color: var(--blue); background: #f0f5ff; transform: translateY(-2px); }
.expected-columns { margin-top: 25px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; font-size: 11px; color: var(--muted); }
.expected-columns code, .info-content code { padding: 4px 7px; color: #42506a; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; }

.parse-progress { margin-top: 20px; text-align: left; }
.progress-header { display: flex; justify-content: space-between; font-size: 12px; }
.progress-track { height: 8px; margin-top: 9px; overflow: hidden; background: #e8edf5; border-radius: 10px; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--blue), #3e9be9); border-radius: inherit; transition: width .2s; }
.parse-progress p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }

.button { min-height: 38px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button.primary { color: white; background: var(--blue); box-shadow: 0 6px 16px rgba(34,104,233,.2); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { color: var(--blue); background: #edf3ff; border-color: #d7e4ff; }
.button.dark { color: white; background: var(--navy); }
.button.ghost { color: #43506a; background: white; border-color: var(--line); }
.topbar .button.ghost { color: white; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.17); }
.text-button, .icon-button, .close-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.text-button { color: var(--blue); font-size: 11px; font-weight: 700; }

.dashboard { display: grid; gap: 17px; }
.dataset-strip { min-height: 36px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.dataset-strip > div { gap: 8px; }
.dataset-strip strong { max-width: 520px; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.icon-button { width: 25px; height: 25px; border: 1px solid #c8d0dd; border-radius: 50%; color: var(--muted); font: 700 12px Georgia, serif; }

.filter-panel, .chart-card, .table-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 5px 20px rgba(24,42,75,.045);
}
.filter-panel { padding: 18px 21px 13px; }
.filter-heading, .card-heading, .table-toolbar, .modal-header, .modal-footer { justify-content: space-between; }
.filter-heading { margin-bottom: 15px; }
.filter-heading h2, .card-heading h2 { margin: 0; font-size: 15px; }
.filter-grid { display: grid; grid-template-columns: 185px 185px 180px 180px minmax(220px, 1fr); align-items: end; gap: 11px; }
.field { display: grid; gap: 6px; }
.field > span:first-child { color: #4f5c72; font-size: 10px; font-weight: 700; }
.field input, .field select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d6dde8;
  border-radius: 7px;
  outline: 0;
  font-size: 11px;
}
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(34,104,233,.09); }
.input-with-icon { position: relative; display: block; }
.input-with-icon svg { position: absolute; width: 15px; left: 11px; top: 11px; fill: none; stroke: #7a859a; stroke-width: 2; stroke-linecap: round; }
.input-with-icon input { padding-left: 34px; }
.filter-actions { grid-column: 1 / -1; justify-content: flex-end; gap: 8px; }
.filter-note { margin: 8px 0 0; color: #8993a5; font-size: 9px; }

.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.kpi-card { min-height: 112px; padding: 20px; display: flex; align-items: center; gap: 15px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 5px 18px rgba(24,42,75,.045); position: relative; overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; width: 80px; height: 80px; right: -33px; bottom: -39px; border-radius: 50%; background: currentColor; opacity: .055; }
.kpi-icon { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; }
.kpi-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kpi-card div { min-width: 0; display: grid; }
.kpi-card div > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.kpi-card strong { margin-top: 4px; font-size: 25px; letter-spacing: -.6px; }
.kpi-card small { margin-top: 2px; color: #8a94a7; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-units { color: var(--blue); }.kpi-units .kpi-icon { background: #eaf1ff; }
.kpi-uph { color: var(--green); }.kpi-uph .kpi-icon { background: #e7f7f0; }
.kpi-people { color: var(--violet); }.kpi-people .kpi-icon { background: #f0ebfc; }
.kpi-time { color: var(--orange); }.kpi-time .kpi-icon { background: #fff0e3; }
.kpi-idle { color: var(--red); }.kpi-idle .kpi-icon { background: #fdebed; }
.kpi-card div, .kpi-card div > span, .kpi-card small { color: initial; }
.kpi-card div > span { color: var(--muted); }
.kpi-card small { color: #8a94a7; }

.chart-card { padding: 19px 21px 16px; }
.chart-total { padding: 6px 10px; border-radius: 6px; color: var(--muted); background: var(--soft); font-size: 10px; }
.chart-actions { display: flex; align-items: center; gap: 8px; }
.chart-actions .button { min-height: 30px; padding: 0 10px; font-size: 9px; }
.chart-legend { min-height: 24px; margin: 9px 0 4px; display: flex; flex-wrap: wrap; gap: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; color: #59657b; font-size: 9px; }
.legend-item i { width: 8px; height: 8px; border-radius: 2px; }
.chart-wrap { height: 238px; position: relative; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-empty { height: 238px; margin: -238px 0 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; position: relative; }

.table-card { overflow: hidden; }
.table-toolbar { min-height: 59px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.tabs { align-self: stretch; gap: 22px; }
.tab { padding: 0 2px; position: relative; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.tab.active { color: var(--blue); }
.tab.active::after { content: ""; position: absolute; height: 2px; left: 0; right: 0; bottom: 0; background: var(--blue); }
.table-toolbar > span { color: var(--muted); font-size: 10px; }
.table-scroll { max-height: 560px; overflow: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11px; }
thead { position: sticky; top: 0; z-index: 2; }
th { height: 38px; padding: 0 16px; color: #69748a; background: #f6f8fb; border-bottom: 1px solid var(--line); font-size: 9px; letter-spacing: .45px; text-align: left; text-transform: uppercase; white-space: nowrap; }
th.numeric, td.numeric { text-align: right; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--blue); }
th.sortable::after { content: "↕"; margin-left: 6px; color: #aeb6c3; font-size: 9px; }
th.sortable.sorted-asc::after { content: "↑"; color: var(--blue); }
th.sortable.sorted-desc::after { content: "↓"; color: var(--blue); }
td { height: 46px; padding: 0 16px; border-bottom: 1px solid #edf0f5; color: #39455a; }
tbody tr:nth-child(even) { background: #fbfcfe; }
tbody tr:hover { background: #f3f7ff; }
.filterable-row { cursor: pointer; transition: background .14s ease, box-shadow .14s ease; }
.filterable-row:focus-visible { outline: 0; background: #edf4ff; box-shadow: inset 0 0 0 2px rgba(34,104,233,.45); }
.filterable-row.selected-filter-row { background: #eaf2ff; box-shadow: inset 3px 0 0 var(--blue); }
.filterable-row input, .filterable-row button { cursor: auto; }
.process-cell, .associate-cell { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); }
.process-color { width: 8px; height: 28px; border-radius: 5px; }
.avatar { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; color: #345694; background: #e8effb; font-size: 9px; font-weight: 800; }
.process-badge { display: inline-flex; padding: 4px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; }
.uph-value { font-weight: 800; color: #187e54; }
.muted-value { color: #8993a5; }
.table-empty { min-height: 175px; display: grid; place-content: center; gap: 6px; text-align: center; color: var(--muted); }
.table-empty strong { color: var(--ink); font-size: 14px; }
.table-empty span { font-size: 11px; }

.modal { width: min(1140px, calc(100vw - 60px)); max-height: calc(100vh - 50px); padding: 0; border: 0; border-radius: 17px; color: var(--ink); box-shadow: 0 24px 80px rgba(10,22,45,.28); }
.modal::backdrop { background: rgba(12,22,41,.55); backdrop-filter: blur(2px); }
.modal-shell { display: flex; flex-direction: column; max-height: calc(100vh - 50px); }
.modal-header { flex: 0 0 auto; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 20px; }
.modal-header p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.close-button { width: 34px; height: 34px; color: #7a8495; border-radius: 7px; font-size: 24px; line-height: 1; }
.close-button:hover { background: var(--soft); }
.settings-scroll-area { min-height: 0; flex: 1 1 auto; overflow: auto; }
.settings-options { padding: 14px 24px; display: grid; grid-template-columns: 220px 220px minmax(260px, 1fr) auto; align-items: end; gap: 14px; background: #f8faff; border-bottom: 1px solid var(--line); }
.settings-options p { margin: 0 0 8px; color: var(--muted); font-size: 10px; }
.settings-transfer { margin-bottom: 8px; display: flex; gap: 14px; }
.suffix-input { display: flex; align-items: center; }
.suffix-input input { border-radius: 7px 0 0 7px; }
.suffix-input em { height: 38px; padding: 0 10px; display: grid; place-items: center; color: var(--muted); background: #edf1f7; border: 1px solid #d6dde8; border-left: 0; border-radius: 0 7px 7px 0; font-size: 10px; font-style: normal; }
.file-button { cursor: pointer; }
.settings-list-header, .settings-row { display: grid; grid-template-columns: 52px minmax(190px, .8fr) minmax(220px, 1fr) 76px 150px; align-items: center; gap: 12px; }
.settings-list-header { min-height: 37px; padding: 0 24px; color: #788398; background: #f4f6fa; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.settings-list { min-height: 140px; }
.settings-row { min-height: 61px; padding: 8px 24px; border-bottom: 1px solid #edf0f4; }
.settings-row.disabled { opacity: .55; background: #fafbfc; }
.raw-process { font-size: 11px; font-weight: 700; }
.name-input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #d6dde8; border-radius: 7px; outline: 0; font-size: 11px; }
.name-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(34,104,233,.09); }
.color-input { width: 40px; height: 32px; padding: 2px; border: 1px solid #d6dde8; border-radius: 6px; background: white; cursor: pointer; }
.paths-button { min-height: 31px; padding: 0 9px; border: 1px solid #cad7f1; border-radius: 6px; color: var(--blue); background: #edf3ff; font-size: 9px; font-weight: 800; cursor: pointer; }
.paths-button[aria-expanded="true"] { color: white; background: var(--blue); border-color: var(--blue); }
.path-settings-panel { grid-column: 1 / -1; margin: 5px 0 2px; overflow: hidden; border: 1px solid #dce3ee; border-radius: 9px; background: #f8faff; }
.path-settings-panel.hidden { display: none; }
.path-settings-header, .path-setting-row { display: grid; grid-template-columns: 52px minmax(190px, .9fr) minmax(240px, 1.2fr) 125px; align-items: center; gap: 10px; }
.path-settings-header { min-height: 31px; padding: 0 12px; color: #788398; background: #edf1f7; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.path-setting-row { min-height: 46px; padding: 6px 12px; border-top: 1px solid #e6eaf1; }
.path-setting-row:first-of-type { border-top: 0; }
.path-raw-name { color: #526078; font-size: 10px; font-weight: 700; }
.path-target-input { width: 100%; height: 33px; padding: 0 8px; border: 1px solid #d6dde8; border-radius: 6px; text-align: right; font-size: 10px; outline: 0; }
.path-target-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(34,104,233,.09); }
.settings-section { padding: 18px 24px; border-bottom: 1px solid var(--line); }
.settings-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.settings-section-heading h3 { margin: 0; font-size: 13px; }
.settings-section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.process-config-heading { padding: 18px 24px 12px; background: #fbfcfe; }
.site-profile-section { background: #fcfdff; }
.site-profile-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.site-profile-grid .field > small { min-height: 31px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.site-profile-grid .field > input, .site-profile-grid .field > select { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #d6dde8; border-radius: 7px; color: var(--ink); background: white; outline: 0; font-size: 10px; }
.site-profile-grid .field > input:focus, .site-profile-grid .field > select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(34,104,233,.09); }
.compact-button { min-height: 32px; padding: 0 11px; white-space: nowrap; }
.custom-rules-list { margin-top: 13px; display: grid; gap: 8px; }
.custom-rule-row { padding: 10px; display: grid; grid-template-columns: 38px 105px minmax(145px, 1fr) minmax(135px, .9fr) minmax(145px, 1fr) minmax(135px, .9fr) 92px; align-items: end; gap: 8px; border: 1px solid #dde4ef; border-radius: 9px; background: #f8faff; }
.custom-rule-row.disabled { opacity: .58; }
.custom-rule-row label > span, .rule-active-label > span:first-child { min-height: 21px; display: block; color: #69758a; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.custom-rule-row input[type="text"], .custom-rule-row select { width: 100%; height: 34px; padding: 0 8px; border: 1px solid #d6dde8; border-radius: 6px; color: var(--ink); background: white; outline: 0; font-size: 9px; }
.custom-rule-row input[type="text"]:focus, .custom-rule-row select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(34,104,233,.09); }
.rule-active-label .switch { margin-top: 7px; }
.rule-actions { height: 34px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.rule-icon-button { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #d4dce8; border-radius: 6px; color: #657187; background: white; cursor: pointer; font-size: 12px; font-weight: 800; }
.rule-icon-button:hover { color: var(--blue); border-color: #b9cdf8; background: #edf3ff; }
.rule-icon-button.danger:hover { color: #b7374c; border-color: #efc0c9; background: #fff1f3; }
.custom-rules-empty { padding: 14px; color: var(--muted); border: 1px dashed #cbd4e1; border-radius: 8px; text-align: center; font-size: 10px; }
.unit-type-list { display: flex; flex-wrap: wrap; gap: 6px; }
.check-pill { position: relative; }
.check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.check-pill span { min-height: 26px; padding: 0 8px; display: inline-flex; align-items: center; border: 1px solid #d5dce7; border-radius: 6px; color: #667187; background: white; font-size: 9px; font-weight: 700; cursor: pointer; }
.check-pill input:checked + span { color: var(--blue); border-color: #b9cdf8; background: #edf3ff; }
.switch { width: 34px; height: 19px; position: relative; display: inline-block; }
.switch input { width: 0; height: 0; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #c7cfdb; cursor: pointer; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 13px; height: 13px; left: 3px; top: 3px; border-radius: 50%; background: white; transition: .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::before { transform: translateX(15px); }
.modal-footer { flex: 0 0 auto; min-height: 68px; padding: 0 24px; background: white; border-top: 1px solid var(--line); }
.modal-footer > div { display: flex; gap: 8px; }
.info-modal { width: min(640px, calc(100vw - 60px)); }
.info-content { padding: 22px 24px 7px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; overflow: auto; }
.info-content > div { padding: 15px; border-radius: 10px; background: var(--soft); }
.info-content strong { font-size: 12px; }
.info-content p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.info-footer-copy { max-width: 440px; flex-direction: column; align-items: flex-start; gap: 3px !important; }
.info-footer-copy > span { color: var(--muted); font-size: 10px; line-height: 1.4; }
.developer-credit a { color: var(--blue); font-weight: 800; text-decoration: none; }
.developer-credit a:hover { text-decoration: underline; }
.developer-credit a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

.path-cell { display: inline-flex; align-items: center; gap: 7px; color: #4c5870; font-weight: 700; }
.path-cell::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #9ba7ba; }
.idle-value { color: #c43e54; font-weight: 750; }
.metric-cell { white-space: nowrap; color: #5b6880; font-size: 10px; }
.target-input { width: 74px; height: 29px; padding: 0 7px; border: 1px solid #d4dce8; border-radius: 6px; text-align: right; font-size: 10px; outline: 0; }
.target-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(34,104,233,.09); }
.plan-good { color: #158259; font-weight: 800; }
.plan-watch { color: #d06f20; font-weight: 800; }
.plan-low { color: #c33b52; font-weight: 800; }
.detail-button { min-height: 29px; padding: 0 10px; border: 1px solid #cbd9f6; border-radius: 6px; color: var(--blue); background: #edf3ff; font-size: 9px; font-weight: 800; cursor: pointer; }
.detail-modal { width: min(1050px, calc(100vw - 60px)); }
.detail-toolbar { min-height: 58px; padding: 10px 24px; display: flex; align-items: end; justify-content: space-between; gap: 16px; background: #f8faff; border-bottom: 1px solid var(--line); }
.detail-view-field { min-width: 250px; }
.detail-view-field select { height: 34px; }
.detail-idle-total { min-width: 150px; margin-left: auto; padding: 7px 14px; border: 1px solid #f4cbd2; border-radius: 8px; background: #fff4f5; }
.detail-idle-total span { display: block; margin-bottom: 2px; color: #8b5360; font-size: 9px; font-weight: 750; }
.detail-idle-total strong { color: #bd334b; font-size: 17px; line-height: 1; }
.detail-table-wrap { min-height: 260px; max-height: calc(100vh - 263px); overflow: auto; }
.detail-table th { top: 0; }
.detail-table td { height: 39px; }
.detail-modal .modal-footer > span { color: var(--muted); font-size: 10px; }
.detail-empty-row { height: 150px !important; color: var(--muted); text-align: center; }
.detail-time-idle { display: inline-flex; padding: 3px 6px; border-radius: 5px; color: #b93349; background: #fdebed; font-weight: 800; }
.detail-time-excluded { display: inline-flex; padding: 3px 6px; border-radius: 5px; color: #707b8f; background: #edf0f4; text-decoration: line-through; }

.toast { position: fixed; right: 25px; bottom: 25px; max-width: 420px; padding: 12px 16px; color: white; background: var(--navy); border-radius: 9px; box-shadow: 0 12px 30px rgba(9,20,40,.25); font-size: 11px; font-weight: 700; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #b7374c; }

@media (max-width: 1240px) {
  .filter-grid { grid-template-columns: 190px 190px 190px 190px 1fr; }
  .filter-actions { grid-column: 1 / -1; }
  .kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kpi-card { padding: 15px; gap: 10px; }
  .kpi-icon { width: 38px; height: 38px; }
}

@media (max-width: 900px) {
  .modal { width: calc(100vw - 24px); }
  .settings-options { grid-template-columns: 1fr 1fr; }
  .settings-options p, .settings-transfer { grid-column: 1 / -1; }
  .site-profile-grid { grid-template-columns: 1fr 1fr; }
  .custom-rule-row { grid-template-columns: 38px 105px 1fr 1fr; }
  .custom-rule-row .rule-result-process, .custom-rule-row .rule-result-path { grid-column: span 2; }
  .rule-actions { grid-column: 4; }
}

@media print {
  body { min-width: 0; background: white; }
  .topbar, .filter-panel, .chart-card, .dataset-strip .icon-button, .top-actions, .table-toolbar .tabs { display: none !important; }
  .page-shell { width: 100%; padding: 0; }
  .kpi-grid { break-inside: avoid; }
  .table-card, .kpi-card { box-shadow: none; }
  .table-scroll { max-height: none; overflow: visible; }
  thead { position: static; }
}
