/* AMPA VEDRUNA — Tablón de anuncios de uniformes */

.tb-page { background: var(--bg-gray); min-height: 100vh; }

/* ---------- Cabecera ---------- */
.tb-hero {
  position: relative;
  overflow: hidden;
  padding: 132px 0 56px;
  color: #fff;
  background:
    radial-gradient(1200px 380px at 85% -10%, rgba(165,202,47,.35), transparent 60%),
    linear-gradient(135deg, var(--primary-dark), var(--primary) 62%, var(--primary-light));
}
.tb-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.10) 1.4px, transparent 1.6px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 90%);
  pointer-events: none;
}
.tb-hero .container { position: relative; z-index: 1; text-align: center; }
.tb-hero-tag {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.14); font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px;
}
.tb-hero h1 {
  font-family: var(--font-display); font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.12; margin-bottom: 14px; color: #fff;
}
.tb-hero h1 span { color: var(--gold); }
.tb-hero p.lead { max-width: 620px; margin: 0 auto 22px; font-size: 1.08rem; color: #e6f0cf; }
.tb-promises { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tb-promise {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; font-size: .86rem; font-weight: 600;
}
.tb-promise i { color: var(--gold); }
.tb-deco { display: flex; justify-content: center; gap: 14px; margin-top: 30px; opacity: .9; }
.tb-deco svg, .tb-deco img { width: 54px; height: 54px; background: rgba(255,255,255,.13); border-radius: 14px; padding: 6px; }

/* ---------- Aviso fijo ---------- */
.tb-notice {
  max-width: 980px; margin: 12px auto 0; position: relative; z-index: 2;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 4px solid var(--accent); padding: 14px 20px;
  font-size: .9rem; color: var(--text-muted); line-height: 1.55;
}
.tb-notice strong { color: var(--text); }
.tb-notice a { color: var(--primary); font-weight: 600; text-decoration: underline; }

.tb-wrap { max-width: 1120px; margin: 0 auto; padding: 34px 20px 70px; }

/* ---------- Aviso de fase de pruebas ---------- */
.tb-beta {
  max-width: 980px; margin: -26px auto 0; display: flex; gap: 14px; align-items: flex-start;
  background: #fff8e1; border: 1.5px solid #f0d98a; border-radius: var(--radius); padding: 14px 20px;
  font-size: .9rem; line-height: 1.55; color: #5c4700; position: relative; z-index: 2;
}
.tb-beta i { font-size: 1.3rem; color: #c99a00; margin-top: 2px; }
.tb-beta a { color: #7a5a00; font-weight: 700; text-decoration: underline; }
.tb-beta-tag { display: inline-block; padding: 1px 9px; border-radius: 999px; background: #fff; border: 1px solid #f0d98a; font-weight: 800; font-size: .78rem; }
.tb-badge.demo { background: #fff8e1; color: #7a5a00; border: 1px solid #f0d98a; }
.tb-card.is-demo { box-shadow: 0 4px 24px rgba(201,154,0,.12); }
@media (max-width: 640px) { .tb-beta { margin: -18px 12px 0; padding: 12px 14px; font-size: .84rem; } }

/* ---------- Estados ---------- */
.tb-state {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 44px 26px; text-align: center; max-width: 560px; margin: 40px auto 0;
}
.tb-state h2 { font-family: var(--font-display); color: var(--primary); font-size: 1.35rem; margin-bottom: 8px; }
.tb-state p { color: var(--text-muted); margin-bottom: 20px; }
.tb-state .tb-big-ico { font-size: 2.4rem; color: var(--accent); margin-bottom: 12px; }
.tb-hidden { display: none !important; }

/* ---------- Barra de filtros ---------- */
.tb-toolbar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.tb-toolbar-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.tb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tb-btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 20px; border-radius: 999px; border: 2px solid transparent;
  font: 700 .92rem var(--font); cursor: pointer; transition: var(--transition);
}
.tb-btn-primary { background: var(--primary); color: #fff; }
.tb-btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(74,112,16,.3); }
.tb-btn-ghost { background: #fff; color: var(--primary); border-color: var(--border); }
.tb-btn-ghost:hover { border-color: var(--primary); }
.tb-btn-danger { background: #fff; color: #b3261e; border-color: #f0c9c6; }
.tb-btn-danger:hover { background: #fdf0ef; }
.tb-btn-sm { padding: 8px 14px; font-size: .82rem; }
.tb-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.tb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-chip {
  padding: 8px 15px; border-radius: 999px; background: #fff; border: 2px solid var(--border);
  font: 600 .86rem var(--font); color: var(--text); cursor: pointer; transition: var(--transition);
}
.tb-chip:hover { border-color: var(--accent); }
.tb-chip.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }

.tb-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tb-select {
  padding: 9px 14px; border-radius: 999px; border: 2px solid var(--border); background: #fff;
  font: 600 .86rem var(--font); color: var(--text);
}
.tb-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; cursor: pointer; user-select: none; }
.tb-toggle input { accent-color: var(--primary); width: 18px; height: 18px; }
.tb-count { color: var(--text-muted); font-size: .86rem; margin-left: auto; }
.tb-search-wrap { position: relative; display: flex; align-items: center; flex: 1 1 180px; min-width: 160px; max-width: 260px; }
.tb-search-wrap i { position: absolute; left: 14px; color: var(--text-muted); font-size: .8rem; pointer-events: none; }
.tb-search-sm { width: 100%; padding: 9px 14px 9px 34px; border-radius: 999px; border: 2px solid var(--border); background: #fff; font: 600 .86rem var(--font); color: var(--text); }
.tb-search-sm:focus { outline: none; border-color: var(--accent); }
.tb-clear { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #b3261e; border-color: #f0c9c6; }
.tb-clear:hover { background: #fdf0ef; }

/* ---------- Tarjetas ---------- */
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.tb-card {
  position: relative; display: flex; flex-direction: column; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: var(--transition);
}
.tb-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tb-card.is-reserved { opacity: .82; }
.tb-art {
  position: relative; height: 176px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eef3df, #e2ebc8);
}
.tb-art[data-group="educacion-fisica"] { background: linear-gradient(160deg, #eaf4d4, #d9eab0); }
.tb-art[data-group="complementos"]     { background: linear-gradient(160deg, #f4efe0, #ebe2c6); }
.tb-art[data-group="bicentenario"]     { background: linear-gradient(160deg, #fdf5d3, #f6e7a5); }
.tb-art[data-group="algodon"]          { background: linear-gradient(160deg, #eef0f7, #dfe4f2); }
.tb-art svg, .tb-art img { width: 138px; height: 138px; filter: drop-shadow(0 6px 10px rgba(34,58,99,.25)); transition: var(--transition); }
.tb-card:hover .tb-art svg, .tb-card:hover .tb-art img { transform: scale(1.06) rotate(-2deg); }
.tb-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; }
.tb-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.tb-badge.donation { background: var(--primary); color: #fff; }
.tb-badge.donation i { color: var(--gold); }
.tb-badge.old { background: #fff7e0; color: #8a6a00; }
.tb-badge.mine { background: var(--text); color: #fff; }
.tb-ribbon {
  position: absolute; bottom: 10px; right: 10px; background: #8a6a00; color: #fff;
  padding: 4px 11px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
}
.tb-body { padding: 16px 18px 6px; flex: 1; }
.tb-name { font-family: var(--font-display); font-size: 1.04rem; color: var(--text); line-height: 1.25; margin-bottom: 8px; }
.tb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tb-tag { padding: 3px 10px; border-radius: 8px; background: var(--bg-gray); font-size: .78rem; font-weight: 600; color: var(--text); }
.tb-tag.wear { background: #fff8e1; color: #7a5a00; }
.tb-tag.size { background: #e4edcd; color: var(--primary-dark); }
.tb-cond { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-muted); margin-bottom: 8px; }
.tb-dots { display: inline-flex; gap: 3px; }
.tb-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); display: block; }
.tb-dots i.on { background: var(--accent); }
.tb-note {
  font-size: .86rem; color: var(--text); line-height: 1.5; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  background: #fbfcf6; border-radius: 8px; padding: 7px 10px;
}
.tb-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 18px 16px; }
.tb-when { font-size: .76rem; color: var(--text-muted); }
.tb-report {
  background: none; border: none; color: var(--text-muted); font-size: .76rem; cursor: pointer;
  text-decoration: underline; padding: 4px; font-family: var(--font);
}
.tb-report:hover { color: #b3261e; }
.tb-card .tb-btn { width: 100%; margin: 0 18px 4px; width: calc(100% - 36px); }

.tb-empty { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.tb-empty .tb-big-ico { font-size: 2.6rem; color: var(--accent); margin-bottom: 12px; }
.tb-empty h3 { font-family: var(--font-display); color: var(--primary); margin-bottom: 6px; }

/* ---------- Ventanas ---------- */
.tb-overlay {
  position: fixed; inset: 0; z-index: 2000; background: rgba(30,40,15,.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  backdrop-filter: blur(3px); animation: tbFade .18s ease-out;
}
.tb-modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 620px; max-height: calc(100vh - 32px);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: tbPop .22s cubic-bezier(.2,.9,.3,1.2);
}
.tb-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 12px; border-bottom: 1px solid var(--border); }
.tb-modal-head h2 { font-family: var(--font-display); font-size: 1.18rem; color: var(--primary); }
.tb-x { background: none; border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; flex: none; }
.tb-x:hover { background: var(--bg-gray); }
.tb-modal-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.tb-modal-foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--border); background: #fbfcf6; }
.tb-steps { display: flex; gap: 6px; }
.tb-steps i { width: 26px; height: 5px; border-radius: 4px; background: var(--border); display: block; transition: var(--transition); }
.tb-steps i.on { background: var(--primary); }

.tb-h3 { font-family: var(--font-display); font-size: 1.05rem; color: var(--text); margin-bottom: 4px; }
.tb-help { font-size: .86rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.tb-search {
  width: 100%; padding: 11px 16px; border-radius: 999px; border: 2px solid var(--border);
  font: 500 .95rem var(--font); margin-bottom: 12px;
}
.tb-search:focus, .tb-input:focus, .tb-textarea:focus, .tb-sel:focus { outline: none; border-color: var(--accent); }
.tb-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.tb-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 9px;
  background: #fff; border: 2px solid var(--border); border-radius: 14px; cursor: pointer;
  font: 600 .76rem/1.25 var(--font); color: var(--text); text-align: center; transition: var(--transition);
}
.tb-tile svg, .tb-tile img { width: 64px; height: 64px; }
.tb-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tb-tile.is-on { border-color: var(--primary); background: #f3f8e6; box-shadow: 0 0 0 3px rgba(106,158,24,.18); }
.tb-group-label { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin: 14px 0 8px; }
.tb-group-label:first-child { margin-top: 0; }

.tb-sizes { display: flex; flex-wrap: wrap; gap: 10px; }
.tb-size {
  min-width: 78px; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--border); background: #fff;
  cursor: pointer; text-align: center; font-family: var(--font); transition: var(--transition);
}
.tb-size b { display: block; font-size: 1.1rem; color: var(--text); font-family: var(--font-display); }
.tb-size small { display: block; font-size: .7rem; color: var(--text-muted); margin-top: 1px; }
.tb-size:hover { border-color: var(--accent); }
.tb-size.is-on { border-color: var(--primary); background: #f3f8e6; box-shadow: 0 0 0 3px rgba(106,158,24,.18); }

.tb-field { margin-bottom: 18px; }
.tb-label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 8px; color: var(--text); }
.tb-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.tb-opt {
  padding: 10px 12px; border-radius: 12px; border: 2px solid var(--border); background: #fff; cursor: pointer;
  font: 600 .84rem var(--font); text-align: left; color: var(--text); transition: var(--transition);
}
.tb-opt small { display: block; font-weight: 500; color: var(--text-muted); font-size: .72rem; margin-top: 2px; }
.tb-opt:hover { border-color: var(--accent); }
.tb-opt.is-on { border-color: var(--primary); background: #f3f8e6; }
.tb-input, .tb-textarea, .tb-sel {
  width: 100%; padding: 11px 14px; border: 2px solid var(--border); border-radius: 12px; font: 500 .95rem var(--font); background: #fff;
}
.tb-textarea { resize: vertical; min-height: 78px; }
.tb-counter { text-align: right; font-size: .72rem; color: var(--text-muted); margin-top: 3px; }
.tb-money { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.tb-money .tb-input { max-width: 140px; }

.tb-summary { display: flex; gap: 14px; align-items: center; background: var(--bg-gray); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.tb-summary svg, .tb-summary img { width: 72px; height: 72px; flex: none; }
.tb-summary div b { font-family: var(--font-display); }
.tb-summary div span { display: block; font-size: .84rem; color: var(--text-muted); }
.tb-check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; line-height: 1.5; margin: 12px 0; cursor: pointer; }
.tb-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.tb-check a { color: var(--primary); text-decoration: underline; font-weight: 600; }
.tb-info { background: #f3f8e6; border-radius: 12px; padding: 11px 14px; font-size: .84rem; color: var(--text); line-height: 1.55; margin-bottom: 12px; }
.tb-info i { color: var(--primary); margin-right: 6px; }
.tb-msg { font-size: .86rem; margin-top: 10px; min-height: 1.2em; }
.tb-msg.err { color: #b3261e; }
.tb-msg.ok { color: var(--primary); font-weight: 600; }

.tb-mine-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tb-mine-row:last-child { border-bottom: none; }
.tb-mine-row svg, .tb-mine-row img { width: 54px; height: 54px; flex: none; }
.tb-mine-info { flex: 1; min-width: 150px; }
.tb-mine-info b { display: block; font-size: .94rem; }
.tb-mine-info span { font-size: .78rem; color: var(--text-muted); }
.tb-mine-info .tb-meta { display: block; margin-top: 3px; }
.tb-mine-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800; background: #e4edcd; color: var(--primary-dark); margin-right: 6px; }
.tb-status.off { background: #eee; color: #666; }
.tb-status.warn { background: #fdeccd; color: #8a5a00; }

.tb-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .9rem;
  opacity: 0; pointer-events: none; transition: var(--transition); z-index: 3000; max-width: calc(100% - 32px); text-align: center;
}
.tb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes tbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tbPop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .tb-hero { padding: 92px 0 34px; }
  .tb-hero-tag { margin-bottom: 10px; font-size: .7rem; }
  .tb-hero h1 { font-size: 1.75rem; margin-bottom: 10px; }
  .tb-hero p.lead { font-size: .95rem; margin-bottom: 14px; line-height: 1.5; }
  .tb-promises { gap: 6px; }
  .tb-promise { font-size: .72rem; padding: 5px 10px; }
  .tb-deco { display: none; }
  .tb-state { margin-top: 26px; padding: 30px 20px; }
  .tb-notice { margin-top: 10px; font-size: .84rem; margin-left: 12px; margin-right: 12px; }
  .tb-overlay { align-items: flex-end; padding: 0; }
  .tb-modal { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; animation: tbSheet .26s ease-out; }
  .tb-count { margin-left: 0; width: 100%; }
  .tb-actions { width: 100%; }
  .tb-actions .tb-btn { flex: 1; }
  .tb-search-wrap { flex: 1 1 100%; max-width: none; }
}
@keyframes tbSheet { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .tb-card, .tb-card:hover, .tb-modal, .tb-overlay, .tb-art svg { animation: none !important; transition: none !important; transform: none !important; }
}
