:root {
  --bg: #0d1112;
  --bg-raised: #121819;
  --surface: #171e20;
  --surface-2: #1d2628;
  --surface-3: #253033;
  --paper: #eadfc9;
  --paper-muted: #c7baa5;
  --ink: #f5f0e6;
  --muted: #97a3a4;
  --muted-2: #687477;
  --line: rgba(232, 225, 211, 0.1);
  --line-strong: rgba(232, 225, 211, 0.18);
  --teal: #1d9898;
  --teal-bright: #31c3bd;
  --teal-soft: rgba(29, 152, 152, 0.16);
  --green: #69c670;
  --green-soft: rgba(105, 198, 112, 0.14);
  --red: #e66c5c;
  --red-soft: rgba(230, 108, 92, 0.14);
  --amber: #e2b86e;
  --amber-soft: rgba(226, 184, 110, 0.14);
  --violet: #a98be8;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sidebar: 272px;
  --content: 1160px;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% -10%, rgba(29, 152, 152, 0.17), transparent 32rem),
    radial-gradient(circle at 10% 40%, rgba(226, 184, 110, 0.06), transparent 26rem), var(--bg);
  overflow-x: hidden;
}

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

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
}

.grain {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
}

.hidden {
  display: none !important;
}

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

.desktop-sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  padding: 24px 18px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(13, 17, 18, 0.82);
  backdrop-filter: blur(24px);
}

.brand-lockup {
  display: flex;
  width: 100%;
  padding: 8px;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-lockup img {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(235, 223, 202, 0.3);
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
}

.brand-lockup span {
  display: grid;
  gap: 2px;
}

.brand-lockup strong {
  font-size: 17px;
  letter-spacing: 0.12em;
}

.brand-lockup small {
  color: var(--muted);
  font-size: 12px;
}

.brand-lockup small:empty {
  display: none;
}

#header-caption {
  display: none;
}

.desktop-navigation {
  display: grid;
  margin-top: 38px;
  gap: 7px;
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 48px;
  padding: 0 14px;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-item:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
}

.nav-item.active {
  color: var(--ink);
  border-color: rgba(49, 195, 189, 0.2);
  background: linear-gradient(90deg, rgba(29, 152, 152, 0.2), rgba(29, 152, 152, 0.06));
}

.nav-item.active::before {
  position: absolute;
  left: -18px;
  width: 4px;
  height: 24px;
  border-radius: 0 8px 8px 0;
  background: var(--teal-bright);
  content: '';
}

.nav-icon,
.action-icon,
.stat-icon,
.empty-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.nav-icon svg,
.action-icon svg,
.stat-icon svg,
.empty-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-profile {
  display: flex;
  min-height: 64px;
  margin-top: auto;
  padding: 10px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.sidebar-profile .avatar,
.avatar-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(49, 195, 189, 0.35);
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-bright);
  font-weight: 800;
}

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

.sidebar-profile div:last-child {
  min-width: 0;
}

.sidebar-profile strong,
.sidebar-profile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.app-main {
  width: min(calc(100% - var(--sidebar)), var(--content));
  min-height: 100vh;
  margin-left: max(var(--sidebar), calc((100vw - var(--content) + var(--sidebar)) / 2));
  padding: 34px 34px 80px;
}

.mobile-header,
.bottom-navigation {
  display: none;
}

.screen {
  animation: screen-in 260ms ease both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-head {
  display: flex;
  margin-bottom: 24px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-bright);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 6px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 4px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.page-subtitle,
.card-subtitle,
.muted {
  color: var(--muted);
}

.page-subtitle {
  margin-bottom: 0;
  font-size: 15px;
}

.header-actions,
.row-actions,
.chips,
.segmented,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.btn {
  display: inline-flex;
  min-height: 42px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  border-color: rgba(49, 195, 189, 0.45);
  background: linear-gradient(135deg, #208f8e, #146c6e);
  box-shadow: 0 10px 24px rgba(22, 128, 128, 0.2);
}

.btn.success {
  border-color: rgba(105, 198, 112, 0.38);
  background: linear-gradient(135deg, #377e43, #276534);
}

.btn.danger {
  border-color: rgba(230, 108, 92, 0.35);
  background: var(--red-soft);
  color: #ff9183;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn.full {
  width: 100%;
}

.btn.small {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 12px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.026), transparent 45%), var(--surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card-pad {
  padding: 22px;
}

.paper-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(234, 223, 201, 0.28);
  border-radius: var(--radius-xl);
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.06), transparent 48%), #263034;
}

.paper-card::after {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 24px,
    rgba(234, 223, 201, 0.4) 25px
  );
  content: '';
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
}

.capture-card {
  min-height: 228px;
  padding: 26px;
}

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

.capture-card h2 {
  max-width: 520px;
  font-size: clamp(24px, 4vw, 36px);
}

.capture-card p {
  max-width: 590px;
  color: #bac5c5;
}

.smart-input {
  display: flex;
  margin-top: 26px;
  padding: 7px;
  gap: 8px;
  border: 1px solid rgba(49, 195, 189, 0.27);
  border-radius: 16px;
  background: rgba(8, 13, 14, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.smart-input textarea {
  width: 100%;
  min-height: 46px;
  min-width: 0;
  max-height: 120px;
  padding: 12px 10px;
  flex: 1;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  line-height: 1.4;
}

.smart-input textarea::placeholder {
  color: #728083;
}

.smart-input .btn {
  align-self: flex-end;
}

.day-ring-card {
  display: flex;
  min-height: 228px;
  padding: 24px;
  flex-direction: column;
  justify-content: space-between;
}

.day-date {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.day-number {
  font-size: 66px;
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.day-month {
  color: var(--paper);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.day-ring-card .weekday {
  margin-top: 10px;
  color: var(--paper);
  font-weight: 750;
  text-transform: capitalize;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

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

.stat-grid {
  display: grid;
  margin-top: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  display: grid;
  min-height: 122px;
  padding: 18px;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 12px;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--teal-soft);
  color: var(--teal-bright);
}

.stat-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.stat-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.stat-icon.violet {
  background: rgba(169, 139, 232, 0.14);
  color: var(--violet);
}

.stat-card small {
  display: block;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.content-grid {
  display: grid;
  margin-top: 16px;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
}

.today-dashboard {
  display: grid;
  margin-top: 16px;
  grid-template-areas:
    'schedule insight'
    'stats stats';
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
}

.today-schedule-card {
  grid-area: schedule;
}

.today-dashboard > .stat-grid {
  grid-area: stats;
  margin-top: 0;
}

.today-dashboard > .insight-card {
  grid-area: insight;
}

.section-head {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
}

.section-head a,
.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal-bright);
  font-weight: 700;
  cursor: pointer;
}

.timeline,
.transaction-list,
.note-list,
.reminder-list,
.settings-list,
.admin-list {
  display: grid;
  gap: 9px;
}

.timeline-item,
.transaction-item,
.note-item,
.reminder-item,
.settings-item,
.admin-item {
  display: flex;
  width: 100%;
  padding: 14px;
  align-items: center;
  gap: 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.026);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.timeline-item:hover,
.transaction-item:hover,
.note-item:hover,
.reminder-item:hover,
.settings-item:hover,
.admin-item:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}

.timeline-time {
  width: 52px;
  flex: 0 0 auto;
  color: var(--teal-bright);
  font-size: 13px;
  font-weight: 800;
}

.item-main {
  min-width: 0;
  flex: 1;
}

.item-main strong,
.item-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-main small {
  margin-top: 4px;
  color: var(--muted);
}

.item-tail {
  margin-left: auto;
  color: var(--muted-2);
}

.insight-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 100% 0, rgba(49, 195, 189, 0.18), transparent 16rem), var(--surface);
}

.insight-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(var(--teal-bright), var(--amber));
  content: '';
}

.insight-card blockquote {
  margin: 18px 0;
  padding: 14px 15px;
  border-left: 2px solid var(--teal-bright);
  border-radius: 0 12px 12px 0;
  background: rgba(0, 0, 0, 0.16);
  color: #d9e1df;
  line-height: 1.55;
}

.insight-source {
  color: var(--muted);
  font-size: 12px;
}

.finance-summary {
  display: grid;
  gap: 12px;
}

.balance-hero {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border: 1px solid rgba(49, 195, 189, 0.34);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 92% 12%, rgba(49, 195, 189, 0.18), transparent 35%),
    linear-gradient(145deg, rgba(21, 52, 53, 0.96), rgba(18, 25, 27, 0.98));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.04),
    var(--shadow);
}

.balance-hero::after {
  position: absolute;
  right: -26px;
  bottom: -74px;
  width: 190px;
  height: 190px;
  border: 34px solid rgba(49, 195, 189, 0.055);
  border-radius: 50%;
  content: '';
}

.balance-hero.negative {
  border-color: rgba(255, 120, 105, 0.34);
  background:
    radial-gradient(circle at 92% 12%, rgba(230, 108, 92, 0.16), transparent 35%),
    linear-gradient(145deg, rgba(50, 29, 28, 0.96), rgba(18, 25, 27, 0.98));
}

.balance-hero-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.balance-hero-head .eyebrow {
  margin: 0 0 5px;
}

.balance-label {
  color: var(--paper-muted);
  font-size: 14px;
  font-weight: 750;
}

.balance-status {
  padding: 7px 10px;
  border: 1px solid rgba(49, 195, 189, 0.3);
  border-radius: 999px;
  background: rgba(49, 195, 189, 0.1);
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.balance-hero.negative .balance-status {
  border-color: rgba(255, 140, 126, 0.32);
  background: rgba(255, 140, 126, 0.1);
  color: #ff9a8d;
}

.balance-value {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 25px;
  color: var(--paper);
  font-size: clamp(38px, 7vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.balance-help {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 13px;
  color: var(--muted);
  font-size: 13px;
}

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

.money-card {
  min-height: 138px;
  padding: 20px;
}

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

.money-card strong {
  display: block;
  margin-top: 18px;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.045em;
}

.money-card.expense strong {
  color: #ff8c7e;
}

.money-card.income strong {
  color: #86dd8b;
}

.finance-layout,
.calendar-layout,
.notes-layout,
.more-layout,
.admin-layout {
  display: grid;
  margin-top: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
}

.transaction-item .amount {
  min-width: 92px;
  font-weight: 850;
  text-align: right;
}

.transaction-item {
  position: relative;
  overflow: hidden;
  min-height: 76px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.022);
}

.transaction-item::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  content: '';
}

.transaction-item.expense::before {
  background: #e66c5c;
}

.transaction-item.income::before {
  background: #69c670;
}

.transaction-sign {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  font-size: 20px;
  font-weight: 750;
}

.transaction-item.expense .transaction-sign {
  background: rgba(230, 108, 92, 0.12);
  color: #ff8c7e;
}

.transaction-item.income .transaction-sign {
  background: rgba(105, 198, 112, 0.12);
  color: #86dd8b;
}

.transaction-item .transaction-description,
.transaction-item .transaction-date {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-item .transaction-date {
  margin-top: 2px;
  color: #6f7d7d;
  font-size: 11px;
}

.transaction-item.expense .amount {
  color: #ff8c7e;
}

.transaction-item.income .amount {
  color: #86dd8b;
}

.report-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.report-row {
  display: grid;
  padding: 11px 13px;
  grid-template-columns: 1fr auto;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.report-row:last-child {
  border-bottom: 0;
}

.report-row span:last-child {
  font-weight: 780;
}

.report-balance {
  padding: 18px;
  border: 1px solid rgba(49, 195, 189, 0.28);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(49, 195, 189, 0.12), rgba(49, 195, 189, 0.035));
}

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

.report-balance span {
  color: var(--paper-muted);
  font-size: 12px;
  font-weight: 750;
}

.report-balance strong {
  display: block;
  margin: 7px 0 5px;
  color: #8ce293;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
}

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

.report-balance.negative {
  border-color: rgba(230, 108, 92, 0.3);
  background: linear-gradient(145deg, rgba(230, 108, 92, 0.12), rgba(230, 108, 92, 0.025));
}

.report-balance.negative strong {
  color: #ff8c7e;
}

.report-balance.neutral strong {
  color: var(--paper);
}

.report-flows {
  display: grid;
  margin-top: 10px;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.report-flow {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}

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

.report-flow span {
  color: var(--muted);
  font-size: 11px;
}

.report-flow strong {
  margin-top: 6px;
  font-size: 16px;
}

.report-flow.income strong {
  color: #86dd8b;
}

.report-flow.expense strong {
  color: #ff8c7e;
}

.report-breakdown {
  margin-top: 22px;
}

.report-breakdown h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.report-note {
  margin: 18px 0 0;
  padding: 12px 13px;
  border-left: 2px solid var(--teal-bright);
  border-radius: 0 12px 12px 0;
  background: rgba(49, 195, 189, 0.05);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.bar-list {
  display: grid;
  margin-top: 18px;
  gap: 13px;
}

.bar-label {
  display: flex;
  margin-bottom: 6px;
  justify-content: space-between;
  gap: 10px;
  color: var(--paper-muted);
  font-size: 13px;
}

.calendar-card {
  padding: 18px;
}

.calendar-head {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
}

.calendar-title {
  font-weight: 800;
  text-align: center;
  text-transform: capitalize;
}

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

.calendar-weekday {
  padding: 7px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  min-height: 38px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  cursor: pointer;
}

.calendar-day:hover {
  border-color: var(--line-strong);
}

.calendar-day.outside {
  opacity: 0.25;
}

.calendar-day.today {
  border-color: rgba(49, 195, 189, 0.55);
}

.calendar-day.selected {
  border-color: var(--teal-bright);
  background: linear-gradient(145deg, #278f8e, #16696b);
  color: #fff;
  font-weight: 850;
}

.calendar-day.occupied::after {
  position: absolute;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
  content: '';
}

.calendar-day.selected.occupied::after {
  background: #fff;
}

.reminder-item .repeat-badge,
.kind-badge,
.status-badge,
.tag,
.chip {
  display: inline-flex;
  min-height: 26px;
  padding: 0 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.kind-badge.task {
  color: var(--green);
  background: var(--green-soft);
}

.kind-badge.idea {
  color: var(--amber);
  background: var(--amber-soft);
}

.kind-badge.thought {
  color: var(--violet);
  background: rgba(169, 139, 232, 0.14);
}

.note-item {
  align-items: flex-start;
}

.note-item .note-content {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  color: #bac3c3;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.note-tags {
  display: flex;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 5px;
}

.search-field {
  position: relative;
  flex: 1;
}

.search-field input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
}

.search-field .search-glyph {
  position: absolute;
  top: 11px;
  left: 13px;
  color: var(--muted);
}

.ask-shell {
  display: grid;
  height: min(720px, calc(100vh - 130px));
  min-height: 520px;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.ask-head {
  display: flex;
  padding: 20px;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
}

.logo-orb {
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid rgba(49, 195, 189, 0.4);
  border-radius: 15px;
}

.logo-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-feed {
  display: flex;
  padding: 22px;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.chat-message {
  max-width: min(82%, 620px);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 17px 17px 17px 5px;
  background: var(--surface-2);
  color: #d9e0de;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-message.user {
  margin-left: auto;
  border-color: rgba(49, 195, 189, 0.24);
  border-radius: 17px 17px 5px;
  background: #176b6c;
  color: #fff;
}

.chat-compose {
  display: flex;
  padding: 14px;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: rgba(13, 17, 18, 0.45);
}

.chat-compose input {
  min-width: 0;
  height: 46px;
  padding: 0 15px;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
}

.settings-group {
  padding: 18px;
}

.settings-item {
  cursor: default;
}

.settings-item.clickable {
  cursor: pointer;
}

.settings-item .settings-copy {
  min-width: 0;
  flex: 1;
}

.settings-item .settings-copy strong,
.settings-item .settings-copy small {
  display: block;
}

.settings-item .settings-copy small {
  margin-top: 4px;
  color: var(--muted);
}

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

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #384346;
  cursor: pointer;
  transition: 160ms ease;
}

.switch span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #d8dcd8;
  content: '';
  transition: 160ms ease;
}

.switch input:checked + span {
  background: #2c8d52;
}

.switch input:checked + span::after {
  transform: translateX(20px);
  background: #fff;
}

.tariff-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(49, 195, 189, 0.25), transparent 12rem),
    linear-gradient(145deg, #202c2f, #151b1d);
}

.tariff-card::after {
  position: absolute;
  right: -35px;
  bottom: -70px;
  width: 180px;
  height: 180px;
  border: 30px solid rgba(234, 223, 201, 0.05);
  border-radius: 50%;
  content: '';
}

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

.tariff-name {
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.tariff-features {
  display: grid;
  margin: 18px 0;
  gap: 8px;
}

.tariff-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccd5d3;
}

.tariff-feature::before {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  content: '✓';
  font-size: 11px;
  font-weight: 900;
}

.rule-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.empty-state {
  display: grid;
  min-height: 190px;
  padding: 24px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted-2);
}

.empty-state h3 {
  color: var(--ink);
}

.empty-state p {
  max-width: 390px;
  margin-bottom: 0;
  line-height: 1.5;
}

.demo-banner {
  display: flex;
  max-width: var(--content);
  margin: 0 auto 18px;
  padding: 12px 14px;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(226, 184, 110, 0.28);
  border-radius: 14px;
  background: var(--amber-soft);
}

.demo-banner .status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(226, 184, 110, 0.1);
}

.demo-banner strong,
.demo-banner small {
  display: block;
}

.demo-banner small {
  margin-top: 2px;
  color: var(--paper-muted);
}

.splash-card {
  display: grid;
  min-height: calc(100vh - 100px);
  place-items: center;
  align-content: center;
  gap: 16px;
  color: var(--muted);
}

.splash-card img {
  width: 110px;
  height: 110px;
  border-radius: 30px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.loader {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--teal-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.skeleton-block {
  position: relative;
  overflow: hidden;
}

.skeleton-block:empty::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  content: '';
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 24px;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(24, 31, 33, 0.96);
  box-shadow: var(--shadow);
  color: var(--ink);
  animation: toast-in 220ms ease both;
}

.toast.success {
  border-color: rgba(105, 198, 112, 0.35);
}

.toast.error {
  border-color: rgba(230, 108, 92, 0.42);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  padding: 20px;
  align-items: center;
  justify-content: center;
  background: rgba(3, 6, 7, 0.72);
  backdrop-filter: blur(8px);
  animation: fade-in 160ms ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal-sheet {
  display: flex;
  width: min(540px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--bg-raised);
  box-shadow: var(--shadow);
  animation: modal-in 220ms ease both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

.modal-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  padding: 20px 20px 14px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(var(--bg-raised) 75%, transparent);
}

.modal-head h2 {
  margin: 0;
}

.modal-body {
  overflow-y: auto;
  padding: 10px 20px 20px;
  overscroll-behavior: contain;
}

.modal-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  padding: 14px 20px 20px;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  background: linear-gradient(transparent, var(--bg-raised) 24%);
}

.modal-actions .full:last-child {
  grid-column: 1 / -1;
}

.transaction-detail {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 52%), var(--surface);
}

.transaction-detail-hero {
  position: relative;
  padding: 24px 22px 22px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.transaction-detail-hero::after {
  position: absolute;
  top: -50px;
  right: -45px;
  width: 150px;
  height: 150px;
  border: 24px solid rgba(49, 195, 189, 0.05);
  border-radius: 50%;
  content: '';
}

.transaction-detail.expense .transaction-detail-hero::after {
  border-color: rgba(230, 108, 92, 0.06);
}

.transaction-detail-kind {
  display: inline-flex;
  min-height: 27px;
  padding: 0 10px;
  align-items: center;
  border: 1px solid rgba(105, 198, 112, 0.24);
  border-radius: 999px;
  background: var(--green-soft);
  color: #86dd8b;
  font-size: 11px;
  font-weight: 800;
}

.transaction-detail.expense .transaction-detail-kind {
  border-color: rgba(230, 108, 92, 0.24);
  background: var(--red-soft);
  color: #ff9183;
}

.transaction-detail-hero strong,
.transaction-detail-hero small {
  position: relative;
  z-index: 1;
  display: block;
}

.transaction-detail-hero strong {
  margin-top: 17px;
  color: #86dd8b;
  font-size: clamp(34px, 8vw, 46px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.transaction-detail.expense .transaction-detail-hero strong {
  color: #ff9183;
}

.transaction-detail-hero small {
  margin-top: 11px;
  color: var(--paper-muted);
  font-size: 14px;
  font-weight: 700;
}

.transaction-detail-grid {
  display: grid;
  padding: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.transaction-detail-grid > div,
.transaction-detail-note {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
}

.transaction-detail-grid span,
.transaction-detail-grid strong,
.transaction-detail-note span {
  display: block;
}

.transaction-detail-grid span,
.transaction-detail-note span {
  color: var(--muted);
  font-size: 11px;
}

.transaction-detail-grid strong {
  margin-top: 6px;
  font-size: 14px;
}

.transaction-detail-note {
  margin: 0 15px 15px;
}

.transaction-detail-note p {
  margin: 7px 0 0;
  color: var(--paper-muted);
  line-height: 1.45;
}

.transaction-detail-note.empty p {
  color: var(--muted-2);
}

.calendar-detail {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 50%), var(--surface);
}

.calendar-detail-hero {
  position: relative;
  padding: 22px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.calendar-detail-hero::after {
  position: absolute;
  top: -48px;
  right: -40px;
  width: 145px;
  height: 145px;
  border: 24px solid rgba(49, 195, 189, 0.055);
  border-radius: 50%;
  content: '';
}

.calendar-detail.reminder .calendar-detail-hero::after {
  border-color: rgba(226, 184, 110, 0.07);
}

.calendar-detail-kind {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 27px;
  padding: 0 10px;
  align-items: center;
  border: 1px solid rgba(49, 195, 189, 0.25);
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 800;
}

.calendar-detail.reminder .calendar-detail-kind {
  border-color: rgba(226, 184, 110, 0.25);
  background: var(--amber-soft);
  color: var(--amber);
}

.calendar-detail-hero h3,
.calendar-detail-hero p {
  position: relative;
  z-index: 1;
}

.calendar-detail-hero h3 {
  margin: 17px 0 7px;
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.calendar-detail-hero p {
  margin: 0;
  color: var(--paper-muted);
}

.calendar-detail-grid {
  display: grid;
  padding: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.calendar-detail-grid > div,
.calendar-detail-note {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
}

.calendar-detail-grid span,
.calendar-detail-grid strong,
.calendar-detail-note span {
  display: block;
}

.calendar-detail-grid span,
.calendar-detail-note span {
  color: var(--muted);
  font-size: 11px;
}

.calendar-detail-grid strong {
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.calendar-detail-note {
  margin: 0 15px 12px;
}

.calendar-detail-note p {
  margin: 7px 0 0;
  color: var(--paper-muted);
  line-height: 1.45;
}

.calendar-detail-hint {
  margin: 0;
  padding: 4px 16px 16px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.45;
}

.form-context {
  padding: 13px 14px;
  border: 1px solid rgba(49, 195, 189, 0.2);
  border-radius: 14px;
  background: var(--teal-soft);
}

.form-context span,
.form-context strong {
  display: block;
}

.form-context span {
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 800;
}

.form-context strong {
  margin-top: 5px;
}

.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid.two {
  grid-template-columns: 1fr 1fr;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: var(--paper-muted);
  font-size: 12px;
  font-weight: 750;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(49, 195, 189, 0.55);
  box-shadow: 0 0 0 3px rgba(49, 195, 189, 0.08);
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
}

.category-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.category-picker legend {
  margin-bottom: 9px;
  color: var(--paper-muted);
  font-size: 12px;
  font-weight: 750;
}

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

.category-choice {
  min-width: 0;
  cursor: pointer;
}

.category-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.category-choice span {
  display: flex;
  min-height: 42px;
  padding: 9px 11px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--paper-muted);
  font-size: 13px;
  font-weight: 720;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: 150ms ease;
}

.transaction-form.income .category-choice input:checked + span {
  border-color: rgba(105, 198, 112, 0.62);
  background: rgba(105, 198, 112, 0.14);
  color: #9ae99f;
  box-shadow: 0 0 0 2px rgba(105, 198, 112, 0.08);
}

.transaction-form.expense .category-choice input:checked + span {
  border-color: rgba(230, 108, 92, 0.62);
  background: rgba(230, 108, 92, 0.14);
  color: #ff9a8d;
  box-shadow: 0 0 0 2px rgba(230, 108, 92, 0.08);
}

.category-choice input:focus-visible + span {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
}

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

.preview-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.preview-item strong,
.preview-item span {
  display: block;
}

.preview-item span {
  margin-top: 6px;
  color: var(--paper-muted);
  line-height: 1.45;
}

.admin-system-card {
  display: flex;
  min-height: 76px;
  padding: 17px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-color: rgba(105, 198, 112, 0.22);
  background: linear-gradient(100deg, rgba(105, 198, 112, 0.1), rgba(49, 195, 189, 0.035));
}

.admin-system-card.warning {
  border-color: rgba(226, 184, 110, 0.28);
  background: linear-gradient(100deg, rgba(226, 184, 110, 0.1), rgba(230, 108, 92, 0.035));
}

.admin-system-status {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.admin-system-status strong,
.admin-system-status small {
  display: block;
}

.admin-system-status small {
  margin-top: 4px;
  color: var(--muted);
}

.admin-status-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(105, 198, 112, 0.1);
}

.admin-system-card.warning .admin-status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 7px rgba(226, 184, 110, 0.1);
}

.status-badge.success,
.chip.success {
  border-color: rgba(105, 198, 112, 0.24);
  background: var(--green-soft);
  color: #86dd8b;
}

.status-badge.warning {
  border-color: rgba(226, 184, 110, 0.24);
  background: var(--amber-soft);
  color: var(--amber);
}

.status-badge.danger {
  border-color: rgba(230, 108, 92, 0.24);
  background: var(--red-soft);
  color: #ff9183;
}

.admin-kpi-grid {
  display: grid;
  margin-top: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-kpi {
  display: grid;
  min-width: 0;
  min-height: 122px;
  padding: 17px;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-kpi small,
.admin-kpi strong,
.admin-kpi div > span {
  display: block;
}

.admin-kpi small {
  color: var(--muted);
  font-size: 12px;
}

.admin-kpi strong {
  margin-top: 6px;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.035em;
}

.admin-kpi div > span {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.35;
}

.admin-panel-grid {
  display: grid;
  margin-top: 16px;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: 16px;
}

.admin-panel {
  min-width: 0;
  height: 100%;
}

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

.admin-panel-head h2,
.admin-panel-head .eyebrow {
  margin-bottom: 0;
}

.admin-panel-head h2 {
  font-size: 22px;
}

.admin-progress-list {
  display: grid;
  gap: 18px;
}

.admin-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.admin-progress-head span {
  color: var(--teal-bright);
  font-size: 13px;
  font-weight: 800;
}

.admin-progress-track {
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.admin-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright));
}

.admin-progress > small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.admin-note {
  display: flex;
  margin-top: 20px;
  padding: 13px;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(49, 195, 189, 0.18);
  border-radius: 14px;
  background: var(--teal-soft);
}

.admin-note strong {
  color: var(--teal-bright);
  font-size: 25px;
}

.admin-note span {
  color: #b8c6c5;
  font-size: 11px;
  line-height: 1.4;
}

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

.admin-data-grid > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}

.admin-data-grid small,
.admin-data-grid strong {
  display: block;
}

.admin-data-grid small {
  color: var(--muted);
  font-size: 11px;
}

.admin-data-grid strong {
  margin-top: 7px;
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-data-grid.compact strong {
  font-size: 22px;
}

.admin-caption {
  margin: 13px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.45;
}

.admin-report {
  margin-top: 12px;
  font-size: 13px;
}

.admin-section {
  margin-top: 24px;
}

.admin-section > .section-head {
  align-items: flex-end;
}

.admin-section > .section-head .eyebrow {
  margin-bottom: 4px;
}

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

.admin-plan-card {
  display: flex;
  min-width: 0;
  padding: 18px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(49, 195, 189, 0.06), transparent 48%), var(--surface);
}

.admin-plan-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-plan-head .item-main > small {
  margin-top: 5px;
  color: var(--muted);
}

.admin-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-title-line strong {
  font-size: 17px;
}

.admin-chip-row {
  display: flex;
  min-height: 27px;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-plan-limit {
  margin: 12px 0 14px;
  color: var(--paper-muted);
  font-size: 12px;
}

.admin-plan-card .btn {
  margin-top: auto;
}

.admin-last-grid {
  margin-top: 24px;
}

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

.admin-source-list > div {
  display: flex;
  min-height: 42px;
  padding: 0 13px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.admin-source-list strong {
  color: var(--teal-bright);
}

.admin-feedback-list {
  display: grid;
  gap: 9px;
}

.admin-feedback {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
}

.admin-feedback p {
  margin: 9px 0;
  color: var(--paper-muted);
  line-height: 1.45;
}

.admin-feedback > small,
.admin-empty small {
  color: var(--muted-2);
}

.admin-empty {
  display: flex;
  padding: 14px;
  align-items: center;
  gap: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.admin-empty strong,
.admin-empty small {
  display: block;
}

.admin-empty small {
  margin-top: 4px;
}

.voice-root {
  pointer-events: none;
}

.voice-root.ready .voice-fab {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.voice-fab {
  position: fixed;
  z-index: 64;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: 62px;
  height: 62px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(77, 225, 215, 0.52);
  border-radius: 50%;
  background: linear-gradient(145deg, #2a9d99, #166e70);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.42),
    0 0 0 7px rgba(49, 195, 189, 0.08);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px) scale(0.94);
  touch-action: none;
  user-select: none;
  transition:
    bottom 220ms ease,
    opacity 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.voice-fab-icon,
.voice-fab-icon svg {
  width: 27px;
  height: 27px;
}

.voice-fab-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.voice-fab-label {
  position: absolute;
  right: 72px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 24, 25, 0.94);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  color: var(--paper-muted);
  font-size: 11px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateX(5px);
  white-space: nowrap;
  transition: 150ms ease;
}

.voice-fab:hover .voice-fab-label,
.voice-fab:focus-visible .voice-fab-label {
  opacity: 1;
  transform: none;
}

.voice-root.active .voice-fab {
  right: 34px;
  bottom: 34px;
  border-color: rgba(255, 128, 113, 0.62);
  background: linear-gradient(145deg, #d75c50, #9d3c35);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.45),
    0 0 0 9px rgba(230, 108, 92, 0.12);
}

.voice-root.recording .voice-fab {
  animation: voice-fab-pulse 1.4s ease-in-out infinite;
}

.voice-root.processing .voice-fab,
.voice-root.result .voice-fab,
.voice-root.editor .voice-fab,
.voice-root.error .voice-fab {
  opacity: 0;
  transform: scale(0.82);
  pointer-events: none;
}

@keyframes voice-fab-pulse {
  50% {
    box-shadow:
      0 14px 34px rgba(0, 0, 0, 0.45),
      0 0 0 16px rgba(230, 108, 92, 0.035);
    transform: scale(1.04);
  }
}

.voice-scrim {
  position: fixed;
  z-index: 60;
  inset: 0;
  border: 0;
  background: rgba(2, 5, 6, 0.52);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
  transition: opacity 180ms ease;
}

.voice-panel {
  position: fixed;
  z-index: 61;
  right: 18px;
  bottom: 18px;
  width: min(540px, calc(100vw - 36px));
  height: min(340px, 36dvh);
  min-height: 270px;
  overflow: hidden;
  border: 1px solid rgba(49, 195, 189, 0.28);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 10%, rgba(49, 195, 189, 0.14), transparent 40%),
    rgba(17, 24, 25, 0.98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(100% + 30px));
  transition:
    transform 240ms cubic-bezier(0.22, 0.74, 0.2, 1),
    opacity 180ms ease;
}

.voice-root.active .voice-scrim {
  opacity: 1;
  pointer-events: auto;
}

.voice-root.active .voice-panel {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.voice-root.result .voice-panel,
.voice-root.editor .voice-panel,
.voice-root.error .voice-panel {
  height: auto;
  max-height: min(760px, 78dvh);
}

.voice-panel-body {
  height: 100%;
  padding: 24px 104px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.voice-root.processing .voice-panel-body,
.voice-root.result .voice-panel-body,
.voice-root.editor .voice-panel-body,
.voice-root.error .voice-panel-body {
  padding-right: 24px;
}

.voice-panel-head,
.voice-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.voice-panel-head h2,
.voice-result-head h2 {
  margin: 0;
}

.voice-result-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-live {
  display: grid;
  margin-top: 22px;
  gap: 13px;
}

.voice-waveform {
  display: block;
  width: 100%;
  height: 78px;
}

.voice-live-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.voice-live-meta strong {
  min-width: 40px;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.voice-live-meta span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-recording-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ff7568;
  box-shadow: 0 0 0 5px rgba(230, 108, 92, 0.1);
  animation: voice-dot 1s ease-in-out infinite;
}

@keyframes voice-dot {
  50% {
    opacity: 0.38;
  }
}

.voice-requesting {
  display: grid;
  height: 100%;
  align-items: center;
  grid-template-columns: 68px 1fr;
  gap: 18px;
}

.voice-requesting h2,
.voice-requesting p:last-child {
  margin-bottom: 0;
}

.voice-requesting p:last-child {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.voice-orb {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid rgba(49, 195, 189, 0.32);
  border-radius: 24px;
  background: var(--teal-soft);
  color: var(--teal-bright);
}

.voice-orb svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.voice-processing {
  display: grid;
  height: 100%;
  place-content: center;
  text-align: center;
}

.voice-processing-mark {
  display: flex;
  height: 58px;
  margin: 0 auto 20px;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.voice-processing-mark span {
  width: 5px;
  height: 18px;
  border-radius: 999px;
  background: var(--teal-bright);
  animation: voice-processing 0.9s ease-in-out infinite alternate;
}

.voice-processing-mark span:nth-child(2),
.voice-processing-mark span:nth-child(4) {
  animation-delay: -0.25s;
}

.voice-processing-mark span:nth-child(3) {
  animation-delay: -0.5s;
}

@keyframes voice-processing {
  to {
    height: 52px;
    opacity: 0.42;
  }
}

.voice-processing h2 {
  margin: 0;
}

.voice-steps {
  display: flex;
  margin-top: 24px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.voice-steps span {
  display: inline-flex;
  padding: 7px 9px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 10px;
}

.voice-steps svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.voice-steps span.active {
  border-color: rgba(49, 195, 189, 0.34);
  background: var(--teal-soft);
  color: var(--teal-bright);
}

.voice-steps span.done {
  color: #86dd8b;
}

.voice-transcript,
.voice-understood,
.voice-edit-field {
  margin-top: 18px;
}

.voice-transcript blockquote {
  margin: 0;
  padding: 15px 16px;
  border-left: 3px solid var(--teal-bright);
  border-radius: 0 14px 14px 0;
  background: rgba(49, 195, 189, 0.07);
  color: var(--paper);
  line-height: 1.5;
}

.voice-warning {
  margin: 9px 0 0;
  color: var(--amber);
  font-size: 12px;
}

.voice-understood .preview-item {
  padding: 12px 13px;
}

.voice-question,
.voice-error-card {
  display: grid;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(226, 184, 110, 0.22);
  border-radius: 14px;
  background: var(--amber-soft);
  gap: 5px;
}

.voice-question span,
.voice-error-card p {
  margin: 0;
  color: var(--paper-muted);
  font-size: 13px;
  line-height: 1.45;
}

.voice-error-card {
  grid-template-columns: 34px 1fr;
  align-items: center;
  border-color: rgba(230, 108, 92, 0.24);
  background: var(--red-soft);
}

.voice-error-card > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(230, 108, 92, 0.2);
  color: #ff9a8d;
  font-weight: 900;
}

.voice-result-actions {
  position: sticky;
  bottom: -24px;
  display: grid;
  margin: 20px -4px -24px;
  padding: 14px 4px calc(24px + env(safe-area-inset-bottom));
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  background: linear-gradient(transparent, var(--bg-raised) 24%);
}

.voice-edit-field textarea {
  min-height: 150px;
}

body.voice-open {
  overflow: hidden;
}

body.admin-route .voice-fab {
  display: none;
}

@media (max-width: 980px) {
  .desktop-sidebar {
    width: 226px;
  }

  .app-main {
    width: calc(100% - 226px);
    margin-left: 226px;
    padding: 28px 22px 74px;
  }

  .hero-grid,
  .content-grid,
  .finance-layout,
  .calendar-layout,
  .notes-layout,
  .more-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .today-dashboard {
    grid-template-areas:
      'schedule'
      'stats'
      'insight';
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    background:
      radial-gradient(circle at 100% 0, rgba(29, 152, 152, 0.14), transparent 24rem), var(--bg);
  }

  .desktop-sidebar {
    display: none;
  }

  .app-main {
    width: 100%;
    margin-left: 0;
    padding: calc(72px + env(safe-area-inset-top)) 14px calc(92px + env(safe-area-inset-bottom));
  }

  .screen,
  .hero-grid,
  .capture-card,
  .smart-input {
    min-width: 0;
    max-width: 100%;
  }

  .mobile-header {
    position: fixed;
    z-index: 30;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    height: calc(62px + env(safe-area-inset-top));
    padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(13, 17, 18, 0.86);
    backdrop-filter: blur(22px);
  }

  .brand-lockup.compact {
    width: auto;
    padding: 0;
  }

  .brand-lockup.compact img {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .brand-lockup.compact strong {
    font-size: 14px;
  }

  .brand-lockup.compact small {
    max-width: 150px;
  }

  .avatar-button {
    padding: 0;
    border: 1px solid rgba(49, 195, 189, 0.35);
  }

  .bottom-navigation {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: calc(68px + env(safe-area-inset-bottom));
    padding: 7px 8px env(safe-area-inset-bottom);
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(13, 17, 18, 0.93);
    backdrop-filter: blur(24px);
  }

  .bottom-navigation .nav-item {
    min-width: 0;
    min-height: 54px;
    padding: 5px 2px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 12px;
    font-size: 10px;
  }

  .bottom-navigation .nav-item.active::before {
    top: 1px;
    right: calc(50% - 10px);
    left: auto;
    width: 20px;
    height: 3px;
    border-radius: 0 0 6px 6px;
  }

  .bottom-navigation .nav-icon svg {
    width: 21px;
    height: 21px;
  }

  .page-head {
    margin-bottom: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

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

  .page-head .header-actions .btn {
    flex: 1;
  }

  h1 {
    font-size: 31px;
  }

  .hero-grid {
    gap: 10px;
  }

  .capture-card {
    min-height: 250px;
    padding: 21px;
  }

  .capture-card h2 {
    font-size: 27px;
  }

  .smart-input {
    flex-direction: column;
  }

  .smart-input .btn {
    width: 100%;
  }

  .day-ring-card {
    min-height: 150px;
  }

  .day-number {
    font-size: 50px;
  }

  .day-date {
    gap: 11px;
  }

  .day-month {
    font-size: 23px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .stat-card {
    min-height: 88px;
    padding: 14px;
    grid-template-columns: 38px 1fr;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
  }

  .stat-card strong {
    margin-top: 3px;
    font-size: 19px;
  }

  .money-card {
    min-height: 116px;
    padding: 17px;
  }

  .money-card strong {
    margin-top: 10px;
    font-size: 25px;
  }

  .balance-hero {
    min-height: 174px;
    padding: 20px;
  }

  .balance-value {
    margin-top: 22px;
    font-size: 42px;
  }

  .money-flow-grid {
    gap: 9px;
  }

  .card-pad,
  .insight-card {
    padding: 18px;
  }

  .calendar-card {
    padding: 12px;
  }

  .calendar-grid {
    gap: 3px;
  }

  .calendar-day {
    min-height: 37px;
    border-radius: 10px;
  }

  .transaction-item .amount {
    min-width: auto;
    align-self: flex-start;
    padding-top: 2px;
    font-size: 14px;
  }

  .transaction-item {
    padding: 13px 12px;
    align-items: flex-start;
    gap: 10px;
  }

  .transaction-sign {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .transaction-item .item-main strong {
    padding-right: 4px;
  }

  .report-card {
    padding: 18px;
  }

  .ask-shell {
    height: calc(100vh - 154px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: 430px;
  }

  .chat-feed {
    padding: 15px;
  }

  .chat-message {
    max-width: 90%;
  }

  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-sheet {
    width: 100%;
    max-height: calc(94dvh - env(safe-area-inset-top));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
  }

  .modal-actions {
    flex: 0 0 auto;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .field-grid.two {
    grid-template-columns: 1fr;
  }

  .toast-region {
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .voice-fab {
    right: 14px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: 58px;
    height: 58px;
  }

  .voice-fab-label {
    display: none;
  }

  .voice-root.active .voice-fab {
    right: 20px;
    bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .voice-panel {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: max(270px, 34dvh);
    min-height: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 26px 26px 0 0;
  }

  .voice-root.result .voice-panel,
  .voice-root.editor .voice-panel,
  .voice-root.error .voice-panel {
    max-height: calc(84dvh - env(safe-area-inset-top));
  }

  .voice-panel-body {
    padding: 22px 92px calc(20px + env(safe-area-inset-bottom)) 20px;
  }

  .voice-root.processing .voice-panel-body,
  .voice-root.result .voice-panel-body,
  .voice-root.editor .voice-panel-body,
  .voice-root.error .voice-panel-body {
    padding-right: 20px;
  }

  .voice-panel-head h2,
  .voice-result-head h2 {
    font-size: 23px;
  }

  .voice-waveform {
    height: 72px;
  }

  .voice-live-meta span:last-child {
    white-space: normal;
  }

  .voice-requesting {
    grid-template-columns: 58px 1fr;
    gap: 14px;
  }

  .voice-orb {
    width: 58px;
    height: 58px;
    border-radius: 20px;
  }

  .voice-steps {
    margin-top: 18px;
    gap: 6px;
  }

  .voice-steps span {
    padding: 6px 7px;
    font-size: 9px;
  }

  .voice-result-actions {
    bottom: calc(-20px - env(safe-area-inset-bottom));
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .demo-banner {
    margin-bottom: 12px;
  }
}

@media (max-width: 980px) {
  .admin-kpi-grid,
  .admin-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-system-card {
    padding: 15px;
    align-items: flex-start;
  }

  .admin-system-status {
    align-items: flex-start;
  }

  .admin-system-status small {
    font-size: 11px;
    line-height: 1.4;
  }

  .admin-system-card > .status-badge {
    display: none;
  }

  .admin-kpi-grid {
    gap: 8px;
  }

  .admin-kpi {
    min-height: 112px;
    padding: 13px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
  }

  .admin-kpi .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .admin-kpi strong {
    font-size: 22px;
  }

  .admin-kpi div > span {
    font-size: 10px;
  }

  .admin-panel-grid {
    gap: 12px;
  }

  .admin-panel,
  .admin-plan-card {
    padding: 17px;
  }

  .admin-panel-head {
    margin-bottom: 16px;
  }

  .admin-panel-head h2 {
    font-size: 20px;
  }

  .admin-data-grid > div {
    padding: 12px;
  }

  .admin-plan-grid {
    grid-template-columns: 1fr;
  }

  .admin-section {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
