:root {
  --bg: #0b0d10;
  --card: #12161b;
  --text: #e8eef7;
  --muted: #9aa7b7;
  --border: #222a33;
  --btn: #2a3440;
  --btn2: #1f2730;
  --danger: #7b2f2f;
  --container-pad: 18px;
  --container-pad-mobile: 14px;
  --card-pad: 18px;
  --card-pad-mobile: 14px;
  --control-gap: 14px;
  --modal-gutter: 20px;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
body {
  margin: 0;
  font-family: -apple-system, system-ui, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #0c1015;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  font-weight: 700;
  flex: 0 0 auto;
  min-width: 0;
}
.app-logo {
  height: 32px;
  width: auto;
  display: block;
}
.mobileNavToggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--btn2);
  color: var(--text);
  cursor: pointer;
}
.mobileNavToggleBar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.mobileNavToggle:focus-visible {
  outline: 2px solid #9ecbff;
  outline-offset: 2px;
}
.nav a {
  color: var(--muted);
  text-decoration:none;
  margin-left: 12px;
}
.nav a:hover { color: var(--text); }
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  margin-left: 0;
}

.container {
  max-width: 980px;
  margin: 20px auto;
  padding: 0 var(--container-pad) 40px;
}
.containerWide {
  max-width: 1180px;
}

.stackSm {
  display: grid;
  gap: 8px;
}
.stackMd {
  display: grid;
  gap: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--card-pad);
  margin-bottom: 16px;
  min-width: 0;
}
.card.inner { margin-bottom: 0; }

h1,h2,h3 { margin: 0 0 10px; }
label {
  display:block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
input, select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f1318;
  color: var(--text);
  font: inherit;
  line-height: 1.4;
}
.inputLike {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f1318;
  color: var(--text);
  display: flex;
  align-items: center;
}
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

.row { display:flex; gap: 10px; align-items:center; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 768px) { .grid2 { grid-template-columns: 1fr; } }
.timerFormFields { display: grid; gap: 12px; }
.fieldRow { align-items: stretch; }
.fieldRow > input,
.fieldRow > select {
  flex: 1 1 auto;
  min-width: 0;
}
.fieldRow > .btn {
  flex: 0 0 auto;
}
@media (max-width: 760px) {
  .fieldRow {
    flex-wrap: wrap;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--btn);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font: inherit;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}
.btn.secondary { background: var(--btn2); color: var(--muted); }
.btn.danger { background: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.timerBox { margin-top: 14px; padding: 14px; border: 1px dashed var(--border); border-radius: 14px; }
.timer { font-size: 54px; font-weight: 800; letter-spacing: 1px; margin: 6px 0 10px; }
.timerPhase { color: var(--muted); font-size: 14px; }
.timerQuickActions,
.timerToggleGroup,
.timerControlRow,
.modalActions {
  align-items: stretch;
}
.timerQuickBtn {
  flex: 1 1 88px;
}
.timerControlsStack {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}
.timerQuickActions {
  margin-top: 0;
}
.timerControlsDivider {
  margin: 0;
}
.timerCustomDuration {
  flex: 1 1 260px;
  align-items: stretch;
}
.timerCustomDuration input {
  flex: 1 1 auto;
  min-width: 0;
}
.timerCustomDuration .btn {
  flex: 0 0 auto;
}
.timerToggleGroup {
  gap: 14px;
}
.timerToggleGroup .toggleSwitch {
  flex: 1 1 280px;
  min-width: 0;
  margin: 0;
}
.timerControlRow .btn,
.modalActions .btn {
  flex: 1 1 160px;
}
.muted { color: var(--muted); font-size: 13px; }
.muted,
.error,
.successText {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.error { color: #ff8f8f; font-size: 13px; margin: 6px 0 0; }
.successText { color: #92d6ab; font-size: 13px; margin: 6px 0 0; }
.navInlineForm {
  display: inline;
}
.authShell {
  width: min(100%, 560px);
  margin: clamp(18px, 6vh, 44px) auto;
}
.authCard {
  width: 100%;
  margin-bottom: 0;
}
.authHeader {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.authHeader p {
  margin: 0;
}
.authForm {
  display: grid;
  gap: var(--control-gap);
}
.authField {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.authActions {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}
.authActions .btn {
  width: 100%;
}
.authFooter {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.authFooter p {
  margin: 0;
}
.authCard p:last-child,
.modalCard p:last-child {
  margin-bottom: 0;
}
.authPageMain {
  padding-bottom: 32px;
}
.authShellRegister {
  width: 100%;
  max-width: 1120px;
  margin: clamp(18px, 5vh, 40px) auto;
}
.registerLayout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 22px;
  align-items: stretch;
}
.registerFormCard,
.registerMarketingPanel {
  position: relative;
  overflow: hidden;
  min-width: 0;
}
@media (min-width: 769px) {
  .registerLayout > * {
    height: 100%;
  }
  .registerMarketingPanel {
    height: 100%;
  }
}
.registerFormCard {
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(88, 166, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(18, 22, 27, 0.98), rgba(15, 19, 24, 0.98));
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.24);
}
.registerHeader {
  margin-bottom: 22px;
}
.registerLogo {
  width: auto;
  height: 34px;
}
.registerEyebrow,
.registerMarketingEyebrow {
  margin: 0;
  color: #9ecbff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}
.registerHeader h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.registerIntro,
.registerMarketingLead,
.registerAudienceCue {
  margin: 0;
  color: #c7d2df;
  font-size: 15px;
  line-height: 1.65;
}
.registerNotice {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 143, 143, 0.35);
  border-radius: 12px;
  background: rgba(123, 47, 47, 0.18);
}
.registerNotice .error {
  margin: 0;
}
.registerForm {
  gap: 16px;
}
.registerNameGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.registerFieldHeader {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.registerFieldHeader .muted {
  font-size: 12px;
}
.registerActions {
  margin-top: 8px;
}
.registerFooter {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.registerMarketingPanel {
  padding: 0;
  background:
    radial-gradient(circle at top right, rgba(88, 166, 255, 0.22), transparent 36%),
    radial-gradient(circle at bottom left, rgba(158, 203, 255, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(15, 19, 24, 0.98), rgba(12, 17, 23, 0.99));
}
.registerMarketingInner {
  display: grid;
  gap: 18px;
  height: 100%;
  padding: 28px;
}
.registerMarketingPanel h2 {
  margin: 0;
  font-size: clamp(1.9rem, 2.6vw, 2.5rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.registerBenefits {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.registerBenefits li {
  position: relative;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.55;
}
.registerBenefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #9ecbff;
  box-shadow: 0 0 16px rgba(158, 203, 255, 0.45);
}
.registerInsightGrid {
  display: grid;
  gap: 12px;
}
.registerInsightCard {
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.registerInsightLabel,
.registerInsightValue,
.registerInsightNote {
  margin: 0;
}
.registerInsightLabel {
  color: #9ecbff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}
.registerInsightValue {
  margin-top: 8px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.registerInsightNote {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.registerAudienceCue {
  margin-top: auto;
  padding-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.authShellLogin {
  max-width: 1120px;
}
.loginLayout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 20px;
}
.loginFormCard {
  display: grid;
  align-content: start;
  gap: 0;
  padding: 30px;
  background:
    radial-gradient(circle at top left, rgba(88, 166, 255, 0.1), transparent 33%),
    linear-gradient(180deg, rgba(18, 22, 27, 0.985), rgba(14, 18, 22, 0.985));
}
.loginHeader {
  gap: 12px;
  margin-bottom: 20px;
}
.loginHeader h1 {
  margin: 0;
  font-size: clamp(2rem, 2.8vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.loginIntro {
  max-width: 42ch;
}
.loginStatusText {
  margin: 0 0 14px;
}
.loginNotice {
  margin-bottom: 16px;
}
.loginForm {
  gap: 16px;
}
.loginActions {
  margin-top: 10px;
}
.loginFooter {
  gap: 12px;
}
.loginMarketingPanel {
  background:
    radial-gradient(circle at top right, rgba(88, 166, 255, 0.18), transparent 34%),
    radial-gradient(circle at bottom left, rgba(158, 203, 255, 0.07), transparent 28%),
    linear-gradient(180deg, rgba(14, 19, 24, 0.98), rgba(11, 15, 20, 0.99));
}
.loginMarketingInner {
  gap: 20px;
  padding: 30px;
}
.loginMarketingLead {
  max-width: 44ch;
}
.loginBenefits {
  gap: 14px;
}
.loginInsightGrid {
  gap: 10px;
}
.loginInsightCard {
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.035);
}
.loginInsightCard .registerInsightValue {
  font-size: 1.15rem;
}
.loginAudienceCue {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #d6e1ec;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.45;
}
.settingsPanel {
  display: grid;
  gap: 16px;
}
.settingsSection {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f1318;
  padding: 14px;
}
.settingsSection .muted {
  margin: 0 0 12px;
}
.settingsSubheading {
  margin-bottom: 12px;
  font-size: 15px;
}
.settingsSectionHeader {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.settingsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.settingsForm {
  margin-top: 12px;
}
.settingsActions {
  margin-top: 14px;
  align-items: center;
}
.settingsList {
  display: grid;
  gap: 10px;
}
.settingsListEmpty {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
  background: #0c1117;
}
.settingsRow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0c1117;
  padding: 12px 14px;
}
.settingsRowInfo {
  min-width: 0;
}
.settingsRowTitle {
  font-weight: 600;
}
.settingsRowMeta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.settingsRowActions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.statusBadge {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.billingNotice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0c1117;
}
.billingNotice p {
  margin: 6px 0 0;
}

.toggle { display:flex; align-items:center; gap: 8px; color: var(--muted); font-size: 13px; }

.toggleSwitch {
  position: relative;
  gap: 12px;
  align-items: center;
}
.toggleSwitch > span:last-child {
  display: inline-flex;
  align-items: center;
  line-height: 1.3;
  min-width: 0;
}
.switchInput {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}
.switchTrack {
  position: relative;
  width: 66px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #1a2028;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.switchThumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d9e1ec;
  transition: transform 0.2s ease;
}
.switchState {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #0f141a;
  pointer-events: none;
}
.switchOn {
  right: 8px;
  opacity: 0;
}
.switchOff {
  right: 7px;
  opacity: 0.75;
}
.switchInput:checked + .switchTrack {
  background: #2f8f66;
  border-color: #2f8f66;
}
.switchInput:checked + .switchTrack .switchThumb {
  transform: translateX(36px);
}
.switchInput:checked + .switchTrack .switchOn {
  opacity: 0.9;
}
.switchInput:checked + .switchTrack .switchOff {
  opacity: 0;
}
.switchInput:focus-visible + .switchTrack {
  outline: 2px solid #9ecbff;
  outline-offset: 2px;
}

.tableWrap { overflow:auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); text-align:left; font-size: 12px; }
.table td {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.reportsPage {
  overflow-x: clip;
}

.reportsSummaryGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.reportsStatCard {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f1318;
  padding: 14px;
  min-width: 0;
}
.reportsStatLabel {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.reportsStatValue {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.reportsStatMeta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.reportsBehaviourTableWrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f1318;
}
.reportsChartWrap {
  position: relative;
  min-height: 260px;
}
.reportsChartWrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.reportsCellMeta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.reportsSectionNote {
  margin: 10px 2px 0;
  font-size: 12px;
}

@media (max-width: 768px) {
  .reportsSummaryGrid { grid-template-columns: 1fr; }
  .settingsGrid { grid-template-columns: 1fr; }
  .settingsRow {
    flex-direction: column;
    align-items: flex-start;
  }
  .settingsRowActions {
    justify-content: flex-start;
  }
}

.historyPage {
  overflow-x: clip;
}
.historyToolbar { justify-content: space-between; align-items: flex-end; }
.historyToolbar > .btn {
  flex: 0 0 auto;
}
.historyFilters {
  justify-content: flex-end;
  flex: 1 1 460px;
}
.historyFilter {
  flex: 1 1 220px;
  min-width: 220px;
}
.historyFilter label { margin: 0 0 6px; }
.historyFilter select { min-width: 0; }
.historyGroups { display: grid; gap: 10px; margin-top: 12px; }
.historyWeek {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f1318;
}
.historyWeek > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  color: var(--text);
}
.historyWeek > summary::-webkit-details-marker { display: none; }
.historyWeek > summary::before {
  content: "▸";
  color: var(--muted);
  margin-right: 6px;
}
.historyWeek[open] > summary::before { content: "▾"; }
.historyWeek > summary:focus-visible {
  outline: 2px solid #9ecbff;
  outline-offset: 2px;
  border-radius: 10px;
}
.historyWeekTitle { flex: 1; font-weight: 600; }
.historyWeekCount { white-space: nowrap; }
.historyWeekTableWrap { padding: 0 10px 10px; }
.historyActionsCell {
  white-space: nowrap;
  min-width: 144px;
}
.historyActions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.historyActions .btn {
  flex: 1 1 88px;
}

.reportsControls {
  align-items: flex-end;
}
.reportsModeBar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.reportsModeBtn.is-active {
  background: var(--text);
  color: #0f141a;
  border-color: var(--text);
}
.reportsControl {
  flex: 1 1 220px;
  min-width: 220px;
}
.reportsControl .btn {
  width: 100%;
  margin-top: 10px;
}
.reportsControl.is-dimmed {
  opacity: 0.45;
}
.reportsControl.is-dimmed input,
.reportsControl.is-dimmed button {
  pointer-events: none;
}
.reportsPicker {
  position: relative;
}
.reportsPicker::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.92;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f7fbff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
.reportsPicker input[type="date"],
.reportsPicker input[type="month"] {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-right: 44px;
  color-scheme: dark;
}
.reportsPicker input[type="date"]::-webkit-calendar-picker-indicator,
.reportsPicker input[type="month"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

@media (max-width: 768px) {
  .historyToolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
  .historyToolbar > .btn {
    width: 100%;
  }
  .historyFilters {
    flex: none;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    justify-content: stretch;
    align-content: start;
    gap: 10px;
  }
  .historyFilter {
    flex: none;
    width: 100%;
    min-width: 0;
  }
  .historyFilter label {
    margin-bottom: 6px;
  }
  .historyFilter select {
    min-width: 0;
  }
  .reportsControls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .reportsControl {
    flex: none;
    min-width: 0;
    width: 100%;
  }
  .reportsControl .btn {
    margin-top: 8px;
  }
  .reportsSummaryGrid {
    grid-template-columns: 1fr;
  }
  .reportsChartWrap {
    min-height: 240px;
  }
  .heatmap {
    padding: 8px;
  }
}

#topProjectsList {
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .historyWeek > summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .historyWeekCount {
    white-space: normal;
  }
  .historyWeekTableWrap {
    padding: 0 12px 12px;
  }
  .historyTable thead {
    display: none;
  }
  .historyTable,
  .historyTable tbody,
  .historyTable tr,
  .historyTable td {
    display: block;
    width: 100%;
  }
  .historyTable tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0c1117;
    padding: 12px 14px;
  }
  .historyTable tr + tr {
    margin-top: 12px;
  }
  .historyTable td {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 9px 0;
  }
  .historyTable td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .historyTable td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .historyTable .historyActionsCell {
    min-width: 0;
    white-space: normal;
    padding-top: 12px;
  }
  .historyActions {
    width: 100%;
    gap: 8px;
  }
  .historyActions .btn {
    flex: 1 1 calc(50% - 5px);
  }
}

@media (max-width: 560px) {
  .historyFilters {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.pill { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: 12px; display:inline-block; white-space: nowrap; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: var(--modal-gutter);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 30;
}
.modal.hidden { display:none; }
.modalCard {
  width: min(520px, calc(100vw - (var(--modal-gutter) * 2)));
  max-width: 100%;
  max-height: min(680px, calc(100dvh - (var(--modal-gutter) * 2)));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--card-pad);
  overflow: auto;
  overscroll-behavior: contain;
}
.modalCard.wide {
  width: min(760px, calc(100vw - (var(--modal-gutter) * 2)));
}
.modalCard > * {
  min-width: 0;
}
.modalCard > * + * {
  margin-top: 14px;
}
.modalCard > .modalActions {
  margin-top: 16px;
}
.modalActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.welcomeModalCard {
  border-color: #314152;
  background: linear-gradient(180deg, #141a21 0%, #12161b 100%);
}
.welcomeModalEyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(158, 203, 255, 0.2);
  background: rgba(158, 203, 255, 0.08);
  color: #cfe6ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.welcomeModalBody {
  white-space: pre-line;
}
.welcomeCouponBlock {
  padding: 14px 16px;
  border: 1px solid #47607a;
  border-radius: 14px;
  background: #0d141b;
}
.welcomeCouponLabel {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.welcomeCouponCode {
  margin-top: 6px;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: 0.08em;
  word-break: break-word;
}
.welcomeCouponHelper {
  margin-top: 10px;
}

@media (max-width: 768px) {
  .topbar {
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
  }
  .mobileNavToggle {
    display: inline-flex;
    flex: 0 0 auto;
  }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    width: auto;
    padding: 12px 18px 16px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    background: #0c1015;
    border-bottom: 1px solid var(--border);
    overflow-x: hidden;
  }
  .topbar[data-mobile-nav-open="true"] .nav {
    display: flex;
  }
  .nav a,
  .nav form {
    width: 100%;
  }
  .navInlineForm {
    display: block;
  }
  .nav form {
    display: block !important;
  }
  .nav a {
    display: block;
    padding: 12px 0;
    line-height: 1.4;
  }
  .nav .btn {
    width: 100%;
  }
  .container {
    padding: 0 var(--container-pad-mobile) 32px;
  }
  .card {
    padding: var(--card-pad-mobile);
  }
  .timerPageCard {
    padding: 14px;
  }
  .fieldRow {
    flex-wrap: wrap;
  }
  .fieldRow > .btn,
  .fieldActionBtn,
  .timerCustomDuration .btn {
    width: 100%;
  }
  .fieldActionBtn {
    justify-content: center;
  }
  .timerQuickActions {
    gap: 12px;
  }
  .timerQuickBtn {
    flex: 1 1 calc(50% - 6px);
  }
  .timerCustomDuration {
    flex-basis: 100%;
    width: 100%;
    flex-wrap: wrap;
  }
  .timerControlsStack {
    gap: 6px;
  }
  .timerControlsDivider {
    display: none;
  }
  .timerToggleGroup {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .timerToggleGroup .toggleSwitch {
    flex: 0 0 auto;
    align-items: flex-start;
    min-height: 0;
    height: auto;
  }
  .timerToggleGroup .toggleSwitch > span:last-child {
    padding-top: 2px;
  }
  .timerBox {
    margin-top: 0;
  }
  .timerControlRow .btn {
    flex: 1 1 calc(50% - 6px);
  }
  .settingsSection {
    padding: 12px;
  }
  .authShell {
    width: 100%;
    margin: 12px auto 20px;
  }
  .authPageMain {
    padding-bottom: 24px;
  }
  .authShellRegister {
    margin-top: 12px;
  }
  .registerLayout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .registerFormCard,
  .registerMarketingInner {
    padding: 22px;
  }
  .registerMarketingPanel {
    order: 2;
  }
  .loginLayout {
    gap: 16px;
  }
  .loginFormCard,
  .loginMarketingInner {
    padding: 22px;
  }
  .loginHeader h1 {
    font-size: clamp(1.85rem, 8vw, 2.25rem);
  }
  .registerHeader h1,
  .registerMarketingPanel h2 {
    font-size: clamp(1.8rem, 7vw, 2.3rem);
  }
  .registerHeader {
    margin-bottom: 18px;
  }
  .registerNameGrid {
    grid-template-columns: 1fr;
  }
  .authHeader {
    gap: 6px;
    margin-bottom: 16px;
  }
  .authForm {
    gap: 12px;
  }
  .authFooter {
    gap: 8px;
    margin-top: 14px;
  }
  .modal {
    align-items: flex-end;
    padding: 12px;
  }
  .modalCard,
  .modalCard.wide {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }
  .modalCard > * + * {
    margin-top: 12px;
  }
  .modalActions .btn {
    flex: 1 1 calc(50% - 5px);
  }
}

@media (max-width: 480px) {
  :root {
    --container-pad-mobile: 12px;
    --card-pad-mobile: 13px;
    --modal-gutter: 10px;
  }
  .card {
    border-radius: 12px;
  }
  .reportsChartWrap {
    min-height: 220px;
  }
  .heatmap {
    padding: 6px;
  }
  .heatmap-labeled {
    grid-template-columns: 40px repeat(24, minmax(20px, 1fr));
    min-width: 540px;
  }
  .heatmap-day {
    justify-content: flex-start;
    padding-right: 0;
    font-size: 10px;
  }
  .heatmap-hour {
    font-size: 9px;
  }
  .timer {
    font-size: clamp(40px, 13vw, 54px);
    letter-spacing: 0.5px;
    word-break: break-word;
  }
  .timerQuickBtn,
  .timerControlRow .btn,
  .modalActions .btn {
    flex-basis: 100%;
    width: 100%;
  }
  .toggleSwitch {
    gap: 10px;
  }
  .switchTrack {
    flex: 0 0 auto;
  }
  .timerModalCard,
  .modalCard {
    max-height: calc(100dvh - 20px);
  }
  .modalActions {
    flex-direction: column;
  }
  .authShell {
    margin-top: 10px;
  }
  .registerFormCard,
  .registerMarketingInner {
    padding: 18px;
  }
  .loginFormCard,
  .loginMarketingInner {
    padding: 18px;
  }
  .registerLayout {
    gap: 14px;
  }
  .loginHeader {
    margin-bottom: 18px;
  }
  .registerFieldHeader {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .registerMarketingInner {
    gap: 16px;
  }
  .loginMarketingInner {
    gap: 16px;
  }
  .authHeader {
    margin-bottom: 14px;
  }
  .authActions,
  .authFooter {
    gap: 8px;
  }
}

.heatmap {
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f1318;
}
.heatmap-labeled {
  display: grid;
  grid-template-columns: 48px repeat(24, minmax(22px, 1fr));
  gap: 2px;
  min-width: 620px;
}
.heatmap-corner {
  height: 18px;
}
.heatmap-hour {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  font-size: 10px;
  color: var(--muted);
}
.heatmap-day {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.heatcell {
  min-width: 22px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.05);
}

.updatesPage {
  display: grid;
  gap: 18px;
}
.updatesHero {
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(88, 166, 255, 0.2), transparent 32%),
    linear-gradient(180deg, rgba(18, 22, 27, 0.98), rgba(15, 19, 24, 0.98));
}
.updatesHeroCopy {
  max-width: 720px;
}
.updatesEyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: #9ecbff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.updatesIntro {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.7;
}
.updatesSection {
  gap: 14px;
}
.updatesSectionHeader {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.updatesSectionNote {
  margin: 0;
}
.releaseCard {
  margin-bottom: 0;
}
.releaseCardLatest {
  padding: 22px;
  border-color: rgba(88, 166, 255, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  background:
    linear-gradient(180deg, rgba(20, 26, 33, 0.98), rgba(14, 18, 24, 0.98));
}
.releaseCardCompact {
  padding: 0;
  overflow: hidden;
  background: #0f1318;
}
.releaseMetaRow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.releasePill {
  color: #d7ebff;
  border-color: rgba(158, 203, 255, 0.35);
  background: rgba(88, 166, 255, 0.12);
}
.releaseVersion {
  font-weight: 700;
  color: var(--text);
}
.releaseDate {
  color: var(--muted);
  font-size: 13px;
}
.releaseTitle {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}
.releaseSummary {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.releaseDetailGroups {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.releaseDetailGroup {
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.releaseDetailGroup h4 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ecbff;
}
.releaseDetailList {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.releaseDetailList li + li {
  margin-top: 8px;
}
.updatesHistory {
  display: grid;
  gap: 12px;
}
.releaseSummaryToggle {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}
.releaseSummaryToggle::-webkit-details-marker {
  display: none;
}
.releaseSummaryHeader {
  min-width: 0;
}
.releaseSummaryToggle .releaseTitle {
  font-size: 18px;
  margin-bottom: 8px;
}
.releaseToggleLabel {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.releaseToggleLabel::after {
  content: "v";
  font-size: 12px;
  transition: transform 0.2s ease;
}
.releaseCardCompact[open] .releaseToggleLabel::after {
  transform: rotate(180deg);
}
.releaseExpandable {
  padding: 0 18px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.roadmapGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.roadmapCard {
  margin-bottom: 0;
  min-height: 100%;
  background: #0f1318;
}
.roadmapCard p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 760px) {
  .updatesHero,
  .releaseCardLatest {
    padding: 18px;
  }
  .updatesSectionHeader,
  .releaseSummaryToggle {
    flex-direction: column;
    align-items: flex-start;
  }
  .releaseToggleLabel {
    margin-top: 4px;
  }
  .roadmapGrid {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 821px) {
  .historyTable {
    table-layout: fixed;
  }
  .historyTable th:nth-child(1),
  .historyTable td:nth-child(1) {
    width: 16%;
  }
  .historyTable th:nth-child(2),
  .historyTable td:nth-child(2),
  .historyTable th:nth-child(3),
  .historyTable td:nth-child(3) {
    width: 13%;
  }
  .historyTable th:nth-child(4),
  .historyTable td:nth-child(4),
  .historyTable th:nth-child(5),
  .historyTable td:nth-child(5) {
    width: 8%;
  }
  .historyTable th:nth-child(8),
  .historyTable td:nth-child(8) {
    width: 15%;
  }
  .historyTable th[data-label="Status"],
  .historyTable td[data-label="Status"],
  .historyTable th:nth-child(6),
  .historyTable td:nth-child(6) {
    width: 12%;
    min-width: 110px;
    white-space: nowrap;
  }
  .historyTable th[data-label="Note"],
  .historyTable td[data-label="Note"],
  .historyTable th:nth-child(7),
  .historyTable td:nth-child(7) {
    width: 15%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* =========================================
   Instructions page
   ========================================= */

.instructions-page {
  padding: 2rem 1rem 3rem;
}

.instructions-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.instructions-hero,
.instructions-quickstart,
.instructions-jumpnav,
.instruction-card,
.instructions-detail-section,
.instructions-footer-callout {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.instructions-hero,
.instructions-quickstart,
.instructions-detail-section,
.instructions-footer-callout {
  padding: 1.5rem;
}

.instructions-hero {
  margin-bottom: 1rem;
}

.instructions-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4ade80;
}

.instructions-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.instructions-intro {
  max-width: 760px;
  margin: 1rem 0 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(226, 232, 240, 0.92);
}

.instructions-page .section-heading {
  margin-bottom: 1rem;
}

.instructions-page .section-heading h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.instructions-page .section-heading p {
  margin: 0.45rem 0 0;
  color: rgba(226, 232, 240, 0.82);
}

.instructions-quickstart {
  margin-bottom: 1rem;
}

.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.quickstart-step {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.quickstart-step h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  line-height: 1.4;
}

.quickstart-step p {
  margin: 0;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.6;
}

.instructions-jumpnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.instructions-jumpnav a {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: rgba(241, 245, 249, 0.92);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.instructions-jumpnav a:hover,
.instructions-jumpnav a:focus-visible {
  background: rgba(51, 65, 85, 0.95);
  border-color: rgba(74, 222, 128, 0.4);
  transform: translateY(-1px);
  outline: none;
}

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.instruction-card {
  padding: 1.35rem;
}

.instruction-card-header {
  margin-bottom: 1rem;
}

.instruction-card-header h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.instruction-summary {
  margin: 0.45rem 0 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: 1rem;
}

.instruction-glance {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.instruction-glance h3 {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #4ade80;
}

.instruction-glance ul {
  margin: 0;
  padding-left: 1.1rem;
}

.instruction-glance li {
  margin: 0.35rem 0;
  line-height: 1.55;
  color: rgba(241, 245, 249, 0.92);
}

.instruction-card p {
  line-height: 1.7;
  color: rgba(226, 232, 240, 0.9);
}

.instruction-callout {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  line-height: 1.6;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.instruction-callout-tip {
  background: rgba(20, 83, 45, 0.2);
  border-color: rgba(74, 222, 128, 0.2);
}

.instruction-callout-note {
  background: rgba(30, 41, 59, 0.6);
}

.instructions-detail-section {
  margin-bottom: 1rem;
}

.instruction-details-list {
  display: grid;
  gap: 0.75rem;
}

.instruction-detail {
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.instruction-detail summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  position: relative;
}

.instruction-detail summary::-webkit-details-marker {
  display: none;
}

.instruction-detail summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  color: #4ade80;
}

.instruction-detail[open] summary::after {
  content: "–";
}

.instruction-detail p {
  margin: 0;
  padding: 0 1.1rem 1rem;
  line-height: 1.7;
  color: rgba(226, 232, 240, 0.85);
}

.instructions-footer-callout {
  padding: 1.4rem 1.5rem;
}

.instructions-footer-callout h2 {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
}

.instructions-footer-callout p {
  margin: 0.5rem 0 0;
  line-height: 1.7;
  color: rgba(226, 232, 240, 0.9);
}

.instructions-footer-callout a {
  color: #4ade80;
  text-decoration: none;
  font-weight: 600;
}

.instructions-footer-callout a:hover,
.instructions-footer-callout a:focus-visible {
  text-decoration: underline;
  outline: none;
}

@media (max-width: 980px) {
  .quickstart-grid,
  .instructions-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .instructions-page {
    padding: 1rem 0.85rem 2rem;
  }

  .instructions-hero,
  .instructions-quickstart,
  .instruction-card,
  .instructions-detail-section,
  .instructions-footer-callout {
    padding: 1.15rem;
    border-radius: 20px;
  }

  .instructions-jumpnav {
    padding: 0.85rem;
    border-radius: 20px;
  }

  .quickstart-grid,
  .instructions-grid {
    grid-template-columns: 1fr;
  }

  .instructions-jumpnav a {
    font-size: 0.9rem;
    padding: 0.58rem 0.8rem;
  }

  .instructions-hero h1 {
    font-size: 2rem;
  }

  .instruction-card-header h2,
  .instructions-footer-callout h2,
  .instructions-page .section-heading h2 {
    font-size: 1.25rem;
  }
}
