html{
  min-height:100%;
  overflow-x:hidden;
}

body{
  min-height:100%;
  margin:0;
  overflow-x:hidden;
  overflow-y:auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  background: rgba(10, 0, 20, 0.9);
  border-bottom: 1px solid rgba(255, 102, 204, 0.4);
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-title {
  margin: 0;
  font-size: 1.5rem;
  color: #ff99dd;
}

.admin-subtitle {
  margin: 0;
  color: #ccc;
  font-size: 0.9rem;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-user-email {
  font-size: 0.9rem;
  color: #eee;
}

.admin-logout-btn {
  background: #ff66cc;
  color: #fff;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
}

.admin-logout-btn:hover {
  opacity: 0.9;
}

.admin-main {
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  min-height: auto;
  height: auto;
  max-height: none;
  overflow: visible;
}

.admin-auth-status {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.2rem;
  color: #ffd9f2;
}

.admin-auth-pending .admin-main,
.admin-main[hidden] {
  display: none;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-card {
  background: rgba(20, 0, 35, 0.9);
  border-radius: 1rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(255, 102, 204, 0.4);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.5);
}

.admin-card h2 {
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
  color: #ffd9f2;
}

.card-number {
  font-size: 2rem;
  font-weight: bold;
  margin: 0 0 0.4rem 0;
  color: #ffffff;
}

.card-note {
  margin: 0;
  font-size: 0.85rem;
  color: #ccc;
}

.admin-card-placeholder {
  opacity: 0.8;
  border-style: dashed;
}

.admin-log {
  background: rgba(10, 0, 25, 0.9);
  border-radius: 1rem;
  padding: 1rem 1.4rem;
  border: 1px solid rgba(255, 102, 204, 0.3);
}

.admin-log h2 {
  margin: 0 0 0.6rem 0;
  font-size: 1rem;
  color: #ffd9f2;
}

.admin-log-output {
  background: transparent;
  color: #d0ffd0;
  font-size: 0.85rem;
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  white-space: pre-wrap;
}

.admin-footer {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.8rem;
  color: #aaa;
  border-top: 1px solid rgba(255, 102, 204, 0.2);
  margin-top: 1rem;
}
/* =========================
   BOTÓN VOLVER AL INICIO
========================= */
.admin-home-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  color: #ffd3ea;
  background: rgba(255, 105, 180, .12);
  border: 1px solid rgba(255, 105, 180, .35);
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}

.admin-home-btn:hover{
  background: rgba(255, 105, 180, .25);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
.admin-btn{
  display: inline-block;
  margin-top: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .3px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.admin-btn-primary{
  background: linear-gradient(90deg, #ff2aa1, #7b5bff);
  color: #0b0b0f;
  box-shadow: 0 10px 30px rgba(255,42,161,.35);
}

.admin-btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(255,42,161,.55);
}

.admin-withdrawals,
.admin-users,
.admin-banner-config{
  margin-top: 2rem;
  background: rgba(10, 0, 25, 0.88);
  border: 1px solid rgba(255, 102, 204, 0.28);
  border-radius: 1rem;
  padding: 1.2rem 1.4rem;
}

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

.admin-section-head h2,
.admin-withdrawals h2{
  margin:0 0 .35rem;
  color:#ffd9f2;
}

.admin-section-head p{
  margin:0;
  color:#ccc;
}

.banner-form{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
  align-items:center;
  margin:1rem 0 .75rem;
}

.banner-file-picker{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding:.75rem 1rem;
  border-radius:12px;
  border:1px dashed rgba(255, 216, 128, .36);
  background:rgba(255,255,255,.045);
  color:#fff;
  cursor:pointer;
}

.banner-file-picker input{
  width:1px;
  height:1px;
  position:absolute;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  opacity:0;
  overflow:hidden;
  pointer-events:none;
}

.ads-upload-queue,
.ads-admin-list{
  display:grid;
  gap:.8rem;
}

.ads-upload-queue:empty{
  display:none;
}

.ads-admin-status{
  min-height:1.35rem;
  margin:.45rem 0 .85rem;
  color:#ffd980;
  font-size:.9rem;
}

.ads-queue-card,
.ads-admin-card{
  display:grid;
  grid-template-columns:150px minmax(0, 1fr) auto;
  gap:.85rem;
  align-items:center;
  padding:.8rem;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.09);
  background:rgba(8, 4, 15, .58);
}

.ads-admin-card.is-inactive{
  opacity:.68;
}

.ads-queue-preview,
.ads-admin-preview{
  width:150px;
  aspect-ratio:16 / 9;
  object-fit:contain;
  border-radius:10px;
  background:#050108;
}

.ads-banner-help{
  margin:.25rem 0 .85rem;
  color:#d8cadf;
  font-size:.9rem;
  line-height:1.45;
}

.ads-queue-name,
.ads-queue-meta,
.ads-queue-status,
.ads-admin-state{
  display:block;
  min-width:0;
  overflow-wrap:anywhere;
}

.ads-queue-name,
.ads-admin-details strong{
  color:#fff;
}

.ads-queue-meta,
.ads-admin-state{
  color:#cfc3da;
  font-size:.86rem;
}

.ads-queue-status{
  color:#ffd980;
  font-size:.86rem;
}

.ads-queue-status.is-error{
  color:#ff8fa8;
}

.ads-queue-input,
.ads-admin-input{
  min-height:40px;
  width:100%;
  border-radius:10px;
  border:1px solid rgba(255, 105, 180, .28);
  background:#1a071f;
  color:#fff7fb;
  padding:0 .75rem;
}

.ads-admin-details{
  display:grid;
  gap:.5rem;
  min-width:0;
}

.ads-admin-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:.45rem;
  max-width:160px;
}

.ads-admin-save-status{
  min-height:1.1rem;
  color:#ffd980;
  font-size:.78rem;
}

.admin-btn-danger{
  border-color:rgba(255, 112, 112, .35);
  color:#ffd4d4;
}

@media (max-width: 760px){
  .ads-queue-card,
  .ads-admin-card{
    grid-template-columns:1fr;
  }

  .ads-queue-preview,
  .ads-admin-preview{
    width:100%;
  }

  .ads-admin-actions{
    justify-content:flex-start;
    max-width:none;
  }
}

.admin-withdrawal-filters{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:.75rem;
  margin-bottom:1rem;
}

.admin-withdrawal-filters input,
.admin-withdrawal-filters select{
  min-height:42px;
  border-radius:12px;
  border:1px solid rgba(255, 105, 180, .32);
  background:#1a071f;
  color:#fff7fb;
  padding:0 .8rem;
  outline:none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.admin-withdrawal-filters select{
  color-scheme: dark;
  cursor:pointer;
}

.admin-withdrawal-filters select option{
  background-color:#1a071f;
  color:#fff7fb;
}

.admin-withdrawal-filters select option:hover,
.admin-withdrawal-filters select option:checked{
  background-color:#6d1b7b;
  color:#fff;
}

.admin-withdrawal-filters input:focus,
.admin-withdrawal-filters select:focus{
  border-color:rgba(255, 154, 211, .72);
  box-shadow:0 0 0 3px rgba(255, 42, 161, .14);
}

.admin-withdrawals-list{
  display:grid;
  gap:.8rem;
}

.admin-withdrawal-card{
  border-radius:16px;
  border:1px solid rgba(255, 102, 204, .22);
  background:linear-gradient(180deg, rgba(35, 9, 48, .92), rgba(13, 3, 24, .92));
  box-shadow:0 14px 34px rgba(0,0,0,.32);
  overflow:hidden;
}

.admin-withdrawal-top{
  width:100%;
  display:grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(160px, 1fr) auto 42px;
  gap:1rem;
  align-items:center;
  padding:1rem 1.05rem;
  border:0;
  background:rgba(255,255,255,.035);
  color:inherit;
  text-align:left;
  cursor:pointer;
}

.admin-withdrawal-top:hover{
  background:rgba(255, 102, 204, .075);
}

.admin-withdrawal-top:focus-visible,
.admin-withdrawal-action-btn:focus-visible{
  outline:3px solid rgba(255, 215, 128, .72);
  outline-offset:3px;
}

.admin-withdrawal-identity,
.admin-withdrawal-amount,
.admin-withdrawal-meta{
  min-width:0;
  display:grid;
  gap:.18rem;
}

.admin-withdrawal-identity strong,
.admin-withdrawal-amount strong{
  display:block;
  color:#fff;
  font-size:1rem;
  overflow-wrap:anywhere;
}

.admin-withdrawal-amount strong{
  color:#ffd980;
}

.admin-withdrawal-identity span,
.admin-withdrawal-amount span,
.admin-withdrawal-date,
.admin-withdrawal-grid span,
.admin-withdrawal-note{
  color:#cfc3da;
  font-size:.88rem;
  overflow-wrap:anywhere;
}

.admin-withdrawal-meta{
  justify-items:end;
}

.admin-withdrawal-chevron{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#ffd980;
  background:rgba(255, 216, 128, .12);
  border:1px solid rgba(255, 216, 128, .28);
  font-size:1.3rem;
  line-height:1;
  transition:transform .2s ease, background .2s ease;
}

.admin-withdrawal-card.is-open .admin-withdrawal-chevron{
  transform:rotate(180deg);
  background:rgba(255, 216, 128, .2);
}

.admin-withdrawal-panel{
  display:grid;
  grid-template-rows:0fr;
  opacity:0;
  transition:grid-template-rows .22s ease, opacity .18s ease;
}

.admin-withdrawal-panel > *{
  min-height:0;
  overflow:hidden;
}

.admin-withdrawal-card.is-open .admin-withdrawal-panel{
  grid-template-rows:1fr;
  opacity:1;
}

.admin-withdrawal-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:.85rem;
  padding:0 1rem 1rem;
}

.admin-withdrawal-block{
  min-width:0;
  display:grid;
  align-content:start;
  gap:.5rem;
  padding:1rem;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.09);
  background:rgba(8, 4, 15, .54);
}

.admin-withdrawal-block.is-highlight{
  border-color:rgba(255, 216, 128, .24);
  background:linear-gradient(180deg, rgba(70, 28, 64, .64), rgba(15, 5, 26, .68));
}

.admin-withdrawal-block h3{
  margin:0 0 .2rem;
  color:#ffd9f2;
  font-size:.82rem;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.admin-withdrawal-row{
  min-width:0;
  display:flex;
  justify-content:space-between;
  gap:.75rem;
  color:#cfc8d8;
  font-size:.86rem;
}

.admin-withdrawal-row span:first-child{
  color:#a99ab8;
}

.admin-withdrawal-row strong{
  min-width:0;
  color:#fff;
  font-weight:800;
  text-align:right;
  overflow-wrap:anywhere;
}

.admin-withdrawal-row strong.is-missing{
  color:#ffd980;
}

.admin-withdrawal-total-box{
  display:grid;
  gap:.15rem;
  padding:.85rem .9rem;
  margin:.1rem 0 .25rem;
  border-radius:14px;
  background:rgba(255, 216, 128, .12);
  border:1px solid rgba(255, 216, 128, .24);
}

.admin-withdrawal-total-box span{
  color:#f4d6ef;
  font-size:.82rem;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.admin-withdrawal-total-box strong{
  color:#ffd980;
  font-size:1.55rem;
  line-height:1.08;
  overflow-wrap:anywhere;
}

.admin-withdrawal-note{
  margin:.2rem 0 0;
  overflow-wrap:anywhere;
}

.admin-withdrawal-note.is-muted{
  color:#bdb1c9;
  font-size:.82rem;
}

.admin-withdrawal-note.is-warning{
  color:#ffd980;
  padding:.6rem .7rem;
  border-radius:12px;
  background:rgba(255, 216, 128, .1);
  border:1px solid rgba(255, 216, 128, .2);
}

.admin-withdrawal-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.35rem .65rem;
  border-radius:999px;
  font-weight:800;
  font-size:.78rem;
  white-space:nowrap;
  border:1px solid transparent;
}

.admin-withdrawal-badge.is-pending{ color:#ffe2a8; background:rgba(255,193,92,.14); border-color:rgba(255,193,92,.24); }
.admin-withdrawal-badge.is-approved{ color:#dcd4ff; background:rgba(123,91,255,.18); border-color:rgba(123,91,255,.28); }
.admin-withdrawal-badge.is-paid{ color:#d8fff0; background:rgba(64,214,142,.18); border-color:rgba(64,214,142,.24); }
.admin-withdrawal-badge.is-rejected{ color:#ffd3d7; background:rgba(255,69,105,.16); border-color:rgba(255,69,105,.24); }
.admin-withdrawal-badge.is-cancelled{ color:#d8dce8; background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.16); }

.admin-withdrawal-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  padding:0 1rem 1rem;
}

.admin-withdrawal-action-btn{
  min-height:38px;
  border:1px solid transparent;
  border-radius:999px;
  color:#fff;
  font-weight:800;
  padding:0 1rem;
  cursor:pointer;
  transition:transform .16s ease, opacity .16s ease, background .16s ease;
}

.admin-withdrawal-action-btn:hover{
  transform:translateY(-1px);
}

.admin-withdrawal-action-btn:disabled{
  opacity:.62;
  cursor:not-allowed;
  transform:none;
}

.admin-withdrawal-action-btn.is-primary{
  background:linear-gradient(90deg,#ff2aa1,#7b5bff);
  box-shadow:0 10px 24px rgba(123, 91, 255, .24);
}

.admin-withdrawal-action-btn.is-danger{
  color:#ffd8de;
  background:rgba(255,69,105,.12);
  border-color:rgba(255,69,105,.28);
}

.admin-withdrawal-action-btn.is-outline{
  color:#ffd9f2;
  background:rgba(255,255,255,.04);
  border-color:rgba(255, 102, 204, .28);
}

@media (prefers-reduced-motion: reduce){
  .admin-withdrawal-panel,
  .admin-withdrawal-chevron,
  .admin-withdrawal-action-btn{
    transition:none;
  }
}

@media (max-width: 760px){
  .admin-section-head{
    flex-direction:column;
  }

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

  .admin-withdrawal-top{
    grid-template-columns:1fr 40px;
    gap:.65rem;
  }

  .admin-withdrawal-identity,
  .admin-withdrawal-amount,
  .admin-withdrawal-meta{
    grid-column:1;
    justify-items:start;
  }

  .admin-withdrawal-chevron{
    grid-column:2;
    grid-row:1 / span 3;
    align-self:center;
  }

  .admin-withdrawal-row{
    display:grid;
    gap:.18rem;
  }

  .admin-withdrawal-row strong{
    text-align:left;
  }
  .admin-withdrawal-actions{
    display:grid;
  }

  .admin-withdrawal-action-btn{
    width:100%;
  }
}
