:root {
  --bg: #f7f5f0;
  --chat-bg: #efeae2;
  --surface: #ffffff;
  --surface-muted: #f2efe9;
  --primary: #1b7a58;
  --primary-dark: #145e43;
  --primary-soft: #dcf3e8;
  --primary-border: #b8e2ce;
  --text: #1c2421;
  --text-muted: #5d6a64;
  --border: #e2ddd4;
  --danger: #c43c35;
  --danger-soft: #fdecea;
  --warn-bg: #fff4df;
  --warn-text: #8c5a00;
  --radius: 14px;
  --shadow: 0 2px 8px rgba(24, 39, 33, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Loading & Login */
.center-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 12px;
}

.brand-logo-lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.brand-logo-sm {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow);
}

.login-title {
  margin: 14px 0 4px;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.login-subtitle {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.login-note {
  margin: 18px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* App Shell */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--primary);
  color: #ffffff;
  flex-shrink: 0;
}

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

.header-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.user-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.tab-panel {
  flex: 1;
  min-height: 0;
}

.tab-today {
  display: flex;
  flex-direction: column;
  background: var(--chat-bg);
}

.tab-scroll {
  overflow-y: auto;
  padding: 14px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Date bar */
.date-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.date-bar-center {
  text-align: center;
}

.date-label {
  font-weight: 700;
  font-size: 0.92rem;
}

.date-spend {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-dark);
}

/* Chat feed */
.chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

.empty-state {
  margin: auto;
  text-align: center;
  max-width: 280px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.empty-state-title {
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.bubble-row {
  display: flex;
  width: 100%;
}

.bubble-row.is-me {
  justify-content: flex-end;
}

.bubble-row.is-partner {
  justify-content: flex-start;
}

.meal-bubble {
  max-width: 86%;
  min-width: 200px;
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.bubble-row.is-me .meal-bubble {
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-bottom-right-radius: 4px;
}

.bubble-row.is-partner .meal-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.meal-bubble.swipe-peek {
  transform: translateX(18px);
}

.meal-bubble.swipe-ready {
  transform: translateX(42px);
  box-shadow: 0 4px 14px rgba(27, 122, 88, 0.22);
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.bubble-author {
  font-weight: 700;
  color: var(--primary-dark);
}

.bubble-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-alias {
  background: var(--surface);
  color: var(--primary-dark);
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 600;
}

.bubble-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  word-break: break-word;
}

.bubble-raw {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  word-break: break-word;
}

.bubble-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.bubble-price {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

.bubble-price.is-empty {
  font-weight: 500;
  color: var(--text-muted);
  font-style: italic;
}

.bubble-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bubble-action-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(28, 36, 33, 0.1);
  color: var(--text-muted);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
}

.bubble-action-btn:active {
  background: var(--surface);
  color: var(--primary-dark);
}

.nutrition-pill {
  margin-top: 7px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(28, 36, 33, 0.08);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.pending-row {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pending-pill {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.74rem;
  font-weight: 600;
}

.retry-btn {
  background: var(--surface);
  color: var(--primary-dark);
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.retry-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Composer */
.composer-wrap {
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--primary-soft);
  border-bottom: 1px solid var(--primary-border);
  border-left: 4px solid var(--primary);
}

.reply-bar-body {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
}

.reply-bar-label {
  font-weight: 700;
  color: var(--primary-dark);
  flex-shrink: 0;
}

.reply-target-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.photo-preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
}

.photo-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.photo-preview-name {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.composer-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.composer-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.94rem;
}

.composer-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
  background: var(--surface);
}

.composer-send-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* Summary */
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
}

.seg-btn.is-active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow);
}

.hero-card {
  background: var(--primary);
  color: #ffffff;
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.hero-caption {
  font-size: 0.82rem;
  opacity: 0.9;
}

.hero-amount {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 4px 0;
}

.hero-range {
  font-size: 0.78rem;
  opacity: 0.85;
}

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

.user-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}

.user-stat-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.user-stat-spend {
  font-size: 1.08rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.user-stat-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.summary-list,
.alias-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.summary-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.summary-item-main {
  min-width: 0;
}

.summary-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  word-break: break-word;
}

.summary-item-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.summary-item-price {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--primary-dark);
  flex-shrink: 0;
}

/* Cards & Forms */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0 0 8px;
  font-size: 0.98rem;
  font-weight: 700;
}

.card-desc {
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

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

.muted-label {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.muted-text {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

.stack-md {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.text-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

.text-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
  background: var(--surface);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:active {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--surface-muted);
  color: var(--text);
  border-color: var(--border);
}

.btn-danger-outline {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #f3c4c1;
}

.btn-sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.icon-btn-sm {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  background: rgba(28, 36, 33, 0.08);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.status-pill {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--surface-muted);
  color: var(--text-muted);
}

.status-pill.is-on {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.alias-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.alias-text {
  font-size: 0.86rem;
  min-width: 0;
  word-break: break-word;
}

.alias-key {
  font-weight: 700;
  color: var(--primary-dark);
}

.form-error {
  margin: 0;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.84rem;
}

/* Bottom Nav */
.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  flex-shrink: 0;
}

.nav-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 4px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.nav-btn.is-active {
  color: var(--primary);
  font-weight: 700;
}

.nav-icon {
  font-size: 1.15rem;
  line-height: 1.1;
}

.nav-label {
  font-size: 0.72rem;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 21, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  z-index: 40;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 18px;
  padding: 18px 16px;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-header .card-title {
  margin: 0;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%);
  background: #1c2421;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  max-width: calc(100% - 32px);
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
  z-index: 50;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
  }
}

/* Compact 1-line macro row & on-demand illustration card */
.summary-item-macros {
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.illust-card {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.illust-card.is-chat {
  margin-top: 8px;
}

.illust-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.illust-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
}

.illust-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.illust-scopes {
  display: inline-flex;
  gap: 4px;
  background: var(--surface-muted);
  padding: 3px;
  border-radius: 999px;
}

.illust-scope-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.illust-scope-btn.is-active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.illust-img-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.illust-img {
  width: 100%;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  background: var(--surface-muted);
}

.illust-caption {
  font-size: 0.74rem;
  color: var(--text-muted);
}

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

.illust-model-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.illust-model-select {
  flex: 1;
  min-width: 0;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.76rem;
}

.illust-img.is-portrait {
  aspect-ratio: 9 / 16;
}

.illust-img.is-landscape {
  aspect-ratio: 16 / 9;
}

.illust-saved-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.illust-saved-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.illust-saved-title {
  font-weight: 700;
  color: var(--text);
}

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

.collage-item {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.collage-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--surface);
}

.collage-body {
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.collage-date {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
}

.collage-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.collage-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.collage-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 6px;
}

/* Compact 1-block illustration link strip for Chat & Summary */
.illust-compact-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.illust-compact-strip:active {
  background: var(--surface-muted);
}

.illust-compact-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.illust-compact-thumbs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.illust-compact-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: var(--surface-muted);
}

.illust-compact-text {
  min-width: 0;
}

.illust-compact-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.illust-compact-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.illust-compact-arrow {
  font-size: 1.15rem;
  color: var(--primary-dark);
  font-weight: 700;
  flex-shrink: 0;
}

.collage-thumb {
  cursor: pointer;
}

.image-modal-card {
  max-width: 440px;
}

.user-stat-card {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.user-stat-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(27, 122, 88, 0.16);
}

.breakdown-bar {
  margin: 8px 0 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-muted);
  font-size: 0.78rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.breakdown-top {
  font-weight: 700;
  color: var(--primary-dark);
}

.breakdown-macros {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.notif-config-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
}

.checkbox-row input[type='checkbox'] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
