/* ═══════════════════════════════════════════════════════════════
   Templates Module — Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Tab Bar ──────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-btn {
  padding: 10px 18px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--mid-gray);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ── Page Header ──────────────────────────────────────────────── */
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Table ─────────────────────────────────────────────────────── */
.tmpl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tmpl-table th {
  background: var(--bg);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}
.tmpl-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.tmpl-table tr:hover td {
  background: var(--bg-alt);
}

/* ── Download Buttons ─────────────────────────────────────────── */
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
  border: 1px solid;
}
.dl-btn-docx {
  color: #2b579a;
  border-color: #2b579a;
  background: rgba(43,87,154,0.05);
}
.dl-btn-docx:hover {
  background: #2b579a;
  color: #fff;
}
.dl-btn-pdf {
  color: #c62828;
  border-color: #c62828;
  background: rgba(198,40,40,0.05);
}
.dl-btn-pdf:hover {
  background: #c62828;
  color: #fff;
}

/* ── Badge ─────────────────────────────────────────────────────── */
.tmpl-no {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--primary);
}
.badge-yes {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.badge-no {
  background: #f5f5f5;
  color: #999;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* ── Empty State ──────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--mid-gray);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ── Responsive ───────────────────────────────────────────────── */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .tab-btn { padding: 8px 12px; font-size: 12px; }
}
