/*@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');*/
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700&display=swap');

:root{
  --bg: #c94c9d;
  --card: #4f4f50;
  --card-2: #0c1524;
  --text: #fefbd7;
  --muted: #98a9bf;
  --line: #1f2a3a;
  --accent: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --pill-bg: #340920;
  --pill-border: #1b2a3a;
  --btn: #22c55e;
  --btn-text: #052e16;
  --tag-alpha: .55;
  --search-bg: #f7f2f5;
  --search-text: #01050f;
  --search-placeholder: #7f90a9;
  --search-border: #223041;
  --search-focus: #22c55e;
  --heading-font: "Outfit", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*{
  box-sizing: border-box;
}
html,body{
  height: 100%;
}
body{
  margin: 0;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  background: none;
}
.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px;
}
.section{
  margin-top: 16px;
}
.panel{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
h1{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 14px;
  font-weight: 700;
  font-size: 50px;
  letter-spacing: -0.5px;
  color: #070342;
}
#status{
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}
input[type="text"],input[type="search"],textarea{
  width: 100%;
  background: #0b1422;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 12px;
  outline: none;
}
input::placeholder,textarea::placeholder{
  color: var(--muted);
  opacity: .85;
}
.switch{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-right: 8px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
}
.switch input{
  accent-color: #22c55e;
  width: 18px;
  height: 18px;
}
.btn,.mini-btn,.btn-secondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: .15s ease;
}
.btn{
  background: linear-gradient(180deg,#22c55e,#16a34a);
  color: var(--btn-text);
  min-height: 56px;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: none;
}
.btn:hover{
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn-secondary{
  background: var(--card-2);
  color: var(--text);
  border-color: var(--line);
  min-height: 44px;
  padding: 10px 16px;
}
.mini-btn{
  background: #10b98122;
  border-color: #10b98150;
  color: #d1fae5;
  padding: 10px 16px;
  font-weight: 700;
}
.btn-full{
  width: 100%;
  min-height: 58px;
  font-size: 16px;
}
.btn-wa{
  background: linear-gradient(180deg,#25D366,#128C7E);
  border: 1px solid #128C7E;
  color: #052e16;
}
.list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.item{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.thumb-wrap{
  position: relative;
  width: 260px;
  max-width: 260px;
  margin: 0;
  border: 6px solid transparent;
  border-radius: 14px;
  overflow: hidden;
  background: #0008;
  transition: border-color .25s ease,box-shadow .25s ease;
}
.thumb{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.placeholder{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 250px;
  border-radius: 10px;
  background: #0b1422;
  color: var(--muted);
  font-weight: 700;
}
.tw-ok{
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(34,197,94,.20);
}
.tw-warn{
  border-color: var(--warn);
  box-shadow: inset 0 0 0 2px rgba(245,158,11,.18);
}
.tw-urgent{
  border-color: var(--danger);
  box-shadow: inset 0 0 0 2px rgba(239,68,68,.22);
}
.thumb-wrap.tw-blink{
  animation: borderBlinkAR .9s steps(2, jump-none) infinite;
}
@keyframes borderBlinkAR{
  0%,49%{
    border-color: var(--warn);
    box-shadow: inset 0 0 0 2px rgba(245,158,11,.18);
  }
  50%,100%{
    border-color: var(--danger);
    box-shadow: inset 0 0 0 2px rgba(239,68,68,.22);
  }
}
.lang-badge,.code-badge{
  position: absolute;
  left: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0b1422cc;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 12px;
}
.lang-badge{
  top: 8px;
}
.code-badge{
  bottom: 8px;
}
.tag-open{
  position: absolute;
  left: 0;
  right: 0;
  top: 90px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  border-radius: 8px;
  color: #052e16;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .5px;
  text-shadow: 0 2px 6px rgba(0,0,0,.45);
}
.tag-open.ok{
  background: linear-gradient(180deg,
    rgba(34,197,94,var(--tag-alpha)),
    rgba(22,163,74,var(--tag-alpha))
  );
  color: #062b14;
}
.tag-open.warn{
  background: linear-gradient(180deg,
    rgba(251,191,36,var(--tag-alpha)),
    rgba(245,158,11,var(--tag-alpha))
  );
  color: #3a2500;
}
.tag-open.urgent{
  background: linear-gradient(180deg,
    rgba(248,113,113,var(--tag-alpha)),
    rgba(239,68,68,var(--tag-alpha))
  );
  color: #390000;
}
.tag-open.blink{
  animation: tagBlinkAR .9s steps(2, jump-none) infinite;
}
@keyframes tagBlinkAR{
  0%,49%{
    background: linear-gradient(180deg,
      rgba(251,191,36,var(--tag-alpha)),
      rgba(245,158,11,var(--tag-alpha))
    );
    color: #3a2500;
  }
  50%,100%{
    background: linear-gradient(180deg,
      rgba(248,113,113,var(--tag-alpha)),
      rgba(239,68,68,var(--tag-alpha))
    );
    color: #390000;
  }
}

.tag-bid-center{
  position: absolute;
  left: 0;
  right: 0;
  top: 154px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  background: #0a0f18cc;
  border-top: 1px dashed #ffffff20;
  border-bottom: 1px dashed #ffffff20;
}
.tag-bid-center .val{
  font-weight: 900;
  font-size: 26px;
  text-shadow: 0 1px 0 #0008;
}
.item-head .title{
  margin-bottom: 2px;
  font-weight: 600;
  font-size: 22px;
}
.item-head .sub{
  color: var(--muted);
  font-size: 13px;
}
.stats{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 12px 0;
}
.pill{
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pill .lbl{
  color: var(--muted);
  font-size: 13px;
}
.pill .val{
  font-weight: 800;
}
.meta{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.meta .row{
  background: var(--pill-bg);
  border: 1px dashed var(--pill-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.meta .lbl{
  color: var(--muted);
  font-size: 13px;
}
.meta .val{
  font-weight: 800;
}
.cta{
  margin-top: 12px;
}
.cta .btn{
  width: 100%;
  min-height: 64px;
  font-size: 20px;
  justify-content: center;
}
.closed-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  gap: 14px;
}
.closed-item{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.closed-figure{
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 6px solid var(--danger);
}
.closed-figure .thumb{
  border-radius: 10px;
}
.tag-closed{
  position: absolute;
  left: 0;
  right: 0;
  top: 96px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ef4444e6;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  height: 56px;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-shadow: 0 1px 0 #0007;
}
.closed-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.closed-code{
  background: #0b1422cc;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 12px;
}
.lang-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0b1422cc;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
}
.closed-title{
  margin: 10px 0 8px;
  font-weight: 600;
  font-size: 18px;
}
.closed-row{
  background: var(--pill-bg);
  border: 1px dashed var(--pill-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.closed-row .lbl{
  color: var(--muted);
  font-size: 13px;
}
.closed-row .val{
  font-weight: 800;
}
.modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2,6,14,.65);
  backdrop-filter: blur(2px);
  z-index: 50;
  overflow: hidden !important;
}
.modal.show{
  display: flex;
}
.modal-dialog{
  width: min(560px,92vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 18px;
  position: relative;
  box-shadow: 0 20px 60px #0008;
}
.modal-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
}
.center{
  text-align: center;
}
.muted{
  color: var(--muted);
}
.grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.field label{
  color: var(--muted);
  font-size: 13px;
}
.field input,.field textarea{
  background: #0b1422;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 12px;
}
.modal-actions{
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.modal-actions .btn{
  flex: 1;
}
.form-msg{
  margin-top: 8px;
  color: #fca5a5;
  font-size: 13px;
}
.social{
  position: fixed;
  left: 18px;
  bottom: 18px;
  display: flex;
  gap: 12px;
  z-index: 40;
}
.social a{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: #dbeafe;
  text-decoration: none;
  box-shadow: 0 6px 18px #0006;
}
.social a:hover{
  transform: translateY(-1px);
}
.sub{
  color: var(--muted);
}
.hide{
  display: none !important;
}
#buscar{
  background: var(--search-bg);
  color: var(--search-text);
  border: 1px solid var(--search-border);
}
#buscar::placeholder{
  color: var(--search-placeholder);
  opacity: .95;
}
#buscar:focus{
  border-color: var(--search-focus);
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
  outline: none;
}
.checking{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  font-weight: 800;
  letter-spacing: .5px;
  border-radius: 16px;
  text-transform: uppercase;
}
.checking::after{
  content: '';
  width: 10px;
  height: 10px;
  margin-left: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
@keyframes spin{
  to { transform: rotate(360deg); }
}

.big-code{
  letter-spacing: 2px;
  padding: 12px 16px;
  margin: 6px auto 4px;
  width: min(380px,90%);
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
}
.sub, .lbl{
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.pill, .meta .row, .closed-row{
  border: 1px solid var(--line);
  background: var(--card-2);
  border-radius: 10px;
}
.pill .val, .meta .val{
  font-weight: 600;
}
.item, .closed-item, .panel{
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
#modal-proof .modal-actions{
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--card);
  padding-top: 8px;
}
#modal-proof .btn-full{
  width: 100%;
}
#modal-proof .actions-secondary{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
#modal-proof .actions-secondary .btn-secondary{
  flex: 1 1 0;
}
#anticipado-block #lista-anticipado{
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  align-items: stretch;
  display: flex;
  gap: var(--anti-gap);
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
#anticipado-block #lista-anticipado .item{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  height: auto;
  overflow: hidden;
  flex: 0 0 var(--anti-cardw);
  scroll-snap-align: start;
}
#anticipado-block #lista-anticipado .thumb-wrap{
  --bw: 6px;
  aspect-ratio: 63 / 88;
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: var(--bw) solid transparent;
  --anticipado-border: rgba(238, 234, 6, 0.85);
  border-color: var(--anticipado-border) !important;
  box-shadow: 0 0 0 1px rgba(244, 248, 1, 0.945),
    0 0 18px rgba(255, 210, 0, 0.18) inset;
  --anticipado-ribbon: rgba(255, 210, 0, 0.85);
  --anticipado-ribbon-line: rgba(255, 210, 0, 0.95);
}
#anticipado-block #lista-anticipado .thumb-wrap.tw-ok, #anticipado-block #lista-anticipado .thumb-wrap.tw-warn, #anticipado-block #lista-anticipado .thumb-wrap.tw-urgent{
  border-color: var(--anticipado-border) !important;
}
#anticipado-block #lista-anticipado .thumb{
  position: absolute;
  inset: calc(var(--bw) * -1);
  width: calc(100% + (var(--bw) * 2));
  height: calc(100% + (var(--bw) * 2));
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: inherit;
}
#anticipado-block #lista-anticipado .lang-badge, #anticipado-block #lista-anticipado .code-badge{
  position: absolute;
  z-index: 2;
}
#anticipado-block #lista-anticipado .thumb-wrap .tag-bid-center{
  position: absolute;
  z-index: 2;
  top: 42% !important;
  left: 8px;
  right: 8px;
  transform: translateY(-50%);
}
#anticipado-block #lista-anticipado .thumb-wrap .tag-open{
  position: absolute;
  z-index: 2;
  top: 72% !important;
  bottom: auto !important;
  left: 8px;
  right: 8px;
  transform: translateY(-50%);
}
#anticipado-block #lista-anticipado .item .facts{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
#anticipado-block #lista-anticipado .item.is-hidden{
  display: none !important;
}
#anticipado-block #lista-anticipado .meta{
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 12px;
}
#anticipado-block #lista-anticipado .meta .row{
  width: 100%;
}
#anticipado-block{
  --anti-cardw: 300px;
  --anti-gap: 14px;
}
#anticipado-block #lista-anticipado::-webkit-scrollbar{
  height: 8px;
}
#anticipado-block #lista-anticipado::-webkit-scrollbar-track{
  background: transparent;
}
#anticipado-block #lista-anticipado::-webkit-scrollbar-thumb{
  background: var(--line);
  border-radius: 999px;
}
#anticipado-block .anti-controls{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
#anticipado-block .anti-controls .anti-btn{
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
#anticipado-block .anti-controls .anti-btn:active{
  transform: translateY(1px);
}
#anti-slider{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  outline: none;
}
#anti-slider::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #34d399;
  border: 2px solid #0f172a;
  cursor: pointer;
}
#anti-slider::-moz-range-thumb{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #34d399;
  border: 2px solid #0f172a;
  cursor: pointer;
}
#lista-activas{
  --act-cardw: 300px;
  --act-gap: 14px;
  display: flex;
  gap: var(--act-gap);
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
#lista-activas .item{
  flex: 0 0 var(--act-cardw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}
#lista-activas .thumb-wrap{
  --bw: 6px;
  aspect-ratio: 63 / 88;
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: var(--bw) solid transparent;
  border-color: var(--accent) !important;
  box-shadow: inset 0 0 0 2px rgba(34,197,94,.20);
}
#lista-activas .thumb{
  position: absolute;
  inset: calc(var(--bw) * -1);
  width: calc(100% + (var(--bw) * 2));
  height: calc(100% + (var(--bw) * 2));
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  display: block;
}
#lista-activas .thumb-wrap .tag-bid-center{
  top: 42% !important;
  left: 8px;
  right: 8px;
  transform: translateY(-50%);
}
#lista-activas .thumb-wrap .tag-open{
  top: 72% !important;
  bottom: auto !important;
  left: 8px;
  right: 8px;
  transform: translateY(-50%);
}
.act-controls{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.act-controls .act-btn{
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
#act-slider{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  outline: none;
}
#act-slider::-webkit-slider-thumb{
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #34d399;
  border: 2px solid #0f172a;
  cursor: pointer;
}
#act-slider::-moz-range-thumb{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #34d399;
  border: 2px solid #0f172a;
  cursor: pointer;
}
#lista-cerradas, #cerradas-block .closed-grid{
  --cls-cardw: 300px;
  --cls-gap: 14px;
  display: flex !important;
  gap: var(--cls-gap) !important;
  overflow-x: auto !important;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
#lista-cerradas .closed-item, #cerradas-block .closed-grid .closed-item{
  flex: 0 0 var(--cls-cardw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}
#lista-cerradas .closed-figure, #cerradas-block .closed-grid .closed-figure{
  --bw: 6px;
  aspect-ratio: 63 / 88;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: var(--bw) solid #8b1e1e;
}
#lista-cerradas .closed-figure .thumb, #cerradas-block .closed-grid .closed-figure .thumb{
  position: absolute;
  inset: calc(var(--bw) * -1);
  width: calc(100% + (var(--bw) * 2));
  height: calc(100% + (var(--bw) * 2));
  object-fit: cover;
  object-position: center center;
  border-radius: inherit;
  display: block;
}
#cerradas-block .cls-controls, #lista-cerradas ~ .cls-controls{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.cls-controls .cls-btn{
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
#cls-slider{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  outline: none;
}
#cls-slider::-webkit-slider-thumb{
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #34d399;
  border: 2px solid #0f172a;
  cursor: pointer;
}
#cls-slider::-moz-range-thumb{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #34d399;
  border: 2px solid #0f172a;
  cursor: pointer;
}
#lista-activas .meta{
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 12px;
}
#lista-activas .meta .row{
  width: 100%;
}
#lista-activas .thumb-wrap.tw-ok, #lista-activas .thumb-wrap.tw-warn, #lista-activas .thumb-wrap.tw-urgent{
  border-color: var(--accent) !important;
}
#anticipado-block #lista-anticipado .thumb-wrap .tag-open, #anticipado-block #lista-anticipado .thumb-wrap .tag-open.ok, #anticipado-block #lista-anticipado .thumb-wrap .tag-open.warn, #anticipado-block #lista-anticipado .thumb-wrap .tag-open.urgent{
  background: var(--anticipado-ribbon) !important;
  border: 1px solid var(--anticipado-ribbon-line) !important;
  color: #0f172a !important;
  text-shadow: none !important;
}
#anticipado-title, #activas-title, #cerradas-title, #anticipado-block h2.sub, #activas-block h2.sub, #cerradas-block h2.sub{
  font-family: 'Baloo 2', sans-serif; /*var(--heading-font);*/
  font-weight: 900;
  letter-spacing: 0.2px;
  text-align: center;
  margin: 6px 0 14px;
  font-size: clamp(25px, 2.8vw, 34px);
  line-height: 1.15;
}
#anticipado-title, #anticipado-block h2.sub{
  color: #070342;
    text-shadow:
    -1px -1px 0 #dff516,  /* arriba izquierda */
     1px -1px 0 #dff516,  /* arriba derecha */
    -1px  1px 0 #dff516,  /* abajo izquierda */
     1px  1px 0 #dff516;  /* abajo derecha */
}
#activas-title, #activas-block h2.sub{
  color: #070342;
  text-shadow:
  -1px -1px 0 #0ef719,  /* arriba izquierda */
    1px -1px 0 #0ef719,  /* arriba derecha */
  -1px  1px 0 #0ef719,  /* abajo izquierda */
    1px  1px 0 #0ef719;  /* abajo derecha */
}
#cerradas-title, #cerradas-block h2.sub{
  color: #070342;
  text-shadow:
  -1px -1px 0 #f01230,  /* arriba izquierda */
    1px -1px 0 #f01230,  /* arriba derecha */
  -1px  1px 0 #f01230,  /* abajo izquierda */
    1px  1px 0 #f01230;  /* abajo derecha */
  
}
#anticipado-title::after, #activas-title::after, #cerradas-title::after, #anticipado-block h2.sub::after, #activas-block h2.sub::after, #cerradas-block h2.sub::after{
  content: "";
  display: block;
  margin: 8px auto 0;
  border-radius: 999px;
  opacity: .75;
  width: 100px;
  height: 4px;
}
#anticipado-title::after, #anticipado-block h2.sub::after{
  background: rgba(255,210,0,.85);
}
#activas-title::after, #activas-block h2.sub::after{
  background: var(--accent);
}
#cerradas-title::after, #cerradas-block h2.sub::after{
  background: #d42121;
}
#anticipado-title span, #activas-title span, #cerradas-title span{
  font-size: 0.95em;
  font-weight: 600;
}
#lista-anticipado, #lista-activas, #lista-cerradas{
  scrollbar-width: thin !important;
  scrollbar-color: #34d399 var(--line) !important;
}
#lista-anticipado::-webkit-scrollbar, #lista-activas::-webkit-scrollbar, #lista-cerradas::-webkit-scrollbar{
  height: 10px !important;
}
#lista-anticipado::-webkit-scrollbar-track, #lista-activas::-webkit-scrollbar-track, #lista-cerradas::-webkit-scrollbar-track{
  background: var(--line) !important;
  border-radius: 999px !important;
}
#lista-anticipado::-webkit-scrollbar-thumb, #lista-activas::-webkit-scrollbar-thumb, #lista-cerradas::-webkit-scrollbar-thumb{
  background: #34d399 !important;
  border: 2px solid #0f172a !important;
  border-radius: 999px !important;
}
#lista-anticipado::-webkit-scrollbar-thumb:hover, #lista-activas::-webkit-scrollbar-thumb:hover, #lista-cerradas::-webkit-scrollbar-thumb:hover{
  background: #22c55e !important;
}
#lista-anticipado::-webkit-scrollbar-button, #lista-activas::-webkit-scrollbar-button, #lista-cerradas::-webkit-scrollbar-button{
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}
.section.panel #btn-refresh{
  display: block;
  width: 100%;
  margin: 8px 0 0 0 !important;
  height: 44px;
  border-radius: 12px;
  font-weight: 700;
  font-size: larger;
}
#modal-grupo .group-item{
  display: flex;
  gap: 10px;
  align-items: center;
}
#modal-grupo .group-thumb{
  width: 56px;
  height: auto;
  border-radius: 8px;
  flex: 0 0 auto;
}
#modal-grupo .group-thumb.ph{
  width: 56px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  opacity: .7;
}
#modal-grupo .group-info{
  line-height: 1.25;
}
.modal .modal-dialog{
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
#modal-grupo #grupo-list{
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
#modal-grupo .modal-actions{
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--card);
  padding-top: 8px;
}
#modal-overlay .modal-dialog{
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
#modal-overlay #form-solicitud{
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
#modal-overlay .modal-actions{
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--card);
  padding-top: 8px;
}
#modal-bid .modal-dialog{
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#modal-bid .modal-actions{
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--card);
  padding-top: 8px;
}
#modal-proof .modal-dialog{
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#modal-proof .modal-content{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
#modal-proof img{
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.prov-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--line);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.prov-badge:hover{
  filter: brightness(1.05);
  transform: translateY(-1px);
}
#soli-rows .soli-row{
  width: 100%;
}
#soli-rows .soli-del{
  width: 100%;
  background: #7a0f1f;
  border: 1px solid #7a0f1f;
  color: #fff;
}
#soli-rows .field select{
  appearance: none;
  -webkit-appearance: none;
  background: rgba(7, 15, 30, 0.9);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 12px;
  height: 40px;
  width: 100%;
}
#soli-rows .field select:focus{
  outline: 2px solid rgba(99,102,241,.5);
  outline-offset: 0;
}
#soli-rows .soli-del:hover{
  background: #5e0c19;
  border-color: #5e0c19;
}
#soli-rows .soli-preview{
  text-align: center;
}
#soli-rows .soli-preview [data-thumb]{
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(235, 240, 240, 0.5), rgba(174, 241, 247, 0.5)),         /* 50% “velo” */
    url("../cac_doc/vitral.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.06);
  animation: bgFloat 48s ease-in-out infinite alternate;
  will-change: transform;
}
body::after{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(0,0,0,.12);
  animation: bgFloat 28s cubic-bezier(.25,.1,.25,1) infinite alternate;
}
@keyframes bgFloat{
  0%   { transform: scale(1.08) translate3d(0, 0, 0);
  }
  50%  { transform: scale(1.12) translate3d(-3.5%, -3.5%, 0);
  }
  100% { transform: scale(1.08) translate3d(0, 0, 0);
}}
.topbar{
  position: static;
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  background: #0b1b34;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: none;
}
.top-logo{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
}
.top-logo img{
  height: 40px;
  width: auto;
  border-radius: 10px;
  display: block;
}
.top-logo span{
  font-family: var(--heading-font, system-ui);
  letter-spacing: .2px;
  font-size: 18px;
}
.top-search input{
  background: var(--search-bg, #f8f6f8);
  color: var(--search-text, #01050f);
  border: 1px solid var(--search-border, #4f5052);
  border-radius: 888px;
  padding: 14px 18px;
  height: 44px;
  width: 100%;
}
.top-search input::placeholder{
  color: var(--search-placeholder, #7f90a9);
  opacity: .95;
}
.top-search input:focus{
  border-color: var(--search-focus, #22c55e);
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
  outline: none;
}
.top-actions{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.icon-btn{
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--card-2, #0c1524);
  border: 1px solid var(--line, #1f2a3a);
  color: #e7f0ff;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, filter .12s ease;
}
.icon-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.icon-btn svg{
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}
#btn-refresh.btn-secondary{
  display: none;
}

@media (max-width:760px){
.item{
  grid-template-columns: 1fr;
}
}

@media (max-width:760px){
.meta{
  grid-template-columns: 1fr;
}
}

@media (max-width:640px){
.grid{
  grid-template-columns: 1fr;
}
}

@media (max-width:760px){
.item{
  grid-template-columns: 1fr;
}
.thumb-wrap{
  width: 100%;
  max-width: 100%;
  margin: 0 auto 12px;
}
.thumb{
  width: 100%;
  height: auto;
  display: block;
}
.tag-open{
  top: 34%;
  height: 52px;
}
.tag-bid-center{
  top: 58%;
  height: 52px;
}
}

@media (max-width: 520px){
#anticipado-block{
  --anti-cardw: 84vw;
}
}

@media (min-width: 521px) and (max-width: 980px){
#anticipado-block{
  --anti-cardw: 46vw;
}
}

@media (max-width:520px){
#lista-activas{
  --act-cardw: 84vw;
}
}

@media (min-width:521px) and (max-width:980px){
#lista-activas{
  --act-cardw: 46vw;
}
}

@media (max-width: 520px){
#lista-cerradas, #cerradas-block .closed-grid{
  --cls-cardw: 84vw;
}
}

@media (min-width: 521px) and (max-width: 980px){
#lista-cerradas, #cerradas-block .closed-grid{
  --cls-cardw: 46vw;
}
}

@media (min-width: 1280px){
#anticipado-title, #activas-title, #cerradas-title, #anticipado-block h2.sub, #activas-block h2.sub, #cerradas-block h2.sub{
  font-size: 40px;
}
}

@media (min-width: 740px){
#modal-grupo #grupo-list.grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
}

@media (max-width:640px){
.modal:not(.show){
  display: none !important;
}
.modal.show{
  display: flex !important;
}
}

@media (max-width: 640px){
#soli-rows .soli-row:nth-of-type(1){
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}
#soli-rows .soli-row:nth-of-type(2){
  grid-template-columns: 1fr !important;
}
#soli-rows .soli-row:nth-of-type(4){
  grid-template-columns: 1fr !important;
}
#soli-rows .soli-row:nth-of-type(5){
  grid-template-columns: 1fr !important;
}
#soli-rows [data-thumb]{
  margin: 0 auto;
}
}

@media (max-width: 640px){
#soli-rows .soli-row:nth-of-type(1){
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}
#soli-rows .soli-row:nth-of-type(2){
  grid-template-columns: 1fr !important;
}
#soli-rows .soli-row:nth-of-type(4){
  grid-template-columns: 1fr !important;
}
}

@media (prefers-reduced-motion: reduce){
body::before{
  animation: none;
  transform: none;
}
}

@media (max-width: 880px){
.topbar{
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
}
.top-search{
  grid-column: 1 / -1;
  order: 3;
}
}

@media (max-width: 360px){
.topbar{
  align-items: start;
  padding: 8px 10px;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
}
.top-logo{
  min-width: 0;
  gap: 8px;
}
.topbar .top-logo span{
  display: block !important;
  font-size: 12px;
  line-height: 1.05;
  max-width: 62vw;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-actions{
  gap: 6px;
}
.icon-btn{
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.top-search{
  grid-column: 1 / -1;
  order: 3;
}
.top-search input{
  height: 38px;
  padding: 9px 12px;
  border-radius: 22px;
}
}

/* === Welcome / Instrucciones (scroll + estilos) === */
.modal .modal-dialog {
  max-height: 80vh;          /* <-- hace scrollear el contenido si crece */
  overflow: auto;
}

#welcome-modal .welcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

#welcome-modal .welcome-card {
  padding: 12px;
  border-radius: 12px;
}

#welcome-modal .welcome-illust {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px auto;
}

/* === Howto / Instrucciones (wizard 4 pasos) === */
#howto-modal .modal-dialog{
  max-width: 760px;
  text-align: center;
}
.howto-steps{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 14px 0;
}
.howto-step{
  display: none;
}
.howto-step.active{
  display: block;
}
.howto-card{
  padding: 14px;
  border-radius: 12px;
}
.howto-illust{
  width: 92px;
  height: 92px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}
.howto-dots{
  display:flex;
  gap:8px;
  justify-content:center;
  margin:8px 0 2px;
}
.howto-dots .dot{
  width:10px;height:10px;border-radius:50%;
  background: var(--line);
}
.howto-dots .dot.active{
  background: var(--accent);
}
.howto-footer{
  display:flex;flex-direction:column;gap:10px;margin-top:8px;
}
.howto-controls{
  display:flex;gap:10px;margin-top:8px;
}
.howto-controls .btn{ flex:1; }
#howto-dontshow{
  accent-color:#22c55e;
}
.howto-small{
  font-size:12px;color:var(--muted);
}

/* ===== Encabezado: versión compacta para pantallas pequeñas ===== */
@media (max-width: 380px){ /* iPhone SE/Android chicos */
  /* Contenedor principal del header */
  .topbar, header.topbar {
    padding: 6px 8px;
  }

  /* Asegura que los bloques puedan saltar de línea */
  .topbar, header.topbar,
  .topbar .brand,
  .topbar .top-actions,
  .topbar .search-wrap {
    display: flex;
    flex-wrap: wrap;
  }

  /* Marca / logo / título */
  .topbar .brand{
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    order: 1;
    min-width: 0; /* evita desbordes */
  }
  .topbar .brand img{
    width: 28px; height: 28px;
  }
  .topbar .brand h1,
  .topbar .brand .title{
    font-size: 14px;          /* baja tamaño */
    line-height: 1.1;
    letter-spacing: .2px;
    margin: 0;
    white-space: normal;      /* permite salto de línea */
  }

  /* Botones de acción del encabezado */
  .topbar .top-actions{
    order: 2;
    gap: 6px;
    margin-left: auto;        /* empuja a la derecha */
    align-items: center;
  }
  .topbar .icon-btn{
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 10px;
  }
  .topbar .icon-btn svg{
    width: 18px; height: 18px;
  }

  /* Buscador: forzar 2ª fila y 100% ancho */
  .topbar .search-wrap{
    order: 3;
    flex: 1 1 100%;
    margin-top: 8px;
  }
  .topbar .search-wrap input[type="search"],
  .topbar .search-wrap input[type="text"]{
    width: 100%;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 999px;
  }
}

/* Un pelín más de respiro en 320px (muy estrechos) */
@media (max-width: 330px){
  .topbar .icon-btn{ width: 28px; height: 28px; }
  .topbar .icon-btn svg{ width: 16px; height: 16px; }
  .topbar .brand h1, .topbar .brand .title{ font-size: 13px; }
}

/* === Colocar barras de scroll ARRIBA en los carruseles === */
.act-controls,
.anti-controls,
.cls-controls {
  order: -1;                    /* Mueve la barra arriba dentro del contenedor flex */
  margin-bottom: 6px;
  margin-top: 2px;
}

/* === Orden: Título (0) → Scrollbar (1) → Tarjetas (2) === */
#activas-block, #anticipado-block, #cerradas-block{
  display: flex;
  flex-direction: column;
}

/* Títulos arriba */
#activas-block h2.sub, #activas-title{ order: 0; }
#anticipado-block h2.sub, #anticipado-title{ order: 0; }
#cerradas-block h2.sub, #cerradas-title{ order: 0; }

/* Controles (scrollbar) al medio */
#activas-block .act-controls{ order: 1; }
#anticipado-block .anti-controls{ order: 1; }
#cerradas-block .cls-controls{ order: 1; }

/* Listas al final */
#lista-activas{ order: 2; }
#lista-anticipado{ order: 2; }
/* En cerradas puede ser #lista-cerradas o .closed-grid, cubrimos ambos */
#lista-cerradas, #cerradas-block .closed-grid{ order: 2; }


/* Ajustes estéticos opcionales */
.act-controls input[type="range"],
.anti-controls input[type="range"],
.cls-controls input[type="range"] {
  accent-color: var(--accent);
  width: 100%;
}


#cerradas-block .cls-controls .cls-btn{
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  line-height: 1;
  padding: 0;
}

#cerradas-block .cls-controls #cls-slider{
  width: 100%;
  display: block;
  /* altura y aspecto más limpio */
  height: 6px;
  border-radius: 999px;
}

/* CERRADAS: controles en UNA sola línea siempre */
.cls-controls{
  order: 1;
  display: flex !important;         /* fuerza fila */
  align-items: center;
  gap: 10px;
  margin: 6px 0 10px;
}

.cls-controls .cls-btn{
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  line-height: 1;
  padding: 0;
}

.cls-controls #cls-slider{
  flex: 1 1 auto;                   /* ocupa el espacio entre flechas */
  width: auto;                      /* evita romper fila */
  height: 8px;
  border-radius: 999px;
}

