:root{
  --bg:#07111f;
  --bg2:#0d1b2f;
  --card:#ffffff;
  --muted:#64748b;
  --text:#0f172a;
  --white:#fff;
  --brand:#2563eb;
  --brand2:#38bdf8;
  --line:#e2e8f0;
  --soft:#f8fafc;
  --danger:#ef4444;
  --ok:#16a34a;
  --warning:#f59e0b;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--soft);color:var(--text)}
a{text-decoration:none;color:inherit}
.mp-container{width:90%;max-width:1180px;margin:auto}
.mp-header{background:rgba(7,17,31,.92);color:#fff;position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}
.mp-nav{height:74px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.mp-logo{font-weight:900;font-size:22px;letter-spacing:-.04em}
.mp-logo span{color:var(--brand2)}
.mp-links{display:flex;gap:24px;align-items:center;color:#dbeafe;font-weight:700;font-size:14px}
.mp-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:14px;padding:13px 18px;font-weight:900;cursor:pointer;background:var(--brand);color:#fff;box-shadow:0 14px 30px rgba(37,99,235,.25)}
.mp-btn.secondary{background:#fff;color:var(--brand)}
.mp-btn.dark{background:#0f172a;color:#fff}
.mp-hero{background:radial-gradient(circle at top right,#2563eb 0,#0d1b2f 35%,#07111f 78%);color:#fff;padding:90px 0}
.mp-hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:42px;align-items:center}
.mp-badge{display:inline-flex;padding:8px 12px;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(255,255,255,.08);color:#bfdbfe;font-weight:800;font-size:13px}
.mp-hero h1{font-size:58px;line-height:1.02;margin:18px 0;letter-spacing:-.06em}
.mp-hero p{font-size:19px;line-height:1.7;color:#dbeafe;max-width:620px}
.mp-actions{display:flex;gap:14px;flex-wrap:wrap;margin-top:28px}
.mp-mock{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.16);border-radius:28px;padding:18px;box-shadow:0 30px 70px rgba(0,0,0,.28)}
.mp-mock-inner{background:#f8fafc;border-radius:22px;color:#0f172a;padding:18px}
.mp-mock-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.mp-dot{width:10px;height:10px;border-radius:50%;background:#22c55e;display:inline-block;margin-right:5px}
.mp-calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.mp-day{background:#fff;border:1px solid #e2e8f0;min-height:66px;border-radius:14px;padding:8px;font-size:12px;color:#64748b}
.mp-post-pill{margin-top:6px;border-radius:999px;background:#dbeafe;color:#1d4ed8;padding:5px 7px;font-weight:800;font-size:11px}
.mp-section{padding:78px 0}
.mp-title{text-align:center;max-width:760px;margin:0 auto 38px}
.mp-title h2{font-size:38px;letter-spacing:-.04em;margin:0 0 12px}
.mp-title p{color:var(--muted);line-height:1.7;margin:0}
.mp-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.mp-card{background:#fff;border:1px solid var(--line);border-radius:24px;padding:26px;box-shadow:0 12px 34px rgba(15,23,42,.06)}
.mp-card .icon{font-size:34px;margin-bottom:12px}
.mp-card h3{margin:0 0 10px;font-size:20px}
.mp-card p{margin:0;color:var(--muted);line-height:1.7}
.mp-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.mp-step{background:#fff;border:1px solid var(--line);border-radius:22px;padding:22px;text-align:center;font-weight:900}
.mp-pricing{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.mp-price{background:#fff;border:1px solid var(--line);border-radius:26px;padding:28px}
.mp-price.featured{border:2px solid var(--brand);box-shadow:0 18px 45px rgba(37,99,235,.14)}
.mp-price h3{margin:0;font-size:22px}
.mp-price strong{display:block;font-size:38px;margin:14px 0}
.mp-price ul{padding-left:18px;color:var(--muted);line-height:2}
.mp-faq{max-width:850px;margin:auto}
.mp-faq details{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px 20px;margin-bottom:12px}
.mp-faq summary{font-weight:900;cursor:pointer}
.mp-footer{text-align:center;background:#07111f;color:#cbd5e1;padding:34px 20px;font-size:14px;line-height:1.9}

/* ADMIN */
.admin-body{background:#eef2f7}
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(circle at top,#2563eb,#07111f 70%)}
.login-card{width:100%;max-width:420px;background:#fff;border-radius:28px;padding:30px;box-shadow:0 28px 80px rgba(0,0,0,.28)}
.login-card h1{margin:0 0 8px;letter-spacing:-.05em}
.form-row{margin-bottom:15px}
label{display:block;font-weight:900;margin-bottom:8px;font-size:13px;color:#334155}
input,textarea,select{width:100%;border:1px solid #cbd5e1;border-radius:14px;padding:13px 14px;font:inherit;background:#fff}
textarea{min-height:140px;resize:vertical}
.alert{padding:13px 15px;border-radius:14px;margin-bottom:15px;font-weight:800}
.alert.error{background:#fee2e2;color:#991b1b}
.alert.ok{background:#dcfce7;color:#166534}
.admin-shell{display:grid;grid-template-columns:270px 1fr;min-height:100vh}
.sidebar{background:#07111f;color:#dbeafe;padding:24px;position:sticky;top:0;height:100vh}
.sidebar .brand{font-size:22px;font-weight:950;color:#fff;letter-spacing:-.05em;margin-bottom:28px}
.sidebar a{display:flex;gap:10px;align-items:center;padding:12px 14px;border-radius:14px;margin-bottom:6px;font-weight:800;color:#cbd5e1}
.sidebar a.active,.sidebar a:hover{background:#13233b;color:#fff}
.main{padding:28px}
.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
.topbar h1{margin:0;font-size:30px;letter-spacing:-.04em}
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px}
.stat{background:#fff;border:1px solid var(--line);border-radius:22px;padding:20px}
.stat small{color:var(--muted);font-weight:800}
.stat strong{display:block;font-size:34px;margin-top:8px}
.panel{background:#fff;border:1px solid var(--line);border-radius:24px;padding:22px;margin-bottom:20px}
.table{width:100%;border-collapse:collapse}
.table th,.table td{text-align:left;padding:13px;border-bottom:1px solid #e2e8f0;vertical-align:top}
.table th{font-size:12px;text-transform:uppercase;color:#64748b}
.badge{display:inline-flex;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900;background:#e0f2fe;color:#0369a1}
.badge.draft{background:#f1f5f9;color:#334155}
.badge.scheduled{background:#dbeafe;color:#1d4ed8}
.badge.published{background:#dcfce7;color:#166534}
.badge.failed{background:#fee2e2;color:#991b1b}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.checks{display:flex;gap:12px;flex-wrap:wrap}
.checks label{display:flex;align-items:center;gap:8px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:10px 13px;margin:0}
.checks input{width:auto}
.media-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.media-card{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:12px}
.media-card img,.media-card video{width:100%;height:130px;object-fit:cover;border-radius:12px;background:#f1f5f9}
.admin-footer{text-align:center;color:#64748b;font-size:13px;margin-top:35px;line-height:1.8}
@media(max-width:900px){
  .mp-links{display:none}
  .mp-hero-grid,.mp-cards,.mp-steps,.mp-pricing,.admin-shell,.grid4,.form-grid,.media-grid{grid-template-columns:1fr}
  .mp-hero h1{font-size:40px}
  .sidebar{position:relative;height:auto}
  .main{padding:18px}
}

/* MiPublicador - reloj GMT-5 y selector horario */
.mp-live-clock{
  margin-top:8px;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  color:#64748b;
  font-size:14px;
  font-weight:800;
}
.mp-live-clock strong{
  color:#0f172a;
  background:#ffffff;
  border:1px solid #e2e8f0;
  padding:7px 10px;
  border-radius:999px;
}
.mp-live-clock span{
  color:#2563eb;
  background:#dbeafe;
  padding:7px 10px;
  border-radius:999px;
}
.field-help{
  display:block;
  margin-top:8px;
  color:#64748b;
  font-size:13px;
  line-height:1.5;
}
.quick-time-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.quick-time{
  border:1px solid #cbd5e1;
  background:#f8fafc;
  color:#0f172a;
  border-radius:999px;
  padding:8px 11px;
  font-weight:900;
  cursor:pointer;
}
.quick-time:hover{
  background:#dbeafe;
  border-color:#93c5fd;
  color:#1d4ed8;
}

/* MiPublicador - Date/Time Picker V2 */
.schedule-summary{
  margin:14px 0 6px;
  background:#f8fafc;
  border:1px solid #dbeafe;
  border-radius:18px;
  padding:14px 16px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  color:#0f172a;
  font-size:14px;
}
.schedule-summary div{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:10px 12px;
}
.schedule-summary span{
  color:#2563eb;
  font-weight:900;
}
input[type="date"],
input[type="time"]{
  font-weight:800;
}
@media(max-width:900px){
  .schedule-summary{
    grid-template-columns:1fr;
  }
}

/* MiPublicador - Posts layout tipo Buffer/Hootsuite */
.main{
  overflow-x:hidden;
}

.posts-workspace{
  display:grid;
  grid-template-columns:minmax(420px, 0.78fr) minmax(620px, 1.22fr);
  gap:18px;
  align-items:start;
}

.post-composer-card,
.post-list-card{
  margin-bottom:0;
}

.panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.panel-head h2{
  margin:0;
  font-size:24px;
  letter-spacing:-.04em;
}

.panel-head p{
  margin:5px 0 0;
  color:#64748b;
  font-size:13px;
  font-weight:700;
}

.form-step-title{
  margin:18px 0 12px;
  font-size:15px;
  font-weight:950;
  color:#0f172a;
}

.label-between{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}

.label-between small{
  color:#16a34a;
  font-weight:900;
}

#mpContentText{
  min-height:150px;
}

.mp-time-note{
  margin-top:8px;
  color:#64748b;
  font-size:13px;
  font-weight:800;
}

.post-save-btn{
  width:100%;
  margin-top:8px;
}

.mp-network-checks{
  gap:8px;
}

.net-dot{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:999px;
  color:#fff;
  font-size:13px;
  font-weight:950;
  line-height:1;
}

.net-dot.fb{background:#1877f2}
.net-dot.ig{background:linear-gradient(135deg,#f97316,#ec4899,#7c3aed)}
.net-dot.tk{background:#020617}
.net-dot.yt{background:#ef4444}
.net-dot.xx{background:#64748b}

.count-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:26px;
  padding:0 9px;
  border-radius:999px;
  background:#2563eb;
  color:white;
  font-size:14px;
  margin-left:6px;
}

.post-list-head{
  align-items:center;
}

.post-list-tools{
  display:flex;
  gap:10px;
  align-items:center;
}

.post-list-tools input,
.post-list-tools select{
  height:42px;
  min-width:210px;
  padding:9px 12px;
}

.table-scroll{
  width:100%;
  overflow-x:auto;
}

.posts-table th,
.posts-table td{
  vertical-align:middle;
}

.posts-table th:nth-child(2),
.posts-table td:nth-child(2){
  width:86px;
}

.post-thumb{
  width:66px;
  height:66px;
  border-radius:12px;
  object-fit:cover;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  display:block;
}

.post-thumb.empty{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:11px;
  color:#64748b;
  font-weight:900;
  line-height:1.15;
}

.network-list{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  align-items:center;
}

.date-cell{
  color:#2563eb;
  font-weight:900;
  line-height:1.35;
}

.date-cell small{
  color:#64748b;
  font-weight:800;
}

.muted-small{
  color:#94a3b8;
  font-size:12px;
  font-weight:800;
}

.action-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.mini-btn{
  border:0;
  border-radius:12px;
  padding:10px 13px;
  font-weight:950;
  cursor:pointer;
  color:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.12);
}

.mini-btn.dark{
  background:#07111f;
}

.mini-btn.danger{
  background:#ef4444;
}

.badge.draft{
  background:#fff7ed;
  color:#b45309;
}

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

@media(max-width:900px){
  .post-list-tools{
    width:100%;
    flex-direction:column;
    align-items:stretch;
  }

  .post-list-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .post-list-tools input,
  .post-list-tools select{
    min-width:100%;
  }
}

/* MiPublicador - sidebar clock + footer + thumbnail fix */
.sidebar{
  display:flex;
  flex-direction:column;
}

.sidebar-clock-card{
  margin-top:auto;
  background:linear-gradient(180deg,rgba(37,99,235,.16),rgba(15,23,42,.3));
  border:1px solid rgba(148,163,184,.18);
  border-radius:18px;
  padding:18px 14px;
  text-align:center;
  color:#fff;
  box-shadow:0 16px 35px rgba(0,0,0,.16);
}

.sidebar-clock-label{
  font-size:12px;
  font-weight:800;
  color:#cbd5e1;
  margin-bottom:8px;
}

.sidebar-clock-time{
  font-size:30px;
  line-height:1;
  font-weight:950;
  letter-spacing:-.04em;
}

.sidebar-clock-date{
  margin-top:8px;
  font-weight:900;
  color:#dbeafe;
}

.sidebar-clock-zone{
  margin-top:10px;
  font-size:12px;
  color:#bfdbfe;
  font-weight:800;
}

.sidebar-footer-card{
  margin-top:18px;
  padding:15px 12px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.18);
  text-align:center;
  color:#94a3b8;
  font-size:12px;
  line-height:1.55;
}

.sidebar-footer-card span{
  color:#ef4444;
}

.admin-footer{
  display:none;
}

/* Ajuste posts para parecerse más al mockup 1 */
.posts-workspace{
  grid-template-columns:minmax(470px,.78fr) minmax(760px,1.22fr);
  gap:20px;
}

.post-list-card{
  overflow:hidden;
}

.posts-table th:nth-child(2),
.posts-table td:nth-child(2){
  width:82px;
}

.post-thumb{
  width:62px;
  height:62px;
  border-radius:12px;
  object-fit:cover;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  display:block;
}

.post-thumb.empty{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:10px;
  color:#64748b;
  font-weight:900;
  line-height:1.1;
}

.date-cell{
  color:#2563eb;
  font-weight:900;
  line-height:1.3;
  min-width:88px;
}

.date-cell small{
  color:#64748b;
  font-weight:800;
}

.mini-btn.danger{
  background:#ef4444 !important;
}

.schedule-summary{
  grid-template-columns:repeat(3,1fr);
}

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

@media(max-width:900px){
  .sidebar-clock-card,
  .sidebar-footer-card{
    display:none;
  }
}

/* MiPublicador - Meta Bridge */
.meta-setup-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}
.meta-card{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:20px;
  padding:18px;
}
.meta-card h3{
  margin:0 0 8px;
  font-size:20px;
}
.meta-card p{
  color:#64748b;
  line-height:1.6;
}
.copy-box{
  display:flex;
  gap:8px;
}
.copy-box input{
  flex:1;
  background:#fff;
}
.copy-box button{
  border:0;
  border-radius:12px;
  background:#07111f;
  color:#fff;
  font-weight:900;
  padding:0 14px;
  cursor:pointer;
}
.scope-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.scope-list span{
  background:#dbeafe;
  color:#1d4ed8;
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  font-weight:900;
}
@media(max-width:900px){
  .meta-setup-grid{grid-template-columns:1fr}
  .copy-box{flex-direction:column}
}

@media(max-width:900px){
  .panel .mp-cards[style]{
    grid-template-columns:1fr !important;
  }
}

/* MiPublicador legal pages */
.legal-page{
  min-height:calc(100vh - 120px);
  background:#eef2f7;
  padding:60px 20px;
}
.legal-card{
  width:90%;
  max-width:920px;
  margin:0 auto;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:28px;
  padding:36px;
  box-shadow:0 18px 45px rgba(15,23,42,.08);
}
.legal-card h1{
  margin:0 0 18px;
  font-size:40px;
  letter-spacing:-.05em;
}
.legal-card h2{
  margin-top:26px;
  font-size:22px;
}
.legal-card p{
  color:#475569;
  line-height:1.8;
  font-size:16px;
}
.legal-card .mp-btn{
  margin-top:20px;
}
@media(max-width:700px){
  .legal-card{
    padding:24px;
  }
  .legal-card h1{
    font-size:32px;
  }
}

/* MiPublicador - publicación visible en tabla */
.publish-type{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:950;
  margin-bottom:8px;
}
.publish-type.image{
  background:#dcfce7;
  color:#166534;
}
.publish-type.text{
  background:#dbeafe;
  color:#1d4ed8;
}
.publish-type.video{
  background:#fef3c7;
  color:#92400e;
}
.publish-type.draft{
  background:#f1f5f9;
  color:#475569;
}
.published-time{
  font-size:12px;
  line-height:1.35;
  color:#64748b;
  font-weight:800;
  margin:4px 0;
}
.external-id{
  display:block;
  max-width:180px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#94a3b8;
  font-size:11px;
  margin-bottom:7px;
}
.view-post-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#2563eb;
  color:#fff !important;
  font-size:12px;
  font-weight:950;
  padding:9px 11px;
  box-shadow:0 8px 18px rgba(37,99,235,.18);
}
.view-post-btn:hover{
  background:#1d4ed8;
}
.meta-error{
  margin-top:9px;
  background:#fee2e2;
  color:#991b1b;
  border:1px solid #fecaca;
  border-radius:12px;
  padding:8px 10px;
  font-size:12px;
  font-weight:800;
  line-height:1.45;
}
.posts-table th:nth-child(8),
.posts-table td:nth-child(8){
  min-width:190px;
}

/* MiPublicador - posts en 2 secciones claras */
.posts-section-nav{
  position:sticky;
  top:0;
  z-index:15;
  display:flex;
  gap:10px;
  align-items:center;
  margin:-4px 0 18px;
  padding:12px;
  background:rgba(238,242,247,.92);
  backdrop-filter:blur(12px);
  border:1px solid #e2e8f0;
  border-radius:20px;
}

.section-nav-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:999px;
  padding:12px 16px;
  background:#fff;
  color:#334155;
  border:1px solid #e2e8f0;
  font-weight:950;
  font-size:14px;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}

.section-nav-btn.active,
.section-nav-btn:hover{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
  box-shadow:0 12px 25px rgba(37,99,235,.18);
}

#crear-publicacion,
#publicaciones{
  scroll-margin-top:92px;
}

.post-composer-card{
  border-top:5px solid #2563eb;
}

.post-list-card{
  border-top:5px solid #16a34a;
}

/* En escritorio mantiene las 2 secciones visibles lado a lado */
.posts-workspace{
  align-items:start;
}

/* En móvil o pantallas medianas: una sección debajo de la otra */
@media(max-width:1250px){
  .posts-workspace{
    grid-template-columns:1fr !important;
  }

  .posts-section-nav{
    top:0;
  }
}

@media(max-width:700px){
  .posts-section-nav{
    flex-direction:column;
    align-items:stretch;
  }

  .section-nav-btn{
    width:100%;
  }
}

/* =========================================================
   MiPublicador - Premium Posts Layout V2
   ========================================================= */

.posts-workspace-premium{
  display:flex !important;
  flex-direction:column !important;
  gap:22px !important;
  align-items:stretch !important;
}

.posts-section-nav{
  position:sticky;
  top:12px;
  z-index:20;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  width:max-content;
  max-width:100%;
  margin:0 0 18px;
  padding:8px;
  background:rgba(255,255,255,.92);
  border:1px solid #dbe4ef;
  border-radius:18px;
  box-shadow:0 16px 40px rgba(15,23,42,.08);
  backdrop-filter:blur(12px);
}

.section-nav-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 18px;
  border-radius:999px;
  background:#f8fafc;
  color:#0f172a;
  border:1px solid transparent;
  font-weight:900;
  font-size:15px;
  text-decoration:none;
  transition:all .18s ease;
}

.section-nav-btn:hover{
  background:#eaf2ff;
  color:#2563eb;
  transform:translateY(-1px);
}

.section-nav-btn.active{
  background:linear-gradient(135deg,#2563eb 0%,#1d4ed8 100%);
  color:#fff;
  box-shadow:0 14px 28px rgba(37,99,235,.25);
}

#crear-publicacion,
#publicaciones{
  scroll-margin-top:90px;
}

.post-composer-card-premium,
.post-list-card-premium{
  width:100% !important;
  max-width:none !important;
  background:#ffffff;
  border:1px solid #dbe4ef;
  border-radius:26px;
  box-shadow:0 18px 46px rgba(15,23,42,.06);
  padding:26px 28px !important;
}

.post-composer-card-premium{
  order:1;
}

.post-list-card-premium{
  order:2;
}

.post-composer-card-premium h2,
.post-list-card-premium h2{
  margin:0 0 6px 0;
  font-size:22px;
  line-height:1.2;
  color:#0f172a;
  font-weight:1000;
}

.post-composer-card-premium p,
.post-list-card-premium p{
  margin:0 0 18px 0;
  color:#64748b;
  font-size:14px;
  line-height:1.55;
  font-weight:700;
}

/* formulario */
.post-composer-card-premium label,
.post-composer-card-premium .field-label{
  display:block;
  margin-bottom:8px;
  color:#0f172a;
  font-weight:900;
  font-size:14px;
}

.post-composer-card-premium input[type="text"],
.post-composer-card-premium input[type="date"],
.post-composer-card-premium input[type="time"],
.post-composer-card-premium input[type="datetime-local"],
.post-composer-card-premium input[type="file"],
.post-composer-card-premium select,
.post-composer-card-premium textarea{
  width:100%;
  border:1px solid #d7e0ea;
  background:#fff;
  color:#0f172a;
  border-radius:16px;
  min-height:54px;
  padding:14px 16px;
  font-size:15px;
  box-shadow:0 4px 10px rgba(15,23,42,.02) inset;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.post-composer-card-premium textarea{
  min-height:138px;
  resize:vertical;
}

.post-composer-card-premium input:focus,
.post-composer-card-premium select:focus,
.post-composer-card-premium textarea:focus{
  outline:none;
  border-color:#60a5fa;
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

.post-composer-card-premium input[type="file"]{
  padding:12px;
  min-height:auto;
  background:#f8fbff;
}

.post-composer-card-premium small,
.post-composer-card-premium .help-text{
  color:#64748b;
  font-size:12px;
  font-weight:700;
}

/* chips / quick actions */
.post-composer-card-premium .quick-time-btn,
.post-composer-card-premium .quick-schedule-btn,
.post-composer-card-premium .chip,
.post-composer-card-premium .pill{
  border-radius:999px !important;
  font-weight:900;
  border:1px solid #dbe4ef;
  background:#fff;
  color:#0f172a;
  box-shadow:0 6px 16px rgba(15,23,42,.04);
}

.post-composer-card-premium .quick-time-btn:hover,
.post-composer-card-premium .quick-schedule-btn:hover,
.post-composer-card-premium .chip:hover,
.post-composer-card-premium .pill:hover{
  border-color:#93c5fd;
  color:#2563eb;
  background:#eff6ff;
}

/* botones */
.post-composer-card-premium .btn,
.post-composer-card-premium button,
.post-list-card-premium .btn,
.post-list-card-premium button{
  border-radius:16px !important;
  font-weight:1000 !important;
  padding:13px 18px !important;
  box-shadow:0 12px 22px rgba(15,23,42,.08);
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.post-composer-card-premium .btn:hover,
.post-composer-card-premium button:hover,
.post-list-card-premium .btn:hover,
.post-list-card-premium button:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(15,23,42,.12);
}

/* listado publicaciones */
.post-list-card-premium{
  overflow:hidden;
}

.post-list-card-premium table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}

.post-list-card-premium th{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#64748b;
  font-weight:1000;
  padding:14px 10px;
  border-bottom:1px solid #e5edf5;
  background:#fbfdff;
}

.post-list-card-premium td{
  padding:16px 10px;
  vertical-align:top;
  border-bottom:1px solid #eef3f8;
  color:#0f172a;
}

.post-list-card-premium tr:hover td{
  background:#fcfdff;
}

.post-list-card-premium td img{
  width:58px;
  height:58px;
  object-fit:cover;
  border-radius:16px;
  display:block;
  box-shadow:0 10px 24px rgba(15,23,42,.12);
  border:1px solid #e5edf5;
}

.post-list-card-premium .count-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 8px;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  font-weight:1000;
  font-size:13px;
  margin-left:6px;
}

.post-list-card-premium .status-badge,
.post-list-card-premium .badge,
.post-list-card-premium .pill{
  border-radius:999px !important;
  font-weight:900 !important;
  padding:7px 12px !important;
  font-size:12px !important;
}

/* filtros/listado arriba */
.post-list-card-premium .table-toolbar,
.post-list-card-premium .list-toolbar,
.post-list-card-premium .toolbar,
.post-list-card-premium .panel-toolbar{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
}

.post-list-card-premium input[type="search"],
.post-list-card-premium input[type="text"],
.post-list-card-premium select{
  border-radius:16px;
  border:1px solid #d7e0ea;
  min-height:50px;
  padding:12px 14px;
  background:#fff;
  font-size:15px;
}

.post-list-card-premium input:focus,
.post-list-card-premium select:focus{
  outline:none;
  border-color:#60a5fa;
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

/* mejora lectura bloque de fecha/estado/publicado */
.post-list-card-premium .date-block,
.post-list-card-premium .publish-block,
.post-list-card-premium .meta-block{
  line-height:1.45;
}

.post-list-card-premium a{
  font-weight:900;
  text-decoration:none;
}

.post-list-card-premium a:hover{
  text-decoration:underline;
}

/* responsive */
@media (max-width: 1280px){
  .posts-section-nav{
    width:100%;
  }
}

@media (max-width: 980px){
  .post-composer-card-premium,
  .post-list-card-premium{
    padding:20px 18px !important;
    border-radius:22px;
  }

  .post-composer-card-premium h2,
  .post-list-card-premium h2{
    font-size:20px;
  }

  .post-list-card-premium{
    overflow-x:auto;
  }

  .post-list-card-premium table{
    min-width:980px;
  }
}

@media (max-width: 640px){
  .posts-section-nav{
    flex-direction:column;
    align-items:stretch;
  }

  .section-nav-btn{
    width:100%;
  }
}

/* =========================================================
   MiPublicador - Premium Posts Layout V2
   ========================================================= */

.posts-workspace-premium{
  display:flex !important;
  flex-direction:column !important;
  gap:22px !important;
  align-items:stretch !important;
}

.posts-section-nav{
  position:sticky;
  top:12px;
  z-index:20;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  width:max-content;
  max-width:100%;
  margin:0 0 18px;
  padding:8px;
  background:rgba(255,255,255,.92);
  border:1px solid #dbe4ef;
  border-radius:18px;
  box-shadow:0 16px 40px rgba(15,23,42,.08);
  backdrop-filter:blur(12px);
}

.section-nav-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 18px;
  border-radius:999px;
  background:#f8fafc;
  color:#0f172a;
  border:1px solid transparent;
  font-weight:900;
  font-size:15px;
  text-decoration:none;
  transition:all .18s ease;
}

.section-nav-btn:hover{
  background:#eaf2ff;
  color:#2563eb;
  transform:translateY(-1px);
}

.section-nav-btn.active{
  background:linear-gradient(135deg,#2563eb 0%,#1d4ed8 100%);
  color:#fff;
  box-shadow:0 14px 28px rgba(37,99,235,.25);
}

#crear-publicacion,
#publicaciones{
  scroll-margin-top:90px;
}

.post-composer-card-premium,
.post-list-card-premium{
  width:100% !important;
  max-width:none !important;
  background:#ffffff;
  border:1px solid #dbe4ef;
  border-radius:26px;
  box-shadow:0 18px 46px rgba(15,23,42,.06);
  padding:26px 28px !important;
}

.post-composer-card-premium{
  order:1;
}

.post-list-card-premium{
  order:2;
}

.post-composer-card-premium h2,
.post-list-card-premium h2{
  margin:0 0 6px 0;
  font-size:22px;
  line-height:1.2;
  color:#0f172a;
  font-weight:1000;
}

.post-composer-card-premium p,
.post-list-card-premium p{
  margin:0 0 18px 0;
  color:#64748b;
  font-size:14px;
  line-height:1.55;
  font-weight:700;
}

/* formulario */
.post-composer-card-premium label,
.post-composer-card-premium .field-label{
  display:block;
  margin-bottom:8px;
  color:#0f172a;
  font-weight:900;
  font-size:14px;
}

.post-composer-card-premium input[type="text"],
.post-composer-card-premium input[type="date"],
.post-composer-card-premium input[type="time"],
.post-composer-card-premium input[type="datetime-local"],
.post-composer-card-premium input[type="file"],
.post-composer-card-premium select,
.post-composer-card-premium textarea{
  width:100%;
  border:1px solid #d7e0ea;
  background:#fff;
  color:#0f172a;
  border-radius:16px;
  min-height:54px;
  padding:14px 16px;
  font-size:15px;
  box-shadow:0 4px 10px rgba(15,23,42,.02) inset;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.post-composer-card-premium textarea{
  min-height:138px;
  resize:vertical;
}

.post-composer-card-premium input:focus,
.post-composer-card-premium select:focus,
.post-composer-card-premium textarea:focus{
  outline:none;
  border-color:#60a5fa;
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

.post-composer-card-premium input[type="file"]{
  padding:12px;
  min-height:auto;
  background:#f8fbff;
}

.post-composer-card-premium small,
.post-composer-card-premium .help-text{
  color:#64748b;
  font-size:12px;
  font-weight:700;
}

/* chips / quick actions */
.post-composer-card-premium .quick-time-btn,
.post-composer-card-premium .quick-schedule-btn,
.post-composer-card-premium .chip,
.post-composer-card-premium .pill{
  border-radius:999px !important;
  font-weight:900;
  border:1px solid #dbe4ef;
  background:#fff;
  color:#0f172a;
  box-shadow:0 6px 16px rgba(15,23,42,.04);
}

.post-composer-card-premium .quick-time-btn:hover,
.post-composer-card-premium .quick-schedule-btn:hover,
.post-composer-card-premium .chip:hover,
.post-composer-card-premium .pill:hover{
  border-color:#93c5fd;
  color:#2563eb;
  background:#eff6ff;
}

/* botones */
.post-composer-card-premium .btn,
.post-composer-card-premium button,
.post-list-card-premium .btn,
.post-list-card-premium button{
  border-radius:16px !important;
  font-weight:1000 !important;
  padding:13px 18px !important;
  box-shadow:0 12px 22px rgba(15,23,42,.08);
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.post-composer-card-premium .btn:hover,
.post-composer-card-premium button:hover,
.post-list-card-premium .btn:hover,
.post-list-card-premium button:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(15,23,42,.12);
}

/* listado publicaciones */
.post-list-card-premium{
  overflow:hidden;
}

.post-list-card-premium table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}

.post-list-card-premium th{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#64748b;
  font-weight:1000;
  padding:14px 10px;
  border-bottom:1px solid #e5edf5;
  background:#fbfdff;
}

.post-list-card-premium td{
  padding:16px 10px;
  vertical-align:top;
  border-bottom:1px solid #eef3f8;
  color:#0f172a;
}

.post-list-card-premium tr:hover td{
  background:#fcfdff;
}

.post-list-card-premium td img{
  width:58px;
  height:58px;
  object-fit:cover;
  border-radius:16px;
  display:block;
  box-shadow:0 10px 24px rgba(15,23,42,.12);
  border:1px solid #e5edf5;
}

.post-list-card-premium .count-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 8px;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  font-weight:1000;
  font-size:13px;
  margin-left:6px;
}

.post-list-card-premium .status-badge,
.post-list-card-premium .badge,
.post-list-card-premium .pill{
  border-radius:999px !important;
  font-weight:900 !important;
  padding:7px 12px !important;
  font-size:12px !important;
}

/* filtros/listado arriba */
.post-list-card-premium .table-toolbar,
.post-list-card-premium .list-toolbar,
.post-list-card-premium .toolbar,
.post-list-card-premium .panel-toolbar{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
}

.post-list-card-premium input[type="search"],
.post-list-card-premium input[type="text"],
.post-list-card-premium select{
  border-radius:16px;
  border:1px solid #d7e0ea;
  min-height:50px;
  padding:12px 14px;
  background:#fff;
  font-size:15px;
}

.post-list-card-premium input:focus,
.post-list-card-premium select:focus{
  outline:none;
  border-color:#60a5fa;
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

/* mejora lectura bloque de fecha/estado/publicado */
.post-list-card-premium .date-block,
.post-list-card-premium .publish-block,
.post-list-card-premium .meta-block{
  line-height:1.45;
}

.post-list-card-premium a{
  font-weight:900;
  text-decoration:none;
}

.post-list-card-premium a:hover{
  text-decoration:underline;
}

/* responsive */
@media (max-width: 1280px){
  .posts-section-nav{
    width:100%;
  }
}

@media (max-width: 980px){
  .post-composer-card-premium,
  .post-list-card-premium{
    padding:20px 18px !important;
    border-radius:22px;
  }

  .post-composer-card-premium h2,
  .post-list-card-premium h2{
    font-size:20px;
  }

  .post-list-card-premium{
    overflow-x:auto;
  }

  .post-list-card-premium table{
    min-width:980px;
  }
}

@media (max-width: 640px){
  .posts-section-nav{
    flex-direction:column;
    align-items:stretch;
  }

  .section-nav-btn{
    width:100%;
  }
}

/* MiPublicador - Cola de publicación */
.queue-page{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.queue-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%);
  border:1px solid #dbe4ef;
}

.queue-kicker{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  background:#dbeafe;
  color:#1d4ed8;
  padding:7px 11px;
  font-size:12px;
  font-weight:1000;
  margin-bottom:10px;
}

.queue-hero h2{
  margin:0;
  font-size:30px;
  letter-spacing:-.05em;
}

.queue-hero p{
  margin:8px 0 0;
  color:#64748b;
  font-weight:800;
}

.queue-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.queue-stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
}

.queue-stat{
  background:#fff;
  border:1px solid #dbe4ef;
  border-radius:22px;
  padding:18px;
  box-shadow:0 16px 36px rgba(15,23,42,.05);
}

.queue-stat small{
  display:block;
  color:#64748b;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-size:12px;
}

.queue-stat strong{
  display:block;
  margin:8px 0 4px;
  font-size:34px;
  line-height:1;
  letter-spacing:-.06em;
  color:#0f172a;
}

.queue-stat span{
  color:#64748b;
  font-weight:800;
  font-size:13px;
}

.queue-stat.scheduled{border-top:5px solid #2563eb}
.queue-stat.due{border-top:5px solid #f97316}
.queue-stat.published{border-top:5px solid #16a34a}
.queue-stat.failed{border-top:5px solid #ef4444}

.queue-table-wrap{
  width:100%;
  overflow-x:auto;
}

.queue-table{
  min-width:1100px;
}

.queue-table th{
  background:#fbfdff;
  color:#64748b;
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:.04em;
  font-weight:1000;
}

.queue-table td{
  vertical-align:top;
}

.queue-row-due td{
  background:#fff7ed !important;
}

.queue-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:7px 11px;
  font-size:12px;
  font-weight:1000;
}

.queue-status.scheduled{
  background:#dbeafe;
  color:#1d4ed8;
}

.queue-status.due{
  background:#ffedd5;
  color:#c2410c;
}

.queue-status.published{
  background:#dcfce7;
  color:#166534;
}

.queue-status.failed{
  background:#fee2e2;
  color:#991b1b;
}

.queue-error{
  max-width:280px;
  background:#fee2e2;
  color:#991b1b;
  border:1px solid #fecaca;
  border-radius:12px;
  padding:8px 10px;
  font-size:12px;
  font-weight:800;
  line-height:1.4;
}

.queue-log{
  margin:0;
  padding:18px;
  border-radius:18px;
  background:#07111f;
  color:#dbeafe;
  overflow:auto;
  max-height:360px;
  font-size:13px;
  line-height:1.55;
  white-space:pre-wrap;
}

@media(max-width:1100px){
  .queue-stats{
    grid-template-columns:repeat(2,1fr);
  }

  .queue-hero{
    flex-direction:column;
    align-items:flex-start;
  }
}

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

  .queue-actions{
    width:100%;
  }

  .queue-actions .mp-btn{
    width:100%;
    justify-content:center;
  }
}

/* MiPublicador - estado processing y aviso multired */
.badge.processing,
.queue-status.processing{
  background:#ede9fe !important;
  color:#6d28d9 !important;
}

.multi-network-notice{
  margin:16px 0;
  padding:14px 16px;
  border-radius:18px;
  background:#f5f3ff;
  border:1px solid #ddd6fe;
  color:#4c1d95;
  font-size:14px;
  line-height:1.55;
  font-weight:750;
}

.multi-network-notice strong{
  font-weight:1000;
}

.multi-network-notice b{
  color:#6d28d9;
}

/* MiPublicador - links separados por red */
.social-link-list{
  display:flex;
  flex-direction:column;
  gap:7px;
  align-items:flex-start;
  margin:8px 0;
}

.social-post-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border-radius:999px;
  padding:9px 12px;
  font-size:12px;
  font-weight:1000;
  text-decoration:none !important;
  color:#fff !important;
  box-shadow:0 10px 20px rgba(15,23,42,.12);
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  white-space:nowrap;
}

.social-post-link:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(15,23,42,.18);
  opacity:.95;
}

.social-post-link span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  color:#fff;
  font-size:12px;
  font-weight:1000;
}

.social-post-link.facebook{
  background:#1877f2;
}

.social-post-link.instagram{
  background:linear-gradient(135deg,#f97316,#ec4899,#7c3aed);
}

.social-post-link.tiktok{
  background:#020617;
}

.social-post-link.youtube{
  background:#ef4444;
}

.social-post-link.web{
  background:#334155;
}

/* MiPublicador - ocultar IDs técnicos en vista principal */
.external-id{
  display:none !important;
}

/* MiPublicador - Estado + Resultado fusionados */
.result-cell{
  min-width:230px;
}

.result-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}

.publish-type.multi{
  background:linear-gradient(135deg,#dbeafe,#fce7f3);
  color:#1e3a8a;
  border:1px solid #bfdbfe;
}

.publish-type.instagram{
  background:linear-gradient(135deg,#ffedd5,#fce7f3,#ede9fe);
  color:#9d174d;
  border:1px solid #fbcfe8;
}

.publish-type.processing{
  background:#ede9fe;
  color:#6d28d9;
  border:1px solid #ddd6fe;
}

.posts-table th:nth-child(7),
.posts-table td:nth-child(7){
  min-width:240px;
}

.posts-table th:nth-child(8),
.posts-table td:nth-child(8){
  min-width:180px;
}

/* Oculta restos de ID técnico si algún bloque antiguo lo imprime */
.external-id{
  display:none !important;
}

/* MiPublicador - labels video */
.publish-type.video{
  background:#fef3c7 !important;
  color:#92400e !important;
  border:1px solid #fde68a;
}

/* MiPublicador - disclaimer videos / multired */
.multi-network-notice{
  position:relative;
  margin:18px 0;
  padding:16px 18px 16px 52px;
  border-radius:20px;
  background:linear-gradient(135deg,#f5f3ff 0%,#eff6ff 100%);
  border:1px solid #ddd6fe;
  color:#312e81;
  font-size:14px;
  line-height:1.6;
  font-weight:800;
  box-shadow:0 12px 28px rgba(79,70,229,.08);
}

.multi-network-notice:before{
  content:"⏱️";
  position:absolute;
  left:16px;
  top:16px;
  width:26px;
  height:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#fff;
  box-shadow:0 8px 18px rgba(79,70,229,.12);
}

.multi-network-notice strong{
  display:block;
  font-weight:1000;
  color:#1e1b4b;
  margin-bottom:4px;
}

.multi-network-notice b{
  color:#6d28d9;
  font-weight:1000;
}
