/* ==========================================================================
   Google Stitch: Ticket Creation & Service Catalog Design System
   Design: CS HelpDesk Pro / Patrimônio Enterprise
   Palette: Cobalt Navy (#1E3A8A), Slate (#0F172A), Teal (#0D9488), Emerald (#059669)
   ========================================================================== */

/* Layout de 2 colunas para Abertura de Chamados */
.stitch-ticket-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .stitch-ticket-workspace {
    grid-template-columns: 1fr;
  }
}

/* Painel de Formulário Principal */
.stitch-form-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
  padding: 24px;
}

.stitch-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.stitch-section-number {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stitch-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

/* Matriz de Urgência & Impacto */
.stitch-matrix-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .stitch-matrix-container {
    grid-template-columns: 1fr;
  }
}

.stitch-selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stitch-segmented-control {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 6px;
}

.stitch-segment-btn {
  border: none;
  background: transparent;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.stitch-segment-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.stitch-segment-btn.active {
  background: #ffffff;
  color: #1e3a8a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Seletor Visual de Catálogo */
.stitch-catalog-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stitch-catalog-card-opt {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stitch-catalog-card-opt:hover {
  border-color: #93c5fd;
  background: #f8fafc;
  transform: translateY(-1px);
}

.stitch-catalog-card-opt.selected {
  border-color: #1e3a8a;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #1e3a8a;
}

.stitch-catalog-opt-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.stitch-catalog-opt-meta {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Painel Lateral Sticky de Resumo / SLA */
.stitch-summary-sidebar {
  position: sticky;
  top: 80px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.stitch-summary-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  color: #ffffff;
  padding: 18px 20px;
}

.stitch-summary-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: #ffffff;
}

.stitch-summary-header p {
  font-size: 12px;
  color: #93c5fd;
  margin: 0;
}

.stitch-summary-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stitch-sla-badge-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.stitch-priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  width: fit-content;
}

.stitch-priority-low {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.stitch-priority-medium {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.stitch-priority-high {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.stitch-priority-critical {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  animation: pulse-critical 2s infinite;
}

@keyframes pulse-critical {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
  70% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.stitch-sla-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.stitch-sla-metric-label {
  color: #64748b;
}

.stitch-sla-metric-val {
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: #0f172a;
}

/* Área de Upload Drag-and-Drop */
.stitch-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stitch-dropzone:hover,
.stitch-dropzone.dragover {
  border-color: #1e3a8a;
  background: #eff6ff;
}

.stitch-dropzone-icon {
  font-size: 28px;
  color: #64748b;
  margin-bottom: 8px;
}

.stitch-dropzone-text {
  font-size: 13px;
  color: #475569;
}

.stitch-dropzone-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.stitch-attachment-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  padding: 10px 14px;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 12px;
}

/* Gestão de Catálogo de Serviços */
.stitch-catalog-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.stitch-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.stitch-catalog-admin-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.15s ease;
}

.stitch-catalog-admin-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
}

.stitch-catalog-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.stitch-catalog-category-tag {
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 4px;
}

.stitch-catalog-sla-pills {
  display: flex;
  gap: 8px;
  font-size: 11px;
  margin-top: 8px;
}

.stitch-sla-pill {
  background: #eff6ff;
  color: #1e3a8a;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   MODO ESCURO - GOOGLE STITCH TICKET & CATALOG
   ========================================================================== */

[data-theme="dark"] .stitch-form-panel {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .stitch-section-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .stitch-section-number {
  background: #1e293b;
  color: #93c5fd;
}

[data-theme="dark"] .stitch-section-title {
  color: #f8fafc;
}

[data-theme="dark"] .stitch-segmented-control {
  background: #0d121f;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .stitch-segment-btn {
  color: #94a3b8;
}

[data-theme="dark"] .stitch-segment-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .stitch-segment-btn.active {
  background: #1e293b;
  color: #93c5fd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .stitch-catalog-card-opt {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .stitch-catalog-card-opt:hover {
  background: #161f33;
  border-color: #3b82f6;
}

[data-theme="dark"] .stitch-catalog-card-opt.selected {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

[data-theme="dark"] .stitch-catalog-opt-name {
  color: #f8fafc;
}

[data-theme="dark"] .stitch-catalog-opt-meta {
  color: #94a3b8;
}

[data-theme="dark"] .stitch-summary-sidebar {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .stitch-summary-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #090d16 100%);
}

[data-theme="dark"] .stitch-sla-badge-box {
  background: #0d121f;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .stitch-sla-metric-label {
  color: #94a3b8;
}

[data-theme="dark"] .stitch-sla-metric-val {
  color: #f8fafc;
}

[data-theme="dark"] .stitch-dropzone {
  background: #0d121f;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .stitch-dropzone:hover,
[data-theme="dark"] .stitch-dropzone.dragover {
  background: #161f33;
  border-color: #3b82f6;
}

[data-theme="dark"] .stitch-dropzone-text {
  color: #cbd5e1;
}

[data-theme="dark"] .stitch-dropzone-sub {
  color: #64748b;
}

[data-theme="dark"] .stitch-attachment-preview {
  background: #161f33;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

[data-theme="dark"] .stitch-catalog-admin-card {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .stitch-catalog-admin-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .stitch-catalog-category-tag {
  background: #1e293b;
  color: #94a3b8;
}

[data-theme="dark"] .stitch-sla-pill {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

