* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body, #app { min-height: 100%; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
#app { min-height: 100vh; }
.page { min-height: 100vh; background: #f8fafc; padding: 24px; }
.home-page { display: flex; flex-direction: column; }
.home-hero {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.home-hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1; font-weight: 800; color: #0f172a; letter-spacing: 0; }
.home-hero p { margin-top: 12px; color: #64748b; font-size: 14px; font-weight: 600; }
.home-actions { width: min(100%, 760px); margin: 28px auto 0; }
.big-btn {
  width: 100%;
  min-height: 70px;
  border: 0;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 10px 24px -12px rgba(15,23,42,.45);
  transition: transform .18s ease, box-shadow .18s ease;
}
.big-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(15,23,42,.55); }
.big-btn.primary { color: #fff; background: linear-gradient(135deg, #0d9488, #10b981); }
.big-btn.ghost { background: #fff; color: #0d9488; border: 1px solid #e2e8f0; }
.or-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin: 20px 0; color: #64748b; font-size: 13px; font-weight: 700; }
.or-row::before, .or-row::after { content: ""; height: 1px; background: #e2e8f0; }
.top-shell {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 64px;
  margin: -24px -24px 24px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.pill-btn {
  min-height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  padding: 0 14px;
}
.top-title { justify-self: center; color: #0f172a; font-size: 18px; font-weight: 800; text-align: center; }
.content { width: min(100%, 980px); margin: 0 auto; }
.who-card {
  min-height: 60px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  color: #0d9488;
  font-size: 16px;
  font-weight: 700;
}
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.category-card {
  min-height: 124px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -12px rgba(15,23,42,.22); }
.category-card::before { content: ""; width: 38px; height: 4px; border-radius: 999px; background: linear-gradient(135deg, #0d9488, #10b981); margin-bottom: 16px; }
.category-card strong { color: #0f172a; font-size: 18px; font-weight: 800; }
.category-card span { margin-top: 8px; color: #64748b; font-size: 13px; font-weight: 600; }
.form-card, .ticket-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.form-card { padding: 20px; }
.field { margin-top: 16px; }
.field:first-child { margin-top: 0; }
.field label { display: block; margin-bottom: 7px; color: #475569; font-size: 13px; font-weight: 700; }
.input, select, textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  padding: 11px 12px;
  outline: 0;
  font-size: 14px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, select:focus, textarea:focus { border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.amount { color: #0d9488; font-size: 18px; font-weight: 800; text-align: center; }
.form-submit { width: 100%; margin-top: 20px; min-height: 46px; border: 0; border-radius: 12px; background: #0d9488; color: #fff; font-size: 15px; font-weight: 700; }
.history-head {
  height: 64px;
  margin: -24px -24px 24px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 5;
}
.history-title h1 { color: #0f172a; font-size: 20px; font-weight: 800; }
.history-title p { color: #64748b; font-size: 12px; font-weight: 600; margin-top: 2px; }
.tab-row { margin-bottom: 16px; }
.status-tab { min-height: 44px; border: 0; border-radius: 10px; background: rgba(13,148,136,.22); color: #0d9488; font-size: 14px; font-weight: 800; padding: 0 16px; }
.count-label { margin-bottom: 10px; color: #64748b; font-size: 13px; font-weight: 700; }
.ticket-card { padding: 16px; margin-bottom: 12px; }
.ticket-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
.ticket-id { display: inline-block; min-width: 150px; padding: 6px 10px; border-radius: 8px; background: #f1f5f9; color: #0d9488; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; font-weight: 800; }
.ticket-title { margin-top: 10px; color: #0f172a; font-size: 17px; font-weight: 800; line-height: 1.25; }
.ticket-desc { margin-top: 5px; color: #64748b; font-size: 14px; line-height: 1.45; }
.ticket-amount { color: #0d9488; font-size: 24px; font-weight: 800; white-space: nowrap; text-align: right; }
.pending-pill { margin-top: 12px; display: inline-flex; padding: 5px 10px; border-radius: 999px; background: #fef3c7; color: #b45309; font-size: 12px; font-weight: 800; }
.ticket-foot { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e2e8f0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; color: #475569; font-size: 13px; }
.cat-pill { justify-self: center; padding: 4px 10px; border-radius: 999px; background: #ccfbf1; color: #0f766e; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.ticket-date { justify-self: end; }
.empty { padding: 38px 0; text-align: center; color: #64748b; font-size: 14px; font-weight: 700; }
.hide { display: none; }
@media (max-width: 760px) {
  .page { padding: 16px; }
  .home-hero { min-height: 160px; }
  .home-hero h1 { font-size: 34px; }
  .home-actions { margin-top: 18px; }
  .big-btn { min-height: 58px; font-size: 15px; }
  .top-shell, .history-head { margin: -16px -16px 16px; padding: 0 16px; grid-template-columns: 88px 1fr 88px; }
  .pill-btn { min-height: 36px; font-size: 13px; padding: 0 10px; }
  .top-title { font-size: 16px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 104px; }
  .ticket-main, .ticket-foot { grid-template-columns: 1fr; }
  .ticket-amount { text-align: left; font-size: 22px; }
  .cat-pill, .ticket-date { justify-self: start; }
}
