:root {
  --green: #087f5b;
  --green-dark: #065f46;
  --green-soft: #e9f7f1;
  --ink: #18231f;
  --muted: #66746f;
  --line: #dfe8e4;
  --paper: #ffffff;
  --background: #f3f7f5;
  --shadow: 0 16px 45px rgba(18, 52, 40, .10);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, textarea { font: inherit; }
button { cursor: pointer; }
.repair-sheet-download{border:1px solid #07885f;border-radius:14px;padding:12px 16px;background:#edf8f4;color:#087457;font:inherit;font-weight:800;white-space:nowrap}
.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;
}

.case-app { min-height: 100vh; display: flex; flex-direction: column; }
.case-header {
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand {
  justify-self: start;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
  letter-spacing: .02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 11px;
  color: white;
  background: var(--green);
}
.case-identity { text-align: center; line-height: 1.2; }
.case-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.case-identity strong { font-size: 14px; }
.new-case {
  justify-self: end;
  padding: 9px 13px;
  color: var(--green-dark);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
}

.case-layout {
  width: min(1220px, 100%);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}
.conversation {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 34px clamp(20px, 5vw, 72px);
}
.message {
  max-width: 760px;
  margin: 0 0 26px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.message-client { margin-left: auto; flex-direction: row-reverse; }
.message-repairer .avatar { background: #3178c6; }
.message-repairer > div { background: #eef5fd; }
.avatar, .participant-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 11px;
  color: white;
  background: var(--green);
  font-size: 13px;
  font-weight: 850;
}
.message-client .avatar { background: #27332f; }
.message > div {
  padding: 13px 16px;
  background: var(--green-soft);
  border-radius: 4px 16px 16px 16px;
}
.message-client > div {
  color: white;
  background: var(--green);
  border-radius: 16px 4px 16px 16px;
}
.message-author { display: block; margin-bottom: 4px; font-size: 12px; }
.message p { margin: 0; line-height: 1.55; white-space: pre-wrap; }
.suggested-replies {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.suggested-replies button {
  padding: 8px 12px;
  color: var(--green-dark);
  background: var(--paper);
  border: 1px solid #b8d5ca;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  text-align: left;
}
.suggested-replies button:hover,
.suggested-replies button:focus-visible {
  color: white;
  background: var(--green);
  border-color: var(--green);
  outline: 0;
}
.suggested-replies button:disabled { opacity: .55; cursor: wait; }

.thinking {
  padding: 0 clamp(20px, 5vw, 72px) 14px;
  color: var(--muted);
  font-size: 13px;
}
.thinking span:not(.thinking-label) {
  display: inline-block; width: 6px; height: 6px; margin-right: 3px;
  border-radius: 50%; background: var(--green); animation: pulse 1s infinite alternate;
}
.thinking span:nth-child(2) { animation-delay: .2s; }
.thinking span:nth-child(3) { animation-delay: .4s; }
.thinking-label { margin-left: 7px; }
@keyframes pulse { to { opacity: .25; transform: translateY(-2px); } }

.composer {
  margin: 0 clamp(16px, 4vw, 48px) 24px;
  padding: 11px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  background: var(--paper);
  border: 1px solid #c9d8d1;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(18, 52, 40, .08);
}
.composer:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(8,127,91,.10); }
.composer textarea {
  width: 100%;
  min-height: 48px;
  max-height: 160px;
  padding: 12px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  line-height: 1.45;
}
.composer button {
  align-self: end;
  height: 44px;
  padding: 0 16px;
  display: flex;
  gap: 9px;
  align-items: center;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 12px;
  font-weight: 800;
}
.composer button:disabled { opacity: .55; cursor: wait; }
.composer p {
  grid-column: 1 / -1;
  margin: 0 8px 3px;
  color: var(--muted);
  font-size: 11px;
}

.case-panel {
  align-self: start;
  display: grid;
  gap: 20px;
}
.case-panel section {
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.panel-kicker {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.case-panel h1 { margin: 0 0 12px; font-size: 23px; line-height: 1.2; }
.case-panel h2 { margin: 0 0 16px; font-size: 15px; }
.case-panel p { margin: 0; color: var(--muted); line-height: 1.55; }
#participants { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
#participants li { display: flex; align-items: center; gap: 11px; }
#participants strong, #participants small { display: block; }
#participants strong { font-size: 14px; }
#participants small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.participant-client { background: #27332f; }
.participant-repairer { background: #3178c6; }
.privacy-note { display: flex; gap: 11px; }
.privacy-note > span { color: var(--green); font-weight: 900; }

@media (max-width: 850px) {
  .case-header { grid-template-columns: 1fr auto; padding: 0 16px; }
  .case-identity { display: none; }
  .case-layout { display: block; padding: 0; }
  .conversation { min-height: calc(100vh - 72px); border: 0; border-radius: 0; box-shadow: none; }
  .case-panel { display: none; }
  .messages { padding: 24px 16px; }
  .composer { margin: 0 12px 12px; position: sticky; bottom: 12px; }
}

.repairer-proposal {
  min-width: min(430px, 70vw);
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.repairer-card {
  padding: 11px 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #cfe1da;
  border-radius: 11px;
}
.repairer-card strong { font-size: 13px; }
.repairer-card span { color: var(--muted); font-size: 12px; }
.confirm-repairers {
  justify-self: start;
  margin-top: 4px;
  padding: 10px 14px;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}
.confirm-repairers:disabled { opacity: .62; cursor: default; }

@media (max-width: 520px) {
  .repairer-proposal { min-width: 0; }
  .repairer-card { display: grid; gap: 3px; }
}

.header-actions { justify-self: end; display: flex; gap: 8px; }
.offer-open {
  padding: 10px 14px;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}
.message-pending { opacity: .58; }
.offer-card {
  min-width: min(430px, 70vw);
  margin-top: 14px;
  padding: 16px;
  display: grid;
  gap: 9px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #c9dcd4;
  border-radius: 13px;
}
.offer-price { color: var(--green-dark); font-size: 22px; }
.offer-card > p { font-weight: 700; }
.offer-facts { display: flex; flex-wrap: wrap; gap: 7px; }
.offer-facts span {
  padding: 5px 8px;
  color: var(--green-dark);
  background: var(--green-soft);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 750;
}
.offer-card small { color: var(--muted); line-height: 1.4; }
.welcome-actions {
  margin-top: 14px;
  display: flex;
  gap: 9px;
}
.welcome-actions button {
  min-width: 78px;
  padding: 9px 15px;
  color: var(--green-dark);
  background: var(--paper);
  border: 1px solid #bcd5cc;
  border-radius: 10px;
  font-weight: 800;
}
.welcome-actions button:first-child {
  color: white;
  background: var(--green);
  border-color: var(--green);
}
.identity-dialog {
  width: min(480px, calc(100% - 28px));
  padding: 0;
  color: var(--ink);
  border: 0;
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(12, 40, 30, .25);
}
.identity-dialog::backdrop { background: rgba(15, 31, 25, .56); }
.identity-dialog form { padding: 26px; display: grid; gap: 16px; }
.identity-dialog label { display: grid; gap: 6px; font-size: 13px; font-weight: 750; }
.identity-dialog input {
  width: 100%;
  padding: 12px;
  color: var(--ink);
  background: white;
  border: 1px solid #cbd9d3;
  border-radius: 10px;
  outline: 0;
}
.identity-dialog input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8,127,91,.10);
}
.identity-dialog input:disabled { color: var(--muted); background: var(--background); }
.identity-dialog > form > p:not(.panel-kicker):not(.offer-error) {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.offer-dialog {
  width: min(620px, calc(100% - 28px));
  padding: 0;
  color: var(--ink);
  border: 0;
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(12, 40, 30, .25);
}
.offer-dialog::backdrop { background: rgba(15, 31, 25, .56); }
.offer-dialog form { padding: 26px; display: grid; gap: 16px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; }
.dialog-heading h2 { margin: 0; font-size: 24px; }
.dialog-heading button {
  width: 36px; height: 36px;
  color: var(--muted);
  background: var(--background);
  border: 0;
  border-radius: 50%;
  font-size: 24px;
}
.offer-dialog label { display: grid; gap: 6px; font-size: 13px; font-weight: 750; }
.offer-dialog input, .offer-dialog textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
  border: 1px solid #cbd9d3;
  border-radius: 10px;
  outline: 0;
  resize: vertical;
}
.offer-dialog input:focus, .offer-dialog textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8,127,91,.10);
}
.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.offer-submit {
  justify-self: end;
  padding: 12px 17px;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 11px;
  font-weight: 800;
}
.offer-error { min-height: 18px; margin: 0; color: #b42318; font-size: 13px; }

@media (max-width: 600px) {
  .new-case { display: none; }
  .offer-grid { grid-template-columns: 1fr; }
  .offer-card { min-width: 0; }
}
.exclusive-consent{display:flex;align-items:flex-start;gap:12px;margin:14px 0;padding:14px;border:1px solid #cbdcd5;border-radius:14px;background:#f5faf8;cursor:pointer}.exclusive-consent input{width:20px;height:20px;margin:2px 0 0;accent-color:#07885f}.exclusive-consent span{display:flex;flex-direction:column;gap:4px}.exclusive-consent small{color:#61706b;line-height:1.35}
