:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --panel-raised: #ffffff;
  --text: #101828;
  --muted: #64748b;
  --line: #dbe3ef;
  --line-strong: #b7c4d6;
  --shadow: 0 16px 38px rgba(35, 52, 78, 0.09);
  --sidebar: #10202b;
  --sidebar-soft: rgba(255, 255, 255, 0.08);
  --sidebar-text: #edf7f6;
  --teal: #0f766e;
  --teal-strong: #0d9488;
  --blue: #2563eb;
  --cyan: #0891b2;
  --violet: #7c3aed;
  --amber: #d97706;
  --orange: #ea580c;
  --rose: #e11d48;
  --pink: #db2777;
  --lime: #65a30d;
  --green: #16a34a;
  --danger: #dc2626;
  --radius: 8px;
  --focus: 0 0 0 3px rgba(13, 148, 136, 0.22);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1217;
  --panel: #151d25;
  --panel-soft: #101820;
  --panel-raised: #1b2630;
  --text: #eef4f8;
  --muted: #9aa9b8;
  --line: #293847;
  --line-strong: #415467;
  --shadow: 0 16px 46px rgba(0, 0, 0, 0.36);
  --sidebar: #081017;
  --sidebar-soft: rgba(255, 255, 255, 0.08);
  --sidebar-text: #eef9f7;
  --teal: #2dd4bf;
  --teal-strong: #14b8a6;
  --blue: #60a5fa;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --orange: #fb923c;
  --rose: #fb7185;
  --pink: #f472b6;
  --lime: #bef264;
  --green: #4ade80;
  --danger: #f87171;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(130deg, color-mix(in srgb, var(--teal) 8%, transparent), transparent 260px),
    linear-gradient(225deg, color-mix(in srgb, var(--rose) 7%, transparent), transparent 330px),
    linear-gradient(0deg, color-mix(in srgb, var(--blue) 5%, transparent), transparent 420px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.auth-required {
  display: grid;
  place-items: stretch;
}

body.auth-required .app-shell,
body.auth-required .overlay {
  display: none;
}

.auth-screen {
  display: none;
}

body.auth-required .auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-hero {
  width: min(100%, 430px);
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 11%, transparent), transparent 48%),
    linear-gradient(315deg, color-mix(in srgb, var(--rose) 9%, transparent), transparent 52%),
    var(--panel);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.auth-brand span,
.auth-brand strong {
  display: block;
}

.auth-brand span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-brand strong {
  color: var(--text);
  font-size: 1rem;
}

.auth-copy {
  display: grid;
  gap: 8px;
}

.auth-copy h1,
.auth-copy p {
  margin: 0;
}

.auth-copy h1 {
  font-size: clamp(1.55rem, 7vw, 2.15rem);
  line-height: 1.1;
}

.auth-copy p {
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-page-form {
  display: grid;
  gap: 9px;
}

.auth-page-form label {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
}

.auth-page-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--text);
  outline: none;
}

.auth-page-form input:focus {
  border-color: var(--teal);
  box-shadow: var(--focus);
}

.auth-primary,
.auth-switch,
.auth-text-button {
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 900;
}

.auth-primary {
  margin-top: 6px;
  border: 1px solid color-mix(in srgb, var(--teal) 65%, var(--blue));
  background: linear-gradient(135deg, var(--teal-strong), var(--blue));
  color: #fff;
}

.auth-primary:disabled {
  cursor: wait;
  opacity: 0.68;
}

.auth-text-button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.7;
}

.auth-switch,
.auth-text-button {
  border: 0;
  background: transparent;
  color: var(--blue);
}

.auth-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 292px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 18px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--teal) 22%, transparent), transparent 28%),
    linear-gradient(20deg, color-mix(in srgb, var(--violet) 14%, transparent), transparent 44%),
    var(--sidebar);
  color: var(--sidebar-text);
  box-shadow: 18px 0 36px rgba(15, 23, 42, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.22));
}

.brand-copy h1,
.brand-copy p,
.title-group h2,
.title-group p,
.section-heading h3,
.section-heading p {
  margin: 0;
}

.brand-copy h1 {
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand-copy p {
  margin-top: 2px;
  color: rgba(237, 247, 246, 0.72);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-right: 4px;
}

.nav-item,
.month-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(237, 247, 246, 0.78);
  text-align: left;
}

.nav-item {
  justify-content: flex-start;
  font-weight: 800;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

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

.nav-item:hover,
.month-link:hover,
.nav-item.active,
.month-link.active {
  background: var(--sidebar-soft);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--sidebar-text);
}

.nav-item.active {
  box-shadow: inset 4px 0 0 var(--cyan);
}

.month-link.active {
  box-shadow: inset 4px 0 0 var(--amber);
}

.month-link strong {
  width: 44px;
  text-align: right;
  color: #7dd3fc;
  font-size: 0.78rem;
}

.month-link:nth-child(3n + 1) strong {
  color: #5eead4;
}

.month-link:nth-child(3n + 2) strong {
  color: #fcd34d;
}

.month-link:nth-child(3n) strong {
  color: #c4b5fd;
}

.nav-block {
  display: grid;
  gap: 8px;
}

.nav-label {
  color: rgba(237, 247, 246, 0.62);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.year-select {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: var(--sidebar-soft);
  color: var(--sidebar-text);
  outline: none;
}

.year-select:focus {
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.18);
}

.month-list {
  display: grid;
  gap: 4px;
  padding-right: 2px;
}

.auth-panel {
  min-width: 0;
  flex: 0 1 auto;
}

.auth-card {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(390px, 34vw);
  min-height: 42px;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.78rem;
}

.auth-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-card p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-kicker {
  color: var(--teal);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.auth-identity {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.auth-form {
  display: grid;
  gap: 6px;
}

.auth-form label {
  color: rgba(237, 247, 246, 0.68);
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(8, 16, 23, 0.44);
  color: var(--sidebar-text);
  outline: none;
}

.auth-form input::placeholder {
  color: rgba(237, 247, 246, 0.42);
}

.auth-form input:focus {
  border-color: rgba(94, 234, 212, 0.58);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.16);
}

.otp-form {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-button,
.auth-link {
  min-height: 44px;
  padding-inline: 16px;
  border-radius: var(--radius);
  font-weight: 900;
}

.auth-button {
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  color: #ffffff;
}

.auth-button.secondary {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--text);
}

.auth-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.auth-link {
  border: 0;
  background: transparent;
  color: #fcd34d;
  text-align: left;
  padding: 0;
}

.auth-card.signed-in {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 8%, transparent), transparent 58%),
    var(--panel);
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(237, 247, 246, 0.72);
  font-size: 0.85rem;
}

.sidebar-footer p {
  margin: 0;
}

.main {
  min-width: 0;
  max-width: 100vw;
  margin-left: 292px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  min-width: 0;
}

.title-group {
  min-width: 0;
  margin-right: auto;
}

.title-group h2 {
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  line-height: 1.2;
}

.title-group p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--teal);
  box-shadow: var(--focus);
  outline: none;
}

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

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

.mobile-only {
  display: none;
}

.content {
  width: min(100%, 1500px);
  max-width: 100vw;
  margin: 0 auto;
  padding: 24px 28px 42px;
}

.dashboard-layout,
.month-layout {
  display: grid;
  gap: 18px;
}

.dashboard-layout > *,
.month-layout > * {
  min-width: 0;
}

.dashboard-sheet {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 210px;
  gap: 12px;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 7%, transparent), transparent 38%),
    linear-gradient(315deg, color-mix(in srgb, var(--amber) 8%, transparent), transparent 36%),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 30%, transparent) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--line) 30%, transparent) 1px, transparent 1px),
    var(--panel);
  background-size: 34px 34px;
  box-shadow: var(--shadow);
}

.sheet-sidebar {
  display: grid;
  grid-template-rows: repeat(3, minmax(112px, 1fr));
  gap: 8px;
}

.sheet-tile {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 110px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(35, 52, 78, 0.06);
  text-align: center;
}

.label-tile {
  background: linear-gradient(160deg, color-mix(in srgb, var(--rose) 14%, var(--panel)), var(--panel));
}

.month-tile {
  background: linear-gradient(160deg, color-mix(in srgb, var(--blue) 14%, var(--panel)), var(--panel));
}

.habit-tile {
  background: linear-gradient(160deg, color-mix(in srgb, var(--teal) 15%, var(--panel)), var(--panel));
}

.sheet-tile span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.sheet-tile strong {
  font-size: 1.42rem;
  line-height: 1.1;
}

.label-tile strong {
  color: var(--rose);
}

.month-tile strong {
  color: var(--blue);
}

.habit-tile strong {
  color: var(--teal);
}

.sheet-stage,
.cat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--cyan) 5%, transparent), transparent 44%),
    color-mix(in srgb, var(--panel) 94%, transparent);
}

.sheet-stage {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 16px;
}

.sheet-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet-stage-head h3,
.sheet-stage-head p {
  margin: 0;
}

.sheet-stage-head h3 {
  margin-top: 8px;
  font-size: 1.24rem;
  line-height: 1.2;
}

.sheet-stage-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.cat-card {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  min-height: 280px;
  padding: 18px;
  overflow: hidden;
  text-align: center;
}

.cat-card::before {
  content: "";
  position: absolute;
  inset: auto -30px -55px -30px;
  height: 135px;
  background:
    radial-gradient(circle at 20% 42%, color-mix(in srgb, var(--rose) 26%, transparent), transparent 34%),
    radial-gradient(circle at 74% 20%, color-mix(in srgb, var(--amber) 28%, transparent), transparent 32%),
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 20%, transparent), color-mix(in srgb, var(--violet) 16%, transparent));
  opacity: 0.72;
}

.cat-card > * {
  position: relative;
  z-index: 1;
}

.cat-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cat-card strong {
  font-size: 2.4rem;
  line-height: 1;
}

.cat-card p {
  max-width: 150px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.cat-badge {
  width: 148px;
  height: 168px;
  display: grid;
  place-items: center;
}

.cat-badge img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(15, 23, 42, 0.18));
}

.daily-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(42px, 1fr);
  gap: 5px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  padding: 8px 2px 2px;
}

.daily-strip.empty {
  grid-auto-flow: row;
  color: var(--muted);
  font-weight: 800;
}

.day-score {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 58px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.day-score strong {
  font-size: 0.72rem;
  line-height: 1;
}

.day-score span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.score-great {
  border-color: color-mix(in srgb, var(--green) 60%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--green) 18%, var(--panel)), var(--panel));
}

.score-good {
  border-color: color-mix(in srgb, var(--cyan) 55%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--cyan) 15%, var(--panel)), var(--panel));
}

.score-watch {
  border-color: color-mix(in srgb, var(--amber) 60%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--amber) 19%, var(--panel)), var(--panel));
}

.score-low {
  border-color: color-mix(in srgb, var(--rose) 50%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--rose) 13%, var(--panel)), var(--panel));
}

.dashboard-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 14px;
  min-width: 0;
}

.category-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.category-card {
  display: grid;
  gap: 12px;
  min-height: 138px;
  padding: 15px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--teal) 4%, var(--panel)), var(--panel));
  box-shadow: var(--shadow);
}

.category-card.tone-blue {
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 6%, var(--panel)), var(--panel));
}

.category-card.tone-amber {
  background: linear-gradient(180deg, color-mix(in srgb, var(--amber) 8%, var(--panel)), var(--panel));
}

.category-card.tone-rose {
  background: linear-gradient(180deg, color-mix(in srgb, var(--rose) 7%, var(--panel)), var(--panel));
}

.category-card div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.category-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.category-card strong {
  font-size: 1.35rem;
  line-height: 1;
}

.category-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.category-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.category-card.tone-amber .category-track span {
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.category-card.tone-rose .category-track span {
  background: linear-gradient(90deg, var(--rose), var(--pink));
}

.category-card.tone-blue .category-track span {
  background: linear-gradient(90deg, var(--blue), var(--violet));
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.month-board {
  min-width: 0;
  overflow: hidden;
}

.month-tile-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(82px, 1fr));
  gap: 7px;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
}

.month-score-card {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-height: 94px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-soft), var(--panel));
  color: var(--text);
  text-align: left;
}

.month-score-card:nth-child(4n + 1) {
  border-top: 4px solid var(--teal);
}

.month-score-card:nth-child(4n + 2) {
  border-top: 4px solid var(--blue);
}

.month-score-card:nth-child(4n + 3) {
  border-top: 4px solid var(--amber);
}

.month-score-card:nth-child(4n) {
  border-top: 4px solid var(--rose);
}

.month-score-card.score-great strong {
  color: var(--green);
}

.month-score-card.score-good strong {
  color: var(--cyan);
}

.month-score-card.score-watch strong {
  color: var(--amber);
}

.month-score-card.score-low strong {
  color: var(--rose);
}

.month-score-card:hover,
.month-score-card:focus-visible {
  border-color: var(--teal);
  box-shadow: var(--focus);
  outline: none;
}

.month-score-card span,
.month-score-card em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.month-score-card strong {
  font-size: 1.28rem;
  line-height: 1;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 14px;
}

.metric-grid > .metric-card:only-child {
  grid-column: 1 / -1;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card {
  min-width: 0;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
  overflow: hidden;
  border-left-width: 5px;
}

.metric-card.tone-teal {
  background: linear-gradient(160deg, color-mix(in srgb, var(--teal) 10%, var(--panel)), var(--panel) 62%);
}

.metric-card.tone-blue {
  background: linear-gradient(160deg, color-mix(in srgb, var(--blue) 10%, var(--panel)), var(--panel) 62%);
}

.metric-card.tone-amber {
  background: linear-gradient(160deg, color-mix(in srgb, var(--amber) 13%, var(--panel)), var(--panel) 62%);
}

.metric-card.tone-rose {
  background: linear-gradient(160deg, color-mix(in srgb, var(--rose) 10%, var(--panel)), var(--panel) 62%);
}

.metric-card.tone-violet {
  background: linear-gradient(160deg, color-mix(in srgb, var(--violet) 10%, var(--panel)), var(--panel) 62%);
}

.metric-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
}

.metric-card.tone-teal strong {
  color: var(--teal);
}

.metric-card.tone-blue strong {
  color: var(--blue);
}

.metric-card.tone-amber strong {
  color: var(--amber);
}

.metric-card.tone-rose strong {
  color: var(--rose);
}

.metric-card.tone-violet strong {
  color: var(--violet);
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.tone-teal {
  border-left-color: var(--teal);
}

.tone-blue {
  border-left-color: var(--blue);
}

.tone-amber {
  border-left-color: var(--amber);
}

.tone-rose {
  border-left-color: var(--rose);
}

.tone-violet {
  border-left-color: var(--violet);
}

.panel {
  padding: 18px;
}

.point-calendar-panel {
  min-width: 0;
}

.point-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.point-weekday {
  min-height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.point-day {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 6px;
  min-height: 94px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.point-day.is-empty {
  min-height: 94px;
  border-style: dashed;
  background: color-mix(in srgb, var(--panel-soft) 54%, transparent);
}

.point-day.is-focus {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--blue) 58%, transparent);
}

.point-day.is-today {
  border-color: var(--violet);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--violet) 46%, transparent);
}

.point-day span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

.point-day strong {
  align-self: center;
  justify-self: end;
  font-size: 1.05rem;
  line-height: 1;
}

.point-day small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.point-day em {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-heading h3 {
  font-size: 1rem;
  line-height: 1.25;
}

.section-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
}

.section-chip,
.kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.section-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-section-toggle {
  display: none;
}

.chart-scroll,
.table-wrap,
.grid-scroller {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.trend-chart {
  min-width: 720px;
  width: 100%;
  height: auto;
  display: block;
}

.chart-grid line {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-grid text,
.chart-point text {
  fill: var(--muted);
  stroke: none;
  font-size: 12px;
  font-weight: 800;
}

.chart-area {
  fill: color-mix(in srgb, var(--cyan) 18%, transparent);
  stroke: none;
}

.chart-line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point circle {
  fill: var(--panel);
  stroke: var(--blue);
  stroke-width: 4;
}

.chart-month {
  font-size: 12px;
  letter-spacing: 0;
}

.summary-table,
.habit-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.summary-table {
  min-width: 760px;
}

.summary-table th,
.summary-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.summary-table th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-table tbody tr:hover {
  background: var(--panel-soft);
}

.summary-table tbody tr.is-focus-month {
  background: color-mix(in srgb, var(--teal) 10%, var(--panel));
}

.inline-progress {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 76px;
  align-items: center;
  gap: 10px;
  max-width: 260px;
}

.mini-bar,
.progress-bar {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 72%, transparent);
}

.mini-bar {
  height: 10px;
}

.mini-bar span,
.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--green));
}

.small-button,
.primary-button,
.danger-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-raised);
  color: var(--text);
  font-weight: 900;
}

.small-button:hover,
.small-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible {
  border-color: var(--teal);
  box-shadow: var(--focus);
  outline: none;
}

.primary-button {
  border-color: var(--teal);
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #ffffff;
}

.danger-button {
  border-color: color-mix(in srgb, var(--danger) 44%, var(--line));
  color: var(--danger);
}

.danger-button:hover,
.danger-button:focus-visible {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent);
  outline: none;
}

.control-panel {
  padding: 14px;
}

.current-month-panel {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 10%, transparent), transparent 55%),
    var(--panel);
}

.account-layout {
  display: grid;
  gap: 14px;
}

.account-panel {
  display: grid;
  gap: 12px;
}

.account-form {
  display: grid;
  gap: 10px;
}

.account-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
}

.account-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--text);
  outline: none;
}

.account-form input:focus {
  border-color: var(--teal);
  box-shadow: var(--focus);
}

.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 34%, var(--line));
}

.habit-form {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(260px, 2fr) minmax(88px, 0.4fr) auto auto;
  gap: 12px;
  align-items: end;
}

.habit-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.habit-form input,
.habit-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-raised);
  color: var(--text);
  outline: none;
  letter-spacing: 0;
  text-transform: none;
}

.habit-form input:focus,
.habit-form select:focus {
  border-color: var(--teal);
  box-shadow: var(--focus);
}

.tracker-section {
  padding: 0;
  overflow: hidden;
}

.tracker-section .section-heading {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.grid-scroller {
  max-width: 100%;
}

.habit-table {
  min-width: 1060px;
  table-layout: fixed;
}

.daily-table {
  min-width: 1560px;
}

.habit-table th,
.habit-table td {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.habit-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 42px;
  padding: 8px 6px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.habit-table .habit-col {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 230px;
  min-width: 230px;
  padding: 10px 12px;
  text-align: left;
  box-shadow: 1px 0 0 var(--line);
}

.habit-table thead .habit-col,
.habit-table tfoot .habit-col {
  background: var(--panel-soft);
}

.slot-col,
.slot-cell,
.rate-cell {
  width: 46px;
  min-width: 46px;
  text-align: center;
}

.points-col {
  width: 76px;
  min-width: 76px;
  padding: 8px 6px;
  text-align: center;
}

.progress-col {
  width: 148px;
  min-width: 148px;
  padding: 8px 10px;
}

.action-col {
  width: 164px;
  min-width: 164px;
  padding: 8px 10px;
}

.habit-title {
  display: grid;
  gap: 2px;
}

.habit-title strong {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.25;
}

.habit-meta {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.points-pill {
  display: inline-grid;
  min-width: 42px;
  min-height: 28px;
  place-items: center;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--amber) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--amber) 12%, var(--panel));
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 950;
}

.slot-cell {
  padding: 7px 4px;
}

.slot-check {
  appearance: none;
  position: relative;
  width: 32px;
  height: 32px;
  margin: 0;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-raised);
  vertical-align: middle;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.slot-check:active {
  transform: scale(0.92);
}

/* Perluas area sentuh jadi ~44px (slot grid gap cukup longgar) */
.slot-check::before {
  content: "";
  position: absolute;
  inset: -7px;
}

.slot-check:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.slot-check:checked {
  border-color: var(--green);
  background: var(--green);
}

.slot-check.tone-blue:checked {
  border-color: var(--blue);
  background: var(--blue);
}

.slot-check.tone-amber:checked {
  border-color: var(--amber);
  background: var(--amber);
}

.slot-check.tone-rose:checked {
  border-color: var(--rose);
  background: var(--rose);
}

.slot-check:checked::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 5px;
  width: 8px;
  height: 15px;
  border: solid #ffffff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.slot-check:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.progress-stack {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px 8px;
}

.progress-stack .progress-bar {
  height: 9px;
}

.progress-stack strong {
  font-size: 0.82rem;
  white-space: nowrap;
}

.progress-stack small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.row-actions {
  display: grid;
  grid-template-columns: repeat(4, 34px);
  gap: 5px;
  justify-content: end;
}

.icon-action {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-raised);
  color: var(--muted);
}

.icon-action svg {
  width: 16px;
  height: 16px;
}

.icon-action:hover,
.icon-action:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  outline: none;
}

.icon-action.danger:hover,
.icon-action.danger:focus-visible {
  border-color: var(--danger);
  color: var(--danger);
}

.rate-row th,
.rate-row td {
  background: color-mix(in srgb, var(--teal) 8%, var(--panel));
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.rate-cell {
  padding: 7px 2px;
}

.habit-table tfoot .rate-row th,
.habit-table tfoot .rate-row td {
  border-bottom: 0;
}

.is-paused th,
.is-paused td {
  opacity: 0.68;
}

.empty-row {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.leaderboard.top {
  border-top: 5px solid var(--green);
}

.leaderboard.bottom {
  border-top: 5px solid var(--rose);
}

.leader-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leader-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.rank {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--teal);
  font-weight: 900;
}

.leader-list strong,
.leader-list span {
  display: block;
}

.leader-list strong {
  overflow-wrap: anywhere;
}

.leader-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.leader-list em {
  font-style: normal;
  font-weight: 900;
}

.leader-empty {
  display: grid;
  gap: 3px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

.leader-empty strong {
  color: var(--text);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: none;
  background: rgba(15, 23, 42, 0.42);
}

.overlay.show {
  display: block;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 900;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .dashboard-sheet {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .cat-card {
    grid-column: 1 / -1;
    min-height: 190px;
  }

  .cat-card p {
    max-width: 420px;
  }

  .dashboard-band,
  .category-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .habit-form {
    grid-template-columns: minmax(160px, 1fr) minmax(240px, 2fr) minmax(88px, 0.6fr);
  }

  .habit-form .primary-button,
  .habit-form .danger-button {
    width: 100%;
  }
}

@media (max-width: 920px) {
  .topbar .auth-card {
    max-width: 230px;
  }

  .topbar .auth-kicker {
    display: none;
  }

  .sidebar {
    width: min(292px, 86vw);
    transform: translateX(-102%);
    transition: transform 220ms ease;
  }

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

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

  .mobile-only {
    display: grid;
  }

  .content {
    padding: 18px 16px calc(36px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  .dashboard-sheet {
    grid-template-columns: 1fr;
  }

  .sheet-sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .sheet-tile {
    min-height: 94px;
  }
}

@media (max-width: 720px) {
  body {
    background:
      linear-gradient(140deg, color-mix(in srgb, var(--teal) 9%, transparent), transparent 220px),
      linear-gradient(230deg, color-mix(in srgb, var(--rose) 7%, transparent), transparent 300px),
      var(--bg);
  }

  .topbar {
    min-height: 68px;
    padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 10px calc(12px + env(safe-area-inset-left));
    gap: 8px;
    width: 100%;
    max-width: 100vw;
  }

  .title-group p {
    display: none;
  }

  .title-group h2 {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .topbar .auth-card {
    max-width: 148px;
    min-height: 38px;
    padding: 6px 7px;
    gap: 6px;
  }

  .topbar .auth-identity p {
    display: none;
  }

  .topbar .auth-button {
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .topbar .auth-button::before {
    content: "X";
    color: var(--text);
    font-size: 0.78rem;
  }

  .analytics-grid,
  .category-board {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .dashboard-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .panel {
    padding: 14px;
  }

  .metric-card {
    min-height: 82px;
    gap: 4px;
    padding: 10px 11px;
  }

  .metric-card span {
    font-size: 0.62rem;
    line-height: 1.15;
    letter-spacing: 0.04em;
  }

  .metric-card strong {
    font-size: 1.25rem;
  }

  .metric-card p {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .dashboard-layout,
  .month-layout {
    gap: 12px;
  }

  .dashboard-sheet,
  .panel,
  .metric-card,
  .category-card {
    box-shadow: 0 8px 20px rgba(35, 52, 78, 0.07);
  }

  .tracker-section .section-heading {
    padding: 14px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .section-chip {
    width: max-content;
  }

  .section-head-actions {
    justify-content: flex-start;
    gap: 6px;
  }

  .mobile-section-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding-inline: 12px;
  }

  .mobile-focus-chip {
    background: color-mix(in srgb, var(--teal) 12%, var(--panel));
    color: var(--teal);
  }

  .tracker-section.mobile-collapsed {
    padding-bottom: 0;
  }

  .tracker-section.mobile-collapsed .grid-scroller {
    display: none;
  }

  .tracker-section.mobile-collapsed .section-heading {
    border-bottom: 0;
  }

  .habit-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .habit-form input,
  .habit-form select,
  .primary-button,
  .danger-button,
  .small-button {
    min-height: 44px;
  }

  .sheet-sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .sheet-tile {
    min-height: 72px;
    padding: 9px 6px;
  }

  .sheet-tile span {
    font-size: 0.62rem;
  }

  .sheet-tile strong {
    font-size: 1rem;
  }

  .sheet-stage {
    padding: 12px;
  }

  .sheet-stage-head {
    flex-direction: column;
  }

  .sheet-stage-head .small-button {
    width: 100%;
  }

  .habit-table {
    font-size: 0.82rem;
  }

  .point-calendar {
    gap: 4px;
  }

  .point-weekday {
    min-height: 22px;
    font-size: 0.58rem;
  }

  .point-day,
  .point-day.is-empty {
    min-height: 50px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
  }

  .point-day span {
    position: absolute;
    top: 3px;
    left: 4px;
    width: auto;
    height: auto;
    background: transparent;
    color: var(--muted);
    font-size: 0.56rem;
    line-height: 1;
  }

  .point-day strong {
    margin-top: 7px;
    font-size: 0.88rem;
  }

  .point-day small {
    display: none;
  }

  .point-day.is-empty {
    border-color: transparent;
    background: transparent;
  }

  .point-day em {
    padding: 1px 5px;
    font-size: 0.62rem;
  }

  .habit-table thead th {
    height: 36px;
    padding: 6px 4px;
    font-size: 0.68rem;
  }

  .habit-table .habit-col {
    width: 148px;
    min-width: 148px;
    padding: 8px 9px;
  }

  .slot-col,
  .slot-cell,
  .rate-cell {
    width: 44px;
    min-width: 44px;
  }

  .points-col {
    width: 56px;
    min-width: 56px;
    padding: 6px 4px;
  }

  .points-pill {
    min-width: 36px;
    min-height: 26px;
    padding: 0 6px;
    font-size: 0.72rem;
  }

  .slot-check {
    width: 34px;
    height: 34px;
  }

  .progress-col {
    width: 96px;
    min-width: 96px;
    padding: 6px 7px;
  }

  .action-col {
    width: 132px;
    min-width: 132px;
    padding: 6px 7px;
  }

  .row-actions {
    grid-template-columns: repeat(4, 30px);
    gap: 4px;
  }

  .icon-action {
    width: 30px;
    height: 30px;
  }

  .habit-title strong {
    font-size: 0.82rem;
  }

  .habit-meta {
    font-size: 0.66rem;
  }

  .rate-row th,
  .rate-row td {
    font-size: 0.66rem;
  }

  .daily-table.mobile-focus {
    min-width: 100%;
  }

  .daily-table.mobile-focus .slot-col:not(.is-focus-slot),
  .daily-table.mobile-focus .slot-cell:not(.is-focus-slot),
  .daily-table.mobile-focus .rate-cell:not(.is-focus-slot) {
    display: none;
  }

  .daily-table.mobile-focus .action-col {
    display: none;
  }

  .daily-table.mobile-focus .progress-col {
    width: 84px;
    min-width: 84px;
  }

  .daily-table.mobile-focus .progress-stack {
    gap: 4px;
  }

  .daily-table.mobile-focus .progress-stack small {
    display: none;
  }

  .daily-table.mobile-full {
    min-width: 1320px;
  }

  .habit-table:not(.daily-table) {
    min-width: 640px;
  }

  .month-board {
    overflow: visible;
  }

  .month-tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .month-score-card {
    min-height: 78px;
    padding: 9px;
  }

  .month-score-card span,
  .month-score-card em {
    font-size: 0.63rem;
  }

  .month-score-card strong {
    font-size: 1rem;
  }

  .summary-table {
    min-width: 0;
    display: block;
  }

  .summary-table thead {
    display: none;
  }

  .summary-table tbody {
    display: grid;
    gap: 10px;
  }

  .summary-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px 76px 38px;
    gap: 7px 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
  }

  .summary-table tbody tr.is-focus-month {
    border-color: color-mix(in srgb, var(--teal) 34%, var(--line));
    background: color-mix(in srgb, var(--teal) 8%, var(--panel));
  }

  .summary-table td {
    display: grid;
    gap: 1px;
    padding: 0;
    border-bottom: 0;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
  }

  .summary-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 950;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .summary-table td:nth-child(1) {
    grid-column: 1 / 4;
    grid-row: 1;
  }

  .summary-table td:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .summary-table td:nth-child(2),
  .summary-table td:nth-child(4),
  .summary-table td:nth-child(5) {
    grid-row: 3;
  }

  .summary-table td:nth-child(1)::before,
  .summary-table td:nth-child(6)::before {
    display: none;
  }

  .summary-table td:nth-child(1) strong {
    font-size: 0.92rem;
  }

  .summary-table td:nth-child(6) {
    grid-column: 4;
    grid-row: 1;
  }

  .summary-table .small-button {
    width: 44px;
    min-height: 44px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .summary-table .small-button::before {
    content: ">";
    color: var(--text);
    font-size: 0.9rem;
  }

  .inline-progress {
    grid-template-columns: minmax(0, 1fr) 54px;
    gap: 5px;
    max-width: none;
  }

  .inline-progress strong {
    font-size: 0.72rem;
  }

  .mini-bar {
    height: 7px;
  }

  .chart-scroll,
  .table-wrap,
  .grid-scroller {
    max-width: 100%;
  }

  .leader-list li {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .leader-list em {
    grid-column: 2;
  }

  .cat-card {
    min-height: 230px;
  }

  .cat-badge {
    width: 126px;
    height: 142px;
  }

  .toast {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
  }
}

/* --- Grup navigasi sidebar (struktur menu 2026-09-10) --- */
.nav-group {
  margin-top: 6px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  margin: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--sidebar-text, #f4ecdf);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-align: left;
}

.nav-group-toggle:hover {
  background: var(--sidebar-soft, rgba(255, 255, 255, 0.07));
}

.nav-group-toggle .nav-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.nav-group-name {
  flex: 1 1 auto;
}

.nav-chevron {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--sidebar-text, #f4ecdf) 55%, transparent);
  transition: transform 0.28s ease;
}

.nav-chevron svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-group.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-group-items {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.nav-group.open .nav-group-items {
  grid-template-rows: 1fr;
}

.nav-group-items-inner {
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
  transition: visibility 0s linear 0.28s;
}

.nav-group.open .nav-group-items-inner {
  visibility: visible;
  transition-delay: 0s;
}

.nav-item.sub {
  min-height: 44px;
  padding-left: 40px;
  font-size: 13.5px;
}


/* --- Halaman placeholder menu baru --- */
.placeholder-panel {
  display: grid;
  place-items: center;
  min-height: 320px;
}

.placeholder-stage {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 40px 24px;
}

.placeholder-emoji {
  font-size: 44px;
  line-height: 1;
}

.placeholder-title {
  margin: 6px 0 0;
  font-size: 20px;
}

.placeholder-hint {
  margin: 0;
  max-width: 380px;
  color: var(--muted, #8a8f98);
  font-size: 14px;
}

.placeholder-chip {
  margin-top: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-strong, #c94f3d);
  background: rgba(232, 93, 79, 0.12);
  border: 1px solid rgba(232, 93, 79, 0.25);
}

/* ============ MODUL TASK ============ */
.task-page {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 90px;
}

.task-date {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 4px 0;
}

.task-card {
  background: var(--panel-raised, var(--panel));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.task-progress-card {
  padding: 14px 16px;
}

.task-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14.5px;
}

.task-pct {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--teal);
}

.task-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  overflow: hidden;
}

.task-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  transition: width 0.35s ease;
}

.task-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.task-pills::-webkit-scrollbar { display: none; }

.task-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.task-pill span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--panel-soft);
  border-radius: 999px;
  padding: 1px 7px;
}

.task-pill.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.task-pill.active span {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.task-section {
  padding: 14px 14px 10px;
}

.task-section h3 {
  margin: 2px 4px 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.task-list {
  display: flex;
  flex-direction: column;
}

.task-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.task-row + .task-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 44px;
  right: 12px;
  height: 1px;
  background: var(--line);
}

.task-row:hover { background: var(--panel-soft); }

.task-prio {
  width: 4px;
  height: 30px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--line-strong);
}

.task-prio.p-high { background: var(--danger); }
.task-prio.p-med { background: var(--amber); }
.task-prio.p-low { background: var(--green); }

.task-check {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.15s ease;
}

.task-check::after {
  content: "✓";
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  transform: scale(0);
  transition: transform 0.12s ease;
}

/* Perluas area sentuh jadi 44x44 tanpa mengubah ukuran visual */
.task-check::before {
  content: "";
  position: absolute;
  inset: -11px;
  z-index: 1;
}

.task-check:checked {
  background: var(--teal);
  border-color: var(--teal);
}

.task-check:checked::after { transform: scale(1); }

.task-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
}

.task-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.task-chip {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 600;
}

.task-chip.tag { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); }
.task-time { font-variant-numeric: tabular-nums; }

/* ---- Detail Task ---- */
.task-detail-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 2px 14px;
  font-size: 15px;
  font-weight: 800;
}

.task-back {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 14px;
  font-size: 18px;
  cursor: pointer;
}

.task-detail-head { padding: 18px; }

.task-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.task-chip.prio,
.task-chip.status {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.task-chip.prio.high { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--panel)); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.task-chip.prio.med { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, var(--panel)); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.task-chip.prio.low { color: var(--green); background: color-mix(in srgb, var(--green) 12%, var(--panel)); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.task-chip.status.prog { color: var(--green); background: color-mix(in srgb, var(--green) 12%, var(--panel)); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.task-chip.status.done { color: var(--muted); background: var(--panel-soft); border-color: var(--line); }

.task-detail-title {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--text);
}

.task-detail-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.task-detail-info { margin-top: 12px; padding: 6px 18px; }

.task-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.task-info-grid + .task-info-grid { border-top: 1px solid var(--line); }

.task-info-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
}

.task-info-cell + .task-info-cell {
  border-left: 1px solid var(--line);
  padding-left: 16px;
  margin-left: 16px;
}

.task-info-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}

.task-info-value {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}

.ghost-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 16px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.ghost-button:hover { border-color: var(--muted); }

.task-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.task-detail-actions .primary-button { width: 100%; }

.ghost-button.danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 25%, var(--line));
}

.ghost-button.danger:hover {
  background: color-mix(in srgb, var(--danger) 8%, var(--panel));
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
}

.task-row.done { opacity: 0.6; }
.task-row.done .task-name { text-decoration: line-through; color: var(--muted); }

.task-del {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  border-radius: 12px;
  display: none;
  place-content: center;
  margin: -5px -5px -5px 0; /* kompensasi agar baris tidak melebar */
}

.task-row:hover .task-del,
.task-row:focus-within .task-del { display: grid; }

.task-empty {
  padding: 14px 6px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}

/* ---- Detail Task: bagian tambahan ---- */
.task-detail-sec { margin-top: 12px; padding: 16px 18px; }
.task-detail-sec h3 { margin: 0 0 10px; font-size: 13px; font-weight: 900; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.task-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.task-sec-meta { font-size: 12.5px; font-weight: 700; color: var(--muted); }

.task-bar.slim { height: 6px; margin: 2px 0 12px; }

.task-sub-list { display: flex; flex-direction: column; }
.task-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.task-sub + .task-sub { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.task-sub input.task-check { position: relative; }
.task-sub.done span { text-decoration: line-through; color: var(--muted); }

.task-attach-list { display: flex; flex-wrap: wrap; gap: 8px; }
.task-chip.att { font-size: 12.5px; font-weight: 700; padding: 7px 12px; }

.task-activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.task-activity li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  font-size: 13.5px;
  color: var(--text);
}
.task-activity li + li { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.task-activity time { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--muted); }

.task-menu { position: relative; margin-left: auto; }
.task-menu-btn { font-size: 18px; font-weight: 900; letter-spacing: 1px; }
.task-menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 148px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.task-menu-pop[hidden] { display: none; }
.task-menu-pop button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
}
.task-menu-pop button:hover { background: var(--panel-soft); }
.task-menu-pop button.danger { color: var(--danger); }

.task-actual-live { font-variant-numeric: tabular-nums; }
.task-focus-live { margin: -2px 0 0; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); }

.task-edit-form { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; padding: 18px; }
.task-edit-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.task-edit-form input,
.task-edit-form select,
.task-edit-form textarea {
  font: inherit;
  color: var(--text);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font-weight: 600;
  min-height: 44px;
}
.task-edit-form textarea { min-height: 76px; resize: vertical; }
.task-edit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---- Halaman Tambah Task ---- */
.task-add-form { display: flex; flex-direction: column; gap: 14px; }
.task-add-title-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.task-add-title-card input {
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  min-height: 34px;
}
.task-add-title-card input::placeholder { color: var(--muted); font-weight: 600; }
.task-add-hint {
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 10px 12px;
  font-size: 13.5px;
  color: color-mix(in srgb, var(--text) 55%, var(--muted));
}
.task-add-rows { padding: 2px 16px; }
.task-add-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  font: inherit;
}
.task-add-row + .task-add-row { border-top: 1px solid color-mix(in srgb, var(--line) 85%, transparent); }
.task-add-row:has(+ datalist) { border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent); }
.task-add-more { border-top: 1px solid color-mix(in srgb, var(--line) 85%, transparent); }
.datalist-host { display: none; }
.task-add-ico { flex: 0 0 24px; display: inline-flex; color: var(--muted); }
.task-add-ico.prio { color: var(--danger); }
.task-add-label { flex: 0 0 auto; font-size: 14px; font-weight: 600; color: var(--text); }
.task-add-value { flex: 1 1 auto; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.task-add-value input,
.task-add-value select {
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  min-height: 44px;
  cursor: pointer;
}
.task-add-value input[type="text"] { text-overflow: ellipsis; cursor: text; }
.task-add-value input[type="date"],
.task-add-value input[type="time"] { color-scheme: light; }
:root[data-theme="dark"] .task-add-value input[type="date"],
:root[data-theme="dark"] .task-add-value input[type="time"] { color-scheme: dark; }
.task-add-value input[type="date"]::-webkit-calendar-picker-indicator,
.task-add-value input[type="time"]::-webkit-calendar-picker-indicator { opacity: 0; width: 0; margin: 0; }
.task-add-value select { text-align: right; text-align-last: right; -webkit-appearance: none; appearance: none; padding-right: 2px; }
.task-add-native-wrap { position: relative; display: inline-flex; align-items: center; }
.task-add-native-wrap input { position: absolute; inset: 0; opacity: 0; width: 100%; min-width: 84px; cursor: pointer; }
.task-add-read { font-size: 14px; font-weight: 700; color: var(--text); }
.task-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; display: inline-block; align-self: center; }
.task-dot.dot-red { background: var(--danger); }
.task-dot.dot-ring { background: transparent; border: 2px solid var(--amber); }
.task-add-value textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  padding: 10px 12px;
  width: 100%;
  resize: vertical;
}
.task-add-row textarea { flex: 1 1 100%; }
.task-add-chev { flex: 0 0 auto; color: var(--muted); font-size: 18px; line-height: 1; transition: transform 0.15s ease; }
.task-add-chev.open { transform: rotate(180deg); }
.task-add-more .task-add-chev { font-size: 16px; transform: translateY(-1px); }
.task-add-more .task-add-chev.open { transform: translateY(-1px) rotate(180deg); }
.task-add-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.task-add-actions .primary-button,
.task-add-actions .secondary-button { width: 100%; min-height: 52px; border-radius: 16px; font-size: 15px; }
.task-add-actions .primary-button {
  border: 0;
  background: linear-gradient(135deg, #6a564a, #57443a);
  color: #f7f1e6;
  box-shadow: 0 10px 24px -12px color-mix(in srgb, #57443a 70%, transparent);
}
.task-add-actions .primary-button:hover { filter: brightness(1.06); }
.secondary-button {
  border: 0;
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.secondary-button:hover { border-color: var(--muted); background: var(--line); }
/* baris Opsi Lainnya: kontrol menyatu dengan row */
.task-add-row > input,
.task-add-row > select,
.task-add-row > textarea {
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  min-height: 46px;
  margin-left: auto;
  text-align: right;
  max-width: 65%;
  cursor: pointer;
}
.task-add-row > textarea { text-align: left; max-width: 100%; resize: vertical; min-height: 58px; font-weight: 500; }
.task-add-row > select { -webkit-appearance: none; appearance: none; }
.task-add-desk { flex-wrap: wrap; }
.task-add-desk textarea { flex: 1 1 100%; margin-top: 4px; resize: none; }
.task-add-opt-sep { height: 1px; background: var(--line); margin: 2px -16px; }
.task-add-block { padding: 4px 2px 6px; }
.task-add-block-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 0.2px; margin: 6px 0 4px; }
.task-add-block-head em { font-style: normal; font-weight: 700; color: var(--muted); }
.task-add-block-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--panel-soft); font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.task-add-block-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-add-inline { display: flex; gap: 8px; align-items: center; }
.task-add-inline input { flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 13.5px; color: var(--text); outline: none; }
.task-add-inline input:focus { border-color: var(--muted); }
.task-add-mini { flex: 0 0 auto; min-height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--brown, #57443a) 12%, var(--panel)); color: var(--text); font-weight: 800; font-size: 13px; cursor: pointer; }
.task-add-mini:hover { background: color-mix(in srgb, var(--brown, #57443a) 20%, var(--panel)); }
.task-add-x { flex: 0 0 auto; width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.task-add-x:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.task-add-att-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.task-add-att-chips .task-chip.att { display: inline-flex; align-items: center; gap: 4px; }

/* Kartu timer fokus pada Detail Task */
.task-focus-timer-card { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.task-focus-timer { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--panel-soft); border: 1px solid var(--line); }
.task-focus-timer strong { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 20px; letter-spacing: 0.5px; color: var(--text); }
.task-focus-state { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.task-focus-dotpulse { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: focusPulse 1.4s ease-in-out infinite; }
.task-focus-timer.paused .task-focus-dotpulse { background: var(--muted); animation: none; }
.task-focus-timer.paused strong { opacity: 0.6; }
@keyframes focusPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }
.task-focus-btns { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.task-focus-btns .primary-button, .task-focus-btns .secondary-button { width: 100%; border-radius: 18px; }
.task-focus-btns .secondary-button { border: 1.5px solid color-mix(in srgb, var(--muted) 35%, var(--line)); }
.task-actual-live { font-variant-numeric: tabular-nums; }
.task-add-row .task-add-value input[type="date"]::-webkit-calendar-picker-indicator,
.task-add-row .task-add-value input[type="time"]::-webkit-calendar-picker-indicator { opacity: 0; width: 0; margin: 0; }
.task-add-row .task-add-value input::placeholder { color: var(--muted); font-weight: 600; }
.task-add-row select option { text-align: left; }

.task-composer {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--panel-raised, var(--panel));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.task-composer input {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.task-composer input:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--teal); }

.task-composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.task-fab {
  position: fixed;
  right: 22px;
  bottom: 26px;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #fff;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-lift);
  display: grid;
  place-content: center;
  z-index: 40;
  transition: transform 0.15s ease;
}

.task-fab:active { transform: scale(0.92); }

.task-search {
  flex: 1 1 auto;
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  margin: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
}

.task-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.task-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
}

@media (max-width: 900px) {
  .task-search { display: none; }
  .task-del { display: grid; }
  .task-fab { right: 16px; bottom: 20px; }
}

@media (min-width: 901px) {
  .task-composer { grid-template-columns: 2fr 1fr 1.4fr auto; align-items: center; }
  .task-composer-actions { grid-column: 1 / -1; }
}

/* ===== Modul Jadwal ===== */
.jadwal-page { position: relative; padding-bottom: 90px; }
.jadwal-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.jadwal-seg-btn {
  min-height: 44px;
  border: 0;
  background: transparent;
  border-radius: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.jadwal-seg-btn:not(.active) { color: color-mix(in srgb, var(--muted) 78%, var(--text)); }
.jadwal-seg-btn.active { background: #7d685c; color: #f7f1e8; box-shadow: 0 6px 14px rgba(109, 86, 72, 0.28); }
:root[data-theme="dark"] .jadwal-seg-btn.active { background: #8a7263; color: #fff9f2; }
.jadwal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 14px 12px;
}
.jadwal-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
}
.jadwal-month-label { font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; }
.jadwal-month-nav { display: flex; gap: 6px; }
.jadwal-navbtn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.jadwal-navbtn:active { transform: scale(0.93); }
.jadwal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding-bottom: 2px;
}
.jadwal-week span {
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 6px 0;
}
.jadwal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.jadwal-cell {
  position: relative;
  min-height: 46px;
  border: 0;
  background: transparent;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.jadwal-cell.empty { cursor: default; }
.jadwal-cell > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.jadwal-cell.sel { background: transparent; color: var(--text); font-weight: 600; }
.jadwal-cell.sel > span:first-child { background: #7d685c; color: #fff9f2; font-weight: 800; }
:root[data-theme="dark"] .jadwal-cell.sel > span:first-child { background: #8a7263; }
.jadwal-cell.today:not(.sel) > span:first-child { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #7d685c 55%, transparent); }
.jadwal-mdots { display: flex; gap: 3px; justify-content: center; min-height: 5px; }
.jadwal-mdot { width: 5px; height: 5px; border-radius: 50%; }
.jadwal-mdot.ring { background: transparent; border: 1.5px solid var(--jc, #a9885f); width: 4px; height: 4px; }
.jadwal-cell.sel .jadwal-mdots { opacity: 0; }
.jadwal-day-title { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; padding: 16px 4px 10px; }
.jadwal-list { padding: 6px 10px; }
.jadwal-group {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 12px 6px 6px;
}
.jadwal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 6px;
  cursor: default;
}
.jadwal-row + .jadwal-row { border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent); }
.jadwal-time { font-size: 13px; font-weight: 800; color: var(--muted); min-width: 42px; font-variant-numeric: tabular-nums; }
.jadwal-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.jadwal-dot.ring { background: transparent !important; border: 2px solid var(--jc, #a9885f); }
.jadwal-info { flex: 1; min-width: 0; display: block; }
.jadwal-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jadwal-row.done .jadwal-title { text-decoration: line-through; color: var(--muted); }
.jadwal-sub { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jadwal-chev { color: var(--muted); font-size: 17px; flex: none; }
.jadwal-add-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}
.jadwal-add-card > input {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 0 14px;
  margin-bottom: 10px;
}
.jadwal-add-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14.5px;
  font-weight: 800;
  padding: 0 2px 10px;
}
.jadwal-add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.jadwal-add-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.jadwal-add-grid input, .jadwal-add-grid select {
  min-height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 12px;
}
:root[data-theme="dark"] .jadwal-add-grid input[type="date"], :root[data-theme="dark"] .jadwal-add-grid input[type="time"] { color-scheme: dark; }
.jadwal-add-save { width: 100%; }

/* ===== Modul Goals ===== */
.goals-page { display: flex; flex-direction: column; gap: 12px; }
.goal-summary {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 14px 16px 12px;
}
.goal-summary-label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); }
.goal-summary-pct { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); margin-top: 2px; }
.goal-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 16%, transparent);
  overflow: hidden;
  margin-top: 8px;
}
.goal-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3f9d63, #58b57a); transition: width 0.35s ease; }
.goal-bar.big { height: 10px; }
.goal-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.goal-chip {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.goal-chip.on { background: #7d685c; border-color: #7d685c; color: #fff9f2; }
:root[data-theme="dark"] .goal-chip.on { background: #8a7263; border-color: #8a7263; }
.goal-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 14px;
  cursor: pointer;
  transition: transform 0.14s;
}
.goal-card:active { transform: scale(0.985); }
.goal-ico {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 19px;
  flex: none;
  background: color-mix(in srgb, var(--gc, #7d685c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--gc, #7d685c) 28%, transparent);
}
.goal-ico.big { width: 48px; height: 48px; font-size: 22px; border-radius: 16px; }
.goal-card-main { flex: 1; min-width: 0; }
.goal-card-title { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-card-meta { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.goal-card-sub { display: block; font-size: 11.5px; font-weight: 700; color: var(--text); margin-top: 6px; }
.goal-chev { color: var(--muted); font-size: 17px; flex: none; }
.goal-add-btn {
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #6a564a, #57443a);
  color: #f7f1e8;
  font: inherit;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(87, 68, 58, 0.28);
}
:root[data-theme="dark"] .goal-add-btn { background: linear-gradient(135deg, #8a7263, #6f5a4d); color: #fff9f2; }
.goal-cal-link {
  min-height: 48px;
  border: 1.5px solid var(--line);
  background: transparent;
  border-radius: 16px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.goal-back-btn {
  align-self: flex-start;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 2px;
}
.goal-detail-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.goal-detail-head { display: flex; align-items: center; gap: 12px; }
.goal-detail-titlewrap { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.goal-detail-title { font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-chip-status { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; border-radius: 999px; padding: 4px 10px; }
.goal-chip-status.act { color: #2e7d4f; background: color-mix(in srgb, #3f9d63 16%, transparent); }
:root[data-theme="dark"] .goal-chip-status.act { color: #6fd494; background: color-mix(in srgb, #3f9d63 22%, transparent); }
.goal-chip-status.fin { color: #2c6e63; background: color-mix(in srgb, #0f766e 14%, transparent); }
:root[data-theme="dark"] .goal-chip-status.fin { color: #2dd4bf; background: color-mix(in srgb, #0f766e 24%, transparent); }
.goal-detail-meta { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 10px 0 2px; }
.goal-detail-meta strong { color: var(--text); font-weight: 800; }
.goal-detail-sub { font-size: 12px; font-weight: 700; color: var(--text); margin-top: 6px; }
.goal-detail-sec { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-top: 16px; }
.goal-detail-desc { font-size: 13.5px; font-weight: 600; line-height: 1.55; color: var(--text); margin: 6px 0 0; }
.goal-proj-chip {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #5b4b8a;
  background: color-mix(in srgb, #8b5cf6 14%, transparent);
  border: 1px solid color-mix(in srgb, #8b5cf6 28%, transparent);
  border-radius: 999px;
  padding: 6px 12px;
}
:root[data-theme="dark"] .goal-proj-chip { color: #c4b5fd; background: color-mix(in srgb, #8b5cf6 20%, transparent); }
.goal-ms-list { display: flex; flex-direction: column; margin-top: 6px; }
.goal-ms { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; }
.goal-ms + .goal-ms { border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent); }
.goal-ms-text { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--text); }
.goal-ms.done .goal-ms-text { text-decoration: line-through; color: var(--muted); }
.goal-ms-date { flex: none; font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.goal-ms-add {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #6a564a, #57443a);
  color: #f7f1e8;
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
:root[data-theme="dark"] .goal-ms-add { background: linear-gradient(135deg, #8a7263, #6f5a4d); color: #fff9f2; }
.goal-add-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.goal-field > span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.goal-field input, .goal-field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 14px;
}
.goal-field textarea { resize: vertical; min-height: 76px; }
:root[data-theme="dark"] .goal-field input[type="date"] { color-scheme: dark; }
.goal-cat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.goal-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 1.5px solid var(--line);
  background: var(--panel-soft);
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.goal-cat-chip.on { border-color: #7d685c; background: color-mix(in srgb, #7d685c 12%, transparent); }
:root[data-theme="dark"] .goal-cat-chip.on { border-color: #8a7263; background: color-mix(in srgb, #8a7263 18%, transparent); }
.goal-cat-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.goal-save { width: 100%; min-height: 52px; border: 0; border-radius: 18px; background: linear-gradient(135deg, #6a564a, #57443a); color: #f7f1e8; font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer; }
:root[data-theme="dark"] .goal-save { background: linear-gradient(135deg, #8a7263, #6f5a4d); color: #fff9f2; }
.goal-save2 { width: 100%; min-height: 48px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }

/* ===== Modul Progress ===== */
.prog-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.prog-ring-wrap { position: relative; flex: none; width: 130px; height: 130px; }
.prog-ring-wrap svg { display: block; width: 130px; height: 130px; }
.prog-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.prog-ring-center b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.prog-ring-center span { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.prog-hero-stats { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.prog-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.prog-stat-num { font-size: 16px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.prog-stat-lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.prog-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.prog-kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.prog-kpi span { font-size: 16px; }
.prog-kpi b { font-size: 14px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.prog-kpi em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); }
.prog-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.prog-card-head h3 { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); margin: 0; }
.prog-card-sub { font-size: 11px; font-weight: 600; color: var(--muted); }
.prog-bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; }
.prog-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.prog-bar-num { font-size: 10.5px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 13px; }
.prog-bar-stick { flex: 1; width: 100%; max-width: 30px; display: flex; align-items: flex-end; background: color-mix(in srgb, var(--muted) 8%, transparent); border-radius: 8px; overflow: hidden; }
.prog-bar-stick i { display: block; width: 100%; border-radius: 8px 8px 0 0; transition: height 0.4s ease; }
.prog-bar-lbl { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.prog-donut-row { display: flex; align-items: center; gap: 16px; }
.prog-donut { flex: none; width: 120px; height: 120px; }
.prog-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.prog-legend-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); }
.prog-legend-row b { font-weight: 700; }
.prog-two { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.prog-mini {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: var(--panel-soft);
}
.prog-mini b { font-size: 15px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.prog-mini span { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.prog-habit-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.prog-habit-row b { flex: none; width: 74px; font-size: 12.5px; font-weight: 700; color: var(--text); }
.prog-habit-row .goal-bar { flex: 1; margin: 0; }
.prog-habit-row em { flex: none; font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ===== Modul Project ===== */
.proj-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.proj-stat { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.proj-stat b { font-size: 21px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.proj-stat span { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.proj-stat.ok b { color: var(--green); }
.proj-stat.warn b { color: var(--orange); }

.proj-tabs { grid-template-columns: repeat(4, 1fr); margin: 14px 0; }
.proj-tab-btn { font-size: 13px; }

.proj-search { width: 100%; margin-bottom: 12px; }

.proj-list { display: flex; flex-direction: column; gap: 12px; }
.proj-card { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 15px 16px; cursor: pointer; font: inherit; color: var(--text); }
.proj-card:active { transform: scale(0.99); }
.proj-ico { flex: none; width: 42px; height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; background: color-mix(in srgb, var(--pc, #6a564a) 14%, var(--panel-soft)); border: 1px solid color-mix(in srgb, var(--pc, #6a564a) 25%, transparent); }
.proj-ico.lg { width: 46px; height: 46px; font-size: 22px; }
.proj-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.proj-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.proj-card-title { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-card-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.proj-card-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); }

.proj-status { flex: none; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 30%, transparent); border-radius: 999px; padding: 3px 9px; }

.proj-dl { white-space: nowrap; }
.proj-dl.soon { color: var(--orange); }
.proj-dl.late { color: var(--danger); }
.proj-dl.done { color: var(--green); }
.proj-dl.none { color: var(--muted); }

.proj-empty { text-align: center; padding: 36px 16px; background: var(--panel); border: 1px dashed var(--line); border-radius: 22px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.proj-empty span { font-size: 38px; }
.proj-empty b { font-size: 15px; font-weight: 800; color: var(--text); }
.proj-empty p { font-size: 12.5px; color: var(--muted); margin: 0; }

.goal-save.ghost { background: transparent; color: #6a564a; border: 1.5px dashed rgba(106,86,74,0.45); box-shadow: none; }
:root[data-theme="dark"] .goal-save.ghost { color: #d8c4b2; border-color: rgba(216,196,178,0.4); }

.proj-detail-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.proj-detail-title b { font-size: 16px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-detail-title span { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.proj-menu-btn { font-size: 18px; letter-spacing: 1px; }
.proj-menu { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; margin-bottom: 12px; display: flex; flex-direction: column; }
.proj-menu button { border: 0; background: transparent; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text); text-align: left; padding: 11px 12px; border-radius: 11px; cursor: pointer; min-height: 44px; }
.proj-menu button:hover { background: var(--panel-soft); }
.proj-menu button.danger { color: var(--danger); }

.proj-meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.goal-bar.big { height: 12px; margin-top: 4px; }
.proj-hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.proj-hint.center { text-align: center; }

.proj-act { display: flex; flex-direction: column; }
.proj-act-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; color: var(--text); }
.proj-act-row:last-child { border-bottom: 0; }
.proj-act-row em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }

.proj-task { display: flex; align-items: flex-start; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.proj-task:last-child { border-bottom: 0; }
.proj-task input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--teal); flex: none; }
.proj-task-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.proj-task-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.proj-task.done .proj-task-title { text-decoration: line-through; color: var(--muted); }
.proj-task-meta { font-size: 11px; font-weight: 700; color: var(--muted); }

.proj-inline { display: flex; gap: 8px; margin-top: 10px; }
.proj-inline.col { flex-direction: column; }
.proj-inline input, .proj-inline textarea { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel-soft); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; padding: 11px 13px; }
.proj-inline-go { flex: none; border: 0; border-radius: 14px; background: linear-gradient(135deg, #6a564a, #57443a); color: #f7f1e8; font: inherit; font-size: 13px; font-weight: 800; padding: 0 18px; min-height: 46px; cursor: pointer; }
:root[data-theme="dark"] .proj-inline-go { background: linear-gradient(135deg, #8a7263, #6f5a4d); color: #fff9f2; }

.proj-note { display: flex; align-items: flex-start; gap: 8px; }
.proj-note .goal-detail-card.note { flex: 1; min-width: 0; margin-bottom: 10px; }
.proj-detail-note-text { white-space: pre-wrap; }
.proj-note p { margin: 0 0 6px; font-size: 13px; color: var(--text); white-space: pre-wrap; line-height: 1.55; }
.proj-note em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.proj-del { flex: none; border: 0; background: transparent; color: var(--muted); font-size: 18px; font-weight: 800; cursor: pointer; width: 36px; height: 36px; border-radius: 10px; }
.proj-del:hover { color: var(--danger); background: var(--panel-soft); }

.proj-file { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.proj-file:last-child { border-bottom: 0; }
.proj-file-ico { flex: none; }
.proj-file a { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--amber, #b07a2a); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-file a:hover { text-decoration: underline; }

.proj-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.proj-form-grid .goal-field { margin-bottom: 0; }
.goal-field + .goal-field, .goal-field + .proj-form-grid, .proj-form-grid + .goal-field { margin-top: 12px; }
.proj-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.proj-color { width: 32px; height: 32px; border-radius: 50%; border: 2.5px solid transparent; background: var(--cc); cursor: pointer; padding: 0; }
.proj-color.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--cc); }
.proj-err { color: var(--danger); font-size: 12.5px; font-weight: 700; margin: 0 0 10px; }
.goal-add-card h3 { margin: 0 0 4px; font-size: 16.5px; font-weight: 800; color: var(--text); }
.proj-blk h3, .proj-blk h4 { margin: 0 0 8px; font-size: 14px; font-weight: 800; color: var(--text); }
.proj-blk p { margin: 0; font-size: 13px; color: var(--text); line-height: 1.6; }
.proj-blk { margin-bottom: 12px; }
@media (max-width: 380px) { .proj-form-grid { grid-template-columns: 1fr; } }

/* ============ MODUL CATATAN ============ */
.notes-page { position: relative; }
.note-capture { display: flex; gap: 8px; margin: 2px 0 12px; }
.note-capture input { flex: 1; min-width: 0; min-height: 46px; border: 1px dashed var(--line-strong); border-radius: 16px; background: var(--panel); padding: 0 14px; font: inherit; font-size: 14.5px; color: var(--text); }
.note-capture input:focus { outline: none; border-style: solid; border-color: #7d685c; }
.note-capture-go { flex: none; width: 46px; height: 46px; border-radius: 15px; border: none; background: linear-gradient(180deg, #6a564a, #57443a); color: #fff9f2; font-size: 22px; font-weight: 700; cursor: pointer; }
.note-search { margin-bottom: 12px; }
.note-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; }
.note-tabs::-webkit-scrollbar { display: none; }
.note-tabs .goal-chip { flex: none; }
.note-tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.note-tag { border: none; background: none; padding: 0; font-size: 12px; font-weight: 700; color: var(--teal); cursor: pointer; }
.note-tag.fil { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--muted); background: var(--panel); }
.note-tag.fil b { color: var(--text); }
.note-tag.fil.on { border-color: #7d685c; background: #7d685c; color: #fff9f2; }
.note-sortrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.note-sortrow select { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text); padding: 7px 10px; }
.note-list { display: grid; gap: 10px; }
.note-card { position: relative; }
.note-card.pin .note-card-main { border-color: color-mix(in srgb, var(--amber) 45%, var(--line)); }
.note-card-main { display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: var(--shadow); padding: 15px 46px 13px 16px; cursor: pointer; }
.note-card-main:active { transform: scale(0.995); }
.note-card-head b { font-size: 15.5px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-card-prev { margin: 5px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-card-prev.dim { font-style: italic; }
.note-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.note-card-foot .note-tag { pointer-events: none; }
.note-card-time { margin-top: 7px; font-size: 11.5px; font-weight: 700; color: var(--line-strong); letter-spacing: 0.02em; }
.note-card-menu { position: absolute; top: 10px; right: 8px; width: 38px; height: 38px; border: none; border-radius: 12px; background: none; color: var(--muted); font-size: 17px; cursor: pointer; }
.note-card-menu:hover { background: var(--panel-soft); color: var(--text); }
.note-cat { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; border-radius: 999px; padding: 4px 10px; text-transform: uppercase; color: #6b5d50; background: color-mix(in srgb, #b09a86 22%, transparent); }
.note-cat.Ide { color: #9a6b0f; background: color-mix(in srgb, var(--amber) 16%, transparent); }
.note-cat.Belajar { color: #1d5fbf; background: color-mix(in srgb, var(--blue) 13%, transparent); }
.note-cat.Jurnal { color: #6d3fb5; background: color-mix(in srgb, var(--violet) 13%, transparent); }
.note-cat.Bisnis { color: #0e6f66; background: color-mix(in srgb, var(--teal) 13%, transparent); }
.note-cat.Arsip { color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }
.note-empty { text-align: center; padding: 44px 22px; border: 1.5px dashed var(--line-strong); border-radius: 24px; color: var(--muted); display: grid; gap: 7px; justify-items: center; }
.note-empty span { font-size: 38px; }
.note-empty b { font-size: 16px; color: var(--text); }
.note-empty p { margin: 0; font-size: 13px; max-width: 300px; line-height: 1.55; }
.note-fab { display: none; position: fixed; right: 18px; bottom: 96px; z-index: 40; width: 58px; height: 58px; border-radius: 20px; border: none; background: linear-gradient(180deg, #6a564a, #57443a); color: #fff9f2; font-size: 28px; font-weight: 600; box-shadow: 0 14px 30px rgba(55, 40, 30, 0.35); cursor: pointer; }
@media (max-width: 900px) { .note-fab { display: block; } }
/* bottom sheet */
.note-sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(15, 22, 30, 0.44); display: flex; align-items: flex-end; justify-content: center; }
.note-sheet { width: min(100%, 480px); background: var(--panel); border-radius: 26px 26px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 6px; animation: noteSheetUp 0.18s ease; }
@keyframes noteSheetUp { from { transform: translateY(28px); opacity: 0.4; } }
.note-sheet-grip { width: 42px; height: 5px; border-radius: 999px; background: var(--line-strong); margin: 2px auto 8px; }
.note-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.note-sheet-head b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-sheet-btn { min-height: 48px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-soft); font: inherit; font-size: 14.5px; font-weight: 700; color: var(--text); text-align: left; padding: 0 15px; cursor: pointer; }
.note-sheet-btn:active { transform: scale(0.99); }
.note-sheet-btn.danger { color: var(--danger, #dc2626); border-color: color-mix(in srgb, #dc2626 30%, var(--line)); }
/* detail */
.note-detail-time { font-size: 12px; font-weight: 700; color: var(--muted); margin: 2px 0 10px; }
.note-detail-tags { font-size: 13px; color: var(--muted); margin: 10px 2px 14px; }
.note-body { font-size: 15px; line-height: 1.7; color: var(--text); word-wrap: break-word; overflow-wrap: anywhere; }
.note-body h3 { font-size: 16px; font-weight: 800; margin: 18px 0 6px; }
.note-body h3:first-child { margin-top: 0; }
.note-body p { margin: 7px 0; }
.note-body ul, .note-body ol { margin: 8px 0; padding-left: 22px; }
.note-body li { margin: 4px 0; }
.note-body li:has(input[type="checkbox"]) { list-style: none; margin-left: -18px; display: flex; gap: 8px; align-items: baseline; }
.note-body blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--amber); border-radius: 0 14px 14px 0; background: color-mix(in srgb, var(--amber) 7%, var(--panel)); color: var(--muted); font-style: italic; }
.note-body a { color: var(--teal-strong); font-weight: 700; }
.note-body code { background: var(--panel-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 13px; }
/* templates */
.note-tpl-list { display: grid; gap: 10px; margin-top: 14px; }
.note-tpl { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: var(--shadow); padding: 15px; cursor: pointer; min-height: 64px; }
.note-tpl:active { transform: scale(0.99); }
.note-tpl-ico { width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--panel-soft); border: 1px solid var(--line); display: grid; place-items: center; font-size: 21px; }
.note-tpl-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.note-tpl-main b { font-size: 15px; font-weight: 800; color: var(--text); }
.note-tpl-main span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.note-tpl-arrow { flex: none; font-size: 22px; color: var(--line-strong); font-weight: 700; }
/* editor */
.note-editor-wrap .proj-detail-title span { font-size: 11.5px; }
.note-save-state { margin-left: auto; font-size: 11.5px; font-weight: 800; color: var(--green); white-space: nowrap; }
.note-save-state.busy { color: var(--muted); }
.note-e-title { width: 100%; border: none; background: none; font: inherit; font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; padding: 10px 2px 6px; margin-top: 6px; }
.note-e-title:focus { outline: none; }
.note-toolbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; position: sticky; top: 0; z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 6px; margin: 6px 0 10px; box-shadow: var(--shadow); }
.note-tb-btn { min-width: 40px; height: 40px; border: 1px solid transparent; border-radius: 11px; background: none; color: var(--text); font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer; display: grid; place-items: center; }
.note-tb-btn:active { background: var(--panel-soft); border-color: var(--line); }
.note-tb-btn .nb { font-size: 12.5px; }
.note-tb-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.note-editor { min-height: 46vh; font-size: 15px; line-height: 1.7; color: var(--text); overflow-wrap: anywhere; }
.note-editor:focus { outline: none; border-color: #7d685c; }
.note-editor:empty::before { content: attr(data-placeholder); color: var(--line-strong); }
.note-editor h3 { font-size: 16px; font-weight: 800; margin: 16px 0 5px; }
.note-editor p { margin: 6px 0; }
.note-editor ul, .note-editor ol { margin: 7px 0; padding-left: 22px; }
.note-editor li:has(input[type="checkbox"]) { list-style: none; margin-left: -18px; display: flex; gap: 8px; align-items: baseline; }
.note-editor blockquote { margin: 11px 0; padding: 9px 13px; border-left: 3px solid var(--amber); border-radius: 0 14px 14px 0; background: color-mix(in srgb, var(--amber) 7%, var(--panel)); color: var(--muted); font-style: italic; }
.note-editor a { color: var(--teal-strong); }
.note-e-meta { margin: 14px 2px 20px; display: grid; gap: 10px; }
.note-e-tags { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); font: inherit; font-size: 14px; color: var(--text); padding: 0 14px; }
.note-e-tags:focus { outline: none; border-color: #7d685c; }
/* catatan: pencarian tetap tampil di mobile (override .task-search hide) */
.notes-page .note-search,
.note-editor-wrap .note-search { display: flex; max-width: none; margin: 2px 0 12px; }
/* catatan: ruang aman FAB di mobile */
.notes-page .note-list { padding-bottom: 96px; }

/* ============ LOGIN GOOGLE ============ */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius, 14px); background: var(--panel); color: var(--text); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: var(--shadow); }
.auth-google svg { width: 20px; height: 20px; flex: 0 0 auto; }
.auth-google:active { transform: scale(0.99); background: var(--panel-soft); }
.auth-google:disabled { opacity: 0.6; cursor: wait; }
.auth-hint.center { text-align: center; }
