:root {
  color-scheme: light;
  --background: #f7f8f7;
  --surface: #fff;
  --text: #202322;
  --muted: #69716e;
  --border: #dde3e0;
  --accent: #157a6e;
  --accent-dark: #0f5f56;
  --accent-soft: #e4f2ef;
  --shadow: 0 12px 38px rgb(31 54 48 / 8%);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--background); color: var(--text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, textarea { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 14px 16px; display: flex; flex-direction: column; background: #f0f2f1; border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 11px; padding: 8px 10px 25px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 720; letter-spacing: .08em; }
.brand-mark, .assistant-mark { display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 750; box-shadow: 0 8px 22px rgb(21 122 110 / 20%); }
.brand-mark { width: 31px; height: 31px; border-radius: 10px; letter-spacing: 0; }
.assistant-mark { width: 54px; height: 54px; margin: 0 auto 19px; border-radius: 17px; font-size: 22px; }
.nav-list { display: grid; gap: 4px; }
.nav-item { width: 100%; min-height: 44px; padding: 0 12px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 11px; background: transparent; color: #4e5653; text-decoration: none; font-size: 14px; cursor: pointer; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item:hover { background: rgb(255 255 255 / 72%); color: var(--text); }
.nav-item.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 4%); }
.nav-item span { width: 18px; text-align: center; color: var(--accent); }
.sidebar-footer { margin-top: auto; }
.account-button { text-align: left; }
.main-content { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.mobile-header { display: none; }
.conversation { width: min(860px, calc(100% - 44px)); margin: auto; padding: 70px 0 170px; }
.welcome { text-align: center; animation: rise-in .55s ease both; }
.eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { max-width: 700px; margin: 0 auto; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -.045em; font-weight: 650; }
.intro { max-width: 700px; margin: 20px auto 26px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.suggestions { margin-top: 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; text-align: left; }
.suggestion { min-height: 92px; padding: 17px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 17px; background: rgb(255 255 255 / 82%); cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / 2%); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, background .2s ease; }
.suggestion:hover { transform: translateY(-2px); border-color: #b9cac5; background: var(--surface); box-shadow: var(--shadow); }
.suggestion-icon { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--accent-soft); color: var(--accent-dark); font-size: 18px; }
.suggestion strong, .suggestion small { display: block; }
.suggestion strong { margin-bottom: 5px; font-size: 14px; font-weight: 650; }
.suggestion small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.faq { margin-top: 24px; text-align: left; }
.faq > h2 { margin: 0 0 18px; text-align: center; font-size: clamp(28px, 4vw, 36px); line-height: 1.15; letter-spacing: -.035em; }
.faq-list { display: grid; gap: 10px; }
.faq-item { overflow: clip; border: 1px solid var(--border); border-radius: 16px; background: rgb(255 255 255 / 82%); box-shadow: 0 1px 2px rgb(0 0 0 / 2%); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.faq-item[open] { border-color: #b9cac5; background: var(--surface); box-shadow: 0 8px 26px rgb(31 54 48 / 6%); }
.faq-item summary { position: relative; padding: 20px 58px 20px 22px; list-style: none; cursor: pointer; font-size: 15px; font-weight: 680; line-height: 1.45; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; top: 50%; right: 20px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-dark); font-size: 20px; font-weight: 400; line-height: 1; transform: translateY(-50%); transition: transform .2s ease, background .2s ease; }
.faq-item[open] summary::after { content: "−"; background: var(--accent); color: #fff; }
.faq-item summary:focus-visible { outline: 3px solid rgb(21 122 110 / 22%); outline-offset: -3px; border-radius: 16px; }
.faq-answer { padding: 0 58px 21px 22px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.faq-answer p { margin: 0; }
.messages { display: grid; gap: 18px; }
.messages::after { content: ""; display: block; height: clamp(240px, 42vh, 460px); pointer-events: none; }
.message { max-width: 680px; padding: 16px 18px; border-radius: 18px; line-height: 1.55; animation: rise-in .3s ease both; }
.message.user { justify-self: end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.message.assistant { justify-self: start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; box-shadow: 0 4px 18px rgb(31 54 48 / 5%); }
.message p { margin: 0; }
.message .message-label { margin-bottom: 6px; color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.message.user .message-label { color: rgb(255 255 255 / 75%); }
.device-message { width: min(760px, 100%); max-width: 760px; }
.device-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: start; }
.device-photo { width: 150px; height: 190px; padding: 8px; object-fit: contain; border: 1px solid #edf0ee; border-radius: 15px; background: #fff; }
.device-card-details h2 { margin: 2px 0 15px; font-size: 24px; line-height: 1.2; letter-spacing: -.025em; }
.device-confirmation { color: var(--accent-dark); font-size: 13px; font-weight: 700; }
.device-specs { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.device-specs div { min-width: 0; padding-top: 8px; border-top: 1px solid #edf0ee; }
.device-specs dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.device-specs dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; line-height: 1.4; }
.composer-wrap { position: relative; z-index: 5; width: 100%; }
.welcome.started { animation: none; transform: none; }
.welcome.started > :not(.composer-wrap) { display: none; }
.welcome.started .composer-wrap { position: fixed; left: 248px; right: 0; bottom: 0; width: auto; padding: 22px max(22px, calc((100vw - 248px - 820px) / 2)) 16px; background: linear-gradient(0deg, var(--background) 68%, rgb(247 248 247 / 0%)); }
.composer { max-width: 820px; margin: 0 auto; padding: 9px 9px 9px 18px; display: flex; align-items: flex-end; gap: 10px; background: var(--surface); border: 1px solid #cfd8d4; border-radius: 21px; box-shadow: var(--shadow); }
.composer:focus-within { border-color: #83aaa2; box-shadow: 0 0 0 3px rgb(21 122 110 / 10%), var(--shadow); }
textarea { width: 100%; min-height: 42px; max-height: 150px; padding: 10px 0 8px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); line-height: 1.45; }
textarea::placeholder { color: #8a928f; }
.send-button { flex: 0 0 42px; width: 42px; height: 42px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font-size: 22px; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.send-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.notice { margin: 9px auto 0; color: #7d8582; text-align: center; font-size: 11px; }
.icon-button { width: 42px; height: 42px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; }
.account-icon { display: grid; place-items: center; color: var(--text); text-decoration: none; }
.scrim { position: fixed; z-index: 8; inset: 0; background: rgb(17 24 22 / 32%); backdrop-filter: blur(2px); }
.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; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; width: min(84vw, 300px); transform: translateX(-105%); transition: transform .25s ease; box-shadow: 20px 0 50px rgb(0 0 0 / 12%); }
  .sidebar.open { transform: translateX(0); }
  .mobile-header { height: 62px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: rgb(247 248 247 / 88%); backdrop-filter: blur(14px); }
  .mobile-brand { font-size: 13px; font-weight: 750; letter-spacing: .08em; }
  .conversation { width: min(100% - 28px, 650px); padding: 58px 0 160px; }
  .assistant-mark { width: 48px; height: 48px; border-radius: 15px; }
  h1 { font-size: clamp(31px, 10vw, 42px); }
  .intro { margin-top: 17px; font-size: 15px; }
  .suggestions { grid-template-columns: 1fr; gap: 9px; }
  .suggestion { min-height: 78px; padding: 14px; }
  .faq { margin-top: 28px; }
  .faq > h2 { margin-bottom: 18px; }
  .faq-item summary { padding: 18px 52px 18px 18px; }
  .faq-answer { padding: 0 18px 19px; }
  .welcome.started .composer-wrap { left: 0; padding: 18px 12px 10px; }
  .device-card { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; }
  .device-photo { width: 92px; height: 124px; }
  .device-card-details h2 { font-size: 20px; }
  .device-specs { grid-template-columns: 1fr; }
  .notice { max-width: 330px; }
  .messages::after { height: clamp(210px, 36vh, 340px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.portal-body { min-height: 100vh; background: var(--background); }
.portal-shell { width: min(780px, calc(100% - 30px)); margin: 0 auto; padding: 28px 0 70px; }
.portal-shell.wide { width: min(1120px, calc(100% - 30px)); }
.portal-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 750; letter-spacing: .08em; }
.portal-heading { padding: 72px 0 30px; text-align: center; }
.portal-heading h1, .status-panel h1 { font-size: clamp(32px, 5vw, 48px); }
.portal-heading > p:last-child, .status-panel > p:last-child { max-width: 680px; margin: 16px auto 0; color: var(--muted); line-height: 1.6; }
.panel { padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 8px 30px rgb(31 54 48 / 5%); }
.status-panel { margin-top: 80px; text-align: center; }
.request-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.request-summary div { display: grid; gap: 5px; }
.request-summary span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.request-summary strong { font-size: 15px; line-height: 1.5; }
.full { grid-column: 1 / -1; }
.offer-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); outline: none; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #83aaa2; box-shadow: 0 0 0 3px rgb(21 122 110 / 10%); }
.input-unit { display: flex; align-items: center; gap: 10px; }
.input-unit span { color: var(--muted); font-size: 13px; }
.primary-button { width: 100%; min-height: 50px; padding: 0 18px; border: 0; border-radius: 13px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.form-note { margin: 12px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.form-errors { padding: 14px 16px; border: 1px solid #e1aaa6; border-radius: 12px; background: #fff2f1; color: #7c2822; font-size: 13px; }
.form-errors ul { margin: 8px 0 0; padding-left: 18px; }
.success-banner { margin: 0 0 18px; padding: 15px 18px; border: 1px solid #a7d4bd; border-radius: 14px; background: #eaf7f0; color: #155c3e; text-align: center; }
.offers-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; align-items: start; }
.offer-card { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 8px 28px rgb(31 54 48 / 5%); }
.offer-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.offer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.repairer-name { margin: 0; font-weight: 700; }
.location, .subprice { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.verified-badge { padding: 5px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 10px; white-space: nowrap; }
.offer-badges { display: grid; justify-items: end; gap: 5px; }
.offer-price { margin: 22px 0 0; font-size: 32px; font-weight: 700; letter-spacing: -.04em; }
.offer-details { margin: 22px 0; display: grid; gap: 11px; }
.offer-details div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf0ee; padding-bottom: 9px; }
.offer-details dt { color: var(--muted); font-size: 12px; }
.offer-details dd { margin: 0; text-align: right; font-size: 12px; font-weight: 650; }
.offer-comment { min-height: 44px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.selected-label { padding: 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); text-align: center; font-weight: 700; }
.repair-heading { padding-bottom: 22px; }
.repair-overview { margin-bottom: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.repair-overview div { display: grid; gap: 5px; }
.repair-overview span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.repair-overview strong { line-height: 1.5; }
.followup-section { margin-bottom: 18px; }
.followup-section h2, .feedback-form h2 { margin: 0 0 8px; font-size: 24px; }
.followup-section > p, .feedback-form .full > p:last-child { margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.status-actions { display: flex; gap: 10px; }
.status-actions .primary-button { width: auto; }
.feedback-form { margin-top: 18px; }
.check-field { min-height: 48px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; font-size: 13px; line-height: 1.45; }
.check-field input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--accent); }
.status-panel.compact { margin-top: 18px; }
.status-panel.compact h2 { margin: 0; }
.client-main { width: min(980px, calc(100% - 48px)); margin: 0 auto; padding: 70px 0 100px; }
.client-portal-shell { width: min(1120px, calc(100% - 48px)); padding: 28px 0 80px; }
.client-heading { margin-bottom: 28px; text-align: center; }
.client-heading h1 { font-size: clamp(32px, 5vw, 48px); }
.client-heading > p:last-child { margin: 14px 0 0; color: var(--muted); }
.client-empty { max-width: 760px; margin: 80px auto 0; }
.client-empty .inline-button { margin-top: 24px; }
.inline-button { width: auto; min-height: 48px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.client-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.client-card-grid div { display: grid; gap: 6px; }
.client-card-grid span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.client-card-grid strong { line-height: 1.5; }
@media (max-width: 900px) { .offers-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .client-sidebar { display: none; } .client-main { width: min(100% - 28px,650px); padding-top: 44px; } .client-portal-shell { width: min(100% - 28px,650px); } }
@media (max-width: 620px) { .portal-heading { padding-top: 52px; } .offer-form, .request-summary, .repair-overview, .client-card-grid { grid-template-columns: 1fr; } .full { grid-column: auto; } .panel { padding: 19px; } .status-actions { display: grid; } .status-actions .primary-button { width: 100%; }   }
