@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/montserrat-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --paper: #F3F5F2;
  --surface: #FFFFFF;
  --ink: #17252B;
  --muted: #5D6E76;
  --line: #D9E0E3;
  --accent: #e36702;
  --on-accent: #FFFFFF;
  --danger: #B3261E;
  --c-open: #2F6FDB;
  --c-in_progress: #B36B00;
  --c-waiting_customer: #8A4FBF;
  --c-resolved: #2E8B57;
  --c-closed: #7A8790;
  --radius: 10px;
  --font: "Inter", "Segoe UI", Arial, sans-serif;
  --font-heading: "Montserrat", "Inter", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 12% 12%, rgb(255 121 0 / 12%), transparent 34rem),
    radial-gradient(ellipse at 92% 88%, rgb(15 92 122 / 9%), transparent 32rem),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 1rem/1.5 var(--font);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.shell { max-width: 960px; margin: 0 auto; padding: 0 1.25rem 4rem; }

/* Topo */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: inline-flex; align-items: center; flex: 0 1 190px; min-width: 0; text-decoration: none; }
.brand img { display: block; width: 100%; height: auto; object-fit: contain; }
.topbar .brand { flex: 0 1 260px; max-width: 62%; }
.topbar .who { flex: 1; justify-content: flex-end; }
.topbar .greeting { max-width: 100%; }
@media (max-width: 560px) {
  .topbar .brand { flex-basis: 210px; }
  .client-topbar .who { flex-wrap: wrap; gap: .25rem .75rem; }
  .client-topbar .greeting { flex-basis: 100%; }
}
.who { display: flex; align-items: center; gap: .75rem; min-width: 0; font-size: .875rem; color: var(--muted); }
.profile-link, .logout-button { white-space: nowrap; }
.logout-button { display: inline-flex; align-items: center; gap: .35rem; }
.logout-icon {
  display: inline-block; width: 16px; height: 16px; flex: 0 0 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5m5 5H3'/%3E%3Cpath d='M12 3h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5m5 5H3'/%3E%3Cpath d='M12 3h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.greeting {
  display: flex; align-items: baseline; justify-content: flex-end; gap: .3rem;
  min-width: 0; max-width: min(42vw, 320px); white-space: nowrap;
}
.greeting-label { color: var(--muted); }
.greeting-name { overflow: hidden; color: var(--ink); text-overflow: ellipsis; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }
h1 { font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; margin: 1.5rem 0 .25rem; }
h1:focus { outline: none; }
h2 { font-size: 1.0625rem; font-weight: 700; margin: 2rem 0 .5rem; }
.lead { color: var(--muted); margin: 0 0 1.25rem; }

a { color: var(--accent); }

/* Botões */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .65rem 1.1rem; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  font: 600 1rem/1.2 var(--font); cursor: pointer; text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn.destructive { border-color: var(--danger); background: var(--danger); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.block { width: 100%; }
.linkbtn {
  appearance: none; background: none; border: 0; padding: .5rem 0; color: var(--accent);
  font: 600 .875rem/1.2 var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Formulários */
form { display: grid; gap: 1rem; }
label { display: grid; gap: .35rem; font-weight: 600; font-size: .9375rem; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--font); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; min-height: 44px;
}
textarea { min-height: 7.5rem; resize: vertical; }
input[type="file"] { padding: .55rem .6rem; }
.service-photo { display: grid; gap: .35rem; }
.service-photo > label { font-weight: 600; font-size: .9375rem; }
.service-photo-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.service-photo-button {
  min-height: 50px; border: 1px solid var(--muted); border-radius: 12px;
  background: transparent; color: var(--ink); font: 600 .9rem/1.2 var(--font); cursor: pointer;
}
.service-photo-button:hover { background: color-mix(in srgb, var(--paper) 72%, var(--surface)); }
.service-photo-status { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.service-photo-previews { display: flex; flex-wrap: wrap; gap: .5rem; }
.service-photo-item { position: relative; width: 112px; height: 84px; }
.service-photo-preview { display: block; width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 8px; object-fit: cover; }
.service-photo-remove {
  position: absolute; top: .25rem; right: .25rem; display: grid; place-items: center;
  width: 24px; height: 24px; padding: 0; border: 1px solid var(--surface); border-radius: 50%;
  background: var(--surface); color: var(--ink); font: 700 1rem/1 var(--font); cursor: pointer;
  box-shadow: 0 1px 4px rgb(23 37 43 / 25%);
}
.service-photo-remove:hover { color: var(--danger); }
.service-signature { display: grid; gap: .35rem; }
.service-signature > label { font-weight: 600; font-size: .9375rem; }
.service-signature-dialog {
  width: min(100% - 2rem, 560px); max-height: min(90dvh, 720px); margin: auto;
  padding: 1.25rem; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 70px rgb(23 37 43 / 24%);
}
.service-signature-dialog::backdrop { background: rgb(15 26 30 / 58%); }
.service-signature-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.service-signature-dialog-header h2 { margin: 0; }
.service-signature-close {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink);
  font: 400 1.8rem/1 var(--font); cursor: pointer;
}
.service-signature-close:hover { background: color-mix(in srgb, var(--paper) 72%, var(--surface)); }
.service-signature-dialog .signature-canvas { height: clamp(170px, 34dvh, 260px); }
.service-signature-actions { display: flex; justify-content: space-between; gap: .75rem; margin-top: .75rem; }
.attachment-preview-dialog {
  width: min(calc(100% - 2rem), 900px); max-height: min(90dvh, 820px); margin: auto;
  padding: 1rem; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 70px rgb(23 37 43 / 24%);
}
.attachment-preview-dialog::backdrop { background: rgb(15 26 30 / 62%); }
.attachment-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.attachment-preview-header h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.attachment-preview-image { display: block; max-width: 100%; max-height: 72dvh; margin: 0 auto; object-fit: contain; }
.attachment-preview-document { display: block; width: 100%; height: min(72dvh, 680px); border: 0; background: #fff; }
.attachment-preview-text { max-height: 72dvh; margin: 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.attachment-preview-list { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.attachment-preview-item {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto auto;
  align-items: center; gap: .75rem; min-width: 0; padding: .65rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.attachment-thumbnail-button, .attachment-file-preview {
  display: grid; place-items: center; width: 76px; height: 60px; padding: .25rem;
  border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--paper) 72%, var(--surface));
  color: var(--accent); font: 600 .75rem/1.2 var(--font); cursor: pointer;
}
.attachment-thumbnail { display: block; width: 100%; height: 100%; border-radius: 5px; object-fit: cover; }
.attachment-file-icon { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: .8rem; font-weight: 700; }
.attachment-preview-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.attachment-preview-date { color: var(--muted); font-size: .8rem; }
.attachment-action { border: 0; padding: .45rem; background: transparent; color: var(--accent); font: 600 .85rem/1.2 var(--font); cursor: pointer; }
.attachment-action:hover { text-decoration: underline; }
.attachment-remove { color: var(--danger); }
.logout-confirm-dialog {
  width: min(calc(100% - 2rem), 280px); margin: auto; padding: 1rem 1.25rem .55rem;
  border: 0; border-radius: 20px; background: #EFE9F5; color: #292630;
  text-align: center; box-shadow: 0 18px 48px rgb(15 26 30 / 28%);
}
.status-message-dialog { width: min(calc(100% - 2rem), 420px); padding-bottom: 1.1rem; }
.status-message-dialog textarea { min-height: 7rem; text-align: left; }
.status-message-label { margin-bottom: 1rem; text-align: left; }
.logout-confirm-dialog::backdrop { background: rgb(15 26 30 / 52%); }
.logout-confirm-dialog h2 { margin: 0 0 .8rem; font-size: 1.4rem; font-weight: 500; }
.logout-confirm-dialog p { margin: 0 0 1rem; font-size: .9rem; }
.logout-confirm-actions { display: flex; justify-content: center; gap: .5rem; }
.logout-confirm-button {
  min-width: 76px; min-height: 38px; padding: .4rem .9rem; border: 0; border-radius: 13px;
  background: #e36702; color: #fff; font: 600 .9rem/1.2 var(--font); cursor: pointer;
}
.logout-confirm-button:hover { background: #c95b02; }
input[type="checkbox"] { width: auto; min-height: 0; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.notification-toggle { display: flex; align-items: center; gap: .6rem; font-weight: 400; }
.row2 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.work-order-form { width: 100%; max-width: 760px; margin: 0 auto; gap: .75rem; }
.clients-heading.work-order-heading { max-width: 760px; margin: 0 auto .5rem; gap: .75rem; }
.work-order-required-note { max-width: 760px; margin: 0 auto .75rem; color: var(--muted); font-size: .75rem; }
.work-order-lookup-note { margin: 0; color: var(--muted); font-size: .75rem; }
.work-order-section {
  display: grid; gap: .65rem; min-width: 0; margin: 0; padding: .75rem 1rem 1rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.work-order-section-title { margin: 0; padding: 0; text-align: left; justify-self: start; color: var(--ink); font: 600 .9375rem/1.4 var(--font-heading); }
.work-order-form label { min-width: 0; gap: .25rem; font-size: .8125rem; }
.work-order-form input, .work-order-form select, .work-order-form textarea { min-width: 0; padding: .6rem .7rem; font-size: .875rem; }
.work-order-form textarea { min-height: 6rem; }
.work-order-form .row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.work-order-evidence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .65rem; }
.work-order-form .service-photo-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .55rem .65rem; border-color: var(--line); border-radius: 10px;
  color: #9F4000; font-size: .8125rem;
}
.work-order-form .service-photo-status { font-size: .75rem; }
.work-order-form .service-photo-status:empty, .work-order-form > .error:empty { display: none; }
.work-order-form .photo-validation { margin: 0; font-size: .75rem; }
.work-order-form .photo-validation:empty { display: none; }
.work-order-progress { margin: 0; color: var(--muted); font-size: .8125rem; }
.work-order-progress:empty { display: none; }
.work-order-review-dialog {
  width: min(calc(100% - 2rem), 440px); max-height: 90dvh; overflow-y: auto;
  padding: 1.1rem; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: 0 16px 48px rgb(23 37 43 / 20%);
}
.work-order-review-dialog::backdrop { background: rgb(15 26 30 / 55%); }
.work-order-review-dialog h2 { margin: 0; font-size: 1.0625rem; }
.work-order-review-dialog .work-order-actions { margin-top: 1rem; }
.work-order-review-description { max-height: 6rem; overflow-y: auto; margin: .75rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .875rem; }
.work-order-success-number { margin: .5rem 0; color: #9F4000; font: 700 1.25rem/1.4 var(--font-heading); }
.work-order-result-message { color: var(--muted); font-size: .875rem; }
.work-order-review-dialog > .btn.block { margin-top: 1rem; }
.work-order-form .signature-status { color: #236B43; }
.work-order-form .service-photo-item { width: 80px; height: 60px; }
.work-order-actions { display: flex; align-items: center; gap: .65rem; }
.work-order-actions .btn { font-size: .875rem; }
.work-order-actions .btn.block { flex: 1; width: auto; }
.service-action-icon { display: block; width: 18px; height: 18px; flex: 0 0 18px; background-color: currentColor; }
.service-camera-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h3l2-3h6l2 3h3a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h3l2-3h6l2 3h3a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.service-pen-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 4 5 5M4 15 16 3a2 2 0 0 1 5 5L9 20l-6 1 1-6Zm9 6h8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 4 5 5M4 15 16 3a2 2 0 0 1 5 5L9 20l-6 1 1-6Zm9 6h8'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 600px) {
  .work-order-form .row2 { grid-template-columns: minmax(0, 1fr); }
  .work-order-form .work-order-service-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-order-section { padding: .65rem .75rem .85rem; }
}
@media (max-width: 360px) {
  .work-order-evidence { grid-template-columns: minmax(0, 1fr); }
}
.error { color: var(--danger); font-size: .9375rem; margin: 0; }
.success { color: var(--c-resolved); font-size: .9375rem; margin: 0; }

/* Login */
.auth-page {
  position: relative; isolation: isolate; min-height: 100svh;
  display: grid; place-items: center; padding: 2rem 1rem;
  background: transparent;
}
.auth {
  width: min(100%, 440px); margin: 0; padding: clamp(1.5rem, 6vw, 2.5rem);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 22px; background: var(--surface);
  box-shadow: 0 24px 70px rgb(23 37 43 / 12%);
}
.auth .brand { display: flex; width: min(100%, 260px); margin: 0 auto 1.75rem; }
.auth .brand img { display: block; width: 100%; height: auto; }
.auth-kicker {
  margin: 0 0 .45rem; color: #B94C00; font-size: .75rem;
  font-weight: 800; letter-spacing: .12em;
}
.auth h1 { margin: 0 0 .55rem; font-size: clamp(1.65rem, 6vw, 2rem); }
.auth .lead { margin-bottom: 0; }
.auth form { gap: 1.1rem; margin-top: 1.5rem; }
.auth input {
  border-radius: 10px; transition: border-color .18s ease, box-shadow .18s ease;
}
.auth input:focus {
  border-color: #E56A00; outline: none; box-shadow: 0 0 0 3px rgb(229 106 0 / 16%);
}
.auth .btn {
  min-height: 50px; border-color: #e36702; border-radius: 11px;
  background: #e36702; box-shadow: 0 6px 14px rgb(227 103 2 / 18%);
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.auth .btn:hover:not(:disabled) {
  transform: translateY(-1px); background: #c95b02;
  box-shadow: 0 9px 18px rgb(227 103 2 / 24%);
}
.auth .switch { margin: 1.5rem 0 0; color: var(--muted); font-size: .9375rem; text-align: center; }
.auth .switch a { color: #A64200; font-weight: 700; text-underline-offset: 3px; }
.auth .auth-recovery-link { margin-top: .8rem; }

@media (max-width: 480px) {
  .auth-page { padding: 1rem; }
  .auth { padding: 1.5rem 1.25rem; border-radius: 18px; }
  .auth .brand { margin-bottom: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .auth input, .auth .btn { transition: none; }
  .auth .btn:hover:not(:disabled) { transform: none; }
}

/* Lista de chamados */
.agent-home { padding-top: .75rem; }
.agent-home h1 { margin: 0 0 1.5rem; }
.agent-home-heading { margin: 0 0 1.25rem; }
.agent-home-heading h1 { margin: 0 0 .5rem; }
.agent-home-heading .lead { margin: 0; }
.agent-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.agent-summary-card {
  display: grid; align-content: start; gap: .2rem; min-width: 0; padding: .6rem .75rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  color: var(--ink); text-decoration: none; box-shadow: 0 4px 16px rgb(23 37 43 / 4%);
}
.agent-summary-card:hover { border-color: var(--accent); }
.agent-summary-label { font-weight: 600; font-size: .8125rem; overflow-wrap: anywhere; }
.agent-summary-count { font: 700 1.375rem/1.2 var(--font-heading); }
.agent-summary-urgent { border-color: #F0C6C2; background: #FFF6F5; }
.agent-summary-urgent .agent-summary-count { color: #9F2520; }
.agent-actions-title { margin: 1.75rem 0 .8rem; }
@media (max-width: 760px) {
  .agent-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.agent-shortcuts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
}
.agent-shortcut {
  display: flex; min-height: 214px; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 15px;
  background: var(--surface); color: #e36702; text-align: center; text-decoration: none;
  box-shadow: 0 5px 18px rgb(23 37 43 / 7%);
  transition: transform .18s ease, box-shadow .18s ease;
}
.agent-shortcut-button { font: inherit; cursor: pointer; }
.agent-shortcut:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgb(23 37 43 / 12%); }
.agent-shortcut:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.agent-shortcut-icon {
  width: 62px; height: 62px; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 30a14 14 0 0 1 28 0v9a5 5 0 0 1-5 5h-4'/%3E%3Cpath d='M18 30h-3a4 4 0 0 0-4 4v5a4 4 0 0 0 4 4h4V30Zm28 0h3a4 4 0 0 1 4 4v5a4 4 0 0 1-4 4h-4V30Z'/%3E%3Cpath d='M39 48h-7a4 4 0 0 1-4-4h11a4 4 0 0 1 0 8h-5'/%3E%3Crect x='38' y='7' width='19' height='13' rx='2'/%3E%3Cpath d='M42 12h11m-11 4h7'/%3E%3Cpath d='m43 20-3 5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 30a14 14 0 0 1 28 0v9a5 5 0 0 1-5 5h-4'/%3E%3Cpath d='M18 30h-3a4 4 0 0 0-4 4v5a4 4 0 0 0 4 4h4V30Zm28 0h3a4 4 0 0 1 4 4v5a4 4 0 0 1-4 4h-4V30Z'/%3E%3Cpath d='M39 48h-7a4 4 0 0 1-4-4h11a4 4 0 0 1 0 8h-5'/%3E%3Crect x='38' y='7' width='19' height='13' rx='2'/%3E%3Cpath d='M42 12h11m-11 4h7'/%3E%3Cpath d='m43 20-3 5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.my-tickets-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='19' cy='19' r='8'/%3E%3Cpath d='M5 52v-8a14 14 0 0 1 23-11m-9 19H5'/%3E%3Crect x='33' y='22' width='25' height='34' rx='3'/%3E%3Crect x='40' y='18' width='11' height='7' rx='2'/%3E%3Cpath d='m39 36 3 3 5-6m-8 14h13'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='19' cy='19' r='8'/%3E%3Cpath d='M5 52v-8a14 14 0 0 1 23-11m-9 19H5'/%3E%3Crect x='33' y='22' width='25' height='34' rx='3'/%3E%3Crect x='40' y='18' width='11' height='7' rx='2'/%3E%3Cpath d='m39 36 3 3 5-6m-8 14h13'/%3E%3C/svg%3E") center / contain no-repeat;
}
.client-icon {
  width: 62px; height: 62px; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='25' cy='20' r='10'/%3E%3Cpath d='M6 55v-5a19 19 0 0 1 38 0v5H6Z'/%3E%3Cpath d='M44 13a10 10 0 0 1 0 19m4 7a17 17 0 0 1 10 16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='25' cy='20' r='10'/%3E%3Cpath d='M6 55v-5a19 19 0 0 1 38 0v5H6Z'/%3E%3Cpath d='M44 13a10 10 0 0 1 0 19m4 7a17 17 0 0 1 10 16'/%3E%3C/svg%3E") center / contain no-repeat;
}
.notification-shortcut-icon {
  width: 62px; height: 62px; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.logout-shortcut-icon {
  width: 62px; height: 62px; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5m5 5H3'/%3E%3Cpath d='M12 3h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5m5 5H3'/%3E%3Cpath d='M12 3h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.agent-shortcut-label { color: #e36702; font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.client-form { width: 100%; max-width: 760px; margin: 0 auto; gap: .65rem; }
.clients-heading.client-form-heading { max-width: 760px; margin: 0 auto .4rem; }
.client-required-note { max-width: 760px; margin: 0 auto .65rem; color: var(--muted); font-size: .75rem; }
.client-form-section, .client-address-section {
  min-width: 0; padding: .75rem; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface);
}
.client-form-section { display: grid; gap: .65rem; }
.client-form-section h2 { margin: 0; font-size: .9375rem; text-align: left; }
.client-name-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.client-field { display: grid; min-width: 0; gap: .25rem; }
.client-field label { font-size: .8125rem; }
.client-field input { min-width: 0; min-height: 44px; padding: .6rem .7rem; font-size: .875rem; }
.client-field input[aria-invalid="true"] { border-color: var(--danger); }
.client-field-error { color: var(--danger); font-size: .75rem; }
.client-field-error:empty, .client-form > .error:empty { display: none; }
.client-form > .error { font-size: .8125rem; }
.client-address-section summary { min-height: 32px; align-content: center; cursor: pointer; font-weight: 600; font-size: .875rem; }
.client-address-fields { display: grid; gap: .65rem; margin-top: .65rem; }
.client-password-input { position: relative; }
.client-password-input input { padding-right: 3rem; }
.client-password-toggle {
  position: absolute; top: 0; right: 0; bottom: 0; width: 44px;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.client-password-toggle[aria-pressed="true"] { color: var(--accent); }
.client-password-eye {
  width: 20px; height: 20px; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.client-form-actions, .client-created-actions { display: flex; gap: .65rem; }
.client-form-actions .btn { min-height: 44px; font-size: .875rem; }
.client-form-actions button { flex: 1; width: auto; }
.client-created { max-width: 760px; margin: 1rem auto; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.client-created h1 { margin: 0 0 1rem; font-size: 1.25rem; }
.client-created-name { margin: 0 0 .25rem; font-weight: 600; }
.client-created-email { margin: 0 0 1rem; color: var(--muted); overflow-wrap: anywhere; }
.client-created-actions { flex-wrap: wrap; }
@media (max-width: 560px) {
  .client-created-actions { flex-direction: column; }
}

.clients-page { padding-top: .5rem; }
.agent-notifications { padding-top: 1.5rem; }
.agent-notification-list { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.agent-notification {
  padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); box-shadow: 0 5px 18px rgb(23 37 43 / 5%);
}
.agent-notification.unread { border-left: 4px solid var(--accent); }
.agent-notification-open {
  display: grid; width: 100%; gap: .2rem; padding: 0; border: 0;
  background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.agent-notification-title { font-weight: 700; }
.agent-notification-customer, .agent-notification time { color: var(--muted); font-size: .875rem; }
.agent-notification-unread { color: var(--accent); font-size: .8rem; font-weight: 700; }
.push-subscribe-button {
  margin: 0 0 1rem; padding: .75rem 1rem; border: 0; border-radius: 10px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.push-subscribe-button:disabled { opacity: .65; cursor: not-allowed; }
.clients-heading {
  display: flex; align-items: center; gap: 2rem;
  padding-bottom: .65rem; margin: 0 0 .75rem; border-bottom: 1px solid var(--line);
}
.page-heading {
  display: flex; align-items: center; gap: 1rem;
  padding-bottom: .65rem; margin-bottom: .75rem; border-bottom: 1px solid var(--line);
}
.page-heading h1 { margin: 0; }
.page-heading .back { margin: 0; }
.clients-heading h1 { margin: 0; font-size: 1rem; font-weight: 500; letter-spacing: 0; line-height: 1.5; }
.ticket-list-heading { justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: .5rem; padding-bottom: .5rem; }
.ticket-list-title { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: flex-start; gap: .75rem; }
.ticket-list-title h1 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; text-align: left; }
.ticket-list-title .ticket-heading-count { flex-shrink: 0; color: #9F4000; background: rgb(229 106 0 / 12%); }
.ticket-filter { position: relative; }
.ticket-filter-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.ticket-priority-menu .ticket-filter-menu { padding: .75rem; }
.ticket-priority-menu .ticket-priority-filter { width: 100%; }
.ticket-filter > summary { list-style: none; }
.ticket-filter > summary::-webkit-details-marker { display: none; }
.ticket-filter-button {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.ticket-filter-button:hover, .ticket-filter-button.is-active, .ticket-filter[open] > .ticket-filter-button {
  border-color: var(--accent); color: var(--accent);
}
.ticket-filter-icon {
  display: block; width: 20px; height: 20px; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16l-6.5 7.5V19l-3 1v-7.5L4 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16l-6.5 7.5V19l-3 1v-7.5L4 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ticket-priority-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V3m0 1h14l-3 4 3 4H5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V3m0 1h14l-3 4 3 4H5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ticket-filter-menu {
  position: absolute; z-index: 5; top: calc(100% + .5rem); right: 0;
  display: grid; gap: .25rem; min-width: 12rem; padding: .4rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  box-shadow: 0 12px 30px rgb(23 37 43 / 14%);
}
.ticket-filter-option {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; padding: .7rem .75rem; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font: 500 .9rem/1.2 var(--font);
  text-align: left; cursor: pointer;
}
.ticket-filter-option:hover { background: color-mix(in srgb, var(--paper) 72%, var(--surface)); }
.ticket-filter-option[aria-pressed="true"] { color: var(--accent); background: color-mix(in srgb, var(--paper) 72%, var(--surface)); }
.client-back {
  display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px;
  margin: 0; border: 0; border-radius: 0;
  background: transparent; color: #111;
}
.client-back-icon {
  display: block; width: 20px; height: 20px; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M20 12H4m0 0 7-7m-7 7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M20 12H4m0 0 7-7m-7 7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.back.client-back::before { content: none; }
.client-back:hover { color: var(--accent); }
.client-count { margin: .4rem 0 1rem; color: var(--muted); font-size: .9375rem; }
.client-search { position: relative; max-width: 34rem; margin-bottom: 1.25rem; }
.client-search input { padding-right: 2.8rem; }
.client-search-icon {
  position: absolute; top: 50%; right: .85rem; width: 18px; height: 18px;
  transform: translateY(-50%); background-color: var(--muted); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.8' cy='10.8' r='6.8'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.8' cy='10.8' r='6.8'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.client-table-wrap {
  overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.client-table, .client-table tbody { display: grid; gap: .55rem; }
.client-table { width: 100%; text-align: left; }
.client-table thead {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.client-table tbody tr {
  display: grid; gap: .55rem; padding: .65rem .8rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  box-shadow: 0 5px 18px rgb(23 37 43 / 5%); cursor: pointer;
}
.client-table tbody tr:hover { background: var(--surface); }
.client-table td {
  display: none; grid-template-columns: 5rem minmax(0, 1fr); gap: .65rem;
  padding: 0; overflow-wrap: anywhere;
}
.client-table td.client-name { display: block; font-weight: 700; }
.client-table td.client-address { display: none; color: var(--muted); }
.client-table td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 650; }
.client-table td.client-name::before { content: none; }
.client-card-toggle {
  appearance: none; display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto;
  gap: .3rem .65rem; align-items: center; padding: 0; border: 0;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.client-card-toggle { min-height: 44px; }
.client-card-toggle strong { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9375rem; }
.client-card-address { display: block; grid-column: 1; color: var(--muted); font-size: .8125rem; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-list-count { display: inline-block; margin-left: .25rem; padding: .1rem .45rem; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 600; }
.clients-page .client-search { margin-bottom: .75rem; }
.client-card-chevron {
  display: block; grid-column: 2; grid-row: 1; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .15s ease;
}
.client-card-row.expanded .client-card-chevron { transform: rotate(225deg); }
.client-card-row.expanded td[data-label="E-mail"],
.client-card-row.expanded td[data-label="Telefone"],
.client-card-row.expanded td[data-label="Ações"] { display: grid; }
.client-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.client-action {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: .4rem .55rem; border: 1px solid var(--line);
  border-radius: 8px; background: transparent; color: var(--accent);
  font: 600 .8125rem/1.2 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
}
.client-action:hover { background: color-mix(in srgb, var(--paper) 72%, var(--surface)); }
.client-action.client-delete { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.client-action:disabled { opacity: .6; cursor: progress; }
.agent-shortcut-count { white-space: nowrap; }
.agent-shortcut:focus-visible { outline-color: currentColor; }
.signature-field {
  display: grid; gap: .65rem; min-width: 0; margin: 0; padding: 1rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.signature-field legend { padding: 0 .35rem; font-weight: 650; }
.signature-hint { margin: 0; color: var(--muted); font-size: .875rem; }
.signature-canvas {
  display: block; width: 100%; height: 170px; min-height: 0; padding: 0;
  border: 1px dashed var(--muted); border-radius: 8px; background: #fff;
  touch-action: none; cursor: crosshair;
}
.signature-field .btn { justify-self: start; }
.work-order-icon {
  width: 62px; height: 62px; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12h-6a4 4 0 0 0-4 4v38a4 4 0 0 0 4 4h36a4 4 0 0 0 4-4V16a4 4 0 0 0-4-4h-6'/%3E%3Cpath d='M24 8h4a6 6 0 0 1 12 0h4v10H24V8Z'/%3E%3Cpath d='m18 29 3 3 6-6m5 4h14M18 42l3 3 6-6m5 4h14M18 54l3 3 6-6m5 4h14'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12h-6a4 4 0 0 0-4 4v38a4 4 0 0 0 4 4h36a4 4 0 0 0 4-4V16a4 4 0 0 0-4-4h-6'/%3E%3Cpath d='M24 8h4a6 6 0 0 1 12 0h4v10H24V8Z'/%3E%3Cpath d='m18 29 3 3 6-6m5 4h14M18 42l3 3 6-6m5 4h14M18 54l3 3 6-6m5 4h14'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tickets-dashboard { padding-top: 1.5rem; }
.tickets-dashboard.agent-ticket-list { padding-top: .5rem; }
.ticket-search { position: relative; max-width: 34rem; margin-bottom: .6rem; }
.ticket-search input { width: 100%; padding-right: 2.8rem; }
.tickets-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1.25rem, 4vw, 2rem); margin-bottom: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 20px; background: var(--surface);
  box-shadow: 0 18px 48px rgb(23 37 43 / 8%);
}
.section-kicker {
  margin: 0 0 .4rem; color: #B94C00; font-size: .72rem;
  font-weight: 800; letter-spacing: .12em;
}
.tickets-heading h1 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.15rem); }
.tickets-intro { margin: .5rem 0 0; color: var(--muted); }
.tickets-dashboard > .btn { flex: 0 0 auto; }
.tickets-dashboard .btn {
  min-height: 48px; border-color: #e36702; border-radius: 11px;
  background: #e36702; box-shadow: 0 6px 14px rgb(227 103 2 / 18%);
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.tickets-dashboard .btn:hover {
  transform: translateY(-1px); background: #c95b02;
  box-shadow: 0 9px 18px rgb(185 76 0 / 24%);
}
.tabs {
  display: flex; gap: .4rem; width: fit-content; max-width: 100%;
  padding: .35rem; margin: 0 0 1rem; border: 1px solid var(--line);
  border-radius: 13px; background: color-mix(in srgb, var(--surface) 80%, var(--paper));
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none; display: inline-flex; align-items: center; gap: .5rem;
  background: transparent; border: 0; border-radius: 9px;
  padding: .65rem .85rem; font: 600 .9rem/1.2 var(--font); color: var(--muted); cursor: pointer;
  white-space: nowrap;
}
.tab[aria-selected="true"] {
  color: #9F4000; background: var(--surface); box-shadow: 0 2px 8px rgb(23 37 43 / 8%);
}
.tab-count {
  display: inline-grid; place-items: center; min-width: 1.45rem; height: 1.45rem;
  padding: 0 .3rem; border-radius: 999px; background: color-mix(in srgb, var(--line) 55%, transparent);
  font-size: .75rem;
}
.tab[aria-selected="true"] .tab-count { background: rgb(229 106 0 / 12%); }

.list { display: grid; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.list > li { min-width: 0; }
.item {
  display: grid; grid-template-rows: 1.4rem 1.15rem 1.5rem; gap: .2rem; align-items: center;
  padding: .5rem .75rem; text-decoration: none; color: inherit;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-left: 3px solid color-mix(in srgb, var(--st, var(--line)) 45%, var(--line)); border-radius: 12px;
  background: var(--surface); box-shadow: 0 5px 18px rgb(23 37 43 / 5%);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.item:hover {
  transform: translateY(-2px); border-color: color-mix(in srgb, var(--st) 45%, var(--line));
  box-shadow: 0 12px 28px rgb(23 37 43 / 9%);
}
.ticket-card-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .5rem; }
.ticket-card-details { display: flex; min-width: 0; align-items: center; gap: .5rem; }
.ticket-card-description {
  display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: .8125rem; line-height: 1.4;
}
.item .priority-badge { padding: .15rem .45rem; font-size: .6875rem; line-height: 1.2; }
.item .priority-low, .item .priority-medium { color: #465760; background: #F3F5F2; border-color: #D9E0E3; }
.item.ticket-priority-high { border-left-color: #B36B00; }
.item.ticket-priority-urgent { border-left-color: var(--danger); background: #FFFAF9; }
.item .priority-high, .item .priority-urgent { font-weight: 700; }
.ticket-card-date { margin-left: auto; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.priority-badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem;
  border: 1px solid #D9E0E3; border-radius: 999px; background: #F3F5F2;
  color: #465760; font-size: .75rem; font-weight: 600;
}
.priority-medium { color: #235296; background: #EDF4FF; border-color: #CBDBF4; }
.priority-high { color: #8B4800; background: #FFF3DF; border-color: #EED3A6; }
.priority-urgent { color: #9F2520; background: #FFF0EE; border-color: #F0C6C2; }
.priority-urgent > span { display: inline-grid; place-items: center; width: 1rem; height: 1rem; border: 1px solid currentColor; border-radius: 50%; }
.ticket-priority-filter { flex: 0 1 240px; min-width: 0; font-size: .8rem; }
.ticket-priority-filter select { font-size: .875rem; }
.item .t { flex: 1; min-width: 0; font-weight: 600; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .m { font-size: .84rem; color: var(--muted); }
.item .s { flex: 0 0 auto; }

.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; font-weight: 600; white-space: nowrap; color: var(--st); }
.status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--st); }

.st-open { --st: var(--c-open); }
.st-in_progress { --st: var(--c-in_progress); }
.st-waiting_customer { --st: var(--c-waiting_customer); }
.st-resolved { --st: var(--c-resolved); }
.st-closed { --st: var(--c-closed); }

.empty {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 2rem 1.5rem; text-align: left; box-shadow: 0 8px 24px rgb(23 37 43 / 5%);
}
.empty p { margin: 0 0 1rem; }

.head-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.head-actions h1 { margin-bottom: 0; }

/* Detalhe */
.ticket-detail { display: grid; gap: 1rem; padding-top: .25rem; }
.ticket-detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ticket-more-options { position: relative; }
.ticket-more-toggle {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 40px; padding: .4rem .65rem;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  color: var(--muted); font-size: .8125rem; cursor: pointer; list-style: none;
}
.ticket-more-toggle::-webkit-details-marker { display: none; }
.ticket-more-toggle > span { font-size: 1.2rem; line-height: 1; }
.ticket-more-menu {
  position: absolute; z-index: 5; top: calc(100% + .4rem); right: 0; min-width: 12rem;
  padding: .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  box-shadow: 0 8px 24px rgb(23 37 43 / 12%);
}
.ticket-more-menu .btn { width: 100%; }
.back {
  justify-self: start; display: inline-flex; align-items: center; gap: .4rem;
  margin: 0 0 .25rem; font-size: .9rem; font-weight: 600;
  color: #9F4000; text-decoration: none;
}
.back::before { content: "\2190"; font-size: 1.1rem; }
.ticket-hero {
  padding: clamp(1rem, 3vw, 1.4rem); border: 1px solid var(--line);
  border-radius: 18px; background: var(--surface);
  box-shadow: 0 12px 32px rgb(23 37 43 / 7%);
}
.ticket-hero .section-kicker { margin-bottom: .5rem; }
.ticket-hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem;
}
.ticket-hero-meta .section-kicker { margin: 0; }
.ticket-hero h1 { margin: .65rem 0 .6rem; font-size: clamp(1.4rem, 4vw, 1.8rem); overflow-wrap: anywhere; }
.ticket-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.ticket-info { display: grid; gap: .35rem; margin: .85rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); }
.ticket-info > div { display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); align-items: baseline; gap: .75rem; }
.ticket-info dt { color: var(--muted); font-size: .8125rem; }
.ticket-info dd { margin: 0; color: var(--ink); font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
.ticket-hero .agent-box { margin-top: .85rem; padding: .85rem 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.ticket-hero .status-management h2 { font-size: 1rem; }
.ticket-hero .status-management .btn { font-size: .875rem; padding: .65rem .8rem; }
.ticket-empty-history { margin: 0 .25rem; color: var(--muted); font-size: .875rem; }
.ticket-hero-details { margin-top: .5rem; }
.ticket-description {
  margin: 0; padding: 0;
}
.ticket-description h2 { margin: 0 0 .25rem; color: var(--muted); font-size: .8125rem; font-weight: 500; }
.ticket-hero .status {
  padding: .2rem .55rem; border: 1px solid color-mix(in srgb, var(--st) 22%, transparent);
  border-radius: 999px; background: color-mix(in srgb, var(--st) 9%, var(--surface));
}
.detail-card {
  margin: 0; padding: 1.25rem; border: 1px solid var(--line);
  border-radius: 16px; background: var(--surface);
  box-shadow: 0 6px 20px rgb(23 37 43 / 5%);
}
.profile-sections { display: grid; gap: 1.5rem; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: .75rem; }
.meta-item { min-width: 0; padding: .8rem; border-radius: 11px; background: color-mix(in srgb, var(--paper) 72%, var(--surface)); }
.meta dt { margin-bottom: .2rem; color: var(--muted); font-size: .78rem; font-weight: 600; }
.meta dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.detail-card h2 { margin: 0 0 .75rem; font-size: 1.1rem; }
.status-update-list { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.status-update-list li { padding: .75rem; border-radius: 10px; background: color-mix(in srgb, var(--paper) 72%, var(--surface)); }
.status-update-list p { margin: .35rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.detail-upload { margin-top: .75rem; }

.files { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.files .linkbtn { text-align: left; overflow-wrap: anywhere; }

.thread { display: grid; gap: .75rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.msg { background: color-mix(in srgb, var(--paper) 65%, var(--surface)); border: 1px solid var(--line); border-left: 3px solid var(--line); padding: .85rem 1rem; border-radius: 5px 13px 13px 5px; }
.msg.staff { border-left-color: #B94C00; }
.msg.internal { background: transparent; border: 1px dashed var(--muted); border-left-width: 3px; }
.msg .by { font-size: .8125rem; color: var(--muted); margin-bottom: .2rem; }
.msg .by strong { color: var(--ink); }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.conversation-card form { padding-top: .25rem; }
.agent-box { border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; margin: 0; display: grid; gap: .75rem; background: var(--surface); box-shadow: 0 6px 20px rgb(23 37 43 / 5%); }
.status-management h2 { margin: 0; font-size: 1.1rem; }

/* Aviso rápido */
.toast {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translate(-50%, 200%);
  background: var(--ink); color: var(--paper); padding: .75rem 1rem; border-radius: var(--radius);
  max-width: min(92vw, 520px); font-size: .9375rem; opacity: 0; transition: transform .2s ease, opacity .2s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.loading { color: var(--muted); padding: 2rem 0; }

@media (max-width: 420px) {
  .row2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .toast, .item, .agent-shortcut, .tickets-dashboard .btn { transition: none; }
  .item:hover, .agent-shortcut:hover, .tickets-dashboard .btn:hover { transform: none; }
}

@media (max-width: 560px) {
  body { background: #EDF1F4; background-attachment: initial; }
  .shell { padding-right: 1rem; padding-left: 1rem;   }
  .topbar { gap: .75rem; }
  .brand { flex-basis: 160px; }
  .who { gap: .5rem; }
  .greeting { max-width: 42vw; }
  .agent-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .agent-shortcut { min-height: 156px; gap: .65rem; padding: .9rem .5rem; }
  .agent-shortcut-icon, .notification-shortcut-icon, .client-icon,
  .logout-shortcut-icon, .work-order-icon { width: 48px; height: 48px; flex: 0 0 48px; }
  .agent-shortcut-label { font-size: clamp(.88rem, 4vw, 1.05rem); line-height: 1.25; }
  .tickets-dashboard { padding-top: 1rem; }
  .page-heading { flex-wrap: wrap; }
  .tickets-heading { align-items: stretch; flex-direction: column; gap: 1.1rem; margin-bottom: 1rem; }
  .tickets-dashboard > .btn { width: 100%; }
  .tickets-dashboard .btn { width: 100%; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; padding: .65rem .5rem; font-size: .84rem; }
  .item { padding: .5rem .7rem; }
  .ticket-detail { gap: .8rem; }
  .detail-card { padding: 1rem; }
  .attachment-preview-item { grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: .45rem; }
  .attachment-thumbnail-button, .attachment-file-preview { width: 64px; height: 54px; }
  .attachment-preview-date { grid-column: 2; grid-row: 2; }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
}

/* Central do cliente */
.client-profile { max-width: 760px; margin: 0 auto; padding-top: .5rem; }
.client-profile .profile-heading { margin-bottom: .75rem; }
.client-profile .profile-sections { gap: .65rem; }
.client-profile .detail-card { padding: .85rem; border-radius: 14px; }
.client-profile .detail-card h2 { margin-bottom: .25rem; font-size: .9375rem; }
.profile-account-email { margin: 0 0 .75rem; color: var(--muted); font-size: .8125rem; overflow-wrap: anywhere; }
.client-profile form { gap: .65rem; }
.client-profile label { gap: .25rem; font-size: .8125rem; min-width: 0; }
.client-profile input, .client-profile textarea { min-width: 0; padding: .6rem .7rem; font-size: .875rem; }
.client-profile textarea { min-height: 5rem; }
.client-profile .row2 { gap: .65rem; align-items: end; }
.profile-personal-form > .row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.client-profile .client-password-input input { padding-right: 3rem; }
.client-profile .notification-toggle { min-height: 44px; align-items: flex-start; padding-top: .35rem; line-height: 1.45; }
.client-profile .notification-toggle input { width: 18px; min-height: 18px; height: 18px; flex: 0 0 18px; margin: .1rem 0 0; accent-color: var(--accent); }
.client-profile .btn { min-height: 44px; font-size: .875rem; }
.client-profile form > .error:empty, .client-profile form > .success:empty { display: none; }
.client-profile .client-field-error { color: var(--danger); }
.client-profile input[aria-invalid="true"] { border-color: var(--danger); }
.profile-address { border-top: 1px solid var(--line); padding-top: .35rem; }
.profile-address summary, .profile-security summary { min-height: 44px; align-content: center; font-size: .875rem; font-weight: 600; cursor: pointer; }
.profile-address-fields { display: grid; gap: .65rem; padding-top: .35rem; }
.profile-security[open] summary { margin-bottom: .65rem; }
.profile-security-tip { margin: 0; padding: .65rem; border-radius: 9px; background: var(--paper); color: var(--muted); font-size: .8125rem; }
.client-profile form > small { color: var(--muted); font-size: .75rem; }
.client-topbar { gap: .75rem; padding: .5rem 0; }
.client-topbar .brand { flex: 0 1 190px; }
.client-topbar .who { display: grid; grid-template-columns: repeat(2, max-content); gap: 0 .5rem; justify-content: end; }
.client-topbar .greeting { grid-column: 1 / -1; max-width: 180px; }
.client-topbar .profile-link, .client-topbar .logout-button {
  min-height: 44px; display: inline-flex; justify-content: center; align-items: center;
  padding: .35rem .45rem; font-size: .8125rem; text-decoration: none;
}
.client-ticket-list { padding-top: .75rem; }
.client-ticket-list .tickets-heading {
  gap: .75rem; padding: .85rem; margin-bottom: .75rem;
  border-radius: 14px; box-shadow: 0 5px 18px rgb(23 37 43 / 5%);
}
.client-ticket-list .tickets-heading h1 { font-size: 1.25rem; }
.client-ticket-list .client-new-ticket { gap: .4rem; width: auto; min-height: 44px; font-size: .875rem; box-shadow: none; }
.client-new-ticket-icon { font-size: 1.25rem; font-weight: 400; line-height: 1; }
.client-ticket-list .tabs { width: 100%; margin-bottom: .65rem; gap: .2rem; padding: .25rem; }
.client-ticket-list .tab { flex: 1; justify-content: center; min-height: 44px; padding: .5rem .3rem; gap: .35rem; font-size: .8125rem; }
@media (max-width: 560px) {
  .client-topbar .brand { flex: 0 0 clamp(136px, 40vw, 180px); max-width: 48%; }
  .client-topbar .greeting { max-width: min(36vw, 160px); font-size: .8125rem; }
  .client-ticket-list .tickets-heading { align-items: stretch; flex-direction: column; gap: .65rem; }
  .client-ticket-list .client-new-ticket { width: 100%; }
}
