/* ── Pegar al final de assets/css/main.css ─────────────────── */

/* ── Home ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1440 / 400;
  background: url('/assets/img/banner03.jpg') center top / cover no-repeat;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0;
}

/* Degradado que funde la imagen al fondo por abajo */
.hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 45%,
    rgba(245,245,240,0.6) 72%,
    #f5f5f0 100%
  );
  pointer-events: none;
}

/* Contenido sobre la imagen, pegado abajo */
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  padding: 0.5rem 1.25rem 2rem;
}
.hero-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}
.hero-content p {
  color: #1a1a1a;
  font-weight: 600;
  max-width: 520px;
  margin: 0 auto 1.25rem;
  text-shadow:
    0 0 6px #fff,
    0 0 12px #fff,
    1px 1px 0 #fff,
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff;
}
.hero-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: nowrap;
}
.btn-hero {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: #a0622a;
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-hero:hover { background: #7a4a1e; color: #fff; text-decoration: none; }

/* Móvil: imagen alternativa */
@media (max-width: 600px) {
  .hero {
    background-image: url('/assets/img/banner03m.jpg');
    aspect-ratio: 750 / 333;
  }
  .hero-content h1 { font-size: 1.3rem; }
  .hero-content { padding: 0.5rem 1rem 1.5rem; }
  .btn-hero { font-size: 0.82rem; padding: 0.45rem 0.85rem; }
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.home-recent h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.see-all { display: inline-block; margin-top: 0.75rem; font-size: 0.9rem; }

/* ── Botones ──────────────────────────────────────────────── */
.btn-secondary {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #333;
  cursor: pointer;
  background: #fff;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-secondary:hover { background: #f5f5f5; text-decoration: none; }

/* ── Listado de problemas ─────────────────────────────────── */
.problems-page h1 { font-size: 1.5rem; margin-bottom: 1.25rem; }

.filters-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}
.filters-form select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.875rem;
  background: #fff;
}
.btn-filter {
  padding: 0.4rem 0.9rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
}
.btn-reset {
  font-size: 0.875rem;
  color: #888;
}
.results-count { font-size: 0.85rem; color: #888; margin-bottom: 0.75rem; }

.problems-list { list-style: none; }
.problems-list li { border-bottom: 1px solid #f0f0f0; }
.problems-list li:last-child { border-bottom: none; }
.problem-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  color: inherit;
  flex-wrap: wrap;
}
.problem-link:hover { text-decoration: none; background: #fafafa; }
.problem-title { flex: 1; font-size: 0.95rem; }
.problem-meta  { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.collection-name { font-size: 0.75rem; color: #888; }
.tag-list { font-size: 0.75rem; color: #aaa; }

.pagination {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

/* ── Problema individual ──────────────────────────────────── */
.problem-page { max-width: 700px; }
.problem-meta-row  { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.tag-pill {
  font-size: 0.75rem;
  background: #eef2ff;
  color: #4338ca;
  padding: 0.1rem 0.55rem;
  border-radius: 99px;
}
.problem-description { color: #444; margin-bottom: 1.25rem; line-height: 1.7; }

.problem-actions { display: flex; gap: 0.5rem; }
.btn-icon {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
  color: #888;
  transition: color 0.15s, border-color 0.15s;
}
.btn-icon:hover  { border-color: #aaa; color: #333; }
.btn-icon.active { color: #f59e0b; border-color: #f59e0b; }

.sgf-viewer-wrap { margin: 1.25rem 0; }
.sgf-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.sgf-controls button {
  padding: 0.3rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}
.sgf-controls button:hover { background: #f5f5f5; }

.attempt-section {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.attempt-section .btn-primary  { width: auto; display: inline-block; }
.attempt-section .btn-secondary{ display: inline-block; }

.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }

.report-form { margin-top: 1.5rem; border-top: 1px solid #eee; padding-top: 1rem; }
.report-form h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.report-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  resize: vertical;
}
.report-form .btn-primary { width: auto; display: inline-block; }
.hidden { display: none !important; }
.login-prompt { margin-top: 1rem; }

/* ── Tsumego ──────────────────────────────────────────────── */
.tsumego-wrap { margin: 1.25rem 0; }
.tsumego-controls { margin-bottom: 1rem; }

.result-banner {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  transition: opacity 0.5s;
}
.result-banner.correct {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}
.result-banner.wrong {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}
.result-banner.fade-out { opacity: 0; }

.attempt-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}
.attempt-solved  { color: #166534; font-weight: 500; }
.attempt-pending { color: #92400e; }
.btn-text {
  background: none;
  border: none;
  color: #888;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}


/* ── Admin: página general ───────────────────────────────────── */
.admin-page { max-width: 900px; }

.admin-main-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e5e5;
}

.admin-section {
  margin-bottom: 3rem;
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-section-header h2 {
  font-size: 1.1rem;
  font-weight: 500;
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  width: auto;
  display: inline-block;
}

/* ── Tabla admin ─────────────────────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table th {
  text-align: left;
  padding: 0.45rem 0.75rem;
  border-bottom: 2px solid #e5e5e5;
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.admin-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.admin-table tr:hover td { background: #fafafa; }
.row-inactive td { opacity: 0.45; }
.row-inactive td:last-child { opacity: 1; }

/* ── Botones icono ───────────────────────────────────────────── */
.admin-actions { display: flex; gap: 0.25rem; align-items: center; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  color: #555;
  text-decoration: none;
  transition: background 0.12s;
}
.icon-btn:hover { background: #f0f0f0; color: #111; text-decoration: none; }
.icon-btn-danger { color: #dc2626; }
.icon-btn-danger:hover { background: #fef2f2; color: #b91c1c; }

/* ── Formularios admin ───────────────────────────────────────── */
.admin-form { max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.admin-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  resize: vertical;
}
.tags-check { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.check-label { display: flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; cursor: pointer; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; align-items: center; }
.form-actions .btn-primary { width: auto; display: inline-block; }

/* admin-bar eliminado */

/* ── SGF upload ──────────────────────────────────────────────── */
.sgf-upload-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.sgf-file-label {
  cursor: pointer;
  display: inline-block;
}

/* ── Cabecera del problema (3 líneas) ────────────────────────── */
.problem-header {
  display: block;
  margin-bottom: 0.75rem;
}

/* Línea 1: título + estrella + bandera */
.problem-header-line1 {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.problem-header-line1 h1 {
  font-size: 1.3rem;
  font-weight: 600;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  line-height: 1.3;
}
.problem-header-line1 .problem-actions {
  flex-shrink: 0;
}

/* Línea 2: dificultad + colección — se hereda de .problem-meta-row */

/* Línea 3: botonera */

.problem-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

/* Indicador turno */
.turn-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.turn-stone {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}
.turn-stone-black {
  background: radial-gradient(circle at 35% 35%, #555, #000);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.turn-stone-white {
  background: radial-gradient(circle at 35% 35%, #fff, #ccc);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  border: 1px solid #bbb;
}
.turn-stone-correct-first {
  background: #1d9e75;
  color: #fff;
}
.turn-stone-correct-first::after { content: '✓✓'; font-size: 0.7rem; }
.turn-stone-correct-other {
  background: #5dcaa5;
  color: #fff;
}
.turn-stone-correct-other::after { content: '✓'; font-size: 0.9rem; }
.turn-stone-wrong {
  background: #e24b4a;
  color: #fff;
}
.turn-stone-wrong::after { content: '✗'; font-size: 0.95rem; }

/* Botones toolbar */
.toolbar-btns {
  display: flex;
  gap: 0.35rem;
}
.tbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: none;
  background: #c94e1a;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.tbtn:hover:not(.tbtn-disabled) {
  background: #a83d12;
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
}
.tbtn:active:not(.tbtn-disabled) { transform: translateY(0); }
.tbtn-disabled {
  background: #e8c4b0;
  color: #b89080;
  cursor: not-allowed;
  pointer-events: none;
}

/* Info debajo del tablero */
.problem-info-below {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.problem-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Responsive botonera */
@media (max-width: 600px) {
  .tbtn { width: 40px; height: 40px; }
  .turn-stone { width: 32px; height: 32px; }
  .turn-indicator { width: 40px; height: 40px; }
  .turn-stone-correct-first::after,
  .turn-stone-correct-other::after,
  .turn-stone-wrong::after { font-size: 0.65rem; }
}

/* ── Carga masiva de SGFs ────────────────────────────────────── */
.bulk-results {
  background: var(--color-background-secondary, #f9f9f7);
  border: 0.5px solid var(--color-border-tertiary, #e5e5e5);
  border-radius: var(--border-radius-lg, 12px);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.bulk-results-title {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}
.bulk-results-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: 300px;
  overflow-y: auto;
}
.bulk-results-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  padding: 0.2rem 0;
}
.bulk-icon   { font-size: 0.85rem; flex-shrink: 0; }
.bulk-ok .bulk-icon   { color: #1d9e75; }
.bulk-err .bulk-icon  { color: #e24b4a; }
.bulk-fname  { font-family: var(--font-mono, monospace); color: var(--color-text-primary); }
.bulk-msg    { color: var(--color-text-secondary); }

.bulk-file-preview {
  list-style: none;
  margin-top: 0.4rem;
  max-height: 180px;
  overflow-y: auto;
  padding: 0;
}
.bulk-preview-item {
  font-size: 0.82rem;
  font-family: var(--font-mono, monospace);
  color: var(--color-text-secondary);
  padding: 0.1rem 0;
  border-bottom: 0.5px solid var(--color-border-tertiary, #f0f0f0);
}
.bulk-preview-item:last-child { border-bottom: none; }

/* ── Admin: filtros y scroll ─────────────────────────────────── */
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.admin-filters select,
.admin-filters input[type="text"] {
  padding: 0.35rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.875rem;
  background: #fff;
  height: 32px;
}
.admin-table-scroll {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
}
.admin-table-scroll .admin-table thead th {
  position: sticky;
  top: 0;
  background: #f9f9f7;
  z-index: 1;
}

/* ── Admin: badges de usuario ────────────────────────────────── */
.user-name   { font-weight: 500; font-size: 0.875rem; }
.user-badge  {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  margin-left: 0.3rem;
  font-weight: 600;
  vertical-align: middle;
}
.user-badge-admin   { background: #fef3c7; color: #92400e; }
.user-badge-blocked { background: #fee2e2; color: #991b1b; }
.user-badge-self    { background: #ede9fe; color: #5b21b6; }

/* ── Top de usuarios en home ─────────────────────────────────── */
.home-top { margin-bottom: 2.5rem; }
.home-top-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.top-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
}
.top-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.top-table thead th {
  padding: 0.55rem 0.75rem;
  background: #f9f9f7;
  border-bottom: 1px solid #e5e5e5;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}
.top-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s;
}
.top-table tbody tr:last-child { border-bottom: none; }
.top-table tbody tr:hover { background: #fafaf8; }
.top-row-me   { background: #f0fdf4 !important; }
.top-row-medal td:first-child { font-size: 1rem; }

.top-rank-col { width: 36px; text-align: center; }
.top-name-col { text-align: left; }
.top-icon-col { text-align: center; width: 60px; }

.top-rank   { text-align: center; padding: 0.45rem 0.5rem; }
.top-name   { padding: 0.45rem 0.75rem; font-weight: 500; }
.top-num    { text-align: center; padding: 0.45rem 0.5rem; color: #333; }
.top-green  { color: #1d9e75 !important; font-weight: 600; }
.top-time   { font-size: 0.8rem; color: #666; }

.top-th-icon   { font-size: 0.75rem; font-weight: 700; letter-spacing: -0.5px; }
.top-th-green  { color: #1d9e75; }
.top-th-double { font-size: 0.65rem; }
.top-th-small  { font-size: 0.65rem; }
.top-th-div    { color: #aaa; margin: 0 1px; }

@media (max-width: 600px) {
  .top-time { display: none; }
  .top-icon-col:nth-child(n+7) { display: none; }
  .top-table tbody td:nth-child(n+7) { display: none; }
}

/* ── Tarjeta con imagen de fondo ─────────────────────────────── */
.col-card-has-bg {
  background-size: cover;
  background-position: center;
  position: relative;
}
.col-card-has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: 0;
}
.col-card-has-bg > * { position: relative; z-index: 1; }
.col-card-has-bg .col-card-title { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.col-card-has-bg .col-card-label { color: rgba(255,255,255,0.75); }
.col-card-has-bg .col-card-pct   { text-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.col-card-has-bg .col-card-sub   { color: rgba(255,255,255,0.7); }

/* ── Upload de imágenes en formulario ────────────────────────── */
.img-upload-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.img-file-label { cursor: pointer; display: inline-block; }
.img-hint { font-size: 0.8rem; }
.img-preview {
  display: block;
  max-width: 480px;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  object-fit: cover;
  margin-top: 0.25rem;
}
.img-preview-sm {
  max-width: 120px;
  max-height: 120px;
}

/* ── Sección Continuar ───────────────────────────────────────── */
.continuar-section {
  margin-bottom: 2rem;
}
.continuar-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #aaa;
  margin-bottom: 0.6rem;
}
.continuar-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  /*padding: 0.75rem 1rem;*/
  padding: 0.5rem 0.1rem; /*OPG*/
  transition: box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
}
.continuar-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  transform: translateY(-2px);
  text-decoration: none;
}
.continuar-meta-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.705rem;
  font-weight: 600;
  color: #333;
  width: 100%;
  padding: 0px 14px 0px 14px; /*OPG*/
}
.continuar-collection {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continuar-board-wrap {
  line-height: 0;
  border-radius: 0px; /*OPG*/
  overflow: hidden;
  /*box-shadow: 0 2px 8px rgba(0,0,0,0.15);*/
}
.continuar-canvas {
  display: block;
  max-width: 320px;
  width: 100%;
  height: auto;
}
.continuar-meta-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #888;
  width: 100%;
}

@media (max-width: 600px) {
  .continuar-canvas { max-width: 260px; }
}

/* ── Grid de colecciones en /problemas ───────────────────────── */
.colecciones-section { margin-bottom: 2rem; }

.colecciones-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.colecciones-grid .continuar-card {
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  .colecciones-grid { gap: 0.5rem; }
}

/* ── Página de colección ─────────────────────────────────────── */
.col-page { max-width: 900px; }

.col-page-header {
  background: #d4c9a8;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}
/* Logo + nombre siempre en fila horizontal */
.col-page-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.col-page-logo {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.col-page-top h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #3b2f0f;
  margin: 0;
  line-height: 1.3;
}
.col-page-info { }
.col-page-desc { font-size: 0.85rem; color: #6b5a2e; margin-bottom: 0.5rem; }
.col-page-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #6b5a2e;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.col-page-pct { font-weight: 700; color: #3b2f0f; }
/* col-page-bar movido abajo */

/* ── Grid de tarjetas ────────────────────────────────────────── */
.prob-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.6rem;
}

.prob-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  padding: 0.5rem 0.5rem 0.4rem;
  text-decoration: none;
  color: inherit;
  background: #d4c9a8;
  border: 1.5px solid #b8a97a;
  transition: transform 0.12s, box-shadow 0.12s;
  cursor: pointer;
  min-width: 0;
}
.prob-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  text-decoration: none;
}

/* Colores de borde según estado */
.prob-card-primera  { border-color: #3bba4c; background: #d4e8d4; }
.prob-card-segunda  { border-color: #7dcf85; background: #daeeda; }
.prob-card-resuelta { border-color: #9ed8a4; background: #e0f0e0; }
.prob-card-fallada  { border-color: #e24b4a; background: #eed8d8; }
.prob-card-vista    { border-color: #ccc;    background: #e8e0cc; }
.prob-card-sin_intentar { border-color: #c4b88a; background: #d4c9a8; }

.prob-card-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: #3b2f0f;
  line-height: 1;
  letter-spacing: -0.5px;
}
.prob-card-date {
  font-size: 0.6rem;
  color: #7a6a3e;
}
.prob-card-body {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.prob-card-icon { flex-shrink: 0; line-height: 0; }
.prob-card-data {
  flex: 1;
  min-width: 0;
}
.prob-card-diff {
  font-size: 0.65rem;
  font-weight: 600;
  color: #3b2f0f;
  line-height: 1.2;
}
.prob-card-time {
  font-size: 0.6rem;
  color: #7a6a3e;
  line-height: 1.2;
}
.prob-card-fallos {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}
.prob-card-fallo-num {
  font-size: 0.65rem;
  font-weight: 600;
  color: #e24b4a;
  line-height: 1;
}

@media (max-width: 600px) {
  .prob-cards-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.4rem; }
  .col-page-logo { width: 60px; height: 60px; }
  .col-page-top h1 { font-size: 1.1rem; }
}

/* ── Enlace al nombre de colección en tarjetas ───────────────── */
.col-card-link {
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.col-card-link:hover { text-decoration: underline; }

/* ── Barra tricolor en página de colección ───────────────────── */
.col-page-bar {
  height: 8px;
  background: #b8a97a;
  border-radius: 99px;
  overflow: hidden;
  display: flex;
}
.col-page-bar-primera  { background: #1d9e75; height: 100%; }
.col-page-bar-mas      { background: #9fe1cb; height: 100%; }
.col-page-bar-fallados { background: #e24b4a; height: 100%; }

/* ── Botón colección en toolbar ──────────────────────────────── */
.tbtn-col {
  background: #e8dfc8;
  border: 1.5px solid #b8a97a;
  padding: 2px;
  overflow: hidden;
  margin-left: auto;   /* empuja a la derecha */
  color: #3b2f0f;
}
.tbtn-col:hover:not(.tbtn-disabled) {
  background: #d4c9a8;
  border-color: #8a7a4e;
}

/* ── Iconos favorito y reporte en tarjetas de colección ──────── */
.prob-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.2rem;
  margin-bottom: 0.25rem;
}
.prob-card-badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  padding-top: 1px;
}
.prob-card-badge-fav {
  font-size: 1rem;
  color: #f59e0b;
  line-height: 1;
}
.prob-card-badge-bug {
  font-size: 0.9rem;
  line-height: 1;
}

/* ── Reportes de error para admins en página de problema ─────── */
.admin-reports {
  margin-top: 2rem;
  border-top: 2px solid #fde68a;
  padding-top: 1rem;
}
.admin-reports-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 0.75rem;
}
.admin-report-item {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
}
.admin-report-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}
.admin-report-user   { font-weight: 600; color: #333; }
.admin-report-date   { color: #888; }
.admin-report-resolved { color: #1d9e75; font-weight: 500; }
.admin-report-comment {
  font-size: 0.875rem;
  color: #444;
  margin: 0 0 0.5rem;
  line-height: 1.5;
}
.admin-report-delete {
  background: none;
  border: 1px solid #fca5a5;
  color: #dc2626;
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
}
.admin-report-delete:hover { background: #fef2f2; }

/* ── Mini barra de progreso en tabla de usuario ──────────────── */
.col-mini-bar {
  height: 3px;
  background: #e5e5e5;
  border-radius: 99px;
  margin-top: 3px;
  overflow: hidden;
}
.col-mini-fill {
  height: 100%;
  background: #1d9e75;
  border-radius: 99px;
}

/* ── Paginación del panel admin ──────────────────────────────── */
.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.6rem 0 0.25rem;
}
.admin-pag-btn {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid #e5e5e5;
  border-radius: 5px;
  font-size: 0.8rem;
  color: #555;
  text-decoration: none;
  background: #fff;
}
.admin-pag-btn:hover { background: #f5f5f5; text-decoration: none; }
.admin-pag-active {
  background: #c94e1a !important;
  color: #fff !important;
  border-color: #c94e1a !important;
}

/* ── Accesos rápidos en /problemas ───────────────────────────── */
.quick-links-section { margin-bottom: 1.75rem; }

.quick-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.quick-group {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.quick-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding-top: 0.2rem;
  min-width: 70px;
}
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.quick-chip {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background: #f0ece2;
  border: 1px solid #d4c9a8;
  border-radius: 99px;
  font-size: 0.8rem;
  color: #3b2f0f;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.quick-chip:hover {
  background: #d4c9a8;
  border-color: #b8a97a;
  text-decoration: none;
  color: #3b2f0f;
}
.quick-chip-col {
  background: #e8f0fe;
  border-color: #b8d0f8;
  color: #1a3a6b;
}
.quick-chip-col:hover {
  background: #c8deff;
  border-color: #90b8f8;
  color: #1a3a6b;
}

@media (max-width: 600px) {
  .quick-group { flex-direction: column; gap: 0.3rem; }
  .quick-group-label { min-width: auto; }
}
