:root { font: 16px Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #1f2421; background: #f7f7f4; --green: #0f5e4a; --muted: #59635d; --line: #d9ded5; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .65rem 1rem; border: 1px solid var(--green); border-radius: 6px; background: var(--green); color: white; font-size: .875rem; font-weight: 600; cursor: pointer; text-decoration: none; }
button:disabled { opacity: .55; cursor: wait; }
button.secondary, .button.secondary { background: white; color: #1f2421; border-color: #aab6ad; }
button.danger { background: white; border-color: #c9d1c9; color: #8a3b2f; }
a { color: var(--green); }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { border-color: #9ab5a7; }
input, textarea, select { width: 100%; min-height: 48px; padding: .75rem; background: white; border: 1px solid #cfd6cf; border-radius: 6px; color: inherit; }
input[type=checkbox] { width: auto; min-height: auto; }
textarea { line-height: 1.75; resize: vertical; min-height: 128px; }
.question-input { position: relative; }
textarea.question { display: block; min-height: 210px; padding: 1rem 4.5rem 1rem 1rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f5e4a' stroke-opacity='.75' stroke-width='1.5' stroke-linecap='round'%3E%3Crect x='9' y='2' width='6' height='12' rx='3'/%3E%3Cpath d='M5 10v2a7 7 0 0 0 14 0v-2M12 19v3M8 22h8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center 48px; background-size: 44px; }
button.question-microphone { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); width: 72px; height: 72px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--green); }
button.question-microphone:hover:not(:disabled) { background: #0f5e4a0a; }
.question-prompt { position: absolute; top: 118px; left: 1rem; right: 1rem; margin: 0; text-align: center; color: var(--muted); font-size: .875rem; pointer-events: none; }
.question-input[data-has-text=true] textarea { background-position: right 20px bottom 20px; background-size: 28px; }
.question-input[data-has-text=true] .question-microphone { top: auto; left: auto; right: 8px; bottom: 8px; transform: none; width: 52px; height: 52px; }
.question-input[data-has-text=true] .question-prompt { display: none; }
.question-input[data-phase=recording] textarea { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='5' width='14' height='14' rx='3' fill='%23a13e32'/%3E%3C/svg%3E"); }
.question-input[data-supported=false] textarea { background-image: none; }
.question-input[data-supported=false] .question-prompt { top: 88px; }
button.voice-cancel { background: transparent; border: 0; color: var(--muted); padding: 0 .25rem; flex-shrink: 0; }
.summary-message { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 6px; background: white; }
.summary-message textarea { min-height: 80px; }
label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .5rem; }
:focus-visible { outline: 3px solid #398d71; outline-offset: 3px; }
h1 { font-size: 1.5rem; line-height: 1.3; margin: .4rem 0; overflow-wrap: anywhere; }
h2, h3 { margin: 0 0 .75rem; font-size: 1.05rem; }
p { margin: .4rem 0; line-height: 1.7; }
small, .muted { color: var(--muted); font-size: .875rem; }
.app { max-width: 48rem; margin: 0 auto; min-height: 100dvh; background: #fbfbf7; box-shadow: 0 0 2px #d9ded5; }
main { padding-bottom: 88px; }
header { padding: 1.25rem; border-bottom: 1px solid var(--line); background: #fbfbf7f5; }
.eyebrow { font-size: .8rem; font-weight: 650; color: var(--green); text-transform: uppercase; letter-spacing: .065em; }
section { padding: 1.25rem; }
.stack { display: grid; gap: 1rem; }
.tight { gap: .5rem; }
.card { border: 1px solid var(--line); border-radius: 6px; background: white; padding: 1rem; }
.empty { padding: 1.25rem; border: 1px dashed #c4ccc5; border-radius: 6px; color: var(--muted); line-height: 1.7; background: white; }
.row { display: flex; align-items: center; gap: .75rem; }
.between { justify-content: space-between; align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.full { width: 100%; }
.badge { display: inline-block; flex-shrink: 0; background: #edf4ef; color: var(--green); padding: .25rem .5rem; border-radius: 3px; font-size: .75rem; }
.date { display: block; margin-top: .75rem; font-size: .75rem; color: #7b857e; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: #fbfbf7f5; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs-inner { display: grid; grid-template-columns: repeat(4, 1fr); height: 64px; max-width: 48rem; margin: auto; }
.tabs a { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; color: #65716a; font-size: .75rem; text-decoration: none; }
.tabs a[aria-current=page] { color: var(--green); font-weight: 650; }
.tabs svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.case-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.messages { display: grid; gap: .75rem; }
.message { max-width: 92%; justify-self: start; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 6px; background: white; min-width: 0; }
.message.technician, .message.self { justify-self: end; color: white; background: var(--green); }
.message.service-error { background: #fff8f4; border-color: #ddc8bb; }
.message p { white-space: pre-wrap; overflow-wrap: anywhere; }
.message .meta { display: flex; justify-content: space-between; gap: 1rem; font-size: .75rem; opacity: .8; margin-bottom: .35rem; }
.case-media-list { display: grid; gap: .6rem; margin: .5rem 0; }
.case-media { overflow: hidden; border: 1px solid #ffffff66; border-radius: 6px; background: #0000000a; }
.case-media-preview { min-height: 2.5rem; display: grid; place-items: center; }
.case-media img, .case-media video { display: block; width: 100%; max-height: 22rem; object-fit: contain; background: #111; }
.case-media audio { display: block; width: calc(100% - 1rem); margin: .5rem; }
.case-media-caption { display: flex; justify-content: space-between; gap: .75rem; padding: .45rem .6rem; font-size: .75rem; overflow-wrap: anywhere; }
.case-media-status { opacity: .75; }
.thinking-message { min-width: 7rem; }
.thinking-dots { display: flex; align-items: flex-end; gap: .35rem; height: 1.25rem; padding: .35rem 0 .15rem; }
.thinking-dots span { width: .45rem; height: .45rem; border-radius: 50%; background: var(--muted); animation: vator-thinking .6s ease-in-out infinite alternate; }
.thinking-dots span:nth-child(2) { animation-delay: .12s; }
.thinking-dots span:nth-child(3) { animation-delay: .24s; }
@keyframes vator-thinking { to { transform: translateY(-.4rem); } }
.answer-section { background: #f4f5f1; padding: .75rem; border-radius: 6px; margin: .75rem 0; }
.message-actions { display: flex; gap: .5rem; border-top: 1px solid var(--line); padding-top: .75rem; margin-top: 1rem; }
.composer { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fbfbf7; padding: 1rem; }
.composer textarea { min-height: 48px; max-height: 128px; resize: none; }
.composer form { align-items: flex-end; }
.case-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .5rem .75rem; }
.case-composer .form-error { grid-column: 1 / -1; grid-row: 2; }
.composer-fields { display: grid; gap: .4rem; }
.media-picker { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.media-picker .media-add { width: 2.5rem; height: 2.5rem; flex: 0 0 2.5rem; padding: 0; border-radius: 50%; font-size: 1.5rem; line-height: 1; }
.media-filename { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .8rem; }
.error { color: #8a3b2f; font-size: .875rem; white-space: pre-wrap; }
.success { color: var(--green); }
.notice-inline { background: #edf4ef; border: 1px solid var(--line); padding: .75rem; border-radius: 6px; }
.auth { min-height: calc(100dvh - 2rem); display: flex; flex-direction: column; justify-content: center; max-width: 34rem; padding: 2rem 1.25rem; margin: auto; }
.auth h1 { font-size: 2rem; }
.auth form { margin-top: 1.5rem; }
.form-error:empty { display: none; }
dl { margin: 0; }
dl .row { justify-content: space-between; margin: .75rem 0; }
dt { color: var(--muted); } dd { margin: 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 300px; overflow: auto; background: #f4f5f1; padding: .75rem; font: .8rem/1.65 ui-monospace, monospace; }
details summary { cursor: pointer; font-weight: 600; min-height: 40px; padding: .5rem 0; }
details .stack { margin-top: .75rem; }
.account-removal { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
#notice { position: fixed; z-index: 99; top: 1rem; right: 1rem; left: 1rem; margin: auto; max-width: 40rem; padding: .8rem 1rem; border: 1px solid #aab6ad; border-radius: 6px; background: #fff; box-shadow: 0 4px 24px #0002; }
#notice.error { border-color: #8a3b2f; }
.loading { padding: 2rem; color: var(--muted); }
.skip { position: fixed; top: -100px; z-index: 100; background: white; padding: 1rem; }.skip:focus { top: 0; }
.qr { max-width: 240px; width: 100%; background: white; }
.contact-card { text-align: center; overflow-wrap: anywhere; gap: .5rem; padding: .75rem; }
.contact-card h2, .contact-card p { margin: 0; }
.contact-card p { line-height: 1.5; }
.contact-qr { display: block; width: 248px; max-width: 100%; height: auto; margin: 0 auto; padding: 1rem; background: white; }
.contact-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; }
[hidden] { display: none !important; }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } .message { max-width: 96%; } .between { flex-wrap: wrap; } .auth h1 { font-size: 1.75rem; } }
@media (prefers-reduced-motion: reduce) { .thinking-dots span { animation: none; } }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.match-card { overflow-wrap: anywhere; }
.match-participants { margin: 0; padding-left: 1.25rem; }
