/* ConstructOne — UI Components Library */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

.btn-amber {
  background-color: var(--accent-amber);
  color: #11141a;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}
.btn-amber:hover:not(:disabled) {
  background-color: var(--accent-amber-hover);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
  background-color: var(--bg-card);
  border-color: var(--border-subtle);
  color: var(--text-main);
}
.btn-secondary:hover:not(:disabled) {
  background-color: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-medium);
  color: var(--text-main);
}
.btn-outline:hover:not(:disabled) {
  background-color: var(--bg-card);
  border-color: var(--text-dim);
}

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.btn-icon:hover {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
  border-color: var(--border-medium);
}

/* Cards & Surface Containers */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Highlights / Integration cards */
.integration-card {
  background: linear-gradient(145deg, #181c26 0%, #13161f 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.integration-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background-color: #1e2433;
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  flex-shrink: 0;
}

.integration-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.integration-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Stat KPI Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.stat-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 700;
}
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.table th {
  background-color: #151821;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color 0.1s ease;
}

.table tbody tr:hover {
  background-color: var(--bg-card-hover);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Badges & Status Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-em-andamento, .badge-aprovado, .badge-ativo {
  background-color: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-concluida, .badge-recebido, .badge-pago {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pendente, .badge-solicitacao, .badge-cotacao, .badge-planejamento {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-atrasada, .badge-cancelada, .badge-inativo, .badge-vencido {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-pausada {
  background-color: rgba(156, 163, 175, 0.15);
  color: #d1d5db;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

/* Filter Bar Container */
.filter-bar {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 160px;
  flex: 1;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-label.required::after {
  content: " *";
  color: var(--danger);
}

.form-control {
  width: 100%;
  height: 40px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 0.85rem;
  color: var(--text-main);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.form-control::placeholder {
  color: var(--text-dim);
}

textarea.form-control {
  height: auto;
  min-height: 85px;
  padding: 0.75rem;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-col {
  flex: 1;
  min-width: 200px;
}

.form-feedback {
  font-size: 0.75rem;
  color: var(--danger);
}

/* Checkbox & Radio */
.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.custom-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.75rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: #60a5fa;
  border-bottom-color: var(--primary);
}

.tab-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background-color: var(--danger);
  color: #fff;
  font-weight: 700;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.modal-open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-backdrop.modal-open .modal-dialog {
  transform: scale(1);
}

.modal-dialog.modal-lg { max-width: 860px; }
.modal-dialog.modal-xl { max-width: 1100px; }

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}
.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: #151821;
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #262c3a;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-bar-fill.success {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.progress-bar-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Conferência / Quality Checklist Table */
.checklist-table {
  width: 100%;
  border-collapse: collapse;
}

.checklist-table th, .checklist-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

.checklist-table th {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.checklist-radio-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.checklist-pill-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-medium);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.15s;
}

.checklist-pill-label input {
  display: none;
}

.checklist-pill-label.ok-checked {
  background-color: var(--success);
  border-color: var(--success);
  color: #fff;
}

.checklist-pill-label.pend-checked {
  background-color: var(--warning);
  border-color: var(--warning);
  color: #000;
}

.checklist-pill-label.na-checked {
  background-color: #4b5563;
  border-color: #4b5563;
  color: #fff;
}

/* Toast Notifications Container */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  background-color: #1e2430;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  animation: slideInUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
}

@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #1a1e27;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.empty-state-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 380px;
  margin-bottom: 1.25rem;
}

/* File / Cloud Drive Grid */
.drive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.drive-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.drive-item:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.drive-item-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drive-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.drive-item-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* Fiscal & XML Importer UI Components */
.xml-dropzone {
  border: 2px dashed rgba(59, 130, 246, 0.4);
  background: rgba(30, 41, 59, 0.4);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.xml-dropzone:hover, .xml-dropzone.drag-active {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

.dropzone-icon {
  color: #60a5fa;
  margin-bottom: 0.75rem;
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.dropzone-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.dropzone-title span {
  color: #60a5fa;
  text-decoration: underline;
}

.dropzone-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 320px;
}

/* Etapas & Conferência Form Styles */
.etapa-form-row {
  transition: background-color 0.2s ease;
}

.etapa-form-row:hover {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

.etapa-form-row.etapa-row-ok {
  background-color: rgba(16, 185, 129, 0.06) !important;
}

.etp-chk-label:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Header Help Badge ("Aba de Ajuda ao lado do Online/Offline")
   ========================================================================== */
.header-help-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(37, 99, 235, 0.18));
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  user-select: none;
}

.header-help-badge:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(37, 99, 235, 0.35));
  border-color: #f59e0b;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.header-help-badge svg {
  color: #f59e0b;
  transition: transform 0.2s ease;
}

.header-help-badge:hover svg {
  transform: scale(1.15) rotate(5deg);
  color: #fff;
}

/* ==========================================================================
   Wiki Help Center Components & Layout
   ========================================================================== */
.wiki-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1300px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.wiki-wrapper.wiki-in-modal {
  padding-bottom: 0;
}

.wiki-topbar {
  padding: 1rem 1.25rem;
  background: linear-gradient(145deg, #181c26 0%, #12151e 100%);
  border: 1px solid var(--border-medium);
}

.wiki-topbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wiki-brand-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wiki-company-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

.wiki-search-box {
  position: relative;
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
}

.wiki-search-box svg {
  position: absolute;
  left: 0.85rem;
  color: var(--text-dim);
  pointer-events: none;
}

.wiki-search-box input {
  width: 100%;
  padding: 0.6rem 2.4rem 0.6rem 2.4rem;
  background-color: rgba(15, 18, 25, 0.8);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.wiki-search-box input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}

.btn-clear-search {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.85rem;
}
.btn-clear-search:hover { color: #fff; }

/* Grid Layout */
.wiki-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .wiki-grid {
    grid-template-columns: 1fr;
  }
}

/* Wiki Sidebar Nav */
.wiki-sidebar {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: sticky;
  top: 80px;
}

.wiki-sidebar-header {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.wiki-sidebar-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wiki-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wiki-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.wiki-nav-item:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.wiki-nav-item.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.05));
  border-color: rgba(37, 99, 235, 0.4);
  color: #60a5fa;
  font-weight: 700;
}

.wiki-nav-icon {
  font-size: 1rem;
}

.wiki-sidebar-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.wiki-help-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-size: 0.78rem;
  color: #fbbf24;
}

.wiki-help-box p {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Wiki Main Article Area */
.wiki-content {
  padding: 1.75rem;
  min-height: 550px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow-y: auto;
}

.wiki-article {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wiki-article-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-medium);
}

.wiki-breadcrumb {
  font-size: 0.78rem;
  color: #60a5fa;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.wiki-article-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.35rem;
}

.wiki-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Callouts */
.wiki-callout {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.5;
}

.wiki-callout.info {
  background: rgba(37, 99, 235, 0.1);
  border-left: 4px solid #2563eb;
  color: #93c5fd;
}

.wiki-callout.tip {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid #10b981;
  color: #6ee7b7;
}

.wiki-callout strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: #fff;
}

/* Feature Cards Grid */
.wiki-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.wiki-feature-card {
  background: rgba(15, 18, 25, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.wiki-feature-card .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.wiki-feature-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.wiki-feature-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Tables in Wiki */
.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 0.82rem;
}

.wiki-table th {
  background-color: rgba(20, 24, 35, 0.9);
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: 700;
  color: #fff;
  border-bottom: 2px solid var(--border-medium);
}

.wiki-table td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.wiki-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Detailed Function List */
.wiki-function-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.wiki-func-item {
  background: rgba(18, 22, 31, 0.8);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.func-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.func-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fbbf24;
}

.func-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  font-weight: 700;
}

.wiki-func-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Prints Mockups (Capturas Visuais de Exemplo) */
.wiki-print-frame {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0.75rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.wiki-print-browser-bar {
  background: #161b22;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #21262d;
}

.wiki-print-dots {
  display: flex;
  gap: 6px;
}

.wiki-print-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.wiki-print-dots .dot.red { background: #ff5f56; }
.wiki-print-dots .dot.yellow { background: #ffbd2e; }
.wiki-print-dots .dot.green { background: #27c93f; }

.wiki-print-url {
  font-size: 0.72rem;
  color: #8b949e;
  font-family: monospace;
  background: #0d1117;
  padding: 2px 12px;
  border-radius: 4px;
  border: 1px solid #21262d;
}

.badge-status-online {
  font-size: 0.7rem;
  color: #3fb950;
  font-weight: 600;
}

.wiki-print-header-sim {
  background: #161b22;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #30363d;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wiki-print-company {
  font-size: 0.8rem;
  color: #c9d1d9;
}

.wiki-print-screen-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #58a6ff;
}

.wiki-print-body-content {
  padding: 1.25rem;
  background: #0d1117;
}

.wiki-print-body-content.flex-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.wiki-print-sidebar-sim {
  width: 180px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.5rem;
}

.wiki-print-sidebar-sim .item {
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  color: #8b949e;
  border-radius: 4px;
  margin-bottom: 2px;
}

.wiki-print-sidebar-sim .item.active {
  background: #1f6feb;
  color: #fff;
  font-weight: 700;
}

.wiki-print-callout-overlay {
  flex: 1;
}

.pointer-box {
  background: rgba(245, 158, 11, 0.15);
  border: 1px stroke #f59e0b;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.82rem;
  color: #fbbf24;
}

.wiki-print-pointer-callout {
  margin-top: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-mock-highlight {
  background: #f59e0b;
  color: #000;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.mock-dash-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.mock-dash-card {
  padding: 0.75rem;
  border-radius: 6px;
  background: #161b22;
  border: 1px solid #30363d;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-dash-card.blue { border-left: 3px solid #1f6feb; }
.mock-dash-card.yellow { border-left: 3px solid #d29922; }
.mock-dash-card.green { border-left: 3px solid #238636; }

.mock-dash-card .lbl { font-size: 0.68rem; color: #8b949e; font-weight: 700; }
.mock-dash-card .val { font-size: 1rem; color: #fff; font-weight: 800; }
.mock-dash-card .sub { font-size: 0.7rem; color: #8b949e; }

.mock-table-wrap {
  overflow-x: auto;
}

.mock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.mock-table th { background: #161b22; padding: 0.5rem; text-align: left; color: #8b949e; border-bottom: 1px solid #30363d; }
.mock-table td { padding: 0.5rem; color: #c9d1d9; border-bottom: 1px solid #21262d; }
.mock-table td.winner { background: rgba(35, 134, 54, 0.2); color: #3fb950; font-weight: 700; }

.badge-ok { background: rgba(35, 134, 54, 0.2); color: #3fb950; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; }
.badge-danger { background: rgba(218, 54, 51, 0.2); color: #f85149; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; }

/* Wiki Search Results */
.wiki-search-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wiki-search-result-card {
  background: rgba(18, 22, 31, 0.9);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wiki-search-result-card:hover {
  border-color: #3b82f6;
  transform: translateX(4px);
  background: rgba(37, 99, 235, 0.08);
}

.wiki-search-result-card h4 {
  font-size: 0.95rem;
  color: #60a5fa;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.wiki-search-result-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-link-search {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #fbbf24;
  font-weight: 700;
}

/* Modal Backdrop para Wiki */
.wiki-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.wiki-modal-container {
  width: 100%;
  max-width: 1250px;
  max-height: 90vh;
  background-color: var(--bg-body);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wiki-modal-header {
  padding: 1rem 1.5rem;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wiki-modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wiki-modal-title h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.wiki-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.wiki-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-close-wiki {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-close-wiki:hover {
  background: var(--danger);
  border-color: var(--danger);
}

.wiki-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}



