.expense-category-field {
  position: relative;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.app-select { position: relative; }
.app-select-trigger {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(180deg, #fff, #f7faf8);
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  box-shadow: 0 2px 8px #143b3410;
}
.app-select-trigger b {
  color: var(--g);
  font-size: 18px;
  transition: transform 0.18s;
}
.app-select-trigger[aria-expanded="true"] b { transform: rotate(180deg); }
.app-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: 250px;
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 18px 40px #16342f24;
}
.app-select-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 750;
  text-align: left;
}
.app-select-menu button[aria-selected="true"] {
  background: var(--mint);
  color: var(--gd);
}
.app-select-menu button b { color: var(--g); }
.category-create-toggle,
.category-manage-toggle {
  justify-self: start;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--g);
  font-size: 11px;
  font-weight: 850;
}
.category-manage-toggle { margin-top: -4px; }
.category-create {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}
.expense-entry input,
.expense-entry select,
.expense-entry textarea {
  font-size: 16px;
}
.category-create input { min-width: 0; }
.category-create button {
  border: 0;
  border-radius: 11px;
  padding: 0 13px;
  background: var(--g);
  color: #fff;
  font-weight: 800;
}
.category-manager {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7faf8;
}
.category-manager-list { display: grid; gap: 5px; }
.category-manager-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  background: #fff;
}
.category-manager-row span { min-width: 0; color: var(--ink); }
.category-manager-row small { display: block; color: var(--muted); font-weight: 650; }
.category-manager-row div { display: flex; gap: 5px; }
.category-manager-row button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--mint);
  color: var(--g);
  font-size: 16px;
}
.category-manager-row button:last-child { background: #f8e8e5; color: #9f3d32; }
.category-editor,
.category-reassign {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.category-editor label,
.category-reassign label { display: grid; gap: 6px; }
.category-editor input,
.category-reassign select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}
.category-reassign p { margin: 0; color: var(--muted); line-height: 1.45; }
.category-error { min-height: 16px; color: #9f3d32; }
.category-manager-actions { display: flex; gap: 7px; }
.category-manager-actions button {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}
.category-manager-actions .category-primary { border-color: var(--g); background: var(--g); color: #fff; }
.category-manager-actions .category-danger { border-color: #9f3d32; background: #9f3d32; color: #fff; }
html[dir="rtl"] .app-select-trigger,
html[dir="rtl"] .app-select-menu button { text-align: right; }

.cost-hero {
  padding: 21px;
}
.cost-hero h2 {
  margin-bottom: 6px;
  font-size: 29px;
}
.cost-hero-intro {
  margin: 0 0 15px;
}
.cost-quick-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.cost-quick-summary p {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 12px;
  border: 1px solid #0b66551a;
  border-radius: 13px;
  background: #ffffff99;
}
.cost-quick-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.cost-quick-summary strong {
  color: var(--gd);
  font-size: 19px;
}
.cost-quick-total {
  background: var(--mint) !important;
}

@media (max-width: 620px) {
  .cost-hero {
    padding: 15px;
    border-radius: 18px;
  }
  .cost-hero .eyebrow {
    margin-bottom: 3px;
    font-size: 9px;
  }
  .cost-hero h2 {
    margin: 0 0 10px;
    font-family: inherit;
    font-size: 22px;
    line-height: 1.08;
  }
  .cost-hero-intro {
    display: none;
  }
  .cost-quick-summary {
    gap: 6px;
  }
  .cost-quick-summary p {
    gap: 2px;
    padding: 9px 8px;
    border-radius: 11px;
  }
  .cost-quick-summary span {
    min-height: 25px;
    font-size: 9px;
    line-height: 1.25;
  }
  .cost-quick-summary strong {
    font-size: 15px;
    white-space: nowrap;
  }
  .cost-entry-title {
    margin-top: 15px;
  }
}

.flight-track-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}
.flight-track-links a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #0b66552b;
  border-radius: 12px;
  background: var(--mint);
  color: var(--gd);
  text-decoration: none;
}
.flight-track-links a > span:first-child {
  flex: 0 0 auto;
  font-size: 17px;
}
.flight-track-links a > span:last-child {
  display: grid;
  min-width: 0;
}
.flight-track-links strong {
  font-size: 13px;
}
.flight-track-links small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .flight-track-links {
    grid-template-columns: 1fr;
  }
}
