.form-control.category-nav-select {
  width: auto;
  max-width: 26ch;
  padding-top: 6px;
  padding-bottom: 6px;
}

.form-field {
  max-width: 364px;
  margin: 0 auto 16px auto;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  box-sizing: border-box;

  /* Borders */
  border: 1px solid #e5e7eb;
  border-radius: 8px;

  /* Colors */
  background: #ffffff;
  color: #44403c;

  /* Transition */
  transition: all 0.15s ease;
}

.form-control:hover {
  border-color: #d1d5db;
}

.form-control:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
  color: #9ca3af;
}

input[type="date"].form-control {
  text-align: left;
  appearance: none;
}

/* Tom Select styling */
.ts-wrapper .ts-control {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  min-height: 42px;
  transition: all 0.15s ease;
  font-size: 14px;
}

.ts-wrapper .ts-control:hover {
  border-color: #d1d5db;
}

.ts-wrapper.focus .ts-control {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ts-wrapper .ts-control input {
  color: #44403c;
  font-size: 16px;
}

.ts-wrapper .ts-control input::placeholder {
  color: #9ca3af;
}

/* Tom Select dropdown */
.ts-dropdown {
  background: #ffffff !important;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.ts-dropdown .option:hover {
  background: #f3f4f6;
}

.ts-dropdown .option.active {
  background: #6366f1;
  color: #ffffff;
}

/* Single select — plain text, no chip */
.ts-wrapper:not(.multi) .item {
  background: none;
  border: none;
  padding: 0;
  color: #44403c;
  font-size: inherit;
  font-weight: normal;
}

/* Tom Select tags (selected items) */
.ts-wrapper .item {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  padding: 2px 8px;
  color: #4338ca;
  font-size: 13px;
  font-weight: 500;
}

.ts-wrapper .item .remove {
  color: #818cf8;
  margin-left: 4px;
  border-left: none;
}

.ts-wrapper .item .remove:hover {
  color: #4338ca;
}

.form-errors {
  background-color: #FEE2E2;
  border: 1px solid #EF4444;
  border-radius: 6px;
  padding: 12px;
  color: #991B1B;
}

.form-errors ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
}

.form-errors li {
  margin-bottom: 4px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
}

.form-hint {
  font-size: 12px;
  color: #6B7280;
  margin-top: 4px;
  margin-bottom: 0;
}

/* Toggle button group */
.toggle-group {
  display: flex;
  background: #ece8e1;
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.toggle-option {
  flex: 1;
  position: relative;
  cursor: pointer;
  text-align: center;
}

.toggle-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-option span {
  display: block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.2s;
}

.toggle-option input[type="radio"]:checked + span {
  background: #fff;
  color: #44403c;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Expense selected - red */
.toggle-option input[type="radio"][value="expense"]:checked + span {
  background: #f87171;
  color: #fff;
}

/* Income selected - green */
.toggle-option input[type="radio"][value="income"]:checked + span {
  background: #00c284;
  color: #fff;
}

/* Page header with back link */
.page-header {
  max-width: 364px;
  margin: 0 auto 32px auto;
  position: relative;
  text-align: center;
}

.page-header .text-link {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #44403c;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}

.page-header .text-link:hover {
  color: #6366f1;
}

.page-header h2 {
  margin: 0;
}

.page-header .page-header-action {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.page-header .delete-link {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #dc2626;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.page-header .delete-link:hover {
  color: #b91c1c;
}

/* Show page header (Back + Title + Edit button) */
.show-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.show-header h2 {
  flex: 1;
  text-align: center;
  margin: 0;
}

.show-header .text-link {
  color: #44403c;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}

.show-header .text-link:hover {
  color: #6366f1;
}

textarea.form-control::placeholder {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 16px;
}

input[type="date"].form-control {
  color: #9ca3af;
}

.input-with-prefix {
  position: relative;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-60%);
  color: #9ca3af;
  font-size: 18px;
  pointer-events: none;
}

.select-wrapper .form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
}

.input-prefix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
  pointer-events: none;
}

.amount-field {
  padding-right: 28px;
  text-align: center;
  font-size: 28px;
}
