/* ============================================================
   RAIZ HOST — Central de Suporte v2
   Componentes da aplicação. Depende de tokens.css
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background: var(--color-bg-base);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--color-brand); text-decoration: none; }
a:hover { color: var(--color-brand-dark); }
input, textarea, select, button { font-family: inherit; }
textarea::placeholder, input::placeholder { color: var(--color-text-muted); }
img { max-width: 100%; }
.hidden { display: none !important; }
.ic { display: inline-block; vertical-align: middle; flex: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 2px rgba(58,170,53,0.25); } 50% { box-shadow: 0 0 0 5px rgba(58,170,53,0.08); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes recPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,68,68,0.5); } 50% { box-shadow: 0 0 0 10px rgba(255,68,68,0); } }
@keyframes rootDraw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes rootPulse { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -220; } }
@keyframes breathe { 0%,100% { filter: drop-shadow(0 0 0 rgba(58,170,53,0)); } 50% { filter: drop-shadow(0 0 18px rgba(58,170,53,0.45)); } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.screen { animation: fadeUp .28s ease; }

/* ------------------------------------------------------------
   BOOT / CARREGAMENTO
------------------------------------------------------------ */
#initialLoading {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--space-10) var(--space-6); background: var(--color-bg-base); overflow: hidden;
}
.boot-inner { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 360px; }

/* cacto que cresce + raízes que se desenham */
.boot-stage { position: relative; width: 200px; height: 250px; }
.boot-cactus { position: absolute; left: 30px; top: 0; width: 140px; height: 140px; object-fit: contain; }
.boot-cactus.is-ghost { opacity: .1; filter: grayscale(1); }
.boot-cactus.is-grow { clip-path: inset(100% 0 0 0); transition: clip-path 800ms cubic-bezier(0.34,1.56,0.64,1); }
.boot-cactus.is-grow.done { animation: breathe 1.6s ease-in-out infinite; }
.boot-ground {
  position: absolute; left: 0; right: 0; top: 138px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
}
.boot-roots { position: absolute; left: 0; top: 139px; overflow: visible; }
.boot-roots .root-bg { stroke: rgba(255,255,255,0.06); }
.boot-roots .root-line {
  stroke: var(--color-brand); stroke-dasharray: 220; stroke-dashoffset: 220;
  --len: 220; animation: rootDraw 1.6s cubic-bezier(.2,.7,.2,1) forwards;
}
.boot-roots .root-pulse {
  stroke: #7CE078; stroke-width: 2; stroke-dasharray: 6 214; opacity: .9;
  animation: rootPulse 1.8s linear infinite;
}

#initialLoading .boot-logo { height: 26px; width: auto; margin-top: 28px; }

.boot-progress { width: 100%; margin-top: 28px; }
.boot-track { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.08); overflow: hidden; }
.boot-fill {
  height: 100%; width: 0; border-radius: 2px; background: var(--color-brand);
  transition: width 700ms cubic-bezier(0.34,1.56,0.64,1);
}
.boot-meta { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-3); font-size: var(--text-caption); }
.boot-meta .label { color: var(--color-text-secondary); }
.boot-meta .pct { font-family: var(--font-mono); color: var(--color-brand); font-weight: var(--weight-semibold); }

.boot-steps {
  width: 100%; margin-top: var(--space-5); display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-mono); font-size: var(--text-caption);
}
.boot-step { display: flex; align-items: center; gap: 10px; color: var(--color-text-muted); transition: color var(--transition-base); }
.boot-step .mark { width: 14px; display: inline-flex; justify-content: center; }
.boot-step.is-current { color: var(--color-text-primary); }
.boot-step.is-current .mark { animation: blink 1s ease-in-out infinite; }
.boot-step.is-done { color: var(--color-brand); }

/* estado de erro */
.boot-error { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 420px; animation: fadeUp .3s ease; }
.boot-error__art { position: relative; width: 120px; height: 120px; margin-bottom: var(--space-6); }
.boot-error__art img { width: 100%; height: 100%; object-fit: contain; opacity: .18; filter: grayscale(1); }
.boot-error__badge {
  position: absolute; right: 6px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--color-bg-base); border: 2px solid var(--color-error); color: var(--color-error);
  display: flex; align-items: center; justify-content: center; font-weight: var(--weight-black); font-size: var(--text-h4);
}
.boot-error__eyebrow {
  font-size: var(--text-label); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-widest);
  text-transform: uppercase; color: var(--color-error); margin-bottom: var(--space-2);
}
.boot-error__title {
  font-family: var(--font-display); font-size: 34px; font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight); line-height: 1.05; text-transform: uppercase;
}
.boot-error__msg { color: var(--color-text-secondary); font-size: 14px; line-height: 1.65; margin: var(--space-3) 0 var(--space-5); text-wrap: pretty; }
.boot-error__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.boot-error__code {
  margin-top: 22px; font-family: var(--font-mono); font-size: var(--text-label);
  letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--color-text-muted);
  border: var(--border-base) solid var(--color-border); padding: 4px var(--space-3); border-radius: var(--radius-pill);
}

.spinner {
  width: 38px; height: 38px; border: 3px solid rgba(255,255,255,0.10);
  border-top-color: var(--color-brand); border-radius: 50%; animation: spin .8s linear infinite;
}

/* ------------------------------------------------------------
   LAYOUT
------------------------------------------------------------ */
.app-shell { min-height: 100vh; background: var(--color-bg-base); color: var(--color-text-primary); }
.wrap { max-width: var(--container-app); margin: 0 auto; padding: 0 var(--space-6); }
.app-main { max-width: var(--container-app); margin: 0 auto; padding: var(--space-8) var(--space-6) 72px; }
.cols { display: flex; gap: var(--space-6); align-items: flex-start; flex-wrap: wrap; }
.col-main { flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-6); }
.col-side { flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; gap: var(--space-4); }
.col-side.is-sticky { position: sticky; top: 92px; }

/* ------------------------------------------------------------
   HEADER
------------------------------------------------------------ */
.app-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(10,10,10,0.94); backdrop-filter: saturate(140%) blur(8px);
  border-bottom: var(--border-base) solid var(--color-border);
}
.app-header__inner {
  max-width: var(--container-app); margin: 0 auto; padding: 0 var(--space-6);
  height: 68px; display: flex; align-items: center; gap: var(--space-5); min-width: 0;
}
.header-logo { height: 30px; width: auto; display: block; cursor: pointer; flex: none; }
.header-nav { display: flex; gap: var(--space-1); height: 100%; align-items: stretch; flex: none; }
.nav-btn {
  display: flex; align-items: center; gap: var(--space-2); padding: 0 14px;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--color-text-secondary); font-size: 14px; font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide); cursor: pointer; white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.nav-btn:hover { color: var(--color-text-primary); }
.nav-btn.active { color: var(--color-text-primary); border-bottom-color: var(--color-brand); }
.nav-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--color-brand); color: #fff; font-size: var(--text-label); font-weight: var(--weight-bold);
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-count:empty, .nav-count[data-zero="1"] { display: none; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 14px; min-width: 0; }

.status-pill {
  display: flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-3);
  border-radius: var(--radius-pill); border: var(--border-base) solid var(--color-border);
  background: rgba(255,255,255,0.03); font-size: var(--text-caption);
  color: var(--color-text-secondary); white-space: nowrap; min-width: 0; overflow: hidden; flex: 0 1 auto;
}
.status-pill .sp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-text-muted); flex: none; }
.status-pill.online .sp-dot { background: var(--color-brand); }
.status-pill .sp-text { overflow: hidden; text-overflow: ellipsis; }
.status-pill .sp-text strong { color: var(--color-text-primary); font-weight: var(--weight-semibold); }

.header-user {
  display: flex; align-items: center; gap: 10px; padding-left: 14px;
  border-left: var(--border-base) solid var(--color-border); min-width: 0; flex: 0 1 auto;
}
.header-user__text { text-align: right; line-height: 1.2; min-width: 0; overflow: hidden; }
.header-user__name { font-size: 14px; font-weight: var(--weight-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-user__org { font-size: var(--text-caption); color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--color-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 19px; font-weight: var(--weight-black);
  box-shadow: 0 0 0 3px var(--color-brand-muted); flex: none;
}

/* ------------------------------------------------------------
   BOTÕES
------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 10px var(--space-4); border-radius: var(--radius-md);
  border: var(--border-base) solid transparent; font-size: 14px; font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide); line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: all var(--transition-base);
}
.btn-primary { background: var(--color-brand); color: #fff; border-color: var(--color-brand); }
.btn-primary:hover { background: var(--color-brand-dark); border-color: var(--color-brand-dark); box-shadow: var(--shadow-brand); }
.btn-ghost { background: transparent; color: var(--color-text-secondary); border-color: var(--color-border-medium); }
.btn-ghost:hover { color: var(--color-text-primary); background: rgba(255,255,255,0.05); }
.btn-outline-brand { background: transparent; color: var(--color-brand); border-color: var(--color-border-brand); }
.btn-outline-brand:hover { background: var(--color-brand-muted); }
.btn-danger-outline { background: transparent; color: var(--color-error); border-color: rgba(255,68,68,0.35); }
.btn-danger-outline:hover { background: rgba(255,68,68,0.10); }
.btn-lg { padding: 13px var(--space-4); font-size: var(--text-body); width: 100%; }
.btn-sm { padding: 8px 14px; font-size: var(--text-body-sm); }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-link {
  display: inline-flex; align-items: center; gap: 6px; background: transparent; border: none;
  color: var(--color-text-secondary); font-size: 14px; font-weight: var(--weight-semibold);
  cursor: pointer; transition: color var(--transition-fast);
}
.btn-link:hover { color: var(--color-brand); }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-md); border: none; background: transparent;
  color: var(--color-text-secondary); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition-fast);
}
.icon-btn:hover { background: rgba(255,255,255,0.06); color: var(--color-text-primary); }

/* ------------------------------------------------------------
   BANNER PENDENTE / SESSÃO
------------------------------------------------------------ */
.pending-bar { border-bottom: var(--border-base) solid rgba(245,166,35,0.25); background: rgba(245,166,35,0.07); }
.pending-bar__inner {
  max-width: var(--container-app); margin: 0 auto; padding: 10px var(--space-6);
  display: flex; align-items: center; gap: 10px;
  font-size: var(--text-body-sm); color: var(--color-text-secondary);
}
.pending-bar__inner .ic { color: var(--color-warning); }
.pending-bar__text { flex: 1; text-wrap: pretty; }
.pending-bar__text strong { color: var(--color-warning); font-weight: var(--weight-semibold); }
.pending-bar__close { background: transparent; border: none; color: var(--color-text-muted); cursor: pointer; font-size: var(--text-body-sm); font-weight: var(--weight-semibold); }
.pending-bar__close:hover { color: var(--color-text-primary); }

.session-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-toast);
  background: var(--color-warning); color: #0A0A0A; font-size: 14px; font-weight: var(--weight-semibold);
  padding: 12px var(--space-4); text-align: center;
}

/* ------------------------------------------------------------
   PAGE HEAD (saudação + cota)
------------------------------------------------------------ */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-6); flex-wrap: wrap; margin-bottom: 28px;
}
.page-head h1 {
  font-family: var(--font-display); font-size: 44px; font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight); line-height: 1;
}
.page-head .lead { color: var(--color-text-secondary); font-size: var(--text-body); margin-top: var(--space-2); }
.page-head .t-eyebrow { display: block; margin-bottom: 6px; }

.quota-card {
  min-width: 240px; padding: 14px var(--space-4); border-radius: var(--radius-md);
  border: var(--border-base) solid var(--color-border); background: var(--color-bg-surface);
}
.quota-card + .quota-card { margin-top: var(--space-2); }
.quota-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-2); }
.quota-label {
  font-size: var(--text-caption); font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--color-text-secondary);
}
.quota-num { font-family: var(--font-mono); font-size: 14px; font-weight: var(--weight-semibold); }
.quota-num .used { color: var(--color-brand); }
.quota-num.warning .used { color: var(--color-warning); }
.quota-num.limit .used { color: var(--color-error); }
.quota-num .max { color: var(--color-text-muted); }
.quota-track { height: 5px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.quota-fill { height: 100%; border-radius: 3px; background: var(--color-brand); transition: width var(--transition-slow); }
.quota-fill.warning { background: var(--color-warning); }
.quota-fill.limit { background: var(--color-error); }
.quota-foot { font-size: var(--text-caption); color: var(--color-text-muted); margin-top: 6px; }

/* ------------------------------------------------------------
   SEÇÕES
------------------------------------------------------------ */
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-3); flex-wrap: wrap; }
.section-head h2 {
  font-family: var(--font-display); font-size: var(--text-h2); font-weight: var(--weight-black);
  text-transform: uppercase; letter-spacing: -0.01em;
}
.section-head .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-brand); animation: pulse 2.4s ease-in-out infinite; flex: none; }
.section-head .hint { font-size: var(--text-body-sm); color: var(--color-text-muted); }

/* ------------------------------------------------------------
   PRECISA DE VOCÊ
------------------------------------------------------------ */
.waiting-list { display: flex; flex-direction: column; gap: 10px; }
.waiting-card {
  border: var(--border-base) solid var(--color-border-brand);
  background: linear-gradient(0deg, rgba(58,170,53,0.06), rgba(58,170,53,0.06)), var(--color-bg-surface);
  border-radius: var(--radius-lg); padding: 18px var(--space-5);
}
.waiting-card__row { display: flex; gap: var(--space-4); align-items: flex-start; flex-wrap: wrap; }
.waiting-card__body { flex: 1 1 320px; min-width: 0; cursor: pointer; }
.waiting-card__meta { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-1); }
.waiting-card__id { font-family: var(--font-mono); font-size: var(--text-body-sm); font-weight: var(--weight-semibold); color: var(--color-brand); }
.waiting-card__ago { font-size: var(--text-caption); color: var(--color-text-muted); }
.waiting-card__subj { font-size: 17px; font-weight: var(--weight-bold); line-height: 1.35; margin-bottom: var(--space-2); }
.waiting-card__excerpt {
  font-size: 14px; color: var(--color-text-secondary); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.waiting-card__excerpt strong { color: var(--color-text-primary); font-weight: var(--weight-semibold); }
.waiting-card__actions { display: flex; flex-direction: column; gap: var(--space-2); flex: none; align-items: stretch; }
.waiting-card__foot {
  display: flex; align-items: center; gap: var(--space-2); margin-top: 14px; padding-top: var(--space-3);
  border-top: var(--border-base) solid var(--color-border); font-size: var(--text-caption); color: var(--color-text-muted);
}

/* ------------------------------------------------------------
   CARD DE LISTA + TABS + BUSCA
------------------------------------------------------------ */
.panel {
  background: var(--color-bg-surface); border: var(--border-base) solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  flex-wrap: wrap; padding: var(--space-4) 18px; border-bottom: var(--border-base) solid var(--color-border);
}
.tab-group {
  display: flex; gap: var(--space-1); padding: var(--space-1); border-radius: var(--radius-md);
  background: var(--color-bg-base); border: var(--border-base) solid var(--color-border); flex-wrap: wrap;
}
.tab-chip {
  display: inline-flex; align-items: center; gap: var(--space-2); padding: 7px var(--space-3);
  border: none; border-radius: 7px; background: transparent; color: var(--color-text-secondary);
  font-size: var(--text-body-sm); font-weight: var(--weight-semibold); cursor: pointer; white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.tab-chip:hover { color: var(--color-text-primary); }
.tab-chip.active { background: var(--color-bg-elevated); color: var(--color-text-primary); }
.tab-chip .n { font-family: var(--font-mono); font-size: var(--text-label); color: var(--color-text-muted); }
.tab-chip.active .n { color: var(--color-brand); }

.search-wrap { position: relative; flex: 1 1 220px; max-width: 320px; }
.search-wrap > .ic { position: absolute; left: var(--space-3); top: 50%; transform: translateY(-50%); color: var(--color-text-muted); pointer-events: none; }
.search-input {
  width: 100%; padding: 9px var(--space-3) 9px 36px; font-size: 14px; color: var(--color-text-primary);
  background: var(--color-bg-elevated); border: var(--border-base) solid var(--color-border-medium);
  border-radius: var(--radius-md); outline: none; transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-input:focus { border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-muted); }
.search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; color: var(--color-text-muted); cursor: pointer;
  display: none; padding: 2px; border-radius: 4px;
}
.search-clear.visible { display: flex; }
.search-clear:hover { color: var(--color-text-primary); }

/* ------------------------------------------------------------
   TABELA DE CHAMADOS
------------------------------------------------------------ */
.tk-head, .tk-row { display: grid; grid-template-columns: minmax(0,1fr) 150px 110px; gap: var(--space-4); }
.tk-head {
  padding: 10px var(--space-5); font-size: var(--text-label); font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--color-text-muted);
  border-bottom: var(--border-base) solid var(--color-border);
}
.tk-head .ta-right { text-align: right; }
.tk-row {
  align-items: center; padding: 14px var(--space-5);
  border-bottom: var(--border-base) solid var(--color-border); cursor: pointer;
  transition: background var(--transition-fast);
}
.tk-row:last-child { border-bottom: none; }
.tk-row:hover { background: rgba(255,255,255,0.025); }
.tk-main { min-width: 0; }
.tk-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tk-subj { font-size: var(--text-body); font-weight: var(--weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-row.is-closed .tk-subj { color: var(--color-text-secondary); }
.tag-new {
  flex: none; padding: 1px 7px; border-radius: var(--radius-pill); background: rgba(58,170,53,0.15);
  color: var(--color-brand); font-size: 10px; font-weight: var(--weight-bold);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.tk-sub { display: flex; align-items: center; gap: 10px; margin-top: 3px; font-size: var(--text-caption); color: var(--color-text-muted); flex-wrap: wrap; }
.tk-sub .mono { font-family: var(--font-mono); }
.tk-sub .p-tag { font-family: var(--font-mono); font-weight: var(--weight-semibold); }
.tk-updated { text-align: right; font-size: var(--text-body-sm); color: var(--color-text-muted); white-space: nowrap; }

.st-pill {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-caption); font-weight: var(--weight-semibold); padding: 3px 10px 3px var(--space-2);
  border-radius: var(--radius-pill); white-space: nowrap;
  color: var(--c, var(--color-brand)); background: color-mix(in srgb, var(--c, var(--color-brand)) 14%, transparent);
}
.st-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--color-brand)); flex: none; }

/* skeleton */
.sk {
  display: block; border-radius: 6px;
  background: linear-gradient(100deg, rgba(255,255,255,0.05) 30%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.05) 70%);
  background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite;
}
.sk-row { pointer-events: none; }
.sk-line { height: 15px; width: 60%; }
.sk-sub { height: 12px; width: 40%; margin-top: 6px; }
.sk-pill { height: 20px; width: 110px; border-radius: var(--radius-pill); }
.sk-date { height: 13px; width: 70px; justify-self: end; }

/* empty state */
.empty-state { padding: var(--space-12) var(--space-6); text-align: center; }
.empty-state .cacto { width: 64px; height: 64px; object-fit: contain; opacity: .85; margin: 0 auto 14px; display: block; }
.empty-state h3 { font-family: var(--font-display); font-size: var(--text-h2); font-weight: var(--weight-black); text-transform: uppercase; }
.empty-state p { font-size: 14px; color: var(--color-text-secondary); margin-top: var(--space-1); }
.empty-state .btn { margin-top: 18px; }
.empty-state .ic { color: var(--color-text-muted); }

.load-more-spinner { display: flex; justify-content: center; padding: var(--space-5); }
.load-more-spinner .spinner { width: 26px; height: 26px; border-width: 2px; }

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 18px; border-top: var(--border-base) solid var(--color-border);
}
.pagination-info { color: var(--color-text-muted); font-size: var(--text-body-sm); font-family: var(--font-mono); }

/* ------------------------------------------------------------
   SIDEBAR CARDS
------------------------------------------------------------ */
.side-card {
  background: var(--color-bg-surface); border: var(--border-base) solid var(--color-border);
  border-radius: var(--radius-lg); padding: 18px var(--space-5);
}
.side-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: 14px; }
.side-title {
  font-size: var(--text-label); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-widest);
  text-transform: uppercase; color: var(--color-text-secondary);
}
.side-status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-caption); font-weight: var(--weight-semibold); color: var(--color-brand); }
.side-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.side-list { display: flex; flex-direction: column; gap: 10px; }
.side-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: 14px; }
.side-row .name { color: var(--color-text-secondary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-row .val { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--color-text-muted); flex: none; }
.side-grid { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-3); font-size: 14px; }
.side-grid .k { color: var(--color-text-secondary); }
.side-grid .v { font-family: var(--font-mono); font-size: var(--text-body-sm); text-align: right; }
.side-note { font-size: var(--text-caption); color: var(--color-text-muted); margin-top: var(--space-3); line-height: 1.5; }
.sla-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; border-top: var(--border-base) solid var(--color-border); }
.sla-row .k { flex: none; width: 30px; font-family: var(--font-mono); font-size: var(--text-caption); font-weight: var(--weight-bold); }
.sla-row .n { flex: 1; font-size: var(--text-body-sm); color: var(--color-text-secondary); }
.sla-row .t { font-size: var(--text-caption); color: var(--color-text-primary); text-align: right; }

/* incidentes / faturas */
.incident-card {
  display: flex; align-items: flex-start; gap: var(--space-3); padding: 14px 18px;
  background: var(--color-error-bg); border: var(--border-base) solid rgba(255,68,68,0.3);
  border-left: 3px solid var(--color-error); border-radius: var(--radius-md);
}
.incident-card .ic { color: var(--color-error); padding-top: 1px; }
.incident-card .ic-title { font-size: 14px; font-weight: var(--weight-bold); color: var(--color-error); line-height: 1.3; }
.incident-card .ic-body { font-size: var(--text-body-sm); color: var(--color-text-secondary); margin-top: var(--space-1); line-height: 1.5; }
.incident-card .ic-date { font-size: var(--text-label); color: var(--color-text-muted); margin-top: var(--space-1); }

.inv-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; }
.inv-row + .inv-row { border-top: var(--border-base) solid var(--color-border); }
.inv-label { font-size: var(--text-body-sm); color: var(--color-text-secondary); min-width: 0; }
.inv-due { font-size: var(--text-label); color: var(--color-text-muted); }
.inv-due.overdue { color: var(--color-error); }
.inv-amount { font-family: var(--font-mono); font-size: var(--text-body-sm); font-weight: var(--weight-semibold); white-space: nowrap; }

/* ------------------------------------------------------------
   DETALHE DO CHAMADO
------------------------------------------------------------ */
.detail-head { margin-bottom: var(--space-5); }
.detail-head__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.detail-head__id { font-family: var(--font-mono); font-size: 14px; font-weight: var(--weight-semibold); color: var(--color-brand); }
.detail-head h1 {
  font-family: var(--font-display); font-size: 36px; font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight); line-height: 1.05; text-wrap: pretty;
}
.steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; margin-bottom: 28px; }
.step-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.08); }
.step.done .step-bar { background: var(--color-brand); }
.step-label { font-size: var(--text-caption); font-weight: var(--weight-semibold); margin-top: var(--space-2); color: var(--color-text-muted); }
.step.done .step-label { color: var(--color-text-primary); }
.step-sub { font-size: var(--text-label); color: var(--color-text-muted); }

.msgs { display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: var(--space-3); }
.msg.is-client { flex-direction: row-reverse; }
.msg__avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: var(--weight-black); font-size: var(--text-body);
  background: var(--color-bg-surface); color: var(--color-text-primary); overflow: hidden;
}
.msg.is-client .msg__avatar { background: var(--color-bg-elevated); }
.msg__avatar img { width: 22px; height: 22px; object-fit: contain; }
.msg__content { flex: 0 1 640px; min-width: 0; }
.msg__head { display: flex; align-items: baseline; gap: var(--space-2); margin-bottom: 6px; flex-wrap: wrap; }
.msg.is-client .msg__head { justify-content: flex-end; }
.msg__name { font-size: 14px; font-weight: var(--weight-semibold); }
.msg__tag { font-size: var(--text-label); font-weight: var(--weight-bold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--color-brand); }
.msg.is-client .msg__tag { color: var(--color-text-muted); }
.msg__date { font-size: var(--text-caption); color: var(--color-text-muted); font-family: var(--font-mono); }
.msg__bubble {
  padding: 14px 18px; border-radius: var(--radius-lg);
  border: var(--border-base) solid var(--color-border-brand); background: var(--color-bg-surface);
  font-size: 14px; line-height: 1.7; color: var(--color-text-secondary);
  white-space: pre-wrap; word-break: break-word;
}
.msg.is-client .msg__bubble { border-color: var(--color-border); background: var(--color-bg-elevated); }
.msg__bubble.md { white-space: normal; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 10px; }
.md .md-h { font-weight: var(--weight-bold); color: var(--color-text-primary, inherit); }
.md strong { font-weight: var(--weight-bold); color: var(--color-text-primary, inherit); }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md a { color: var(--color-brand); text-decoration: underline; }
.md code { font-family: var(--font-mono); font-size: 13px; padding: 1px 6px; border-radius: 4px; background: rgba(127,127,127,0.18); }
.md pre { margin: 0 0 10px; padding: 10px 14px; border-radius: var(--radius-md, 8px); background: rgba(127,127,127,0.14); overflow-x: auto; white-space: pre; }
.md pre code { padding: 0; background: none; }
.md blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--color-border-brand); color: var(--color-text-muted); }

/* painel de decisão */
.decision {
  margin-top: 28px; padding: 22px var(--space-6); border-radius: var(--radius-lg);
  border: var(--border-base) solid var(--color-border-brand);
  background: linear-gradient(0deg, rgba(58,170,53,0.07), rgba(58,170,53,0.07)), var(--color-bg-surface);
}
.decision__row { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; }
.decision img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.decision__text { flex: 1 1 260px; }
.decision__title { font-family: var(--font-display); font-size: var(--text-h2); font-weight: var(--weight-black); text-transform: uppercase; line-height: 1.1; }
.decision__sub { font-size: var(--text-body-sm); color: var(--color-text-secondary); margin-top: var(--space-1); }
.decision__sub strong { font-family: var(--font-mono); color: var(--color-text-primary); font-weight: var(--weight-semibold); }
.decision__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* avaliação */
.rating-box {
  margin-top: 28px; padding: var(--space-6); border-radius: var(--radius-lg);
  border: var(--border-base) solid var(--color-border-medium); background: var(--color-bg-surface); text-align: center;
}
.rating-box__tag { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-caption); font-weight: var(--weight-semibold); color: var(--color-brand); margin-bottom: 10px; }
.rating-box__title { font-family: var(--font-display); font-size: 26px; font-weight: var(--weight-black); text-transform: uppercase; }
.rating-box__sub { font-size: var(--text-body-sm); color: var(--color-text-muted); margin: var(--space-1) 0 18px; }
.rating-scale { display: flex; justify-content: center; gap: var(--space-2); margin-bottom: var(--space-3); flex-wrap: wrap; }
.rating-btn {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  border: var(--border-base) solid var(--color-border-medium); background: var(--color-bg-elevated);
  color: var(--color-text-secondary); font-family: var(--font-display); font-size: var(--text-h2);
  font-weight: var(--weight-black); cursor: pointer; transition: all var(--transition-spring);
}
.rating-btn:hover { border-color: var(--color-border-brand); }
.rating-btn.on { border-color: var(--color-brand); background: var(--color-brand); color: #fff; }
.rating-ends { display: flex; justify-content: space-between; max-width: 292px; margin: 0 auto; font-size: var(--text-label); color: var(--color-text-muted); }
.rating-comment { margin-top: var(--space-4); }
.rating-thanks { margin-top: var(--space-4); font-size: 14px; color: var(--color-brand); font-weight: var(--weight-semibold); }

.closed-bar {
  margin-top: 28px; display: flex; align-items: center; gap: var(--space-3); padding: 14px 18px;
  border-radius: var(--radius-md); border: var(--border-base) solid var(--color-border);
  background: rgba(255,255,255,0.03); font-size: 14px; color: var(--color-text-secondary); flex-wrap: wrap;
}
.closed-bar .ic { color: var(--color-text-muted); }
.closed-bar span { flex: 1; }

/* composer */
.composer {
  margin-top: 28px; border: var(--border-base) solid var(--color-border-medium); border-radius: var(--radius-lg);
  background: var(--color-bg-surface); overflow: hidden; transition: border-color var(--transition-fast);
}
.composer.nudging { border-color: var(--color-border-brand); }
.composer textarea {
  display: block; width: 100%; min-height: 110px; padding: var(--space-4) 18px;
  background: transparent; border: none; outline: none; resize: vertical;
  color: var(--color-text-primary); font-size: var(--text-body); line-height: var(--leading-normal);
}
.composer__nudge {
  margin: 0 var(--space-3) var(--space-3); padding: var(--space-3) 14px; border-radius: var(--radius-md);
  background: rgba(58,170,53,0.10); border: var(--border-base) solid var(--color-border-brand);
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
}
.composer__nudge .ic { color: var(--color-brand); }
.composer__nudge span { flex: 1 1 220px; font-size: var(--text-body-sm); color: var(--color-text-secondary); }
.composer__nudge strong { color: var(--color-text-primary); font-weight: var(--weight-semibold); }
.composer__bar { display: flex; align-items: center; gap: 6px; padding: 10px var(--space-3); border-top: var(--border-base) solid var(--color-border); flex-wrap: wrap; }
.composer__hint { font-size: var(--text-caption); color: var(--color-text-muted); margin-left: var(--space-1); }
.composer__send { margin-left: auto; }
.composer__send:disabled { background: transparent; color: var(--color-text-muted); border-color: var(--color-border-medium); opacity: 1; pointer-events: none; }

/* ------------------------------------------------------------
   NOVO CHAMADO
------------------------------------------------------------ */
.form-steps { display: flex; flex-direction: column; gap: 28px; }
.step-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: var(--space-3); }
.step-title .num { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--color-brand); }
.step-title .txt { font-size: var(--text-body-sm); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--color-text-secondary); }

.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.type-card {
  display: flex; gap: var(--space-3); align-items: flex-start; text-align: left; padding: 14px;
  border-radius: var(--radius-md); border: 1.5px solid var(--color-border-medium);
  background: var(--color-bg-elevated); color: var(--color-text-primary); cursor: pointer;
  transition: all var(--transition-base);
}
.type-card:hover { border-color: var(--color-border-brand); }
.type-card.on { border-color: var(--color-brand); background: var(--color-brand-muted); }
.type-card__ic {
  flex: none; width: 34px; height: 34px; border-radius: var(--radius-sm); display: flex;
  align-items: center; justify-content: center; font-size: 17px;
  background: rgba(255,255,255,0.05); color: var(--color-text-secondary); transition: all var(--transition-base);
}
.type-card.on .type-card__ic { background: var(--color-brand); color: #fff; }
.type-card__name { display: block; font-size: 14px; font-weight: var(--weight-semibold); }
.type-card__desc { display: block; font-size: var(--text-caption); color: var(--color-text-muted); line-height: 1.4; }

.impact-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
.impact-card {
  text-align: left; padding: var(--space-3); border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border-medium); background: var(--color-bg-elevated);
  color: var(--color-text-primary); cursor: pointer; transition: all var(--transition-base);
}
.impact-card:hover { border-color: var(--color-border-brand); }
.impact-bars { display: flex; gap: 3px; margin-bottom: 10px; }
.impact-bars i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.08); }
.impact-card__name { display: block; font-size: 14px; font-weight: var(--weight-semibold); }
.impact-card__desc { display: block; font-size: var(--text-caption); color: var(--color-text-muted); line-height: 1.35; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: var(--text-body-sm); color: var(--color-text-secondary); }
.field-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: var(--space-3); }
.form-control {
  width: 100%; padding: var(--space-3) 14px; font-size: var(--text-body); color: var(--color-text-primary);
  background: var(--color-bg-elevated); border: var(--border-base) solid var(--color-border-medium);
  border-radius: var(--radius-md); outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-control:focus { border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-muted); }
textarea.form-control { min-height: 150px; line-height: var(--leading-normal); resize: vertical; }
select.form-control {
  cursor: pointer; appearance: none; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.attach-row { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: var(--space-3); }
.dropzone {
  display: flex; align-items: center; gap: 14px; padding: var(--space-4); border-radius: var(--radius-md);
  border: 1.5px dashed var(--color-border-medium); color: var(--color-text-secondary); cursor: pointer;
  transition: all var(--transition-base);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--color-brand); background: rgba(58,170,53,0.06); }
.dropzone .ic { color: var(--color-brand); }
.dropzone input[type="file"] { display: none; }
.dropzone__title { display: block; font-size: 14px; font-weight: var(--weight-semibold); color: var(--color-text-primary); }
.dropzone__sub { display: block; font-size: var(--text-caption); color: var(--color-text-muted); }

.rec-btn {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md); border: var(--border-base) solid var(--color-border-medium);
  background: var(--color-bg-elevated); color: var(--color-text-secondary); cursor: pointer; text-align: left;
  transition: border-color var(--transition-base);
}
.rec-btn:hover { border-color: rgba(255,68,68,0.5); }
.rec-btn__dot {
  flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--color-error); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.rec-btn.recording .rec-btn__dot { animation: recPulse 1.4s ease-in-out infinite; }
.rec-btn__label { font-size: 14px; font-weight: var(--weight-semibold); }
.rec-btn__time { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--color-text-muted); }

.file-list { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); }
.file-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--color-bg-elevated); border: var(--border-base) solid var(--color-border);
  border-radius: var(--radius-sm); font-size: var(--text-body-sm); color: var(--color-text-secondary);
}
.file-item .fi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .ic { color: var(--color-text-muted); }
.file-item-remove { color: var(--color-error); cursor: pointer; display: inline-flex; padding: 2px; border-radius: 4px; }
.file-item-remove:hover { background: var(--color-error-bg); }
.audio-preview {
  display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-3); padding: var(--space-3) 14px;
  background: var(--color-brand-muted); border: var(--border-base) solid var(--color-border-brand); border-radius: var(--radius-md);
}
.audio-preview audio { flex: 1; height: 38px; }

/* resumo lateral (novo chamado) */
.summary-head { padding: 18px var(--space-5); border-bottom: var(--border-base) solid var(--color-border); }
.summary-level { display: flex; align-items: center; gap: var(--space-3); }
.summary-level .k { font-family: var(--font-display); font-size: 44px; font-weight: var(--weight-black); line-height: 1; }
.summary-level .name { font-size: var(--text-body); font-weight: var(--weight-bold); }
.summary-level .desc { font-size: var(--text-caption); color: var(--color-text-muted); line-height: 1.4; }
.summary-grid { padding: var(--space-4) var(--space-5); display: grid; grid-template-columns: 1fr auto; gap: 10px var(--space-3); font-size: var(--text-body-sm); }
.summary-grid .k { color: var(--color-text-muted); }
.summary-grid .v { text-align: right; font-weight: var(--weight-semibold); }
.summary-foot { padding: 0 var(--space-5) 18px; display: flex; flex-direction: column; gap: 10px; }
.summary-note { font-size: var(--text-caption); color: var(--color-text-muted); text-align: center; }

/* ------------------------------------------------------------
   ANEXOS / LIGHTBOX / TOAST
------------------------------------------------------------ */
.attachment-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-2); }
.msg.is-client .attachment-grid { justify-content: flex-end; }
.att-chip {
  display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px 10px;
  border-radius: var(--radius-md); background: var(--color-bg-base);
  border: var(--border-base) solid var(--color-border-medium);
  font-size: var(--text-caption); color: var(--color-text-secondary); max-width: 260px; min-width: 0;
}
.att-chip .att-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.att-action { background: transparent; border: none; color: var(--color-text-muted); cursor: pointer; padding: 2px; border-radius: 3px; display: inline-flex; flex: none; transition: color var(--transition-fast); }
.att-action:hover { color: var(--color-brand); }
.att-chip.att-image { cursor: pointer; }
.att-chip.att-image:hover { border-color: var(--color-border-brand); }

.lightbox {
  position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center;
  padding: var(--space-5); background: rgba(0,0,0,0.88); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .22s ease; pointer-events: none;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lb-content { position: relative; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lb-img { max-width: 100%; max-height: 80vh; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.lb-close {
  position: absolute; top: -14px; right: -14px; width: 30px; height: 30px;
  background: rgba(255,255,255,0.12); border: var(--border-base) solid rgba(255,255,255,0.2);
  color: #fff; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none;
}
.lb-close:hover { background: rgba(255,255,255,0.22); }
.lb-name { color: var(--color-text-secondary); font-size: var(--text-caption); }

.toast-container { position: fixed; right: var(--space-5); bottom: var(--space-5); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: var(--space-3); padding: 14px 18px; border-radius: var(--radius-md);
  background: var(--color-bg-elevated); border: var(--border-base) solid var(--color-border-medium);
  border-left: 3px solid var(--color-brand); box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: var(--weight-semibold); color: var(--color-text-primary);
  max-width: 360px; animation: fadeUp .3s ease;
}
.toast .ic { flex: none; color: var(--color-brand); }
.toast.error { border-left-color: var(--color-error); }
.toast.error .ic { color: var(--color-error); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: all .3s ease; }

/* ------------------------------------------------------------
   RESPONSIVO
------------------------------------------------------------ */
@media (max-width: 1040px) {
  .col-side { max-width: none; flex-basis: 100%; }
  .col-side.is-sticky { position: static; }
}
@media (max-width: 860px) {
  .app-header__inner { height: auto; padding: var(--space-3) var(--space-4); flex-wrap: wrap; gap: var(--space-3); }
  .header-nav { order: 3; width: 100%; border-top: var(--border-base) solid var(--color-border); padding-top: var(--space-2); }
  .nav-btn { padding: var(--space-2) var(--space-2); }
  .header-right { gap: var(--space-2); }
  .status-pill { display: none; }
  .app-main { padding: var(--space-6) var(--space-4) 56px; }
  .wrap, .pending-bar__inner { padding-left: var(--space-4); padding-right: var(--space-4); }
  .page-head h1 { font-size: 34px; }
  .detail-head h1 { font-size: 28px; }
  .impact-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .field-row, .attach-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-3) 6px; }
}
@media (max-width: 640px) {
  .tk-head { display: none; }
  .tk-row { grid-template-columns: 1fr; gap: var(--space-2); padding: var(--space-3) var(--space-4); }
  .tk-updated { text-align: left; }
  .st-pill { justify-self: start; }
  .msg__content { flex-basis: 100%; }
  .header-user__text { display: none; }
  .quota-card { min-width: 0; width: 100%; }
  .panel-head { padding: var(--space-3); }
  .search-wrap { max-width: none; }
  .type-grid { grid-template-columns: 1fr; }
  .rating-btn { width: 44px; height: 44px; font-size: var(--text-h3); }
}

/* ------------------------------------------------------------
   IMPRESSÃO (exportar chamado em PDF)
------------------------------------------------------------ */
@media print {
  .app-header, .pending-bar, .composer, .decision, .rating-box, .closed-bar,
  .col-side, .toast-container, .btn-link, .detail-actions, #initialLoading { display: none !important; }
  body { background: #fff; color: #000; }
  .msg__bubble { border-color: #ccc; background: #fff; color: #000; }
  .detail-head h1, .msg__name { color: #000; }
}
