body.pm-mode .internal-card{
  max-width:none!important;
  width:calc(100vw - 120px)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

.pm-tabs{display:flex;gap:10px;margin:16px 0}
.pm-tab{border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.08);color:white;border-radius:12px;padding:11px 15px;font-weight:900;cursor:pointer;text-transform:uppercase}
.pm-tab.active{background:linear-gradient(135deg,#7c3aed,#2563eb)}
.pm-box{margin-top:14px}

.pm-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  margin:18px 0;
  flex-wrap:wrap;
}

.pm-title-block h3{
  margin:0;
  font-size:22px;
  color:#fff;
}

.pm-title-block p{
  margin:6px 0 0;
  color:#cbd5e1;
}

.pm-textarea{
  width:100%;
  min-height:170px;
  background:#070711;
  color:white;
  border:1px solid rgba(168,85,247,.45);
  border-radius:18px;
  padding:18px;
  box-sizing:border-box;
  font-size:16px;
  line-height:1.45;
}

.pm-actions{
  display:flex;
  gap:12px;
  margin:18px 0;
  flex-wrap:wrap;
}

.pm-main-btn,
.pm-secondary-btn{
  border:0;
  border-radius:16px;
  padding:16px 22px;
  font-weight:900;
  cursor:pointer;
  text-transform:uppercase;
}

.pm-main-btn{
  flex:1;
  min-width:260px;
  color:white;
  background:linear-gradient(135deg,#8b5cf6,#ec4899);
}

.pm-secondary-btn{
  color:white;
  background:rgba(255,255,255,.09);
  border:1px solid rgba(255,255,255,.14);
}

.pm-drop{
  border:2px dashed rgba(147,197,253,.45);
  background:rgba(15,23,42,.72);
  border-radius:22px;
  padding:28px;
  text-align:center;
  margin:18px 0;
  cursor:pointer;
}

.pm-drop strong{
  display:block;
  font-size:20px;
  margin-bottom:6px;
}

.pm-drop span{
  color:#cbd5e1;
}

.pm-summary{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:18px 0;
}

.pm-pill{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  padding:12px 16px;
  border-radius:14px;
  font-weight:900;
  font-size:16px;
}

.pm-table-wrap{
  overflow:auto;
  margin-top:18px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:20px;
  background:rgba(15,15,25,.92);
  max-height:72vh;
}

.pm-table{
  width:100%;
  min-width:1320px;
  border-collapse:collapse;
}

.pm-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:#12121d;
}

.pm-table th,.pm-table td{
  padding:18px;
  border-bottom:1px solid rgba(255,255,255,.12);
  text-align:left;
  vertical-align:middle;
}

.pm-table th{
  color:#93c5fd;
  text-transform:uppercase;
  font-size:13px;
  letter-spacing:.04em;
}

.pm-input{
  width:100%;
  background:#080814;
  color:white;
  border:1px solid rgba(168,85,247,.35);
  border-radius:14px;
  padding:13px;
  box-sizing:border-box;
  font-size:15px;
}

.pm-input:read-only{
  opacity:.75;
}

.pm-imgbox{
  width:150px;
  min-height:92px;
  border:1px solid rgba(168,85,247,.35);
  border-radius:18px;
  background:#080814;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:10px;
  cursor:pointer;
  overflow:hidden;
}

.pm-imgbox img{
  width:100%;
  height:92px;
  object-fit:cover;
  border-radius:12px;
  display:block;
}

.pm-imgbox small{
  color:#cbd5e1;
  display:block;
  margin-top:4px;
}

.pm-hidden-file{
  display:none;
}

.pm-status{
  font-weight:900;
  white-space:nowrap;
  font-size:16px;
}

.pm-fecha{
  white-space:nowrap;
  color:#e5e7eb;
  font-weight:700;
}

.pm-row-saved{
  background:rgba(34,197,94,.08);
}

.pm-row-saving{
  background:rgba(59,130,246,.08);
}

.pm-row-error{
  background:rgba(239,68,68,.08);
}

.pm-progress{
  height:13px;
  background:rgba(255,255,255,.1);
  border-radius:999px;
  overflow:hidden;
  margin:12px 0 4px;
}

.pm-progress-bar{
  height:100%;
  width:0%;
  background:linear-gradient(135deg,#22c55e,#3b82f6);
  transition:.25s;
}

/* AJUSTE ANCHO CONTROLADO */
body.pm-mode {
  overflow-x: hidden;
}

body.pm-mode .internal-card {
  width: min(96vw, 1500px) !important;
  max-width: 1500px !important;
}

body.pm-mode .app {
  overflow-x: hidden;
}

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

.pm-table-wrap {
  max-width: 100%;
}

/* FIX DESBORDE HORIZONTAL */
body.pm-mode .photo-types-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
}

body.pm-mode .action-card {
  width: 100% !important;
  min-width: 0 !important;
}

body.pm-mode .inline-form-box {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body.pm-mode .pm-tabs {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  width: 100% !important;
}

body.pm-mode .pm-textarea,
body.pm-mode .pm-main-btn {
  width: 100% !important;
  max-width: 100% !important;
}

body.pm-mode .pm-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
}

body.pm-mode .pm-table {
  min-width: 1000px !important;
}

body.pm-mode .internal-card {
  box-sizing: border-box !important;
}

/* FIX FINAL ANCHO PLANIFICACIÓN */
body.pm-mode,
body.pm-mode html {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body.pm-mode .app,
body.pm-mode .content,
body.pm-mode main,
body.pm-mode .page,
body.pm-mode .internal-card {
  width: 100% !important;
  max-width: calc(100vw - 80px) !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

body.pm-mode .photo-types-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  overflow: hidden !important;
}

body.pm-mode .photo-types-grid .action-card {
  flex: 1 1 220px !important;
  max-width: 280px !important;
}

body.pm-mode .pm-table {
  min-width: 900px !important;
}

body.pm-mode .pm-imgbox {
  width: 120px !important;
}

/* MODO PLANIFICACIÓN COMO PANTALLA COMPLETA */
body.pm-mode .internal-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.pm-mode .internal-card > h2,
body.pm-mode .internal-card > .muted,
body.pm-mode .photo-types-grid {
  display: none !important;
}

body.pm-mode #fotoFormBox {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 0 !important;
}

body.pm-mode #fotoFormTitle {
  font-size: 38px !important;
  text-align: left !important;
  margin-bottom: 22px !important;
}

body.pm-mode .pm-tabs {
  max-width: 100% !important;
}

body.pm-mode #pmMensual {
  width: 100% !important;
}

body.pm-mode .pm-table-wrap {
  border-radius: 18px !important;
  max-height: none !important;
}

body.pm-mode .pm-table th,
body.pm-mode .pm-table td {
  padding: 22px !important;
}

/* CENTRAR TABLA PLANIFICACIÓN */
.pm-table th,
.pm-table td {
  text-align: center !important;
}

.pm-table .pm-input {
  text-align: center !important;
}

.pm-imgbox {
  margin: 0 auto !important;
  text-align: center !important;
  flex-direction: column !important;
}

.pm-status,
.pm-fecha {
  text-align: center !important;
}

/* CENTRAR TABLA PLANIFICACIÓN */
.pm-table th,
.pm-table td {
  text-align: center !important;
}

.pm-table .pm-input {
  text-align: center !important;
}

.pm-imgbox {
  margin: 0 auto !important;
  text-align: center !important;
  flex-direction: column !important;
}

.pm-status,
.pm-fecha {
  text-align: center !important;
}

/* =========================================================
   FILAS ESTILO META BUSINESS SUITE
========================================================= */

.pm-table{
    width:100%;
    border-collapse:separate !important;
    border-spacing:0 18px !important;
}

.pm-table thead th{
    padding:18px 16px !important;
    text-align:center !important;
}

.pm-table tbody tr{
    background:#1d1c27;
    transition:.20s;
}

.pm-table tbody tr:hover{
    background:#262436;
    transform:translateY(-2px);
}

.pm-table td{
    padding:26px 18px !important;
    text-align:center !important;
    vertical-align:middle !important;

    border-top:1px solid rgba(255,255,255,.08);
    border-bottom:1px solid rgba(255,255,255,.08);
}

.pm-table td:first-child{
    border-left:1px solid rgba(255,255,255,.08);
    border-top-left-radius:18px;
    border-bottom-left-radius:18px;
}

.pm-table td:last-child{
    border-right:1px solid rgba(255,255,255,.08);
    border-top-right-radius:18px;
    border-bottom-right-radius:18px;
}

.pm-table tbody tr:hover td{
    border-color:#8b5cf6;
}

.pm-imgbox{
    margin:auto;
}

.pm-status{
    font-size:18px;
    font-weight:700;
}

.pm-fecha{
    font-weight:600;
}


/* =========================================================
   CENTRAR BOTÓN SUBIR FOTO
========================================================= */

.pm-imgbox{
    display:flex !important;
    flex-direction:column;
    justify-content:center !important;
    align-items:center !important;

    width:130px;
    height:130px;

    margin:auto !important;
    padding:0 !important;

    text-align:center;
}

.pm-imgbox br{
    display:none;
}

.pm-imgbox small{
    display:block;
    margin-top:10px;
    font-size:15px;
    font-weight:700;
    letter-spacing:.6px;
}

.pm-imgbox img,
.pm-imgbox svg{
    margin-bottom:10px;
}




/* =========================================================
   TÍTULO FACEBOOK MÁS CÓMODO SIN AGRANDAR LA TABLA
========================================================= */

.pm-table{
    table-layout:fixed;
}

.pm-table td:nth-child(3) .pm-input{
    width:320px !important;
    max-width:320px !important;
}

.pm-table td:nth-child(2) .pm-input{
    width:190px !important;
}


/* =========================================================
   FIX TABLA PLANIFICACIÓN - DISTRIBUCIÓN CORRECTA
========================================================= */

.pm-table{
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 1150px !important;
}

.pm-table th:nth-child(1),
.pm-table td:nth-child(1){ width: 170px !important; }

.pm-table th:nth-child(2),
.pm-table td:nth-child(2){ width: 230px !important; }

.pm-table th:nth-child(3),
.pm-table td:nth-child(3){ width: 360px !important; }

.pm-table th:nth-child(4),
.pm-table td:nth-child(4){ width: 260px !important; }

.pm-table th:nth-child(5),
.pm-table td:nth-child(5){ width: 190px !important; }

.pm-table td:nth-child(3) .pm-input{
  width: 330px !important;
  max-width: 330px !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.pm-table td:nth-child(2) .pm-input{
  width: 200px !important;
  max-width: 200px !important;
}

.pm-fecha{
  white-space: nowrap !important;
}

.pm-table td{
  overflow: hidden !important;
}


/* FIX TABLA CENTRADA Y SIN CORTE */
.pm-table-wrap{
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.pm-table{
  min-width: 100% !important;
  width: 100% !important;
  table-layout: fixed !important;
}

.pm-table th:nth-child(1),
.pm-table td:nth-child(1){ width: 15% !important; }

.pm-table th:nth-child(2),
.pm-table td:nth-child(2){ width: 20% !important; }

.pm-table th:nth-child(3),
.pm-table td:nth-child(3){ width: 30% !important; }

.pm-table th:nth-child(4),
.pm-table td:nth-child(4){ width: 22% !important; }

.pm-table th:nth-child(5),
.pm-table td:nth-child(5){ width: 13% !important; }

.pm-table td:nth-child(3) .pm-input{
  width: 100% !important;
  max-width: 100% !important;
}

.pm-table td:nth-child(2) .pm-input{
  width: 100% !important;
  max-width: 100% !important;
}

.pm-status{
  white-space: nowrap !important;
}

/* AJUSTE FINAL COLUMNAS */
.pm-table th:nth-child(1),
.pm-table td:nth-child(1){ width: 14% !important; }

.pm-table th:nth-child(2),
.pm-table td:nth-child(2){ width: 18% !important; }

.pm-table th:nth-child(3),
.pm-table td:nth-child(3){ width: 29% !important; }

.pm-table th:nth-child(4),
.pm-table td:nth-child(4){ width: 22% !important; }

.pm-table th:nth-child(5),
.pm-table td:nth-child(5){ width: 17% !important; }

.pm-status{
  font-size: 16px !important;
  white-space: nowrap !important;
}

.pm-imgbox{
  width: 115px !important;
  height: 115px !important;
}

.pm-table td{
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* NUEVA DISTRIBUCIÓN */
.pm-table th:nth-child(1),
.pm-table td:nth-child(1){width:13%!important;}

.pm-table th:nth-child(2),
.pm-table td:nth-child(2){width:18%!important;}

.pm-table th:nth-child(3),
.pm-table td:nth-child(3){width:47%!important;}

.pm-table th:nth-child(4),
.pm-table td:nth-child(4){width:22%!important;}

.pm-status-inline{
    margin-top:8px;
    font-size:15px;
    font-weight:700;
}

.pm-title{
    width:100%!important;
    max-width:none!important;
}

.pm-title input{
    width:100%!important;
}

/* BOTONES IA EN FOTO FRASE */
.pm-img-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:130px;
  margin:auto;
}

.pm-ai-btn,
.pm-upload-btn{
  border:1px solid rgba(168,85,247,.45);
  background:#080814;
  color:white;
  border-radius:14px;
  padding:10px 8px;
  font-weight:900;
  cursor:pointer;
  font-size:13px;
}

.pm-ai-btn{
  background:linear-gradient(135deg,#7c3aed,#2563eb);
}

.pm-ai-btn:hover,
.pm-upload-btn:hover{
  transform:translateY(-1px);
}

.pm-ai-info{
  font-size:12px;
  color:#cbd5e1;
  margin-top:6px;
}

/* CUADRO ÚNICO IA + SUBIR FOTO */
.pm-img-actions{
  width:135px !important;
  height:135px !important;
  margin:auto !important;
  border:1px solid rgba(168,85,247,.45);
  border-radius:18px;
  background:#080814;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.pm-ai-btn,
.pm-upload-btn{
  flex:1;
  width:100%;
  border:0 !important;
  border-radius:0 !important;
  margin:0 !important;
  background:transparent !important;
  color:white;
  font-weight:900;
  cursor:pointer;
  font-size:13px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:8px;
}

.pm-ai-btn{
  background:rgba(168,85,247,.16) !important;
  border-bottom:1px solid rgba(168,85,247,.35) !important;
}

.pm-upload-btn{
  background:rgba(255,255,255,.04) !important;
}

.pm-ai-btn:hover,
.pm-upload-btn:hover{
  background:rgba(236,72,153,.22) !important;
  transform:none !important;
}

.pm-imgbox{
  width:135px !important;
  height:135px !important;
}

/* FIX DEFINITIVO CUADRO ÚNICO IA/FOTO */
.pm-combo-box{
  width:135px !important;
  height:135px !important;
  padding:0 !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

.pm-combo-ai,
.pm-combo-upload{
  border:0 !important;
  width:100% !important;
  margin:0 !important;
  color:#fff !important;
  font-weight:900 !important;
  cursor:pointer !important;
  text-align:center !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.pm-combo-ai{
  flex:1.35 !important;
  background:linear-gradient(135deg,#8b5cf6,#ec4899) !important;
  font-size:13px !important;
}

.pm-combo-upload{
  flex:.65 !important;
  background:#080814 !important;
  border-top:1px solid rgba(168,85,247,.45) !important;
  font-size:12px !important;
}

.pm-combo-ai:hover,
.pm-combo-upload:hover{
  filter:brightness(1.12);
}


/* BOTÓN IA DEBAJO DEL CUADRO */
.pm-manual-card{
  width:125px !important;
  height:125px !important;
  margin:0 auto 10px auto !important;
}

.pm-ia-row-btn{
  display:block !important;
  width:125px !important;
  margin:0 auto !important;
  border:1px solid rgba(168,85,247,.45) !important;
  background:rgba(168,85,247,.12) !important;
  color:white !important;
  border-radius:12px !important;
  padding:8px 10px !important;
  font-size:12px !important;
  font-weight:900 !important;
  cursor:pointer !important;
}

.pm-ia-row-btn:hover{
  background:rgba(236,72,153,.22) !important;
}

/* MODAL VISTA PREVIA IA */
.pm-ia-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  background:rgba(0,0,0,.88);
  display:none;
  align-items:center;
  justify-content:center;
  padding:30px;
}

.pm-ia-modal.open{
  display:flex;
}

.pm-ia-modal-content{
  max-width:92vw;
  max-height:92vh;
  background:#080814;
  border:1px solid rgba(168,85,247,.45);
  border-radius:24px;
  padding:18px;
  box-shadow:0 0 60px rgba(168,85,247,.35);
  position:relative;
}

.pm-ia-modal-content img{
  max-width:86vw;
  max-height:82vh;
  display:block;
  border-radius:16px;
}

.pm-ia-modal-close{
  position:absolute;
  top:-16px;
  right:-16px;
  width:42px;
  height:42px;
  border-radius:50%;
  border:0;
  background:linear-gradient(135deg,#8b5cf6,#ec4899);
  color:white;
  font-size:22px;
  font-weight:900;
  cursor:pointer;
}

.pm-ia-view-btn{
  margin-top:6px;
  display:block;
  width:100%;
  border:1px solid rgba(168,85,247,.45);
  background:rgba(168,85,247,.16);
  color:white;
  border-radius:10px;
  padding:6px;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.pm-ia-click-img{
  cursor:pointer;
}

/* FOTO FRASE - 4 COLUMNAS LIMPIO */
.pm-table-wrap{
  overflow-x:hidden !important;
}

.pm-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}

.pm-table th:nth-child(1),
.pm-table td:nth-child(1){
  width:150px !important;
}

.pm-table th:nth-child(2),
.pm-table td:nth-child(2){
  width:180px !important;
}

.pm-table th:nth-child(3),
.pm-table td:nth-child(3){
  width:auto !important;
}

.pm-table th:nth-child(4),
.pm-table td:nth-child(4){
  width:300px !important;
}

.pm-table th:nth-child(n+5),
.pm-table td:nth-child(n+5){
  display:none !important;
}

.pm-fecha{
  white-space:normal !important;
  line-height:1.45 !important;
  text-align:left !important;
  font-size:15px !important;
}

.pm-fecha .pm-status{
  margin-top:10px !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
  padding:7px 12px !important;
  border-radius:999px !important;
  width:auto !important;
  height:auto !important;
  font-size:13px !important;
}

.pm-titulo{
  height:90px !important;
  min-height:90px !important;
  resize:none !important;
  overflow:hidden !important;
  white-space:pre-wrap !important;
  line-height:1.35 !important;
  padding:14px 16px !important;
  text-align:left !important;
}

.pm-pendiente{
  background:rgba(234,179,8,.14) !important;
  color:#facc15 !important;
  border:1px solid rgba(234,179,8,.35) !important;
}


.pm-titulo{
  width:100%;
  min-height:88px;
  max-height:88px;
  resize:none;
  overflow-y:auto;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
  font-family:inherit;
}


.pm-titulo{
  width:100%;
  min-height:88px;
  max-height:88px;
  resize:none;
  overflow-y:auto;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
  font-family:inherit;
}

/* FIX TITULO MULTILINEA */
textarea.pm-titulo,
.pm-titulo{
  display:block !important;
  width:100% !important;
  height:96px !important;
  min-height:96px !important;
  max-height:96px !important;
  resize:none !important;
  overflow-y:auto !important;
  white-space:pre-wrap !important;
  word-break:break-word !important;
  overflow-wrap:anywhere !important;
  line-height:1.35 !important;
  text-align:left !important;
  padding:12px 16px !important;
}

/* FIX DEFINITIVO: TITULO FACEBOOK MULTILINEA */
.pm-table td:nth-child(3) textarea.pm-input.pm-titulo,
.pm-table td:nth-child(3) textarea.pm-titulo{
  display:block !important;
  width:100% !important;
  height:120px !important;
  min-height:120px !important;
  max-height:120px !important;
  white-space:pre-wrap !important;
  word-break:break-word !important;
  overflow-wrap:anywhere !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  text-overflow:clip !important;
  resize:none !important;
  line-height:1.4 !important;
  text-align:left !important;
  padding:14px 16px !important;
}

/* GENERACIÓN DE COLLAGES DESDE DRIVE */
.pm-drive-row-btn {
  display: block;
  margin: 8px auto 0;
  padding: 3px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.pm-drive-row-btn:hover {
  transform: scale(1.18);
  background: rgba(255, 255, 255, .08);
}

.pm-drive-row-btn:disabled {
  cursor: wait;
  opacity: .55;
  transform: none;
}

.pm-drive-all-btn {
  width: 100%;
  margin-top: 10px;
}

.pm-directorio-small{
  padding:8px 14px;
  font-size:12px;
  border-radius:12px;
  width:auto;
  min-width:auto;
}

button.pm-secondary-btn.pm-directorio-small{
  padding:6px 12px !important;
  font-size:12px !important;
  font-weight:800 !important;
  border-radius:10px !important;
  width:auto !important;
  min-width:auto !important;
  flex:none !important;
}


button.pm-secondary-btn.pm-directorio-small{
  padding:10px 18px !important;
  font-size:14px !important;
  font-weight:800 !important;
  border-radius:12px !important;
  width:auto !important;
  min-width:180px !important;
  flex:none !important;
}

button.pm-secondary-btn.pm-directorio-small{
  padding:12px 22px !important;
  font-size:14px !important;
  font-weight:900 !important;
  border-radius:16px !important;
  width:auto !important;
  min-width:320px !important;
  flex:none !important;
}


.pm-actions{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

button.pm-secondary-btn.pm-directorio-small{
  padding:14px 22px !important;
  font-size:14px !important;
  font-weight:900 !important;
  border-radius:16px !important;
  width:auto !important;
  min-width:260px !important;
  flex:1 !important;
}


.pm-plan-actions{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:18px;
}

.pm-plan-actions button{
  flex:1;
  min-width:260px;
}

.pm-plan-actions .pm-directorio-small{
  flex:1;
  min-width:260px;
}


.pm-generando{
  position:relative;
  overflow:hidden;
  padding:30px;
  border-radius:22px;
  background:
    linear-gradient(
      135deg,
      rgba(139,92,246,.18),
      rgba(236,72,153,.18),
      rgba(59,130,246,.15)
    );
  border:1px solid rgba(236,72,153,.45);
  box-shadow:
    0 0 25px rgba(236,72,153,.25),
    inset 0 0 30px rgba(139,92,246,.15);
  text-align:center;
}


.pm-generando::before{
  content:"";
  position:absolute;
  top:-50%;
  left:-50%;
  width:200%;
  height:200%;
  background:
    linear-gradient(
      120deg,
      transparent 35%,
      rgba(255,255,255,.35),
      transparent 65%
    );
  animation:
    pmBrillo 2.5s infinite;
}


.pm-generando h3{
  position:relative;
  z-index:2;
  font-size:22px;
  letter-spacing:.08em;
  background:
    linear-gradient(
      90deg,
      #fff,
      #f9a8d4,
      #c4b5fd,
      #fff
    );
  background-size:300%;
  -webkit-background-clip:text;
  color:transparent;
  animation:
    pmTextoBrillo 3s infinite;
}


.pm-generando p{
  position:relative;
  z-index:2;
  margin-top:15px;
  font-size:16px;
  font-weight:800;
  color:white;
}


@keyframes pmBrillo{
  from{
    transform:translate(-40%,-40%) rotate(0deg);
  }
  to{
    transform:translate(40%,40%) rotate(360deg);
  }
}


@keyframes pmTextoBrillo{
  0%{
    background-position:0%;
  }
  100%{
    background-position:300%;
  }
}


@keyframes pmGiro{
  to{
    transform:rotate(360deg);
  }
}


.pm-generando{
  position:relative;
  overflow:hidden;
  padding:35px;
  border-radius:24px;
  text-align:center;
  background:
    linear-gradient(
      135deg,
      rgba(124,58,237,.25),
      rgba(236,72,153,.25),
      rgba(59,130,246,.25)
    );
  border:1px solid rgba(255,255,255,.2);
  box-shadow:
    0 0 35px rgba(168,85,247,.35);
}


.pm-generando h3{
  margin-top:18px;
  font-size:24px;
  font-weight:1000;
  background:linear-gradient(
    90deg,
    #fff,
    #f0abfc,
    #93c5fd,
    #fff
  );
  background-size:300%;
  -webkit-background-clip:text;
  color:transparent;
  animation:pmTituloBrillo 3s infinite;
}


.pm-loader-circle{
  width:65px;
  height:65px;
  margin:auto;
  border-radius:50%;
  border:6px solid rgba(255,255,255,.15);
  border-top-color:#ec4899;
  animation:pmRotar 1s linear infinite;
}


.pm-loading-bar{
  height:8px;
  margin:20px auto;
  max-width:320px;
  border-radius:20px;
  background:rgba(255,255,255,.12);
  overflow:hidden;
}


.pm-loading-bar span{
  display:block;
  height:100%;
  width:40%;
  background:linear-gradient(
    90deg,
    #8b5cf6,
    #ec4899,
    #38bdf8
  );
  animation:pmBarra 1.5s infinite;
}


.pm-generando p{
  font-size:17px;
  font-weight:900;
  color:white;
}


.pm-generando small{
  color:rgba(255,255,255,.65);
}


@keyframes pmRotar{
  to{
    transform:rotate(360deg);
  }
}


@keyframes pmBarra{
  from{
    transform:translateX(-120%);
  }
  to{
    transform:translateX(300%);
  }
}


@keyframes pmTituloBrillo{
  from{
    background-position:0%;
  }
  to{
    background-position:300%;
  }
}


.pm-generando::before{
  animation:none;
  background:none;
}

.pm-generando{
  animation:none;
}

.pm-loader-circle{
  width:60px;
  height:60px;
  margin:auto;
  border-radius:50%;
  border:5px solid rgba(255,255,255,.15);
  border-top-color:#ec4899;
  box-shadow:
    0 0 20px rgba(236,72,153,.65);
  animation:pmRotar 1s linear infinite;
}


.pm-generando{
  position:relative;
}

.pm-generando::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:24px;
  padding:1px;
  background:
    linear-gradient(
      90deg,
      transparent,
      #ec4899,
      #8b5cf6,
      transparent
    );
  background-size:300%;
  animation:pmBordeLuz 3s linear infinite;
  pointer-events:none;
  opacity:.8;
}


@keyframes pmBordeLuz{
  from{
    background-position:0%;
  }
  to{
    background-position:300%;
  }
}


.pm-generando-drive{
  color:#f9a8d4;
  font-weight:900;
  animation:pmPulseDrive 1.2s infinite;
}


@keyframes pmPulseDrive{
  0%{
    opacity:.5;
  }
  50%{
    opacity:1;
  }
  100%{
    opacity:.5;
  }
}

.pm-drive-row-btn:disabled{
  opacity:.6;
  cursor:wait;
}


.pm-collage-preview{
 width:100%;
 height:100%;
 object-fit:cover;
 border-radius:18px;
 cursor:pointer;
}


.pm-imgbox:has(.pm-collage-preview){
 padding:0;
 overflow:hidden;
}


#pmImagenModal{
 display:none;
 position:fixed;
 inset:0;
 z-index:99999;
}


.pm-modal-imagen{
 width:100%;
 height:100%;
 background:rgba(0,0,0,.88);
 display:flex;
 align-items:center;
 justify-content:center;
 padding:30px;
}


#pmImagenGrande{
 max-width:90%;
 max-height:90%;
 border-radius:25px;
 box-shadow:
 0 0 50px rgba(236,72,153,.6);
 cursor:pointer;
}



/* COLLAGE GENERADO DESDE DRIVE - VISTA COMPLETA */

.pm-imgbox:has(.pm-collage-preview){
  padding:0!important;
  overflow:hidden!important;
  display:block!important;
  position:relative!important;
}


.pm-imgbox:has(.pm-collage-preview) .pm-collage-preview{
  width:100%!important;
  height:100%!important;
  min-height:100%!important;
  object-fit:cover!important;
  display:block!important;
  border-radius:18px!important;
}


.pm-imgbox:has(.pm-collage-preview) small{
  display:none!important;
}



#pmImagenModal{
  display:none;
  position:fixed;
  inset:0;
  z-index:99999;
}


.pm-preview-overlay{
  width:100%;
  height:100%;
  background:rgba(0,0,0,.88);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:30px;
  cursor:pointer;
}


#pmImagenGrande{
  max-width:90%;
  max-height:90%;
  border-radius:24px;
  object-fit:contain;

  box-shadow:
  0 0 50px rgba(236,72,153,.55);

  animation:
  pmPreviewEntrada .25s ease;
}


@keyframes pmPreviewEntrada{

  from{
    transform:scale(.8);
    opacity:0;
  }

  to{
    transform:scale(1);
    opacity:1;
  }

}


/* FOTO PLANIFICACIÓN - mostrar miniatura completa */
.pm-imgbox{
  overflow:hidden !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.pm-imgbox img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  display:block !important;
}


/* =========================================================
   FIX FINAL - COLLAGE DRIVE COMPLETO SIN RECORTE
========================================================= */

.pm-imgbox:has(.pm-collage-preview){
  padding:0 !important;
  overflow:hidden !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#080814 !important;
}

.pm-imgbox:has(.pm-collage-preview) .pm-collage-preview{
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  object-fit:contain !important;
  object-position:center center !important;
  margin:0 !important;
  border-radius:18px !important;
  display:block !important;
}


/* MINIATURA FINAL: cuadro completo solo para la imagen */
.pm-imgbox:has(img){
  width:135px !important;
  height:135px !important;
  padding:0 !important;
  overflow:hidden !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.pm-imgbox:has(img) img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  object-position:center !important;
  margin:0 !important;
  border-radius:18px !important;
}

.pm-imgbox:has(img) small{
  display:none !important;
}


/* =========================================================
   FOTO CAPÍTULO - LOADER PREMIUM
========================================================= */

.foto-capitulo-loading-premium{
  max-width:580px;
  margin:35px auto;
  padding:38px 34px;
  border-radius:24px;
  background:
    linear-gradient(
      145deg,
      rgba(20,20,38,.96),
      rgba(12,12,24,.98)
    );
  border:1px solid rgba(168,85,247,.28);
  box-shadow:
    0 22px 70px rgba(0,0,0,.38),
    0 0 35px rgba(139,92,246,.08);
  text-align:center;
}

.fc-loading-icon{
  font-size:42px;
  margin-bottom:14px;
}

.fc-loading-title{
  font-size:20px;
  font-weight:900;
  letter-spacing:.7px;
  color:#f8fafc;
}

.fc-loading-subtitle{
  margin-top:7px;
  color:#a1a1aa;
  font-size:14px;
}

.fc-loading-steps{
  width:100%;
  max-width:360px;
  margin:28px auto 24px;
  text-align:left;
}

.fc-loading-step{
  display:flex;
  align-items:center;
  gap:12px;
  padding:9px 4px;
  color:#71717a;
  font-size:14px;
  font-weight:700;
}

.fc-loading-step.active{
  color:#e9d5ff;
}

.fc-loading-step.active span{
  color:#a855f7;
  text-shadow:0 0 10px rgba(168,85,247,.7);
}

.fc-loading-spinner{
  width:34px;
  height:34px;
  margin:6px auto 0;
  border:3px solid rgba(168,85,247,.15);
  border-top-color:#a855f7;
  border-radius:50%;
  animation:fcLoadingSpin .75s linear infinite;
}

@keyframes fcLoadingSpin{
  to{
    transform:rotate(360deg);
  }
}

