/* =============================================== */
/* ESTILOS GENERALES Y DE ALINEACIÓN DEL PORTAL    */
/* =============================================== */

body.portal-body {
  background-color: #f0f2f5;
  overflow-x: hidden; /* SOLUCIÓN: Previene el scroll horizontal no deseado */
}

body.login-page-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

body.no-scroll {
  overflow: hidden;
}

.portal-main {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
  box-sizing: border-box;
}

.portal-page-header {
  background-color: #ffffff;
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.portal-page-header img {
  height: 40px;
  width: auto;
}

/* =============================================== */
/* ESTILOS LOGIN                                   */
/* =============================================== */

.login-container {
  background-color: #ffffff;
  padding: 2.5rem 3rem;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  text-align: center;
  width: 100%;
  max-width: 400px;
  margin: 1rem;
}

.login-logo {
  width: 80px;
  margin-bottom: 1rem;
}

.login-container h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.login-container p {
  color: #666;
  margin-bottom: 2rem;
}

#login-form input {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

#login-form button[type="submit"] {
  width: 100%;
  padding: 12px 15px;
  background-color: #8e44ad;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

#login-form button[type="submit"]:hover {
  background-color: #602b69;
}

/* =============================================== */
/* ESTILOS NUEVOS PORTAL MODERNO                   */
/* =============================================== */

:root {
  --portal-dark: #161616;
  --portal-ink: #222;
  --portal-cream: #f7f4ef;
  --portal-sand: #efe7dc;
  --portal-coral: #ff8c5a;
  --portal-caramel: #c97a35;
  --portal-teal: #2e9fa3;
  --portal-shadow: 0 24px 50px rgba(16, 16, 16, 0.18);
}

.portal-background {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 140, 90, 0.2), transparent 45%),
    radial-gradient(circle at 25% 80%, rgba(46, 159, 163, 0.15), transparent 40%),
    linear-gradient(135deg, #f8f3ed 0%, #f2e8da 40%, #f9f6f1 100%);
  z-index: -1;
}

.login-panel {
  width: min(460px, 92vw);
  text-align: left;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--portal-shadow);
}

.login-panel h2 {
  font-size: 2rem;
  color: var(--portal-ink);
  margin-bottom: 0.4rem;
}

.login-panel p {
  color: #5a5a5a;
  margin-bottom: 2rem;
}

.portal-form {
  display: grid;
  gap: 1.2rem;
}

.input-group {
  display: grid;
  gap: 0.4rem;
}

.input-group label {
  font-size: 0.95rem;
  color: #444;
  font-weight: 600;
}

.input-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 1rem;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action input {
  padding-right: 44px;
}

.toggle-visibility {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: none;
  background: #ffffff;
  border: 1px solid #e6e1da;
  border-radius: 999px;
  color: #555;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 600;
  background: linear-gradient(120deg, var(--portal-coral), #ffb38a);
  color: #1b1b1b;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(255, 140, 90, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #d7c8ba;
  background: #fffaf4;
  color: #333;
  text-decoration: none;
  font-weight: 600;
}

.btn-secondary.muted {
  opacity: 0.6;
}

.form-footer {
  text-align: center;
  font-size: 0.95rem;
}

.form-footer a {
  color: var(--portal-caramel);
  text-decoration: none;
}

.form-message {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.form-message.success {
  background: #eaf7f2;
  color: #1f6b5f;
  border: 1px solid #cfe8df;
}

.form-message.error {
  background: #fff0f0;
  color: #a8443a;
  border: 1px solid #f4cccc;
}

.portal-header-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portal-header-panel .header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
}

.portal-header-panel .welcome-name {
  color: #444;
}

.portal-dashboard {
  padding: 3rem 2rem 4rem;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
}

.dashboard-hero.alt {
  grid-template-columns: 1fr 1fr;
}

.dashboard-hero h1 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  color: var(--portal-ink);
  margin: 0 0 0.8rem;
}

.dashboard-hero .lead {
  font-size: 1.1rem;
  color: #4c4c4c;
  line-height: 1.7;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--portal-caramel);
  margin-bottom: 0.8rem;
}

.hero-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.8rem;
  box-shadow: var(--portal-shadow);
  border: 1px solid #f2e6db;
}

.hero-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.hero-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(46, 159, 163, 0.15);
  color: var(--portal-teal);
  font-weight: 600;
  font-size: 0.85rem;
}

.dashboard-grid,
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
}

.admin-section {
  margin-top: 2.5rem;
}

.admin-section h2 {
  margin-bottom: 1rem;
  color: var(--portal-ink);
}

.section-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -3px;
  background-size: contain;
  background-repeat: no-repeat;
}

.icon-propuestas {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236c4aa4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 7h18'/><path d='M3 12h18'/><path d='M3 17h18'/></svg>");
}

.icon-descargas {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232e9fa3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3v12'/><path d='M7 10l5 5 5-5'/><path d='M5 21h14'/></svg>");
}

.icon-pagos {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23c97a35' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='14' rx='2'/><path d='M3 10h18'/></svg>");
}

.section-propuestas h2 {
  color: #6c4aa4;
}

.section-descargas h2 {
  color: #2e9fa3;
}

.section-pagos h2 {
  color: #c97a35;
}

.btn-propuestas {
  background: linear-gradient(120deg, #6c4aa4, #9b7ad1);
}

.btn-descargas {
  background: linear-gradient(120deg, #2e9fa3, #7fd0d2);
}

.btn-pagos {
  background: linear-gradient(120deg, #c97a35, #f2b16a);
}

.btn-propuestas,
.btn-descargas,
.btn-pagos {
  color: #fff;
}

.status-propuestas {
  background: rgba(108, 74, 164, 0.15);
  color: #6c4aa4;
}

.status-descargas {
  background: rgba(46, 159, 163, 0.15);
  color: #2e9fa3;
}

.status-pagos {
  background: rgba(201, 122, 53, 0.15);
  color: #c97a35;
}

.admin-form-grid {
  display: grid;
  gap: 1rem;
  background: #fff;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid #f1e4d7;
  box-shadow: 0 14px 32px rgba(26, 26, 26, 0.08);
}

.admin-form-grid label,
.admin-fields label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  color: #444;
}

.admin-form-grid input,
.admin-fields input,
.admin-form-grid select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.admin-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-checks label {
  font-weight: 600;
  color: #555;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-client-list {
  display: grid;
  gap: 1.6rem;
}

.admin-client-card {
  background: #fff;
  padding: 1.6rem;
  border-radius: 16px;
  border: 1px solid #f1e4d7;
  box-shadow: 0 14px 32px rgba(26, 26, 26, 0.08);
  display: grid;
  gap: 1rem;
}

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

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.admin-client-form {
  display: grid;
  gap: 1rem;
}

.admin-delete-form {
  display: flex;
  justify-content: flex-end;
}

.admin-downloads {
  display: grid;
  gap: 1rem;
}

.admin-download-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #f1e4d7;
  padding: 1rem 1.2rem;
  box-shadow: 0 12px 26px rgba(26, 26, 26, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-download-card p {
  margin: 0.2rem 0 0;
  color: #666;
  font-size: 0.9rem;
}

.admin-payment-list {
  display: grid;
  gap: 1.5rem;
}

.admin-payment-card {
  background: linear-gradient(180deg, #f7f5f2, #f1ede8);
  border-radius: 16px;
  border: 1px solid #e8ddd1;
  padding: 1.4rem;
  box-shadow: 0 14px 32px rgba(26, 26, 26, 0.08);
  display: grid;
  gap: 1.1rem;
}

.admin-inline {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.payments-grid {
  display: grid;
  gap: 1.6rem;
}

.payment-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #f1e4d7;
  padding: 1.6rem;
  box-shadow: 0 16px 36px rgba(26, 26, 26, 0.08);
  display: grid;
  gap: 1rem;
}

.payment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.payment-header p {
  margin: 0.4rem 0 0;
  color: #666;
}

.payment-actions {
  display: flex;
  gap: 0.8rem;
}

.payment-list {
  display: grid;
  gap: 0.8rem;
}

.payment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: #faf7f3;
  border-radius: 12px;
}

.payment-item p {
  margin: 0.4rem 0 0;
  color: #666;
}

.chat-thread {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.chat-message {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: #f7f2eb;
  display: grid;
  gap: 0.3rem;
}

.chat-message.from-admin {
  background: #f1f6f8;
  border-left: 3px solid var(--portal-teal);
}

.chat-message.from-client {
  background: #fff8f1;
  border-left: 3px solid var(--portal-coral);
}

.chat-message span {
  font-size: 0.8rem;
  color: #777;
}

.admin-placeholder {
  background: #fff;
  padding: 1.4rem;
  border-radius: 16px;
  border: 1px solid #f1e4d7;
  box-shadow: 0 14px 32px rgba(26, 26, 26, 0.08);
  display: grid;
  gap: 0.8rem;
}

.admin-section h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.dashboard-card,
.placeholder-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.6rem;
  border: 1px solid #f1e4d7;
  box-shadow: 0 14px 32px rgba(26, 26, 26, 0.08);
  display: grid;
  gap: 1rem;
}

.dashboard-card.is-disabled {
  opacity: 0.7;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active {
  background: rgba(255, 140, 90, 0.2);
  color: #b1562a;
}

.status-inactive {
  background: #f2f2f2;
  color: #777;
}

.status-live {
  background: rgba(44, 170, 92, 0.16);
  color: #17733a;
}

.status-warning {
  background: rgba(220, 128, 52, 0.18);
  color: #b85b19;
}

.status-partial {
  background: rgba(54, 123, 227, 0.16);
  color: #245db0;
}

.downloads-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0;
}

.filter-btn {
  border: 1px solid #e2d5c6;
  background: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: #444;
}

.filter-btn.is-active {
  background: var(--portal-coral);
  border-color: var(--portal-coral);
  color: #1b1b1b;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
}

.download-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(26, 26, 26, 0.08);
  border: 1px solid #f1e4d7;
  display: grid;
}

.download-preview {
  background: #f7f1ea;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 1rem;
}

.download-preview img,
.download-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.download-icon {
  font-weight: 700;
  letter-spacing: 1px;
  color: #b1562a;
  border: 2px dashed rgba(177, 86, 42, 0.35);
  padding: 20px 24px;
  border-radius: 16px;
}

.download-meta {
  padding: 1.2rem 1.4rem 1.4rem;
  display: grid;
  gap: 0.8rem;
}

.download-meta h3 {
  margin: 0;
  color: var(--portal-ink);
}

.download-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

input[type="file"] {
  width: 100%;
  max-width: 100%;
  font-size: 0.94rem;
  line-height: 1.35;
  overflow: hidden;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: none;
  border-radius: 10px;
  background: #ead7c3;
  color: #4f3826;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.status-badge {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-heading-row h2,
.section-heading-row p {
  margin: 0;
}

.admin-hero-actions .admin-actions {
  margin-top: 1rem;
}

.admin-clients-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.admin-client-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,246,240,0.98));
  border-radius: 22px;
  border: 1px solid #efe1d2;
  box-shadow: 0 18px 38px rgba(26, 26, 26, 0.08);
  padding: 1.35rem;
  display: grid;
  grid-template-rows: auto minmax(4.8rem, auto) 1fr auto auto;
  gap: 1.1rem;
  align-content: start;
  min-height: 300px;
}

.admin-client-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-client-summary h3 {
  margin: 0.1rem 0 0.35rem;
  font-size: 1.24rem;
  line-height: 1.18;
  min-height: 4.25rem;
}

.admin-client-summary p {
  margin: 0;
  color: #6b665f;
  overflow-wrap: anywhere;
}

.client-card-email {
  font-size: 1rem;
  color: #5f5a54;
  line-height: 1.55;
  overflow-wrap: anywhere;
  min-height: 3.8rem;
  display: block;
}

.client-id-label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--portal-caramel);
  font-weight: 700;
}

.module-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.client-modules-icons {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  align-self: end;
}

.module-icon-pill {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e8ddd2;
  background: #f5f1eb;
}

.module-icon-pill.is-off {
  opacity: 0.38;
  filter: grayscale(1);
}

.module-icon-pill.is-on.propuestas {
  background: rgba(108, 74, 164, 0.13);
  border-color: rgba(108, 74, 164, 0.22);
  color: #6c4aa4;
}

.module-icon-pill.is-on.descargas {
  background: rgba(46, 159, 163, 0.13);
  border-color: rgba(46, 159, 163, 0.22);
  color: #2e9fa3;
}

.module-icon-pill.is-on.pagos {
  background: rgba(201, 122, 53, 0.13);
  border-color: rgba(201, 122, 53, 0.22);
  color: #c97a35;
}

.module-icon {
  font-size: 1.06rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.admin-client-details {
  border-top: 1px solid #eadfd3;
  padding-top: 1rem;
  display: grid;
  gap: 1rem;
}

.admin-fields.compact {
  grid-template-columns: 1fr;
}

.admin-delete-form {
  display: flex;
  justify-content: flex-end;
}

.admin-delete-form .btn-secondary {
  width: 100%;
}

.inline-delete {
  flex: 0 0 auto;
}

.inline-delete .btn-secondary {
  width: auto;
}

.admin-client-panel .admin-actions {
  margin-top: auto;
  align-self: end;
}

.payment-editor {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid #e4d8ca;
  border-radius: 16px;
  overflow: hidden;
}

.payment-editor summary {
  list-style: none;
  cursor: pointer;
  padding: 0.95rem 1rem;
  font-weight: 800;
  color: #8b5a2b;
  background: rgba(233, 222, 210, 0.46);
}

.payment-editor summary::-webkit-details-marker {
  display: none;
}

.payment-editor[open] summary {
  border-bottom: 1px solid #eadccf;
}

.payment-register-form {
  padding: 1rem;
  gap: 1.1rem;
}

.payment-register-form label {
  align-content: start;
}

.payment-form-submit {
  display: flex;
  align-items: flex-end;
  padding-top: 0.35rem;
}

.payment-form-submit .btn-primary {
  width: 100%;
}

.payments-registered-block {
  display: grid;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e6dad0;
  border-radius: 16px;
  padding: 1rem;
}

.payments-registered-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.payments-registered-header p {
  margin: 0;
}

.payment-record-card {
  display: grid;
  gap: 0.8rem;
  background: #fff;
  border: 1px solid #eadfd3;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  box-shadow: 0 10px 24px rgba(26, 26, 26, 0.05);
}

.payment-record-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.payment-record-top strong {
  display: block;
  font-size: 0.97rem;
}

.payment-record-top p {
  margin: 0.28rem 0 0;
  font-size: 1.03rem;
  font-weight: 800;
  color: #2f2a24;
}

.payment-record-note {
  margin: 0;
  color: #68615a;
  line-height: 1.45;
}

.payment-editor-small summary {
  padding: 0.8rem 0.95rem;
  font-size: 0.95rem;
  background: #f7f1e9;
}

.admin-modal-shell {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 60;
}

.admin-modal-shell.is-visible {
  display: grid;
  place-items: center;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 15, 12, 0.42);
  backdrop-filter: blur(4px);
}

.admin-modal-card {
  position: relative;
  width: min(720px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fffdfa;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
  border: 1px solid #efdfcf;
  padding: 1.6rem;
}

.admin-modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #e7d8c9;
  background: #fff;
  color: #53473d;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.admin-create-form {
  margin-top: 1rem;
}

.admin-success-state {
  display: grid;
  gap: 1rem;
  text-align: center;
  padding: 2.4rem 1.2rem;
}

.admin-success-state h2,
.admin-success-state p {
  margin: 0;
}

.success-mark {
  width: 88px;
  height: 88px;
  margin: 0 auto;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 800;
  color: #166c42;
  background: linear-gradient(180deg, #ddf8e9, #c9f0dc);
  border: 1px solid #9bd5b6;
  box-shadow: 0 12px 28px rgba(22, 108, 66, 0.18);
}

.admin-actions.center {
  justify-content: center;
}

.client-workspace {
  max-width: 1380px;
}

.client-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
}

.sidebar-card {
  margin-top: 0;
}

.sticky {
  position: sticky;
  top: 1.2rem;
}

.client-sidebar-form {
  padding: 1.2rem;
}

.admin-checks.vertical {
  display: grid;
  gap: 0.75rem;
}

.client-content {
  display: grid;
  gap: 1rem;
}

.module-accordion {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #efdfcf;
  box-shadow: 0 16px 38px rgba(26, 26, 26, 0.08);
  overflow: hidden;
}

.module-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1.08rem;
  font-weight: 800;
}

.module-accordion summary::-webkit-details-marker {
  display: none;
}

.module-accordion summary span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.module-accordion-body {
  border-top: 1px solid #f1e5da;
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}

.module-form {
  padding: 1.2rem;
}

.module-top-actions {
  margin-bottom: 0.2rem;
}

.admin-stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.admin-stack-grid.dense {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-placeholder.compact,
.payment-summary-row {
  font-size: 0.98rem;
}

.admin-placeholder p,
.admin-payment-card p,
.payment-card p,
.payment-item p {
  overflow-wrap: anywhere;
}

.payment-card {
  gap: 1.2rem;
}

.payment-header {
  align-items: stretch;
}

.payment-header h3 {
  margin: 0;
  font-size: 1.35rem;
}

.payment-header p {
  font-size: 1rem;
  line-height: 1.55;
}

.payment-actions {
  flex-wrap: wrap;
}

.payment-list {
  gap: 1rem;
}

.payment-item {
  align-items: flex-start;
  padding: 1rem 1.05rem;
}

.payment-item strong,
.payment-item span {
  font-size: 1rem;
}

.payment-item > div {
  display: grid;
  gap: 0.35rem;
}

@media (max-width: 1220px) {
  .admin-clients-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .client-layout {
    grid-template-columns: 1fr;
  }

  .sticky {
    position: static;
  }
}

@media (max-width: 720px) {
  .portal-main {
    padding: 2rem 1rem 3rem;
  }

  .portal-header-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-header-panel .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .section-heading-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-clients-grid,
  .admin-stack-grid,
  .admin-stack-grid.dense {
    grid-template-columns: 1fr;
  }

  .admin-download-card,
  .admin-client-summary,
  .payment-header,
  .payment-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .download-actions,
  .admin-actions,
  .payment-actions {
    width: 100%;
  }

  .download-actions > *,
  .admin-actions > *,
  .payment-actions > * {
    flex: 1 1 auto;
  }

  .status-badge {
    font-size: 0.94rem;
  }

  .admin-modal-card {
    padding: 1.2rem;
  }
}

@media (max-width: 900px) {
  .dashboard-hero,
  .dashboard-hero.alt {
    grid-template-columns: 1fr;
  }
}

/* =============================================== */
/* ESTILOS PÁGINA DE PROPUESTAS                    */
/* =============================================== */

.portal-header {
  text-align: center;
  margin-bottom: 3rem;
}

.introduccion-propuesta {
  max-width: 800px;
  margin: 0 auto 3rem auto;
  text-align: center;
  padding: 0 1rem;
}

.introduccion-propuesta p {
  color: #333;
  font-size: 1.1rem;
  line-height: 1.7;
}

.introduccion-propuesta .descripcion-general {
  font-style: italic;
  color: #555;
  margin-top: 1.5rem;
}

.propuestas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.propuesta-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.propuesta-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.propuesta-card img {
  width: 100%;
  display: block;
  transition: filter 0.5s ease;
  filter: blur(5px) saturate(0.5);
}

.propuesta-card:hover img {
  filter: blur(0) saturate(1);
}

.propuesta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.4s ease;
}

.propuesta-card:hover .propuesta-overlay {
  background: rgba(0, 0, 0, 0.1);
}

.propuesta-overlay h4 {
  color: white;
  font-size: 1.8rem;
  font-weight: 600;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  text-align: center;
  padding: 1rem;
}

/* =============================================== */
/* SECCIÓN DE FEEDBACK Y BOTÓN FIJO                */
/* =============================================== */

.feedback-section {
  display: none;
  background-color: #fafafa;
  padding: 3rem;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  max-width: 1100px;
  margin: 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.feedback-intro {
  text-align: left;
}

.feedback-intro p {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}

.feedback-form-container {
  text-align: left;
}

.feedback-form-container .titulo-frase {
  font-size: 1.8rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.opciones-feedback {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.opciones-feedback label {
  font-size: 1rem;
}

.opciones-feedback input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease-in-out;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.opciones-feedback input[type="radio"]:checked {
  border-color: #8e44ad;
  background-color: #f0e9f5;
}

.opciones-feedback input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: #8e44ad;
  border-radius: 50%;
}

#feedback-form textarea {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  font-size: 1rem;
  box-sizing: border-box;
  margin-bottom: 1.5rem;
  transition: min-height 0.4s ease, border-color 0.3s, box-shadow 0.3s;
}

#feedback-form textarea.comentarios-ampliados {
  min-height: 200px;
  border-color: #8e44ad;
  box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.15);
}

#feedback-form textarea:focus {
  outline: none;
  border-color: #8e44ad;
  box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.2);
}

#feedback-form button.btn-frase {
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
  background-color: #27ae60;
}

#feedback-form button.btn-frase:hover {
  background-color: #229954;
}

#contenedor-btn-feedback {
  position: sticky;
  bottom: 0;
  padding: 1.5rem 0;
  text-align: center;
  background: linear-gradient(to top, rgba(240, 242, 245, 1) 70%, rgba(240, 242, 245, 0));
  z-index: 100;
}

#btn-mostrar-feedback {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

#btn-mostrar-feedback:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* =============================================== */
/* ESTILOS MODAL DE PROPUESTAS Y ZOOM              */
/* =============================================== */

#modal-propuesta {
  position: fixed;
  z-index: 2000;
  inset: 0;
  background-color: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#modal-propuesta.modal-visible {
  opacity: 1;
  visibility: visible;
}

.modal-contenido-propuesta {
  background-color: #ffffff;
  width: 100%;
  max-width: 900px;
  height: 90vh;
  border-radius: 20px;
  padding: 2rem 3rem;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
  animation: zoomIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#modal-titulo-propuesta {
  text-align: center;
  margin-bottom: 0.5rem;
}

.modal-elemento-item {
  margin-bottom: 3rem;
  text-align: center;
}

.modal-elemento-item p {
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto 1.5rem auto;
}

.modal-elemento-item img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.modal-elemento-item img:hover {
  transform: scale(1.02);
}

#zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  padding: 2rem;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#zoom-overlay.zoom-overlay-visible {
  opacity: 1;
  visibility: visible;
}

.zoom-overlay-oculto {
  display: none;
}

#zoom-imagen {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.cerrar-zoom {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

/* =============================================== */
/* ESTILOS PANTALLA DE BIENVENIDA                  */
/* =============================================== */

#welcome-overlay {
  position: fixed;
  inset: 0;
  background: #121212;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

#welcome-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-content {
  color: #ffffff;
  text-align: center;
  padding: 2rem;
  animation: fadeInText 1s ease-out 0.2s forwards;
  opacity: 0;
}

.welcome-content h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: #a0a0a0;
  margin-bottom: 0.5rem;
}

.welcome-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.welcome-content p {
  font-size: 1.2rem;
  color: #d0d0d0;
  max-width: 500px;
  margin: 0 auto 3rem auto;
}

.modern-button {
  background: linear-gradient(90deg, #8e44ad, #9b59b6);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 5px 20px rgba(142, 68, 173, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modern-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(142, 68, 173, 0.6);
}

.modern-button i {
  transition: transform 0.3s ease;
}

.modern-button:hover i {
  transform: translateX(5px);
}

@keyframes fadeInText {
  to {
    opacity: 1;
  }
}

/* =============================================== */
/* ESTILOS RESPONSIVOS                             */
/* =============================================== */

@media (max-width: 900px) {
  .feedback-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem;
  }
  .feedback-intro,
  .feedback-form-container {
    text-align: center;
  }
  .opciones-feedback {
    align-items: center;
  }
  .feedback-form-container .titulo-frase {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .portal-main {
    padding: 2rem 1rem;
  }
  .propuestas-grid {
    grid-template-columns: 1fr;
  }
  .modal-contenido-propuesta {
    padding: 1.5rem;
    height: 95vh;
  }

  /* =================================== */
  /* AJUSTES DE TIPOGRAFÍA PARA MÓVIL    */
  /* =================================== */
  .welcome-content h1 {
    font-size: 2.2rem; /* Reducido de 3rem */
  }
  .welcome-content h2 {
    font-size: 1.2rem; /* Reducido de 1.5rem */
  }
  .welcome-content p {
    font-size: 1rem; /* Reducido de 1.2rem */
  }
  .modern-button {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }
  /* Usamos !important para sobreescribir el estilo en línea del HTML */
  .portal-header .titulo-frase {
      font-size: 1.8rem !important; 
  }
  .propuesta-overlay h4 {
      font-size: 1.5rem;
  }
  #modal-titulo-propuesta {
      font-size: 1.6rem;
  }
   .modal-elemento-item p {
      font-size: 0.95rem;
  }
}

/* --- Ajuste para video responsivo en el modal --- */
.modal-elemento-item video {
    width: 100%;
    height: auto;
    display: block; /* Elimina espacios extra debajo del video */
}
