﻿:root {
  --bg: #f2f5f8;
  --bg-soft: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --line: #e5ebf3;
  --text: #0f172a;
  --muted: #7f90ad;
  --muted-2: #9ba9bf;
  --primary: #30a2e3;
  --primary-strong: #1c95da;
  --danger: #f24848;
  --ok: #43b257;
  --warn: #f06a1f;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 30px;
  --shadow-soft: 0 2px 10px rgba(25, 40, 72, 0.05);
  --shadow-card: 0 1px 1px rgba(16, 24, 40, 0.02), 0 8px 20px rgba(16, 24, 40, 0.04);
  --shadow-primary: 0 10px 24px rgba(48, 162, 227, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", "SF Pro Text", system-ui, sans-serif;
}

body.dark {
  --bg: #0f172a;
  --bg-soft: #111d35;
  --surface: #1a2436;
  --surface-soft: #1f2a3f;
  --line: #28354c;
  --text: #edf3ff;
  --muted: #9eb2d1;
  --muted-2: #889ab7;
  --primary: #4eb9ef;
  --primary-strong: #4eb9ef;
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.16);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.22);
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  line-height: 1;
  vertical-align: middle;
}

.hidden {
  display: none !important;
}

#app {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px calc(108px + env(safe-area-inset-bottom));
  min-height: calc(100dvh - 84px);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-header {
  padding: 2px 2px 14px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(30px, 7vw, 40px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.page-header .muted {
  margin-top: 4px;
  display: block;
}

.detail-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  margin-bottom: 8px;
}

.detail-header h1 {
  font-size: clamp(20px, 5.2vw, 28px);
  margin: 0;
  line-height: 1.08;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.overview-header {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "back edit"
    "main main";
  align-items: center;
  row-gap: 10px;
}

.overview-head-main {
  grid-area: main;
  min-width: 0;
}

.overview-header .back-btn {
  grid-area: back;
}

.overview-edit-btn {
  grid-area: edit;
  justify-self: end;
  width: auto;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.96rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.overview-head-main h1 {
  margin: 0;
  font-size: clamp(17px, 4.8vw, 23px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.overview-head-main .muted {
  margin-top: 8px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

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

#events-list.stack {
  gap: 14px;
}

.section-label {
  margin: 10px 4px 8px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 700;
}

#view-events .page-header {
  display: none;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #eff4fb;
  color: #7f90ad;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.icon-btn.small {
  width: 34px;
  height: 34px;
}

.icon-btn .material-symbols-outlined {
  font-size: 21px;
}

.icon-btn.small .material-symbols-outlined {
  font-size: 18px;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 15px 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.btn.secondary {
  background: #eaf4fb;
  color: var(--primary-strong);
}

.btn.ghost {
  background: var(--surface-soft);
  color: #5e7090;
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
}

.search-row {
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  align-items: center;
  min-height: 34px;
  height: 34px;
  padding: 0;
  margin-bottom: 14px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9badc7;
}

.search-row input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.96rem;
  padding: 8px 72px 8px 38px;
}

#events-calendar-btn,
#search-clear {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #f2f6fc;
  color: #95a8c6;
}

#events-calendar-btn {
  right: 36px;
}

#search-clear {
  right: 6px;
}

#events-calendar-btn .material-symbols-outlined,
#search-clear .material-symbols-outlined {
  font-size: 17px;
  display: block;
  line-height: 1;
}

#events-calendar-btn.active {
  background: #e8f2ff;
  color: var(--primary-strong);
}

.events-date-filter-info {
  margin: -6px 2px 12px;
  color: #5f7494;
  font-size: 0.84rem;
  line-height: 1.25;
}

.date-filter-segmented {
  margin: 0 0 10px;
}

.date-filter-pane {
  display: block;
}

.quota-card {
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 14px;
}

.quota-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quota-top .muted {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted-2);
}

.quota-title {
  margin: 8px 0 12px;
  font-size: 0.98rem;
  color: #455b7a;
}

.quota-title b {
  color: var(--primary-strong);
  font-size: inherit;
  letter-spacing: 0;
  white-space: nowrap;
}

.quota-title .quota-limit-extra {
  color: var(--ok);
  font-weight: 700;
}

.progress {
  background: #e9eff8;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

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

.quota-foot {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #667e9f;
  font-size: 0.95rem;
}

.quota-foot .material-symbols-outlined {
  color: #8fa3bf;
  font-size: 18px;
}

.event-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 28px;
  padding: 16px;
  cursor: pointer;
}

.event-main {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.event-main-text {
  min-width: 0;
}

.event-card h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: 0;
  line-height: 1.18;
  font-weight: 300 !important;
}

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

.event-recognition-line {
  margin-top: 6px !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem !important;
  color: var(--primary-strong) !important;
  font-weight: 600;
}

.event-recognition-line .material-symbols-outlined {
  font-size: 14px;
  animation: recognition-spin 1.2s linear infinite;
}

.event-cat {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #eaf3ff;
  color: var(--primary-strong);
  flex: 0 0 auto;
}

.event-cat .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.event-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.event-side-top {
  text-align: right;
}

.event-total {
  font-size: 1.05rem;
  line-height: 1;
  color: var(--primary-strong);
  font-weight: 700;
}

.event-total-label {
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.56rem !important;
  color: var(--muted-2) !important;
  font-weight: 700;
}

.event-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.event-card-actions .icon-btn {
  width: 30px;
  height: 30px;
  background: transparent;
  color: #becadd;
}

.event-card-actions .icon-btn .material-symbols-outlined {
  font-size: 18px;
}

.fab {
  position: fixed;
  right: 22px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  width: 76px;
  height: 76px;
  border-radius: 999px;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.fab .material-symbols-outlined {
  font-size: 36px;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 36;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 8px;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted-2);
  display: grid;
  place-items: center;
  gap: 4px;
  font-size: 0.95rem;
  font-weight: 300 !important;
  padding: 6px 4px;
}

.tab > span {
  font-weight: 300 !important;
}

.tab.active {
  color: var(--primary-strong);
}

.tab .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: "FILL" 0, "wght" 200, "GRAD" 0, "opsz" 24 !important;
}

.tab.active .material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 200, "GRAD" 0, "opsz" 24 !important;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.summary-block {
  text-align: center;
  padding: 14px 10px;
  display: grid;
  gap: 4px;
}

.summary-block .muted {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.summary-block b {
  font-size: 1.42rem;
}

.ok {
  color: var(--ok);
}

.warn {
  color: var(--warn);
}

.overview-top-grid,
.split-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 10px;
  margin-bottom: 12px;
}

.checks-mini-card {
  display: grid;
  gap: 10px;
}

.checks-mini-list {
  display: flex;
  gap: 8px;
  align-items: center;
}

.checks-mini {
  min-width: 38px;
  width: 38px;
  height: 46px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f4f8ff;
  display: grid;
  place-items: center;
  color: #92a4c2;
}

.checks-mini .material-symbols-outlined {
  display: block;
  line-height: 1;
  margin: 0 auto;
  font-size: 22px;
}

button.checks-mini {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.checks-mini.muted {
  height: 38px;
  width: auto;
  min-width: 38px;
  padding: 0 8px;
  border-radius: 12px;
}

.totals-card {
  display: grid;
  gap: 8px;
}

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

.totals-row b {
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

.split-pay-card {
  text-align: right;
  display: grid;
  gap: 8px;
  align-content: center;
}

.split-pay-card b {
  font-size: 2.35rem;
  line-height: 1;
  color: var(--primary-strong);
}

.split-header h1 {
  font-size: clamp(15px, 4.2vw, 20px);
  line-height: 1.08;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.split-header .muted {
  margin-top: 2px;
}

.receipts-card {
  margin-bottom: 12px;
}

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

.receipts-head .muted {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.75rem;
  color: var(--muted-2);
  font-weight: 700;
}

.upload-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  overflow: hidden;
}

.upload-inline input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
}

.receipts-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.receipt-item {
  position: relative;
  width: 94px;
  min-width: 94px;
  height: 120px;
  border-radius: 16px;
  border: 1px dashed #cad8ea;
  background: #f3f7fd;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.receipt-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.receipt-type {
  font-size: 0.9rem;
  color: #627a9b;
  font-weight: 700;
}

.receipt-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #ff5757;
  color: #fff;
  display: grid;
  place-items: center;
}

.receipt-remove .material-symbols-outlined {
  font-size: 16px;
}

.fee-editor {
  margin-bottom: 12px;
}

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

.fee-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted-2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.fee-grid input {
  border: 0;
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  font-size: 1.52rem;
  font-weight: 700;
}

.fee-grid input[readonly] {
  cursor: pointer;
}

.segmented {
  background: #dfe7f2;
  border-radius: 18px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 2px 0 12px;
}

.segmented button {
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #6f85a7;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 8px;
  cursor: pointer;
}

.segmented button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(13, 23, 46, 0.06);
}

.participant-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border-radius: 22px;
}

.status-dot {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #cad6e7;
  align-self: start;
  margin-top: 1px;
}

.status-dot.paid {
  color: var(--ok);
}

.status-dot.need-check {
  color: var(--primary-strong);
}

.status-dot .material-symbols-outlined {
  font-size: 24px;
}

.participant-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.participant-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.participant-name-wrap h4 {
  margin: 0;
  font-size: 1.1rem;
}

.participant-main .muted {
  font-size: 0.93rem;
}

.participant-side {
  display: grid;
  justify-items: end;
  gap: 8px;
  align-self: start;
}

.participant-amount {
  font-size: 1.08rem;
}

.chip {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #f0f4fa;
  color: #8397b4;
  font-weight: 700;
}

.chip-ok {
  background: #e7f8eb;
  color: #37a94e;
}

.chip-info {
  background: #e9f4ff;
  color: #2f93e3;
}

.participant-payment-note {
  font-size: 0.84rem;
  line-height: 1.2;
}

.participant-expand {
  display: grid;
  gap: 8px;
}

.participant-expand .participant-row {
  cursor: pointer;
}

.participant-selection-details {
  margin: -2px 0 2px 38px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.participant-selection-title {
  margin: 0 0 8px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.participant-selection-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.participant-selection-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.participant-selection-name {
  min-width: 0;
  font-size: 0.95rem;
}

.participant-selection-qty {
  min-width: 52px;
  text-align: right;
  color: #7b8ea9;
  font-size: 0.86rem;
  font-weight: 700;
}

.participant-selection-list b {
  color: #4b617f;
  font-size: 0.95rem;
}

.participant-selection-empty {
  margin: 0;
  font-size: 0.92rem;
}

.participant-selection-total {
  margin: 8px 0 0;
  color: #5f7494;
  font-size: 0.88rem;
}

.compact-summary {
  border-radius: 18px;
  padding: 12px 14px;
}

.compact-summary p {
  margin: 0;
  color: #5f7494;
}

.mini-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-btn {
  width: auto;
  padding: 8px 14px;
  font-size: 0.92rem;
  border-radius: 12px;
}

.position-breakdown,
.split-position-card {
  border-radius: 22px;
}

.position-breakdown-rich {
  border: 1px solid var(--line);
}

.is-exhausted-position {
  opacity: 0.55;
  filter: saturate(0.7);
}

.is-exhausted-position .position-breakdown-head b,
.is-exhausted-position .split-position-amount {
  color: #7f90ad !important;
}

body.dark .is-exhausted-position {
  opacity: 0.62;
  filter: saturate(0.75);
}

.position-breakdown-row,
.split-position-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.split-position-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
}

.position-breakdown-index,
.split-position-index {
  min-width: 24px;
  font-size: 1.45rem;
  line-height: 1;
  color: #8ca0bc;
  font-weight: 700;
}

.position-breakdown-main,
.split-position-main {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 8px;
}

.position-breakdown-head,
.split-position-main h4 {
  margin: 0;
}

.position-breakdown-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.position-breakdown-head h4 {
  margin: 0;
  font-size: 1.12rem;
}

.position-breakdown-head b {
  font-size: 1.12rem;
  white-space: nowrap;
}

.position-breakdown-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.position-breakdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.position-breakdown-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.breakdown-person {
  min-width: 0;
  font-size: 1.06rem;
}

.breakdown-none {
  font-style: italic;
  color: var(--muted);
}

.breakdown-coeff {
  min-width: 44px;
  height: 30px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: #7d90ab;
  font-size: 0.88rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.breakdown-unselected-line {
  color: var(--muted);
  font-size: 0.95rem;
}

.breakdown-coeff-empty {
  min-width: 44px;
  height: 30px;
}

.breakdown-unselected-amount {
  color: #f06a1f !important;
  font-weight: 800;
}

.position-breakdown-list b {
  color: #4c617f;
  font-size: 1.04rem;
}

.split-position-main h4 {
  font-size: 1.08rem;
  line-height: 1.14;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.split-position-main .muted {
  font-size: 0.9rem;
  line-height: 1.16;
}

.split-position-main p {
  margin: 0;
}

.split-position-main .muted + .muted {
  margin-top: 1px;
}

.split-right {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 4px;
  min-width: 108px;
}

.split-coeff {
  width: 108px;
  min-width: 108px;
  height: 34px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: #647994;
  text-align: center;
  font-weight: 700;
  padding: 0 10px;
  font-size: 0.96rem;
}

.split-coeff:disabled {
  opacity: 0.7;
}

.split-coeff-stepper {
  width: 108px;
  min-width: 108px;
  height: 34px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  overflow: hidden;
}

.split-coeff-stepper .split-coeff {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0 6px;
}

.split-step-btn {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.split-step-btn .material-symbols-outlined {
  font-size: 18px;
}

.split-step-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.split-qty-hint {
  font-size: 0.78rem;
  text-align: right;
}

.split-position-amount {
  font-size: 1rem;
  line-height: 1.05;
  color: var(--primary-strong);
}

.split-position-card {
  padding: 10px 10px;
}

.split-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  margin: 2px 2px 4px;
  color: #97a8c2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
}

.split-list-head span:last-child {
  text-align: right;
  min-width: 108px;
}

.split-top-grid .checks-mini-card {
  padding: 8px 8px;
  gap: 6px;
  align-content: center;
  min-height: 86px;
}

.split-top-grid .checks-mini-list {
  gap: 5px;
  justify-content: flex-start;
}

.split-top-grid .checks-mini {
  width: 32px;
  min-width: 32px;
  height: 40px;
  border-radius: 10px;
}

.split-top-grid .split-pay-card {
  padding: 8px 10px;
  gap: 4px;
}

.split-top-grid .split-pay-card b {
  font-size: 1.9rem;
}

.split-extra-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 22px;
}

.split-extra-card h4 {
  margin: 0 0 4px;
  font-size: 1.08rem;
}

.split-extra-card p {
  margin: 0;
}

.split-extra-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #ebf4ff;
}

.split-extra-ico .material-symbols-outlined {
  color: var(--primary-strong);
}

.tip-card {
  border-color: #bedfff;
}

.delivery-card {
  background: #f8fbff;
}

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

.overview-actions {
  display: none !important;
}

.overview-positions-select-btn {
  margin: 0 0 8px;
  padding-top: 11px;
  padding-bottom: 11px;
  font-size: 0.98rem;
}

.split-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-card {
  display: grid;
  gap: 12px;
}

.auth-card h3 {
  margin: 0;
  font-size: 1.42rem;
}

.auth-widget-container {
  min-height: 48px;
}

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

.auth-client-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #f2c6a8;
  background: #fff4ec;
  color: #9d4a16;
  font-size: 0.92rem;
  line-height: 1.35;
}

body.dark .auth-client-hint {
  border-color: #70432a;
  background: rgba(240, 106, 31, 0.14);
  color: #ffbf9f;
}

.bots-header .muted {
  margin-top: 6px;
  color: #5f7494;
  font-size: 1.02rem;
  line-height: 1.3;
}

.bots-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bots-header h1 {
  font-size: clamp(20px, 4.8vw, 27px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.bot-add-card-btn {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.bot-card {
  border-radius: 28px;
  padding: 14px 14px 12px;
  display: grid;
  gap: 10px;
}

.bot-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.bot-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #edf3ff;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  line-height: 1;
}

.bot-card-title {
  margin: 0;
  font-size: clamp(1.24rem, 4.1vw, 1.52rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.bot-card-chevron {
  color: #c6d2e2;
  font-size: 1.75rem;
}

.bot-card-description {
  margin: 0;
  font-size: clamp(1rem, 4.2vw, 1.2rem);
  line-height: 1.23;
  color: #637791;
}

.bot-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bot-card-open {
  background: #e8eff8;
  color: #3b82f6;
  box-shadow: none;
  width: 100%;
  min-height: 52px;
  padding-top: 11px;
  padding-bottom: 11px;
}

.bot-card-open:disabled {
  opacity: 0.52;
  color: #8aa0bf;
  cursor: default;
}

.bot-card-actions-admin .bot-card-open {
  flex: 1;
  width: auto;
}

.bot-card-edit-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 12px;
  background: #eaf0fb;
  color: #6f85a7;
}

.bot-card-edit-icon .material-symbols-outlined {
  font-size: 18px;
}

.bot-card-empty {
  margin: 0;
  color: #637791;
  font-size: 1rem;
}

.bot-card-modal-checkbox {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 0.92rem !important;
  gap: 10px !important;
}

.bot-card-modal-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-strong);
}

body.dark .bot-card-icon {
  background: #24324a;
}

body.dark .bot-card-open {
  background: #24324a;
  color: #8fc9ff;
}

body.dark .bot-card-edit-icon {
  background: #24324a;
  color: #9fb8da;
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-main h3,
.profile-main p {
  margin: 0;
}

.profile-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-id-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #f6f9ff;
  border-radius: 10px;
  padding: 4px 8px;
  color: #5b6f8d;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.profile-id-copy-btn code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  color: #445a7c;
}

.profile-id-copy-btn .material-symbols-outlined {
  font-size: 16px;
}

.profile-id-copy-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

body.dark .profile-id-copy-btn {
  background: #24324a;
  border-color: #324563;
  color: #9fb8da;
}

body.dark .profile-id-copy-btn code {
  color: #d6e4fa;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #dbe8f8;
}

.avatar-photo {
  background: linear-gradient(150deg, #8cd1ff, #4fa5ea);
  color: #fff;
}

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

.currency-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.currency-select-wrap::after {
  content: "▾";
  position: absolute;
  right: 10px;
  font-size: 0.75rem;
  color: #8fa2bf;
  pointer-events: none;
}

#currency-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faff;
  color: #415678;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 9px 28px 9px 12px;
  min-width: 142px;
  max-width: 170px;
}

#currency-select:focus {
  outline: 0;
  border-color: #8dc8f7;
  box-shadow: 0 0 0 2px rgba(40, 171, 242, 0.14);
}

body.dark #currency-select {
  background: #24324a;
  color: #edf3ff;
  border-color: #334865;
}

.setting-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.setting-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef4ff;
  display: grid;
  place-items: center;
}

.setting-ico .material-symbols-outlined {
  font-size: 18px;
  color: #8aa3c7;
}

.settings-links {
  padding: 0;
  overflow: hidden;
}

.settings-link-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 1.24rem;
  padding: 14px 16px;
}

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

.faq-header {
  margin-bottom: 8px;
}

.faq-section {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.faq-section-title {
  margin: 0 4px;
  font-size: 0.95rem;
  color: var(--muted-2);
  letter-spacing: 0.01em;
  text-transform: none;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-question {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 1.02rem;
  font-weight: 400;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "expand_more";
  font-family: "Material Symbols Outlined";
  font-size: 22px;
  color: #9db0cb;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(180deg);
}

.faq-answer {
  border-top: 1px solid var(--line);
  padding: 12px 16px 14px;
  display: grid;
  gap: 8px;
}

.faq-answer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
}

.faq-answer a {
  color: var(--primary);
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}

.settings-version {
  text-align: center;
  margin: 18px 0 0;
  color: var(--muted-2);
}

.settings-logout {
  margin-top: 14px;
}

.switch {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #dce5f1;
  padding: 2px;
  display: inline-grid;
  align-items: center;
}

.switch input {
  display: none;
}

.switch span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch input:checked + span {
  transform: translateX(22px);
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 25, 39, 0.5);
  backdrop-filter: blur(2px);
  z-index: 70;
}

.modal {
  border: 0;
  border-radius: 32px;
  background: #fff;
  color: #0f172a;
  width: min(680px, calc(100% - 28px));
  padding: 22px;
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.22);
  z-index: 80;
  position: relative;
}

.modal:not([open]) {
  display: none !important;
}

.modal[open] {
  display: block;
}

body.dark .modal {
  background: #1b2639;
  color: #edf3ff;
}

.modal::backdrop {
  background: transparent;
}

.modal h2 {
  margin: 0 0 12px;
  font-size: 1.95rem;
  line-height: 1.1;
}

.modal > .muted,
.modal p.muted {
  color: #667d9e;
}

.modal label {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  color: #93a3bc;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.modal input,
.modal textarea,
.modal select {
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: #f2f6fc;
  color: #0f172a;
  padding: 14px 15px;
  font-size: 1rem;
}

body.dark .modal input,
body.dark .modal textarea,
body.dark .modal select {
  background: #24324a;
  color: #edf3ff;
}

.modal textarea {
  resize: vertical;
  min-height: 88px;
}

.modal-actions {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.modal-icon {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  margin: 2px auto 14px;
  display: grid;
  place-items: center;
}

.modal-icon .material-symbols-outlined {
  font-size: 34px;
}

.modal-icon.warn {
  background: #fff5dd;
  color: #eba528;
}

.modal-icon.info {
  background: #ebf3ff;
  color: var(--primary-strong);
}

.modal-icon.danger {
  background: #ffe8e8;
  color: var(--danger);
}

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

.qty-stepper {
  height: 52px;
  border-radius: 16px;
  background: #f2f6fc;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  padding: 1px;
  gap: 2px;
}

.qty-stepper .icon-btn {
  width: 38px;
  height: 38px;
  background: transparent;
  color: var(--primary-strong);
}

.qty-stepper input {
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-size: 1.22rem;
}

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

.category-btn {
  border: 0;
  border-radius: 16px;
  min-height: 64px;
  background: #f2f6fc;
  color: #8da0bc;
  display: grid;
  place-items: center;
}

.category-btn .material-symbols-outlined {
  font-size: 24px;
}

.category-btn.active {
  background: var(--primary);
  color: #fff;
}

.category-btn.active .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
}

.receipt-dropzone {
  position: relative;
  border: 2px dashed #d9e4f4;
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  color: #7088aa;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.file-input-proxy {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.dropzone-icons {
  display: inline-block;
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.receipt-select-btn {
  width: 100%;
}

.receipt-dropzone-status {
  display: block;
  font-size: 0.88rem;
}

.package-item {
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  cursor: pointer;
}

.package-main {
  display: grid;
  gap: 4px;
}

.package-side {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.package-price {
  font-size: 1.7rem;
  color: #2177dd;
}

.package-side .icon-btn {
  width: 36px;
  height: 36px;
  color: #2177dd;
  background: #e9f2ff;
}

.package-best {
  border: 2px solid #b4d5ff;
}

.package-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #2177dd;
  color: #fff;
  border-radius: 0 22px 0 12px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 10px;
  text-transform: uppercase;
}

.receipt-preview-modal {
  width: min(720px, calc(100% - 28px));
  height: min(90dvh, 980px);
  max-height: min(90dvh, 980px);
  padding: 16px 16px 12px;
}

.receipt-preview-modal[open] {
  display: flex;
  flex-direction: column;
}

.receipt-preview-modal h2 {
  margin: 0 0 8px;
  padding-right: 46px;
  font-size: clamp(1.1rem, 3.3vw, 1.4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.receipt-preview-modal .modal-close {
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 1px solid #dbe5f3;
  background: #eff4fb;
  color: #8da0bc;
}

.receipt-preview-modal .modal-close .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.receipt-preview-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.receipt-preview-body {
  flex: 1;
  min-height: 0;
  border-radius: 2px;
  border: 2px solid #e2e9f3;
  background: #fff;
  background-image: radial-gradient(#d8e1ee 1.35px, transparent 1.35px);
  background-size: 34px 34px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.receipt-preview-body img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  image-orientation: from-image;
  transform-origin: center center;
  transition: transform 0.04s linear;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.receipt-preview-body.zoom-enabled {
  touch-action: none;
}

.receipt-preview-body.zoom-enabled img {
  cursor: zoom-in;
}

.receipt-preview-body.zoomed img {
  cursor: grab;
}

.receipt-paper-bg {
  background: #fff;
}

.receipt-preview-pdf {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.receipt-preview-file {
  width: 100%;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f4f8ff;
  padding: 14px;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 600;
}

.receipt-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: 1px solid #e6edf7;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  color: #5f7394;
  z-index: 2;
}

.receipt-nav .material-symbols-outlined {
  font-size: 30px;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 30;
}

#receipt-prev-btn {
  left: -24px;
}

#receipt-next-btn {
  right: -24px;
}

.receipt-dots {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 7px;
  min-height: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cfdae9;
}

.dot.active {
  background: var(--primary-strong);
}

.receipt-download-overlay-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 14px;
  z-index: 5;
  box-shadow: 0 8px 18px rgba(28, 149, 218, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.receipt-download-overlay-btn .material-symbols-outlined {
  font-size: 23px !important;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 650, "GRAD" 0, "opsz" 23;
}

.fee-input-modal {
  width: min(420px, calc(100% - 28px));
}

.recognition-modal {
  width: min(420px, calc(100% - 28px));
}

.recognition-modal .modal-icon .material-symbols-outlined {
  animation: recognition-spin 1.2s linear infinite;
}

@keyframes recognition-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Figma screens: create event, receipt picker and OCR result (Frames 2–4) */
#create-event-modal.create-event-v2 {
  width: min(390px, 100vw);
  max-width: 390px;
  min-height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: #f5f7fb;
  color: #12223d;
}

#create-event-modal.create-event-v2::backdrop {
  background: transparent;
}

.create-event-header {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 16px 12px;
}

.create-event-header .modal-close {
  position: static;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  background: #fff;
  color: #17365f;
  box-shadow: 0 4px 12px rgba(42, 76, 123, 0.08);
}

.create-event-header h2 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.create-event-body {
  height: calc(100dvh - 76px);
  overflow-y: auto;
  padding: 0 16px 92px;
  scrollbar-width: none;
}

.create-event-body::-webkit-scrollbar {
  display: none;
}

.create-receipt-hero {
  position: relative;
  display: block;
  width: 100%;
  min-height: 124px;
  padding: 18px 48px 42px 18px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  text-align: left;
  background: linear-gradient(120deg, #1e6fe8 0%, #2b8de9 100%);
  box-shadow: 0 10px 24px rgba(35, 119, 225, 0.22);
  cursor: pointer;
  outline: none;
}

.create-receipt-hero:focus {
  outline: none;
}

.create-receipt-hero-copy,
.create-receipt-hero-copy strong,
.create-receipt-hero-copy span {
  display: block;
}

.create-receipt-hero-copy strong {
  margin-bottom: 6px;
  font-size: 1.06rem;
  line-height: 1.15;
}

.create-receipt-hero-copy span {
  max-width: 278px;
  font-size: 0.72rem;
  line-height: 1.35;
  opacity: 0.9;
}

.create-receipt-hero-arrow {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 23px;
}

.create-receipt-type-row {
  position: absolute;
  bottom: 14px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.66rem;
  opacity: 0.9;
}

.create-receipt-type-row > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.create-receipt-type-row .material-symbols-outlined {
  font-size: 15px;
}

.create-event-field,
.create-event-fees {
  display: block;
  margin-top: 18px;
}

.create-event-title-field {
  position: relative;
}

.create-event-label {
  display: block;
  margin-bottom: 8px;
  color: #6f7f98;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.create-event-label em {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.create-event-title-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-event-title-row input,
.create-event-field > input,
.create-event-field > textarea,
.create-event-field > select,
.create-event-fee-row input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid #e4eaf2;
  border-radius: 14px;
  background: #fff;
  color: #183052;
  font: inherit;
  font-size: 0.93rem;
  outline: 0;
  box-sizing: border-box;
}

.create-event-title-row input:focus,
.create-event-field > input:focus,
.create-event-field > textarea:focus,
.create-event-field > select:focus,
.create-event-fee-row input:focus {
  border-color: #3889e9;
  box-shadow: 0 0 0 3px rgba(56, 137, 233, 0.12);
}

.create-event-title-row input {
  min-width: 0;
}

.create-event-field > textarea {
  min-height: 76px;
  padding-top: 14px;
  resize: vertical;
}

.create-event-field > select {
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f7f98' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center;
}

.create-event-emoji {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border: 1px solid #e4eaf2;
  border-radius: 14px;
  background: #fff;
  font-size: 1.7rem;
  cursor: pointer;
}

.create-category-picker {
  position: absolute;
  z-index: 2;
  display: none;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 220px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid #e4eaf2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(34, 66, 107, 0.16);
}

.create-category-picker.is-open {
  display: grid;
}

.create-category-picker .category-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 9px;
  background: #f4f7fb;
}

.create-category-picker .category-btn.active {
  background: #d9ebff;
  color: #1673df;
}

.create-category-picker .material-symbols-outlined {
  font-size: 17px;
}

.create-event-two-columns,
.create-event-fee-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.create-event-two-columns .create-event-field {
  min-width: 0;
}

.create-event-fee-row label {
  color: #50647f;
  font-size: 0.76rem;
  font-weight: 700;
}

.create-event-fee-row input {
  display: block;
  min-height: 44px;
  margin-top: 6px;
  font-size: 0.88rem;
}

.create-receipt-legacy-fallback {
  display: none;
}

.create-event-footer {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  z-index: 3;
}

.create-event-footer .btn {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  font-size: 0.94rem;
  box-shadow: 0 8px 18px rgba(24, 111, 219, 0.2);
}

.create-receipt-sheet,
.recognition-result-sheet {
  width: min(390px, 100vw);
  max-width: 390px;
  margin: 0 auto;
  padding: 28px 16px 18px;
  border-radius: 24px 24px 0 0;
  background: #fff;
  color: #152844;
}

.create-receipt-sheet {
  min-height: 356px;
}

.create-receipt-sheet .modal-close {
  top: 18px;
  right: 16px;
  color: #66809f;
}

.sheet-handle {
  display: block;
  width: 42px;
  height: 4px;
  margin: -12px auto 26px;
  border-radius: 4px;
  background: #d9e2ee;
}

.create-receipt-sheet h2,
.recognition-result-sheet h2 {
  margin-bottom: 8px;
  font-size: 1.38rem;
  letter-spacing: -0.025em;
}

.create-receipt-sheet > p,
.recognition-result-sheet > p {
  margin: 0 0 20px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.receipt-source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.receipt-source-card {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  border: 1px solid #e0e8f3;
  border-radius: 16px;
  background: #f7faff;
  color: #183052;
  text-align: left;
  cursor: pointer;
}

.receipt-source-card .material-symbols-outlined {
  margin-bottom: 5px;
  color: #247ce1;
  font-size: 25px;
}

.receipt-source-card strong {
  font-size: 0.87rem;
}

.receipt-source-card small {
  color: #788aa5;
  font-size: 0.72rem;
}

.receipt-sheet-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #eef6ff;
  color: #577292;
  font-size: 0.7rem;
  line-height: 1.35;
}

.receipt-sheet-info .material-symbols-outlined {
  color: #3686e8;
  font-size: 17px;
}

.recognition-result-sheet {
  min-height: 444px;
  text-align: center;
}

.recognition-result-check {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 2px auto 16px;
  place-items: center;
  border-radius: 50%;
  background: #d9f7e7;
  color: #21aa68;
}

.recognition-result-check .material-symbols-outlined {
  font-size: 30px;
  font-weight: 700;
}

.recognition-result-sheet > p {
  margin-bottom: 18px;
}

.recognition-result-items {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
  text-align: left;
}

.recognition-result-item,
.recognition-result-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 33px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #effaf4;
  color: #23724e;
  font-size: 0.75rem;
}

.recognition-result-item strong {
  font-size: 0.72rem;
  white-space: nowrap;
}

.recognition-result-more {
  justify-content: flex-start;
  color: #5c9578;
}

.recognition-result-sheet .modal-actions {
  margin-top: auto;
}

.recognition-result-sheet .btn {
  width: 100%;
  min-height: 52px;
  border-radius: 15px;
}

body.dark #create-event-modal.create-event-v2,
body.dark .create-receipt-sheet,
body.dark .recognition-result-sheet {
  background: #17243a;
  color: #eef5ff;
}

body.dark .create-event-header .modal-close,
body.dark .create-event-title-row input,
body.dark .create-event-field > input,
body.dark .create-event-field > textarea,
body.dark .create-event-field > select,
body.dark .create-event-fee-row input,
body.dark .create-event-emoji,
body.dark .create-category-picker,
body.dark .receipt-source-card {
  border-color: #304766;
  background: #20324d;
  color: #eef5ff;
}

.fee-input-field {
  font-size: 16px !important;
}

@media (max-width: 720px) {
  #app {
    max-width: 420px;
    padding-inline: 14px;
  }

  .page-header h1 {
    font-size: 2.5rem;
  }

  .bots-header h1 {
    font-size: 1.67rem;
  }

  .detail-header h1 {
    font-size: 2rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .overview-top-grid,
  .position-modal-grid,
  .fee-grid {
    grid-template-columns: 1fr;
  }

  #view-event-split .split-top-grid {
    display: grid !important;
    grid-template-columns: 106px minmax(0, 1fr) !important;
    gap: 8px;
  }

  #view-event-split .split-top-grid .checks-mini-card {
    min-height: 106px;
    aspect-ratio: 1 / 1;
    justify-items: center;
    text-align: center;
    align-content: center;
  }

  #view-event-split .split-top-grid .checks-mini-list {
    justify-content: center;
  }

  #view-event-split .split-header h1 {
    font-size: clamp(14px, 4.2vw, 18px) !important;
    line-height: 1.08;
  }

  #view-event-split .split-header .muted {
    font-size: 0.82rem;
    line-height: 1.15;
  }

  #view-event-split .split-position-card {
    padding: 9px 10px;
  }

  #view-event-split .split-position-main h4 {
    font-size: 0.98rem;
  }

  #view-event-split .split-position-main .muted {
    font-size: 0.8rem;
  }

  #view-event-split .split-coeff {
    width: 100px;
    min-width: 100px;
    height: 32px;
    font-size: 0.92rem;
  }

  #view-event-split .split-position-amount {
    font-size: 0.95rem;
  }

  #view-event-split .split-position-row .split-right .split-position-amount {
    width: 100px;
    text-align: right;
    padding-right: 22px;
  }

  #view-event-split .split-list-head span:last-child {
    min-width: 100px;
  }

  .event-card h3 {
    font-size: 1.02rem;
  }

  .event-total {
    font-size: 1.04rem;
  }

  .fab {
    width: 72px;
    height: 72px;
  }

  .receipt-preview-modal {
    width: calc(100% - 20px);
    height: min(88dvh, 860px);
    max-height: min(88dvh, 860px);
    padding: 14px 14px 12px;
  }

  .receipt-preview-modal h2 {
    margin-bottom: 8px;
    padding-right: 44px;
    font-size: clamp(1.05rem, 5.6vw, 1.35rem);
    line-height: 1.04;
  }

  .receipt-preview-modal .modal-close {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
  }

  .receipt-preview-modal .modal-close .material-symbols-outlined {
    font-size: 22px;
  }

  .receipt-preview-body {
    padding: 8px;
  }

  .receipt-nav {
    width: 46px;
    height: 46px;
  }

  .receipt-nav .material-symbols-outlined {
    font-size: 26px;
  }

  #receipt-prev-btn {
    left: -10px;
  }

  #receipt-next-btn {
    right: -10px;
  }

  .dot {
    width: 9px;
    height: 9px;
  }

  .receipt-download-overlay-btn {
    right: 8px;
    bottom: 8px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .receipt-download-overlay-btn .material-symbols-outlined {
    font-size: 21px !important;
  }
}

/* Overview layout tuning */
.overview-header .overview-edit-btn {
  width: auto;
  min-width: 0;
  padding: 6px 10px;
  font-size: 0.82rem;
  line-height: 1;
  border-radius: 999px;
}

.overview-top-grid {
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
}

.overview-top-grid .checks-mini-card {
  padding: 7px 6px 8px;
  gap: 5px;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.overview-top-grid .checks-mini-list {
  width: 100%;
  justify-content: center;
  gap: 5px;
}

.overview-top-grid .checks-mini {
  width: 28px;
  min-width: 28px;
  height: 34px;
  border-radius: 9px;
}

.overview-top-grid .totals-card {
  padding: 7px 9px;
  gap: 3px;
}

.overview-top-grid .totals-row b {
  font-size: 1.02rem;
  line-height: 1.05;
}

.segmented {
  border-radius: 14px;
  padding: 2px;
  gap: 2px;
  margin: 1px 0 8px;
}

.segmented button {
  border-radius: 11px;
  padding: 8px 8px;
  font-size: 0.9rem;
}

.participant-row {
  gap: 7px;
  border-radius: 18px;
  padding: 10px 11px;
}

.participant-main {
  gap: 3px;
}

.participant-name-wrap h4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.participant-side {
  justify-items: center;
  align-content: start;
  min-width: 72px;
  text-align: center;
}

.participant-amount {
  line-height: 1.05;
  text-align: center;
}

.participant-swipe {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.participant-swipe-action {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffe9e9;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  pointer-events: none;
}

.participant-swipe-delete {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f24848;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.participant-swipe-card {
  position: relative;
  z-index: 1;
  transition: transform 0.22s ease;
}

.participant-swipe.open .participant-swipe-action {
  transform: translateX(0);
  pointer-events: auto;
}

.participant-swipe.open .participant-swipe-card {
  transform: translateX(-72px);
}

.participant-swipe .participant-row {
  margin: 0;
}

@media (max-width: 720px) {
  .overview-header .overview-edit-btn {
    padding: 5px 9px;
    font-size: 0.78rem;
  }

  .overview-top-grid {
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 6px;
  }

  .overview-top-grid .checks-mini-card {
    padding: 6px 5px 7px;
  }

  .overview-top-grid .checks-mini {
    width: 26px;
    min-width: 26px;
    height: 32px;
  }

  .overview-top-grid .totals-card {
    padding: 7px 8px;
  }

  .overview-top-grid .totals-row b {
    font-size: 0.96rem;
  }

  .segmented button {
    padding: 7px 7px;
    font-size: 0.86rem;
  }

  .participant-row {
    padding: 9px 10px;
    gap: 7px;
  }

  .participant-side {
    min-width: 68px;
  }

  .participant-selection-details {
    margin-left: 34px;
    padding: 9px 10px;
  }
}

/* Split screen hard overrides to match target layout */
#view-event-split .split-header h1 {
  font-size: clamp(14px, 4.2vw, 18px) !important;
  line-height: 1.08 !important;
}

#view-event-split .split-header .muted {
  font-size: 0.82rem !important;
  line-height: 1.15 !important;
}

#view-event-split .split-top-grid {
  display: grid !important;
  grid-template-columns: 106px minmax(0, 1fr) !important;
  gap: 8px !important;
}

#view-event-split .split-top-grid .checks-mini-card {
  min-height: 106px !important;
  aspect-ratio: 1 / 1 !important;
  padding: 8px 6px !important;
  gap: 4px !important;
  justify-items: center !important;
  text-align: center !important;
  align-content: center !important;
}

#view-event-split .split-top-grid .checks-mini-list {
  min-height: 32px !important;
  gap: 4px !important;
  justify-content: center !important;
}

#view-event-split .split-top-grid .checks-mini {
  width: 30px !important;
  min-width: 30px !important;
  height: 36px !important;
}

#view-event-split .split-top-grid .split-pay-card {
  min-height: 84px !important;
  padding: 8px 10px !important;
  gap: 3px !important;
}

#view-event-split .split-top-grid .split-pay-card b {
  font-size: 1.85rem !important;
}

#view-event-split .split-list-head {
  margin: 2px 2px 3px !important;
  padding: 0 8px !important;
  font-size: 0.72rem !important;
}

#view-event-split .split-list-head span:last-child {
  min-width: 102px !important;
  text-align: right !important;
}

#view-event-split .split-position-card {
  padding: 9px 10px !important;
}

#view-event-split .split-position-row {
  display: grid !important;
  grid-template-columns: 26px minmax(0, 1fr) 102px !important;
  align-items: start !important;
  gap: 8px !important;
}

#view-event-split .split-position-main {
  gap: 2px !important;
}

#view-event-split .split-position-main h4 {
  font-size: 0.98rem !important;
  line-height: 1.12 !important;
  margin: 0 !important;
}

#view-event-split .split-subtotal-line,
#view-event-split .split-unit-line {
  margin: 0 !important;
  font-size: 0.8rem !important;
  line-height: 1.15 !important;
}

#view-event-split .split-right {
  min-width: 102px !important;
  gap: 4px !important;
  justify-items: end !important;
}

#view-event-split .split-tip-right .split-coeff,
#view-event-split .split-coeff-stepper {
  width: 102px !important;
  min-width: 102px !important;
  height: 32px !important;
}

#view-event-split .split-tip-right .split-coeff {
  font-size: 0.92rem !important;
}

#view-event-split .split-coeff-stepper .split-coeff {
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  border-radius: 0 !important;
  font-size: 0.92rem !important;
}

#view-event-split .split-step-btn .material-symbols-outlined {
  font-size: 16px !important;
}

#view-event-split .split-position-amount {
  font-size: 0.95rem !important;
  line-height: 1.05 !important;
}

#view-event-split .split-position-row .split-right .split-position-amount {
  width: 102px !important;
  text-align: right !important;
  padding-right: 22px !important;
}

/* Figma screen: Events / Frame 1 */
.events-v2 {
  width: calc(100% + 32px);
  max-width: none;
  min-height: 100dvh;
  margin: -16px;
  padding: 0 0 calc(82px + env(safe-area-inset-bottom));
  background: #f4f6fb;
}

.events-v2 .events-header {
  padding: 24px 16px 0;
}

.events-header-top {
  min-height: 46px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.events-brand {
  margin: 0;
  color: #7f8da7;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.06em;
}

.events-header h1 {
  margin: 0;
  color: #111a2d;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.events-notifications {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid #e2e8f1;
  border-radius: 50%;
  background: #fff;
  color: #7e8da6;
  box-shadow: 0 2px 7px rgba(31, 47, 78, 0.1);
}

.events-notifications .material-symbols-outlined {
  font-size: 19px;
}

.events-notification-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: #2463eb;
}

.events-v2 .search-row {
  height: 40px;
  min-height: 40px;
  margin: 16px 0 12px;
  border: 1px solid #e1e7f0;
  border-radius: 22px;
  box-shadow: 0 1px 4px rgba(24, 39, 68, 0.05);
}

.events-v2 .search-row input {
  font-size: 13px;
  line-height: 20px;
  color: #22304a;
}

.events-v2 .search-icon {
  left: 12px;
  font-size: 18px;
  color: #7284a2;
}

.events-v2 #events-calendar-btn,
.events-v2 #search-clear {
  display: none;
}

.events-v2 .events-date-filter-info {
  margin: 0 16px 10px;
}

.events-v2 .events-status-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  height: 36px;
  margin: 0 16px 12px;
  padding: 4px;
  border-radius: 20px;
  background: #eef2f8;
}

.events-status-tabs button {
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #6d7d99;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

.events-status-tabs button.active {
  background: #fff;
  color: #15213a;
  box-shadow: 0 1px 5px rgba(24, 39, 68, 0.08);
}

.events-v2 .events-legacy-quota {
  display: none;
}

.events-v2 #events-list.stack {
  gap: 10px;
  margin: 0 16px;
}

.events-v2 .event-card-v2 {
  min-height: 122px;
  padding: 16px 17px 15px;
  border: 1px solid #e3e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(22, 36, 64, 0.025);
  background: #fff;
}

.event-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

.events-v2 .event-main {
  gap: 12px;
}

.events-v2 .event-cat-emoji {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 50%;
  background: #eef5ff;
  font-size: 20px;
  line-height: 28px;
}

.events-v2 .event-card h3 {
  max-width: 220px;
  margin: 0;
  color: #111a2d;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: 0;
  font-weight: 600 !important;
}

.events-v2 .event-card p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 1px 0 0;
  color: #7383a0;
  font-size: 11px;
  line-height: 16px;
}

.events-v2 .event-date-icon {
  font-size: 12px;
}

.events-v2 .event-card-chevron {
  margin-top: 3px;
  color: #7383a0;
  font-size: 17px;
}

.events-v2 .event-progress {
  height: 4px;
  margin: 16px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.events-v2 .event-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #00c58a;
}

.event-card-bottom {
  display: flex;
  align-items: center;
  min-height: 20px;
  gap: 8px;
  color: #556983;
  font-size: 11px;
  line-height: 20px;
}

.event-participants {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.event-participants .material-symbols-outlined {
  font-size: 13px;
}

.event-my-amount,
.event-payment-state {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  white-space: nowrap;
}

.event-my-amount {
  padding: 0 6px;
  color: #f16a25;
  background: #fff0e7;
}

.event-my-amount-closed {
  color: #00a875;
  background: #e6faf3;
}

.event-payment-state {
  gap: 3px;
  padding: 0 7px;
  color: #f16a25;
  background: #fff7f0;
}

.event-payment-state.is-paid {
  color: #00a875;
  background: #e6faf3;
}

.event-payment-state .material-symbols-outlined {
  font-size: 11px;
}

.events-v2 .event-total {
  margin-left: auto;
  color: #14203a;
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.events-v2 .event-recognition-line {
  margin: 6px 0 0;
}

.events-v2 .events-create-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  height: 52px;
  margin: 12px 16px 10px;
  border: 0;
  border-radius: 14px;
  background: #2463eb;
  color: #fff;
  box-shadow: 0 8px 18px rgba(36, 99, 235, 0.25);
  font-size: 14px;
  font-weight: 600;
}

.events-v2 .events-create-button .material-symbols-outlined {
  font-size: 16px;
}

.tabbar {
  left: 50%;
  right: auto;
  width: min(100%, 390px);
  transform: translateX(-50%);
  height: 82px;
  padding-top: 8px;
  background: #fff;
  border-top: 1px solid #e6ebf2;
  backdrop-filter: none;
}

.tab {
  gap: 3px;
  padding: 5px 4px 9px;
  color: #9ba9bf;
  font-size: 16px;
  line-height: 20px;
  font-weight: 700 !important;
}

.tab > span {
  font-weight: 700 !important;
}

.tab .material-symbols-outlined {
  font-size: 24px;
}

.tab.active {
  color: #1497df;
}

.tab.active::after {
  display: none;
}

.events-v2 .event-cat-emoji .event-cat-symbol {
  color: #1c95da;
  font-size: 24px;
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 24;
}

/* Higher-specificity pass: .view.active is intentionally kept for other screens. */
#view-event-overview.event-overview-v2.active {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 0;
  max-width: none;
  margin: 0 1px;
  padding-bottom: 92px;
}

#view-event-overview.event-overview-v2:not(.active) {
  display: none;
}

#view-event-overview.event-overview-v2.active > .overview-header {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 1;
  display: block;
  height: 140px;
  margin: 0;
  padding: 4px 1px 0;
}

#view-event-overview.event-overview-v2.active .overview-header .back-btn {
  position: absolute;
  top: 4px;
  left: 1px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f7f9fc;
  color: #7f98b9;
  box-shadow: none;
}

#view-event-overview.event-overview-v2.active .overview-kicker {
  display: none;
}

#view-event-overview.event-overview-v2.active .overview-head-main {
  position: absolute;
  top: 52px;
  left: 1px;
  right: 1px;
}

#view-event-overview.event-overview-v2.active .overview-head-main h1 {
  color: #0f172a;
  font-size: 32px;
  line-height: 38px;
  letter-spacing: -0.03em;
  font-weight: 700;
}

#view-event-overview.event-overview-v2.active .overview-head-main .muted {
  margin-top: 2px;
  color: #7f90ad;
  font-size: 16px;
  line-height: 20px;
}

#view-event-overview.event-overview-v2.active .overview-edit-btn {
  position: absolute;
  top: 5px;
  right: 0;
  display: inline-flex;
  width: 141px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 17px;
  background: #f7f9fc;
  color: #526887;
  box-shadow: none;
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
}

#view-event-overview.event-overview-v2.active .overview-edit-btn .material-symbols-outlined {
  font-size: 20px;
  color: #526887;
}

#view-event-overview.event-overview-v2.active .overview-v2-total-card {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-rows: 20px 1fr;
  height: 81px;
  margin: 14px 0 0;
  padding: 8px 9px 7px;
  border: 1px solid #e5ebf3;
  border-radius: 20px;
  color: #526887;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

#view-event-overview.event-overview-v2.active .overview-v2-total-head > span,
#view-event-overview.event-overview-v2.active .overview-v2-total-stats span {
  color: #7f90ad;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

#view-event-overview.event-overview-v2.active .overview-v2-total-head b {
  color: #0f172a;
  font-size: 18px;
  line-height: 20px;
  letter-spacing: 0;
}

#view-event-overview.event-overview-v2.active .overview-v2-total-stats {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-auto-rows: 20px;
  gap: 0 8px;
  margin: 0;
}

#view-event-overview.event-overview-v2.active .overview-v2-total-stats div {
  display: contents;
}

#view-event-overview.event-overview-v2.active .overview-v2-total-stats b {
  font-size: 16px;
  line-height: 20px;
  text-align: right;
}

#view-event-overview.event-overview-v2.active .overview-v2-total-stats .ok {
  color: #43b257;
}

#view-event-overview.event-overview-v2.active .overview-v2-total-stats .warn {
  color: #f06a1f;
}

#view-event-overview.event-overview-v2.active .overview-v2-progress {
  display: none;
}

#view-event-overview.event-overview-v2.active .overview-v2-receipts {
  grid-column: 1;
  grid-row: 2;
  display: block;
  height: 81px;
  margin: 14px 0 0;
  padding: 10px 8px;
  border: 1px solid #e5ebf3;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

#view-event-overview.event-overview-v2.active .overview-v2-receipts > div:first-child {
  display: block;
}

#view-event-overview.event-overview-v2.active .overview-v2-receipts > div:first-child .muted {
  color: #7f90ad;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: 0;
  display: block;
  text-align: center;
}

#view-event-overview.event-overview-v2.active .overview-v2-receipts-hint {
  display: none;
}

#view-event-overview.event-overview-v2.active .overview-v2-receipts .checks-mini-list {
  min-height: 38px;
  margin-top: 1px;
  justify-content: center;
}

#view-event-overview.event-overview-v2.active .overview-v2-receipts .checks-mini.muted {
  height: 38px;
  width: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 10px;
  color: #7f90ad;
  background: #f5f8fc;
  line-height: 19px;
  text-align: center;
  white-space: normal;
}

#view-event-overview.event-overview-v2.active .overview-segmented {
  grid-column: 1 / -1;
  grid-row: 3;
  height: 32px;
  margin: 13px 0 0;
  padding: 2px;
  border-radius: 16px;
  background: #dfe8f4;
}

#view-event-overview.event-overview-v2.active .overview-segmented button {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 18px;
}

#view-event-overview.event-overview-v2.active #overview-participants-pane,
#view-event-overview.event-overview-v2.active #overview-positions-pane {
  grid-column: 1 / -1;
  grid-row: 4;
  gap: 14px;
  margin-top: 9px;
}

#view-event-overview.event-overview-v2.active .compact-summary {
  height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #e5ebf3;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

#view-event-overview.event-overview-v2.active .participant-row {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 17px;
  box-shadow: var(--shadow-soft);
}

/* Bots / exported mobile frame 06. */
.bots-v2 {
  max-width: none;
  margin: 0 1px;
}

.bots-v2 .bots-header {
  padding: 0 1px 18px;
}

.bots-v2 .bots-header h1 {
  font-size: 28px;
  line-height: 34px;
  letter-spacing: -0.03em;
}

.bots-v2 .bots-header .muted {
  max-width: none;
  margin-top: 4px;
  color: #7f90ad;
  font-size: 16px;
  line-height: 20px;
}

.bots-v2 #bots-cards {
  gap: 13px;
}

.bots-v2 .bot-card {
  gap: 9px;
  padding: 14px;
  border-radius: 24px;
}

.bots-v2 .bot-card-head {
  gap: 9px;
}

.bots-v2 .bot-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  font-size: 1.8rem;
}

.bots-v2 .bot-card-title {
  font-size: 20px;
  line-height: 24px;
}

.bots-v2 .bot-card-description {
  min-height: 0;
  color: #7f90ad;
  font-size: 16px;
  line-height: 20px;
}

.bots-v2 .bot-card-actions {
  margin-top: 0;
}

.bots-v2 .bot-card-open {
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 20px;
}

#view-bots.bots-v2 {
  max-width: none;
  margin: 0 1px;
}

#view-bots.bots-v2 .bots-header {
  padding: 0 1px 18px;
}

#view-bots.bots-v2 .bots-header h1 {
  font-size: 28px;
  line-height: 34px;
}

#view-bots.bots-v2 .bots-header .muted {
  max-width: none;
  margin-top: 4px;
  font-size: 16px;
  line-height: 20px;
}

#view-bots.bots-v2 #bots-cards {
  gap: 13px;
}

#view-bots.bots-v2 .bot-card {
  gap: 9px;
  padding: 14px 13px;
  border-radius: 24px;
}

#view-bots.bots-v2 .bot-card-head {
  gap: 9px;
}

#view-bots.bots-v2 .bot-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  font-size: 1.8rem;
}

#view-bots.bots-v2 .bot-card-title {
  font-size: 20px;
  line-height: 24px;
}

#view-bots.bots-v2 .bot-card-description {
  min-height: 0;
  font-size: 16px;
  line-height: 20px;
}

#view-bots.bots-v2 .bot-card-actions {
  margin-top: 0;
}

#view-bots.bots-v2 .bot-card-open {
  min-height: 52px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 20px;
}

/* Settings / exported mobile frame 07. */
#view-settings.settings-v2 {
  max-width: none;
  margin: 0 1px;
}

#view-settings.settings-v2 > .page-header {
  padding: 0 1px 17px;
}

#view-settings.settings-v2 > .page-header h1 {
  font-size: 40px;
  line-height: 48px;
  letter-spacing: -0.03em;
}

#view-settings.settings-v2 .settings-section-label {
  margin: 7px 3px 8px;
  color: #8b9bb2;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 0.08em;
}

#view-settings.settings-v2 .settings-profile-card {
  height: 112px;
  min-height: 0;
  padding: 16px;
  gap: 12px;
  border-radius: 24px;
}

#view-settings.settings-v2 .avatar-photo {
  width: 55px;
  height: 55px;
  border-radius: 17px;
  background: linear-gradient(145deg, #78c9f5, #55a9e5);
  font-size: 18px;
}

#view-settings.settings-v2 .profile-main h3 {
  max-width: 155px;
  font-size: 20px;
  line-height: 23px;
}

#view-settings.settings-v2 .profile-main > p,
#view-settings.settings-v2 .profile-id-row > .muted {
  font-size: 16px;
  line-height: 20px;
}

#view-settings.settings-v2 #profile-username:empty {
  display: none;
}

#view-settings.settings-v2 .settings-section-label:has(+ .settings-profile-card) {
  margin-bottom: 2px;
}

#view-settings.settings-v2 .profile-id-row {
  gap: 7px;
  margin-top: 5px;
}

#view-settings.settings-v2 .settings-profile-card > .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

#view-settings.settings-v2 .settings-limit-card,
#view-settings.settings-v2 .settings-section-label:has(+ .settings-limit-card) {
  display: none;
}

#view-settings.settings-v2 .setting-row {
  min-height: 66px;
  margin-bottom: 2px;
  padding: 13px 16px;
  border-radius: 20px;
}

#view-settings.settings-v2 .setting-main {
  gap: 10px;
  font-size: 16px;
  line-height: 20px;
}

#view-settings.settings-v2 .setting-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

#view-settings.settings-v2 .settings-section-label:has(+ .setting-row) {
  margin-top: 24px;
  margin-bottom: 3px;
}

#view-settings.settings-v2 .settings-section-label:has(+ .card.setting-row + .card.setting-row) {
  margin-top: 14px;
}

#view-settings.settings-v2 .settings-section-label:has(+ .settings-links) {
  margin-top: 16px;
  margin-bottom: 3px;
}

#view-settings.settings-v2 .settings-links {
  height: 125px;
  border-radius: 24px;
}

#view-settings.settings-v2 .settings-link-row {
  min-height: 62px;
  padding: 12px 16px;
  font-size: 16px;
  line-height: 20px;
}

#view-settings.settings-v2 .settings-version {
  margin-top: 22px;
  font-size: 16px;
  line-height: 20px;
}

/* Overview / exported mobile frame 02: the summary is a two-card row. */
.event-overview-v2 {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 14px;
  max-width: none;
  margin: 0;
  padding-bottom: 92px;
}

.event-overview-v2 .overview-header {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 1;
  display: block;
  height: 140px;
  margin: 0;
  padding: 4px 1px 0;
}

.event-overview-v2 .overview-header .back-btn {
  position: absolute;
  top: 4px;
  left: 1px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f7f9fc;
  color: #7f98b9;
  box-shadow: none;
}

.event-overview-v2 .overview-kicker {
  display: none;
}

.event-overview-v2 .overview-head-main {
  position: absolute;
  top: 52px;
  left: 1px;
  right: 1px;
}

.event-overview-v2 .overview-head-main h1 {
  color: #0f172a;
  font-size: 32px;
  line-height: 38px;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.event-overview-v2 .overview-head-main .muted {
  margin-top: 2px;
  color: #7f90ad;
  font-size: 16px;
  line-height: 20px;
}

.event-overview-v2 .overview-edit-btn {
  position: absolute;
  top: 5px;
  right: 0;
  display: inline-flex;
  width: 141px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 17px;
  background: #f7f9fc;
  color: #526887;
  box-shadow: none;
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
}

.event-overview-v2 .overview-edit-btn .material-symbols-outlined {
  font-size: 20px;
  color: #526887;
}

.event-overview-v2 .overview-v2-total-card {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-rows: 20px 1fr;
  height: 81px;
  margin: 0;
  padding: 8px 9px 7px;
  border: 1px solid #e5ebf3;
  border-radius: 20px;
  color: #526887;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.event-overview-v2 .overview-v2-total-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-overview-v2 .overview-v2-total-head > span,
.event-overview-v2 .overview-v2-total-stats span {
  color: #7f90ad;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.event-overview-v2 .overview-v2-total-head b {
  color: #0f172a;
  font-size: 18px;
  line-height: 20px;
  letter-spacing: 0;
}

.event-overview-v2 .overview-v2-total-stats {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-auto-rows: 20px;
  gap: 0 8px;
  margin: 0;
}

.event-overview-v2 .overview-v2-total-stats div {
  display: contents;
}

.event-overview-v2 .overview-v2-total-stats b {
  font-size: 16px;
  line-height: 20px;
  text-align: right;
}

.event-overview-v2 .overview-v2-total-stats .ok {
  color: #43b257;
}

.event-overview-v2 .overview-v2-total-stats .warn {
  color: #f06a1f;
}

.event-overview-v2 .overview-v2-progress {
  display: none;
}

.event-overview-v2 .overview-v2-receipts {
  grid-column: 1;
  grid-row: 2;
  display: block;
  height: 81px;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid #e5ebf3;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.event-overview-v2 .overview-v2-receipts > div:first-child {
  display: block;
}

.event-overview-v2 .overview-v2-receipts > div:first-child .muted {
  color: #7f90ad;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: 0;
}

.event-overview-v2 .overview-v2-receipts-hint {
  display: none;
}

.event-overview-v2 .overview-v2-receipts .checks-mini-list {
  min-height: 38px;
  margin-top: 1px;
  justify-content: center;
}

.event-overview-v2 .overview-v2-receipts .checks-mini.muted {
  height: 38px;
  min-width: 42px;
  padding: 0 8px;
  border-radius: 10px;
  color: #7f90ad;
  background: #f5f8fc;
}

.event-overview-v2 .overview-segmented {
  grid-column: 1 / -1;
  grid-row: 3;
  height: 32px;
  margin: 0;
  padding: 2px;
  border-radius: 16px;
  background: #dfe8f4;
}

.event-overview-v2 .overview-segmented button {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 18px;
}

.event-overview-v2 #overview-participants-pane,
.event-overview-v2 #overview-positions-pane {
  grid-column: 1 / -1;
  grid-row: 4;
  gap: 14px;
}

.event-overview-v2 .compact-summary {
  height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #e5ebf3;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.event-overview-v2 .participant-row {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 17px;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 720px) {
  .events-v2 {
    width: auto;
    margin: -16px -14px;
  }
}

.tab {
  position: relative;
  gap: 3px;
  padding: 6px 4px 10px;
  color: #6f819f;
  font-size: 10px;
  line-height: 15px;
}

.tab .material-symbols-outlined {
  font-size: 20px;
}

.tab.active {
  color: #2463eb;
}

.tab.active::after {
  position: absolute;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

/* Figma screens: event summary and position split (Frames 5–6) */
.event-overview-v2,
.event-split-v2 {
  max-width: 390px;
  margin: 0 auto;
}

.event-overview-v2 .overview-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "back main edit";
  align-items: center;
  column-gap: 10px;
  row-gap: 0;
  margin-bottom: 18px;
  padding: 0 0 2px;
}

.event-overview-v2 .overview-header .back-btn,
.event-split-v2 .back-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff;
  color: #46698f;
  box-shadow: 0 3px 10px rgba(36, 76, 122, 0.08);
}

.event-overview-v2 .overview-head-main {
  min-width: 0;
}

.overview-kicker,
.split-kicker {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  color: #8b9bb2;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
}

.overview-kicker span:first-child {
  font-size: 1rem;
  letter-spacing: 0;
}

.event-overview-v2 .overview-head-main h1 {
  font-size: 1.18rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.event-overview-v2 .overview-head-main .muted {
  margin-top: 5px;
  font-size: 0.73rem;
  line-height: 1.2;
}

.event-overview-v2 .overview-edit-btn {
  grid-area: edit;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  background: #fff;
  color: #7188a7;
  box-shadow: 0 3px 10px rgba(36, 76, 122, 0.08);
}

.event-overview-v2 .overview-edit-btn .material-symbols-outlined {
  font-size: 22px;
}

.overview-v2-total-card {
  margin-bottom: 12px;
  padding: 18px 18px 15px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #258be2 0%, #36a8e5 100%);
  box-shadow: 0 10px 22px rgba(40, 143, 221, 0.22);
}

.overview-v2-total-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.overview-v2-total-head > span,
.overview-v2-total-stats span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.overview-v2-total-head b {
  font-size: 1.9rem;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.overview-v2-total-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.overview-v2-total-stats div {
  display: grid;
  gap: 4px;
}

.overview-v2-total-stats b {
  color: #fff;
  font-size: 0.92rem;
}

.overview-v2-total-stats .ok,
.overview-v2-total-stats .warn {
  color: #fff;
}

.overview-v2-progress {
  height: 6px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
}

.overview-v2-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transition: width 180ms ease;
}

.overview-v2-receipts {
  display: grid;
  gap: 11px;
  margin-bottom: 14px;
  padding: 13px 14px;
  border-radius: 16px;
}

.overview-v2-receipts > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.overview-v2-receipts > div:first-child .muted {
  color: #8194af;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.overview-v2-receipts-hint {
  color: #9aabc0;
  font-size: 0.65rem;
}

.event-overview-v2 .checks-mini-list {
  min-height: 42px;
}

.event-overview-v2 .overview-segmented {
  margin-bottom: 12px;
  background: #e3ebf5;
}

.event-overview-v2 .overview-segmented button {
  min-height: 42px;
  padding: 9px 8px;
  font-size: 0.82rem;
}

.event-overview-v2 .compact-summary {
  padding: 11px 14px;
  border-radius: 15px;
  background: #f8fbff;
  box-shadow: none;
}

.event-overview-v2 .participant-row {
  min-height: 67px;
  padding: 13px 14px;
  border-radius: 17px;
  box-shadow: 0 3px 12px rgba(25, 64, 108, 0.045);
}

.event-overview-v2 .participant-name-wrap h4 {
  font-size: 0.91rem;
}

.event-overview-v2 .participant-amount {
  font-size: 0.89rem;
}

.event-overview-v2 .chip {
  padding: 4px 8px;
  font-size: 0.59rem;
}

.event-overview-v2 .status-dot {
  width: 24px;
  height: 24px;
}

.event-overview-v2 .status-dot .material-symbols-outlined {
  font-size: 21px;
}

.event-overview-v2 .participant-selection-details {
  margin-left: 32px;
  border-radius: 13px;
}

.event-split-v2 .split-header {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  padding: 0 0 2px;
}

.event-split-v2 .split-header h1 {
  margin-top: 3px;
  font-size: 1.15rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.event-split-v2 .split-header .muted {
  margin-top: 4px;
  font-size: 0.73rem;
}

.split-kicker {
  margin-bottom: 0;
  font-size: 0.59rem;
}

.event-split-v2 .split-v2-summary {
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 9px;
  margin-bottom: 15px;
}

.event-split-v2 .split-v2-summary .checks-mini-card {
  min-height: 94px;
  padding: 10px 8px;
  border-radius: 17px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.event-split-v2 .split-v2-summary .checks-mini-card > .muted {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.event-split-v2 .split-v2-summary .checks-mini-list {
  justify-content: center;
  gap: 5px;
}

.event-split-v2 .split-v2-summary .checks-mini {
  width: 29px;
  min-width: 29px;
  height: 37px;
  border-radius: 9px;
}

.event-split-v2 .split-v2-summary .split-pay-card {
  min-height: 94px;
  padding: 13px 15px;
  border-radius: 17px;
  text-align: left;
  background: #e9f5ff;
  border-color: #d4eaff;
}

.event-split-v2 .split-pay-card > .muted {
  color: #6b87a7;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.event-split-v2 .split-pay-card b {
  margin-top: 5px;
  color: #1e8bdc;
  font-size: 1.55rem;
  line-height: 0.95;
}

.split-pay-hint {
  margin-top: 5px;
  color: #7791ad;
  font-size: 0.63rem;
  line-height: 1.15;
}

.event-split-v2 .split-list-head {
  padding: 0 5px;
  margin: 0 2px 7px;
  font-size: 0.62rem;
}

.event-split-v2 .split-list-head span:last-child {
  min-width: 108px;
}

.event-split-v2 .split-position-card {
  padding: 11px 12px;
  border-radius: 17px;
  box-shadow: 0 3px 12px rgba(25, 64, 108, 0.045);
}

.event-split-v2 .split-position-index {
  min-width: 21px;
  color: #9aacbf;
  font-size: 1.05rem;
}

.event-split-v2 .split-position-main {
  gap: 4px;
}

.event-split-v2 .split-position-main h4 {
  font-size: 0.88rem;
}

.event-split-v2 .split-position-main .muted {
  font-size: 0.7rem;
}

.event-split-v2 .split-right,
.event-split-v2 .split-coeff-stepper {
  min-width: 101px;
  width: 101px;
}

.event-split-v2 .split-coeff-stepper {
  height: 32px;
  border-radius: 10px;
  grid-template-columns: 27px minmax(0, 1fr) 27px;
}

.event-split-v2 .split-position-amount {
  font-size: 0.8rem;
}

.event-split-v2 .split-extra-card {
  padding: 11px 12px;
  border-radius: 17px;
}

.event-split-v2 .split-extra-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.event-split-v2 .split-extra-card h4 {
  margin-bottom: 3px;
  font-size: 0.85rem;
}

.event-split-v2 .split-extra-card p {
  font-size: 0.68rem;
}

.event-split-v2 > .actions {
  position: sticky;
  bottom: 8px;
  z-index: 4;
  margin: 14px 0 0;
  padding-top: 8px;
  background: linear-gradient(to bottom, rgba(242, 245, 248, 0), var(--bg) 22%);
}

.event-split-v2 .split-action-btn {
  min-height: 50px;
  border-radius: 15px;
  font-size: 0.88rem;
}

body.dark .event-overview-v2 .overview-header .back-btn,
body.dark .event-overview-v2 .overview-edit-btn,
body.dark .event-split-v2 .back-btn {
  background: #20324d;
  color: #b7cbe6;
}

body.dark .event-split-v2 .split-pay-card {
  background: #1f3a56;
  border-color: #315472;
}

/* Figma screens: bots and settings (Frames 7–8) */
.bots-v2,
.settings-v2 {
  max-width: 390px;
  margin: 0 auto;
}

.bots-v2 .bots-header,
.settings-v2 > .page-header {
  padding: 0 0 18px;
}

.bots-v2 .bots-header-top {
  align-items: center;
}

.bots-v2 .bots-header h1,
.settings-v2 > .page-header h1 {
  font-size: 1.4rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.bots-v2 .bots-header .muted {
  max-width: 270px;
  margin-top: 7px;
  color: #7d90aa;
  font-size: 0.76rem;
  line-height: 1.25;
}

.bots-v2 .bot-add-card-btn {
  width: auto;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 0.72rem;
}

.bots-v2 #bots-cards {
  gap: 11px;
}

.bots-v2 .bot-card {
  position: relative;
  display: grid;
  gap: 11px;
  padding: 15px;
  border-radius: 18px;
  border-color: #e4ebf4;
  box-shadow: 0 4px 14px rgba(25, 64, 108, 0.055);
}

.bots-v2 .bot-card-head {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.bots-v2 .bot-card-icon {
  width: 45px;
  height: 45px;
  border-radius: 14px;
  background: #e9f4ff;
  font-size: 1.55rem;
}

.bots-v2 .bot-card-title {
  font-size: 0.96rem;
  line-height: 1.12;
}

.bots-v2 .bot-card-chevron {
  color: #a7b6c9;
  font-size: 1.35rem;
}

.bots-v2 .bot-card-description {
  min-height: 34px;
  margin: 0;
  color: #7286a2;
  font-size: 0.75rem;
  line-height: 1.38;
}

.bots-v2 .bot-card-actions {
  gap: 8px;
  margin-top: 1px;
}

.bots-v2 .bot-card-open {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #e8f4ff;
  color: #2289de;
  font-size: 0.78rem;
}

.bots-v2 .bot-card-edit-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f2f6fb;
}

.bots-v2 .bot-card-empty {
  margin: 0;
  color: #7d90aa;
  font-size: 0.8rem;
}

.settings-v2 .settings-section-label {
  margin: 7px 3px 8px;
  color: #8a9bb1;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.settings-v2 .settings-profile-card {
  min-height: 95px;
  padding: 13px;
  gap: 11px;
  border-radius: 18px;
  border-color: #e4ebf4;
  box-shadow: 0 4px 14px rgba(25, 64, 108, 0.05);
}

.settings-v2 .avatar-photo {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: linear-gradient(145deg, #ffc77b, #ef8d7f);
  color: #fff;
  font-size: 1.25rem;
}

.settings-v2 .profile-main h3 {
  font-size: 0.93rem;
  line-height: 1.1;
}

.settings-v2 .profile-main > p {
  margin-top: 4px;
  color: #8093ac;
  font-size: 0.72rem;
}

.settings-v2 .profile-id-row {
  gap: 7px;
  margin-top: 8px;
}

.settings-v2 .profile-id-row > .muted {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.settings-v2 .profile-id-copy-btn {
  min-height: 23px;
  padding: 3px 7px;
  border-radius: 7px;
  background: #f4f7fb;
  border-color: #e4ebf4;
}

.settings-v2 .profile-id-copy-btn code {
  color: #7187a5;
  font-size: 0.62rem;
}

.settings-v2 .profile-id-copy-btn .material-symbols-outlined {
  font-size: 13px;
}

.settings-v2 .settings-profile-card > .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f3f7fb;
  color: #8ba0ba;
  font-size: 0.95rem;
}

.settings-limit-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 75px;
  padding: 12px;
  border-radius: 18px;
  border-color: #d7eafb;
  background: #f1f8ff;
  box-shadow: none;
}

.settings-limit-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #dceeff;
  color: #2489de;
}

.settings-limit-icon .material-symbols-outlined {
  font-size: 21px;
}

.settings-limit-main {
  min-width: 0;
}

.settings-limit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settings-limit-top strong {
  color: #385b83;
  font-size: 0.77rem;
}

.settings-limit-top b {
  color: #2489de;
  font-size: 0.78rem;
  white-space: nowrap;
}

.settings-limit-progress {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #d8eaf8;
}

.settings-limit-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #36a1e5;
}

.settings-limit-hint {
  display: block;
  margin-top: 5px;
  color: #87a0ba;
  font-size: 0.6rem;
}

.settings-limit-card > .icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #e2f1fd;
  color: #438fca;
}

.settings-v2 .setting-row {
  min-height: 57px;
  margin-bottom: 9px;
  padding: 10px 12px;
  border-radius: 16px;
  border-color: #e4ebf4;
  box-shadow: 0 3px 11px rgba(25, 64, 108, 0.035);
}

.settings-v2 .setting-main {
  gap: 9px;
  color: #3e5575;
  font-size: 0.8rem;
  font-weight: 700;
}

.settings-v2 .setting-ico {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: #f0f6fc;
  color: #6d91b7;
}

.settings-v2 .setting-ico .material-symbols-outlined {
  font-size: 18px;
}

.settings-v2 .currency-select-wrap select {
  min-height: 32px;
  padding: 0 26px 0 9px;
  border-radius: 9px;
  border-color: #dfe8f2;
  background-color: #f7faff;
  color: #5f7898;
  font-size: 0.7rem;
}

.settings-v2 .settings-links {
  border-radius: 16px;
  border-color: #e4ebf4;
  box-shadow: 0 3px 11px rgba(25, 64, 108, 0.035);
}

.settings-v2 .settings-link-row {
  min-height: 55px;
  padding: 10px 12px;
}

.settings-v2 .settings-link-row + .settings-link-row {
  border-top-color: #edf1f6;
}

.settings-v2 .settings-version {
  margin-top: 17px;
  color: #a0afc1;
  font-size: 0.64rem;
}

.settings-v2 .settings-logout {
  min-height: 45px;
  margin-top: 10px;
  border-radius: 13px;
  color: #8397b0;
  font-size: 0.78rem;
}

body.dark .bots-v2 .bot-card,
body.dark .settings-v2 .settings-profile-card,
body.dark .settings-v2 .setting-row,
body.dark .settings-v2 .settings-links {
  border-color: #2d4564;
}

body.dark .bots-v2 .bot-card-open,
body.dark .bots-v2 .bot-card-edit-icon,
body.dark .settings-v2 .setting-ico,
body.dark .settings-v2 .profile-id-copy-btn {
  background: #243b59;
  color: #b8d6f6;
}

body.dark .settings-limit-card {
  border-color: #315574;
  background: #1d3854;
}

body.dark .settings-limit-top strong,
body.dark .settings-v2 .setting-main {
  color: #d6e5f7;
}

.tab:focus {
  outline: none;
}

.event-actions-sheet {
  width: min(390px, 100vw);
  max-width: 390px;
  margin: 0 auto;
  padding: 28px 16px 18px;
  border-radius: 24px 24px 0 0;
  background: #fff;
}

.event-actions-sheet h2 {
  max-width: 285px;
  margin: 0 0 15px;
  overflow: hidden;
  color: #172d4d;
  font-size: 1.12rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-action-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 9px 2px;
  border: 0;
  border-top: 1px solid #edf1f6;
  background: transparent;
  color: #203a5d;
  text-align: left;
  cursor: pointer;
}

.event-action-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #eef6ff;
  color: #318cde;
}

.event-action-row > span:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.event-action-row strong {
  font-size: 0.8rem;
}

.event-action-row small {
  overflow: hidden;
  color: #8798ad;
  font-size: 0.65rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-action-row > .material-symbols-outlined {
  color: #a6b5c6;
  font-size: 19px;
}

.event-action-danger {
  color: #d55c5c;
}

.event-action-danger .event-action-icon {
  background: #fff0f0;
  color: #df6969;
}

body.dark .event-actions-sheet {
  background: #17243a;
}

body.dark .event-actions-sheet h2,
body.dark .event-action-row {
  color: #eef5ff;
}

body.dark .event-action-row {
  border-top-color: #2c405d;
}

/* Strict reference correction: Events screen / exported Figma frame 01 */
.events-v2 {
  width: calc(100% + 32px);
  max-width: none;
  min-height: 100dvh;
  margin: -16px;
  padding: 0 0 calc(92px + env(safe-area-inset-bottom));
  background: var(--bg);
}

.events-v2 .events-header {
  padding: 17px 15px 0;
}

.events-v2 .events-header-top {
  display: none;
}

.events-v2 .search-row {
  height: 34px;
  min-height: 34px;
  margin: 0 0 15px;
  border: 0;
  border-radius: 17px;
  box-shadow: 0 2px 9px rgba(25, 40, 72, 0.08);
}

.events-v2 .search-row input {
  padding-left: 38px;
  padding-right: 48px;
  color: #526887;
  font-size: 14px;
  line-height: 20px;
}

.events-v2 .search-icon {
  left: 13px;
  color: #8ea4c2;
  font-size: 20px;
}

.events-v2 #events-calendar-btn {
  right: 7px;
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0f4fa;
  color: #8ea4c2;
}

.events-v2 #search-clear {
  display: none;
}

.events-v2 .events-status-tabs {
  display: none;
}

.events-v2 .events-legacy-quota {
  display: block;
  height: 136px;
  margin: 0 15px 15px;
  padding: 16px;
  border: 1px solid #e5ebf3;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.events-v2 .quota-top .muted {
  color: #9ba9bf;
  font-size: 14px;
  line-height: 18px;
}

.events-v2 .quota-top .link-btn {
  font-size: 16px;
  line-height: 20px;
}

.events-v2 .quota-title {
  margin: 7px 0 11px;
  color: #526887;
  font-size: 16px;
  line-height: 20px;
}

.events-v2 .progress {
  height: 10px;
  background: #e8eef7;
}

.events-v2 .quota-foot {
  margin-top: 11px;
  color: #60789b;
  font-size: 16px;
  line-height: 20px;
}

.events-v2 .quota-foot .material-symbols-outlined {
  color: #91a6c5;
  font-size: 18px;
}

.events-v2 #events-list.stack {
  gap: 16px;
  margin: 0 15px;
}

.events-v2 .event-card-v2 {
  min-height: 103px;
  padding: 16px;
  border: 1px solid #e5ebf3;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  background: #fff;
  cursor: pointer;
}

.events-v2 .event-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.events-v2 .event-cat-emoji {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  border-radius: 18px;
  background: #eaf3ff;
  font-size: 25px;
  line-height: 1;
}

.events-v2 .event-card h3 {
  max-width: 190px;
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 19px;
  letter-spacing: 0;
  font-weight: 700 !important;
}

.events-v2 .event-card p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 3px 0 0;
  color: #7f90ad;
  font-size: 14px;
  line-height: 17px;
}

.events-v2 .event-side {
  display: grid;
  align-content: space-between;
  justify-items: end;
  min-width: 83px;
  min-height: 66px;
  gap: 8px;
}

.events-v2 .event-side-top {
  text-align: right;
}

.events-v2 .event-total {
  display: block;
  color: #1497df;
  font-size: 18px;
  line-height: 20px;
  font-weight: 700;
}

.events-v2 .event-total-label {
  display: block;
  margin-top: 1px;
  color: #9ba9bf;
  font-size: 10px !important;
  line-height: 12px;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.events-v2 .event-card-actions {
  display: flex;
  align-items: center;
  gap: 1px;
}

.events-v2 .event-card-actions .icon-btn {
  width: 25px;
  height: 25px;
  background: transparent;
  color: #b8c7dc;
}

.events-v2 .event-card-actions .icon-btn .material-symbols-outlined {
  font-size: 18px;
}

.events-v2 .events-create-button {
  position: fixed;
  right: 22px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 45;
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #30a2e3;
  color: #fff;
  box-shadow: 0 10px 24px rgba(48, 162, 227, 0.28);
  font-size: 0;
}

.events-v2 .events-create-button .material-symbols-outlined {
  font-size: 36px;
  line-height: 1;
}

.events-v2 .tabbar {
  width: 100%;
  height: 74px;
  padding-top: 8px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e5ebf3;
}

.events-v2 .tab {
  gap: 3px;
  padding: 5px 4px 9px;
  color: #9ba9bf;
  font-size: 14px;
  line-height: 17px;
}

.events-v2 .tab .material-symbols-outlined {
  font-size: 24px;
}

.events-v2 .tab.active {
  color: #1497df;
}

body.dark .events-v2 .event-card-v2,
body.dark .events-v2 .events-legacy-quota {
  background: var(--surface);
  border-color: var(--line);
}

body.dark .events-v2 .event-card h3 {
  color: var(--text);
}

body.dark .events-v2 .events-create-button {
  background: var(--primary);
}

/* Final geometry corrections from the exported Events reference. */
html,
body {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.events-v2 .quota-top {
  flex-wrap: nowrap;
}

.events-v2 .quota-top .muted,
.events-v2 .quota-top .link-btn {
  white-space: nowrap;
}

.events-v2 .quota-top .muted {
  font-size: 13px;
  line-height: 18px;
}

.events-v2 .quota-top .link-btn {
  font-size: 14px;
  line-height: 18px;
}

.tabbar {
  left: 0;
  right: 0;
  width: 100%;
  height: 74px;
  padding-top: 8px;
  transform: none;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e5ebf3;
  backdrop-filter: none;
}

@media (max-width: 720px) {
  #view-events.events-v2 {
    width: auto;
    margin: -16px -14px;
  }
}

@media (min-width: 721px) {
  .events-v2 .events-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .events-v2 .events-legacy-quota,
  .events-v2 #events-list.stack {
    margin-right: 16px;
    margin-left: 16px;
  }
}

/* The tabbar is outside #view-events, so its Figma typography must be global. */
.tab {
  gap: 3px;
  padding: 5px 4px 9px;
  color: #9ba9bf;
  font-size: 16px;
  line-height: 20px;
  font-weight: 700 !important;
}

.tab > span {
  font-weight: 700 !important;
}

.tab .material-symbols-outlined {
  font-size: 24px;
}

.tab.active {
  color: #1497df;
}

.tab.active::after {
  display: none;
}

.events-v2 .event-cat-emoji .event-cat-symbol {
  color: #1c95da;
  font-size: 24px;
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 24;
}
