* { box-sizing: border-box; }
body { margin: 0; background: #eef0f3; color: #1d2433; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#app { max-width: 900px; margin: 0 auto; padding: 16px 16px 60px; }
.p-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.p-bar b { font-size: 15px; }
.p-msg { background: #fff; border-radius: 10px; padding: 28px; text-align: center; color: #6b7385; margin-top: 40px; }
.p-card { background: #fff; border: 1px solid #e3e6ec; border-radius: 10px; padding: 22px 24px; margin-top: 16px; }
.p-card h2 { margin: 0 0 6px; font-size: 20px; }
.p-card p { margin: 0 0 14px; color: #4a5263; }
.p-card.done { border-left: 6px solid #2f9e44; }
.p-card.declined { border-left: 6px solid #e03131; }
.p-field { display: block; font-size: 13px; font-weight: 600; color: #4a5263; margin-bottom: 12px; }
.p-field input, .p-field textarea { display: block; width: 100%; margin-top: 4px; font: inherit; padding: 10px 12px; border: 1px solid #cfd4dc; border-radius: 8px; }
.p-pad { position: relative; border: 2px dashed #cfd4dc; border-radius: 10px; background: #fcfcfd; touch-action: none; }
.p-pad canvas { display: block; width: 100%; height: 170px; cursor: crosshair; }
.p-pad .p-pad-hint { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: #adb5bd; pointer-events: none; }
.p-pad .p-pad-line { position: absolute; left: 24px; right: 24px; bottom: 38px; border-bottom: 1px solid #ced4da; pointer-events: none; }
.p-pad-clear { position: absolute; top: 8px; right: 8px; }
.p-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #4a5263; margin: 14px 0 18px; }
.p-check input { width: 20px; height: 20px; margin: 0; flex: none; }
.p-row { display: flex; gap: 10px; flex-wrap: wrap; }
.p-btn { border: 1px solid #cfd4dc; background: #fff; color: #1d2433; border-radius: 8px; padding: 12px 20px; font: inherit; font-weight: 700; cursor: pointer; }
.p-btn.primary { background: var(--brand, #e8590c); border-color: var(--brand, #e8590c); color: #fff; flex: 1; min-width: 200px; }
.p-btn.sm { padding: 6px 12px; font-size: 13px; font-weight: 600; }
.p-btn:disabled { opacity: .6; cursor: default; }
.p-error { color: #c92a2a; font-weight: 600; margin-top: 10px; min-height: 1em; }
.p-sum { display: flex; justify-content: space-between; align-items: baseline; background: #f7f8fa; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.p-sum b { font-size: 22px; }
.p-sig-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.p-sig-head .p-field { margin: 0; }
.p-seg { display: inline-flex; background: #eef0f3; border-radius: 9px; padding: 3px; }
.p-seg button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: #4a5263; padding: 6px 16px; border-radius: 7px; cursor: pointer; }
.p-seg button.on { background: #fff; color: #1d2433; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.hidden { display: none !important; }
@media print { body { background: #fff; } #app { padding: 0; max-width: none; } .no-print { display: none !important; } }

/* public "Request service" page */
body.req-page { background: #f2f2f7; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body.req-page #app { max-width: 560px; padding: 0 0 48px; }
.req-hero { text-align: center; color: #fff; padding: calc(env(safe-area-inset-top) + 26px) 20px 26px; position: relative;
  background: radial-gradient(130% 140% at 50% -20%, #3a0d0f 0%, #160708 40%, #0b0b0c 72%); }
.req-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--brand, #e20b11) 18%, #ff5257 50%, var(--brand, #e20b11) 82%, transparent); }
.req-logo { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15), 0 8px 26px rgba(226, 11, 17, .45); }
.req-shop { font-size: 24px; font-weight: 800; font-style: italic; letter-spacing: .06em; text-transform: uppercase; margin-top: 10px;
  background: linear-gradient(180deg, #fff, #e6e6ea 45%, #a9a9b0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.req-sub { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #ff6b6f; margin-top: 2px; }
.req-call { display: inline-block; margin-top: 14px; color: #fff; background: rgba(255, 255, 255, .12); padding: 8px 14px; border-radius: 99px; font-size: 14px; text-decoration: none; }
.req-form, .req-done { margin: 16px; border: 0; border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.req-form h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #6e6e73; margin: 18px 0 10px; }
.req-form h2:first-child { margin-top: 0; }
.req-form .p-field i { color: var(--brand, #e20b11); font-style: normal; }
.req-form .p-field input, .req-form .p-field select, .req-form .p-field textarea { font-size: 16px; border-radius: 12px; border: 1px solid #d1d1d6; padding: 12px; background: #fff; width: 100%; margin-top: 5px; font-family: inherit; }
.req-form .p-field select { -webkit-appearance: none; appearance: none; }
.req-form .p-field input:focus, .req-form .p-field select:focus, .req-form .p-field textarea:focus { outline: none; border-color: var(--brand, #e20b11); box-shadow: 0 0 0 3px rgba(226, 11, 17, .14); }
.req-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.req-three { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; gap: 0 10px; }
.req-send { width: 100%; min-height: 50px; font-size: 17px; border-radius: 14px; margin-top: 6px; }
.req-fine { font-size: 12px; color: #8e8e93; text-align: center; margin: 12px 0 0; }
.req-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.req-done { text-align: center; padding: 30px 22px; }
.req-done .p-btn { display: inline-block; margin-top: 8px; text-decoration: none; }
.req-check { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #34c759; color: #fff; font-size: 34px; line-height: 64px; font-weight: 700; }
@media (max-width: 420px) { .req-three { grid-template-columns: 1fr 1fr; } .req-three label:first-child { grid-column: 1 / -1; } }
.req-form .p-field select { padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E") no-repeat right 12px center; color: #1c1c1e; }
.req-sms { margin: 4px 0 16px; font-size: 13px; line-height: 1.45; }
.req-sms a { color: var(--brand, #e20b11); }

/* customer helper bubble */
#p-fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 50%; border: 0;
  background: var(--brand, #e20b11); color: #fff; font-size: 24px; cursor: pointer; box-shadow: 0 8px 22px rgba(0, 0, 0, .25); z-index: 40; }
#p-chat { position: fixed; right: 18px; bottom: 18px; width: 360px; max-width: calc(100vw - 24px); height: min(520px, calc(100vh - 40px)); z-index: 41;
  background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); display: flex; flex-direction: column; overflow: hidden; }
.p-chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #e3e6ec; font-size: 15px; }
.p-chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.p-chat-hello { color: #6b7385; font-size: 14px; }
.p-msg { max-width: 88%; padding: 8px 12px; border-radius: 14px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.p-msg.user { align-self: flex-end; background: var(--brand, #e20b11); color: #fff; }
.p-msg.bot { align-self: flex-start; background: #f0f1f4; }
.p-msg.err { align-self: flex-start; background: #fff0f0; color: #c92a2a; }
.p-chat-input { display: flex; gap: 8px; padding: 10px 12px 6px; border-top: 1px solid #e3e6ec; }
.p-chat-input input { flex: 1; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #cfd4dc; border-radius: 10px; }
.p-chat-input .p-btn.primary { flex: none; min-width: 0; }
.p-chat-fine { margin: 0; padding: 0 12px 10px; font-size: 11px; color: #8e8e93; }
@media (max-width: 600px) { #p-chat { right: 0; left: 0; bottom: 0; width: auto; max-width: none; height: 85vh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); } }
#p-chat, #p-chat .p-msg { text-align: left; }
