:root { --primary: #4f46e5; --green: #16a34a; --red: #dc2626; --muted: #6b7280; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, 'Segoe UI', Roboto, sans-serif; background: #f4f5f7; min-height: 100vh; color: #111827;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); -webkit-text-size-adjust: 100%; }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 18px; box-shadow: 0 10px 28px rgba(16,24,40,.06); padding: 18px; max-width: 560px; margin: 0 auto 12px; }
.card.center { text-align: center; }
h1 { font-size: 19px; margin-bottom: 4px; }
h2 { font-size: 17px; margin-bottom: 12px; }
p { font-size: 15px; color: #333; }
.muted { color: var(--muted); font-size: 13px; }
.info { display: flex; justify-content: space-between; align-items: center; background: #eef2ff; border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.info b { font-size: 18px; color: var(--primary); }
.who { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #eef0f2; }
.who > div { flex: 1; min-width: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.op { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.op.closed { background: #f3f4f6; opacity: .7; }
.op-info { grid-row: 1 / span 2; min-width: 0; }
.op-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.qty { width: 88px; height: 48px; border: 1px solid #d1d5db; border-radius: 12px; font-size: 20px; text-align: center; font-weight: 600; }
.qty:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.rest { font-size: 11px; color: var(--muted); text-align: center; margin-top: 3px; }
.done-badge { grid-row: 1 / span 2; background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.btn { display: block; width: 100%; border: 0; border-radius: 14px; padding: 16px; font-size: 17px; font-weight: 600; color: #fff; cursor: pointer; margin-top: 10px; }
.btn.primary { background: var(--primary); }
.btn.in { background: var(--green); }
.btn.out { background: var(--red); }
.btn:disabled { opacity: .45; }
.btn:active { transform: scale(.98); }
.field { display: block; text-align: left; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input { width: 100%; border: 1px solid #d1d5db; border-radius: 12px; padding: 12px 14px; font-size: 16px; }
.error { color: var(--red); font-size: 14px; margin-top: 10px; min-height: 18px; }
.success { color: var(--green); font-size: 15px; font-weight: 600; margin-top: 10px; min-height: 18px; }
.link-btn { display: inline-block; background: none; border: 0; color: var(--primary); font-size: 14px; margin-top: 12px; cursor: pointer; text-decoration: none; }
.who .link-btn { margin-top: 0; }
.sticky-bottom { position: sticky; bottom: max(8px, env(safe-area-inset-bottom)); }
.status { font-size: 16px; font-weight: 600; margin: 6px 0 2px; }
.logo { width: 52px; height: 52px; border-radius: 14px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 700; margin: 0 auto 14px; }
.home { display: block; text-align: center; margin-top: 6px; }
