/* ===== TEXTOS PRÉ-DEFINIDOS MODULE ===== */

/* ---- Header ---- */
.tp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.tp-header h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  margin: 0;
}
.tp-header p {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 4px 0 0;
}
.tp-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ---- Toolbar ---- */
.tp-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tp-categorias {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tp-cat-btn {
  padding: 6px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.tp-cat-btn:hover {
  border-color: #dc2626;
  color: #dc2626;
}
.tp-cat-btn.tp-cat-active {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.tp-search-input {
  flex: 1;
  min-width: 180px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.75rem;
  color: #374151;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}
.tp-search-input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}
.tp-search-input::placeholder {
  color: #9ca3af;
}

/* ---- Card Grid ---- */
.tp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.tp-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.tp-card:hover {
  border-color: #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.tp-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.tp-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}
.tp-card-cat {
  font-size: 0.55rem;
  font-weight: 800;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.tp-card-body {
  font-size: 0.7rem;
  color: #6b7280;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  word-break: break-word;
}
.tp-card-actions {
  display: flex;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}
.tp-card-actions .dh-btn-ghost {
  font-size: 0.65rem;
  padding: 6px 12px;
  height: auto;
}
.tp-card-actions .dh-btn-danger-ghost {
  font-size: 0.65rem;
  padding: 6px 12px;
  height: auto;
  border: none;
  background: none;
  color: #dc2626;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}
.tp-card-actions .dh-btn-danger-ghost:hover {
  background: #fef2f2;
}

/* ---- Edit Modal Form ---- */
.tp-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tp-form-grid .span-2 {
  grid-column: 1 / -1;
}
.tp-form-grid .dh-label {
  display: block;
  margin-bottom: 6px;
}

/* ---- Empty / Loading / Error states ---- */
.tp-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}
.tp-empty svg {
  margin-bottom: 12px;
  opacity: 0.4;
}
.tp-empty p {
  font-size: 0.75rem;
  margin: 0;
}
.tp-empty .tp-empty-title {
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 4px;
}
.tp-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 0.75rem;
}
