﻿:root {
  --bg: #fff8fb;
  --card: rgba(255, 255, 255, 0.95);
  --line: rgba(228, 138, 176, 0.25);
  --text: #3a2d33;
  --muted: #806875;
  --primary: #e48ab0;
  --primary-2: #f5c6dc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(248, 200, 220, 0.35), transparent 38%),
    radial-gradient(circle at 92% 28%, rgba(255, 240, 247, 0.9), transparent 40%),
    var(--bg);
}

.header {
  position: sticky;
  top: 0;
  z-index: 99;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-container img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.logo-text h1 {
  margin: 0;
  font-size: 20px;
}

.logo-text span {
  font-size: 13px;
  color: var(--muted);
}

#menu a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
}

.admin-wrap {
  max-width: 1120px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(228, 138, 176, 0.12);
}

.admin-card h2 {
  margin: 0 0 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.admin-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-btn {
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.admin-btn.primary {
  background: linear-gradient(90deg, var(--primary), #ce6a95);
  color: #fff;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
}

.admin-table img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.hidden {
  display: none;
}

.admin-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.image-uploader {
  margin-top: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.65);
}

.drop-zone {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(228, 138, 176, 0.08);
  color: var(--text);
}

.uploader-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.image-preview-wrap {
  margin-top: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.image-preview {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

@media (max-width: 768px) {
  .admin-wrap {
    margin: 14px auto 20px;
    padding: 0 10px;
  }

  .admin-card {
    padding: 14px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    flex-direction: column;
  }

  .admin-actions .admin-btn,
  .uploader-actions .admin-btn {
    width: 100%;
  }

  .admin-table {
    min-width: 0;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.8);
  }

  .admin-table td {
    border: none;
    padding: 8px 8px 8px 42%;
    position: relative;
    min-height: 36px;
  }

  .admin-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 8px;
    top: 8px;
    width: 38%;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
  }

  .admin-table td[data-label="Acciones"] .admin-btn {
    width: 100%;
    margin-bottom: 6px;
  }

  .admin-table td[data-label="Acciones"] .admin-btn:last-child {
    margin-bottom: 0;
  }
}
