/* Dashboard */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

.kpi-icon { display: none; }

.kpi-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kpi-info h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
}

.kpi-value {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  line-height: 1;
}

/* Pure CSS Bar Chart */
.chart-container {
  margin-top: 1.5rem;
}
.chart-bar {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}
.chart-label {
  width: 150px;
  font-size: 0.875rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.chart-track {
  width: 120px;
  flex: none;
  height: 1rem;
  background: var(--color-surface);
  border-radius: 999px;
  overflow: hidden;
}
.chart-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--color-primary);
  transition: width 1s ease-out;
}

/* Tickets List */
.tickets-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
  justify-content: space-between;
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background-color: var(--color-surface);
  border-radius: 999px;
  font-size: 0.75rem;
  gap: 0.25rem;
}
.chip button {
  color: var(--color-text-secondary);
}

.ticket-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ticket-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 768px) {
  .ticket-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.floating-action-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  border-radius: 999px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 30;
}

/* Ticket Detail */
.ticket-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .ticket-detail-layout {
    flex-direction: row;
  }
  .ticket-main {
    flex: 3;
  }
  .ticket-sidebar {
    flex: 1;
  }
}

.ticket-header {
  margin-bottom: 2rem;
}

.ticket-meta-grid {
  display: grid;
  gap: 1rem;
}
.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.meta-label {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  text-transform: uppercase;
}
.meta-value {
  font-size: 0.875rem;
  font-weight: 500;
}

.ticket-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.message-wrapper {
  display: flex;
  gap: 1rem;
}
.message-wrapper.right {
  flex-direction: row-reverse;
}

.message-bubble {
  background: var(--color-surface);
  padding: 1rem;
  border-radius: 0.5rem;
  max-width: 80%;
}
.message-wrapper.right .message-bubble {
  background: var(--color-primary-light);
}

.message-bubble.internal {
  background: #FEF3C7; /* Yellowish for internal */
  font-style: italic;
  border-left: 4px solid var(--status-waiting);
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.message-content {
  font-size: 0.875rem;
  white-space: pre-wrap;
}

.attachments {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.attachment-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.25rem;
  border: 1px solid var(--color-border);
}

.reply-box {
  background: #FFF;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem;
}

/* New Ticket Steps */
.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}
.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-secondary);
}
.step.active {
  color: var(--color-primary);
  font-weight: 600;
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  margin: 0 1rem;
}

/* Login Page */
.login-container {
  display: flex;
  min-height: 100vh;
}

.login-left {
  flex: 1;
  background: #0F172A;
  color: #FFF;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem;
  display: none;
}
@media (min-width: 768px) {
  .login-left { display: flex; }
}
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #FFF;
}
.login-box {
  width: 100%;
  max-width: 400px;
}
.login-logo {
  display: block;
  max-width: 144px;
  margin: 0 auto 1.5rem;
}
.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* ─── Overlay for mobile sidebar ─────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 15;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ─── Reports Page ──────────────────────────────── */
.reports-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: flex-end;
}
.date-period-tabs {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}
.period-tab {
  padding: 0.375rem 0.875rem;
  border: 1px solid #D1D5DB;
  border-radius: 0.375rem;
  background: #F9FAFB;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.period-tab:hover {
  background: #E5E7EB;
  color: #111827;
}
.period-tab.active {
  background: #1E3A8A !important;
  color: #FFFFFF !important;
  border-color: #1E3A8A !important;
  box-shadow: 0 2px 6px rgba(30,58,138,0.3);
}
.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
@media (min-width: 1024px) {
  .reports-kpi-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
  .reports-kpi-grid { grid-template-columns: 1fr; }
}
.reports-kpi-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.reports-kpi-card .kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}
.reports-kpi-card .kpi-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1;
}
.reports-kpi-card .kpi-sub {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}
.status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.status-row {
  display: grid;
  grid-template-columns: 140px 1fr 50px;
  align-items: center;
  gap: 1rem;
}
@media (max-width: 480px) {
  .status-row { grid-template-columns: 100px 1fr 40px; gap: 0.5rem; }
  .chart-label { font-size: 0.75rem; }
}
.status-label-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Customization Page ─────────────────────────── */
.custom-fields-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.custom-field-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow 0.15s;
}
.custom-field-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.field-type-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.field-info { flex: 1; min-width: 0; }
.field-label { font-weight: 600; font-size: 0.9375rem; }
.field-key { font-size: 0.75rem; color: var(--color-text-secondary); font-family: monospace; }
.field-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ─── Ticket card short ID ───────────────────────── */
.ticket-id-short {
  font-family: monospace;
  font-size: 0.75rem;
  background: var(--color-surface);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  color: var(--color-text-secondary);
  font-weight: 600;
}

/* Assets page */
.assets-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0;
}
.asset-tab {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  border-radius: 0.25rem 0.25rem 0 0;
}
.asset-tab:hover { color: var(--color-text-primary); }
.asset-tab.active {
  color: #377cec;
  border-bottom-color: #377cec;
  font-weight: 600;
}
.asset-table-wrapper { overflow-x: auto; }
.asset-status-active { 
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: #F0FDF4; color: #10B981; 
  padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
}
.asset-status-inactive {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: #FEF2F2; color: #EF4444; 
  padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
}

/* Asset modal form */
.asset-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ─── Mobile table fix ───────────────────────────── */
@media (max-width: 640px) {
  .table th:nth-child(4),
  .table td:nth-child(4),
  .table th:nth-child(5),
  .table td:nth-child(5) { display: none; }
  
  .asset-modal-grid { grid-template-columns: 1fr; }
}

/* Chart responsive grid */
@media (max-width: 640px) {
  .reports-chart-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Ticket ID Badge */
.ticket-id-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 0.375rem;
  background: #F3F4F6;
  color: #374151;
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid #E5E7EB;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CBD5E1;
  border-radius: 34px;
  transition: 0.3s;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px; width: 20px;
  left: 4px; bottom: 4px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}
input:checked + .toggle-slider { background: var(--gradient-brand); }
input:checked + .toggle-slider:before { transform: translateX(24px); }

/* ─── Ativos: valor (coluna, total da lista e campo com a moeda) ───────────── */
.asset-col-value { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
#assetsTfoot[hidden] { display: none; }
.asset-total-row td { background: #F8FAFC; border-top: 2px solid #CBD5E1; padding-top: 0.85rem; padding-bottom: 0.85rem; font-size: 0.9rem; }
.asset-total-row .asset-col-value { font-weight: 800; color: #0F172A; font-size: 1rem; }
.asset-total-row .asset-col-value div + div { margin-top: 0.15rem; }
.asset-total-count, .asset-total-note { color: var(--color-text-secondary, #6B7280); font-size: 0.82rem; margin-left: 0.35rem; }
.jd-money-input { position: relative; }
.jd-money-sym { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); font-weight: 700; font-size: 0.85rem; color: #64748B; pointer-events: none; }
.jd-money-input input { font-variant-numeric: tabular-nums; }
.jd-money-input input.is-invalid { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }
.jd-money-hint { display: block; min-height: 0; margin-top: 0.25rem; font-size: 0.75rem; color: #DC2626; }
.jd-money-hint:empty { display: none; }
[data-theme="dark"] .asset-total-row td { background: #0F172A !important; border-top-color: #334155 !important; }
[data-theme="dark"] .asset-total-row .asset-col-value { color: #F8FAFC; }
[data-theme="dark"] .jd-money-sym { color: #94A3B8; }

/* Relatórios › Ativos: valor dos ativos */
.asset-value-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.asset-value-total { font-size: 1.75rem; font-weight: 800; color: #059669; line-height: 1.15; text-align: right; font-variant-numeric: tabular-nums; }
.asset-value-total div + div { font-size: 1.15rem; }
.asset-value-sub { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-secondary, #6B7280); margin: 0 0 0.5rem; }
.asset-value-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; }
[data-theme="dark"] .asset-value-total { color: #34D399; }
[data-theme="dark"] .asset-value-sub { color: #94A3B8; }

/* ==========================================================================
   Dashboard (rodada 12): agenda do dia, reuniões, Kanban, chamados, status e ativos
   ========================================================================== */
:root {
  --kb-backlog: #4B5563; --kb-progress: #2563EB; --kb-waiting: #EAB308; --kb-review: #7C3AED; --kb-done: #059669;
}
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 1500px) { .dash-grid { grid-template-columns: minmax(0, 2fr) minmax(330px, 1fr); } }
.dash-main { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.dash-pair { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 760px) { .dash-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-pair .dash-card { min-height: 280px; }
.dash-stack { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
@media (min-width: 760px) and (max-width: 1499px) { .dash-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .dash-stack #dashKanban { grid-row: span 2; } }
.dash-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.dash-card[hidden] { display: none; }
.dash-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: 1.1rem 1.25rem .9rem; border-bottom: 1px solid var(--color-border); }
.dash-card-head h3 { font-size: 1rem; font-weight: 700; color: var(--color-text-primary); margin: 0; }
.dash-sub { font-size: .8rem; color: var(--color-text-secondary); margin: .15rem 0 0; }
.dash-sub::first-letter { text-transform: uppercase; }
.dash-card-head .btn { white-space: nowrap; flex-shrink: 0; }
.dash-card-body { padding: 1rem 1.25rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.dash-card-body > .dash-empty { flex: 1; }
.dash-skeleton { height: 120px; border-radius: .6rem; background: linear-gradient(90deg, var(--color-surface) 0%, var(--color-surface-hover) 50%, var(--color-surface) 100%); background-size: 200% 100%; animation: dashShimmer 1.4s infinite linear; }
@keyframes dashShimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .dash-skeleton { animation: none; } }

.dash-empty { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center; border: 1px dashed var(--color-border); border-radius: .75rem; padding: 1.25rem; }
.dash-empty p { margin: 0; color: var(--color-text-secondary); font-size: .9rem; }
.dash-link { font-size: .85rem; font-weight: 600; color: var(--color-primary); text-decoration: none; display: inline-block; margin-top: .6rem; }
.dash-empty .dash-link { margin-top: 0; }
.dash-link:hover { text-decoration: underline; }

.dash-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dash-item { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--color-border); min-width: 0; }
.dash-item:last-child { border-bottom: 0; }
.dash-list-tight .dash-item { padding: .45rem 0; }
.dash-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; text-decoration: none; color: inherit; }
.dash-item-main:hover .dash-item-title { color: var(--color-primary); }
.dash-item-title { font-weight: 600; font-size: .9rem; line-height: 1.35; color: var(--color-text-primary); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.dash-row-sub { font-size: .78rem; color: var(--color-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.dash-time { flex: 0 0 84px; font-size: .8rem; font-weight: 700; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.dash-item-main .dash-tag { align-self: flex-start; }
.dash-tag { font-size: .68rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--color-surface); color: var(--color-text-secondary); }
.dash-tag-meeting { background: rgba(135, 97, 246, .12); color: #7c3aed; }
.dash-tag-external { background: rgba(55, 124, 236, .12); color: #2563eb; }
.dash-tag-event { background: rgba(16, 185, 129, .12); color: #059669; }
.dash-item.is-live .dash-tag-meeting { background: #ef4444; color: #fff; }
.dash-item .btn { flex-shrink: 0; }

.dash-date { flex: 0 0 46px; height: 50px; border-radius: .6rem; background: var(--color-surface); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.dash-date b { font-size: 1.15rem; font-weight: 800; color: var(--color-text-primary); }
.dash-date small { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-secondary); margin-top: .2rem; }
.dash-meeting.is-live .dash-date { background: rgba(239, 68, 68, .12); }
.dash-meeting.is-live .dash-date b { color: #dc2626; }
.dash-live-dot { display: inline-block; vertical-align: middle; margin-right: .35rem; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .2); flex-shrink: 0; }

.kb-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--color-surface); }
.kb-seg { display: block; min-width: 6px; }
.kb-seg-BACKLOG { background: var(--kb-backlog); }
.kb-seg-IN_PROGRESS { background: var(--kb-progress); }
.kb-seg-WAITING { background: var(--kb-waiting); }
.kb-seg-REVIEW { background: var(--kb-review); }
.kb-seg-DONE { background: var(--kb-done); }
.kb-legend { list-style: none; padding: 0; margin: .8rem 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .35rem .9rem; }
.kb-legend li { display: flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--color-text-secondary); }
.kb-legend b { margin-left: auto; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.kb-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; display: inline-block; }

.dash-minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 1500px) { #dashKanban .dash-minis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dash-mini { border-radius: .65rem; padding: .5rem .7rem; background: var(--color-surface); display: flex; flex-direction: column; gap: .15rem; border-left: 3px solid transparent; }
.dash-mini b { font-size: 1.2rem; font-weight: 800; line-height: 1.1; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.dash-mini span { font-size: .74rem; color: var(--color-text-secondary); font-weight: 600; }
.dash-mini.is-danger { border-left-color: #ef4444; } .dash-mini.is-danger:not(.is-zero) b { color: #dc2626; }
.dash-mini.is-warn { border-left-color: #f59e0b; }
.dash-mini.is-info { border-left-color: #3b82f6; }
.dash-mini.is-brand { border-left-color: #8761f6; }
.dash-mini.is-money { border-left-color: #10b981; }
.dash-mini .dash-money { font-size: 1.05rem; }
.dash-section-label { font-size: .78rem; font-weight: 700; color: var(--color-text-secondary); margin: 1rem 0 .2rem; }
.dash-due { font-size: .75rem; font-weight: 700; color: var(--color-text-secondary); white-space: nowrap; }
.dash-due.is-late { color: #dc2626; }
.dash-due.is-today { color: #d97706; }

.dash-status { margin-top: 0; display: flex; flex-direction: column; gap: .7rem; }
.dash-status-row { text-decoration: none; color: inherit; display: grid; grid-template-columns: 1fr auto; gap: .3rem .75rem; margin: 0; align-items: baseline; }
.dash-status-row:hover .chart-label { color: var(--color-primary); }
.dash-status .chart-label { width: auto; min-width: 0; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.dash-status .chart-track { grid-column: 1 / -1; grid-row: 2; width: 100%; height: .45rem; }
.dash-status-n { font-size: .8rem; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.dash-status-n strong { color: var(--color-text-primary); margin-right: .25rem; }
.dash-table td, .dash-table th { padding-top: .7rem; padding-bottom: .7rem; }
.dash-nowrap { white-space: nowrap; }
.dash-table .dash-row-sub { margin-top: .1rem; }
#dashRecent .table-responsive { border: 0; }
@media (max-width: 640px) {
  .dash-card-head { flex-wrap: wrap; }
  .dash-time { flex-basis: 70px; }
}
[data-theme="dark"] .dash-tag-meeting { color: #c4b5fd; }
[data-theme="dark"] .dash-tag-external { color: #93c5fd; }
[data-theme="dark"] .dash-tag-event { color: #6ee7b7; }
[data-theme="dark"] .dash-mini, [data-theme="dark"] .dash-date, [data-theme="dark"] .dash-tag { background: rgba(148, 163, 184, .10); }
[data-theme="dark"] .dash-tag-meeting { background: rgba(135, 97, 246, .2); }
[data-theme="dark"] .dash-tag-external { background: rgba(55, 124, 236, .2); }
[data-theme="dark"] .dash-tag-event { background: rgba(16, 185, 129, .18); }
[data-theme="dark"] .kb-bar { background: rgba(148, 163, 184, .12); }

/* rodada 18: Auditoria › Logs de e-mail — resposta do servidor / motivo do erro embaixo do status */
.email-log-detail { display: block; max-width: 340px; margin-top: .2rem; font-size: .72rem; color: var(--color-text-secondary, #6B7280); overflow-wrap: anywhere; line-height: 1.35; }

/* ── Rodada 19: tempo médio de atendimento por prioridade (Relatórios) ── */
.rpt-prio-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.rpt-prio-table th { text-align: left; font-size: .75rem; color: var(--text-secondary, #6B7280); font-weight: 600; padding: .5rem .75rem; border-bottom: 1px solid var(--border-color, #E5E7EB); }
.rpt-prio-table td { padding: .6rem .75rem; border-bottom: 1px solid var(--border-color, #F1F5F9); }
.rpt-prio-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .5rem; vertical-align: middle; }
.rpt-prio-clock { font-variant-numeric: tabular-nums; font-weight: 700; }
.rpt-prio-barcol { width: 34%; }
.rpt-prio-bar { display: block; height: 10px; border-radius: 6px; opacity: .85; }
@media (max-width: 640px) { .rpt-prio-barcol { display: none; } .rpt-prio-table th, .rpt-prio-table td { padding: .5rem .4rem; } }

/* ── Rodada 19: formulário "Abrir chamado" mais largo (fica ainda maior com muitos campos extras) ── */
.tn-page { max-width: 920px; margin: 0 auto; width: 100%; padding-top: 2rem; padding-bottom: 2.5rem; }
.tn-page.tn-wide { max-width: 1180px; }
.tn-card { padding: 2rem 2.25rem; }
.tn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1.25rem; }
.tn-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 1.25rem; }
.tn-extra .tn-span { grid-column: 1 / -1; }
.tn-check { display: inline-flex; align-items: center; gap: .5rem; min-height: 42px; cursor: pointer; }
@media (max-width: 640px) { .tn-page { padding-top: 1rem; } .tn-card { padding: 1.25rem; } }

/* ── Rodada 21: Kanban compartilhado ─────────────────────────────────────────── */
.kb-readonly .kanban-toolbar .btn-new-item,
.kb-readonly .kanban-toolbar .btn-outline-danger,
.kb-readonly #kanbanTrashContainer,
.kb-readonly #kbShareBtn,
.kb-readonly .btn-add-task,
.kb-readonly #kbCfgBtn,
.kb-readonly #kbTplBtn,
.kb-readonly #expiringTasksSection { display: none !important; }
.kb-readonly .kanban-card { cursor: pointer; }
.kb-ro-note { margin: -.25rem 0 1rem; padding: .55rem .9rem; border-radius: .6rem; background: #EFF6FF; color: #1E40AF; font-size: .84rem; }
[data-theme="dark"] .kb-ro-note { background: rgba(59,130,246,.12); color: #BFDBFE; }
#kbShareBtn { display: inline-flex; align-items: center; gap: .4rem; }
.kb-share-users { margin-top: .5rem; }
.kb-share-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--color-border, #E5E7EB); border-radius: .6rem; padding: .3rem; }
.kb-share-opt { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: .4rem; cursor: pointer; font-size: .86rem; }
.kb-share-opt:hover { background: rgba(55,124,236,.07); }
.kb-share-opt input { width: 16px; height: 16px; accent-color: var(--color-primary, #377CEC); flex-shrink: 0; }
.kb-share-opt span { display: flex; flex-direction: column; } .kb-share-opt small { font-size: .74rem; color: var(--color-text-secondary, #6B7280); }
.kb-share-all { margin-bottom: .3rem; }
.kb-share-now-title { margin: 1rem 0 .4rem; font-size: .8rem; font-weight: 700; color: var(--color-text-secondary, #6B7280); }
.kb-share-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.kb-share-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .3rem .2rem .65rem; border-radius: 999px; background: #EFF6FF; font-size: .8rem; }
.kb-share-chip small { color: #64748B; font-size: .7rem; }
.kb-share-chip button { border: 0; background: none; cursor: pointer; font-size: 1rem; line-height: 1; color: #64748B; padding: 0 .3rem; border-radius: 999px; }
.kb-share-chip button:hover { color: #DC2626; }
.kb-view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .6rem; }
.kb-view-head h3 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.kb-view-x { border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: #9CA3AF; }
.kb-view-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1rem; margin: 0 0 1rem; }
.kb-view-grid dt { font-size: .72rem; font-weight: 700; color: var(--color-text-secondary, #6B7280); }
.kb-view-grid dd { margin: .1rem 0 0; font-size: .88rem; }
.kb-view-col { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #fff; background: var(--kb-c); }
.kb-view-sub { margin: .75rem 0 .35rem; font-size: .82rem; font-weight: 700; }
.kb-view-desc { font-size: .9rem; line-height: 1.55; white-space: normal; }
.kb-view-cl { list-style: none; margin: 0; padding: 0; } .kb-view-cl li { padding: .2rem 0; font-size: .88rem; } .kb-view-cl li.done span:last-child { text-decoration: line-through; color: #94A3B8; }
.kb-view-ro { margin: 1rem 0 0; font-size: .78rem; color: var(--color-text-secondary, #6B7280); }
[data-theme="dark"] .kb-share-chip { background: rgba(59,130,246,.15); }
@media (max-width: 560px) { .kb-view-grid { grid-template-columns: 1fr 1fr; } }
