* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: #f5f5f8;
    color: #222;
}

/* ------------------------- */
/* LANDING PAGE */
/* ------------------------- */
.titulo-vivo{
    color: #d643c5;
}
.landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.landing-card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.landing-card h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.landing-card p {
    margin-bottom: 1.5rem;
    color: #555;
}

.landing-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-form input {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #ddd;
}

.landing-form button,
.btn {
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    border: none;
    background: #6c5ce7;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.landing-form button:hover,
.btn:hover {
    background: #5b4bd6;
}

/* ------------------------- */
/* CENTER PAGE */
/* ------------------------- */

.center-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* ------------------------- */
/* ALERTAS */
/* ------------------------- */

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: left;
}

.alert-error {
    background: #ffe3e3;
    color: #b00020;
}

/* UNIFICADO: usada para editar plantillas + eliminar suscriptores */
.alert-success,
.alert.success {
    background: #e0f7e9;
    color: #2e7d32;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* ------------------------- */
/* HEADER ADMIN */
/* ------------------------- */

.admin-header {
    background: #fff;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-header nav a {
    margin-left: 1rem;
    text-decoration: none;
    color: #555;
}

.admin-header nav a:hover {
    color: #6c5ce7;
}

/* ------------------------- */
/* ADMIN MAIN */
/* ------------------------- */

.admin-main {
    padding: 2rem;
}

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

.card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card h2 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #666;
}

.card p {
    font-size: 1.6rem;
    font-weight: 700;
}

/* ------------------------- */
/* TABLAS */
/* ------------------------- */

.admin-main table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.admin-main table th,
.admin-main table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.admin-main table th {
    background: #fafafa;
    text-align: left;
}

/* Contenedor interno con dos columnas: listado + editor */
.emails-container {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.6fr);
    gap: 1.5rem;
    align-items: flex-start;
}

/* Columna izquierda: listado */
.emails-list {
    /* opcionalmente ancho completo de su columna */
    width: 100%;
}

.emails-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

/* Editor (columna derecha) */

.emails-editor {
    width: 100%;
}

.emails-editor form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.emails-editor input,
.emails-editor textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #ddd;
}

/* grupo de campos con label/input */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    color: #444;
}

.form-group small {
    font-size: 0.8rem;
    color: #777;
}

.emails-editor button {
    align-self: flex-start;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    border: none;
    background: #6c5ce7;
    color: #fff;
    cursor: pointer;
}

/* ------------------------- */
/* BOTONES */
/* ------------------------- */

.btn-danger {
    background: #e74c3c;
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-danger:hover {
    background: #c0392b;
}

.btn-primary {
    background: #3498db;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: #2d89c6;
}

.btn-secondary {
    background: #8e44ad;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #7d3aa3;
}

/* ------------------------- */
/* RESPONSIVE */
/* ------------------------- */

@media (max-width: 900px) {
    .emails-container {
        grid-template-columns: 1fr;
    }
}
