:root {
  color-scheme: dark;
  --bg: #05050f;
  --panel: rgba(12, 14, 26, 0.9);
  --accent: #74f9ff;
  --accent-2: #ff67e7;
  --accent-3: #8ef6d0;
  --text: #f5f6ff;
  --muted: #8b8ea3;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
  background: radial-gradient(circle at 10% 10%, rgba(116, 249, 255, 0.18), transparent 25%),
    radial-gradient(circle at 80% 0%, rgba(255, 103, 231, 0.22), transparent 30%),
    linear-gradient(140deg, #05050f 0%, #0a0b1c 45%, #04050c 100%);
  color: var(--text);
  min-height: 100vh;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

.glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(116, 249, 255, 0.2), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(255, 103, 231, 0.2), transparent 40%),
    radial-gradient(circle at 50% 60%, rgba(0, 255, 196, 0.12), transparent 50%);
  filter: blur(40px);
  z-index: -1;
}

.landing {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #05050f 0%, #0a0b1c 45%, #04050c 100%);
  z-index: 50;
  padding: 20px;
  text-align: center;
  gap: 12px;
}

.landing.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  accent-color: var(--accent);
}

.landing__logo {
  width: 90px;
  height: 90px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.landing__auth {
  width: min(420px, 100%);
  display: grid;
  gap: 10px;
  margin-top: 6px;
  text-align: left;
}

.landing__auth label span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.landing__auth input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
}

.landing__auth input:focus {
  border-color: rgba(116, 249, 255, 0.45);
}

.landing__auth code {
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85em;
}

.app {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 24px 18px 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-x: hidden;
}

.app__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

.header-actions__stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.header-actions .primary {
  min-width: 150px;
  height: 44px;
}

.primary--highlight {
  background: linear-gradient(120deg, rgba(116, 249, 255, 1), rgba(142, 246, 208, 0.9));
  color: #05050f;
}

.header-actions .burger {
  height: 44px;
  width: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  line-height: 1;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}

.pill {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 14px;
  padding: 12px;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  transition: transform 0.2s ease, border 0.2s ease;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.pill small {
  color: var(--muted);
  font-size: 0.72rem;
}

.pill:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.pill--active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(116, 249, 255, 0.16), rgba(255, 103, 231, 0.14));
  box-shadow: 0 10px 30px rgba(116, 249, 255, 0.12);
}

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

.logo {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 0 18px rgba(255, 103, 231, 0.8));
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.1), transparent 70%);
}

.branding__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.title-main {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: "Archivo Black", "Space Grotesk", sans-serif;
  letter-spacing: 0.2em;
}

.title-sub {
  margin: 0;
  font-family: "Great Vibes", "Space Grotesk", cursive;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.04em;
}

.profile {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(12px);
}

.profile__name {
  font-weight: 600;
}

.profile__currency {
  display: block;
  color: var(--muted);
}

.section {
  display: none;
}

.section--active {
  display: block;
}

.panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
    radial-gradient(circle at 20% 20%, rgba(116, 249, 255, 0.08), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(255, 103, 231, 0.08), transparent 40%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.burger {
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  justify-items: center;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  line-height: 1;
}

.burger-menu {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  top: 68px;
  background: rgba(12, 14, 26, 0.98);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--shadow);
  width: auto;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 30;
}

.burger-label {
  padding: 10px 10px 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.burger-hint {
  padding: 0 10px 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.burger-separator {
  height: 1px;
  margin: 10px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.burger-menu button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px;
  font-size: 0.95rem;
}

.burger-menu button:hover {
  border-color: var(--accent);
}

.burger-menu--open {
  display: block;
}

.profile-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.pill-item--danger {
  border-color: rgba(255, 103, 231, 0.35);
  background: rgba(255, 103, 231, 0.08);
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
  position: relative;
}

.panel__header h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.panel__header .ghost#refresh-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  position: relative;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

.hero__stats {
  display: grid;
  gap: 12px;
}

.wheel {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  margin: 0 auto;
}

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

.wallet-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(120deg, rgba(116, 249, 255, 0.05), rgba(255, 103, 231, 0.05));
}

.wallet-total__values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.wallet-total p {
  margin: 0;
  color: var(--muted);
}

.wallet-total strong {
  font-size: 1.05rem;
}

.wallet-list {
  display: grid;
  gap: 6px;
}

.wallet-row {
  display: flex;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.95rem;
}

.wheel::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #0a0b1c;
}

.wheel__value {
  position: relative;
  text-align: center;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.wheel__value span {
  font-weight: 700;
  font-size: 1.05rem;
}

.wheel__value small {
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stat {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 12px;
}

.stat__label {
  margin: 0;
  color: var(--muted);
}

.stat__value {
  margin: 4px 0 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.chart {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  display: none;
}

.pulse-graph {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pulse-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pulse-bars .bar {
  flex: 1;
  min-width: 100px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pulse-bars .bar span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.pulse-goals {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.goal-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.goal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.goal-head span {
  white-space: nowrap;
  color: var(--muted);
  font-weight: 600;
}

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

.goal-progress {
  margin: 8px 0;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.goal-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.goal-steps {
  display: grid;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.chart__pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(116, 249, 255, 0.1);
  border: 1px solid rgba(116, 249, 255, 0.3);
  font-size: 0.85rem;
}

.microcopy {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

.empty-state {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.empty-state button.primary {
  width: fit-content;
  min-height: 42px;
  padding: 10px 14px;
}

.cta-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(116, 249, 255, 0.18);
  background: linear-gradient(130deg, rgba(116, 249, 255, 0.08), rgba(255, 103, 231, 0.04));
}

.cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cta-actions button {
  min-height: 42px;
  padding: 10px 14px;
}

.event-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.9rem;
}

.event-row strong {
  font-weight: 600;
  color: rgba(245, 246, 255, 0.92);
}

.event-row span {
  color: rgba(245, 246, 255, 0.82);
}

.event-row span:last-child {
  color: rgba(245, 246, 255, 0.96);
  font-weight: 600;
  text-align: right;
}

#daily-limit-card[data-status="green"] {
  border-color: rgba(142, 246, 208, 0.35);
}

#daily-limit-card[data-status="yellow"] {
  border-color: rgba(255, 232, 120, 0.35);
}

#daily-limit-card[data-status="red"] {
  border-color: rgba(255, 120, 160, 0.35);
}

.debug-panel {
  margin-top: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
}

.debug-panel summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}

.debug-panel__grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.debug-panel__card h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.debug-panel__card pre {
  margin: 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow: auto;
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(245, 246, 255, 0.92);
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 46px;
  width: 100%;
  appearance: none;
}

.form-grid input,
.form-grid textarea {
  font-family: "Space Grotesk", "Inter", sans-serif;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: rgba(116, 249, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(116, 249, 255, 0.15);
}

.form-grid .wide {
  grid-column: 1 / -1;
}

button {
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  min-height: 46px;
}

button.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #05050f;
}

button.is-loading {
  opacity: 0.8;
  cursor: progress;
}

button.ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

button.danger {
  border-color: rgba(255, 103, 231, 0.5);
  color: #ffc8e4;
}

.filters {
  display: grid;
  gap: 10px;
  padding: 8px 0;
}

.filters__form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}

.filters__form button {
  width: 100%;
}

.filters__form input,
.filters__form select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  min-height: 42px;
}

.timeline {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  width: 100%;
}

.timeline-item.income {
  border-color: rgba(116, 249, 255, 0.4);
}

.timeline-item.expense {
  border-color: rgba(255, 103, 231, 0.3);
}

.timeline-item span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.dist-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.dist-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.03));
}

.small {
  font-size: 12px;
}

.section > * {
  margin-bottom: 12px;
}
.section > *:last-child {
  margin-bottom: 0;
}

.dist-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.dist-bars {
  display: grid;
  gap: 8px;
}

.dist-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.dist-bar {
  background: linear-gradient(120deg, rgba(116, 249, 255, 0.2), rgba(255, 103, 231, 0.18));
  border-radius: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: width 0.4s ease;
  white-space: nowrap;
  min-width: 130px;
  overflow: visible;
  text-overflow: unset;
}

.trend {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.trend--up {
  color: #7ef7c5;
}
.trend--down {
  color: #ff8fb1;
}
.trend--flat {
  color: #c7d0e0;
}

.dist-forecast p {
  margin: 0;
  color: var(--muted);
}

.daily-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.daily-head strong {
  font-size: 1rem;
}

.category-stack {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.stack-pill {
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.stack-pill:hover {
  transform: translateY(-1px);
}

.category-detail {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.category-detail.hidden {
  display: none;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.detail-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-summary {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 6px;
}

.detail-list,
.detail-obligations,
.detail-debts {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.detail-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
}

.detail-item.timeline-item {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.detail-entry__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.detail-entry__left {
  flex: 1;
  min-width: 0;
}

.detail-entry__title strong {
  display: block;
  line-height: 1.2;
}

.detail-entry__meta {
  margin-top: 2px;
  white-space: normal;
  word-break: break-word;
}

.detail-entry__right strong {
  white-space: nowrap;
}

.detail-entry__bottom {
  line-height: 1.2;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 15, 0.7);
  display: grid;
  place-items: center;
  z-index: 60;
}

.modal.hidden {
  display: none;
}

.modal__content {
  width: min(520px, 90vw);
  background: rgba(12, 14, 26, 0.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  grid-column: 1 / -1;
}

.icon-picker {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
  align-items: center;
}

.icon-picker input {
  width: 100%;
  text-align: left;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  gap: 6px;
  padding: 8px;
  background: rgba(12, 14, 26, 0.96);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 6px;
  max-height: 200px;
  overflow: auto;
  box-shadow: var(--shadow);
}

.emoji-grid.hidden {
  display: none;
}

.emoji-btn {
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.emoji-btn:hover {
  border-color: var(--accent);
}

.wallets {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.wallet-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.wallet-card span {
  color: var(--muted);
}

select {
  background-image: linear-gradient(45deg, transparent 50%, #c7d0e0 50%), linear-gradient(135deg, #c7d0e0 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
  padding-right: 32px;
  color: var(--text);
  background-color: rgba(12, 14, 26, 0.9);
}

input[type="date"] {
  color-scheme: dark;
}

select option {
  color: var(--text);
  background-color: #0c0e1a;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.profile-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.profile-card {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-card h3 {
  margin: 0;
  font-size: 1rem;
}

.profile-card ul {
  margin: 0;
}

.category-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.8rem;
}

.category-badge svg {
  width: 18px;
  height: 18px;
  fill: var(--accent);
}

.goal-list,
.obligation-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goal-list li,
.obligation-list li {
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.goal-list li span,
.obligation-list li span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.obligation-list li.is-due {
  border-color: rgba(255, 232, 120, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 232, 120, 0.12) inset;
}

.obligation-list li.is-paid {
  opacity: 0.75;
}

.advisor {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(130deg, rgba(116, 249, 255, 0.08), rgba(255, 103, 231, 0.05));
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  line-height: 1.5;
}

.advisor-plan {
  display: grid;
  gap: 10px;
}

.assessment {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.assessment-head strong {
  display: block;
  font-size: 1rem;
}

.assessment-items {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.assessment-item {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.assessment-alerts {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.assessment-alert {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
  line-height: 1.35;
}

.assessment-alert--red {
  border-color: rgba(255, 103, 231, 0.35);
  background: rgba(255, 103, 231, 0.08);
}

.assessment-alert--yellow {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.assessment-alert--green {
  border-color: rgba(116, 249, 255, 0.35);
  background: rgba(116, 249, 255, 0.08);
}

.assessment-actions {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.assessment-action {
  font-size: 0.92rem;
  line-height: 1.35;
}

.plan-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.plan-actions button {
  width: 100%;
  min-width: 0;
}

.plan-allocations {
  display: grid;
  gap: 6px;
}

.plan-row {
  display: flex;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(5, 5, 15, 0.9);
  color: var(--text);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 820px) {
  .app {
    padding: 12px 12px 80px;
    width: 100%;
  }
  .app__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .title-main {
    font-size: 1.1rem;
    letter-spacing: 0.12em;
  }
  .title-sub {
    font-size: 0.95rem;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .header-actions__stack {
    flex: 1;
  }
  .header-actions .primary {
    width: 100%;
    min-width: 0;
  }
  .profile {
    padding: 8px 12px;
  }
  .burger-menu {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    width: auto;
  }
  .panel {
    padding: 14px;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero__stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .wheel {
    width: 100%;
    max-width: 240px;
    height: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .filters {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  button,
  .filters button {
    width: 100%;
  }
  .plan-actions {
    grid-template-columns: 1fr;
  }
  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .timeline-item > div:last-child {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .modal__content {
    width: 94vw;
  }
}

.help-block {
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

ul.help-block {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.help-block li::before {
  content: "• ";
  color: rgba(245, 246, 255, 0.6);
}

.op-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.op-tab {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 10px;
  font-weight: 600;
}

.op-tab--active {
  border-color: var(--accent);
  background: linear-gradient(120deg, rgba(116, 249, 255, 0.18), rgba(255, 103, 231, 0.12));
}

.onboarding {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}
.onboarding.hidden {
  display: none;
}
.onboarding__content {
  background: linear-gradient(160deg, #0d101c, #1b1f30);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  width: min(720px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}
.onboarding__header h2 {
  margin: 0 0 6px;
}
.onboarding__header p {
  margin: 0 0 12px;
  color: #b7bed3;
}
.onboard-step.hidden {
  display: none;
}
.onboard-step .actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.pill-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.pill-stack .pill-item {
  padding: 6px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 13px;
}
.checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.toggle-row__text {
  min-width: 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: 0.2s;
  border-radius: 999px;
}

.switch__slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(12, 14, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: 0.2s;
  border-radius: 50%;
}

.switch input:checked + .switch__slider {
  background: linear-gradient(120deg, rgba(116, 249, 255, 0.35), rgba(255, 103, 231, 0.25));
  border-color: rgba(116, 249, 255, 0.35);
}

.switch input:checked + .switch__slider::before {
  transform: translate(20px, -50%);
}
