:root {
  color-scheme: light;
  --ink: #171916;
  --muted: #656d67;
  --soft: rgba(255, 255, 255, 0.62);
  --soft-strong: rgba(255, 255, 255, 0.78);
  --line: rgba(32, 39, 35, 0.12);
  --accent: #dfff57;
  --teal: #25a99a;
  --blue: #4f72dd;
  --pink: #ff9db2;
  --sun: #f5b84b;
  --danger: #c74343;
  --good: #117d61;
  --shadow: 0 24px 80px rgba(41, 43, 38, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 5%, rgba(223, 255, 87, 0.42), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(37, 169, 154, 0.32), transparent 34%),
    radial-gradient(circle at 54% 92%, rgba(255, 157, 178, 0.34), transparent 35%),
    linear-gradient(135deg, #e2e4dc 0%, #f6f0e7 52%, #eaf0e2 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.ambient {
  position: fixed;
  inset: auto;
  z-index: -1;
  filter: blur(2px);
  opacity: 0.72;
  pointer-events: none;
}

.ambient-a {
  top: 84px;
  right: 8%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(223, 255, 87, 0.42);
}

.ambient-b {
  bottom: 5%;
  left: 42%;
  width: 360px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 157, 178, 0.25);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-screen.hidden {
  display: none;
}

.login-card {
  display: grid;
  width: min(420px, 100%);
  gap: 16px;
  padding: 24px;
  border-radius: 28px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.login-brand span,
.login-error {
  color: var(--muted);
}

.login-brand strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.login-error {
  min-height: 1.1em;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 900;
}

.google-signin,
.login-divider {
  display: none;
}

.google-signin.active {
  display: flex;
  justify-content: center;
  min-height: 40px;
}

.login-divider.active {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.login-divider.active::before,
.login-divider.active::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.app-shell.auth-locked {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  padding: 18px;
  gap: 18px;
}

.glass-panel,
.sidebar {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--soft-strong), rgba(255, 255, 255, 0.42));
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px) saturate(1.2);
}

.sidebar {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 18px;
  border-radius: 28px;
}

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

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: #111;
  color: var(--accent);
  font-weight: 900;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.brand span,
.sidebar-footer span {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.nav-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(223, 255, 87, 0.72);
}

.nav-item.active .nav-icon {
  background: #111;
  color: var(--accent);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 28px;
}

.eyebrow,
.panel-header p,
.metric span,
.metric small,
.meta-line,
.topbar-note {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.topbar-note {
  grid-column: 1 / -1;
  margin: -6px 0 0;
  min-height: 1em;
  font-size: 0.82rem;
}

.notification-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin: -4px 0 14px;
}

.notice-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 12px 34px rgba(41, 43, 38, 0.1);
  color: var(--ink);
  text-align: left;
  backdrop-filter: blur(22px) saturate(1.12);
}

.notice-card strong {
  flex: 0 0 auto;
  min-width: 72px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.notice-card span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

button.notice-card {
  cursor: pointer;
}

.notice-card.danger {
  background: rgba(255, 190, 190, 0.64);
}

.notice-card.today {
  background: rgba(223, 255, 87, 0.62);
}

.notice-card.soon {
  background: rgba(155, 227, 223, 0.58);
}

.notice-card.calm {
  background: rgba(255, 255, 255, 0.42);
}

.control-pill,
.primary-button,
.ghost-button,
.icon-button,
.file-button,
.mini-button,
.drop-zone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.control-pill {
  gap: 8px;
  padding: 0 12px;
}

.control-pill span {
  color: var(--muted);
}

.control-pill input {
  width: 128px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
}

.trm-pill input {
  width: 96px;
}

.primary-button {
  padding: 0 16px;
  border-color: #111;
  background: #111;
  color: white;
}

.ghost-button,
.file-button {
  padding: 0 13px;
}

.icon-button {
  width: 42px;
  font-size: 0.72rem;
}

.file-button input {
  display: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric,
.panel {
  border-radius: 28px;
  padding: 18px;
}

.metric strong {
  display: block;
  margin: 8px 0 6px;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  line-height: 1;
}

.dashboard-grid,
.workspace-row {
  display: grid;
  gap: 14px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
}

.workspace-row {
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
}

.panel {
  min-width: 0;
}

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

canvas {
  display: block;
  width: 100%;
  min-height: 300px;
}

.ribbon-panel canvas {
  min-height: 280px;
}

.breakdown-list,
.stack,
.budget-list,
.goal-list,
.account-list,
.payment-card-list,
.investment-list,
.payment-summary,
.investment-summary {
  display: grid;
  gap: 10px;
}

.payment-summary,
.investment-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.investment-table {
  display: grid;
  gap: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.42);
}

.investment-head,
.ibkr-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) 90px 90px 90px 110px 120px 110px 100px 120px 120px;
  gap: 10px;
  align-items: center;
  min-width: 1120px;
  padding: 11px 14px;
}

.investment-head {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ibkr-row {
  border-top: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.34);
  font-size: 0.84rem;
}

.ibkr-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}

.breakdown-row,
.plan-row,
.budget-row,
.goal-row,
.account-row,
.payment-card,
.investment-row,
.summary-tile {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.52);
}

.payment-card {
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.payment-card.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.payment-card.paid {
  opacity: 0.58;
}

.drop-zone {
  min-width: 190px;
  padding: 0 14px;
  background: rgba(223, 255, 87, 0.5);
}

.drop-zone.active {
  background: #111;
  color: var(--accent);
}

.row-top,
.meta-line,
.triple {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.row-top {
  margin-bottom: 8px;
}

.row-top strong,
.row-top span {
  overflow-wrap: anywhere;
}

.triple {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.triple span {
  display: grid;
  gap: 2px;
  font-size: 0.76rem;
  color: var(--muted);
}

.triple strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(24, 26, 22, 0.1);
}

.progress > span {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.progress > span.warn {
  background: var(--sun);
}

.progress > span.danger {
  background: var(--danger);
}

.meta-line {
  margin-top: 8px;
  font-size: 0.84rem;
}

.cat-chip,
.owner-chip,
.currency-chip,
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  font-weight: 900;
}

.account-chip {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  min-height: 38px;
  border-radius: 14px;
}

.account-chip small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.account-chip.savings,
.account-chip.checking {
  background: rgba(79, 114, 221, 0.12);
}

.account-chip.credit-card {
  background: rgba(255, 176, 192, 0.38);
}

.account-chip.cash {
  background: rgba(142, 230, 169, 0.26);
}

.account-chip.investment {
  background: rgba(193, 221, 255, 0.42);
}

.cat-dot {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 8px;
  color: #111;
  font-size: 0.64rem;
  font-weight: 900;
}

.owner-chip.personal {
  background: rgba(79, 114, 221, 0.14);
  color: #24459c;
}

.owner-chip.business {
  background: rgba(37, 169, 154, 0.16);
  color: #067363;
}

.table-wrap {
  overflow: auto;
}

.table-wrap.tall {
  max-height: calc(100vh - 256px);
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  font-size: 0.9rem;
}

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

.amount-income {
  color: var(--good);
  font-weight: 900;
}

.amount-expense {
  color: var(--ink);
  font-weight: 900;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 190px 160px 120px 190px;
  gap: 10px;
  margin-bottom: 12px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 169, 154, 0.7);
  box-shadow: 0 0 0 4px rgba(37, 169, 154, 0.14);
}

.form-panel {
  position: sticky;
  top: 128px;
}

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

label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

label input,
label select,
label textarea {
  margin-top: 6px;
}

.full {
  grid-column: 1 / -1;
}

.form-actions,
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mini-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.44);
}

.profile-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #111;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 950;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-copy strong,
.profile-copy span {
  display: block;
}

.profile-copy span,
.helper-text {
  color: var(--muted);
}

.data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.helper-text {
  margin: 12px 0 0;
  font-size: 0.84rem;
  font-weight: 800;
}

.profile-upload {
  width: 100%;
}

.access-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .brand div:last-child,
  .nav-item span:last-child,
  .sidebar-footer {
    display: none;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
  }

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

  .dashboard-grid,
  .workspace-row {
    grid-template-columns: 1fr;
  }

  .form-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
    padding: 10px;
  }

  .app-shell.auth-locked {
    display: none;
  }

  .sidebar {
    position: static;
    height: auto;
    margin-bottom: 10px;
    border-radius: 24px;
  }

  .brand {
    display: none;
  }

  .nav-list {
    grid-template-columns: repeat(8, 1fr);
  }

  .nav-item {
    min-height: 42px;
    padding: 0;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .notification-strip {
    grid-template-columns: 1fr;
  }

  .notice-card {
    align-items: flex-start;
    border-radius: 22px;
  }

  .metrics-grid,
  .filters,
  .payment-summary,
  .investment-summary,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .panel-header {
    flex-direction: column;
  }

  .drop-zone {
    width: 100%;
  }
}

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

.cat-dot svg {
  width: 13px;
  height: 13px;
}

.weekly-panel {
  grid-column: 1 / -1;
}

.recent-list {
  display: grid;
  gap: 2px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.recent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
}

.recent-row:hover {
  background: rgba(255, 255, 255, 0.5);
}

.recent-copy {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.recent-copy strong {
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-copy span {
  color: var(--muted);
  font-size: 0.76rem;
}

.recent-amount {
  white-space: nowrap;
  font-size: 0.86rem;
}

.insights-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.insight-row {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.insight-row strong {
  font-size: 0.86rem;
}

.insight-row span {
  color: var(--muted);
  font-size: 0.8rem;
}

.insight-danger {
  border-left-color: var(--danger);
}

.insight-warn {
  border-left-color: var(--sun);
}

.insight-good {
  border-left-color: var(--good);
}

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

.ai-badge {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(223, 255, 87, 0.6);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.tab-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.tab-btn.active {
  background: #111;
  color: #fff;
}

.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 0.66rem;
}

.tab-btn.active .tab-count {
  background: rgba(255, 255, 255, 0.24);
}

.renews-chip {
  color: var(--good);
  font-weight: 800;
}

.swipe-card {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.swipe-body {
  position: relative;
  z-index: 1;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.swipe-card.swiping .swipe-body {
  transition: none;
}

.swipe-fill {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(37, 169, 154, 0.94), rgba(17, 125, 97, 0.94));
  color: #fff;
  opacity: 0;
  pointer-events: none;
  clip-path: circle(var(--r, 0%) at 50% 50%);
  transition: clip-path 0.24s ease, opacity 0.24s ease;
}

.swipe-card.swiping .swipe-fill {
  transition: opacity 0.12s ease;
}

.swipe-card.completing .swipe-fill {
  transition: clip-path 0.32s ease, opacity 0.32s ease;
}

.swipe-fill span {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.swipe-fill.ready span::after {
  content: " \2713";
}

.swipe-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.65;
}

.bell-button {
  position: relative;
}

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

.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
}

.notif-panel {
  position: absolute;
  top: 74px;
  right: 18px;
  z-index: 30;
  display: none;
  flex-direction: column;
  width: min(340px, calc(100vw - 36px));
  max-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.1);
}

.notif-panel.open {
  display: flex;
}

.notif-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 900;
}

.notif-list {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  padding: 8px;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  text-align: left;
}

.notif-item.danger {
  border-left-color: var(--danger);
}

.notif-item.today {
  border-left-color: var(--sun);
}

.notif-item.soon {
  border-left-color: var(--blue);
}

.notif-tag {
  flex: 0 0 auto;
  min-width: 52px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.notif-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notif-body strong {
  font-size: 0.86rem;
}

.notif-body small {
  color: var(--muted);
  font-size: 0.76rem;
}

.notif-empty {
  padding: 22px 16px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

@media (max-width: 760px) {
  .notif-panel {
    top: auto;
    right: 10px;
    left: 10px;
    width: auto;
  }
}

.weekly-panel canvas {
  min-height: 300px;
}

.panel-figure {
  font-size: 1.2rem;
  line-height: 1;
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-row {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.52);
}

.category-row .row-top strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.input-preview {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.1);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.toast-success {
  border-left: 4px solid var(--good);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-info {
  border-left: 4px solid var(--blue);
}

@media (max-width: 760px) {
  .toast-stack {
    right: 10px;
    left: 10px;
    bottom: 10px;
    max-width: none;
  }
}
