.card {
  border: 1px solid var(--line);
  border-left: 4px solid #9db4ce;
  border-radius: 12px;
  padding: 0.62rem;
  background: #fbfdff;
  display: grid;
  gap: 0.48rem;
  box-shadow:
    0 8px 18px rgba(21, 47, 74, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.card.pending-gestao {
  border-left-color: var(--blue);
  background: #fbfdff;
}

.card.in-support {
  border-left-color: var(--amber);
  background: #fcfefe;
}

.card.in-treatment {
  border-left-color: #d89b2e;
  background: #fffefb;
}

.card.resolved-urgent {
  border-left-color: var(--red);
  background: #fffdfd;
}

.dashboard-ticket-card.sla-attention {
  box-shadow: inset 0 0 0 1px #e0bc84;
}

.dashboard-ticket-card.sla-critical {
  box-shadow: inset 0 0 0 1px #d9959b;
}

.card.closed {
  border-left-color: #5da57f;
  background: #fbfefc;
  opacity: 0.9;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: center;
  padding-bottom: 0;
  border-bottom: 0;
}

.ticket-pattern {
  gap: 0.32rem;
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.ticket-detail-grid.compact {
  margin-top: 0.1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.34rem;
}

.ticket-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.48rem;
}

.ticket-inline-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.ticket-detail-box {
  border: 1px solid #c6d5e6;
  border-radius: 8px;
  background: #f3f7fc;
  padding: 0.24rem 0.38rem;
  display: grid;
  gap: 0.02rem;
  min-width: 0;
}

.ticket-detail-box strong {
  display: block;
  font-size: 0.84rem;
  color: #213c58;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  order: 2;
}

.ticket-detail-box small {
  display: block;
  font-size: 0.64rem;
  color: #48657f;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  order: 1;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.ticket-identity {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.26rem 0.42rem;
  line-height: 1.2;
}

.ticket-identity-clean {
  margin: 0;
  display: grid;
  gap: 0.16rem;
  line-height: 1.25;
}

.ticket-identity-clean strong {
  color: #163f63;
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.15;
}

.ticket-identity-clean span {
  color: #4a6783;
  font-size: 0.82rem;
  font-weight: 700;
}

.ticket-identity strong {
  color: #163f63;
  font-size: 0.96rem;
  font-weight: 800;
}

.ticket-identity-prominent {
  border: 1px solid #9ec0e0;
  border-radius: 10px;
  background: #e9f4ff;
  padding: 0.3rem 0.46rem;
  gap: 0.3rem 0.45rem;
}

.ticket-identity-prominent.is-compact {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.ticket-client-label {
  display: inline-flex;
  align-items: center;
  border: 1px solid #b9d2ea;
  border-radius: 999px;
  background: #f4f9ff;
  color: #2d4e6f;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.1rem 0.42rem;
}

.ticket-identity-prominent strong {
  color: #0f3658;
  font-size: 1.02rem;
  font-weight: 900;
}

.ticket-company {
  border: 1px solid #cfdeed;
  border-radius: 999px;
  background: #f2f7fd;
  color: #2c4f71;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.12rem 0.48rem;
}

.ticket-company-label {
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-right: 0.2rem;
  color: #355a7d;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c4d2e4;
  border-radius: 999px;
  min-height: 30px;
  padding: 0.24rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.01em;
  background: #f4f8fd;
}

.badge.urgent {
  border-color: #cf8e73;
  background: #ffe8dc;
  color: #7d3318;
}

.badge.normal {
  border-color: #bad8c8;
  background: #e9f8ef;
  color: #166544;
}

.badge-stack {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meta {
  color: var(--muted);
  font-size: 0.74rem;
}

.support-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.55rem;
}

.support-meta-item strong {
  color: #1f3f5b;
}

.meta-note {
  margin: 0;
  border: 1px solid #d8e4f1;
  border-radius: 8px;
  background: #f8fbff;
  color: #294560;
  font-size: 0.76rem;
  line-height: 1.42;
  padding: 0.35rem 0.45rem;
}

.ticket-line {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--card) 90%, var(--bg));
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.35;
  padding: 0.3rem 0.42rem;
}

.ticket-line strong {
  color: var(--text);
}

.ticket-line-sep {
  color: var(--muted);
  margin: 0 0.2rem;
}

.ticket-line-note {
  color: var(--muted);
}

.ticket-line-summary {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-summary-line {
  margin: 0;
  border: 1px solid #d8e4f1;
  border-radius: 8px;
  background: #f8fbff;
  color: #294560;
  font-size: 0.76rem;
  line-height: 1.35;
  padding: 0.3rem 0.42rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-summary-line strong {
  color: #1f3f5b;
}

.dashboard-card-main .ticket-line {
  border: 0;
  background: transparent;
  font-size: 0.86rem;
  padding: 0;
  border-radius: 0;
  color: #2c4964;
  line-height: 1.3;
}

.dashboard-card-main .ticket-line strong {
  font-weight: 800;
  color: #173b5a;
}

/* Module contrast: subtle differentiation between Commercial / Support / Management */
.card.module-commercial {
  border-left-color: #83a9cf;
  background: #fbfdff;
}

.card.module-support {
  border-left-color: #9abb8a;
  background: #fcfefe;
}

.card.module-management {
  border-left-color: #b6a37f;
  background: #fffefb;
}

.card.module-commercial .card-title {
  color: #234a72;
}

.card.module-support .card-title {
  color: #2e5b3d;
}

.card.module-management .card-title {
  color: #5f4f30;
}

.management-note {
  border-color: #b8cae5;
  background: #edf4ff;
  box-shadow: inset 0 0 0 1px #d3e0f4;
}

.management-note strong {
  color: #214f88;
}

.management-assignee {
  margin: 0;
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.2rem 0.52rem;
  border-radius: 999px;
  border: 1px solid #b9d2e7;
  background: #eef6ff;
  color: #2a5478;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
}

.management-assignee-label {
  color: #3a678d;
}

.management-assignee strong {
  color: #184364;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.management-assignee.is-unassigned {
  border-color: #ccd8e6;
  background: #f4f7fb;
  color: #617487;
}

.management-assignee.is-unassigned .management-assignee-label,
.management-assignee.is-unassigned strong {
  color: #5a6e83;
}

.dashboard-card-main .management-assignee {
  width: 100%;
  max-width: none;
  border-radius: 8px;
  border-color: #d3dfec;
  background: #f7fbff;
  color: #2a4562;
  padding: 0.26rem 0.42rem;
  display: flex;
  align-items: baseline;
  gap: 0.16rem;
  flex-wrap: wrap;
  line-height: 1.35;
}

.dashboard-card-main .management-assignee-label,
.dashboard-card-main .management-assignee strong {
  color: #1f3f5b;
}

.dashboard-card-main .management-assignee.is-unassigned {
  border-color: #d3dfec;
  background: #f7fbff;
}

.dashboard-card-main .management-assignee.is-unassigned .management-assignee-label,
.dashboard-card-main .management-assignee.is-unassigned strong {
  color: #3e5d7a;
}

.support-management-note {
  font-size: 0.74rem;
  line-height: 1.35;
  padding: 0.28rem 0.4rem;
}

.summary {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #29435b;
}

.support-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0.5rem;
  align-items: center;
}

.support-card-main {
  display: grid;
  gap: 0.34rem;
}

.dashboard-ticket-card {
  gap: 0.36rem;
}

.dashboard-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0.5rem;
  align-items: center;
}

.dashboard-card-main {
  display: grid;
  gap: 0.33rem;
}

.dashboard-compact-meta {
  margin: 0;
  border: 1px solid #d3dfec;
  border-radius: 8px;
  background: #f7fbff;
  padding: 0.26rem 0.42rem;
  font-size: 0.74rem;
  color: #2a4562;
  font-weight: 700;
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.14rem 0.26rem;
}

.dashboard-compact-meta strong {
  color: #1f3f5b;
}

.dashboard-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.16rem;
}

.dashboard-meta-sep {
  color: #7a94af;
}

.dashboard-compact-meta .sep {
  color: #7a94af;
  margin: 0 0.18rem;
}

.dashboard-summary {
  font-size: 0.79rem;
  line-height: 1.38;
}

.ticket-queue-focus {
  margin: 0;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #b3cde7;
  border-radius: 999px;
  background: #eef6ff;
  color: #264b6b;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.3;
  padding: 0.24rem 0.58rem;
}

.ticket-queue-focus strong {
  color: #1c4364;
}

.dashboard-card-main .ticket-queue-focus {
  width: 100%;
  max-width: none;
  border-radius: 8px;
  border-color: #d3dfec;
  background: #f7fbff;
  color: #2a4562;
  padding: 0.26rem 0.42rem;
  line-height: 1.35;
}

.dashboard-card-main .ticket-queue-focus strong {
  color: #1f3f5b;
}

.actions {
  display: flex;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.support-card-actions {
  justify-content: flex-end;
  align-items: center;
  padding-top: 0;
  min-height: 100%;
}

.dashboard-card-actions {
  justify-content: flex-start;
  align-items: stretch;
  min-height: auto;
}

.action-right-card:not(.commercial-card) .dashboard-card-actions {
  position: absolute;
  top: 50%;
  right: 0.62rem;
  transform: translateY(-50%);
  width: 280px;
  min-height: auto;
  align-self: auto;
}

.action-right-card:not(.commercial-card) .action-right-stack {
  position: static;
  transform: none;
  width: 250px;
  display: grid;
  gap: 0.42rem;
}

.action-right-card:not(.commercial-card) {
  position: relative;
}

.action-right-card:not(.commercial-card) .card-head,
.action-right-card:not(.commercial-card) .dashboard-card-main {
  padding-right: 292px;
}

.action-right-card:not(.commercial-card) .dashboard-card-layout {
  display: block;
}

.btn {
  border: 1px solid #c4d2e4;
  border-radius: 7px;
  background: #fff;
  color: #2a4b67;
  padding: 0.26rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn.primary {
  border-color: #84a4ce;
  background: #dcecff;
  color: #1e4f8b;
}

.btn.btn-clean {
  border-color: #b8cbe0;
  background: #f3f8ff;
  color: #2d547d;
}

.btn.urgent {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.btn.analyze {
  border-color: #9ecab4;
  background: #d8f2e4;
  color: #1a6d4b;
}

.support-analyze-btn,
.dashboard-analyze-btn {
  min-width: 0;
  width: 100%;
  max-width: 250px;
  min-height: 44px;
  border-color: #67b18d;
  background: #c7ecd9;
  color: #145f41;
  font-size: 0.92rem;
  font-weight: 800;
}

.card-status-btn {
  width: 100%;
  max-width: none;
  min-height: 44px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: default;
}

.card-status-btn.is-pending {
  border-color: #c98f8f !important;
  background: #edd1d1 !important;
  color: #6f2f2f !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.card-status-btn.is-in-progress {
  border-color: #8eaecf !important;
  background: #d6e4f3 !important;
  color: #2c4f73 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.card-status-btn.is-return {
  border-color: #d3bf93;
  background: #fbf3e3;
  color: #6f5426;
}

.card-status-btn.is-closed {
  border-color: #95c1ad !important;
  background: #d8eee4 !important;
  color: #2e5b46 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.card-status-btn.is-urgent {
  border-color: #d8a6a6;
  background: #fdeaea;
  color: #7b2b2b;
}

.dashboard-ticket-card.commercial-card .dashboard-card-layout {
  display: block;
}

.dashboard-ticket-card.commercial-card {
  position: relative;
}

.dashboard-ticket-card.commercial-card .dashboard-card-main {
  padding-right: 292px;
}

.dashboard-ticket-card.commercial-card .dashboard-card-actions {
  position: absolute;
  top: 50%;
  right: 0.62rem;
  transform: translateY(-50%);
  width: 280px;
  min-height: auto;
  align-self: auto;
  margin-top: 0;
}

.dashboard-ticket-card.commercial-card .action-right-stack {
  position: static;
  transform: none;
  width: 250px;
  display: grid;
  gap: 0.42rem;
}

.dashboard-ticket-card.commercial-card .dashboard-analyze-btn {
  width: 100%;
  max-width: none;
  min-height: 44px;
  height: auto;
}

@media (max-width: 1100px) {
  .dashboard-ticket-card.commercial-card .dashboard-card-main {
    padding-right: 252px;
  }

  .dashboard-ticket-card.commercial-card .dashboard-card-actions {
    width: 240px;
  }

  .dashboard-ticket-card.commercial-card .action-right-stack {
    width: 220px;
  }
}

@media (max-width: 760px) {
  .dashboard-ticket-card.commercial-card .dashboard-card-layout {
    display: grid;
  }

  .dashboard-ticket-card.commercial-card .dashboard-card-main {
    padding-right: 0;
  }

  .action-right-card:not(.commercial-card) .dashboard-card-actions {
    width: 100%;
    position: static;
    min-height: auto;
    align-self: auto;
    transform: none;
    top: auto;
    right: auto;
  }

  .action-right-card:not(.commercial-card) .action-right-stack {
    position: static;
    transform: none;
    width: 100%;
  }

  .action-right-card:not(.commercial-card) .card-head,
  .action-right-card:not(.commercial-card) .dashboard-card-main {
    padding-right: 0;
  }

  .action-right-card:not(.commercial-card) .dashboard-card-layout {
    display: grid;
  }

  .dashboard-ticket-card.commercial-card .dashboard-card-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-ticket-card.commercial-card .dashboard-card-actions {
    width: 100%;
    position: static;
    min-height: auto;
    transform: none;
    top: auto;
    right: auto;
  }

  .dashboard-ticket-card.commercial-card .action-right-stack {
    width: 100%;
  }

  .dashboard-ticket-card.commercial-card .dashboard-analyze-btn {
    width: 100%;
    max-width: 260px;
    min-height: 44px;
    height: auto;
  }
}

.support-priority-note {
  font-size: 0.74rem;
  line-height: 1.35;
  padding: 0.28rem 0.4rem;
}

.support-priority-note.urgent {
  border-color: var(--priority-urgent-line);
  background: var(--priority-urgent-bg);
  color: var(--priority-urgent-text);
}

.support-priority-note.normal {
  border-color: var(--priority-normal-line);
  background: var(--priority-normal-bg);
  color: var(--priority-normal-text);
}

.btn.contact {
  border-color: #8ec9af;
  background: #e2f5ea;
  color: #1e6c4a;
}

.btn.emphasis {
  min-width: 280px;
  padding-left: 0.72rem;
  padding-right: 0.72rem;
}

.ticket-focus {
  outline: 2px solid #6cb291;
  box-shadow: 0 0 0 3px rgba(108, 178, 145, 0.22);
}

.empty {
  border: 1px dashed #c9d5e3;
  border-radius: 8px;
  padding: 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
}
