/* ==============================================
   ADMIN BIDARTIGOS — Aba Extensões/Ferramentas
   Arquivo: admin-tools.css
============================================== */

.tools-help {
  color: #64748b;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.tools-token-box {
  margin-bottom: 1.5rem;
}

.tools-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr;
  gap: 1rem;
}

.tools-admin-toolbar {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.tools-admin-toolbar input,
.tools-admin-toolbar select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  background: #fcfcfd;
  color: #1e293b;
  transition: all 0.2s;
}

.tools-admin-toolbar input:focus,
.tools-admin-toolbar select:focus {
  border-color: #0D8F81;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(13,143,129,0.06);
}

#admin-tools-list {
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

#admin-tools-list::-webkit-scrollbar {
  width: 6px;
}

#admin-tools-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

#admin-tools-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

#admin-tools-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.tools-admin-item {
  align-items: flex-start;
}

.tools-admin-thumb {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border-radius: 18px;
  object-fit: cover;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.tools-admin-thumb-empty {
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: #0D8F81;
}

.tools-admin-info {
  align-items: flex-start;
  flex-direction: column;
  gap: 0.35rem;
}

.tools-admin-info p {
  width: 100%;
  color: #64748b;
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.tools-admin-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tools-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.tools-status-badge.published {
  color: #166534;
  background: #dcfce7;
}

.tools-status-badge.draft {
  color: #92400e;
  background: #fef3c7;
}

.tools-status-badge.archived {
  color: #475569;
  background: #e2e8f0;
}

.tools-admin-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.tools-admin-links a {
  color: #0D8F81;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.tools-admin-links a:hover {
  text-decoration: underline;
}

.tools-image-preview {
  margin-top: 0.8rem;
}

.tools-image-preview img {
  max-width: 240px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  display: block;
}

.tools-image-preview small {
  display: block;
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.78rem;
}

/* Dark mode */
body.dark-mode .tools-help,
body.dark-mode .tools-admin-info p,
body.dark-mode .tools-image-preview small {
  color: #9ca3af;
}

body.dark-mode .tools-admin-toolbar input,
body.dark-mode .tools-admin-toolbar select {
  background: #111827;
  border-color: #1e2a36;
  color: #e5e7eb;
}

body.dark-mode .tools-admin-thumb {
  background: #111827;
  border-color: #1e2a36;
}

body.dark-mode .tools-admin-thumb-empty {
  color: #27f0d7;
}

body.dark-mode #admin-tools-list {
  scrollbar-color: #3f5568 #1e2a36;
}

body.dark-mode #admin-tools-list::-webkit-scrollbar-track {
  background: #1e2a36;
}

body.dark-mode #admin-tools-list::-webkit-scrollbar-thumb {
  background: #3f5568;
}

body.dark-mode .tools-status-badge.published {
  color: #bbf7d0;
  background: #064e3b;
}

body.dark-mode .tools-status-badge.draft {
  color: #fde68a;
  background: #78350f;
}

body.dark-mode .tools-status-badge.archived {
  color: #cbd5e1;
  background: #334155;
}

@media (max-width: 720px) {
  .tools-form-grid,
  .tools-admin-toolbar {
    grid-template-columns: 1fr;
  }

  .tools-admin-item {
    align-items: flex-start;
  }

  .tools-admin-thumb {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 14px;
  }
}
