:root {
  --bg: #07141c;
  --bg-2: #0b1d27;
  --panel: #102732;
  --panel-2: #14313d;
  --card: #ffffff;
  --card-soft: #f4f7f8;
  --text: #15242b;
  --muted: #6f8088;
  --line: #dce5e8;
  --white: #fff;
  --cyan: #16d3c5;
  --cyan-dark: #0aa79d;
  --yellow: #f4cf3a;
  --green: #29c781;
  --red: #ef5965;
  --orange: #f49c48;
  --shadow: 0 18px 60px rgba(2, 15, 21, 0.15);
  --radius: 22px;
  --radius-sm: 13px;
  --max: 1480px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #eef3f4;
  color: var(--text);
  font:
    15px/1.5 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
}
.muted {
  color: var(--muted);
}
.danger-text {
  color: var(--red) !important;
}
.page-shell {
  width: min(calc(100% - 42px), var(--max));
  margin: 0 auto;
  padding: 34px 0 92px;
}
.narrow-page {
  max-width: 820px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(7, 20, 28, 0.97);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 190px;
}
.brand img {
  width: 112px;
  height: auto;
  object-fit: contain;
}
.brand span {
  color: var(--yellow);
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 14px;
  font-weight: 750;
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
}
.desktop-nav a {
  padding: 10px 14px;
  border-radius: 10px;
  color: #bcd0d8;
  font-weight: 650;
  transition: 0.2s;
}
.desktop-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.notification {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #cde0e7;
}
.notification b {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--yellow);
  color: #17232a;
  font-size: 10px;
}
.user-menu {
  position: relative;
}
.user-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.user-menu summary::-webkit-details-marker {
  display: none;
}
.user-menu summary > svg {
  width: 17px;
  color: #91a7b0;
}
.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), #63e1d6);
  color: #062024;
  font-weight: 900;
}
.user-name {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 650;
}
.user-popover {
  position: absolute;
  top: 52px;
  right: 0;
  width: 210px;
  padding: 8px;
  background: #fff;
  color: var(--text);
  border-radius: 15px;
  box-shadow: var(--shadow);
}
.user-popover a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 9px;
}
.user-popover a:hover {
  background: #f0f5f6;
}
.user-popover svg {
  width: 18px;
}
.mobile-nav {
  display: none;
}

.button {
  border: 0;
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  transition:
    transform 0.18s,
    background 0.18s,
    border 0.18s;
}
.button:hover {
  transform: translateY(-1px);
}
.button.primary {
  background: var(--yellow);
  color: #14262e;
  box-shadow: 0 10px 24px rgba(244, 207, 58, 0.2);
}
.button.primary:hover {
  background: #ffe168;
}
.button.secondary {
  background: var(--cyan);
  color: #08262a;
}
.button.ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}
.button.text {
  background: transparent;
  color: var(--muted);
}
.button.danger-outline {
  background: #fff;
  color: var(--red);
  border: 1px solid #f3b7bc;
}
.button.full {
  width: 100%;
}
.inline-form {
  display: inline-flex;
}
.back-link {
  color: var(--muted);
  font-weight: 720;
}
.back-link:hover {
  color: var(--cyan-dark);
}

.flash {
  position: fixed;
  z-index: 100;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(620px, calc(100% - 32px));
  padding: 13px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-weight: 700;
  transition: 0.35s;
}
.flash.success {
  background: #dff8ed;
  color: #08734a;
  border: 1px solid #a5e6ca;
}
.flash.error {
  background: #fee6e8;
  color: #a62431;
  border: 1px solid #f5b8be;
}
.flash.warning {
  background: #fff4cf;
  color: #735500;
  border: 1px solid #ecd67e;
}
.flash.hide {
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 38px 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: linear-gradient(130deg, #091a23 0%, #102f3a 72%, #0b4548 100%);
  color: white;
  box-shadow: var(--shadow);
}
.hero-panel:after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -110px;
  top: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 211, 197, 0.3), transparent 68%);
}
.hero-panel.compact {
  min-height: 176px;
}
.hero-panel > * {
  position: relative;
  z-index: 1;
}
.hero-panel h1 {
  margin: 0;
  font-size: clamp(29px, 4vw, 48px);
  letter-spacing: -0.04em;
}
.hero-panel p:not(.eyebrow) {
  margin: 10px 0 0;
  color: #b7ccd4;
  max-width: 650px;
  font-size: 16px;
}
.hero-panel .eyebrow {
  color: var(--yellow);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.stat-card {
  min-height: 108px;
  padding: 21px;
  background: #fff;
  border: 1px solid #e0e8ea;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 7px 22px rgba(16, 42, 52, 0.05);
}
.stat-card:hover {
  border-color: #bdcdd2;
  transform: translateY(-1px);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}
.stat-icon.cyan {
  background: #d9f8f5;
  color: #079f95;
}
.stat-icon.green {
  background: #ddf8eb;
  color: #16a86a;
}
.stat-icon.yellow {
  background: #fff5c9;
  color: #b48e00;
}
.stat-icon.red {
  background: #ffe2e5;
  color: #cf3d49;
}
.stat-card strong {
  display: block;
  font-size: 27px;
  line-height: 1;
}
.stat-card span:not(.stat-icon) {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.ticket-workspace {
  background: #fff;
  border: 1px solid #dfe8eb;
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(18, 45, 55, 0.07);
  overflow: hidden;
}
.workspace-head {
  padding: 25px 27px 18px;
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.workspace-head h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}
.filter-toggle {
  display: none;
}
.filters {
  padding: 0 27px 24px;
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(
      4,
      minmax(150px, 1fr)
    ) auto auto;
  gap: 10px;
}
.filters select,
.filters input,
.report-filters input,
.report-filters select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8fafb;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
}
.filters select:focus,
.filters input:focus,
.report-filters input:focus,
.report-filters select:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--cyan-dark);
  box-shadow: 0 0 0 3px rgba(22, 211, 197, 0.12);
}
.search-box {
  position: relative;
}
.search-box svg {
  position: absolute;
  left: 13px;
  top: 12px;
  color: #789099;
}
.search-box input {
  padding-left: 42px;
}
.ticket-table {
  border-top: 1px solid #e5ecee;
}
.ticket-row {
  display: grid;
  grid-template-columns: 72px minmax(290px, 2.5fr) 120px 190px 100px 95px 34px;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 11px 24px;
  border-bottom: 1px solid #e9eff1;
  transition: 0.16s;
}
.ticket-row:not(.ticket-header):hover {
  background: #f6fafb;
}
.ticket-row.waiting {
  background: #fffbea;
}
.ticket-header {
  min-height: 42px;
  padding-top: 8px;
  padding-bottom: 8px;
  background: #f4f7f8;
  color: #71858d;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ticket-id {
  font-weight: 850;
  color: #607780;
}
.ticket-main {
  min-width: 0;
}
.ticket-main strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
}
.ticket-main small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.priority,
.ticket-state,
.internal-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.priority.high {
  background: #ffe1e4;
  color: #bd2937;
}
.priority.medium {
  background: #fff2c2;
  color: #916e00;
}
.priority.low {
  background: #dff6ff;
  color: #197796;
}
.priority.neutral {
  background: #e9eef0;
  color: #66777d;
}
.ticket-state.open {
  background: #dcf8eb;
  color: #08754a;
}
.ticket-state.closed {
  background: #e9edef;
  color: #68787e;
}
.internal-status {
  background: #eaf0f2;
  color: #52666e;
}
.due {
  font-weight: 720;
  color: #667b83;
}
.due.overdue {
  color: var(--red);
}
.go {
  color: #9aacb3;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 20px;
}
.pagination a {
  color: var(--cyan-dark);
  font-weight: 750;
}
.pagination span {
  color: var(--muted);
}
.empty-state {
  padding: 60px 30px;
  text-align: center;
}
.empty-state svg {
  width: 46px;
  height: 46px;
  color: #9bb1b9;
}
.empty-state h3,
.empty-state h1 {
  margin: 13px 0 4px;
}
.empty-state p {
  color: var(--muted);
}
.empty-state.small {
  padding: 38px 24px;
}

.detail-topline {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ticket-hero {
  padding: 29px 34px;
  border-radius: var(--radius);
  background: linear-gradient(128deg, #0b1b24, #11333e);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  box-shadow: var(--shadow);
}
.ticket-hero-main {
  display: flex;
  align-items: center;
  gap: 23px;
  min-width: 0;
}
.ticket-number {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(22, 211, 197, 0.14);
  border: 1px solid rgba(22, 211, 197, 0.28);
  color: var(--cyan);
  font-weight: 900;
  font-size: 19px;
}
.ticket-hero h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.ticket-hero .eyebrow {
  color: var(--yellow);
}
.ticket-meta {
  margin: 9px 0 0;
  color: #adc2ca;
}
.ticket-badges {
  display: flex;
  gap: 8px;
}
.detail-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(290px, 0.8fr);
  gap: 18px;
  align-items: start;
}
.conversation-card,
.side-card,
.simple-card {
  background: #fff;
  border: 1px solid #dde7e9;
  border-radius: 20px;
  box-shadow: 0 10px 34px rgba(20, 47, 57, 0.06);
}
.conversation-card {
  padding: 10px 26px 26px;
}
.message {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  margin: 10px 0;
  padding: 20px 18px;
  border: 1px solid #e1e9ec;
  border-radius: 16px;
  background: #f7fafb;
}
.message.client {
  background: #f5f8fa;
  border-color: #dde6ea;
}
.message-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #dff7f4;
  color: #087e77;
  font-weight: 900;
  border: 1px solid rgba(0, 0, 0, 0.035);
}
.message.staff.user-color-message {
  /* A cor escolhida pelo usuário continua suave, mas agora aparece com
     contraste suficiente para diferenciar visualmente cada pessoa. */
  background: #f8fafb;
  border-color: #dfe8eb;
  background: color-mix(in srgb, var(--author-color, #4B8E89) 14%, #ffffff);
  border-color: color-mix(in srgb, var(--author-color, #4B8E89) 30%, #e4ecef);
}
.message.staff.user-color-message .message-avatar {
  background: #e9f1f2;
  color: #29464f;
  background: color-mix(in srgb, var(--author-color, #4B8E89) 28%, #ffffff);
  color: color-mix(in srgb, var(--author-color, #4B8E89) 82%, #17323b);
  border-color: color-mix(in srgb, var(--author-color, #4B8E89) 30%, #dfe8eb);
}
.message.staff.admin-alias-message {
  background: #f0faf8;
  border-color: #d0e8e2;
}
.message.staff.admin-alias-message .message-avatar {
  background: #ddf2ed;
  color: #087e77;
}
.message-body header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
}
.message-body time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.message-body p {
  margin: 10px 0 0;
  color: #33474f;
  white-space: normal;
  overflow-wrap: anywhere;
}
.reply-box {
  margin-top: 24px;
  padding: 20px;
  border-radius: 16px;
  background: #f4f8f9;
  border: 1px solid #dce7ea;
}
.reply-box > label {
  font-weight: 800;
}
.reply-box textarea {
  width: 100%;
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  resize: vertical;
}
.reply-actions {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.file-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #526870;
  font-weight: 750;
  cursor: pointer;
}
.file-button input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.file-button small {
  color: #85979e;
  font-weight: 500;
  max-width: 210px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.file-button.compact {
  padding: 11px;
  border: 1px dashed #bdcdd2;
  border-radius: 11px;
  flex-wrap: wrap;
}
.closed-note {
  margin-top: 22px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #edf2f3;
  color: #66777e;
  border-radius: 12px;
  font-weight: 700;
}
.ticket-sidebar {
  display: grid;
  gap: 14px;
}
.side-card {
  padding: 21px;
}
.side-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid #e8eef0;
}
.side-row span {
  color: var(--muted);
}
.side-row strong {
  text-align: right;
  font-size: 13px;
}
.side-card .button {
  margin-top: 15px;
}
.people-list {
  display: grid;
  gap: 9px;
}
.people-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}
.people-list i,
.check-list i {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dff7f4;
  color: #07857d;
  font-style: normal;
  font-weight: 850;
}
.attachments-list {
  display: grid;
  gap: 8px;
}
.attachments-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-radius: 10px;
  background: #f2f6f7;
  color: #42606a;
  min-width: 0;
}
.attachments-list a:hover {
  background: #e4f2f2;
}
.attachments-list a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachments-list svg {
  flex: 0 0 auto;
  width: 17px;
}
.upload-mini {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.form-hero {
  max-width: 780px;
  padding: 25px 0 33px;
}
.form-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.05em;
}
.form-hero p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
}
.main-form {
  display: grid;
  gap: 14px;
}
.form-section {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 20px;
  padding: 26px;
  background: #fff;
  border: 1px solid #dce6e9;
  border-radius: 20px;
}
.section-number {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #0b202a;
  color: var(--yellow);
  font-weight: 900;
}
.section-content h2 {
  margin: 2px 0 19px;
  font-size: 22px;
}
.form-grid {
  display: grid;
  gap: 16px;
}
.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid label,
.main-form label,
.report-filters label {
  display: grid;
  gap: 7px;
  color: #41565e;
  font-weight: 750;
  font-size: 13px;
}
.form-grid input,
.form-grid textarea,
.form-grid select,
.main-form input,
.main-form textarea,
.main-form select,
.simple-card input {
  width: 100%;
  min-height: 47px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafcfc;
  color: var(--text);
  outline: none;
}
.form-grid textarea,
.main-form textarea {
  min-height: 130px;
  resize: vertical;
}
.full-span {
  grid-column: 1/-1;
}
.upload-zone {
  min-height: 145px;
  padding: 24px;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 2px dashed #c2d2d6;
  border-radius: 15px;
  background: #f7fafb;
  cursor: pointer;
}
.upload-zone svg {
  width: 28px;
  height: 28px;
  color: var(--cyan-dark);
}
.upload-zone span,
.upload-zone small {
  color: var(--muted);
  font-weight: 500;
}
.upload-zone input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.form-submit {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
}

.app-dialog {
  width: min(720px, calc(100% - 30px));
  padding: 0;
  border: 0;
  border-radius: 21px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}
.app-dialog::backdrop {
  background: rgba(3, 15, 21, 0.72);
  backdrop-filter: blur(5px);
}
.app-dialog form {
  padding: 25px;
}
.small-dialog {
  max-width: 530px;
}
.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-head > button {
  border: 0;
  background: #edf2f3;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}
.check-list {
  max-height: 410px;
  overflow: auto;
  display: grid;
  gap: 7px;
}
.check-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e0e8ea;
  border-radius: 11px;
  cursor: pointer;
}
.check-list label:hover {
  background: #f4f8f9;
}
.check-list input {
  width: 18px;
  height: 18px;
}
.check-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.check-list span b {
  display: grid;
  gap: 2px;
  font: inherit;
}
.responsible-email {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}
.responsible-email.invalid {
  color: var(--red);
  font-weight: 750;
}
.dialog-help {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.simple-card {
  padding: 34px;
}
.simple-card h1 {
  margin: 0 0 8px;
  font-size: 38px;
}
.simple-card > p:not(.eyebrow) {
  color: var(--muted);
}
.form-error {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fee7e9;
  color: #a52b37;
  font-weight: 650;
}
.about-card > img {
  width: 170px;
  padding: 17px;
  border-radius: 16px;
  background: #0a1d26;
  margin-bottom: 24px;
}
.about-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.about-grid div {
  padding: 17px;
  background: #f3f7f8;
  border-radius: 13px;
}
.about-grid strong,
.about-grid span {
  display: block;
}
.about-grid span {
  margin-top: 5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.about-card code {
  padding: 2px 5px;
  background: #eaf0f1;
  border-radius: 5px;
}

.week-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.week-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.day-column {
  min-height: 430px;
  padding: 12px;
  background: #fff;
  border: 1px solid #dfe7ea;
  border-radius: 16px;
}
.day-column.today {
  border: 2px solid var(--cyan-dark);
}
.day-column > header {
  padding: 4px 3px 12px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
.day-column > header strong {
  color: var(--text);
}
.day-empty {
  padding: 30px 5px;
  text-align: center;
  color: #a0b0b6;
}
.agenda-ticket {
  margin-bottom: 9px;
  padding: 11px;
  display: block;
  border: 1px solid #e0e8ea;
  border-left-width: 4px;
  border-radius: 10px;
  background: #fafcfc;
}
.agenda-ticket b {
  color: var(--cyan-dark);
  font-size: 11px;
}
.agenda-ticket strong,
.agenda-ticket span,
.agenda-ticket small {
  display: block;
}
.agenda-ticket strong {
  margin: 5px 0;
  line-height: 1.25;
}
.agenda-ticket span,
.agenda-ticket small {
  color: var(--muted);
  font-size: 11px;
}
.priority-border-high {
  border-left-color: var(--red);
}
.priority-border-medium {
  border-left-color: var(--yellow);
}
.priority-border-low {
  border-left-color: #43bade;
}

.report-filters {
  margin: 18px 0;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  background: #fff;
  border: 1px solid #dfe7e9;
  border-radius: 16px;
}
.report-table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid #dfe7e9;
  border-radius: 17px;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1050px;
}
.report-table th,
.report-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e7edef;
  text-align: left;
}
.report-table th {
  background: #f3f7f8;
  color: #627780;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.report-table td {
  font-size: 13px;
}
.report-table a {
  color: var(--cyan-dark);
  font-weight: 800;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: #07141c;
  color: #fff;
}
.login-visual {
  position: relative;
  overflow: hidden;
  padding: 8vh 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(
    circle at 30% 35%,
    #123844 0%,
    #091a23 47%,
    #061219 100%
  );
}
.login-logo {
  position: absolute;
  top: 50px;
  left: 8vw;
  width: 170px;
}
.login-visual h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(55px, 7vw, 105px);
  line-height: 0.93;
  letter-spacing: -0.075em;
}
.login-visual h1 span {
  color: var(--yellow);
}
.login-visual .eyebrow {
  position: relative;
  z-index: 2;
  color: var(--cyan);
}
.login-copy {
  position: relative;
  z-index: 2;
  max-width: 590px;
  color: #aec6cf;
  font-size: 18px;
}
.login-features {
  position: relative;
  z-index: 2;
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.login-features span {
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccdde3;
}
.login-features svg {
  color: var(--cyan);
}
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.orb-one {
  width: 430px;
  height: 430px;
  right: -180px;
  top: -100px;
  background: radial-gradient(
    circle,
    rgba(22, 211, 197, 0.22),
    transparent 70%
  );
}
.orb-two {
  width: 350px;
  height: 350px;
  left: -150px;
  bottom: -140px;
  background: radial-gradient(
    circle,
    rgba(244, 207, 58, 0.16),
    transparent 70%
  );
}
.login-panel {
  padding: 35px;
  display: grid;
  place-items: center;
  background: #eef4f5;
  color: var(--text);
}
.login-card {
  width: min(440px, 100%);
  padding: 42px;
  background: #fff;
  border-radius: 25px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
}
.login-card h2 {
  margin: 0;
  font-size: 40px;
  letter-spacing: -0.04em;
}
.login-card > p:not(.eyebrow) {
  color: var(--muted);
}
.login-card form {
  display: grid;
  gap: 17px;
  margin-top: 28px;
}
.login-card label {
  display: grid;
  gap: 7px;
  font-weight: 750;
  color: #425860;
}
.login-card input {
  width: 100%;
  height: 50px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
}
.password-field {
  position: relative;
}
.password-field button {
  position: absolute;
  right: 6px;
  top: 6px;
  height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: #eef3f4;
  color: #536970;
  font-size: 12px;
  font-weight: 750;
}
.production-note {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #81939a;
  font-size: 12px;
}
.production-note span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(41, 199, 129, 0.13);
}

.app-footer {
  width: min(calc(100% - 42px), var(--max));
  margin: 0 auto;
  min-height: 70px;
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #82959c;
  font-size: 12px;
}
.login-page + .app-footer {
  display: none;
}

@media (max-width: 1200px) {
  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .search-box {
    grid-column: span 2;
  }
  .ticket-row {
    grid-template-columns: 65px minmax(250px, 2fr) 110px 170px 90px 34px;
  }
  .ticket-row > :nth-child(5) {
    display: none;
  }
  .ticket-header > :nth-child(5) {
    display: none;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1.7fr) 310px;
  }
}
@media (max-width: 900px) {
  body {
    padding-bottom: 72px;
  }
  .topbar {
    height: 64px;
    padding: 0 17px;
  }
  .brand {
    min-width: 0;
    flex: 1;
  }
  .brand img {
    width: 94px;
  }
  .brand span,
  .desktop-nav,
  .user-name {
    display: none;
  }
  .mobile-nav {
    position: fixed;
    z-index: 60;
    left: 0;
    right: 0;
    bottom: 0;
    height: 68px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #07141c;
    color: #b6cbd3;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 750;
  }
  .mobile-nav svg {
    width: 21px;
  }
  .mobile-nav .mobile-new {
    color: var(--yellow);
  }
  .page-shell {
    width: min(calc(100% - 24px), var(--max));
    padding-top: 20px;
    padding-bottom: 25px;
  }
  .hero-panel {
    min-height: 180px;
    padding: 27px;
    align-items: flex-start;
    flex-direction: column;
  }
  .hero-panel.compact {
    min-height: 160px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .stat-card {
    min-height: 90px;
    padding: 15px;
  }
  .stat-icon {
    width: 42px;
    height: 42px;
  }
  .workspace-head {
    padding: 20px 17px 14px;
  }
  .filter-toggle {
    display: inline-flex;
  }
  .filters {
    display: none;
    grid-template-columns: 1fr;
    padding: 0 17px 18px;
  }
  .filters.open {
    display: grid;
  }
  .search-box {
    grid-column: auto;
  }
  .ticket-header {
    display: none;
  }
  .ticket-row {
    position: relative;
    grid-template-columns: 58px minmax(0, 1fr) 28px;
    gap: 7px 10px;
    min-height: 108px;
    padding: 16px 15px;
  }
  .ticket-row > :nth-child(3),
  .ticket-row > :nth-child(4),
  .ticket-row > :nth-child(5),
  .ticket-row > :nth-child(6) {
    grid-row: 2;
  }
  .ticket-row > :nth-child(3) {
    grid-column: 2;
    justify-self: start;
  }
  .ticket-row > :nth-child(4) {
    grid-column: 2;
    margin-left: 82px;
    justify-self: start;
  }
  .ticket-row > :nth-child(5),
  .ticket-row > :nth-child(6) {
    display: none;
  }
  .ticket-row .go {
    grid-column: 3;
    grid-row: 1/3;
  }
  .ticket-main small {
    font-size: 11px;
  }
  .detail-topline {
    align-items: flex-start;
    flex-direction: column;
  }
  .detail-actions {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 3px;
  }
  .detail-actions .button {
    white-space: nowrap;
  }
  .ticket-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }
  .ticket-hero-main {
    align-items: flex-start;
  }
  .ticket-number {
    width: 57px;
    height: 57px;
    border-radius: 16px;
    font-size: 15px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .ticket-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ticket-sidebar .side-card:last-child {
    grid-column: 1/-1;
  }
  .form-section {
    grid-template-columns: 1fr;
  }
  .section-number {
    width: 38px;
    height: 38px;
  }
  .form-grid.two {
    grid-template-columns: 1fr;
  }
  .report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login-page {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .login-visual {
    min-height: 48vh;
    padding: 95px 28px 45px;
  }
  .login-logo {
    top: 30px;
    left: 28px;
    width: 125px;
  }
  .login-visual h1 {
    font-size: clamp(48px, 14vw, 72px);
  }
  .login-copy {
    font-size: 15px;
  }
  .login-panel {
    padding: 20px 16px 35px;
  }
  .login-card {
    padding: 28px 23px;
  }
  .app-footer {
    display: none;
  }
}
@media (max-width: 580px) {
  .top-actions {
    gap: 8px;
  }
  .notification {
    width: 38px;
    height: 38px;
  }
  .avatar {
    width: 35px;
    height: 35px;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-card {
    display: block;
  }
  .stat-icon {
    width: 35px;
    height: 35px;
    margin-bottom: 10px;
  }
  .stat-card strong {
    font-size: 23px;
  }
  .ticket-row {
    grid-template-columns: 49px minmax(0, 1fr) 24px;
  }
  .internal-status {
    font-size: 9px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ticket-sidebar {
    grid-template-columns: 1fr;
  }
  .ticket-sidebar .side-card:last-child {
    grid-column: auto;
  }
  .conversation-card {
    padding: 5px 15px 18px;
  }
  .message {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    margin: 8px 0;
    padding: 14px 12px;
    border-radius: 14px;
  }
  .message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .message-body header {
    display: block;
  }
  .message-body time {
    display: block;
    margin-top: 3px;
  }
  .reply-box {
    padding: 14px;
  }
  .reply-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .ticket-hero-main {
    display: block;
  }
  .ticket-number {
    margin-bottom: 14px;
  }
  .ticket-badges {
    width: 100%;
  }
  .form-section {
    padding: 20px 17px;
  }
  .form-submit {
    align-items: stretch;
    flex-direction: column-reverse;
  }
  .form-submit .button {
    width: 100%;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .report-filters {
    grid-template-columns: 1fr;
  }
  .week-nav {
    width: 100%;
    overflow-x: auto;
  }
  .simple-card {
    padding: 25px 20px;
  }
}
@media print {
  .topbar,
  .mobile-nav,
  .app-footer,
  .report-filters,
  .hero-panel .button {
    display: none !important;
  }
  body {
    background: white;
    padding: 0;
  }
  .page-shell {
    width: 100%;
    padding: 0;
  }
  .hero-panel {
    min-height: auto;
    padding: 15px;
    color: #000;
    background: #fff;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  .hero-panel p:not(.eyebrow) {
    color: #333;
  }
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .stat-card {
    box-shadow: none;
  }
}
.notification-list {
  margin-top: 22px;
  display: grid;
  gap: 8px;
}
.notification-list > a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border: 1px solid #e0e8ea;
  border-radius: 13px;
}
.notification-list > a:hover {
  background: #f4f8f9;
}
.notification-list strong,
.notification-list small {
  display: block;
}
.notification-list small {
  margin-top: 4px;
  color: var(--muted);
}
.notification-list > a > b {
  padding: 5px 8px;
  border-radius: 99px;
  background: #edf2f3;
  color: #5d7078;
  font-size: 10px;
  white-space: nowrap;
}
@media (max-width: 580px) {
  .notification-list > a {
    grid-template-columns: 42px minmax(0, 1fr) 18px;
  }
  .notification-list > a > b {
    display: none;
  }
}

/* Confirmações profissionais — substitui mensagens nativas do navegador */
.button.danger {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(239, 89, 101, 0.22);
}
.button.danger:hover {
  background: #db4350;
}
.button:disabled {
  opacity: 0.68;
  cursor: wait;
  transform: none;
}

.confirm-dialog {
  width: min(510px, calc(100% - 28px));
  max-width: 510px;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.confirm-dialog::backdrop {
  background: rgba(3, 15, 21, 0.78);
  backdrop-filter: blur(7px);
}
.confirm-dialog-shell {
  position: relative;
  padding: 34px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(9, 32, 42, 0.08);
  border-radius: 24px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.38);
}
.confirm-dialog-shell:before {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  top: -125px;
  right: -95px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(22, 211, 197, 0.22),
    transparent 70%
  );
  pointer-events: none;
}
.confirm-dialog-close {
  position: absolute;
  z-index: 2;
  top: 17px;
  right: 17px;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: #edf3f4;
  color: #60757d;
}
.confirm-dialog-close:hover {
  background: #e3ebed;
  color: var(--text);
}
.confirm-dialog-icon {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 21px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff3bd;
  color: #8d6c00;
  box-shadow: inset 0 0 0 1px rgba(180, 142, 0, 0.1);
}
.confirm-dialog-icon span {
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}
.confirm-dialog-copy {
  position: relative;
  padding-right: 20px;
}
.confirm-dialog-copy .eyebrow {
  margin-bottom: 7px;
}
.confirm-dialog-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.035em;
}
.confirm-dialog-copy > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}
.confirm-dialog-actions {
  position: relative;
  margin-top: 27px;
  padding-top: 20px;
  border-top: 1px solid #e5ecee;
}
.confirm-dialog-actions .button {
  min-width: 130px;
}

.confirm-dialog--danger .confirm-dialog-icon {
  background: #ffe2e5;
  color: #c93442;
}
.confirm-dialog--danger .confirm-dialog-copy .eyebrow {
  color: var(--red);
}
.confirm-dialog--warning .confirm-dialog-icon {
  background: #fff3bd;
  color: #8d6c00;
}
.confirm-dialog--warning .confirm-dialog-copy .eyebrow {
  color: #9a7800;
}
.confirm-dialog--success .confirm-dialog-icon {
  background: #ddf8eb;
  color: #0c9c61;
}
.confirm-dialog--success .confirm-dialog-copy .eyebrow {
  color: #0c9c61;
}
.confirm-dialog--info .confirm-dialog-icon {
  background: #d9f8f5;
  color: #078e86;
}
.confirm-dialog--info .confirm-dialog-copy .eyebrow {
  color: #078e86;
}

@media (max-width: 580px) {
  .confirm-dialog {
    width: calc(100% - 22px);
  }
  .confirm-dialog-shell {
    padding: 28px 21px 21px;
    border-radius: 21px;
  }
  .confirm-dialog-close {
    top: 13px;
    right: 13px;
  }
  .confirm-dialog-icon {
    width: 53px;
    height: 53px;
    border-radius: 16px;
  }
  .confirm-dialog-copy {
    padding-right: 0;
  }
  .confirm-dialog-copy h2 {
    padding-right: 30px;
    font-size: 24px;
  }
  .confirm-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .confirm-dialog-actions .button {
    width: 100%;
  }
  .confirm-dialog-actions .button[data-confirm-accept] {
    grid-row: 1;
  }
}

/* Resultado da distribuição — modal obrigatório com botão OK */
.message-dialog .confirm-dialog-copy > p:last-child {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.message-dialog-actions {
  justify-content: flex-end;
}
.message-dialog-actions .button {
  min-width: 120px;
}
.message-dialog.confirm-dialog--error .confirm-dialog-icon {
  background: #ffe2e5;
  color: #c93442;
}
.message-dialog.confirm-dialog--error .confirm-dialog-copy .eyebrow {
  color: var(--red);
}
@media (max-width: 580px) {
  .message-dialog-actions {
    display: block;
  }
  .message-dialog-actions .button {
    width: 100%;
  }
}

/* Interface compacta v13 — melhor aproveitamento da tela */
.report-generate {
  white-space: nowrap;
}

@media (min-width: 901px) {
  body {
    font-size: 14px;
  }
  .topbar {
    height: 64px;
    gap: 24px;
  }
  .brand {
    min-width: 172px;
    gap: 10px;
  }
  .brand img {
    width: 102px;
  }
  .brand span {
    padding-left: 10px;
    font-size: 13px;
  }
  .desktop-nav a {
    padding: 8px 12px;
  }
  .notification {
    width: 39px;
    height: 39px;
  }
  .avatar {
    width: 36px;
    height: 36px;
  }
  .page-shell {
    padding-top: 22px;
    padding-bottom: 62px;
  }

  .button {
    min-height: 39px;
    padding: 8px 14px;
    border-radius: 10px;
  }
  .hero-panel {
    min-height: 148px;
    padding: 27px 34px;
  }
  .hero-panel.compact {
    min-height: 136px;
  }
  .hero-panel h1 {
    font-size: clamp(27px, 3vw, 39px);
  }
  .hero-panel p:not(.eyebrow) {
    margin-top: 7px;
    font-size: 14px;
  }
  .eyebrow {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .stats-grid {
    gap: 12px;
    margin: 14px 0;
  }
  .stat-card {
    min-height: 82px;
    padding: 15px 17px;
    gap: 13px;
    border-radius: 15px;
  }
  .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .stat-icon svg {
    width: 18px;
    height: 18px;
  }
  .stat-card strong {
    font-size: 23px;
  }
  .stat-card span:not(.stat-icon) {
    margin-top: 4px;
    font-size: 12px;
  }

  .ticket-workspace {
    border-radius: 18px;
  }
  .workspace-head {
    padding: 18px 22px 12px;
  }
  .workspace-head h2 {
    font-size: 23px;
  }
  .filters {
    padding: 0 22px 16px;
    gap: 8px;
  }
  .filters select,
  .filters input,
  .report-filters input,
  .report-filters select {
    min-height: 39px;
    padding: 8px 10px;
    border-radius: 9px;
  }
  .search-box svg {
    left: 11px;
    top: 10px;
    width: 18px;
    height: 18px;
  }
  .search-box input {
    padding-left: 37px;
  }
  .ticket-row {
    min-height: 65px;
    padding: 8px 20px;
  }
  .ticket-header {
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .ticket-main strong {
    font-size: 14px;
  }
  .ticket-main small {
    margin-top: 3px;
    font-size: 11px;
  }
  .priority,
  .ticket-state,
  .internal-status {
    padding: 5px 8px;
    font-size: 10px;
  }
  .pagination {
    padding: 14px;
  }

  .detail-topline {
    min-height: 42px;
    margin-bottom: 10px;
  }
  .ticket-hero {
    padding: 22px 27px;
  }
  .ticket-number {
    width: 60px;
    height: 60px;
    border-radius: 17px;
    font-size: 16px;
  }
  .ticket-hero-main {
    gap: 18px;
  }
  .ticket-hero h1 {
    font-size: clamp(22px, 2.5vw, 32px);
  }
  .ticket-meta {
    margin-top: 6px;
  }
  .detail-grid {
    margin-top: 13px;
    gap: 13px;
  }
  .conversation-card {
    padding: 5px 21px 20px;
  }
  .message {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 0;
  }
  .message-avatar {
    width: 37px;
    height: 37px;
    border-radius: 11px;
  }
  .message-body p {
    margin-top: 7px;
  }
  .reply-box {
    margin-top: 17px;
    padding: 15px;
  }
  .reply-box textarea {
    min-height: 105px;
    padding: 11px;
  }
  .ticket-sidebar {
    gap: 10px;
  }
  .side-card {
    padding: 16px;
  }
  .side-row {
    padding: 9px 0;
  }

  .form-hero {
    padding: 16px 0 22px;
  }
  .form-hero h1 {
    font-size: clamp(30px, 4vw, 45px);
  }
  .form-hero p:not(.eyebrow) {
    font-size: 15px;
  }
  .main-form {
    gap: 10px;
  }
  .form-section {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 15px;
    padding: 20px;
  }
  .section-number {
    width: 39px;
    height: 39px;
    border-radius: 12px;
  }
  .section-content h2 {
    margin-bottom: 13px;
    font-size: 19px;
  }
  .form-grid {
    gap: 12px;
  }
  .form-grid input,
  .form-grid textarea,
  .form-grid select,
  .main-form input,
  .main-form textarea,
  .main-form select,
  .simple-card input {
    min-height: 41px;
    padding: 9px 11px;
  }
  .form-grid textarea,
  .main-form textarea {
    min-height: 105px;
  }
  .upload-zone {
    min-height: 112px;
    padding: 18px;
  }

  .report-filters {
    margin: 13px 0;
    padding: 13px;
    gap: 8px;
    border-radius: 14px;
  }
  .report-stats {
    margin-top: 0;
  }
  .report-table-wrap {
    border-radius: 14px;
  }
  .report-table th,
  .report-table td {
    padding: 9px 11px;
  }
  .report-table td {
    font-size: 12px;
  }
  .report-table th {
    font-size: 10px;
  }
  .app-footer {
    min-height: 52px;
    padding-bottom: 13px;
  }
}

@media (max-width: 900px) {
  .hero-panel {
    min-height: 145px;
    padding: 21px;
    gap: 16px;
  }
  .hero-panel.compact {
    min-height: 132px;
  }
  .hero-panel h1 {
    font-size: clamp(27px, 8vw, 38px);
  }
  .hero-panel p:not(.eyebrow) {
    font-size: 14px;
  }
  .stats-grid {
    margin: 12px 0;
  }
  .stat-card {
    min-height: 78px;
    padding: 12px;
  }
  .stat-card strong {
    font-size: 22px;
  }
  .stat-icon {
    width: 37px;
    height: 37px;
  }
  .workspace-head {
    padding: 16px 14px 11px;
  }
  .workspace-head h2 {
    font-size: 22px;
  }
  .ticket-row {
    min-height: 94px;
    padding: 13px 12px;
  }
  .report-filters {
    margin: 12px 0;
    padding: 13px;
  }
  .report-generate {
    width: 100%;
  }
}

@media (max-width: 580px) {
  .hero-panel {
    min-height: 132px;
  }
  .stats-grid {
    gap: 8px;
  }
  .stat-card {
    min-height: 72px;
  }
  .stat-card span:not(.stat-icon) {
    margin-top: 3px;
    font-size: 11px;
  }
  .ticket-row {
    min-height: 88px;
  }
}

/* Novo ticket compacto v15 — menor rolagem e melhor uso da tela */
.new-ticket-page {
  max-width: 1260px;
}
.new-ticket-page .detail-topline {
  min-height: 34px;
  margin-bottom: 2px;
}
.new-ticket-hero {
  max-width: none;
  padding: 7px 0 14px;
}
.new-ticket-hero .eyebrow {
  margin-bottom: 3px;
}
.new-ticket-hero h1 {
  font-size: clamp(29px, 3.4vw, 40px);
  line-height: 1.06;
}
.new-ticket-hero p:not(.eyebrow) {
  margin: 7px 0 0;
  font-size: 14px;
}
.new-ticket-form {
  gap: 9px;
}
.new-ticket-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.new-ticket-page .form-section {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-radius: 15px;
}
.new-ticket-page .section-number {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
}
.new-ticket-page .section-content h2 {
  margin: 0 0 9px;
  font-size: 17px;
}
.new-ticket-page .form-grid {
  gap: 9px;
}
.new-ticket-page .form-grid label,
.new-ticket-page .main-form label {
  gap: 4px;
  font-size: 12px;
}
.new-ticket-page .form-grid input,
.new-ticket-page .form-grid select,
.new-ticket-page .main-form input,
.new-ticket-page .main-form select {
  min-height: 37px;
  padding: 7px 10px;
  border-radius: 9px;
}
.details-form-section {
  padding-bottom: 15px !important;
}
.ticket-details-grid {
  grid-template-columns: minmax(0, 2.15fr) minmax(245px, 0.85fr);
  align-items: stretch;
}
.ticket-details-grid .full-span {
  grid-column: 1/-1;
}
.ticket-details-grid .message-field textarea {
  height: 104px;
  min-height: 104px;
  padding: 10px 11px;
  border-radius: 9px;
}
.compact-upload-zone {
  min-height: 104px;
  height: 100%;
  padding: 10px 12px;
  border-width: 1px;
  border-radius: 11px;
  gap: 1px !important;
}
.compact-upload-zone svg {
  width: 23px;
  height: 23px;
}
.compact-upload-zone strong {
  line-height: 1.25;
}
.compact-upload-zone span,
.compact-upload-zone small {
  font-size: 11px;
  line-height: 1.25;
}
.new-ticket-page .form-submit {
  padding: 2px 0 0;
}

@media (max-width: 1100px) and (min-width: 901px) {
  .new-ticket-top-grid {
    grid-template-columns: 1fr;
  }
  .new-ticket-page .compact-form-section .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .new-ticket-page {
    width: min(calc(100% - 20px), var(--max));
  }
  .new-ticket-page .detail-topline {
    min-height: 30px;
    margin-bottom: 0;
  }
  .new-ticket-hero {
    padding: 5px 0 12px;
  }
  .new-ticket-hero h1 {
    font-size: clamp(28px, 8vw, 36px);
  }
  .new-ticket-hero p:not(.eyebrow) {
    font-size: 13px;
    line-height: 1.4;
  }
  .new-ticket-top-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .new-ticket-page .form-section {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
  }
  .new-ticket-page .section-number {
    width: 32px;
    height: 32px;
  }
  .new-ticket-page .section-content h2 {
    margin-bottom: 8px;
    font-size: 16px;
  }
  .new-ticket-page .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ticket-details-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(210px, 0.8fr);
  }
  .ticket-details-grid .message-field textarea,
  .compact-upload-zone {
    min-height: 96px;
    height: 96px;
  }
}

@media (max-width: 680px) {
  .new-ticket-page .form-section {
    grid-template-columns: 1fr;
  }
  .new-ticket-page .section-number {
    margin-bottom: -1px;
  }
  .new-ticket-page .form-grid.two,
  .ticket-details-grid {
    grid-template-columns: 1fr;
  }
  .ticket-details-grid .full-span {
    grid-column: auto;
  }
  .ticket-details-grid .message-field textarea {
    height: 112px;
    min-height: 112px;
  }
  .compact-upload-zone {
    min-height: 78px;
    height: auto;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 9px !important;
    text-align: left;
    place-items: initial;
    align-content: center;
  }
  .compact-upload-zone svg {
    grid-row: 1/5;
    align-self: center;
  }
  .compact-upload-zone strong,
  .compact-upload-zone span,
  .compact-upload-zone small {
    grid-column: 2;
  }
  .new-ticket-page .form-submit {
    padding-top: 1px;
  }
}

/* Dashboard v16 — ordenação múltipla, filtros organizados e lista compacta */
.workspace-head {
  align-items: center;
  gap: 16px;
}
.workspace-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}

.sort-picker {
  position: relative;
  z-index: 35;
}
.sort-picker-trigger {
  width: 286px;
  min-height: 38px;
  padding: 7px 38px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafb;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.sort-picker-trigger:hover {
  border-color: #b7c9ce;
  background: #fff;
}
.sort-picker-trigger:focus-visible {
  outline: none;
  border-color: var(--cyan-dark);
  box-shadow: 0 0 0 3px rgba(22, 211, 197, 0.12);
}
.sort-picker-trigger > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.sort-picker-trigger > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.sort-picker-trigger > i,
.sort-picker-trigger > i::before {
  position: absolute;
  display: block;
}
.sort-picker-trigger > i {
  right: 13px;
  top: 50%;
  width: 9px;
  height: 6px;
  transform: translateY(-50%);
}
.sort-picker-trigger > i::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid #657a82;
  border-bottom: 2px solid #657a82;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.16s ease;
}
.sort-picker.open .sort-picker-trigger > i::before {
  transform: rotate(225deg) translate(-2px, -2px);
}

.sort-picker-panel {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: min(268px, calc(100vw - 24px));
  padding: 7px;
  border: 1px solid #d7e2e5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(7, 27, 36, 0.2);
  display: none;
  z-index: 80;
}
.sort-picker.open .sort-picker-panel {
  display: block;
}
.sort-picker-head {
  padding: 6px 7px 9px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf2f3;
  margin-bottom: 4px;
}
.sort-picker-head strong {
  display: block;
  font-size: 13px;
}
.sort-picker-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.sort-picker-head button {
  border: 0;
  background: transparent;
  color: var(--cyan-dark);
  padding: 2px 0;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.sort-picker-option {
  min-height: 32px;
  padding: 4px 6px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 27px;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.sort-picker-option:hover {
  background: #f2f8f8;
}
.sort-picker-option.selected {
  background: #e9f9f7;
}
.sort-picker-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.sort-check {
  width: 16px;
  height: 16px;
  border: 1.5px solid #9bb0b7;
  border-radius: 5px;
  background: #fff;
  position: relative;
}
.sort-picker-option.selected .sort-check {
  border-color: var(--cyan-dark);
  background: var(--cyan);
}
.sort-picker-option.selected .sort-check::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border-right: 2px solid #08252b;
  border-bottom: 2px solid #08252b;
  transform: rotate(45deg);
}
.sort-label {
  font-size: 11px;
  font-weight: 720;
}
.sort-order {
  min-width: 25px;
  min-height: 21px;
  padding: 2px 4px;
  border-radius: 999px;
  background: #0c2630;
  color: var(--yellow);
  display: none;
  place-items: center;
  font-size: 10px;
}
.sort-picker-option.selected .sort-order {
  display: grid;
}

.sort-picker-actions {
  margin-top: 5px;
  padding: 7px 6px 1px;
  border-top: 1px solid #edf2f3;
  display: flex;
  justify-content: flex-end;
}
.sort-picker-actions button {
  border: 0;
  background: transparent;
  color: var(--cyan-dark);
  padding: 2px 0;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.sort-picker-actions button:hover,
.sort-picker-head button:hover {
  color: #007e78;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ticket-filters select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 35px !important;
  background-color: #f8fafb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235d737b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-filters {
  row-gap: 6px;
  column-gap: 8px;
}
.ticket-filters.staff-filters {
  grid-template-columns: minmax(250px, 1.45fr) minmax(150px, 0.72fr) minmax(
      170px,
      0.82fr
    ) minmax(175px, 0.84fr) minmax(195px, 0.92fr) auto;
  grid-template-areas:
    "search search status priority situation apply"
    "scope client client client client clear";
}
.ticket-filters.client-filters {
  grid-template-columns: minmax(250px, 1.45fr) minmax(150px, 0.72fr) minmax(
      170px,
      0.82fr
    ) minmax(175px, 0.84fr) auto;
  grid-template-areas:
    "search search status priority situation apply"
    "clear clear clear clear clear clear";
}
.filter-search {
  grid-area: search;
}
.filter-status {
  grid-area: status;
}
.filter-priority {
  grid-area: priority;
}
.filter-situation {
  grid-area: situation;
}
.filter-scope {
  grid-area: scope;
}
.filter-client {
  grid-area: client;
}
.filter-apply {
  grid-area: apply;
  align-self: stretch;
}
.filter-clear {
  grid-area: clear;
  justify-self: start;
  min-height: 31px;
  padding: 4px 10px;
}

.ticket-table {
  border-top: 0;
  background: #fff;
}
.ticket-row {
  grid-template-columns: 68px minmax(290px, 2.7fr) 102px 160px 94px 82px 24px;
  gap: 9px;
  min-height: 48px;
  padding: 5px 20px;
  border-bottom: 0;
}
.ticket-header {
  min-height: 29px;
  padding-top: 4px;
  padding-bottom: 4px;
  background: #edf3f4;
  font-size: 9px;
}
.ticket-table > a.ticket-row:nth-child(odd) {
  background: #f5f8f9;
}
.ticket-table > a.ticket-row.waiting {
  background: #fff7d8 !important;
}
.ticket-row:not(.ticket-header):hover {
  background: #e8f7f5 !important;
}
.ticket-id {
  font-size: 12px;
}
.ticket-main strong {
  font-size: 13px;
  line-height: 1.15;
}
.ticket-main small {
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.2;
}
.priority,
.ticket-state,
.internal-status {
  padding: 4px 7px;
  font-size: 9px;
  line-height: 1.1;
}
.due {
  font-size: 11px;
}
.ticket-row .go svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 1320px) and (min-width: 901px) {
  .ticket-filters.staff-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "search search status"
      "priority situation scope"
      "client client apply"
      "clear clear clear";
  }
  .ticket-filters.client-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "search search status"
      "priority situation apply"
      "clear clear clear";
  }
  .ticket-row {
    grid-template-columns: 60px minmax(235px, 2.4fr) 92px 145px 78px 23px;
  }
  .ticket-row > :nth-child(5),
  .ticket-header > :nth-child(5) {
    display: none;
  }
}

@media (max-width: 900px) {
  .workspace-head {
    align-items: flex-start;
  }
  .workspace-tools {
    min-width: 0;
  }
  .sort-picker-trigger {
    width: 220px;
  }
  .ticket-filters.staff-filters,
  .ticket-filters.client-filters {
    grid-template-columns: 1fr;
    grid-template-areas:
      "search"
      "status"
      "priority"
      "situation"
      "scope"
      "client"
      "apply"
      "clear";
  }
  .ticket-filters.client-filters {
    grid-template-areas:
      "search"
      "status"
      "priority"
      "situation"
      "apply"
      "clear";
  }
  .filter-apply {
    width: 100%;
  }
  .ticket-row {
    min-height: 76px;
    padding: 9px 11px;
    border-bottom: 0;
  }
  .ticket-main strong {
    font-size: 13px;
  }
  .ticket-main small {
    margin-top: 2px;
  }
}

@media (max-width: 650px) {
  .workspace-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .workspace-tools {
    width: 100%;
  }
  .sort-picker {
    flex: 1;
    min-width: 0;
  }
  .sort-picker-trigger {
    width: 100%;
  }
  .sort-picker-panel {
    left: 0;
    right: auto;
  }
  .filter-toggle {
    flex: 0 0 auto;
  }
}

@media (max-width: 580px) {
  .ticket-row {
    min-height: 72px;
    padding: 8px 10px;
  }
  .sort-picker-panel {
    width: min(330px, calc(100vw - 28px));
  }
}

/* Dashboard v18 — filtros automáticos e atualização sem fechar a ordenação */
.ticket-workspace [data-ticket-results] {
  transition: opacity 0.14s ease;
}
.ticket-workspace.is-filtering [data-ticket-results] {
  opacity: 0.56;
  pointer-events: none;
}
.ticket-workspace.is-filtering [data-ticket-total] {
  opacity: 0.62;
}

/* v27 — retorno imediato durante gravação e envio de e-mails */
.processing-dialog {
  width: min(470px, calc(100% - 28px));
  max-width: 470px;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.processing-dialog::backdrop {
  background: rgba(3, 15, 21, 0.8);
  backdrop-filter: blur(7px);
}
.processing-dialog-shell {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 31px;
  border: 1px solid rgba(9, 32, 42, 0.08);
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.38);
}
.processing-spinner {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background: #d9f8f5;
}
.processing-spinner span {
  width: 31px;
  height: 31px;
  border: 4px solid rgba(7, 142, 134, 0.2);
  border-top-color: #078e86;
  border-radius: 50%;
  animation: softart-processing-spin 0.75s linear infinite;
}
.processing-dialog-copy .eyebrow {
  margin: 0 0 6px;
  color: #078e86;
}
.processing-dialog-copy h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.processing-dialog-copy p:not(.eyebrow) {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.processing-dialog-copy small {
  display: block;
  margin-top: 9px;
  color: #8a9ba2;
  font-size: 12px;
}
form[aria-busy="true"] {
  pointer-events: none;
}
@keyframes softart-processing-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 560px) {
  .processing-dialog-shell {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 25px 21px;
  }
  .processing-spinner {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }
  .processing-spinner span {
    width: 27px;
    height: 27px;
  }
  .processing-dialog-copy h2 {
    font-size: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .processing-spinner span {
    animation-duration: 1.6s;
  }
}

/* v37 — CNPJ clicável no cabeçalho do ticket */
.client-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.client-cnpj-copy {
  appearance: none;
  border: 0;
  padding: 1px 2px;
  margin: 0;
  border-radius: 5px;
  background: transparent;
  color: #c7d9df;
  font: inherit;
  font-size: 0.94em;
  font-weight: 750;
  letter-spacing: 0.035em;
  line-height: 1.25;
  cursor: pointer;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}
.client-cnpj-copy:hover,
.client-cnpj-copy:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}
.client-cnpj-copy:active {
  transform: translateY(1px);
}
.client-cnpj-copy.copied {
  color: #8df3ce;
}
.client-cnpj-copy.copy-error {
  color: #ffb8be;
}

/* v38 — acesso direto e seguro à Área do Cliente */
.client-area-link {
  appearance: none;
  border: 0;
  margin: 0 0 0 2px;
  padding: 1px 3px;
  border-radius: 5px;
  background: transparent;
  color: #8df3ce;
  font: inherit;
  font-size: 0.92em;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1.25;
  cursor: pointer;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}
.client-area-link::before {
  content: "·";
  display: inline-block;
  margin-right: 7px;
  color: rgba(255, 255, 255, 0.48);
}
.client-area-link:hover,
.client-area-link:focus-visible {
  color: #fff;
  background: rgba(141, 243, 206, 0.12);
  outline: none;
}
.client-area-link:active {
  transform: translateY(1px);
}
.visually-hidden-form {
  display: none;
}
@media (max-width: 640px) {
  .client-area-link {
    margin-left: 0;
  }
}

/* v52 - melhora de legibilidade da logo no topo */
.topbar {
  min-height: 82px;
  height: 82px;
}
.brand {
  gap: 14px;
  min-width: 250px;
}
.brand img {
  width: 175px;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.24));
}
.brand span {
  padding-left: 14px;
  font-size: 14px;
}

@media (max-width: 960px) {
  .topbar {
    height: 76px;
  }
  .brand {
    min-width: 0;
  }
  .brand img {
    width: 155px;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 68px;
  }
  .brand img {
    width: 120px;
  }
}

/* Comunicação opcional com o cliente nas respostas e atualizações do ticket. */
.client-email-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #dce7ea;
  border-radius: 12px;
  background: #ffffff;
  color: #41565e;
  cursor: pointer;
}
.client-email-choice input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--cyan-dark);
}
.client-email-choice span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.client-email-choice strong {
  font-size: 13px;
  line-height: 1.35;
}
.client-email-choice small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
  line-height: 1.4;
}

.client-admin-choice {
  border-style: dashed;
  background: #fbfcfd;
}
.client-admin-alias-note {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 2px 7px;
  border: 1px solid #d8e4e8;
  border-radius: 999px;
  background: #f3f7f8;
  color: #607780;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  vertical-align: middle;
}

/* Confirmação persistente do envio de e-mail ao cliente. */
.client-mail-status {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 8px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7fafb;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.client-mail-status svg {
  width: 15px;
  height: 15px;
  min-width: 15px;
  margin-top: 1px;
}
.client-mail-status.enviado {
  border-color: rgba(41, 199, 129, 0.35);
  background: rgba(41, 199, 129, 0.08);
  color: #16875a;
}
.client-mail-status.parcial {
  border-color: rgba(244, 156, 72, 0.4);
  background: rgba(244, 156, 72, 0.09);
  color: #a75c16;
}
.client-mail-status.falhou {
  border-color: rgba(239, 89, 101, 0.35);
  background: rgba(239, 89, 101, 0.08);
  color: #b73541;
}
.client-mail-status.nao_solicitado {
  color: #6f8088;
}
.ticket-mail-last {
  margin-top: 5px;
  font-size: 12px;
}
.ticket-mail-last.enviado {
  color: #8ce7ce;
}
.ticket-mail-last.parcial {
  color: #ffd29f;
}
.ticket-mail-last.falhou {
  color: #ffabb2;
}


/* v54 — cores configuráveis e respiro interno apenas no histórico do ticket */
.ticket-detail-page .conversation-card {
  padding: 18px 28px 30px;
}
.ticket-detail-page .message {
  padding: 20px 18px;
}
@media (max-width: 580px) {
  .ticket-detail-page .conversation-card {
    padding: 12px 14px 18px;
  }
  .ticket-detail-page .message {
    padding: 15px 12px;
  }
}
