:root {
  --bg: #f3f6f8;
  --surface: #fff;
  --text: #1f2d3d;
  --muted: #6a7b8c;
  --line: #dfe7ec;
  --blue: #2fc6f6;
  --blue-dark: #0b92c7;
  --green: #49c98a;
  --violet: #8d72e8;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { max-width: 1120px; min-height: 100vh; margin: 0 auto; padding: 26px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.eyebrow { margin: 0 0 4px; color: var(--blue-dark); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: 30px; }
h2 { margin: 0 0 4px; font-size: 18px; }
.muted { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.period-card, .panel, .metric { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 20px rgba(31,45,61,.045); }
.period-card { display: flex; align-items: end; gap: 14px; padding: 16px; margin-bottom: 18px; }
.period-card label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
input[type="date"] { min-width: 175px; height: 40px; padding: 0 11px; border: 1px solid #cdd8df; border-radius: 8px; color: var(--text); background: #fff; }
input:focus { outline: 2px solid rgba(47,198,246,.22); border-color: var(--blue); }
.quick-periods { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -7px 0 18px; color: var(--muted); font-size: 12px; }
.period-chip { padding: 7px 11px; border: 1px solid #cbdce4; border-radius: 16px; color: #267898; background: #fff; }
.period-chip:hover { border-color: var(--blue); background: #eefaff; }
.settings-chip { margin-left: auto; }
.settings-panel { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 16px; padding: 16px; margin-bottom: 18px; border: 1px solid #cfe0e8; border-radius: 12px; background: #f9fcfd; }
.settings-panel label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.settings-panel input { width: 75px; height: 40px; padding: 0 10px; border: 1px solid #cdd8df; border-radius: 8px; }
.button { min-height: 40px; border: 0; border-radius: 8px; padding: 0 18px; font-weight: 600; }
.button-primary { color: #fff; background: var(--blue-dark); }
.button-secondary { color: #267898; background: #e7f7fc; }
.button-export { color: #fff; background: #3aa76d; }
.button-export:hover { background: #30915e; }
.button:disabled { cursor: wait; opacity: .65; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.metric { position: relative; display: grid; gap: 6px; min-height: 126px; padding: 19px; text-align: left; color: var(--muted); overflow: hidden; }
.metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--blue); }
.metric-closed::before { background: var(--green); }
.metric-time::before { background: var(--violet); }
.metric strong { color: var(--text); font-size: 32px; line-height: 1; }
.metric small { font-size: 12px; }
.metric:hover { border-color: #b8d6e2; transform: translateY(-1px); }
.tabs { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 12px; }
.tab { padding: 9px 14px; border: 0; border-radius: 18px; color: var(--muted); background: transparent; white-space: nowrap; }
.tab.is-active { color: #fff; background: #536d7b; }
.panel { padding: 19px; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.count-pill { min-width: 32px; padding: 5px 9px; border-radius: 14px; text-align: center; color: #267898; background: #e7f7fc; font-size: 12px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 10px 9px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; text-align: left; text-transform: uppercase; }
td { padding: 12px 9px; border-bottom: 1px solid #edf1f3; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.link { padding: 0; border: 0; color: #167fa9; background: transparent; text-align: left; }
.link:hover { text-decoration: underline; }
.task-title { display: block; max-width: 550px; font-weight: 600; }
.task-id, .comment { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.people-list { display: grid; gap: 10px; }
.person-row { display: grid; grid-template-columns: minmax(160px, 260px) 1fr auto; align-items: center; gap: 14px; }
.bar-track { height: 9px; border-radius: 8px; background: #edf1f3; overflow: hidden; }
.bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--violet)); }
.person-time { min-width: 85px; text-align: right; font-weight: 700; }
.notice { padding: 13px 15px; margin-bottom: 16px; border: 1px solid #f0c36d; border-radius: 9px; color: #70551e; background: #fff6df; font-size: 13px; white-space: pre-line; }
.notice.error { border-color: #ef9d9d; color: #8b2929; background: #fff0f0; }
.loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 45px; color: var(--muted); }
.spinner { width: 20px; height: 20px; border: 3px solid #d9e7ed; border-top-color: var(--blue-dark); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .app-shell { padding: 16px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; }
  .header-actions .button { flex: 1; }
  .period-card { align-items: stretch; flex-direction: column; }
  .settings-chip { margin-left: 0; }
  .settings-panel { grid-template-columns: 1fr; }
  input[type="date"] { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric { min-height: 100px; }
  .person-row { grid-template-columns: 1fr auto; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; }
}
#loader {

  display: none
}