:root{
  --bg: #0b0f14;
  --panel: rgba(255,255,255,0.06);
  --panel-2: rgba(255,255,255,0.08);
  --stroke: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.88);
  --muted: rgba(255,255,255,0.62);

  --accent: #ff7a18;
  --accent-2: #ff9d3f;

  --shadow1: 14px 14px 28px rgba(0,0,0,0.55);
  --shadow2: -14px -14px 28px rgba(255,255,255,0.04);

  --radius: 18px;
  --radius-lg: 26px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(900px 450px at 20% 15%, rgba(255,122,24,0.16), transparent 55%),
    radial-gradient(700px 380px at 80% 0%, rgba(255,157,63,0.10), transparent 55%),
    radial-gradient(800px 500px at 85% 90%, rgba(255,122,24,0.08), transparent 60%),
    var(--bg);
  color: var(--text);
    background-repeat: no-repeat;
  background-size: cover;
  /* Si quieres el efecto “siempre fijo” (más pro), déjalo:
     Ojo: en algunos móviles puede ir más pesado */
  background-attachment: fixed;
}

a{ color:inherit; text-decoration:none; }
.container{ max-width:1100px; margin:0 auto; padding:22px; }

.topbar{
  display:flex; gap:14px; align-items:center; justify-content:space-between;
  padding:14px 16px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow: var(--shadow1), var(--shadow2);
  backdrop-filter: blur(12px);
}

.brand{
  display:flex; align-items:center; gap:10px;
  font-weight: 750;
  letter-spacing: 0.4px;
}
.brand .logo{
  width:38px; height:38px;
  display:grid; place-items:center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,122,24,0.22), rgba(255,255,255,0.06));
  border: 1px solid rgba(255,122,24,0.25);
  box-shadow: 10px 10px 18px rgba(0,0,0,0.45), -10px -10px 18px rgba(255,255,255,0.03);
}
.badge{
  font-size:12px;
  padding:6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,122,24,0.28);
  background: rgba(255,122,24,0.10);
  color: rgba(255,255,255,0.92);
}

.actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

.btn{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding:10px 12px;
  border-radius: 14px;
  cursor:pointer;
  display:inline-flex; align-items:center; gap:8px;
  box-shadow: 10px 10px 18px rgba(0,0,0,0.45), -10px -10px 18px rgba(255,255,255,0.03);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(255,122,24,0.35); }
.btn.primary{
  border-color: rgba(255,122,24,0.35);
  background: linear-gradient(180deg, rgba(255,122,24,0.20), rgba(255,255,255,0.05));
}
.btn.danger{
  border-color: rgba(255,80,80,0.30);
}

.grid{
  display:grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap:18px;
  margin-top:18px;
}
@media (max-width: 920px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow1), var(--shadow2);
  backdrop-filter: blur(12px);
}

.card .card-header{
  padding:16px 16px 10px 16px;
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.card .card-body{ padding:16px; }
.card h2, .card h3{ margin:0; }
.muted{ color: var(--muted); }

.filters{
  display:flex; gap:10px; flex-wrap:wrap;
}
.input, select, textarea{
  width:100%;
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.20);
  color: var(--text);
  outline:none;
}
textarea{ min-height: 140px; resize: vertical; }

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 680px){
  .row{ grid-template-columns: 1fr; }
}

.chips{
  display:flex; gap:8px; flex-wrap:wrap;
}
.chip{
  font-size:12px;
  padding:6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
}
.chip.accent{
  border-color: rgba(255,122,24,0.30);
  background: rgba(255,122,24,0.10);
}

.post{
  padding:14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  box-shadow: 10px 10px 20px rgba(0,0,0,0.42), -10px -10px 20px rgba(255,255,255,0.02);
  display:flex;
  flex-direction:column;
  gap:10px;
}

.post-title{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin:0;
}
.post-meta{
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  color: var(--muted);
  font-size: 12px;
}

.toolbar{
  display:flex; gap:8px; flex-wrap:wrap;
  padding:10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
}
.tool{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 12px;
  padding:8px 10px;
  cursor:pointer;
  display:inline-flex; align-items:center; gap:8px;
}
.tool:hover{ border-color: rgba(255,122,24,0.32); }

.split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 920px){
  .split{ grid-template-columns: 1fr; }
}

.preview{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
  padding:12px;
  overflow:auto;
  min-height: 140px;
}

/* Markdown básico */
.preview h1,.preview h2,.preview h3{ margin: 10px 0; }
.preview p{ margin: 8px 0; color: rgba(255,255,255,0.86); line-height: 1.55; }
.preview code{
  padding:2px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
}
.preview pre{
  padding:10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  overflow:auto;
}
.preview blockquote{
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(255,122,24,0.55);
  background: rgba(255,122,24,0.08);
  border-radius: 14px;
  color: rgba(255,255,255,0.82);
}

.hr{
  height:1px;
  background: rgba(255,255,255,0.08);
  margin: 12px 0;
}

.small{ font-size: 12px; color: var(--muted); }
.toast{
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,14,20,0.85);
  box-shadow: var(--shadow1), var(--shadow2);
  backdrop-filter: blur(12px);
  display:none;
}
.toast.show{ display:block; }
/* ===== Admin layout: secciones separadas ===== */
.stack{
  display:grid;
  grid-template-columns: 1fr;
  gap:18px;
  margin-top:18px;
}

/* ===== Editor: aside + aside ===== */
.edit-asides{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

@media (max-width: 920px){
  .edit-asides{ grid-template-columns: 1fr; }
}

.edit-pane{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.16);
  padding:12px;
}

.edit-pane .small{
  margin-bottom: 8px;
}
/* ===== Select (dropdown) neuphorism ===== */
select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding-right: 44px; /* espacio para flecha */
  cursor: pointer;

  background:
    radial-gradient(18px 18px at 90% 50%, rgba(255,122,24,0.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.16));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 10px 10px 18px rgba(0,0,0,0.45), -10px -10px 18px rgba(255,255,255,0.03);
}

select:focus{
  border-color: rgba(255,122,24,0.40);
  outline: none;
}

/* Flecha custom */
select{
  background-image:
    radial-gradient(18px 18px at 90% 50%, rgba(255,122,24,0.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.16)),
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.72) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.72) 50%, transparent 50%);
  background-position:
    0 0,
    0 0,
    calc(100% - 18px) 55%,
    calc(100% - 12px) 55%;
  background-size:
    auto,
    auto,
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

/* Opcional: options (limitado por navegador) */
option{
  background: #0b0f14;
  color: rgba(255,255,255,0.90);
}

/* ====== Smart Suggest (buscador) ====== */
.suggest{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 50;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,14,20,0.92);
  box-shadow: 14px 14px 28px rgba(0,0,0,0.55), -14px -14px 28px rgba(255,255,255,0.04);
  backdrop-filter: blur(14px);
  padding: 8px;
  display: none;
  max-height: 280px;
  overflow: auto;
}

.suggest.show{ display:block; }

.suggest-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  color: rgba(255,255,255,0.90);
}

.suggest-item:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,122,24,0.25);
}

.suggest-left{
  display:flex; align-items:center; gap:10px;
}
.suggest-tag{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,122,24,0.25);
  background: rgba(255,122,24,0.10);
  color: rgba(255,255,255,0.92);
}
.suggest-muted{ color: rgba(255,255,255,0.58); font-size: 12px; }

/* ====== Custom Dropdown (no nativo) ====== */
.dd{
  position: relative;
  width: 100%;
  min-width: 220px;
}

.dd select{
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
}

.dd-btn{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  padding: 12px 14px;
  border-radius: 16px;
  cursor: pointer;

  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(22px 22px at 90% 35%, rgba(255,122,24,0.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.18));
  box-shadow: 12px 12px 22px rgba(0,0,0,0.50), -12px -12px 22px rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.90);
  transition: transform .12s ease, border-color .12s ease;
}

.dd-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,122,24,0.35);
}

.dd-btn .dd-label{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 650;
  letter-spacing: 0.2px;
}
.dd-btn .dd-label i{
  color: rgba(255,122,24,0.95);
}

.dd.open .dd-btn{
  border-color: rgba(255,122,24,0.45);
}

.dd-menu{
  position:absolute;
  left:0;
  right:0;
  top: calc(100% + 10px);
  z-index: 60;

  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,14,20,0.92);
  box-shadow: 14px 14px 28px rgba(0,0,0,0.55), -14px -14px 28px rgba(255,255,255,0.04);
  backdrop-filter: blur(14px);

  padding: 8px;
  display: none;
  max-height: 300px;
  overflow: auto;
}

.dd.open .dd-menu{ display:block; }

.dd-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  border: 1px solid transparent;
  color: rgba(255,255,255,0.90);
}

.dd-item:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,122,24,0.25);
}

.dd-item.active{
  border-color: rgba(255,122,24,0.35);
  background: rgba(255,122,24,0.10);
}

.dd-search{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.22);
  margin-bottom: 8px;
}

.dd-search input{
  width:100%;
  border:0;
  outline:0;
  background: transparent;
  color: rgba(255,255,255,0.90);
}

body.scroll-lock{
  overflow: hidden;
}
.logo-img-wrap{
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  overflow:hidden;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 10px 30px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.logo-img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:8px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}


.editor{
  margin-top:10px;
  min-height:220px;
  padding:14px 14px;
  border-radius:18px;

  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 14px 40px rgba(0,0,0,.35);

  color: rgba(255,255,255,.92);
  outline:none;
  line-height:1.55;
}

.editor:empty:before{
  content: attr(data-placeholder);
  color: rgba(255,255,255,.45);
}

.editor h2{ margin: 10px 0; font-size: 18px; }
.editor blockquote{
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(255,122,24,.8);
  background: rgba(255,255,255,.03);
  border-radius: 12px;
}
.editor pre, .editor code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.editor pre{
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.10);
  overflow:auto;
}

.toolbar .tool-sep{
  width:1px;
  height:22px;
  background: rgba(255,255,255,.10);
  display:inline-block;
  margin: 0 6px;
  border-radius:1px;
}


/* ===== Editor layout fix (1 sola columna) ===== */
.edit-asides.single{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Evita recortes por overflow */
.card,
.card-body,
.edit-pane{
  overflow: visible;
}

/* Editor: que crezca y si es muy grande, scrollee por dentro */
.editor{
  width: 100%;
  box-sizing: border-box;
  min-height: 320px;     /* súbelo si quieres */
  max-height: 65vh;      /* para que no se “corte” por la página */
  overflow: auto;
}

/* (Opcional) si tienes shadows fuertes que se cortan, dale padding inferior */
.card-body{
  padding-bottom: 18px;
}
.suggest .suggest-item.active{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,122,24,.35);
}

/* ===== Compactar el bloque de contenido del post (vista usuario) ===== */
.post .preview{
  min-height: 0 !important;     /* ✅ mata alturas mínimas */
  height: auto !important;
  padding: 12px 14px !important; /* ✅ menos aire */
  margin-top: 10px;
  overflow: visible !important;
}

/* Si solo hay texto corto, evita que parezca "textarea gigante" */
.post .preview p{
  margin: 0.35em 0;
}

/* Si el contenido está vacío, no muestres el cuadro */
.post .preview:empty{
  display: none !important;
}

.post-meta{
  gap: 10px;
}
.post-meta > div:last-child{
  text-align: right;
}


.suggest-item.active {
  outline: 1px solid rgba(255,122,24,.55);
  background: rgba(255,122,24,.10);
}
