/* Trip expenses (expenses.js) */
.page-intro[hidden] + #app { padding-top: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-top: 14px; }
.panel h2 { font-size: 19px; margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 14px; }
.sec { font-size: 18px; margin: 10px 0 8px; }
.back { display: inline-block; margin-bottom: 8px; font-weight: 600; }
.msg { font-size: 14px; font-weight: 600; margin: 8px 0 0; } .msg.err { color: #B42318; } .msg.ok { color: #145A33; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 10px 0; font: 600 14.5px var(--font-body); color: var(--blue, #1D4ED8); cursor: pointer; text-decoration: underline; }
.ex-card { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 14px 16px; margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.ex-card:hover { border-color: #F59E0B; }
.ex-card span { grid-column: 1; color: var(--muted); font-size: 13.5px; }
.ex-card em { grid-column: 2; grid-row: 1 / 3; font-style: normal; font-weight: 800; font-size: 16px; }
.ex-card.done { opacity: .7; }
.ex-f { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); margin-top: 10px; min-width: 0; }
.ex-f input, .ex-f select, .ex-f textarea, .ex-form input[type=text], .ex-form select, .ex-add-p input { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: 16px var(--font-body); color: var(--ink); background: #fff; min-width: 0; box-sizing: border-box; width: 100%; }
.ex-f textarea { padding: 8px 12px; }
.ex-f small { font-weight: 400; color: var(--muted); }
.ex-r { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 15px; color: var(--ink); margin-top: 8px; cursor: pointer; }
.ex-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ex-new .btn-primary { margin-top: 14px; }
.ex-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.ex-head h1 { font-size: 26px; margin: 0; }
.ex-head p { margin: 4px 0 0; }
.ex-hb { display: flex; gap: 6px; flex-wrap: wrap; }
.ex-total { display: flex; flex-direction: column; gap: 4px; }
.ex-total small { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }
.ex-total > b { font-size: 34px; line-height: 1.1; font-family: var(--font-display); }
.ex-bar { height: 10px; border-radius: 5px; background: #EDEBF3; overflow: hidden; margin-top: 6px; }
.ex-bar i { display: block; height: 100%; background: #1F8A4C; } .ex-bar.over i { background: #B42318; }
.ex-wait { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: #FFF7E6; border: 1px solid #F6D58A; font-size: 14px; }
.ex-add { width: 100%; min-height: 54px; font-size: 18px; margin-top: 14px; }
.ex-form h2 { margin-bottom: 6px; }
.ex-am-row { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.ex-form .ex-amt { min-height: 58px; font-size: 28px; font-weight: 800; }
.ex-form .ex-am-row select { min-height: 58px; font-size: 17px; font-weight: 700; }
.ex-rate-row { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 14px; }
.ex-form .ex-rate { width: 140px; min-height: 38px; font-size: 15px; }
.ex-conv { font-size: 15px; }
.ex-rl { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ex-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.ex-cats button { min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: 600 14px var(--font-body); color: var(--ink); cursor: pointer; }
.ex-cats button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ex-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ex-del { color: #B42318; }
.ex-sug summary { cursor: pointer; font-weight: 700; }
.ex-sr { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.ex-tabs { display: flex; gap: 6px; margin: 18px 0 6px; }
.ex-tabs button { flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: 700 15px var(--font-body); color: var(--ink-soft); cursor: pointer; }
.ex-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ex-empty { text-align: center; padding: 18px 0; }
.ex-day { display: flex; justify-content: space-between; gap: 10px; margin: 16px 2px 6px; font-size: 14.5px; color: var(--ink-soft); }
.ex-it { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-top: 6px; }
.ex-it.can { cursor: pointer; } .ex-it.can:hover { border-color: #F59E0B; }
.ex-it.wait { opacity: .7; border-style: dashed; }
.ex-ic { font-size: 22px; text-align: center; }
.ex-t { min-width: 0; } .ex-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ex-t small { color: var(--muted); font-size: 12.5px; }
.ex-am { text-align: right; } .ex-am b { display: block; white-space: nowrap; } .ex-am small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.ex-sum h3 { margin: 0 0 8px; font-size: 16px; }
.ex-br { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 14px; }
.ex-br span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-bt { position: relative; height: 10px; border-radius: 5px; background: #EDEBF3; }
.ex-bt i { display: block; height: 100%; border-radius: 5px; background: #6D28D9; } .ex-bt.over i { background: #B42318; }
.ex-bt u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.ex-br b { white-space: nowrap; font-size: 13.5px; }
.ex-pr { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.ex-pr > div { flex: 1 1 180px; } .ex-pr small { display: block; color: var(--muted); }
.ex-add-p { display: flex; gap: 8px; margin-top: 10px; } .ex-add-p input { flex: 1; }
.ex-bud { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; } .ex-bud label { display: flex; flex-direction: column; font-size: 13px; gap: 3px; }
.ex-bud input { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; font: 15px var(--font-body); }
@media (max-width: 560px) { .ex-head h1 { font-size: 22px; } .ex-total > b { font-size: 30px; } .ex-br { grid-template-columns: minmax(0, 1fr) 70px auto; } }

/* the AI helper */
.ex-ai { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ex-airow { display: flex; gap: 6px; align-items: center; }
.ex-airow input[type=text] { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: 16px var(--font-body); background: #fff; }
.ex-cam { flex: none; white-space: nowrap; }
.ex-aiq { margin: 0; font-weight: 700; }
.ex-aii { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; font-size: 14px; }
.ex-aiup { margin: 8px 0 0; font-size: 13px; }
.ex-aichk { margin: 0; font-size: 13px; }
