/* assets/style.css - Identidad Visual CERK (2026 Soft Bento UI) */
:root {
    --bg-app: #F3F4F6;
    --bg-card: #FFFFFF;
    --bg-input: #F8FAFC;
    --text-main: #111827;
    --text-muted: #6B7280;
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --border-subtle: #E5E7EB;
    --radius-card: 28px;
    --radius-btn: 16px;
    --radius-input: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Contenedor centrado para Login/Registro */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-card);
    padding: 36px 32px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-subtle);
}

.brand-header {
    text-align: center;
    margin-bottom: 28px;
}

.brand-logo {
    display: inline-block;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--primary);
    margin-bottom: 4px;
}

.brand-tagline {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Pestañas Login / Registro */
.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-app);
    padding: 5px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Formularios */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-input);
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Selector de modo de familia en registro */
.family-mode-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 18px;
}

.radio-group {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
}

/* Botones */
.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-btn);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 6px;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Alertas */
.alert {
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.hidden {
    display: none;
}

/* --- ESTILOS PANEL DE ADMINISTRACIÓN CERK --- */
.panel-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.topbar-title h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.topbar-title p {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-logout {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    color: #374151;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #F9FAFB;
}

/* Tarjetas Bento superiores (URL Pública y Código Hermanos) */
.share-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

@media (max-width: 700px) {
    .share-grid {
        grid-template-columns: 1fr;
    }
}

.bento-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 20px 24px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.bento-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.copy-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copy-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
}

.btn-copy {
    background: #EEF2FF;
    color: var(--primary);
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #E0E7FF;
}

/* Formulario Nuevo Evento */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 800;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 600px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.chips-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.chip-btn {
    background: #EEF2FF;
    color: #3730A3;
    border: 1px solid #E0E7FF;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* Lista de eventos en panel */
.admin-event-card {
    background: var(--bg-card);
    border-radius: 22px;
    padding: 20px 24px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.admin-event-card.done {
    opacity: 0.6;
    background: #F9FAFB;
}

.ev-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.ev-pill {
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    background: #EEF2FF;
    color: #3730A3;
}

.ev-date {
    font-size: 13px;
    font-weight: 700;
    color: #4B5563;
}

.ev-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.ev-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.ev-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--border-subtle);
    background: #FFFFFF;
    cursor: pointer;
    text-decoration: none;
    color: #374151;
}

.btn-sm-success {
    background: #ECFDF5;
    color: #065F46;
    border-color: #A7F3D0;
}

.btn-sm-danger {
    background: #FEF2F2;
    color: #991B1B;
    border-color: #FECACA;
}

/* --- MODAL EDICIÓN --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}

.modal-backdrop.hidden {
    display: none;
}

.modal-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.btn-close-modal {
    background: var(--bg-app);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: #374151;
}

.contenedor {
    text-align: center;
    padding: 24px 16px;
}

.footer-marca {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 32px;
}

.footer-marca svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.footer-marca strong {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* --- CORRECCIÓN RESPONSIVE EN MÓVIL --- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.bento-card {
    min-width: 0;
    width: 100%;
}

.copy-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.copy-input {
    min-width: 0;
    flex: 1 1 160px;
}

@media (max-width: 520px) {
    .bento-card {
        padding: 18px 16px;
    }
    .copy-input {
        flex: 1 1 100%;
        width: 100%;
    }
    .copy-row .btn-copy {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}


