/* Kairo demo: a time tracker for client work. Coordinates are stage pixels
   (1200x675); the app window sits at 60,80 and everything inside it is in
   app pixels. Palette: indigo #5b4bdb brand, ink #1b1a2e / #5f5d73, sidebar
   #1b1a2e, canvas #f6f6fa, project colours orange #f08a3c, violet #8b6cf0,
   teal #23a99a, grey #9a98ad. */
html, body { margin: 0; height: 100%; background: #fff; }
.ud-frame { height: 100%; }
.ud-stage { --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --brand: #5b4bdb; --ink: #1b1a2e; --ink-2: #5f5d73; --line: #e7e6ef;
  background: radial-gradient(120% 90% at 50% 0%, #eeecfb 0%, #f7f6fb 60%); font-family: var(--font); color: var(--ink); }
.ud-cursor__ring { border-color: var(--brand); }
.ud-stage .hidden { display: none; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot--orange { background: #f08a3c; } .dot--violet { background: #8b6cf0; } .dot--teal { background: #23a99a; } .dot--grey { background: #9a98ad; }

.caption { position: absolute; left: 0; right: 0; top: 24px; z-index: 40; text-align: center; font: 650 27px/1.2 var(--font); letter-spacing: -0.02em; color: var(--ink); opacity: 0; }
.caption .dot { display: inline; width: auto; height: auto; background: none; color: var(--brand); }

.app { position: absolute; left: 60px; top: 80px; width: 1080px; height: 555px; border-radius: 12px; background: #f6f6fa; overflow: hidden; opacity: 0;
  box-shadow: 0 30px 70px rgba(27, 26, 46, 0.2), 0 0 0 1px rgba(27, 26, 46, 0.07); }

/* Sidebar, width 190 */
.side { position: absolute; left: 0; top: 0; bottom: 0; width: 190px; background: #1b1a2e; color: #b9b7cc; box-sizing: border-box; padding: 0 12px; }
.brand { display: flex; align-items: center; gap: 10px; height: 52px; padding-left: 6px; font: 700 18px/1 var(--font); letter-spacing: -0.02em; color: #fff; }
.brand svg { width: 26px; height: 26px; }
.side__ws { margin: 4px 0 14px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); font-size: 12.5px; font-weight: 600; color: #e4e2f2; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item { position: relative; display: flex; align-items: center; gap: 11px; height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; }
.nav__item .ic { width: 17px; height: 17px; }
.nav__label { margin: 14px 0 4px 10px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6f6d86; }
[data-nav="timer"] { background: rgba(91, 75, 219, 0.28); color: #fff; }
.nav__live { position: absolute; right: 10px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: #ef5a5a; box-shadow: 0 0 0 3px rgba(239, 90, 90, 0.25); opacity: 0; }

/* Header */
.head { position: absolute; left: 190px; right: 0; top: 0; height: 52px; box-sizing: border-box; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.head__title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.head__right { display: flex; align-items: center; gap: 16px; color: var(--ink-2); }
.av { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #f4b740; color: #3a2a05; font-size: 11px; font-weight: 700; }

.view { position: absolute; left: 190px; right: 0; top: 52px; bottom: 0; padding: 16px 24px; box-sizing: border-box; overflow: hidden; }
.view--reports { opacity: 0; }

/* Timer bar: app x214..1056, y68..124 */
.tbar { height: 56px; display: flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 2px rgba(27, 26, 46, 0.04); }
.tbar__input { position: relative; flex: 1; height: 100%; display: flex; align-items: center; padding-left: 18px; font-size: 15px; border-radius: 10px 0 0 10px; }
.tbar__ph { position: absolute; left: 18px; color: #a3a1b5; }
.caret { display: inline-block; width: 1.5px; height: 18px; margin-left: 1px; background: var(--brand); opacity: 0; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }
.tbar__proj { width: 190px; height: 100%; display: flex; align-items: center; padding-left: 4px; box-sizing: border-box; }
.tbar__add { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 7px; color: var(--brand); font-size: 14px; font-weight: 600; }
.tbar__chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 7px; background: #fff3ea; color: #b8581a; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.tbar__chip em, .row__proj em { font-style: normal; font-weight: 500; color: #8a889c; }
.tbar__icon { width: 44px; height: 32px; display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--line); color: #a3a1b5; font-size: 17px; font-weight: 600; }
.tbar__time { width: 104px; text-align: center; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; border-left: 1px solid var(--line); line-height: 32px; }
.tbar__btn { width: 84px; height: 38px; margin: 0 9px 0 0; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }

/* Project picker: under the Project control */
.menu { position: absolute; left: 391px; top: 78px; z-index: 5; width: 240px; padding: 8px; box-sizing: border-box; background: #fff; border-radius: 10px; box-shadow: 0 16px 40px rgba(27, 26, 46, 0.18), 0 0 0 1px rgba(27, 26, 46, 0.08); opacity: 0; }
.menu__search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: 7px; color: #a3a1b5; font-size: 13px; }
.menu__search .ic { width: 15px; height: 15px; }
.menu__group { padding: 8px 10px 3px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #8a889c; }
.menu__item { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: 6px; font-size: 13.5px; font-weight: 500; }

.week { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 2px 10px; font-size: 13px; color: var(--ink-2); }
.week em { font-style: normal; color: #8a889c; margin-left: 6px; }
.week b, .day__head b { color: var(--ink); font-size: 16px; font-weight: 700; margin-left: 6px; font-variant-numeric: tabular-nums; }

.day { margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.day__head { display: flex; justify-content: space-between; align-items: center; height: 38px; padding: 0 18px; background: #f1f0f7; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.row { height: 46px; overflow: hidden; }
.row--new { height: 0; }
.row__in { height: 46px; display: flex; align-items: center; gap: 14px; padding: 0 18px; box-sizing: border-box; border-top: 1px solid var(--line); font-size: 14px; }
.row__desc { font-weight: 500; }
.row__proj { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); flex: 1; }
.row__tag { padding: 3px 8px; border-radius: 5px; background: #eeebfd; color: #4a3cc0; font-size: 11.5px; font-weight: 600; }
.row__bill { width: 20px; text-align: center; font-weight: 700; color: #c9c7d6; }
.row__bill.is-on { color: var(--brand); }
.row__range { width: 104px; text-align: right; color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.row__dur { width: 44px; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.row__play, .row__more { width: 16px; height: 16px; color: #b3b1c4; }
.row__play { fill: currentColor; stroke: none; }

/* Reports */
.rbar { display: flex; align-items: center; gap: 12px; height: 38px; }
.tabs { display: flex; gap: 2px; padding: 3px; margin-right: auto; background: #ebeaf3; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tabs span { padding: 6px 14px; border-radius: 7px; }
.tabs__on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(27, 26, 46, 0.1); }
.range { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 600; }
.range .ic { width: 15px; height: 15px; color: #8a889c; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; font-weight: 700; }
.btn .ic { width: 16px; height: 16px; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.tile { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; opacity: 0; }
.tile small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.tile b { display: block; margin: 5px 0 3px; font-size: 24px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile em { font-style: normal; font-size: 11.5px; color: #8a889c; }

.card { position: absolute; top: 172px; bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; box-sizing: border-box; opacity: 0; }
.card__title { font-size: 14px; font-weight: 700; }
.card--chart { left: 24px; width: 530px; }
.card--proj { left: 568px; width: 298px; }

.chart { position: absolute; left: 18px; right: 18px; top: 52px; height: 200px; }
.chart__grid { position: absolute; inset: 0 0 0 0; display: flex; flex-direction: column; justify-content: space-between; }
.chart__grid span { position: relative; height: 0; border-top: 1px dashed #e4e3ec; font-size: 10.5px; line-height: 0; color: #a3a1b5; }
.chart__grid span:last-child { border-top-style: solid; border-color: #d6d4e2; }
.bars { position: absolute; left: 34px; right: 0; top: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-around; }
.bar { position: relative; width: 36px; height: 100%; display: flex; align-items: flex-end; }
.bar__stack { width: 100%; display: flex; flex-direction: column-reverse; border-radius: 5px 5px 0 0; overflow: hidden; transform-origin: bottom; }
.bar span { position: absolute; left: -10px; right: -10px; top: 207px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.s { display: block; }
.s--orange { background: #f08a3c; } .s--violet { background: #8b6cf0; } .s--teal { background: #23a99a; } .s--grey { background: #c6c4d5; }
.tip { position: absolute; left: 172px; top: -6px; z-index: 3; display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; box-shadow: 0 10px 26px rgba(27, 26, 46, 0.25); opacity: 0; }
.tip b { font-size: 12.5px; }
.tip span { display: flex; align-items: center; gap: 6px; color: #d6d4e6; }

.donut { position: relative; width: 150px; height: 150px; margin: 18px auto 14px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.arc { fill: none; stroke-width: 16; }
.arc--orange { stroke: #f08a3c; } .arc--violet { stroke: #8b6cf0; } .arc--teal { stroke: #23a99a; } .arc--grey { stroke: #c6c4d5; }
.donut__mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut__mid b { font-size: 20px; font-weight: 750; letter-spacing: -0.02em; }
.donut__mid small { font-size: 11px; color: #8a889c; }
.legend { display: flex; flex-direction: column; gap: 6px; }
.legend__row { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; opacity: 0; }
.legend__row b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Invoice modal */
.scrim { position: absolute; inset: 0; z-index: 8; background: rgba(27, 26, 46, 0.38); opacity: 0; }
.modal { position: absolute; left: 300px; top: 92px; z-index: 9; width: 480px; padding: 22px 24px; box-sizing: border-box; background: #fff; border-radius: 14px; box-shadow: 0 30px 70px rgba(27, 26, 46, 0.3); opacity: 0; }
.modal__head { display: flex; align-items: center; justify-content: space-between; font-size: 17px; font-weight: 750; letter-spacing: -0.01em; }
.modal__no { padding: 4px 9px; border-radius: 6px; background: #f1f0f7; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.modal__fields { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 10px; margin: 18px 0 16px; }
.field small { display: block; margin-bottom: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.field span { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; font-weight: 600; }
.field .ic { width: 15px; height: 15px; color: #8a889c; }
.lines { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.line { display: grid; grid-template-columns: 1fr 70px 100px; align-items: center; height: 40px; padding: 0 14px; border-top: 1px solid var(--line); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.line span:nth-child(n+2) { text-align: right; }
.line span:first-child { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.line--head { height: 32px; border-top: 0; background: #f6f6fa; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.line--total { background: #f8f7fe; font-weight: 750; }
.line--total span:last-child { color: var(--brand); font-size: 15px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.toast { position: absolute; left: 0; right: 0; bottom: 24px; z-index: 10; width: max-content; margin: 0 auto; display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 16px 40px rgba(27, 26, 46, 0.3); opacity: 0; }
.toast .ic { width: 18px; height: 18px; color: #7ee2b8; stroke-width: 2.4; }
