:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #fff;
  --surface-muted: #f7f7f9;
  --ink: #17171a;
  --muted: #6e6e76;
  --faint: #97979f;
  --line: rgba(20, 20, 25, 0.09);
  --line-strong: rgba(20, 20, 25, 0.14);
  --accent: #5f5ce6;
  --accent-deep: #4b48c9;
  --accent-soft: #eeedff;
  --green: #20a464;
  --green-soft: #e8f7ef;
  --blue: #287bd4;
  --blue-soft: #eaf3fd;
  --amber: #d18700;
  --amber-soft: #fff4dc;
  --red: #e24c4b;
  --red-soft: #feeeee;
  --shadow-sm: 0 1px 2px rgba(18, 18, 22, 0.03), 0 5px 18px rgba(18, 18, 22, 0.04);
  --shadow-lg: 0 20px 60px rgba(26, 26, 36, 0.14);
  --radius: 24px;
  --radius-sm: 15px;
  --sidebar: 244px;
  --text-fine: 12px;
  --text-small: 13px;
  --text-body: 14px;
  --text-control: 15px;
  --text-navigation: 16px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-size: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ambient {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.65;
}

.ambient-one {
  width: 500px;
  height: 500px;
  right: -180px;
  top: -220px;
  background: radial-gradient(circle, rgba(185, 181, 255, 0.26), transparent 68%);
}

.ambient-two {
  width: 380px;
  height: 380px;
  left: 20%;
  bottom: -240px;
  background: radial-gradient(circle, rgba(116, 210, 181, 0.17), transparent 68%);
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 28px 18px 20px;
  border-right: 1px solid var(--line);
  background: rgba(248, 248, 250, 0.8);
  backdrop-filter: saturate(150%) blur(28px);
  -webkit-backdrop-filter: saturate(150%) blur(28px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  color: white;
  border-radius: 9px;
  place-items: center;
  background: linear-gradient(145deg, #716ef2, #4f4ccf);
  box-shadow: 0 7px 16px rgba(87, 82, 220, 0.25);
}

.brand-mark svg {
  width: 24px;
  stroke-width: 1.7;
}

.main-nav {
  display: grid;
  gap: 6px;
  margin-top: 38px;
}

.nav-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  color: var(--muted);
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover {
  color: var(--ink);
  background: rgba(25, 25, 30, 0.045);
}

.nav-item.active {
  color: var(--accent-deep);
  background: var(--accent-soft);
  font-weight: 650;
}

.nav-item svg {
  width: 19px;
  height: 19px;
}

.sidebar-spacer {
  flex: 1;
  min-height: 28px;
}

.sync-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 4px 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.6);
}

.sync-pill strong,
.sync-pill small {
  display: block;
}

.sync-pill strong {
  font-size: 12px;
  font-weight: 650;
}

.sync-pill small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 10px;
}

.sync-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #a0a0a8;
  box-shadow: 0 0 0 4px rgba(130,130,140,.1);
}

.sync-pill.connected .sync-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(32,164,100,.11);
}

.sync-pill.syncing .sync-dot {
  background: var(--amber);
  animation: pulse 1.2s infinite;
}

.sync-pill.error .sync-dot {
  background: var(--red);
}

@keyframes pulse {
  50% { opacity: .35; }
}

.settings-link {
  margin-bottom: 13px;
}

.profile-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 9px 0;
  border-top: 1px solid var(--line);
}

.profile-mini strong,
.profile-mini small {
  display: block;
}

.profile-mini strong {
  max-width: 140px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-mini small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  color: #56536e;
  border: 1px solid rgba(82,79,115,.09);
  border-radius: 50%;
  place-items: center;
  background: linear-gradient(145deg, #edeaf4, #dcd8e8);
  font-size: 10px;
  font-weight: 750;
}

.mobile-header,
.sidebar-scrim {
  display: none;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding: 42px clamp(30px, 4.3vw, 74px) 64px;
}

.view {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  animation: viewIn 280ms ease both;
}

.view.active {
  display: block;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(5px); }
}

.page-header {
  min-height: 69px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.page-header h1 {
  margin: 3px 0 0;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.047em;
}

.eyebrow,
.card-kicker {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.page-subtitle {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.button,
.icon-button,
.text-button,
.clock-button {
  border: 0;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.button:active,
.icon-button:active,
.clock-button:active {
  transform: scale(.975);
}

.button:focus-visible,
.icon-button:focus-visible,
.text-button:focus-visible,
.clock-button:focus-visible,
.nav-item:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(95, 92, 230, .2);
  outline-offset: 2px;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.button svg {
  width: 17px;
  height: 17px;
}

.button-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(80, 76, 204, .16);
}

.button-primary:hover {
  background: var(--accent-deep);
  box-shadow: 0 8px 19px rgba(80, 76, 204, .23);
}

.button-secondary {
  color: #3e3e44;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .72);
}

.button-secondary:hover {
  background: #fff;
  border-color: rgba(20,20,25,.2);
}

.button:disabled,
.icon-button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  padding: 0;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  background: rgba(255,255,255,.72);
}

.icon-button:hover {
  color: var(--ink);
  background: white;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.notification-button {
  position: relative;
}

.notification-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  top: 7px;
  right: 7px;
  border: 1.5px solid white;
  border-radius: 50%;
  background: var(--red);
}

.text-button {
  padding: 4px;
  color: var(--accent);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.text-button:hover {
  color: var(--accent-deep);
}

.card {
  border: 1px solid rgba(20, 20, 25, .075);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .95fr);
  gap: 18px;
}

.clock-card {
  position: relative;
  min-height: 338px;
  padding: 28px 30px 23px;
  overflow: hidden;
  color: white;
  border: 0;
  background:
    radial-gradient(circle at 85% 5%, rgba(255,255,255,.14), transparent 28%),
    linear-gradient(145deg, #5653d4 0%, #403dab 72%, #39369d 100%);
  box-shadow: 0 20px 42px rgba(65, 61, 176, .2);
}

.clock-card::after {
  position: absolute;
  width: 240px;
  height: 240px;
  right: -120px;
  bottom: -160px;
  content: "";
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(255,255,255,.025), 0 0 0 80px rgba(255,255,255,.018);
}

.clock-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.clock-card .card-kicker {
  color: rgba(255,255,255,.62);
}

.live-time {
  margin-top: 5px;
  font-size: 27px;
  font-weight: 620;
  letter-spacing: -.04em;
}

.live-time span {
  font-size: 12px;
  letter-spacing: 0;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  font-size: 10px;
  font-weight: 600;
}

.status-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a9f0ca;
}

.status-badge.break span {
  background: #ffd77b;
}

.shift-display {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 34px 0 27px;
}

.shift-label {
  display: block;
  margin-bottom: 3px;
  color: rgba(255,255,255,.57);
  font-size: 10px;
  font-weight: 620;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.active-task-name {
  display: block;
  max-width: 320px;
  margin-bottom: 7px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-display strong {
  display: block;
  font-size: clamp(35px, 4vw, 48px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
}

.shift-detail {
  display: grid;
  gap: 4px;
  padding-bottom: 3px;
  color: rgba(255,255,255,.66);
  font-size: 10px;
  text-align: right;
}

.shift-display .shift-detail strong {
  max-width: 190px;
  overflow: hidden;
  color: rgba(255,255,255,.9);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-indicator {
  --meal-progress: 0%;
  position: relative;
  z-index: 1;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: -11px 0 14px;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 13px;
  background: rgba(25, 23, 92, .2);
}

.meal-indicator::after {
  position: absolute;
  inset: auto 0 0;
  width: var(--meal-progress);
  height: 2px;
  content: "";
  background: #ffd77b;
  transition: width 300ms ease, background 180ms ease;
}

.meal-indicator-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffe4a6;
  background: rgba(255, 215, 123, .13);
}

.meal-indicator-icon svg {
  width: 18px;
  height: 18px;
}

.meal-indicator-copy {
  min-width: 0;
}

.meal-indicator-copy strong,
.meal-indicator-copy small {
  display: block;
}

.meal-indicator-copy strong {
  color: rgba(255,255,255,.94);
  font-size: 11px;
  line-height: 1.2;
}

.meal-indicator-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: rgba(255,255,255,.6);
  font-size: 9px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-indicator-progress {
  min-width: 38px;
  padding: 5px 7px;
  color: #ffe4a6;
  border-radius: 999px;
  background: rgba(255, 215, 123, .12);
  font-size: 9px;
  font-weight: 720;
  text-align: center;
}

.meal-indicator.earned {
  border-color: rgba(169, 240, 202, .34);
  background: rgba(26, 116, 78, .24);
}

.meal-indicator.earned::after {
  background: #a9f0ca;
}

.meal-indicator.earned .meal-indicator-icon {
  color: #bff7d8;
  background: rgba(169, 240, 202, .16);
  box-shadow: 0 0 0 3px rgba(169, 240, 202, .07);
}

.meal-indicator.earned .meal-indicator-progress {
  color: #c8f9dd;
  background: rgba(169, 240, 202, .15);
}

.clock-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
}

.clock-button {
  min-height: 47px;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  color: #3f3ca7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 23px rgba(22,20,80,.19);
  font-size: 13px;
  font-weight: 720;
}

.clock-button:hover {
  box-shadow: 0 11px 30px rgba(22,20,80,.27);
}

.clock-button.clocked-in {
  color: #be3e43;
}

.clock-button-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
}

.clock-button.clocked-in .clock-button-icon {
  background: var(--red-soft);
}

.clock-button svg {
  width: 15px;
  height: 15px;
}

.clock-button.clocked-in svg path {
  d: path("M8 8h8v8H8z");
}

.break-button {
  min-height: 47px;
  color: white;
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.09);
}

.break-button:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.27);
}

.break-button.on-break {
  color: #3f3ca7;
  background: white;
}

.clock-footnote {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  color: rgba(255,255,255,.48);
  font-size: 9px;
  text-align: center;
}

.week-card {
  min-height: 338px;
  padding: 27px 27px 21px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-heading h2 {
  margin: 5px 0 0;
  font-size: 22px;
  letter-spacing: -.035em;
}

.card-heading h2 small {
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.card-heading.compact {
  align-items: center;
}

.card-heading.compact h2 {
  font-size: 15px;
}

.goal-ring {
  --progress: 0;
  width: 52px;
  height: 52px;
  display: grid;
  border-radius: 50%;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--progress) * 1%), #ebebef 0);
}

.goal-ring::before {
  width: 40px;
  height: 40px;
  content: "";
  grid-area: 1/1;
  border-radius: 50%;
  background: white;
}

.goal-ring span {
  z-index: 1;
  grid-area: 1/1;
  font-size: 9px;
  font-weight: 720;
}

.hours-progress {
  height: 7px;
  margin-top: 21px;
  overflow: hidden;
  border-radius: 99px;
  background: #ececf0;
}

.hours-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6b67e7, #918df7);
  transition: width 500ms ease;
}

.progress-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: var(--faint);
  font-size: 9px;
}

.progress-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.progress-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.progress-legend strong {
  margin-left: 2px;
  color: var(--muted);
  font-weight: 650;
}

.legend-regular { background: var(--accent); }
.legend-overtime { background: #c6c4fb; }

.week-chart {
  height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 10px;
  margin-top: 19px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.day-bar {
  height: 100%;
  min-width: 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.day-bar-track {
  width: 11px;
  height: calc(100% - 20px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 99px;
  background: #eeeef2;
}

.day-bar-fill {
  width: 100%;
  min-height: 0;
  border-radius: inherit;
  background: #c9c7f9;
  transition: height 550ms cubic-bezier(.2,.8,.2,1);
}

.day-bar.today .day-bar-fill {
  background: var(--accent);
}

.day-bar span {
  color: var(--faint);
  font-size: 8px;
  font-weight: 650;
  text-transform: uppercase;
}

.metric-card {
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 20px 22px;
}

.metric-icon {
  width: 43px;
  height: 43px;
  display: grid;
  flex: 0 0 auto;
  border-radius: 14px;
  place-items: center;
}

.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metric-icon.blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon svg { width: 20px; height: 20px; }

.metric-card p,
.metric-card strong,
.metric-card small {
  display: block;
}

.metric-card p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.metric-card strong {
  font-size: 20px;
  letter-spacing: -.035em;
}

.metric-card small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 8px;
}

.activity-card {
  min-height: 270px;
  padding: 24px;
}

.activity-list {
  margin-top: 14px;
}

.activity-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.activity-date {
  width: 36px;
  height: 36px;
  display: grid;
  border-radius: 11px;
  place-items: center;
  background: var(--surface-muted);
  text-align: center;
}

.activity-date strong,
.activity-date span {
  display: block;
}

.activity-date strong {
  font-size: 12px;
  line-height: 1;
}

.activity-date span {
  margin-top: 2px;
  color: var(--faint);
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
}

.activity-info strong,
.activity-info small {
  display: block;
}

.activity-info strong {
  font-size: 11px;
}

.activity-info small {
  max-width: 250px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-duration {
  font-size: 11px;
  font-weight: 700;
}

.activity-empty {
  display: grid;
  min-height: 160px;
  color: var(--faint);
  place-items: center;
  font-size: 11px;
  text-align: center;
}

.insight-card {
  position: relative;
  min-height: 330px;
  padding: 28px 30px 31px;
  overflow: hidden;
  color: white;
  border: 0;
  background: linear-gradient(145deg, #222129, #32313d);
}

.insight-card::before {
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -90px;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle at 35% 70%, rgba(140,136,248,.35), transparent 62%);
}

.insight-orb {
  position: relative;
  z-index: 1;
  width: 39px;
  height: 39px;
  display: grid;
  margin-bottom: 23px;
  color: #c5c3ff;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  place-items: center;
  background: rgba(255,255,255,.07);
}

.insight-orb svg {
  width: 21px;
}

.insight-card .card-kicker {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0 9px;
  color: rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  font-size: 10px;
  letter-spacing: .1em;
}

.insight-label-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.insight-indicators {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.insight-source {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: rgba(213, 255, 229, .8);
  border: 1px solid rgba(121, 231, 163, .16);
  border-radius: 999px;
  background: rgba(50, 176, 103, .11);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .035em;
}

.insight-source[hidden] {
  display: none;
}

.insight-refresh {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  color: rgba(255,255,255,.58);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  place-items: center;
  background: rgba(255,255,255,.06);
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.insight-refresh:hover {
  color: white;
  background: rgba(255,255,255,.12);
  transform: rotate(12deg);
}

.insight-refresh:disabled {
  cursor: wait;
  opacity: .56;
}

.insight-card.is-generating .insight-refresh svg {
  animation: insightSpin 900ms linear infinite;
}

@keyframes insightSpin {
  to { transform: rotate(360deg); }
}

.insight-refresh svg {
  width: 17px;
}

.insight-card h2 {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 16px 0 11px;
  font-size: clamp(21px, 1.8vw, 25px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.insight-card #insightBody {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: clamp(15px, 1.08vw, 17px);
  line-height: 1.62;
  text-wrap: pretty;
}

/* AI-generated insights render in purple so they are distinguishable from built-in copy. */
.insight-card.has-ai-insight #insightTitle {
  color: #c9a8ff;
}

.insight-card.has-ai-insight #insightBody {
  color: rgba(201, 168, 255, .85);
}

/* Claude (Anthropic API) insights use Claude's brand orange instead. */
.insight-card.has-ai-insight.is-claude-insight #insightTitle {
  color: #e78a5e;
}

.insight-card.has-ai-insight.is-claude-insight #insightBody {
  color: rgba(231, 154, 116, .88);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px;
  border-radius: 18px;
}

.segmented-control {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: #efeff2;
}

.segmented-control button {
  min-height: 30px;
  padding: 0 13px;
  color: var(--muted);
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
}

.segmented-control button.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 2px 8px rgba(20,20,25,.08);
}

.project-filter {
  width: min(180px, 22vw);
  margin-left: auto;
}

.project-filter select {
  min-height: 34px;
  padding-block: 0;
  background-color: rgba(247,247,249,.72);
  font-size: 10px;
}

.search-field {
  width: min(260px, 35vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.search-field svg {
  width: 16px;
  color: var(--faint);
}

.search-field input {
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 11px;
}

.timesheet-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.summary-tile {
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.55);
}

.summary-tile span,
.summary-tile strong {
  display: block;
}

.summary-tile span {
  margin-bottom: 5px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 650;
}

.summary-tile strong {
  font-size: 19px;
  letter-spacing: -.03em;
}

.table-card {
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 19px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--faint);
  background: rgba(247,247,249,.72);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: .05em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background 130ms ease;
}

tbody tr:hover {
  background: rgba(95,92,230,.025);
}

.table-date strong,
.table-task strong,
.table-task span,
.table-task small {
  display: block;
}

.hours-detail {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 8px;
  font-weight: 500;
}

.table-task {
  width: 220px;
  max-width: 220px;
  white-space: normal;
}

.table-task strong,
.table-task span,
.table-task small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-task span {
  margin-top: 2px;
  color: var(--accent-deep);
  font-size: 9px;
  font-weight: 620;
}

.table-task small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  color: var(--green);
  border-radius: 99px;
  background: var(--green-soft);
  font-size: 8px;
  font-weight: 650;
}

.status-chip::before {
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: currentColor;
}

.status-chip.open {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-chip.unsynced {
  color: var(--muted);
  background: #efeff2;
}

.row-action {
  width: 29px;
  height: 29px;
  display: grid;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 9px;
  place-items: center;
  background: transparent;
  cursor: pointer;
}

.row-action:hover {
  border-color: var(--line);
  background: white;
}

.row-action svg {
  width: 15px;
}

.empty-state {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  padding: 40px;
  text-align: center;
}

.empty-icon {
  width: 51px;
  height: 51px;
  display: grid;
  color: var(--accent);
  border-radius: 17px;
  place-items: center;
  background: var(--accent-soft);
}

.empty-icon svg {
  width: 25px;
}

.empty-state h3 {
  margin: 16px 0 6px;
  font-size: 15px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 10px;
}

.hidden {
  display: none !important;
}

.period-chip,
.connection-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  color: var(--accent-deep);
  border: 1px solid rgba(95,92,230,.12);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 650;
}

.payroll-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
}

.paycheck-card {
  padding: 29px;
}

.paycheck-top {
  display: flex;
  justify-content: space-between;
}

.paycheck-top strong,
.paycheck-top span {
  display: block;
}

.paycheck-top strong {
  margin-top: 10px;
  font-size: 41px;
  letter-spacing: -.055em;
}

.paycheck-top span {
  margin-top: 5px;
  color: var(--faint);
  font-size: 9px;
}

.paycheck-mark {
  width: 47px;
  height: 47px;
  display: grid;
  color: var(--accent);
  border-radius: 15px;
  place-items: center;
  background: var(--accent-soft);
}

.paycheck-mark svg {
  width: 30px;
}

.paycheck-bar {
  height: 9px;
  display: flex;
  margin-top: 26px;
  overflow: hidden;
  border-radius: 99px;
  background: #eeeef2;
}

.bar-net { background: var(--accent); }
.bar-tax { background: #c5c3f5; }

.paycheck-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 13px;
  color: var(--muted);
  font-size: 9px;
}

.paycheck-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.paycheck-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.paycheck-legend strong {
  margin-left: 3px;
  color: var(--ink);
}

.dot-net { background: var(--accent); }
.dot-tax { background: #c5c3f5; }

.earnings-card,
.deductions-card,
.calculator-card {
  padding: 25px;
}

.heading-total {
  font-size: 17px;
  letter-spacing: -.03em;
}

.heading-total.negative {
  color: var(--red);
}

.calculation-list,
.deduction-list {
  margin-top: 19px;
  border-top: 1px solid var(--line);
}

.calculation-list > div,
.deduction-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.calculation-list span {
  display: grid;
  grid-template-columns: 7px 1fr;
  align-items: center;
  column-gap: 7px;
}

.calculation-list small {
  grid-column: 2;
  margin-top: 3px;
  color: var(--faint);
  font-size: 8px;
}

.calc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.calc-dot.regular { background: var(--accent); }
.calc-dot.overtime { background: #aaa7f1; }
.calc-dot.contract { background: var(--amber); }

.deduction-list > div span small {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 8px;
}

.deduction-list > div strong {
  color: var(--red);
}

.disclaimer {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  color: #8c6a1f;
  border-radius: 12px;
  background: var(--amber-soft);
}

.disclaimer svg {
  width: 16px;
  flex: 0 0 auto;
}

.disclaimer p {
  margin: 0;
  font-size: 8px;
  line-height: 1.5;
}

.calculator-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 21px;
}

label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 620;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(255,255,255,.78);
  outline: none;
  transition: border 140ms ease, box-shadow 140ms ease;
}

input,
select {
  min-height: 39px;
  padding: 0 11px;
}

textarea {
  padding: 10px 11px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(20,20,25,.21);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(95,92,230,.55);
  box-shadow: 0 0 0 3px rgba(95,92,230,.08);
}

.input-prefix,
.input-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix > span {
  position: absolute;
  left: 11px;
  z-index: 1;
  color: var(--faint);
  font-size: 10px;
}

.input-prefix input {
  padding-left: 24px;
}

.input-suffix > span {
  position: absolute;
  right: 11px;
  color: var(--faint);
  font-size: 9px;
  pointer-events: none;
}

.input-suffix input {
  padding-right: 39px;
}

.projection-result {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-top: 20px;
  padding: 16px;
  border-radius: 14px;
  background: var(--accent-soft);
}

.projection-result span {
  color: var(--accent-deep);
  font-size: 9px;
  font-weight: 650;
}

.projection-result strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 22px;
  letter-spacing: -.04em;
}

.projection-result small {
  margin-top: 4px;
  color: #8582c1;
  font-size: 8px;
}

.report-controls {
  display: grid;
  grid-template-columns: 140px 140px minmax(160px, 1fr) minmax(160px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 23px;
  padding: 16px;
  border-radius: 18px;
}

.report-title-field {
  grid-column: 1 / -1;
}

#refreshReportButton {
  grid-column: 5;
  grid-row: 1;
}

.report-paper {
  max-width: 900px;
  min-height: 1000px;
  margin: 0 auto;
  padding: 52px 57px 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  box-shadow: 0 13px 50px rgba(27,27,34,.09);
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line-strong);
}

.report-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-brand .brand-mark {
  width: 34px;
  height: 34px;
}

.report-brand strong,
.report-brand small,
.report-meta span,
.report-meta strong {
  display: block;
}

.report-brand strong {
  font-size: 10px;
  letter-spacing: .16em;
}

.report-brand small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 6px;
  letter-spacing: .19em;
}

.report-meta {
  text-align: right;
}

.report-meta span {
  color: var(--faint);
  font-size: 7px;
  text-transform: uppercase;
}

.report-meta strong {
  margin-top: 3px;
  font-size: 9px;
}

.report-title-block {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 0 30px;
}

.report-title-block p {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 7px;
  font-weight: 750;
  letter-spacing: .12em;
}

.report-title-block h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -.04em;
}

.report-title-block > div > span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.report-title-block .report-scope {
  margin-top: 5px;
  color: var(--faint);
  font-weight: 650;
}

.report-employee {
  min-width: 160px;
  text-align: right;
}

.report-employee span,
.report-employee strong,
.report-employee small {
  display: block;
}

.report-employee span {
  color: var(--faint);
  font-size: 7px;
  text-transform: uppercase;
}

.report-employee strong {
  margin-top: 5px;
  font-size: 11px;
}

.report-employee small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.report-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.report-totals > div {
  padding: 15px;
  border-right: 1px solid var(--line);
}

.report-totals > div:last-child {
  border-right: 0;
}

.report-totals span,
.report-totals strong {
  display: block;
}

.report-totals span {
  color: var(--faint);
  font-size: 7px;
  text-transform: uppercase;
}

.report-totals strong {
  margin-top: 5px;
  font-size: 16px;
}

.report-totals .accent {
  color: white;
  background: var(--accent);
}

.report-totals .accent span {
  color: rgba(255,255,255,.65);
}

.report-table {
  margin-top: 25px;
}

.report-table th,
.report-table td {
  padding: 10px 8px;
  font-size: 8px;
}

.report-table th {
  color: var(--muted);
  background: #f7f7f9;
  font-size: 6px;
}

.report-table th:first-child,
.report-table td:first-child {
  padding-left: 12px;
}

.report-table td:last-child {
  font-weight: 700;
}

.report-task strong,
.report-task small {
  display: block;
  max-width: 105px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-task small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 6px;
}

.report-empty-row td {
  height: 120px;
  color: var(--faint);
  text-align: center;
}

.report-rules {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.report-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.report-section-heading strong {
  font-size: 8px;
  text-transform: uppercase;
}

.report-section-heading span {
  color: var(--faint);
  font-size: 7px;
}

.report-rule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.report-rule-item {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafafd;
}

.report-rule-item strong,
.report-rule-item span,
.report-rule-item small {
  display: block;
}

.report-rule-item strong {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-rule-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.45;
}

.report-rule-item small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 6px;
}

.report-pay-summary {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 35px;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid var(--line-strong);
}

.report-note strong {
  font-size: 8px;
  text-transform: uppercase;
}

.report-note p {
  max-width: 320px;
  margin: 7px 0;
  color: var(--faint);
  font-size: 7px;
  line-height: 1.6;
}

.report-calculations p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
}

.report-calculations strong {
  color: var(--ink);
}

.report-calculations .report-net {
  padding-top: 11px;
  color: var(--ink);
  border-bottom: 0;
  font-weight: 700;
}

.report-calculations .report-net strong {
  color: var(--accent);
  font-size: 12px;
}

.report-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 70px;
  padding-top: 13px;
  color: var(--faint);
  border-top: 1px solid var(--line);
  font-size: 6px;
}

#settingsForm {
  display: grid;
  gap: 18px;
}

.settings-section {
  padding: 27px;
}

.settings-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.settings-heading h2,
.settings-heading p {
  margin: 0;
}

.settings-heading h2 {
  font-size: 14px;
  letter-spacing: -.02em;
}

.settings-heading p {
  margin-top: 4px;
  color: var(--faint);
  font-size: 9px;
}

.settings-heading .connection-badge {
  margin-left: auto;
}

.settings-heading-action {
  min-height: 36px;
  margin-left: auto;
}

.settings-icon {
  width: 39px;
  height: 39px;
  display: grid;
  flex: 0 0 auto;
  border-radius: 12px;
  place-items: center;
}

.settings-icon svg {
  width: 19px;
}

.settings-icon.violet { color: var(--accent); background: var(--accent-soft); }
.settings-icon.green { color: var(--green); background: var(--green-soft); }
.settings-icon.amber { color: var(--amber); background: var(--amber-soft); }
.settings-icon.blue { color: var(--blue); background: var(--blue-soft); }
.settings-icon.red { color: var(--red); background: var(--red-soft); }
.settings-icon.ai { color: #8b55dd; background: #f3eafe; }
.settings-icon.sheets { color: #169c5d; background: #e6f7ee; }

.settings-fields {
  display: grid;
  gap: 15px;
  margin-top: 21px;
}

.settings-fields.two-column {
  grid-template-columns: repeat(2, 1fr);
}

.settings-fields.three-column {
  grid-template-columns: repeat(3, 1fr);
}

.settings-fields.four-column {
  grid-template-columns: repeat(4, 1fr);
}

.settings-fields.tax-rate-grid {
  grid-template-columns: repeat(5, 1fr);
}

.settings-fields label > small {
  display: block;
  margin-top: 6px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.5;
}

.checkbox-setting {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-setting > input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.checkbox-setting > span {
  margin: 0;
}

.checkbox-setting strong,
.checkbox-setting small {
  display: block;
}

.checkbox-setting strong {
  color: var(--ink);
  font-size: var(--text-body);
}

.checkbox-setting small {
  margin-top: 3px;
  color: var(--faint);
  font-size: var(--text-small);
  font-weight: 450;
  line-height: 1.4;
}

.tax-exempt-setting {
  margin-top: 17px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-muted);
}

.ai-settings-section {
  overflow: hidden;
}

.ai-master-toggle {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-muted);
}

.ai-provider-settings {
  margin-top: 18px;
  padding-top: 2px;
  animation: aiSettingsIn 180ms ease both;
}

.ai-provider-settings[hidden],
.ai-local-endpoint[hidden],
.ai-api-key-field[hidden],
.ollama-setup[hidden],
#detectLocalModelsButton[hidden] {
  display: none;
}

@keyframes aiSettingsIn {
  from { opacity: 0; transform: translateY(-4px); }
}

.ai-local-endpoint {
  grid-column: 1 / -1;
}

.ai-api-key-field {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.ai-api-key-field em {
  color: var(--faint);
  font-style: normal;
  font-weight: 500;
}

.ai-api-key-field .secure-key-actions .button {
  text-decoration: none;
}

.ai-provider-note {
  display: flex;
  gap: 12px;
  margin-top: 15px;
  padding: 15px 16px;
  color: var(--muted);
  border: 1px solid rgba(139, 85, 221, .13);
  border-radius: 12px;
  background: rgba(243, 234, 254, .55);
}

.ai-provider-note svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: #8b55dd;
}

.ai-provider-note strong,
.ai-provider-note p {
  display: block;
  margin: 0;
}

.ai-provider-note strong {
  color: var(--ink);
  font-size: var(--text-body);
}

.ai-provider-note p {
  margin-top: 5px;
  font-size: var(--text-small);
  line-height: 1.55;
}

.ai-provider-note .ai-model-footprint {
  color: var(--faint);
}

.ollama-setup {
  margin-top: 15px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}

.ollama-setup-heading,
.ollama-command {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ollama-setup-heading {
  justify-content: space-between;
}

.ollama-setup-heading strong,
.ollama-setup-heading p {
  display: block;
  margin: 0;
}

.ollama-setup-heading strong {
  color: var(--ink);
  font-size: var(--text-body);
}

.ollama-setup-heading p,
.ollama-origin-note {
  margin-top: 4px;
  color: var(--faint);
  font-size: var(--text-small);
  line-height: 1.5;
}

.ollama-setup-grid {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.ollama-command {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
}

.ollama-command > span {
  color: var(--muted);
  font-size: var(--text-small);
  font-weight: 650;
}

.ollama-command code {
  min-width: 0;
  padding: 9px 11px;
  overflow-x: auto;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: var(--text-small);
  white-space: nowrap;
}

.ollama-command .button {
  min-height: 34px;
}

.ollama-origin-note code {
  color: var(--ink);
}

.connection-badge.syncing {
  color: var(--amber);
  border-color: rgba(209, 135, 0, .18);
  background: var(--amber-soft);
}

.connection-badge.error {
  color: var(--red);
  border-color: rgba(226, 76, 75, .18);
  background: var(--red-soft);
}

.ai-actions {
  flex-wrap: wrap;
}

.ai-actions .last-sync {
  min-width: min(100%, 250px);
  line-height: 1.45;
  text-align: right;
}

.tax-preset-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(95,92,230,.12);
  border-radius: 8px;
  background: rgba(240,240,253,.66);
}

.tax-preset-status strong,
.tax-preset-status span {
  display: block;
}

.tax-preset-status strong {
  font-size: 10px;
}

.tax-preset-status span:not(.period-chip) {
  margin-top: 4px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.45;
}

.tax-warning {
  display: flex;
  gap: 11px;
  margin-top: 12px;
  padding: 14px 16px;
  color: #765a1c;
  border: 1px solid rgba(210,151,33,.15);
  border-radius: 8px;
  background: var(--amber-soft);
}

.tax-warning svg,
.sheets-output-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.tax-warning strong {
  display: block;
  font-size: 9px;
}

.tax-warning p {
  margin: 4px 0 0;
  font-size: 8px;
  line-height: 1.55;
}

.tax-warning .tax-sources {
  color: #816728;
}

.tax-sources a {
  color: inherit;
  font-weight: 700;
}

.sheets-setup {
  display: grid;
  margin-top: 21px;
  overflow: hidden;
  border: 1px solid rgba(22,156,93,.12);
  border-radius: 8px;
}

.setup-step {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(22,156,93,.1);
  background: #f5fbf8;
}

.setup-step:last-child {
  border-bottom: 0;
}

.setup-step > span {
  width: 25px;
  height: 25px;
  display: grid;
  color: #147947;
  border-radius: 50%;
  place-items: center;
  background: #dff4e9;
  font-size: 9px;
  font-weight: 750;
}

.setup-step strong,
.setup-step p {
  margin: 0;
}

.setup-step strong {
  display: block;
  font-size: 10px;
}

.setup-step p {
  margin-top: 4px;
  color: #5e7469;
  font-size: 8px;
  line-height: 1.5;
}

.setup-step .button {
  min-height: 34px;
  color: #147947;
  font-size: 9px;
}

.sheets-output-note {
  display: flex;
  gap: 11px;
  margin-top: 12px;
  padding: 13px 15px;
  color: #466358;
  border-radius: 8px;
  background: #eef8f3;
}

.sheets-output-note p {
  margin: 0;
  font-size: 8px;
  line-height: 1.55;
}

.advanced-settings {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248,248,250,.72);
}

.advanced-settings summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 650;
}

.secure-key-field {
  display: block;
  margin-top: 14px;
}

.secure-key-field label {
  display: block;
}

.secure-key-field > small {
  display: block;
  margin-top: 6px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.5;
}

.secure-key-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.secure-key-control input {
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.secure-key-view {
  min-width: 104px;
  white-space: nowrap;
}

.secure-key-view svg {
  width: 16px;
  height: 16px;
}

.secure-key-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.secure-key-actions .button {
  min-height: 34px;
  font-size: 9px;
}

.secure-key-actions > span {
  color: var(--faint);
  font-size: 8px;
  line-height: 1.4;
}

code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0,0,0,.05);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.toggle-row > span {
  margin: 0;
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row strong {
  color: var(--ink);
  font-size: 10px;
}

.toggle-row small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 8px;
}

.toggle {
  width: 38px;
  min-height: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #d5d5da;
  appearance: none;
  cursor: pointer;
}

.toggle::before {
  width: 18px;
  height: 18px;
  display: block;
  margin: 2px;
  content: "";
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.17);
  transition: transform 170ms ease;
}

.toggle:checked {
  background: var(--green);
}

.toggle:checked::before {
  transform: translateX(16px);
}

.connection-actions,
.data-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 19px;
}

.last-sync {
  margin-left: auto;
  color: var(--faint);
  font-size: 8px;
}

.connection-message {
  margin: 12px 0 0;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--surface-muted);
  font-size: var(--text-small);
  line-height: 1.45;
}

.connection-message.pending {
  color: var(--muted);
  border-color: var(--line-strong);
}

.connection-message.success {
  color: var(--green);
  border-color: rgba(32, 164, 100, .15);
  background: var(--green-soft);
}

.connection-message.warning {
  color: var(--amber);
  border-color: rgba(209, 135, 0, .18);
  background: var(--amber-soft);
}

.connection-message.error {
  color: var(--red);
  border-color: rgba(226, 76, 75, .18);
  background: var(--red-soft);
}

.file-button input {
  display: none;
}

.connection-badge.connected {
  color: var(--green);
  border-color: rgba(32,164,100,.15);
  background: var(--green-soft);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(23,23,28,.38);
  backdrop-filter: blur(10px);
  animation: fadeIn 180ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
}

.modal {
  width: min(470px, 100%);
  max-height: calc(100vh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(101, 101, 116, .42) transparent;
  scrollbar-width: thin;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 24px;
  background: rgba(249,249,251,.96);
  box-shadow: var(--shadow-lg);
  animation: modalIn 220ms ease;
}

.modal::-webkit-scrollbar {
  width: 7px;
}

.modal::-webkit-scrollbar-track {
  margin-block: 18px;
  background: transparent;
}

.modal::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(101, 101, 116, .42);
  background-clip: padding-box;
}

.modal::-webkit-scrollbar-thumb:hover {
  background: rgba(79, 76, 176, .7);
  background-clip: padding-box;
}

.modal::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(.97) translateY(8px); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 25px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: -.035em;
}

.modal-fields {
  display: grid;
  gap: 15px;
  padding: 22px 25px;
}

.task-billing-rules {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(244, 244, 247, .56);
}

.task-billing-rules summary {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 15px;
  cursor: pointer;
  list-style: none;
  transition: color 140ms ease, background 140ms ease;
}

.task-billing-rules summary::-webkit-details-marker {
  display: none;
}

.task-billing-rules summary:hover {
  background: var(--surface-muted);
}

.task-billing-rules summary:focus-visible {
  outline: 3px solid rgba(95, 92, 230, .2);
  outline-offset: -3px;
}

.task-billing-rules summary > span,
.task-billing-rules summary strong,
.task-billing-rules summary small {
  display: block;
}

.task-billing-rules summary strong {
  color: var(--ink);
  font-size: var(--text-body);
}

.task-billing-rules summary small {
  margin-top: 2px;
  color: var(--faint);
  font-size: var(--text-small);
}

.task-options-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--faint);
  transition: transform 160ms ease;
}

.task-billing-rules[open] .task-options-chevron {
  transform: rotate(180deg);
}

.task-options-body {
  display: grid;
  gap: 13px;
  padding: 14px 15px 15px;
  border-top: 1px solid var(--line);
}

.task-options-body > .checkbox-setting {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.meal-provided-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: -3px;
  padding: 13px;
  border: 1px solid rgba(95, 92, 230, .18);
  border-radius: 11px;
  background: var(--accent-soft);
}

.meal-provided-settings label > small {
  display: block;
  margin-top: 6px;
  color: var(--faint);
  font-size: var(--text-fine);
  line-height: 1.4;
}

.overtime-options {
  padding-top: 2px;
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-actions {
  display: flex;
  gap: 9px;
  padding: 17px 25px;
  border-top: 1px solid var(--line);
  background: rgba(244,244,247,.7);
}

.modal-spacer {
  flex: 1;
}

.danger-button {
  color: var(--red);
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 25px;
  bottom: 25px;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast {
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  color: white;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(32,32,39,.94);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  backdrop-filter: blur(15px);
  animation: toastIn 250ms ease both;
  font-size: 10px;
  font-weight: 560;
}

.toast::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  content: "";
  border-radius: 50%;
  background: #7ee2ac;
}

.toast.error::before { background: #ff8584; }
.toast.info::before { background: #9b99ff; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
}

/* Readability floor: Chronicle is an operational workspace, not a miniature
   dashboard. Supporting copy remains visually secondary without dropping
   below a comfortable browser reading size. */
.nav-item {
  font-size: var(--text-navigation);
}

.page-subtitle,
.button,
.clock-button,
.active-task-name,
.settings-heading h2 {
  font-size: var(--text-control);
}

.sync-pill strong,
.profile-mini strong,
.eyebrow,
.card-kicker,
.text-button,
.live-time span,
.card-heading h2 small,
.activity-date strong,
.activity-info strong,
.activity-duration,
.activity-empty,
.insight-card > p:last-child,
.search-field input,
th,
td,
.empty-state p,
.calculation-list > div,
.deduction-list > div,
label > span,
.input-prefix > span,
.input-suffix > span,
.settings-heading p,
.tax-preset-status strong,
.tax-warning strong,
.setup-step strong,
.toggle-row strong,
.toast {
  font-size: var(--text-body);
}

.sync-pill small,
.profile-mini small,
.avatar,
.status-badge,
.shift-label,
.shift-detail,
.shift-display .shift-detail strong,
.clock-footnote,
.goal-ring span,
.progress-legend,
.metric-card p,
.activity-date span,
.activity-info small,
.segmented-control button,
.project-filter select,
.summary-tile span,
.table-task span,
.period-chip,
.connection-badge,
.paycheck-top span,
.paycheck-legend,
.disclaimer p,
.projection-result span,
.report-brand strong,
.report-meta strong,
.report-title-block > div > span,
.report-employee strong,
.report-calculations .report-net strong,
.settings-fields label > small,
.tax-preset-status span:not(.period-chip),
.tax-warning p,
.setup-step > span,
.setup-step p,
.setup-step .button,
.sheets-output-note p,
.advanced-settings summary,
.toggle-row small,
.last-sync {
  font-size: var(--text-small);
}

.day-bar span,
.metric-card small,
.table-task small,
.status-chip,
.calculation-list small,
.deduction-list > div span small,
.projection-result small,
.report-brand small,
.report-meta span,
.report-title-block p,
.report-employee span,
.report-employee small,
.report-totals span,
.report-table th,
.report-table td,
.report-task small,
.report-note strong,
.report-note p,
.report-calculations p,
.report-footer {
  font-size: var(--text-fine);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  :root { --sidebar: 210px; }
  .workspace { padding-inline: 27px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .clock-card, .week-card { min-height: 320px; }
  .activity-card, .insight-card { min-height: 240px; }
  .payroll-grid { grid-template-columns: 1fr; }
  .calculator-fields { grid-template-columns: repeat(3, 1fr); }
  .settings-fields.four-column { grid-template-columns: repeat(2, 1fr); }
  .settings-fields.tax-rate-grid { grid-template-columns: repeat(3, 1fr); }
  .report-paper { padding-inline: 38px; }
}

@media (max-width: 720px) {
  :root { --sidebar: 250px; }

  .sidebar {
    transform: translateX(-105%);
    transition: transform 240ms cubic-bezier(.2,.8,.2,1);
    box-shadow: 20px 0 60px rgba(20,20,30,.16);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(20,20,26,.25);
  }

  body.sidebar-open .sidebar-scrim {
    display: block;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 15;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(248,248,250,.82);
    backdrop-filter: blur(24px);
  }

  .mobile-header .brand {
    padding: 0;
    font-size: 15px;
  }

  .mobile-header .brand-mark {
    width: 27px;
    height: 27px;
    border-radius: 8px;
  }

  .mobile-header .brand-mark svg {
    width: 20px;
  }

  .mobile-header .icon-button {
    width: 34px;
    height: 34px;
  }

  .workspace {
    margin-left: 0;
    padding: 25px 16px 52px;
  }

  .page-header {
    min-height: 0;
    margin-bottom: 22px;
  }

  .page-header h1 {
    font-size: 30px;
  }

  .dashboard-grid {
    gap: 13px;
  }

  .clock-card {
    padding: 23px 20px 19px;
  }

  .shift-display {
    margin: 30px 0 25px;
  }

  .shift-display strong {
    font-size: 37px;
  }

  .week-card {
    padding: 23px 21px 18px;
  }

  .metric-card {
    min-height: 92px;
  }

  .timesheet-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .search-field {
    width: 100%;
  }

  .project-filter {
    width: 100%;
    margin-left: 0;
  }

  .report-controls {
    grid-template-columns: 1fr 1fr;
  }

  .report-title-field {
    grid-column: 1 / -1;
  }

  #refreshReportButton {
    grid-column: auto;
    grid-row: auto;
  }

  .report-paper {
    min-width: 660px;
  }

  #view-reports {
    overflow-x: auto;
    margin-inline: -16px;
    padding-inline: 16px;
  }

  #view-reports .page-header,
  #view-reports .report-controls {
    min-width: 0;
  }

  .settings-fields.two-column,
  .settings-fields.three-column,
  .settings-fields.tax-rate-grid {
    grid-template-columns: 1fr;
  }

  .setup-step {
    grid-template-columns: 27px minmax(0, 1fr);
  }

  .setup-step .button {
    grid-column: 2;
    justify-self: start;
  }

  .ollama-setup-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .ollama-command {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ollama-command > span {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .page-header .header-actions {
    width: 100%;
  }

  .page-header .header-actions .button {
    flex: 1;
  }

  .clock-card-top {
    gap: 10px;
  }

  .status-badge {
    padding: 6px 8px;
  }

  .shift-display {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .shift-detail {
    text-align: left;
  }

  .shift-display .shift-detail strong {
    max-width: min(78vw, 300px);
  }

  .clock-actions {
    flex-direction: column;
  }

  .week-card {
    min-height: 305px;
  }

  .calculator-fields {
    grid-template-columns: 1fr;
  }

  .settings-section {
    padding: 21px 18px;
  }

  .settings-fields.four-column {
    grid-template-columns: 1fr;
  }

  .secure-key-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .connection-actions,
  .data-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .settings-heading-action,
  .settings-heading .connection-badge {
    margin-left: 52px;
  }

  .tax-preset-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .last-sync {
    margin: 3px 0 0;
  }

  .ai-actions .last-sync {
    min-width: 0;
    text-align: left;
  }

  .insight-card {
    min-height: 0;
    padding: 24px 22px 26px;
  }

  .insight-card #insightBody {
    font-size: 15px;
  }

  .report-controls {
    grid-template-columns: 1fr;
  }

  .report-title-field {
    grid-column: auto;
  }

  .modal-actions {
    padding-inline: 18px;
  }

  .modal-fields {
    padding-inline: 18px;
  }

  .modal-fields .field-pair {
    grid-template-columns: 1fr;
  }

  .meal-provided-settings {
    grid-template-columns: 1fr;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .toast {
    min-width: 0;
  }
}

.theme-toggle {
  margin-bottom: 8px;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-icon-sun {
  display: none;
}

[data-theme="dark"] .theme-icon-moon {
  display: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.appearance-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 21px 0 0;
  padding: 0;
  border: 0;
}

.appearance-options label {
  position: relative;
  cursor: pointer;
}

.appearance-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.appearance-options label > span {
  min-height: 92px;
  display: grid;
  grid-template-columns: 25px 1fr;
  align-content: center;
  column-gap: 10px;
  margin: 0;
  padding: 15px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface-muted);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.appearance-options label:hover > span {
  border-color: var(--accent);
}

.appearance-options input:focus-visible + span {
  outline: 3px solid rgba(95, 92, 230, .2);
  outline-offset: 2px;
}

.appearance-options input:checked + span {
  color: var(--accent-deep);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.appearance-options svg {
  width: 22px;
  height: 22px;
  grid-row: 1 / span 2;
}

.appearance-options strong,
.appearance-options small {
  display: block;
}

.appearance-options strong {
  color: var(--ink);
  font-size: var(--text-small);
}

.appearance-options small {
  margin-top: 3px;
  color: var(--faint);
  font-size: var(--text-fine);
  line-height: 1.35;
}

/* Dark theme */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #150f11;
  --surface: rgba(35, 24, 27, 0.9);
  --surface-solid: #23181b;
  --surface-muted: #2c1e22;
  --ink: #f5eef0;
  --muted: #c0aaaf;
  --faint: #947f84;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #f06b72;
  --accent-deep: #ffadb1;
  --accent-soft: rgba(240, 77, 88, 0.17);
  --green: #54cf91;
  --green-soft: rgba(51, 191, 120, 0.14);
  --blue: #f28389;
  --blue-soft: rgba(233, 83, 94, 0.16);
  --amber: #e8ad42;
  --amber-soft: rgba(222, 157, 37, 0.14);
  --red: #ff777e;
  --red-soft: rgba(238, 87, 96, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2), 0 10px 28px rgba(0, 0, 0, .16);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .48);
}

[data-theme="dark"] .ambient-one {
  background: radial-gradient(circle, rgba(217, 52, 67, .22), transparent 68%);
}

[data-theme="dark"] .ambient-two {
  background: radial-gradient(circle, rgba(151, 42, 52, .14), transparent 68%);
}

[data-theme="dark"] .sidebar,
[data-theme="dark"] .mobile-header {
  background: rgba(24, 15, 18, .86);
}

[data-theme="dark"] .nav-item:hover {
  background: rgba(255, 255, 255, .055);
}

[data-theme="dark"] .sync-pill,
[data-theme="dark"] .button-secondary,
[data-theme="dark"] .icon-button,
[data-theme="dark"] .summary-tile,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  color: var(--ink);
  background: rgba(49, 33, 38, .84);
}

[data-theme="dark"] .button-secondary:hover,
[data-theme="dark"] .icon-button:hover,
[data-theme="dark"] .row-action:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, .2);
  background: #3c282e;
}

[data-theme="dark"] .card {
  border-color: var(--line);
}

[data-theme="dark"] .brand-mark {
  background: linear-gradient(145deg, #ef6670, #a92f3d);
  box-shadow: 0 7px 16px rgba(179, 43, 57, .3);
}

[data-theme="dark"] .clock-card {
  background:
    radial-gradient(circle at 85% 5%, rgba(255,255,255,.13), transparent 28%),
    linear-gradient(145deg, #b9424f 0%, #8f2f3d 72%, #762634 100%);
  box-shadow: 0 20px 42px rgba(117, 32, 46, .28);
}

[data-theme="dark"] .clock-button,
[data-theme="dark"] .break-button.on-break {
  color: #8f2f3d;
}

[data-theme="dark"] .clock-button {
  box-shadow: 0 8px 23px rgba(87, 20, 33, .22);
}

[data-theme="dark"] .clock-button:hover {
  box-shadow: 0 11px 30px rgba(87, 20, 33, .28);
}

[data-theme="dark"] .insight-card {
  background: linear-gradient(145deg, #321d22, #4a252d);
}

[data-theme="dark"] .insight-card::before {
  background: radial-gradient(circle at 35% 70%, rgba(255, 104, 116, .33), transparent 62%);
}

[data-theme="dark"] .insight-orb {
  color: #ffc0c5;
}

[data-theme="dark"] .avatar {
  color: #f0d7db;
  border-color: rgba(255, 189, 197, .13);
  background: linear-gradient(145deg, #4a3036, #302025);
}

[data-theme="dark"] .goal-ring {
  background: conic-gradient(var(--accent) calc(var(--progress) * 1%), #3a282d 0);
}

[data-theme="dark"] .goal-ring::before,
[data-theme="dark"] .segmented-control button.active {
  background: var(--surface-solid);
}

[data-theme="dark"] .hours-progress,
[data-theme="dark"] .day-bar-track,
[data-theme="dark"] .segmented-control,
[data-theme="dark"] .status-chip.unsynced,
[data-theme="dark"] .paycheck-bar,
[data-theme="dark"] .toggle {
  background: #3a282d;
}

[data-theme="dark"] .hours-progress span {
  background: linear-gradient(90deg, #c83e49, #f17b82);
}

[data-theme="dark"] .day-bar-fill {
  background: #7d4149;
}

[data-theme="dark"] .legend-overtime,
[data-theme="dark"] .calc-dot.overtime {
  background: #9d5860;
}

[data-theme="dark"] .projection-result small {
  color: #d4959d;
}

[data-theme="dark"] .button:focus-visible,
[data-theme="dark"] .icon-button:focus-visible,
[data-theme="dark"] .text-button:focus-visible,
[data-theme="dark"] .clock-button:focus-visible,
[data-theme="dark"] .nav-item:focus-visible,
[data-theme="dark"] input:focus-visible,
[data-theme="dark"] select:focus-visible,
[data-theme="dark"] textarea:focus-visible,
[data-theme="dark"] .appearance-options input:focus-visible + span {
  outline-color: rgba(240, 107, 114, .34);
}

[data-theme="dark"] .project-filter select,
[data-theme="dark"] th,
[data-theme="dark"] .advanced-settings {
  background-color: rgba(47, 31, 36, .8);
}

[data-theme="dark"] tbody tr:hover {
  background: rgba(240, 107, 114, .065);
}

[data-theme="dark"] input:hover,
[data-theme="dark"] select:hover,
[data-theme="dark"] textarea:hover {
  border-color: rgba(255, 255, 255, .22);
}

[data-theme="dark"] .tax-preset-status {
  background: rgba(240, 77, 88, .1);
}

[data-theme="dark"] .tax-warning,
[data-theme="dark"] .disclaimer {
  color: #e4bd70;
}

[data-theme="dark"] .tax-warning .tax-sources {
  color: #d5b674;
}

[data-theme="dark"] .settings-icon.sheets {
  color: var(--green);
  background: var(--green-soft);
}

[data-theme="dark"] .settings-icon.ai {
  color: #d5afff;
  background: rgba(155, 92, 232, .16);
}

[data-theme="dark"] .ai-master-toggle,
[data-theme="dark"] .ai-provider-note {
  background: rgba(255, 255, 255, .035);
}

[data-theme="dark"] .ai-provider-note {
  border-color: rgba(213, 175, 255, .12);
}

[data-theme="dark"] .ai-provider-note svg {
  color: #d5afff;
}

[data-theme="dark"] .setup-step {
  background: rgba(34, 54, 46, .72);
}

[data-theme="dark"] .setup-step > span {
  color: #87dbad;
  background: rgba(55, 181, 114, .18);
}

[data-theme="dark"] .setup-step p,
[data-theme="dark"] .setup-step .button,
[data-theme="dark"] .sheets-output-note {
  color: #a8c5b6;
}

[data-theme="dark"] .sheets-output-note {
  background: rgba(34, 54, 46, .62);
}

[data-theme="dark"] code {
  background: rgba(255, 255, 255, .07);
}

[data-theme="dark"] .toggle::before {
  background: #f4f4f6;
}

[data-theme="dark"] .modal {
  scrollbar-color: rgba(245, 160, 170, .35) transparent;
  border-color: rgba(255, 255, 255, .1);
  background: rgba(36, 23, 27, .97);
}

[data-theme="dark"] .modal::-webkit-scrollbar-thumb {
  background: rgba(245, 160, 170, .35);
  background-clip: padding-box;
}

[data-theme="dark"] .modal::-webkit-scrollbar-thumb:hover {
  background: rgba(240, 107, 114, .65);
  background-clip: padding-box;
}

[data-theme="dark"] .modal-actions {
  background: rgba(27, 17, 20, .75);
}

[data-theme="dark"] .task-billing-rules,
[data-theme="dark"] .tax-exempt-setting {
  background: rgba(255, 255, 255, .035);
}

/* A report remains paper-like on screen and prints identically in either theme. */
[data-theme="dark"] .report-paper {
  --ink: #17171a;
  --muted: #6e6e76;
  --faint: #797981;
  --line: rgba(20, 20, 25, .09);
  --line-strong: rgba(20, 20, 25, .14);
  color: var(--ink);
  border-color: rgba(255, 255, 255, .08);
  background: #fff;
}

@media (max-width: 720px) {
  .appearance-options {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }

  .insight-card.is-generating .insight-refresh svg {
    animation: none;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0.4in;
  }

  body {
    background: white;
  }

  .sidebar,
  .mobile-header,
  .page-header,
  .report-controls,
  .ambient,
  .toast-region {
    display: none !important;
  }

  .workspace {
    margin: 0;
    padding: 0;
  }

  .view {
    display: none !important;
  }

  #view-reports {
    display: block !important;
    max-width: none;
    overflow: visible;
  }

  .report-paper {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .report-footer {
    margin-top: 35px;
  }
}
