:root {
    --color-primary: #EC008C;
    --color-secondary: #FF6D00;
    --color-text: #525251;
    --color-heading: #666666;
    --color-bg: #f7f9fb;
    --color-container: white;
    --sidebar-bg: #f0f0f0;
    --sidebar-text: #ffffff;
    --sidebar-hover: var(--color-secondary);
    --table-header-bg: #e9e9e9;
    --table-header-text: var(--color-text);
    --table-row-border: #ddd;
}

/* GENERAL */
body {
    font-family: 'Montserrat', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    font-size: 16px;
    min-height: 100vh;
}

body.login {
    background: var(--color-bg) url('https://tarifas.bivid.store/images/trazo.png') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.dashboard {
    display: flex;
    justify-content: flex-start;
}

/* LOGIN */
.login-container {
    background: var(--color-container);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 90%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease-out forwards;
}

.container { max-width: 1024px; margin: auto; padding: 10px }

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }


#pdf-container {
	display: block;	
	overflow: scroll;
}

#but_zoomin, #but_zoomout {
	background: unset;	
}

.login-container img.logo {
    max-width: 160px;
    margin-bottom: 1.5rem;
}

.login-container h2 {
    color: var(--color-heading);
    /*margin-bottom: 0.5rem;*/
    font-weight: 800;
    font-size: clamp(1.6rem, 5vw, 2rem);
}

.login-container p.tagline {
    color: var(--color-text);
    margin-bottom: 2rem;
    font-size: clamp(0.9rem, 4vw, 1rem);
    font-weight: 400;
}

.login-container input {
    width: 90%;
    padding: 14px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    transition: border 0.3s;
    font-size: 1rem;
}

.login-container input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.login-container button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 700;
}

.login-container button:hover:not(:disabled) {
    filter: brightness(1.1);
}

.login-container button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-container .register {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--color-text);
}

.login-container .register a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
}

.login-container .register a:hover {
    text-decoration: underline;
}

.toast {
    position: relative;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
    z-index: 1000;
    font-weight: 600;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
}

.menu-explanation {
        background: #fff;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        text-align: left;
    }
.menu-explanation h4 {
    margin-top: 10px;
    color: #ff5a5f;
}
.menu-explanation p {
    margin: 5px 0 15px;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    position: fixed;
    top: 0;
    bottom: 0;
    padding-top: 20px;
    color: var(--sidebar-text);
}

.logo-container {
    text-align: center;
}

.logo {
    width: 100px;
    margin: 0 auto;
}

.linea-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
}

.nav a {
    color: var(--sidebar-text);
    text-decoration: none;
    margin: 10px 0;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
	color: #fff;
    font-weight: 500;
    padding: 8px 12px;
    transition: background 0.3s, color 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 4px;
	display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    padding: 6px;
    
    flex: 1 0 60px;
}

.nav a:hover {
    background: var(--sidebar-hover);
    color: white;
	text-decoration: none;
    opacity: 0.85;
}

.nav {
            
    flex-direction: row;
    gap: 5px;
    flex: 1;
	display: flex;
    padding: 0 20px;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    max-width: 70%;
	left: 17%;
	position: sticky;
	padding: 8px 0;
}

.nav a span {
    display: inline;
	font-size: 13px;
    text-align: center;
}

.nav a i {
    font-size: 18px;
    margin-bottom: 4px;
        }

.logout {
    margin-top: auto;
    color: #ffdddd;
}

/* MAIN DASHBOARD */
.main {
    margin-left: 220px;
    padding: 20px;
}

.main-header {
	background: linear-gradient(90deg,var(--color-primary) 0%, var(--color-secondary) 50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #ccc;
    /*margin-bottom: 20px;*/
	justify-content: space-between;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    
    flex-wrap: wrap;
	background
}

.top-header {
	background: linear-gradient(90deg,var(--color-primary) 0%, var(--color-secondary) 50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    
    flex-wrap: wrap;
}


.main-header h1,
.main h1 {
    color: var(--color-heading);
    font-weight: 800;
}

.main select, input, button, textarea {
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.3s;
    vertical-align: top;
}

.main select:focus {
    border-color: var(--color-primary);
}

/* TABLA */
main table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

main table thead {
    background: var(--table-header-bg);
    color: var(--table-header-text);
}

main table th,
main table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--table-row-border);
}

main table tr:hover {
    background: rgba(236, 0, 140, 0.05);
}

/* DASHBOARD METRICS */
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 1.5rem;
    align-items: stretch; /* 🔹 hace que todas tengan la misma altura */
}

.metric-card {
    background: #fff;
    border-radius: 10px;
    padding: 0.8rem 0.6rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center; /* centra el contenido verticalmente */
}


.metric-card:hover {
    transform: translateY(-5px);
}

.metric-card h3 {
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: #6e6e73;
}


.metric-card p {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #1d1d1f;
}

/* NUEVO: content split, carousel, slogans */
.content-split {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
    align-items: center;
    justify-content: center;
}

.carousel {
        width: 100%;
        aspect-ratio: 1 / 1;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
		flex: 1;
		position: relative;
		max-width: 500px;
		height: 500px;
		overflow: hidden;
		border-radius: 16px;
		box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

.carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    border-radius: 16px;
}

.carousel img.active {
	display: block;
    opacity: 1;
}

.slogans {
    flex: 1;
    max-width: 500px;
}

.slogans p {
    background: var(--color-container);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.section {
        padding: 20px;
        text-align: center;
    }

@media (max-width: 992px) {
    .content-split {
        flex-direction: column;
    }
}

/* FORM GRID */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.form-grid input, .form-grid select, .form-grid textarea, .form-grid button {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

/* BOTONES */
.btn {
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-success {
    background: var(--color-primary);
    color: white;
}

.btn-success:hover {
    filter: brightness(1.1);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    filter: brightness(1.1);
}

.btn-primary {
    background: var(--color-secondary);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

/* MOSAICO RECURSOS */
.mosaico {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.recurso-card {
    position: relative;
    height: 400px;
    overflow: hidden;
    transition: transform 0.3s;
}

.recurso-card:hover {
    transform: scale(1.05);
}

.recurso-card img,
.recurso-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recurso-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s;
}

.recurso-card:hover .recurso-overlay {
    opacity: 1;
}

.btn-icon {
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-icon:hover {
    filter: brightness(1.1);
}

.btn-icon i {
    pointer-events: none;
}

.recurso-title {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}
/* Tarjetas de ofertas tipo tienda online */
/* Estilos generales */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    /*padding: 20px;*/
}

.container_email {
    max-width: 1200px;
    margin: 0 auto;
    /*padding: 20px;*/
}

h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* Grid de ofertas */
.ofertas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Máximo 4 columnas */
    gap: 20px;
}

/* Card de oferta */
.oferta-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
	text-align: center;
}

.oferta-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Imagen */
.oferta-img img {
    width: 100%;
    height: 200px; /* Altura uniforme para todas las imágenes */
    object-fit: cover;
}

/* Información */
.oferta-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.oferta-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.oferta-eslogan {
    font-weight: 600;
    margin: 5px 0;
}

.oferta-desc {
    flex-grow: 1;
    font-size: 14px;
    color: #555;
    margin: 5px 0;
}

.oferta-precio {
    font-size: 16px;
    font-weight: bold;
    color: #1a73e8;
    margin: 10px 0;
}

.oferta-caducidad {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

/* Botón */
.btn {
    display: inline-block;
    padding: 10px 15px;
    background-color: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #0f5dc2;
}

.cerrar {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 25px;
    font-weight: bold;
    cursor: pointer;
}
.btn-cancelar {
    background-color: #ccc;
    color: #333;
    margin-left: 10px;
}
.btn-cancelar:hover {
    background-color: #999;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}
.modal-contenido, .modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
	top: 50px;
	height: fit-content;
	width: 90%;
    max-height: 60%;     /* altura máxima general */
    overflow-y: auto;

}

.close { 
    position: absolute; 
    right: 15px; 
    top: 10px; 
    font-size: 1.5em; 
    cursor: pointer; 
}
.modal img { max-width: 100%; border-radius: 8px; margin-top: 10px; }
.modal-buttons {
    margin-top: 20px;
    display: flex; justify-content: space-between;
  }
  .modal-buttons button {
    padding: 8px 16px;
    border: none; border-radius: 6px;
    cursor: pointer;
  }
  #modalCancelar { background: #ccc; }
  #modalAceptar { background: #0071e3; color: white; }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card-solicitud {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-solicitud:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card-solicitud h4 {
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
}

.card-solicitud .poblacion,
.card-solicitud .fecha {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
}

.card-solicitud .productos {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.card-solicitud .productos li {
    background-color: #f5f5f5;
    margin-bottom: 5px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
}

.card-solicitud .estado {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    text-transform: uppercase;
}

.estado.pendiente { background-color: #ffe082; color: #795548; }
.estado.procesada { background-color: #81d4fa; color: #0277bd; }
.estado.completada { background-color: #aed581; color: #33691e; }
.estado.rechazada { background-color: #ef9a9a; color: #b71c1c; }

.estado-form {
    margin-top: 10px;
}

.estado-form select {
    padding: 6px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
    width: 100%;
}

.error-message {
    color: #ec0000;
	font-weight: 600;
}

.oferta_title {
	padding-top: 30px;
	}
.mb-3 .form-label {
	font-weight: 700;	
}

.flex-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
    width: 100%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s forwards;
}

.flex-item {
        flex: 1 1 0;
        min-width: 300px;
        box-sizing: border-box;
}
.cta-button {
        background: #ff5a5f;
        color: white;
        padding: 12px 25px;
        text-decoration: none;
        border-radius: 8px;
        font-weight: bold;
        transition: background 0.3s;
        display: inline-block;
        margin-top: 10px;
    }
.cta-button:hover {
        background: #e04e4f;
    }
.refer-link-container {
        background: white;
        border: 2px dashed #ff5a5f;
        padding: 15px;
        margin-top: 20px;
        border-radius: 10px;
        text-align: center;
    }
.refer-link-input {
        width: 100%;
        padding: 10px;
        font-size: 14px;
        margin-top: 10px;
        border: 1px solid #ccc;
        border-radius: 5px;
    }

.copy-btn {
        background: #00c48c;
        color: white;
        padding: 8px 15px;
        border: none;
        border-radius: 5px;
        font-weight: bold;
        cursor: pointer;
        margin-top: 10px;
    }
.copy-btn:hover {
        background: #00a97f;
    }


	.planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 900px;
}
.plan-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
    position: relative;
}
.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.plan-card.destacado {
    border: 2px solid #2d89ef;
    background: #e6f2ff;
}
.plan-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.plan-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.plan-card .precio {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0071e3;
    margin-bottom: 0.5rem;
}
.plan-card .detalles {
    font-size: 0.95rem;
    color: #3a3a3c;
    margin-bottom: 1rem;
}
.plan-card .badge {
    background: #28a745;
    color: #fff;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
}
.btn-card {
    background: #2d89ef;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}
.btn-card:hover {
    background: #1a65c1;
}

@media (max-width: 768px) {
	  main table th, main table td {
		padding-top: 0.75rem;
    	padding-right: 0.1rem;
    	padding-bottom: 0.75rem;
		padding-left: 0.2rem;
      }
	.logo {
    width: 80px;
    margin: 0 auto;
}
	.main-header {
	position: fixed;
    bottom: 0; /* ✅ coloca el header pegado abajo */
    left: 0;
    /*width: 100%;*/
    background-color: #fff;
    padding: 8px 10px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
		
	margin-bottom: 0px;
	top: unset;
		width: 100%;
	
  }
	.nav-top-header{
		/*display: grid;
      grid-template-columns: repeat(5, 1fr);*/
      gap: 1px;
      padding: 2px;
	justify-content: right;
	}
	.top-header {
    padding: 8px 10px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
	margin-bottom: 0px;
	}
	
	.logo-container {
    	text-align: center;
    	
	}
	.oferta_title {
		font-size: 0.8em;
		padding-top: 20px;
	}
	.oferta_desc {
		font-size: 0.8em;
	}
	.recurso-overlay {
    opacity: 100;
}
	.flex-container {
         flex-direction: column;
         flex-wrap: nowrap;
     }
  	.flex-item {
         width: 100%;
         flex: none;
         max-width: 100%;
         min-width: 100%;
     }
     .refer-link-input {
         font-size: 16px;
     }
      .nav {
      display: flex;
      /*grid-template-columns: repeat(6, 1fr);*/
      gap: 1px;
      padding: 2px;
	  max-width: unset;
	  left: unset;
	  position: unset;
	  max-width: 94%;
  }

  .nav a {
      padding-left: 5px;
	  padding-right: 5px;
      flex: none;
	
  }

  .nav a i { /*iconos del menu*/
      font-size: 1.2em;
      margin-bottom: 1px;
  }

  .nav a span {
      font-size: 10px;
	  font-weight: 600;
      line-height: 1;
            }
    .dashboard-metrics {
        grid-template-columns: repeat(3, 1fr);  /* siguen en una fila */
        gap: 5px;
    }

    .metric-card {
        padding: 0.5rem 0.3rem;
        font-size: 0.75rem;
    }

    .metric-card h3 {
        font-size: 0.7rem;
    }

    .metric-card p {
        font-size: 0.85rem;
    }}        

/* CARDS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.card-solicitud {
    background: var(--color-container);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-solicitud:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card-solicitud h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    color: var(--color-heading);
}

.card-solicitud .estado {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 8px;
    color: #fff;
}

.estado.completada { background: var(--color-primary); }
.estado.pendiente { background: #ffc107; color: #333; }
.estado.rechazada { background: #dc3545; }