/* ═══════════════════════════════════════════════
   DiagnosKit — Administration (modal)
   ═══════════════════════════════════════════════ */

.admin-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 400;
  display: none;
}
.admin-fab.visible { display: flex; }

.admin-fab-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(58, 171, 219, 0.4);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.admin-fab-btn:hover {
  background: var(--blue-dark);
  transform: scale(1.08);
}

.admin-modal {
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
}
.admin-modal-header {
  padding: 22px 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.admin-modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
}
.admin-modal-body { padding: 22px 28px 28px; }

.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--gray-100);
}
.admin-tab {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}
.admin-tab:hover { color: var(--gray-700); }
.admin-tab.active {
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
}
.admin-panel { display: none; }
.admin-panel.active { display: block; }

.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.product-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--gray-500);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--gray-100);
  white-space: nowrap;
}
.product-table td {
  padding: 10px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-700);
}
.product-table tr:last-child td { border-bottom: none; }
.product-table tr:hover td { background: var(--gray-100); }

.tbl-code {
  font-family: monospace;
  font-size: 11px;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
}
.tbl-price { font-weight: 700; color: var(--green); }
.tbl-actions { display: flex; gap: 6px; align-items: center; }
.tbl-btn {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid transparent;
  background: none;
}
.tbl-btn-edit {
  background: var(--blue-light);
  color: var(--blue-dark);
  border-color: var(--blue-mid, #c2e8f6);
}
.tbl-btn-edit:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.tbl-btn-del {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.tbl-btn-del:hover {
  background: #dc2626;
  color: #fff;
}

.product-form { display: flex; flex-direction: column; gap: 16px; }
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding-top: 4px;
  border-top: 1px solid var(--gray-100);
  margin-top: 4px;
}
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%236B7C92' stroke-width='2' stroke-linecap='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
textarea.form-input { resize: vertical; min-height: 70px; }

.cat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--gray-100);
}
.cat-row:last-child { border-bottom: none; }
.cat-form-wrap {
  background: var(--gray-100);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: none;
}

@media (max-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr; }
  .admin-modal-body,
  .admin-modal-header { padding: 16px; }
  .admin-modal { max-height: 95vh; }
}
