*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #0891B2; --brand-dark: #0E7490; --brand-light: #E0F7FA;
  --text: #0C4A6E; --text-muted: #64748B; --border: #e3e8f0;
  --bg: #f7f9fc; --white: #FFFFFF; --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.07); --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --c-flight: #2563eb; --c-hotel: #F97316; --c-food: #059669;
  --c-transport: #b45309; --c-activity: #EC4899; --c-other: #2563eb;
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* HEADER */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 800; color: var(--brand); }
.header-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { background: var(--brand-light); color: var(--brand-dark); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }

/* LAYOUT */
.app-main { max-width: 1200px; margin: 0 auto; padding: 20px; }
.app-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .app-grid { grid-template-columns: 1fr; } }

/* CARD */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 700; }
.toggle-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); cursor: pointer; }
.toggle-check { accent-color: var(--brand); width: 14px; height: 14px; cursor: pointer; }

/* FORMS */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.full-span { grid-column: 1 / -1; }
.field-group { display: flex; flex-direction: column; gap: 4px; }
.field-group label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.inp { width: 100%; padding: 9px 10px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--text); outline: none; background: var(--white); }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(8,145,178,.1); }
select.inp { cursor: pointer; }
.money-input { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; }
.money-input:focus-within { border-color: var(--brand); }
.money-input .sym { padding: 0 10px; background: var(--bg); color: var(--text-muted); font-size: 14px; font-weight: 600; border-right: 1px solid var(--border); white-space: nowrap; }
.money-input .inp { border: none; flex: 1; }
.opt-check { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; color: var(--text-muted); }
.opt-check input { accent-color: var(--brand); cursor: pointer; }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; width: fit-content; }
.step-btn { padding: 9px 14px; border: none; background: var(--bg); font-size: 16px; cursor: pointer; color: var(--brand); font-weight: 700; transition: background .12s; }
.step-btn:hover { background: var(--brand-light); }
.step-val { padding: 0 18px; font-size: 15px; font-weight: 700; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }

/* Custom activities */
.custom-activities { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.activity-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; }
.activity-row .inp { font-size: 13px; }
.btn-del-line { background: none; border: none; cursor: pointer; color: #334155; font-size: 18px; padding: 4px 8px; border-radius: 4px; }
.btn-del-line:hover { color: #EF4444; background: #FEF2F2; }
.btn-add-line { margin-top: 8px; background: none; border: 1.5px dashed var(--border); border-radius: 8px; color: var(--brand); font-size: 12px; font-weight: 600; padding: 8px; width: 100%; cursor: pointer; font-family: inherit; transition: all .12s; }
.btn-add-line:hover { border-color: var(--brand); background: var(--brand-light); }

.expense-block { }
.card:not(:has(.card-header)) .card-title { margin-bottom: 14px; }

/* PRINT */
.btn-print { display: block; width: 100%; padding: 12px; background: var(--brand-light); color: var(--brand-dark); border: 1.5px solid var(--brand); border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .12s; }
.btn-print:hover { background: var(--brand); color: white; }

/* SUMMARY */
.summary-panel { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; }

.summary-card { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); border-radius: var(--radius); padding: 18px; color: white; box-shadow: var(--shadow-md); }
.trip-name { font-size: 18px; font-weight: 800; }
.trip-dates { font-size: 13px; opacity: .8; margin-top: 3px; }
.trip-meta { font-size: 12px; opacity: .7; margin-top: 2px; }

.total-card { background: var(--white); border: 2px solid var(--brand); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow-md); }
.total-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: 4px; }
.total-amount { font-size: 48px; font-weight: 900; color: var(--brand); line-height: 1; letter-spacing: -.02em; }
.total-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.breakdown-card, .daily-card, .tips-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.breakdown-title, .daily-title, .tips-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: 12px; }

.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.bar-label { min-width: 90px; color: var(--text-muted); }
.bar-track { flex: 1; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; }
.bar-val { min-width: 60px; text-align: right; font-weight: 600; font-size: 12px; }

.daily-amount { font-size: 28px; font-weight: 800; color: var(--brand); margin-bottom: 10px; }
.daily-row { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.daily-row:last-child { border-bottom: none; }
.daily-row span:last-child { font-weight: 600; color: var(--text); }

.tip-item { font-size: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); color: var(--text-muted); line-height: 1.5; }
.tip-item:last-child { border-bottom: none; }
.tip-item strong { color: var(--text); }

/* FOOTER */
.site-footer { border-top: 1px solid var(--border); text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; line-height: 1.8; background: var(--white); margin-top: 20px; }
.footer-small { font-size: 11px; color: #5b6878; }

@media print {
  .site-header, .btn-print, .btn-add-line, .btn-del-line { display: none !important; }
  .app-grid { grid-template-columns: 1fr 1fr; }
  .summary-panel { position: static; }
}
