/* SPLITWISE — COMPONENT STYLES (Dual-Theme) */

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--font-sm);
  font-weight: 600;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 2px 8px var(--accent-glow);
}

@media (pointer: fine) {
  .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
  }
}
.btn-primary:active {
  transform: scale(0.97) translateY(0);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

@media (pointer: fine) {
  .btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-default);
  }
}
.btn-secondary:active {
  transform: scale(0.97);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
  border: 1px solid rgba(248, 113, 113, 0.18);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.20);
}

.btn-sm {
  padding: 7px 15px;
  font-size: var(--font-xs);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-icon:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

/* ----- Theme Toggle ----- */
.theme-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.15rem;
  transition: all var(--duration-normal) var(--ease-out);
}

.theme-toggle:hover {
  background: var(--bg-surface-hover);
  transform: rotate(15deg) scale(1.08);
}

.theme-toggle:active {
  transform: rotate(0deg) scale(0.95);
}

/* ----- Glass Card ----- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: background var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

[data-theme="light"] .card {
  background: var(--bg-secondary);
}

.card-clickable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (pointer: fine) {
  .card-clickable:hover {
    background: var(--bg-surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  [data-theme="light"] .card-clickable:hover {
    background: var(--bg-secondary);
  }
}
.card-clickable:active {
  transform: scale(0.985);
}

/* ----- Form Elements ----- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 16px; /* prevents iOS zoom on focus */
  transition: all var(--duration-fast) var(--ease-out);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(128,128,128,0.6)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ----- Avatar ----- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-sm);
  flex-shrink: 0;
  position: relative;
  user-select: none;
  color: #fff;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: var(--font-xs);
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: var(--font-lg);
}

.avatar-editable {
  cursor: pointer;
}

.avatar-editable::after {
  content: '✎';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--accent-text);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.avatar-editable:hover::after {
  opacity: 1;
}

.avatar-stack {
  display: flex;
}

.avatar-stack .avatar {
  margin-left: -10px;
  border: 2px solid var(--bg-primary);
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

/* ----- Modal ----- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--z-modal-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn var(--duration-fast) var(--ease-out);
}

[data-theme="light"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.30);
}

.modal {
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: var(--z-modal);
  animation: scaleIn var(--duration-normal) var(--ease-out);
  box-shadow: var(--modal-shadow);
}

[data-theme="light"] .modal {
  background: #ffffff;
  border: 1px solid var(--border-default);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.modal-title {
  font-size: var(--font-xl);
  font-weight: 700;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--duration-fast);
}

.modal-close:hover {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}

.modal-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  margin-top: var(--space-lg);
}

/* ----- Badge ----- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 600;
}

.badge-accent {
  background: var(--accent-subtle);
  color: var(--accent);
}

.badge-purple {
  background: var(--purple-glow);
  color: var(--purple);
}

.badge-red {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}

.badge-green {
  background: rgba(0, 212, 170, 0.12);
  color: var(--accent);
}

/* ----- Toggle Switch ----- */
.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  cursor: pointer;
}

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

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-surface-active);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  transition: all var(--duration-normal) var(--ease-out);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  left: 2px;
  top: 2px;
  background: var(--text-secondary);
  transition: all var(--duration-normal) var(--ease-spring);
}

.toggle input:checked+.toggle-slider {
  background: var(--accent-subtle);
  border-color: var(--accent);
}

.toggle input:checked+.toggle-slider::before {
  transform: translateX(22px);
  background: var(--accent);
}

/* ----- Notification Banner ----- */
.notification {
  position: fixed;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-notification);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: 440px;
  width: calc(100% - var(--space-xl));
  animation: notificationSlide var(--duration-slow) var(--ease-out);
  box-shadow: var(--shadow-lg);
}

.notification-icon {
  font-size: 1.5rem;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  font-size: var(--font-sm);
}

.notification-text {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}

/* ----- Empty State ----- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-tertiary);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state-title {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.empty-state-text {
  font-size: var(--font-sm);
  max-width: 300px;
  margin: 0 auto;
}

/* ----- Tabs ----- */
.tabs {
  display: flex;
  gap: var(--space-xs);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 4px;
}

[data-theme="light"] .tabs {
  background: var(--bg-tertiary);
}

.tab-btn {
  flex: 1;
  padding: 9px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: var(--font-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.tab-btn.active {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.tab-btn:not(.active):hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

/* ----- Category Icons ----- */
.category-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.cat-food { background: rgba(251, 146, 60, 0.12); }
.cat-travel { background: rgba(96, 165, 250, 0.12); }
.cat-shopping { background: rgba(244, 114, 182, 0.12); }
.cat-entertainment { background: rgba(167, 139, 250, 0.12); }
.cat-utilities { background: rgba(250, 204, 21, 0.12); }
.cat-other { background: var(--bg-surface-hover); }

/* ----- Emoji Picker (Avatar) ----- */
.emoji-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-xs);
  padding: var(--space-sm);
  max-height: 200px;
  overflow-y: auto;
}

.emoji-option {
  width: 40px;
  height: 40px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.emoji-option:hover {
  border-color: var(--accent);
  background: var(--bg-surface-hover);
  transform: scale(1.1);
}

.emoji-option.selected {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

/* ----- Color Picker (Avatar) ----- */
.color-picker {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: var(--space-sm);
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--duration-fast);
}

.color-option:hover {
  transform: scale(1.15);
}

.color-option.selected {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--accent);
}

/* ----- Expense Item (Expandable) ----- */
.expense-item {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.expense-item:last-child {
  border-bottom: none;
}

.expense-item.expanded {
  background: var(--bg-surface);
  border: 1px solid var(--accent-subtle);
  margin-bottom: var(--space-sm);
}

.expense-item-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  cursor: pointer;
  transition: background var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}

.expense-item-header:hover {
  background: var(--bg-surface);
}

.expense-info {
  flex: 1;
  min-width: 0;
}

.expense-desc {
  font-weight: 600;
  font-size: var(--font-base);
}

.expense-meta {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

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

.expense-amount-value {
  font-weight: 700;
  font-size: var(--font-lg);
}

.expense-amount-sub {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}

.expense-chevron {
  color: var(--text-tertiary);
  font-size: var(--font-xs);
  margin-left: var(--space-xs);
  transition: transform var(--duration-fast);
}

.expense-delete-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 var(--space-md) 0 0;
  margin-top: -8px;
}

/* Settled expense state */
.expense-item.settled {
  opacity: 0.50;
}

.expense-item.settled .expense-item-header {
  cursor: default;
}

.expense-item.settled .expense-item-header:hover {
  background: transparent;
}

.settled-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ----- Expense Slider Panel ----- */
.expense-sliders {
  padding: var(--space-sm) var(--space-lg) var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  animation: fadeInDown var(--duration-normal) var(--ease-spring);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.slider-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--accent);
}

.slider-total {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  flex-wrap: wrap;
}

.slider-member-info {
  min-width: 90px;
}

.slider-member-name {
  font-size: var(--font-sm);
  font-weight: 500;
}

.slider-member-amount-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}

.slider-currency {
  font-size: var(--font-xs);
  color: var(--accent);
  font-weight: 600;
}

.slider-amount-input {
  width: 60px;
  padding: 2px 4px;
  background: var(--bg-surface);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--accent);
  font-family: var(--font-family);
  font-size: var(--font-xs);
  font-weight: 700;
  transition: all var(--duration-fast) var(--ease-out);
  -moz-appearance: textfield;
}

.slider-amount-input::-webkit-outer-spin-button,
.slider-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.slider-amount-input:hover {
  border-color: var(--border-default);
}

.slider-amount-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Range Slider Custom Styling */
.split-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-surface-active);
  border-radius: var(--radius-full);
  outline: none;
  transition: background var(--duration-fast);
}

.split-slider:hover {
  background: var(--border-default);
}

.split-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--accent), var(--green));
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--accent-glow);
  transition: transform var(--duration-fast) var(--ease-spring);
}

.split-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.split-slider::-webkit-slider-thumb:active {
  transform: scale(1.3);
}

.split-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--accent), var(--green));
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.split-slider::-moz-range-track {
  background: var(--bg-surface-active);
  height: 6px;
  border-radius: var(--radius-full);
  border: none;
}

.slider-control {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.slider-pct {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  min-width: 35px;
  text-align: right;
}

/* Slider Actions */
.slider-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.slider-remaining {
  flex: 1;
  text-align: center;
  font-size: var(--font-xs);
  font-weight: 600;
}

.slider-remaining.balanced { color: var(--accent); }
.slider-remaining.unbalanced { color: var(--yellow); }
.slider-remaining.over { color: var(--red); }

/* ----- Balance Row ----- */
.balance-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.balance-arrow {
  color: var(--text-tertiary);
  font-size: var(--font-lg);
}

.balance-amount {
  margin-left: auto;
  font-weight: 700;
}

.balance-amount.owes { color: var(--red); }
.balance-amount.gets { color: var(--accent); }

.balance-settle {
  margin-left: var(--space-sm);
}

/* ----- Activity Item ----- */
.activity-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: var(--font-sm);
}

.activity-date {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ----- People List (GPay-style) ----- */
.search-bar {
  position: relative;
  margin-bottom: var(--space-md);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0.5;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-base);
  transition: all var(--duration-fast) var(--ease-out);
}

[data-theme="light"] .search-input {
  background: var(--bg-secondary);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

.people-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.person-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  animation: fadeInUp var(--duration-slow) var(--ease-out) both;
}

[data-theme="light"] .person-row {
  background: var(--bg-secondary);
  box-shadow: var(--shadow-card);
}

.person-row:hover {
  background: var(--bg-surface-hover);
}

[data-theme="light"] .person-row:hover {
  background: var(--bg-secondary);
}

@media (pointer: fine) {
  .person-row:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
  }
}

.person-row:active {
  transform: scale(0.985);
}

.person-info {
  flex: 1;
  min-width: 0;
}

.person-name {
  font-weight: 600;
  font-size: var(--font-base);
  margin-bottom: 2px;
}

.person-balance {
  font-size: var(--font-xs);
  font-weight: 500;
}

.person-balance.owes-you { color: var(--accent); }
.person-balance.you-owe { color: var(--red); }
.person-balance.settled { color: var(--text-tertiary); }

.person-arrow {
  color: var(--text-tertiary);
  font-size: var(--font-xl);
  font-weight: 300;
  transition: transform var(--duration-fast);
}

.person-row:hover .person-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

/* ----- Person Detail ----- */
.person-detail-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.person-balance-label {
  font-size: var(--font-sm);
  font-weight: 500;
  margin-top: 4px;
}

.person-balance-display {
  font-size: var(--font-3xl);
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.person-settle-btn {
  margin-bottom: var(--space-md);
}

/* ----- Direct Expense Item ----- */
.direct-expense-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
  transition: opacity var(--duration-normal);
}

.direct-expense-item:last-child {
  border-bottom: none;
}

.direct-expense-item.settled {
  opacity: 0.50;
}

.direct-split-detail {
  font-size: var(--font-xs);
  font-weight: 600;
  margin-top: 3px;
}

/* ----- Paid-By Selector ----- */
.paid-by-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.paid-by-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px;
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--font-sm);
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease-out);
}

[data-theme="light"] .paid-by-option {
  background: var(--bg-secondary);
}

.paid-by-option:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-default);
}

.paid-by-option.active {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

.paid-by-icon {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

/* ----- Split Type Selector ----- */
.split-selector {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.split-option {
  display: block;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

[data-theme="light"] .split-option {
  background: var(--bg-secondary);
}

.split-option input[type="radio"] {
  display: none;
}

.split-option:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-default);
}

.split-option.active {
  background: var(--accent-subtle);
  border-color: var(--accent);
}

.split-option-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.split-option-icon {
  font-size: 1.3rem;
}

.split-option-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.split-option-desc {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  margin-top: 1px;
}

.split-option.active .split-option-title {
  color: var(--accent);
}

/* ----- Dashboard Tab Switcher ----- */
.dash-tabs {
  display: flex;
  gap: var(--space-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: var(--space-xl);
}

[data-theme="light"] .dash-tabs {
  background: var(--bg-tertiary);
  border-color: var(--border-default);
}

.dash-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.dash-tab.active {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow-sm);
}

.dash-tab:not(.active):hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.dash-tab-icon {
  font-size: 1.1rem;
}

/* ----- Welcome / Setup Modal ----- */
.welcome-card {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
}

.welcome-emoji {
  font-size: 3.5rem;
  margin-bottom: var(--space-md);
  animation: pulse 2s ease-in-out infinite;
}

.welcome-title {
  font-size: var(--font-2xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-text {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  margin-bottom: var(--space-xl);
}