/* KIN Finance: additions on top of the shared KIN style */
.fin-hero .hero-k { margin: 0; color: #e3e6ff; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.fin-hero .hero-amt { font-size: 34px; margin: 4px 0 2px; }
.fin-val { font-size: 20px !important; white-space: nowrap; }
.k-personal { background: var(--purple-soft); color: var(--purple); }
.k-work { background: #e0f6fb; color: #0b88a5; }
.c-personal { color: var(--purple); }
.c-work { color: #0b88a5; }

.exp-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.exp-item:last-child { border-bottom: 0; }
.exp-item:hover .exp-title { color: var(--purple); }
.exp-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--purple-soft); color: var(--purple); }
.exp-ic.work { background: #e0f6fb; color: #0b88a5; }
.exp-ic svg { width: 18px; height: 18px; }
.exp-main { flex: 1; min-width: 0; }
.exp-title { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-sub svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; }
.main { overflow-x: hidden; }
.exp-right { text-align: right; flex: 0 1 auto; min-width: 0; display: grid; gap: 4px; justify-items: end; }
.exp-amt { font-weight: 800; color: var(--navy); white-space: nowrap; }
.exp-tags { display: flex; gap: 4px; }
.exp-tags .pill { font-size: 11px; padding: 2px 8px; }
.day-total { color: var(--navy); }

.sum-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sum-strip > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.sum-strip span { font-size: 12px; color: var(--muted); font-weight: 600; }
.sum-strip b { font-size: 17px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.claim-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.claim-total { font-size: 28px; font-weight: 800; color: var(--navy); }
.claim-bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.claim-bulk #bulk-info { font-size: 13px; color: var(--purple); }
.claim-row { display: flex; gap: 12px; align-items: center; border-bottom: 1px dashed var(--line); }
.claim-row:last-child { border-bottom: 0; }
.claim-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--purple); flex: none; }
.claim-date { width: 92px; flex: none; font-size: 12.5px; font-weight: 700; color: var(--navy); }
.claim-main { flex: 1; min-width: 0; }
.claim-main .exp-item { border: 0; }

.amt-wrap { display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); border-radius: 14px; padding: 6px 16px; background: #fbfcff; }
.amt-wrap:focus-within { border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(59,108,246,.12); }
.amt-wrap span { font-size: 22px; font-weight: 800; color: var(--muted); }
.amt-wrap input { border: 0; margin: 0; padding: 8px 0; font-size: 30px; font-weight: 800; color: var(--navy); background: transparent; box-shadow: none !important; }
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kind-pick button { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 11px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.kind-pick button[data-k="personal"].on { background: var(--purple-soft); border-color: var(--purple-2); color: var(--purple); }
.kind-pick button[data-k="work"].on { background: #e0f6fb; border-color: #0ea5c6; color: #0b88a5; }
.work-box { background: #f0fbfe; border: 1px solid #c9eef7; border-radius: 12px; padding: 12px 14px; }
.receipt-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.receipt-box img { max-height: 120px; max-width: 160px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.rc-btn { margin: 0; cursor: pointer; }
.lists-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.list-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 12px; align-content: start; background: #fbfcff; }
.list-head { display: flex; gap: 10px; align-items: flex-start; }
.list-head svg { color: var(--purple); }
.list-head > div { flex: 1; }
.list-head .count { background: var(--purple-soft); color: var(--purple); border-radius: 20px; padding: 0 9px; font-size: 12px; font-weight: 700; }
.list-add { display: flex; gap: 8px; }
.list-add input { margin: 0; padding: 8px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 3px 4px 3px 11px; font-size: 13px; font-weight: 600; color: var(--navy); }
.chip em { font-style: normal; font-size: 10.5px; background: var(--blue-soft); color: var(--blue); border-radius: 10px; padding: 0 6px; }
.chip-btn { border: 0; background: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--muted); padding: 0; }
.chip-btn svg { width: 13px; height: 13px; }
.chip-btn.del:hover { background: var(--red-soft); color: var(--red); }
.lk-new { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.lk-new input { margin: 0; }
.range { display: inline-flex; align-items: center; gap: 6px; }
.range input { width: auto; margin: 0; }
.seg-count { font-size: 11px; margin-left: 4px; color: var(--muted); }
.seg-count:empty { display: none; }
.check-all { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; }
.check-all input { width: 18px; height: 18px; margin: 0; accent-color: var(--purple); }

@media (max-width: 860px) {
  .bottom-nav { grid-template-columns: repeat(5, 1fr) !important; }
  #add-exp { display: none; }
  .fin-hero .hero-amt { font-size: 28px; }
  .g-kpi .kpi:nth-child(5) { grid-column: 1 / -1; }
  .sum-strip { grid-template-columns: 1fr 1fr; gap: 8px; }
  .toolbar.exp-tb select, .toolbar.exp-tb input[type=month] { flex: 1 1 calc(50% - 5px); min-width: 0; width: auto; }
  .toolbar.exp-tb .seg { width: 100%; }
  .toolbar.exp-tb .seg button { flex: 1; justify-content: center; }
  .range { flex: 1 1 100%; }
  .range input { flex: 1; min-width: 0; width: 0; }
  .claim-date { width: 64px; font-size: 11.5px; }
  .claim-main .exp-tags { display: none; }
  .exp-tags .pill.k-personal, .exp-tags .pill.k-work { display: none; }
  #r-tabs { width: 100%; } #r-tabs button { flex: 1; justify-content: center; font-size: 12px; padding: 7px 4px; }
  .claim-bulk { width: 100%; }
  .claim-bulk .btn { flex: 1; justify-content: center; }
}

/* layout guards: long single-line text must never widen the page */
.content { grid-template-columns: minmax(0, 1fr); }
.grid.g-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid.g-half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.card, .list, .exp-item, .claim-row { min-width: 0; }
.rc-btn input[type=file] { display: none; }
@media (max-width: 1100px) { .grid.g-2, .grid.g-half { grid-template-columns: minmax(0, 1fr); } }
