.modelos-btn-criar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.modelos-segmentos-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.modelos-segmento-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 10px;
  background: transparent;
  border: 1px solid var(--border-light-mode);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
}
.modelos-segmento-card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}
.modelos-segmento-card span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
  transition: color 0.15s;
}
.modelos-segmento-card:hover span,
.modelos-segmento-card.active span {
  color: var(--primary-color);
}
.modelos-segmento-card.active {
  border-color: var(--primary-color);
}
html.dark-theme .modelos-segmento-card {
  border-color: var(--border-dark-mode);
  background-color: var(--background-main-dark-mode);
}

.modelos-templates-section {
  display: none;
}
.modelos-templates-section.visible {
  display: block;
}
.modelos-templates-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px;
}

.modelos-templates-grid {
  background: var(--background-main);
  border: 1px solid var(--border-light-mode);
  border-radius: 12px;
  overflow: hidden;
}
html.dark-theme .modelos-templates-grid {
  background: var(--background-main-dark-mode);
  border-color: var(--border-dark-mode);
}

.modelos-table {
  width: 100%;
  border-collapse: collapse;
}
.modelos-table-th {
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-light-mode);
  background: var(--background-secondary, #f9fafb);
  text-align: left;
}
.modelos-table-th-action {
  text-align: right;
}
html.dark-theme .modelos-table-th {
  border-bottom-color: var(--border-dark-mode);
  background: var(--background-dark-mode-menu-lateral);
}
.modelos-table-row {
  border-bottom: 1px solid var(--border-light-mode);
}
html.dark-theme .modelos-table-row {
  border-bottom-color: var(--border-dark-mode);
}
.modelos-table-row:last-child {
  border-bottom: none;
}
.modelos-table-name {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}
.modelos-table-action {
  padding: 14px 16px;
  text-align: right;
  white-space: nowrap;
}

.modelos-badge-habilitado {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
html.dark-theme .modelos-badge-habilitado {
  background: #064e3b;
  color: #6ee7b7;
}

.modelos-btn-habilitar {
  padding: 8px 18px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.modelos-btn-habilitar:hover:not(:disabled) {
  opacity: 0.88;
}
.modelos-btn-habilitar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modelos-btn-desabilitar {
  padding: 8px 18px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 8px;
}
.modelos-btn-desabilitar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modelos-counter { margin: 12px 0 0; font-size: 0.8rem; color: var(--text-secondary); }

.modelos-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.modelos-empty i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

@media (max-width: 900px) {
  .modelos-segmentos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 560px) {
  .modelos-segmentos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
