/* =========================================================
   MI IDENTIDAD — ESTILOS ESPECÍFICOS
   Cargado únicamente por Mi identidad.
   NO contiene estilos de Inicio.
   ========================================================= */

.category-list,
.preview-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-list {
    margin-top: 4px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #344054;
    background: #f2f4f7;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
}

.category-empty {
    color: var(--muted);
    font-size: .86rem;
}

.category-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.category-fieldset legend {
    margin-bottom: 8px;
    color: #344054;
    font-size: .9rem;
    font-weight: 700;
}

.category-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-options label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #fff;
    color: #344054;
    font-size: .86rem;
    font-weight: 650;
    cursor: pointer;
}

.category-options input {
    width: auto;
    margin: 0;
    accent-color: var(--primary);
}

.preview-categories {
    justify-content: center;
    margin: 8px 0 2px;
}

.preview-categories .category-chip {
    font-size: .7rem;
}

.preview-support-phrase {
    margin-top: 14px !important;
    padding: 12px 14px;
    border-radius: 12px;
    color: #344054 !important;
    background: var(--surface-soft);
    font-style: italic;
    font-weight: 700;
    text-align: center;
}

/* =========================================================
   FIX GLOBAL — elementos con atributo hidden
   Evita que loaders u otros bloques con display:flex/grid
   sigan visibles después de JS: element.hidden = true
   ========================================================= */
[hidden] {
    display: none !important;
}

/* =========================================================
   MI IDENTIDAD — RESTAURAR SIDEBAR OSCURO
   Mantiene la identidad visual ya validada del Dashboard V1.
   ========================================================= */

.sidebar {
    color: #fff;
    border-right-color: transparent;
    background: #111a2e;
}

.sidebar .brand {
    color: #fff;
}

.sidebar .brand-mark {
    color: #111a2e;
    background: #fff;
}

.sidebar .nav-item {
    color: #b9c1d1;
    text-decoration: none;
}

.sidebar .nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,.06);
}

.sidebar .nav-item.active {
    color: #fff;
    background: rgba(255,255,255,.11);
}

.sidebar .small-label,
.sidebar .sidebar-user,
.sidebar .logout-button {
    color: #aeb8ca;
}

.sidebar .business-select {
    color: #fff;
    border-color: rgba(255,255,255,.14);
    background: #18243d;
}

.sidebar .business-select option {
    color: #111827;
    background: #fff;
}

/* =========================================================
   MI IDENTIDAD — EDICIÓN DE IMÁGENES
   Bloque modular, sin alterar el layout general.
   ========================================================= */

.image-editor-block {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.image-editor-block-wide {
    min-width: 0;
}

.image-edit-button {
    justify-self: start;
}

.image-editor-form {
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.image-editor-form input[type="file"] {
    width: 100%;
}

@media (max-width: 720px) {
    .image-editor-block {
        width: 100%;
    }
}

/* =========================================================
   FIX — EDITORES DE IMÁGENES SIN ROMPER EL GRID
   ========================================================= */

.image-placeholder-row {
    align-items: start;
}

.image-editor-block {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 10px;
    min-width: 0;
}

.image-editor-block-wide {
    min-width: 0;
}

.image-editor-block .image-placeholder {
    width: 100%;
}

.image-editor-block-wide .image-placeholder.wide {
    width: 100%;
}

.image-edit-button {
    justify-self: start;
}

.image-editor-form {
    width: 100%;
    margin: 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--border);
    overflow: hidden;
}

.image-editor-form label {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.image-editor-form input[type="file"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.image-editor-form .editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.image-editor-form .button {
    width: auto;
}

@media (max-width: 720px) {
    .image-placeholder-row {
        grid-template-columns: 1fr;
    }

    .image-editor-block,
    .image-editor-block-wide {
        width: 100%;
    }
}

/* =========================================================
   MI IDENTIDAD — IMÁGENES EN DOS FILAS
   Desktop y móvil: cada imagen tiene su propio bloque.
   ========================================================= */

.identity-images-stack {
    display: grid;
    gap: 22px;
    margin-top: 16px;
}

.identity-image-row {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.identity-image-row + .identity-image-row {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.identity-image-row-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.identity-image-row-heading h3 {
    margin: 0 0 4px;
    font-size: .96rem;
    line-height: 1.3;
}

.identity-image-row-heading p {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.45;
}

.identity-image-row-profile #displayProfileImage {
    width: 112px;
    min-height: 112px;
}

.identity-image-row-hero #displayHeroImage {
    width: 100%;
    min-height: 150px;
}

.identity-image-row .image-editor-form {
    max-width: 520px;
}

.identity-image-row-hero .image-editor-form {
    max-width: 100%;
}

@media (max-width: 720px) {
    .identity-image-row-heading {
        gap: 12px;
    }

    .identity-image-row-profile #displayProfileImage {
        width: 96px;
        min-height: 96px;
    }

    .identity-image-row-hero #displayHeroImage {
        min-height: 120px;
    }
}

/* =========================================================
   MI IDENTIDAD — ESTADO DE PUBLICACIÓN
   Mejora visual sin cambiar lógica.
   ========================================================= */

.publication-card {
    overflow: hidden;
}

.publication-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.publication-card-head h2 {
    margin: 0;
}

.publication-kicker {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.publication-card-body {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.publication-card-body .content-text {
    margin: 0;
    max-width: 62ch;
}

.publication-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.publication-actions .button {
    width: auto;
}

@media (max-width: 720px) {
    .publication-card-head {
        align-items: center;
    }

    .publication-actions .button {
        width: 100%;
    }
}

/* =========================================================
   MI IDENTIDAD — MATICES DE COLOR EN TARJETAS
   Color suave, manteniendo legibilidad y aspecto profesional.
   ========================================================= */

.card[data-block="identity"] {
    background: #f8fbff;
    border-color: #dbeafe;
}

.card[data-block="about"] {
    background: #fbf9ff;
    border-color: #e9ddff;
}

.card[data-block="support-phrase"] {
    background: #faf8ff;
    border-color: #e6def8;
}

.card[data-block="contact"] {
    background: #f8fcfa;
    border-color: #dcefe5;
}

.card[data-block="hero-phrase"] {
    background: #fffaf4;
    border-color: #f3e4cf;
}

.card[data-block="images"] {
    background: #fbfcfe;
    border-color: #e2e8f0;
}

.card[data-block="identity"],
.card[data-block="about"],
.card[data-block="support-phrase"],
.card[data-block="contact"],
.card[data-block="hero-phrase"] {
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.card[data-block="identity"]:hover,
.card[data-block="about"]:hover,
.card[data-block="support-phrase"]:hover,
.card[data-block="contact"]:hover,
.card[data-block="hero-phrase"]:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .055);
}

@media (max-width: 720px) {
    .card[data-block="identity"],
    .card[data-block="about"],
    .card[data-block="support-phrase"],
    .card[data-block="contact"],
    .card[data-block="hero-phrase"],
    .card[data-block="images"] {
        background-image: none;
    }
}
