: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;
  }
}
