/* Tema Oscuro SaaS Dashboard */
* {
    box-sizing: border-box;
}

:root {
    --bg-light: #f4f5f9;
    --sidebar-bg: rgba(255, 255, 255, 0.9);
    --card-bg: #ffffff;
    /* Borde de cards: gris azulado visible (el rgba(0,0,0,0.05) apenas se veía). */
    --card-border: #d7dce3;
    --text-main: #1a1f26;
    --text-muted: #6b7280;
    --accent-primary: #000000;
    --accent-blue: #4f46e5;
    --accent-green: #10b981;
    --sidebar-width: 70px;
    --sidebar-expanded-width: 300px;
    --radius-xl: 24px;
    --radius-lg: 16px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --bg1:#eceef5;
    --bg2:#dcdfeb;

    /* Los TOKENS `--ib-*` del sistema de diseño (D-DESIGN-1) y la BOTONERA
       canónica `.ib-btn` (D-DESIGN-2) se mudaron el 2026-09-13 a
       `public/core/css/ib-confirm.css`, que este mismo layout carga JUSTO
       ANTES que este fichero. No se copiaron: se movieron, para que el panel
       de la plataforma pueda usar el diálogo canónico sin estrenar una
       segunda copia de su aspecto. */
}

/* Topbar de INVITADO (D-LAUNCH-1): mirar es libre, actuar pide cuenta. */
.topbar-guest-btn {
    display: inline-flex; align-items: center;
    height: 38px; padding: 0 16px; border-radius: 999px;
    background: var(--ib-text); color: #fff;
    font-size: 14px; font-weight: 600; text-decoration: none;
    white-space: nowrap;
}
.topbar-guest-btn:hover { background: #000; color: #fff; }
.topbar-guest-btn--ghost { background: transparent; color: #1a1f26; border: 1px solid var(--card-border); }
.topbar-guest-btn--ghost:hover { background: #f3f5f8; color: #1a1f26; }

body {
    margin: 0;
    padding: 0;
    /* L4 (D-LAUNCH-4): fondo blanco plano en toda la plataforma. */
    background: #ffffff;
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Estilo SaaS - Floating Modern Look */
.dashboard-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    position: fixed;
    left: 0px;
    top: 64px;
    height: calc(100vh - 64px);
    z-index: 100;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.dashboard-sidebar:hover {
    width: var(--sidebar-expanded-width);
}

.sidebar-logo {
    width: 54px;
    height: 50px;
    min-width: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--card-border);
    flex-shrink: 0;
    margin-bottom: 8px;
    margin-top: 8px;
    position: relative;
}

.sidebar-logo i {
    width: 22px;
    height: 22px;
    min-width: 22px;
    stroke-width: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.dashboard-sidebar:hover .sidebar-logo {
    width: 100%;
    justify-content: flex-start;
    padding-left: 14px;
    gap: 15px;
}

.dashboard-sidebar:hover .sidebar-logo i {
    color: var(--accent-primary);
}

.dashboard-sidebar:hover .sidebar-logo-label {
    opacity: 1;
    visibility: visible;
    position: static;
}

.sidebar-logo i {
    width: 22px;
    height: 22px;
    min-width: 22px;
    stroke-width: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.dashboard-sidebar:hover .sidebar-logo {
    width: 100%;
    height: 50px;
    min-height: 50px;
}

.dashboard-sidebar:hover .sidebar-logo i {
    color: var(--accent-primary);
}

.sidebar-logo-label {
    font-size: 20px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    left: 54px;
    transition: opacity 0.2s ease;
    color: var(--text-main);
}

.dashboard-sidebar:hover .sidebar-logo-label {
    opacity: 1;
    visibility: visible;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    width: 100%;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px 0;
}

/* Custom Scrollbar para el menú */
.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.dashboard-sidebar:hover .sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

.dashboard-sidebar:hover .sidebar-menu {
    align-items: flex-start;
    padding: 15px;
}

.menu-item {
    width: 54px;
    height: 50px;
    min-width: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    text-decoration: none;
    position: relative;
    margin-bottom: 4px;
}

.dashboard-sidebar:hover .menu-item {
    width: 100%;
    justify-content: flex-start;
    padding-left: 15px;
    gap: 12px;
}

.menu-item i {
    width: 22px;
    height: 22px;
    min-width: 22px;
    stroke-width: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-label {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    position: absolute;
    left: 55px;
}

.dashboard-sidebar:hover .menu-label {
    opacity: 1;
    visibility: visible;
    position: static;
}

.menu-item-sm {
    width: 50px;
    height: 50px;
    border-radius: 14px;
}

.menu-item-sm i, 
.menu-item-sm svg {
    width: 20px !important;
    height: 20px !important;
}

.menu-item:hover, .menu-item.active {
    background-color: #f3f4f6 !important;
    color: var(--accent-primary);
}

.menu-item.active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.sidebar-bottom {
    margin-top: auto;
    width: 100%;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard-sidebar:hover .sidebar-bottom {
    align-items: stretch;
}

.user-profile-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 18px;
    background: transparent;
}

.dashboard-sidebar:hover .user-profile-item {
    justify-content: flex-start;
    background: #f9fafb;
    border: 1px solid rgba(0,0,0,0.03);
}

.user-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    width: 0;
    margin-left: 0;
    transition: opacity 0.2s ease, width 0.3s ease, margin 0.3s ease;
    overflow: hidden;
}

.dashboard-sidebar:hover .user-info {
    opacity: 1;
    visibility: visible;
    width: auto;
    margin-left: 12px;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Contenido Principal */
.dashboard-main {
    flex: 1;
    margin-left: 0;
    padding: 100px 80px 40px 80px;
}

.has-module-sidebar .dashboard-main {
    margin-left: calc(40px + 40px);
}

.no-module-sidebar .dashboard-main {
    margin-left: 0;
    padding: 100px 80px 40px 80px;
}

.dashboard-header {
    margin-bottom: 40px;
    margin-top: 40px;
}

.dashboard-header h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #111827;
    margin: 0 0 10px 0;
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    max-width: 600px;
}

/* Pestañas de Navegación */
.navigation-tabs {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0;
}

.nav-tab {
    padding: 12px 5px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab:hover {
    color: var(--text-main);
}

.nav-tab.active {
    color: var(--accent-blue);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-blue);
}

/* Panel Lateral (Drawer) */
.side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-panel-overlay.active {
    display: block;
    opacity: 1;
}

.side-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    max-width: 100%;
    height: 100%;
    background-color: var(--card-bg);
    color: var(--text-main);
    border-left: 1px solid var(--card-border);
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.08);
}

.side-panel.active {
    right: 0;
}

@media (max-width: 600px) {
    .side-panel {
        width: 100%;
        right: -100%;
    }
}

.side-panel-header {
    padding: 25px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.side-panel-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
}

.close-panel-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-panel-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.side-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.side-panel-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--card-border);
    display: flex;
    gap: 15px;
}

.side-panel-footer .btn {
    flex: 1;
}

/* Estilos de Formulario en Panel */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    background-color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(0,0,0,0.03);
}

.form-control::placeholder {
    color: #4b5563;
}

.btn {
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background-color: #333;
    transform: scale(1.02);
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.btn-secondary:hover {
    background-color: #4b5563;
}

.ai-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.option-group {
    background-color: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-soft) !important;
  padding: 30px !important;
    margin-bottom: 20px;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 8px 0;
}

.option-item input[type="radio"] {
    margin-top: 4px;
    accent-color: var(--accent-blue);
}

.option-label {
    font-size: 14px;
    font-weight: 500;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Estado Vacío / Próximamente */
.empty-section {
    background-color: var(--card-bg);
    border: 1px dashed var(--card-border);
    border-radius: 16px;
    padding: 60px;
    text-align: center;
    color: var(--text-muted);
}

.empty-section i {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    stroke-width: 1.5px;
}

.empty-section h3 {
    color: var(--text-main);
    margin-bottom: 10px;
}

/* Grilla de Proyectos/Páginas */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 25px;
}

.projects-grid-full {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 25px;
}

.project-card, .stat-card, .settings-pane > div, .menu-management-container {
    background-color: var(--card-bg) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-soft) !important;
    padding: 30px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

/* Dashboard Header & Common Utilities */
.dashboard-header .header-back-btn {
    width: 32px; 
    height: 32px;
}

.dashboard-header h1 {
    margin: 0;
}

.create-project-content .label {
    font-weight: 500;
}

/* Footer Section */
#footerWidgetsRoot {
    display: grid; 
    grid-template-columns: 320px 1fr; 
    gap: 30px; 
    align-items: start;
}

.menu-sidebar .search-bar {
    width: 100%; 
    margin-bottom: 15px; 
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
}

.menu-sidebar .search-bar input {
    color: var(--text-main) !important;
}

.menu-sidebar .option-group {
    padding: 0; 
    overflow: hidden;
}

.menu-sidebar .group-title {
    padding: 15px 20px; 
    margin: 0; 
    font-size: 16px; 
    border-bottom: 1px solid var(--card-border); 
    background: rgba(255,255,255,0.02);
}

.accordion-header .title {
    font-weight: 500; 
    font-size: 14px;
}

.accordion-header i {
    width: 16px; 
    height: 16px; 
    transition: transform 0.3s;
}

.accordion-content {
    padding: 0 20px 20px 20px;
}

.accordion-content .target-selector-box {
    margin: 15px 0; 
    padding: 12px; 
    border-radius: 8px; 
    border: 1px solid var(--card-border);
}

.target-selector-box label {
    font-size: 10px; 
    text-transform: uppercase; 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600;
}

.target-selector-box select {
    font-size: 12px; 
    padding: 6px 10px; 
    border-color: rgba(255,255,255,0.1);
}

.elements-list {
    max-height: 260px; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    margin-top: 10px;
}

.elements-list label {
    display: flex; 
    align-items: center; 
    gap: 10px; 
    cursor: pointer; 
    font-size: 13px; 
    color: var(--text-muted);
}

.elements-list input[type="checkbox"] {
    accent-color: var(--accent-blue);
}

.accordion-actions {
    margin-top: 15px; 
    padding-top: 15px; 
    border-top: 1px solid var(--card-border);
}

.accordion-actions .btn {
    width: 100%; 
    font-size: 12px; 
    padding: 8px;
}

.menu-management-container .header-info h2 {
    margin: 0; 
    font-size: 18px;
}

.menu-management-container .header-info p {
    color: var(--text-muted); 
    font-size: 12px; 
    margin: 5px 0 0 0;
}

.menu-section-container {
    margin-bottom: 40px;
}

.section-title-bar {
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 15px; 
    padding-bottom: 10px; 
    border-bottom: 1px solid var(--card-border); 
    justify-content: space-between;
}

.section-title-bar .title-box {
    display: flex; 
    align-items: center; 
    gap: 10px;
}

.section-title-bar i {
    width: 18px; 
    height: 18px; 
    color: var(--accent-blue);
}

.section-title-bar h3 {
    margin: 0; 
    font-size: 15px; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}

.footer-empty-placeholder {
    font-size: 11px;
}

/* Menu Editor Specifics */
.block-type-icon .svg-preview {
    width: 20px; 
    height: 20px;
}

.menu-items-list .empty-section p {
    font-size: 11px;
}

.menu-column-row .drag-handle {
    cursor: grab;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.sub-item .drag-handle {
    margin-left: 30px;
}

/* Input Group & Path Prefix */
.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group-prefix {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    /* Un prefijo largo (URLs) no puede ensanchar el documento en móvil. */
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 44px;
}

.input-group .form-control {
    border-radius: 0 12px 12px 0;
}

.input-group-prefix + .form-control {
    border-left: none;
    padding-left: 8px;
}

/* SEO & Info Boxes */
.seo-warning-box {
    margin-top: 12px;
    padding: 12px 15px;
    background: rgba(245, 158, 11, 0.05);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
}

.seo-warning-text {
    color: #b45309;
    font-size: 12px;
    display: block;
    line-height: 1.5;
}

.seo-warning-text strong {
    font-weight: 600;
}
.cms-form-separator {
    margin: 25px 0 15px 0; 
    padding-bottom: 8px; 
    border-bottom: 1px dashed var(--card-border);
}

.cms-form-separator h4 {
    font-size: 12px; 
    text-transform: uppercase; 
    color: var(--accent-blue); 
    margin: 0; 
    letter-spacing: 1px; 
    font-weight: 600;
}

.cms-field-container[data-control="switch"] .switch-box {
    display: flex; 
    align-items: center; 
    gap: 10px; 
    background: rgba(255,255,255,0.02); 
    padding: 10px; 
    border-radius: 8px; 
    border: 1px solid var(--card-border);
}

.cms-field-container[data-control="switch"] input {
    width: 18px; 
    height: 18px; 
    accent-color: var(--accent-blue);
}

.cms-field-container[data-control="switch"] .field-element-label {
    font-size: 13px; 
    color: var(--text-muted);
}

.cms-field-container .field-help {
    color: var(--text-muted); 
    font-size: 11px; 
    margin-top: 5px; 
    display: none;
}

.project-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.card-actions-toolbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--sidebar-bg);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--card-border);
    z-index: 10;
}

.project-card:hover .card-actions-toolbar {
    transform: translateY(0);
}

.action-btn-danger:hover {
    color: #e74c3c !important;
    background-color: rgba(231, 76, 60, 0.1) !important;
}

.action-btn-success.active {
    color: var(--accent-green) !important;
    background-color: rgba(46, 204, 113, 0.1) !important;
}

.card-preview {
    height: 180px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1f26;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.card-overlay-title {
    position: absolute;
    top: 20px;
    left: 20px;
    font-weight: 600;
    font-size: 18px;
    color: #fff;
}

.card-options {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-muted);
}

.card-options i {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

.card-footer {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stats-group {
    display: flex;
    gap: 20px;
    flex: 1;
    min-width: 0;
    margin-right: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.stat-value a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.stat-value a:hover {
    color: var(--accent-blue);
}

.card-action-btn {
    width: 36px;
    height: 36px;
    background-color: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.card-action-btn:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateX(3px);
}

.card-action-btn i {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
}

.create-project-card {
    border-style: dashed !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    background-color: transparent !important;
}

.create-project-card:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
    border-color: var(--accent-blue) !important;
}

.create-project-content {
    text-align: center;
    color: var(--text-muted);
}

.create-project-content i {
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    color: var(--accent-blue);
    stroke-width: 1.5px;
}

.project-card:hover .card-action-btn {
    background-color: #ececec;
    transform: scale(1.1);
}

/* Buscador y Controles Superiores */
.top-controls {
    position: fixed;
    top: 0px;
    right: 0px;
    left: 0px;
    z-index: 90;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
}

.no-module-sidebar .top-controls {
    left: 0px;
}

.has-module-sidebar .admin-topbar {
    position: relative;
    z-index: 110;
    border-bottom-left-radius: 0;
}

.admin-topbar {
    flex: 1;
    background-color: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    padding: 6px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: var(--shadow-soft);
}
/* Owner 2026-09-21: el CONTENIDO de la cabecera (logo a la izquierda, iconos y avatar a la derecha) alineado con los mismos bordes que el cuerpo (.dashboard-main, 80 px); el fondo sigue a todo el ancho. Solo escritorio. */
@media (min-width: 769px) {
    .admin-topbar { padding-left: 80px; padding-right: 80px; }
    .admin-topbar .admin-top-logo { margin-left: 0; padding-left: 0; }
}

.admin-top-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-top-menu .menu-item {
    width: auto;
    min-width: auto;
    height: 44px;
    padding: 0 14px;
    gap: 10px;
    justify-content: flex-start;
    margin-bottom: 0;
}

.admin-top-menu .menu-label {
    opacity: 1;
    visibility: visible;
    position: static;
    left: auto;
}

.admin-modules-dropdown {
    position: relative;
}

.admin-modules-dropdown > summary {
    list-style: none;
}

.admin-modules-dropdown > summary::-webkit-details-marker {
    display: none;
}

.admin-modules-caret {
    width: 18px;
    height: 18px;
    margin-left: 2px;
    opacity: 0.6;
}

.admin-modules-dropdown[open] .admin-modules-caret {
    transform: rotate(180deg);
}

.admin-modules-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 260px;
    max-width: 380px;
    background-color: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 10px;
    z-index: 200;
}

.admin-modules-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    color: var(--text-main);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.admin-modules-dropdown-link i {
    width: 18px;
    height: 18px;
    min-width: 18px;
    stroke-width: 2px;
    opacity: 0.8;
}

.admin-modules-dropdown-link:hover {
    background-color: #f3f4f6;
    color: var(--accent-primary);
}

.admin-top-logo {
    display: flex;
    align-items: center;
    padding-right: 16px;
    margin-right: 16px;
    padding-left: 16px;
    margin-left: 16px;
}

.admin-top-logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.admin-top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-top-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 14px;
    background-color: transparent;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.admin-top-profile:hover {
    background-color: #f9fafb;
    border-color: rgba(0,0,0,0.03);
}

.admin-top-profile .user-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-width: 1px;
}

.admin-top-profile .user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.admin-top-profile .user-name {
    font-size: 12px;
}

.admin-top-profile .user-role {
    font-size: 10px;
}

.search-bar {
    background-color: white;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    width: 250px;
    box-shadow: var(--shadow-soft);
}

.search-bar i {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    width: 100%;
}

.user-options-btn {
    width: 40px;
    height: 40px;
    background-color: white;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-options-btn:hover {
    color: rgb(0, 0, 0);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-options-btn i {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

/* Gestión de Menú */
.menu-management-container {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-soft) !important;
    padding: 30px !important;
}

.menu-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item-row {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
}

.menu-item-content {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 15px;
}

.menu-item-content.sub-item {
    padding: 10px 20px;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.sub-item .drag-handle {
    margin-left: 30px;
}

.drag-handle {
    cursor: grab;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.4;
    background: var(--accent-blue) !important;
    border: 1px dashed white !important;
}

.menu-item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item-label {
    font-weight: 500;
    font-size: 15px;
}

.menu-item-type-badge {
    font-size: 10px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.type-mega-menu { color: #a29bfe; background: rgba(162, 155, 254, 0.1); }
.type-mega-menu-grid { color: #fab1a0; background: rgba(250, 177, 160, 0.1); }
.type-dropdown { color: #81ecec; background: rgba(129, 236, 236, 0.1); }
.type-link { color: #55efc4; background: rgba(85, 239, 196, 0.1); }

/* Estilos para formularios de edición inline */
.inline-edit-form {
    width: 100%;
    clear: both;
}

.inline-form-wrapper {
    animation: slideDown 0.3s ease-out;
    border-left: 3px solid var(--accent-blue) !important;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.inline-form-wrapper .cms-form-builder {
    background: transparent;
    border: none;
    padding: 0;
}

.inline-form-wrapper .form-group label {
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 5px;
}

.inline-form-wrapper .form-control {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: #fff;
}


.menu-item-actions {
    display: flex;
    gap: 5px;
}

.menu-item-children {
    background-color: rgba(220, 240, 255, 0.2);
    min-height: 10px;
    transition: all 0.2s;
}

.menu-item-children:empty::after,
.column-blocks-list:empty:not(.no-drag)::after,
.empty-columns-placeholder::after {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Estilo para el botón de añadir columnas */
.empty-columns-placeholder::after {
    content: 'Pulsa para añadir una columna';
    border: 2px dashed rgba(255,255,255,0.05);
    border-radius: 12px;
    background: rgba(255,255,255,0.01);
    margin: 5px 0;
    width: 100%;
}

/* Estilo sutil para arrastrar dentro de columnas o menús simples */
.menu-item-children:empty::after,
.column-blocks-list:empty:not(.no-drag)::after {
    content: 'Arrastra elementos aquí';
    padding: 15px;
    opacity: 0.6;
}

.empty-columns-placeholder {
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    width: 100%;
}

.empty-columns-placeholder:hover::after {
    background: rgba(255,255,255,0.03);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.column-blocks-list {
    min-height: 40px;
    padding: 5px;
    border-radius: 8px;
}

.menu-block-children {
    padding-left: 40px;
    min-height: 5px;
    border-left: 1px dashed rgba(255, 255, 255, 0.05);
    margin-left: 20px;
}

.menu-column-row {
    padding: 10px 0;
}

.column-header {
    padding: 10px 20px;
    gap: 15px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--accent-blue);
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.btn-add-block-to-col {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.btn-add-block-to-col:hover {
    color: var(--accent-green);
    transform: scale(1.1);
}

.btn-add-block-to-col i {
    width: 16px;
    height: 16px;
}

.block-type-icon {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.block-type-icon i {
    width: 16px;
    height: 16px;
}

.sub-item-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Indicadores de Estado */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-indicator.active {
    background: #27ae60;
    box-shadow: 0 0 8px rgba(39, 174, 96, 0.5);
}

.status-indicator.inactive {
    background: #e74c3c;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
}

/* Specific to the image: "Upgrade" button style */
.btn-upgrade {
    background: var(--accent-primary);
    color: white;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stat cards colors like icons in image */
.stat-card i {
    stroke-width: 2.5px;
}

/* Settings navigation active state */
/* Settings Page Specifics */
.settings-nav {
    background: var(--card-bg); 
    border: 1px solid var(--card-border); 
    border-radius: 16px; 
    padding: 15px; 
    height: fit-content;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 5px;
    color: var(--text-muted);
}

.settings-nav-item i {
    width: 18px;
    height: 18px;
}

.settings-nav-item span {
    font-weight: 500;
}

.settings-nav-item:hover {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-main);
}

.settings-nav-item.active {
    background: var(--accent-primary) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-nav-item.active i {
    color: white !important;
}

.settings-pane > div {
    background: var(--card-bg); 
    border: 1px solid var(--card-border); 
    border-radius: 16px; 
    padding: 25px;
}

.settings-pane h3 {
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}

.settings-pane .settings-icon-box {
    display: flex; 
    align-items: center; 
    gap: 20px; 
    margin-top: 10px; 
    padding: 15px; 
    background: rgba(0,0,0,0.01); 
    border-radius: 12px; 
    border: 1px dashed var(--card-border);
}

.settings-pane .settings-logo-preview {
    width: 60px; 
    height: 60px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.settings-pane .settings-logo-preview i {
    color: white; 
    width: 30px; 
    height: 30px;
}

.settings-pane .social-grid {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px;
}

.settings-pane .security-option-row {
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 15px; 
    background: rgba(0,0,0,0.01); 
    border-radius: 12px; 
    margin-bottom: 15px;
}

.settings-pane .danger-zone {
    margin-top: 30px; 
    padding: 20px; 
    border: 1px solid rgba(255,0,0,0.2); 
    border-radius: 12px; 
    background: rgba(255,0,0,0.01);
}

.settings-pane .danger-zone h4 {
    color: #ff4d4d; 
    margin-top: 0; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}

.settings-pane .danger-zone .danger-action {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

.settings-pane .danger-zone .danger-text {
    margin: 0; 
    font-size: 0.9rem; 
    opacity: 0.8;
}

.settings-pane .danger-zone .btn-danger-outline {
    border-color: #ff4d4d; 
    color: #ff4d4d;
}

.settings-pane .danger-zone .btn-danger-outline:hover {
    background: #ff4d4d;
    color: white;
}

/* Themes Page Specifics */
.themes-section-header {
    margin-top: 40px;
    margin-bottom: 25px;
}

.themes-section-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text-main);
}

.themes-section-header p {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.themes-filters {
    display: grid;
    grid-template-columns: 1fr 220px 220px 220px;
    gap: 15px;
    margin-bottom: 30px;
}

.themes-filters .search-bar {
    width: 100%;
}

.project-card.theme-active {
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.05), var(--shadow-soft) !important;
}

.theme-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
}

.theme-badge-active {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #fff;
}

.theme-badge-installed {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #fff;
}

.theme-badge-update {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    margin-top: 6px;
    font-size: 10px;
}

.theme-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.wall-card {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 34px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wall-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px -8px rgba(0, 0, 0, 0.08), var(--shadow-soft);
}

.wall-media {
    width: 100%;
    height: 380px;
    overflow: hidden;
    position: relative;
}

.wall-card--overlay {
    height: 520px;
}

.wall-card--overlay .wall-media {
    height: 100%;
    position: absolute;
    inset: 0;
}

.wall-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wall-card--overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.78) 100%);
    pointer-events: none;
}

.wall-like-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 2;
}

.wall-like-btn i {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

.wall-overlay {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 3;
    color: white;
}

.wall-overlay-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.05;
}

.wall-overlay-subtitle {
    margin-top: 6px;
    font-size: 14px;
    opacity: 0.85;
}

.wall-meta {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 14px;
}

.wall-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.95;
}

.wall-meta-item i {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
    opacity: 0.9;
}

.wall-cta {
    width: 100%;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.06);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wall-overlay .wall-cta {
    margin-top: 16px;
}

.wall-cta--light {
    background: white;
    color: var(--text-main);
}

.wall-card--light {
    padding: 18px;
    display: flex;
    flex-direction: column;
    height: 520px;
}

.wall-media--inset {
    height: 240px;
    border-radius: 28px;
}

.wall-body {
    padding: 16px 4px 2px 4px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.wall-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--text-main);
    line-height: 1.12;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.wall-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.wall-meta--light {
    color: var(--text-main);
}

.wall-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    margin-top: auto;
    padding-top: 12px;
}

.wall-cta--dark {
    flex: 1;
    background: var(--accent-primary);
    color: white;
    border-color: rgba(0,0,0,0.08);
}

.wall-like-btn--outline {
    position: static;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.08);
    background: white;
    backdrop-filter: none;
    color: #ef4444;
}

.wall-action-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.wall-action-stack--overlay {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 4;
}

.wall-card-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 4;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    color: rgba(255,255,255,0.95);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: -0.2px;
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wall-card-tag--light {
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0,0,0,0.06);
    color: var(--text-main);
    backdrop-filter: none;
    max-width: calc(100% - 120px);
}

.wall-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.wall-action-btn {
    width: 46px;
    height: 62px;
    min-width: 46px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0;
    color: white;
}

.wall-action-btn i {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

.wall-action-value {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.2px;
    line-height: 1;
}

.wall-action-btn--outline {
    border: 1px solid rgba(0,0,0,0.08);
    background: white;
    backdrop-filter: none;
    color: #ef4444;
}

.wall-action-count {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: rgba(255,255,255,0.92);
}

.wall-action-count--light {
    color: #ef4444;
}

.wall-action-rail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.wall-action-rail--light {
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 4;
}

.wall-card--light .wall-body {
    padding-right: 86px;
}

.wall-profile-hero {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    overflow: visible;
    position: relative;
}

.wall-profile-cover {
    height: 550px;
    position: relative;
    border-radius: var(--radius-xl);
    overflow: visible;
}

.wall-profile-cover-media {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.wall-profile-cover-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wall-profile-cover-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.72) 100%);
    pointer-events: none;
}

.wall-profile-header {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    z-index: 2;
}

.wall-profile-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.wall-profile-identity .user-avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 12px 25px -12px rgba(0,0,0,0.35);
}

.wall-profile-name {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: white;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wall-profile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wall-profile-actions .btn {
    height: 46px;
    padding: 0 18px;
    border-radius: 999px;
}

.wall-cta--hero {
    background: white;
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.35);
}

.wall-profile-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wall-profile-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.92);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.wall-profile-rating i {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
    color: #fbbf24;
}

.wall-profile-rating-text {
    margin-left: 4px;
}

.wall-profile-reviews {
    font-weight: 600;
    opacity: 0.85;
}

.wall-profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.28);
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    backdrop-filter: blur(10px);
    font-weight: 700;
    font-size: 13px;
}

.wall-profile-chip i {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
    opacity: 0.95;
}

.wall-profile-followers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.wall-profile-followers i {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
    opacity: 0.95;
}

.wall-profile-chip--button {
    appearance: none;
    cursor: default;
}

.wall-profile-more {
    position: relative;
}

.wall-profile-more > summary {
    list-style: none;
}

.wall-profile-more > summary::-webkit-details-marker {
    display: none;
}

.wall-profile-more-btn {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.wall-profile-more-btn i {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
}

.wall-profile-more-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 180px;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 10px;
    z-index: 5;
}

.wall-profile-more-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-weight: 600;
    cursor: default;
}

.wall-profile-more-item i {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
    opacity: 0.85;
}

.wall-profile-more-item--danger {
    color: #b91c1c;
}

.theme-badge-installed {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: var(--text-muted);
}

.theme-badge-price {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.empty-section-full {
    grid-column: 1 / -1;
}

/* ══ Buscador canónico (mismo lenguaje pill que .ib-btn) ══
   UN solo estilo de buscador en toda la plataforma. */
.ib-search {
    display: flex; align-items: center; gap: 10px;
    flex: 1; min-width: 200px;
    background: #fff;
    border: 1px solid var(--ib-border, rgba(0,0,0,0.12));
    border-radius: 999px;
    padding: 0 16px; height: 40px;
    color: var(--ib-muted, #4b5563);
}
.ib-search:focus-within { border-color: var(--ib-text, #111827); }
.ib-search i, .ib-search svg { width: 18px; height: 18px; color: var(--ib-muted, #4b5563); flex: 0 0 auto; }
.ib-search input {
    flex: 1; min-width: 0; width: 100%;
    border: none; outline: none; background: transparent;
    color: var(--ib-text, #111827); font-size: 14px; font-family: inherit;
}
@media (max-width: 768px) {
    /* Misma altura que el select y flex-basis auto para que el buscador NO
       colapse cuando el toolbar pasa a columna (antes 25px). Consistente en
       TODAS las vistas. */
    .ib-search, .ib-select { height: 42px; }
    .ib-search { flex-basis: auto; }
}

/* ══ Select canónico (mismo lenguaje pill que .ib-btn) ══ */
.ib-select {
    appearance: none; -webkit-appearance: none;
    height: 40px; padding: 0 34px 0 14px;
    border: 1px solid var(--ib-border, rgba(0,0,0,0.12));
    border-radius: 999px;
    background-color: #fff;
    font-size: 14px; font-weight: 600; font-family: inherit;
    color: var(--ib-text, #111827);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.ib-select:focus { outline: none; border-color: var(--ib-text, #111827); }
@media (max-width: 768px) { .ib-select { height: 42px; } }

/* ═══ CAMPO DE TEXTO CANÓNICO (owner 2026-08-09). Faltaba: cada vista se
   inventaba el suyo. Mismo lenguaje que .ib-select y .ib-search, pero con
   esquinas suaves porque puede ser multilínea. ═══ */
.ib-input {
    width: 100%; box-sizing: border-box;
    min-height: 40px; padding: 10px 14px;
    border: 1px solid var(--ib-border, rgba(0,0,0,0.12));
    border-radius: 12px;
    background: #fff;
    font-size: 14px; font-family: inherit;
    color: var(--ib-text, #111827);
    resize: vertical;
}
.ib-input::placeholder { color: var(--ib-muted, #4b5563); opacity: .75; }
.ib-input:focus { outline: none; border-color: var(--ib-text, #111827); }
@media (max-width: 768px) { .ib-input { min-height: 42px; font-size: 16px; } }

/* Campo con su etiqueta encima. Evita que cada vista lo resuelva a mano. */
.ib-field { display: flex; flex-direction: column; gap: 6px; }
.ib-field-label { font-size: 14px; font-weight: 600; color: var(--ib-text, #111827); }
.ib-field-hint  { font-size: 13px; color: var(--ib-muted, #4b5563); }
/* Aviso de campo con PESO (D-PLAZO-1 §4): cuando lo que se declara es un
   compromiso medible —no una pista— el gris no basta. Rojo, con ícono. */
.ib-field-warn {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 14px; line-height: 1.4; color: var(--ib-danger, #dc2626);
}
.ib-field-warn > i, .ib-field-warn > svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.ib-field-warn strong { font-weight: 700; }

/* Utilidades mínimas de separación, para no volver a poner style= en la vista. */
.ib-stack   { display: flex; flex-direction: column; gap: 14px; }
.ib-mt-lg   { margin-top: 22px; }
.ib-mb-md   { margin-bottom: 16px; }
.ib-hidden  { display: none !important; }
.ib-subhead { font-size: 15px; font-weight: 600; margin: 0 0 10px; }

/* Cabecera de página — métricas EXACTAS de Mi cuenta (.pa-header) y
   Configuración (.ps-header), que las duplicaban en local. Canónica para
   que toda página del panel titule IGUAL; pa/ps migrarán al tocarlas. */
.ib-page-head { margin-bottom: 18px; }
.ib-page-head h1 { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -0.4px; }
.ib-page-head p { margin: 4px 0 0; font-size: 14px; color: var(--ib-muted, #4b5563); }

/* Error de campo — modo APP: el campo se marca y el aviso corto vive
   DEBAJO del campo (como una app nativa), nunca en un toast largo. */
.ib-input--error, .ib-select--error { border-color: var(--ib-danger, #dc2626) !important; }
.ib-field-error { font-size: 13px; color: var(--ib-danger, #dc2626); }

/* Botón cuadrado de icono — los "+" y "×" de filas dinámicas. */
.ib-btn--icon { width: 44px; padding: 0; justify-content: center; font-size: 18px; line-height: 1; flex-shrink: 0; }

/* Fila dinámica día + horas + botón (horario de atención y de apertura). */
.ib-sched-row { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 10px; align-items: center; }

/* Tarjeta de entidad repetible (zonas de entrega) y sus grids internos. */
.ib-entity-card {
    background: var(--ib-bg-soft, #f6f7f9);
    border: 1px solid var(--ib-border-soft, rgba(0,0,0,0.06));
    border-radius: 14px; padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.ib-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ib-grid-main-btn { display: grid; grid-template-columns: 1fr 44px; gap: 10px; align-items: end; }

/* input-group con el sistema nuevo (prefijo $ / sufijo kg). */
.input-group .ib-input:last-child { border-radius: 0 12px 12px 0; }
.input-group .ib-input:not(:last-child) { border-radius: 12px 0 0 12px; border-right: none; }
.input-group .ib-input:only-child { border-radius: 12px; border-right: 1px solid var(--ib-border, #d7dce3); }
.input-group-suffix {
    padding: 0 12px; background: var(--ib-bg-soft, #f6f7f9);
    border: 1px solid var(--ib-border, #d7dce3); border-left: none;
    border-radius: 0 12px 12px 0; display: flex; align-items: center;
    font-size: 13px; color: var(--ib-muted, #4b5563); flex-shrink: 0;
}
.ib-input[readonly] { background: var(--ib-bg-soft, #f6f7f9); cursor: not-allowed; }

/* Selector de logo (cuadrado punteado con preview). */
.ib-logo-pick {
    width: 150px; height: 150px;
    border: 2px dashed var(--ib-border, #d7dce3); border-radius: 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; cursor: pointer; overflow: hidden; position: relative;
    color: var(--ib-muted, #4b5563); font-size: 13px;
}
.ib-logo-pick img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* Grupo de checkboxes en flujo (categorías, etc.). */
.ib-checks { display: flex; flex-wrap: wrap; gap: 10px; }

/* ═══ Tarjeta de sección estilo APP — patrón de Mi cuenta (.pa-card)
   promovido a canónico: escritorio = card blanca con cabecera de icono;
   MÓVIL = bloque PLANO a sangre completa separado por banda suave (modo
   app). Un solo nivel de borde: dentro, sub-bloques planos/bg-soft. */
.ib-card {
    background: #fff; border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px; padding: 20px 22px;
}
.ib-card + .ib-card { margin-top: 18px; }
.ib-card-head {
    display: flex; align-items: flex-start; gap: 12px;
    padding-bottom: 14px; margin-bottom: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.ib-card-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: var(--ib-bg-soft, #f6f7f9); color: var(--ib-muted, #4b5563);
}
.ib-card-icon i, .ib-card-icon svg { width: 20px; height: 20px; }
.ib-card-title { min-width: 0; flex: 1; }
.ib-card-title h2 {
    margin: 0; font-size: 16px; font-weight: 700;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    color: var(--ib-text, #111827);
}
.ib-card-title p { margin: 4px 0 0; font-size: 14px; color: var(--ib-muted, #4b5563); line-height: 1.45; }
@media (max-width: 768px) {
    .ib-card {
        border: 0; border-radius: 0; margin: 0 -12px;
        padding: 18px 16px;
        border-bottom: 8px solid var(--ib-bg-soft, #f6f7f9);
    }
    .ib-card + .ib-card { margin-top: 0; }
}

/* ═══ Formulario en vista del shell — patrón CANÓNICO promovido desde el
   form de promociones (.promo-form): en escritorio la columna se CENTRA
   con ancho contenido (no se estira a todo el ancho, que es ilegible);
   en móvil ocupa la pantalla. --wide para secciones con tablas o mapas. */
.ib-form {
    max-width: 560px; margin: 0 auto; padding: 8px 16px 40px;
    /* width 100%: dentro del host flex del shell, margin:auto haría
       shrink-to-fit y un bloque con poco contenido (solo el pie) se
       encogería en vez de ocupar la columna. */
    width: 100%; box-sizing: border-box;
}
.ib-form--wide { max-width: 760px; }
.ib-form-foot { display: flex; gap: 10px; margin-top: 20px; }
.ib-form-foot > .ib-btn--primary { flex: 1; justify-content: center; }
@media (max-width: 768px) {
    /* Los pares de campos (.ib-grid-2) se apilan en móvil, como el patrón
       de promociones — dos columnas en 375px quedan asfixiadas. */
    .ib-grid-2 { grid-template-columns: 1fr; }
    /* Cards dentro de un form del shell: a sangre completa contra el
       padding lateral de 16px del .ib-form (el -12px genérico del .ib-card
       está calibrado para el padding de 12px de la página normal). */
    .ib-form .ib-card { margin-left: -16px; margin-right: -16px; }
}

/* ══ Medios — sistema de diseño (owner 2026-08-03) ══
   Tabs = pills ib-btn; galería tipo app (tiles cuadrados); ficha del archivo
   = vista del shell 'mediafile' (nunca panel lateral bajo el footerbar). */
.media-page { display: flex; flex-direction: column; gap: 16px; }
.media-tabs { display: flex; gap: 8px; flex-wrap: wrap; }

.media-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.media-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.media-pane { display: none; }
.media-pane.active { display: block; }

.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.media-card {
    border: 1px solid var(--ib-border, rgba(0,0,0,0.1));
    background: #fff; border-radius: 14px;
    overflow: hidden; cursor: pointer; padding: 0;
    text-align: left; font-family: inherit;
    transition: border-color 0.15s;
}
.media-card:hover { border-color: var(--ib-text, #111827); }
.media-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--ib-bg-soft, #f6f7f9);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-play-badge {
    position: absolute; inset: 0; pointer-events: none;
    display: flex; align-items: center; justify-content: center;
}
.media-play-badge span {
    width: 40px; height: 40px; border-radius: 999px;
    background: rgba(17,24,39,0.65);
    display: flex; align-items: center; justify-content: center;
}
.media-play-badge i { width: 18px; height: 18px; color: #fff; }
.media-file-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: var(--ib-muted, #4b5563);
}
.media-file-icon i { width: 24px; height: 24px; }
.media-card-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.media-card-name {
    font-weight: 600; font-size: 14px; color: var(--ib-text, #111827);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-card-sub {
    display: flex; gap: 6px; color: var(--ib-muted, #4b5563); font-size: 13px;
    white-space: nowrap; overflow: hidden;
}
/* Fantasma de la galería */
.media-skel-tile { display: block; aspect-ratio: 1 / 1; border-radius: 14px; }

.media-upload { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.media-upload-card {
    background: #fff;
    border: 1px solid var(--ib-border, rgba(0,0,0,0.1));
    border-radius: 14px; padding: 18px;
}
.media-card-title { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: var(--ib-text, #111827); }

.media-upload-dropzone {
    border: 2px dashed var(--ib-border, rgba(0,0,0,0.2));
    border-radius: 14px; padding: 26px 18px;
    text-align: center; cursor: pointer; background: #fff;
    transition: background 0.15s, border-color 0.15s;
}
.media-upload-dropzone:hover, .media-upload-dropzone.drag {
    background: var(--ib-bg-soft, #f6f7f9);
    border-color: var(--ib-text, #111827);
}
.media-upload-dropzone i { width: 28px; height: 28px; margin-bottom: 10px; color: var(--ib-muted, #4b5563); }
.media-upload-dropzone h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--ib-text, #111827); }
.media-upload-dropzone p { margin: 0 0 10px; color: var(--ib-muted, #4b5563); font-size: 14px; }
.media-upload-hint { color: var(--ib-muted, #4b5563); font-size: 13px; }

.media-upload-list { margin-top: 14px; display: flex; flex-direction: column; }
.media-upload-item {
    display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
    align-items: center; padding: 10px 12px; border-radius: 10px;
}
.media-upload-item:nth-child(odd) { background: var(--ib-bg-soft, #f6f7f9); }
.media-upload-item.error { background: rgba(220,38,38,0.06); }
.media-upload-item.error .media-upload-type { color: #dc2626; font-weight: 600; }
.media-upload-name {
    font-weight: 600; color: var(--ib-text, #111827); font-size: 14px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.media-upload-type, .media-upload-size { color: var(--ib-muted, #4b5563); font-size: 13px; }
.media-upload-actions { margin-top: 14px; display: flex; gap: 10px; align-items: center; justify-content: flex-end; }

.media-guidelines { margin: 0; padding-left: 18px; color: var(--ib-muted, #4b5563); font-size: 14px; display: flex; flex-direction: column; gap: 8px; }

/* ── Ficha del archivo — vista del SHELL 'mediafile' (atrás la cierra;
   sin bordes anidados: preview y bandas planas) ── */
.gshell-view.gshell-view--mediafile { display: block; overflow-y: auto; padding: 24px 16px; }
.media-editor { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.media-editor-preview { border-radius: 14px; overflow: hidden; background: var(--ib-bg-soft, #f6f7f9); }
.media-editor-image { width: 100%; max-height: 340px; object-fit: contain; display: block; }
.media-editor-video { width: 100%; max-height: 340px; display: block; background: #000; }
.media-editor-nonimage {
    padding: 32px; display: flex; flex-direction: column; gap: 10px;
    align-items: center; justify-content: center;
    color: var(--ib-muted, #4b5563); font-size: 14px;
}
.media-editor-nonimage i { width: 30px; height: 30px; }
.media-editor-title { font-weight: 700; font-size: 15px; color: var(--ib-text, #111827); margin: 0 0 10px; }
.media-kv { display: flex; flex-direction: column; }
.media-kv-row {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 9px 10px; border-radius: 8px;
    color: var(--ib-muted, #4b5563); font-size: 14px;
}
.media-kv-row:nth-child(odd) { background: var(--ib-bg-soft, #f6f7f9); }
.media-kv-row span:last-child { color: var(--ib-text, #111827); font-weight: 600; text-align: right; word-break: break-word; }
.media-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.media-field label { font-size: 14px; font-weight: 600; color: var(--ib-text, #111827); }
.media-field input, .media-field textarea {
    padding: 10px 12px;
    border: 1px solid var(--ib-border, rgba(0,0,0,0.12));
    border-radius: 10px; font-size: 14px; font-family: inherit;
    color: var(--ib-text, #111827); background: #fff;
}
.media-field input:focus, .media-field textarea:focus { outline: none; border-color: var(--ib-text, #111827); }
.media-url-row { display: flex; gap: 8px; align-items: center; }
.media-url-row input { flex: 1; min-width: 0; }
.media-editor-footer { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-bottom: 8px; }

@media (max-width: 1200px) {
    .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .media-upload { grid-template-columns: 1fr; }
}

/* MÓVIL = APP: galería 2 columnas compacta, secciones planas a sangre
   completa con banda, botones a lo ancho. */
@media (max-width: 768px) {
    .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    /* Buscador + Tipo en UNA línea (owner 2026-08-03): el buscador cede
       ancho, el select mantiene el suyo a la derecha. */
    .media-toolbar { flex-wrap: nowrap; }
    .media-toolbar .ib-search { min-width: 0; }
    .media-filters { flex: 0 0 auto; }
    .media-upload { gap: 0; }
    .media-upload-card {
        border: 0; border-radius: 0; margin: 0 -12px;
        padding: 18px 16px;
        border-bottom: 8px solid var(--ib-bg-soft, #f6f7f9);
    }
    .media-upload-actions .ib-btn { flex: 1; }
    .media-editor-footer .ib-btn { flex: 1; }
    .gshell-view.gshell-view--mediafile { padding: 52px 12px 12px; }
}

/* ══════════════════════════════════════════════════════════════
   Media Picker Modal (global)
   ══════════════════════════════════════════════════════════════ */
.media-picker-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000;
}
/* Pantalla completa con X arriba a la derecha (owner 2026-08-01). */
.media-picker-modal {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    background: white; z-index: 10001;
    display: flex; flex-direction: column;
}
.media-picker-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--card-border);
}
.media-picker-header h2 { margin: 0; font-size: 16px; font-weight: 600; }
.media-picker-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px; border-bottom: 1px solid var(--card-border); gap: 12px;
}
/* Botones del picker: canónicos .ib-btn en el markup (D-DESIGN-2). */
.media-picker-body {
    flex: 1; overflow-y: auto; padding: 16px 20px;
}
.media-picker-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px;
}
.media-picker-item {
    position: relative; border: 2px solid transparent; border-radius: 10px;
    overflow: hidden; cursor: pointer; transition: all 0.15s; background: #f9fafb;
    aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.media-picker-item:hover { border-color: #b9c0c9; }
.media-picker-item.selected { border-color: var(--ib-text, #111827); }
.media-picker-item.selected::after {
    content: '✓'; position: absolute; top: 6px; right: 6px;
    width: 22px; height: 22px; background: var(--ib-text, #111827); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.media-picker-item img {
    width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0;
}
/* Vídeo: su primer fotograma con el símbolo de reproducir; y en fotos y
   vídeos, el botón «Ver en grande» siempre visible (sin hover: RSD). */
.media-picker-item video {
    width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0;
    background: #111827; pointer-events: none;
}
.media-picker-item .picker-video-badge {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(0,0,0,0.55); color: #fff;
    display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.media-picker-item .picker-video-badge svg { width: 20px; height: 20px; }
.media-picker-item .picker-zoom {
    position: absolute; top: 6px; left: 6px; z-index: 1;
    width: 36px; height: 36px; padding: 0; border: none; border-radius: 50%;
    background: rgba(0,0,0,0.55); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.media-picker-item .picker-zoom svg { width: 18px; height: 18px; }
.media-picker-item .picker-file-icon {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    color: var(--text-muted); font-size: 11px; text-align: center; padding: 8px;
}
.media-picker-item .picker-file-name {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 4px 6px;
    background: rgba(0,0,0,0.6); color: white; font-size: 10px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-picker-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px; border-top: 1px solid var(--card-border);
}
.media-picker-selected-count { font-size: 13px; color: var(--text-muted); }
.media-picker-footer-actions { display: flex; gap: 8px; }
.media-picker-loading {
    grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--text-muted); font-size: 14px;
}
.media-picker-empty {
    grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════
   Denunciar (public/core/js/report-modal.js) — dentro de LA HOJA (ibSheet):
   un solo diseño en móvil y escritorio, sin SweetAlert (owner 2026-10-01).
   Filas planas a sangre, lo elegido con peso e icono relleno (RSD).
   ══════════════════════════════════════════════════════════════ */
.irp { display: flex; flex-direction: column; padding: 0 16px 16px; }
.irp-intro { margin: 0 0 8px; font-size: 15px; color: var(--ib-muted, #4b5563); }
.irp-reasons { display: flex; flex-direction: column; margin: 0 -16px 16px; }
.irp-reason {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 12px 16px; border: none; background: none; cursor: pointer;
    border-bottom: 1px solid var(--ib-border-soft, rgba(0,0,0,0.06));
    font-family: inherit; text-align: left; color: var(--ib-text, #111827);
}
.irp-reason:last-child { border-bottom: none; }
.irp-dot {
    flex: none; width: 24px; height: 24px; border-radius: 50%; box-sizing: border-box;
    border: 2px solid var(--ib-border, rgba(0,0,0,0.25));
    display: flex; align-items: center; justify-content: center;
}
.irp-dot svg { width: 14px; height: 14px; }
.irp-reason.is-on .irp-dot { background: var(--ib-text, #111827); border-color: var(--ib-text, #111827); color: #fff; }
.irp-reason-label { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; line-height: 1.35; }
.irp-reason.is-on .irp-reason-label { font-weight: 800; }
.irp-label { font-size: 15px; font-weight: 700; color: var(--ib-text, #111827); margin: 0 0 8px; }
.irp-textarea {
    width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 14px;
    border: 1px solid var(--ib-border, rgba(0,0,0,0.12)); background: var(--ib-bg, #fff);
    font-size: 15px; font-family: inherit; color: var(--ib-text, #111827);
    outline: none; resize: vertical; min-height: 84px;
}
.irp-textarea:focus { border-color: var(--ib-text, #111827); }
.irp-note { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--ib-muted, #4b5563); }
.irp-error { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: #b91c1c; }
.irp-error[hidden] { display: none; }
.irp-send { width: 100%; margin-top: 16px; justify-content: center; }
.irp-send:disabled { opacity: 0.45; cursor: default; }

/* ── Snackbar estilo APP (canónico, owner 2026-08-01): notificación efímera
   tipo "Añadido al carrito". La pinta window.ibToast (dashboard_layout).
   OJO: se llama .ib-snack porque .ib-toast ya es del sistema de
   NOTIFICACIONES (notifications.css) — otro componente. ── */
.ib-snack {
    position: fixed; left: 50%; bottom: 24px;
    transform: translate(-50%, 14px);
    display: flex; align-items: center; gap: 10px;
    background: var(--ib-text, #111827); color: #fff;
    /* Rect redondeado (no pastilla): con texto multilínea la pastilla se
       deformaba en un óvalo ilegible. */
    border-radius: 14px; padding: 12px 18px;
    font-size: 14px; font-weight: 600;
    text-align: left; line-height: 1.45;
    box-shadow: 0 12px 32px -8px rgba(0,0,0,0.4);
    z-index: 20000; opacity: 0; pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    max-width: min(92vw, 420px);
}
.ib-snack.is-in { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ib-snack .ib-snack-ic { width: 18px; height: 18px; flex-shrink: 0; color: #4ade80; } /* verde SEMÁNTICO de éxito (D-DESIGN-5) */
.ib-snack--error .ib-snack-ic { color: #f87171; } /* rojo semántico de error */
.ib-snack-act {
    border: none; background: none; color: #fff; cursor: pointer;
    font-size: 14px; font-weight: 700; font-family: inherit;
    padding: 4px 2px 4px 6px; text-decoration: underline; text-underline-offset: 3px;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    /* Sube por encima del footerbar móvil (+ safe area). */
    .ib-snack { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* SweetAlert siempre encima del media picker */
.swal2-container { z-index: 20000 !important; }

/* ── Media Picker Info Tooltip (JS-driven) ── */
.media-picker-tooltip {
    position: fixed; z-index: 20000; pointer-events: none;
    background: #1f2937; color: #fff; padding: 10px 14px; border-radius: 10px;
    font-size: 12px; line-height: 1.6; max-width: 280px; width: max-content;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.media-picker-tooltip .tip-name { font-weight: 600; margin-bottom: 4px; word-break: break-word; }
.media-picker-tooltip .tip-meta { color: #9ca3af; font-size: 11px; }
.media-picker-tooltip .tip-meta span { display: inline-block; }
.media-picker-tooltip .tip-meta span + span::before { content: ' · '; }

/* ═══════════════════════════════════════════════════════════════════════
   CHIPS/TABS PÍLDORA — componente GLOBAL reutilizable (antes vivía en
   feed_base; ahora lo comparten el selector de algoritmo del feed y los
   chips de categorías de la vitrina de marketplace). El LOOK viene del
   botón canónico .ib-btn (D-DESIGN-2, activo = negro) — aquí SOLO layout
   del contenedor y el scroll móvil; .feed-algo-tab queda como hook. ═══ */
.feed-algo-tabs {
    display: flex; gap: 6px; flex-wrap: wrap;
}
/* En móvil scrollean en horizontal (patrón X) en vez de ensanchar la página. */
@media (max-width: 768px) {
    .feed-algo-tabs {
        flex-wrap: nowrap;
        overflow-x: auto; scrollbar-width: none;
        margin: 0 -12px; padding: 0 12px;
    }
    .feed-algo-tabs::-webkit-scrollbar { display: none; }
    .feed-algo-tab { flex: 0 0 auto; white-space: nowrap; }
}

/* ═══════════════════════════════════════════════════════════════════════
   FILA DE «A QUIÉN SEGUIR» — UNA sola definición para las DOS superficies
   que la usan: el riel derecho del feed (`.fx-follow*`,
   `app/Modules/Core/Templates/admin/feeds/_feed_rail_right.twig`) y las
   listas de seguidores/seguidos del muro del usuario (`.wf-following-*`,
   `app/Modules/Core/Templates/admin/users/user_wall.twig`).

   POR QUÉ ESTÁ AQUÍ: vivía COPIADA BYTE A BYTE en `public/core/css/feed.css`
   y en el bloque de estilos de `user_wall.twig` — la cara redonda de 40 con
   la inicial sobre fondo oscuro era la pareja de 56 tokens que el comprobador
   de duplicados contaba como copia NUEVA (2874 contra 2873). `dashboard.css`
   la cargan las dos pantallas (`layouts/dashboard_layout.twig:34`), así que
   una sola definición sirve a ambas. Los NOMBRES de clase se conservan —los
   usan el marcado y el JS de cada pantalla—: lo que se unifica es la
   DEFINICIÓN, no la nomenclatura.

   ESTRUCTURA DE LA FILA (cambiada el 2026-09-16 con esta misma unificación):
   la fila es un CONTENEDOR con dos hijos HERMANOS —el enlace (cara + texto) y
   el botón—, no un enlace con un botón dentro. El botón es un `<button>` de
   verdad: antes era un `<span role="button">` metido dentro del `<a>`, que es
   un enlace dentro de un enlace.
   ═══════════════════════════════════════════════════════════════════════ */
.fx-follow, .wf-following-card {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 0;
    background: none; border: 0; border-radius: 0;
    color: inherit;
}
/* El enlace: se lleva la cara y el texto, crece con la fila y puede encoger
   (`min-width: 0`) para que el nombre se recorte con puntos suspensivos. */
.fx-follow-link, .wf-following-link {
    display: flex; align-items: center; gap: 11px;
    flex: 1 1 auto; min-width: 0;
    text-decoration: none; color: inherit;
}
/* La cara CON FOTO: sin fondo oscuro a propósito — un logo con transparencia
   se pintaba sobre negro. */
img.fx-follow-ava, img.wf-following-avatar {
    width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
    object-fit: cover; background: var(--ib-bg, #fff); display: block;
}
/* La INICIAL, solo cuando no hay foto ni logo: ahí el fondo sí hace falta. */
span.fx-follow-ava, span.wf-following-avatar {
    width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
    background: var(--ib-text, #111827); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700;
}
.fx-follow-txt, .wf-following-info { display: flex; flex-direction: column; min-width: 0; }
.fx-follow-txt b, .wf-following-name {
    font-size: 15px; font-weight: 700; color: var(--ib-text, #111827);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* EL DATO DE DEBAJO A 14px (owner 2026-09-16): estaba a 13 en las dos copias
   y D-DESIGN-2 pide ≥14 con buen contraste. */
.fx-follow-txt small, .wf-following-subtitle, .wf-following-bio {
    font-size: 14px; color: var(--ib-muted, #4b5563);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* EL BOTÓN, CLAVADO AL FINAL DE LA FILA. Su caja (40px, 44 en móvil) la da el
   canónico `.ib-btn`; aquí solo que NO encoja (`flex: 0 0 auto`: sin ella el
   navegador le quita ancho a él cuando el nombre es largo) y que se vaya al
   borde derecho. */
.fx-follow-btn, .wf-following-btn { margin-left: auto; flex: 0 0 auto; }

/* ═══════════════════════════════════════════════════════════════════════
   L4 (D-LAUNCH-4) — MÓVIL = APP DE RED SOCIAL (estilo X/Instagram).
   El chrome móvil (topbar mínima + tabs de feeds + bottom bar + drawer)
   vive en partials/mobile_nav.twig, que además ajusta los paddings de
   .dashboard-main bajo su propio header. Aquí solo el esqueleto:
   sidebar de módulo oculto (la nav del vendedor móvil llega en su pasada)
   y paddings laterales del contenido.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Guard: NINGÚN elemento puede romper el marco horizontal de la "app".
       overflow-x clip (no hidden): no crea scroll-container ⇒ los sticky
       internos siguen funcionando. */
    html, body { overflow-x: clip; }
    .dashboard-main { min-width: 0; }
    .dashboard-main,
    .no-module-sidebar .dashboard-main {
        padding: 64px 12px 90px 12px;
    }
    .has-module-sidebar .dashboard-main {
        margin-left: 0;
        padding: 64px 12px 90px 12px;
    }
    .dashboard-sidebar { display: none; }
    .dashboard-header { margin-top: 8px; margin-bottom: 20px; }
    .dashboard-header h1 { font-size: 26px; letter-spacing: -0.5px; }
}

/* ═══ [D-CHAT-30b] Punto de estado de conexión PROPIO (avatar del menú) ═══
   El contenedor pasa a overflow visible (el recorte circular lo hace el
   border-radius del img) para que el punto asome en la esquina. */
.user-avatar { position: relative; overflow: visible; }
.user-avatar img { border-radius: 50%; }
.ib-pres-self {
    position: absolute; right: -2px; bottom: -2px;
    width: 11px; height: 11px; border-radius: 50%;
    border: 2px solid #fff; background: #9ca3af;
    display: inline-block;
}
.ib-pres-self--online { background: #22c55e; }
.ib-pres-self--away { background: #f59e0b; }
.ib-pres-self--offline { background: #9ca3af; }

/* ═══ Tablas CANÓNICAS + responsive móvil (regla de plataforma, owner
   2026-08-03) ═══
   .ib-table            → look único de tabla (th muted, td 14px, tokens).
   .ib-table--stack     → en móvil cada FILA se convierte en tarjeta apilada
                          estilo app y cada celda muestra su cabecera vía
                          data-th="Etiqueta" (las tablas comprimidas no se
                          leen en 390px). Celdas SIN data-th (bloques ricos
                          como la tienda, o filas de acciones) ocupan el
                          ancho completo alineadas a la izquierda. */
.ib-table { width: 100%; border-collapse: collapse; }
.ib-table th {
    text-align: left; font-size: 14px; color: var(--ib-muted, #4b5563);
    font-weight: 600; padding: 10px 12px;
    border-bottom: 1px solid var(--ib-border-soft, rgba(0,0,0,0.06));
}
.ib-table td {
    padding: 12px; font-size: 14px; color: var(--ib-text, #111827);
    border-bottom: 1px solid var(--ib-bg-soft, #f6f7f9);
    vertical-align: middle;
}
@media (max-width: 768px) {
    /* Estilo APP (red social): cada fila es un BLOQUE PLANO separado por una
       banda suave — NUNCA una tarjeta con borde dentro de otra tarjeta con
       borde (regla del owner 2026-08-03: bordes anidados = horrible). El
       borde/tarjeta lo pone el CONTENEDOR de la vista, no las filas. La
       primera celda hace de cabecera del bloque; las acciones van a lo ancho. */
    .ib-table--stack { display: block; border: 0; }
    .ib-table--stack thead { display: none; }
    .ib-table--stack tbody { display: block; }
    .ib-table--stack tr { display: block; padding: 4px 0 12px; }
    .ib-table--stack tbody tr + tr {
        border-top: 6px solid var(--ib-bg-soft, #f6f7f9);
        padding-top: 12px; margin-top: 4px;
    }
    .ib-table--stack td {
        display: flex; justify-content: space-between; align-items: center;
        gap: 14px; padding: 11px 0; text-align: right;
        border-bottom: 1px solid var(--ib-bg-soft, #f6f7f9);
    }
    .ib-table--stack tr td:last-child { border-bottom: 0; }
    .ib-table--stack td::before {
        content: attr(data-th);
        font-weight: 600; color: var(--ib-muted, #4b5563);
        text-align: left; flex-shrink: 0;
    }
    /* Celdas SIN etiqueta: la primera es la CABECERA del bloque (título
       protagonista); las de acciones reparten sus botones a lo ancho. */
    .ib-table--stack td:not([data-th]) { display: block; text-align: left; }
    .ib-table--stack td:not([data-th])::before { content: none; }
    .ib-table--stack td:first-child:not([data-th]) { font-size: 15px; }
    /* Solo botones HIJOS DIRECTOS del td se apilan a lo ancho; dentro de una
       fila flex (boton + kebab) el margen romperia la alineacion vertical. */
    .ib-table--stack td:not([data-th]) > .ib-btn { width: 100%; margin-bottom: 8px; box-sizing: border-box; }
    .ib-table--stack td:not([data-th]) > .ib-btn:last-child { margin-bottom: 0; }
}

/* ── .ib-table--kv (owner 2026-08-10): lista CLAVE → VALOR de 2 columnas.
   Para estas, --stack repetía "Concepto/Regla" en cada fila (3 veces lo
   mismo) — aquí cada fila ES etiqueta | valor, en móvil y escritorio:
   etiqueta muted a la izquierda, valor 600 a la derecha, sin cabeceras. ── */
.ib-table--kv thead { display: none; }
.ib-table--kv td:first-child { color: var(--ib-muted, #4b5563); font-weight: 500; }
.ib-table--kv td:last-child { text-align: right; font-weight: 600; }

/* ═══ Menú de acciones CANÓNICO (kebab ⋮) → ACTION SHEET en móvil (regla de
   plataforma, owner 2026-08-03; app-first pensando en React Strict DOM:
   web móvil = futura app nativa). Un dropdown pegado al dedo queda bajo el
   footerbar y se siente web — en móvil el menú sube desde ABAJO con
   backdrop, asa y áreas táctiles grandes. Markup: contenedor .ib-menu
   (+ .open) > trigger + .ib-menu-list > .ib-menu-item. En escritorio cada
   vista conserva su dropdown. ═══ */
@media (max-width: 768px) {
    .ib-menu.open::before {
        content: ""; position: fixed; inset: 0;
        background: rgba(17, 24, 39, 0.45); z-index: 1600;
    }
    .ib-menu.open .ib-menu-list {
        display: block;
        position: fixed; left: 0; right: 0; bottom: 0; top: auto;
        z-index: 1601;
        border: 0; border-radius: 18px 18px 0 0;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
        padding: 8px 16px calc(14px + env(safe-area-inset-bottom, 0px));
        background: #fff; min-width: 0; max-height: 70vh; overflow-y: auto;
    }
    /* Asa del sheet (affordance de arrastre, patrón nativo). */
    .ib-menu.open .ib-menu-list::before {
        content: ""; display: block; width: 44px; height: 5px;
        border-radius: 999px; background: var(--ib-border, rgba(0,0,0,0.12));
        margin: 4px auto 12px;
    }
    .ib-menu .ib-menu-item { padding: 15px 6px; font-size: 15px; border-radius: 10px; }
}

/* El aspecto del diálogo canónico `ibConfirm` (`.ib-confirm*` y la variante
   `.ib-btn--danger-solid`) se mudó el 2026-09-13 a
   `public/core/css/ib-confirm.css`, cargado justo antes que este fichero.
   Mismo motivo que los tokens y la botonera de arriba: el panel de la
   plataforma necesitaba el diálogo y una copia habría sido la segunda. */

/* ═══ Botón "volver" canónico (owner 2026-08-03) ═══
   UN solo estilo de volver en toda la plataforma: enlace/botón discreto con
   flecha, texto ≥14px, muted→negro al hover. Usar SIEMPRE esta clase en vez
   de estilos por página (ps-back, pa-back… quedan derogados). */
.ib-back {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 600;
    color: var(--ib-muted, #4b5563);
    text-decoration: none; background: none; border: 0; padding: 0;
    cursor: pointer; margin-bottom: 16px;
    font-family: inherit;
}
.ib-back:hover { color: var(--ib-text, #111827); }
.ib-back i, .ib-back svg { width: 16px; height: 16px; }
/* El MISMO volver, solo con la flecha, para las cabeceras estrechas de los
   shells (buscador, publicar, muros, chat): 40 px de área para el dedo y la
   flecha a 20 px. Sustituye a los volver redondos que cada vista pintaba
   (owner 2026-10-02: «no podemos tener varios diseños»). */
.ib-back.ib-back--icono {
    width: 40px; height: 40px; flex: none; justify-content: center;
    margin: 0 0 0 -8px; border-radius: 50%;
}
.ib-back.ib-back--icono i, .ib-back.ib-back--icono svg { width: 20px; height: 20px; }

/* ═══ Fantasma (skeleton) canónico ═══
   Bloque shimmer para TODA carga (regla de plataforma): dale tamaño con
   width/height inline o clases de la vista. */
@keyframes ib-skel { 0% { background-position: -450px 0; } 100% { background-position: 450px 0; } }
.ib-skel {
    background: linear-gradient(90deg, #eef0f3 8%, #f7f8fa 24%, #eef0f3 40%);
    background-size: 900px 100%;
    animation: ib-skel 1.2s linear infinite;
    border-radius: 8px;
}

/* ═══ Protección de contenido (owner 2026-08-03) ═══
   Imágenes y videos NO se descargan desde la web: sin arrastre, sin menú de
   long-press (iOS) y sin selección. El JS global (dashboard_layout) bloquea
   además el clic derecho sobre media. */
img, video {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

/* ══ Switch canónico (owner 2026-08-04) ══
   Toggle de ajustes estilo app: activo = NEGRO (paleta neutra). Markup:
   <label class="ib-switch"><input type="checkbox"><span class="ib-switch-slider"></span></label> */
.ib-switch {
    position: relative; display: inline-block;
    width: 44px; height: 24px; flex-shrink: 0;
}
.ib-switch input { opacity: 0; width: 0; height: 0; }
.ib-switch-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #d1d5db; border-radius: 999px;
    transition: background 0.2s;
}
.ib-switch-slider::before {
    content: ""; position: absolute;
    width: 18px; height: 18px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}
.ib-switch input:checked + .ib-switch-slider { background: var(--ib-text, #111827); }
.ib-switch input:checked + .ib-switch-slider::before { transform: translateX(20px); }
.ib-switch input:disabled + .ib-switch-slider { opacity: 0.5; cursor: not-allowed; }

/* ═══ Bloqueo canónico del fondo (owner 2026-08-04) ═══
   Con un drawer/panel abierto en móvil, el scroll interno NO debe arrastrar
   la página de atrás. overflow:hidden no basta en táctil: se congela el body
   con position:fixed conservando el punto de scroll (window.ibLockScroll /
   ibUnlockScroll en dashboard_layout — mismo patrón probado del shell). */
body.ib-scroll-lock {
    position: fixed; left: 0; right: 0; width: 100%;
    overflow: hidden;
}

/* ═══ INSIGNIA DE IDENTIDAD VERIFICADA — una sola definición para toda la casa
   (tanda 6A del árbol del muro, 2026-09-17, paso 4).
   Vivía dentro del `<style>` de `users/user_wall.twig` y solo la veía la
   cabecera del perfil. El owner pidió el check también JUNTO AL NOMBRE en la
   tarjeta del muro y del feed y en el post abierto, y el feed global no carga
   ese `<style>`: la regla se MUDA aquí, al chrome, en vez de escribirse una
   segunda vez. Color e icono no cambian (azul `#1d9bf0`, `badge-check`, el de
   D-DESIGN-5: «menciones azul #1d9bf0, a juego con el check verificado»).
   Sirve para los dos usos: en la cabecera del perfil es un hijo de una fila
   flex (20px) y junto a un nombre de 14-15px va en línea (16px) — de ahí el
   `vertical-align`, que un contenedor flex ignora. ═══ */
.wp-profile-verified {
    display: inline-flex; align-items: center;
    color: #1d9bf0; /* azul Twitter clásico */
    flex-shrink: 0;
    /* CENTRADA CON EL NOMBRE (fila F de la tanda 6B; dictado del owner del
       2026-09-17: «el ícono de verificado debe estar centrado verticalmente con
       el nombre de la tienda o usuario»). Era `text-bottom`, que pega el BORDE
       INFERIOR de la insignia al de la línea de texto y la deja caída; `middle`
       la centra contra la mitad del texto. En la cabecera del perfil y en el
       nombre del post abierto el centrado ya lo daba su fila flex
       (`align-items:center`) y esto no cambia nada allí: `vertical-align` no
       aplica a un hijo de flex. Donde sí cambia es en las CUATRO copias de la
       tarjeta, que la meten dentro del `<span>` del nombre. */
    vertical-align: middle;
    /* Se pulsa: abre la hoja que explica qué es (`ibHojaVerificado`,
       `feeds/_wf_autoplay.js.twig`). */
    cursor: pointer;
}

/* ═══ KPIs CANÓNICOS del panel (owner 2026-08-06, arranque marketplace app):
   tarjetas de métrica del "Panel de mi tienda", "Productos", etc. Pueden ser
   <a> (clicables) o <div>. Móvil = rejilla 2×2 estilo app. ═══ */
.ib-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ib-kpi {
    display: flex; flex-direction: column; gap: 8px;
    background: #fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 16px;
    padding: 16px 18px; text-decoration: none; color: inherit; min-width: 0;
}
.ib-kpi-label {
    display: flex; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 600; color: var(--ib-muted, #4b5563);
}
.ib-kpi-label i, .ib-kpi-label svg { width: 17px; height: 17px; flex-shrink: 0; }
.ib-kpi-value { font-size: 26px; font-weight: 700; color: var(--ib-text, #111827); line-height: 1.1; }
.ib-kpi-value small { font-size: 14px; font-weight: 600; color: var(--ib-muted, #4b5563); }
@media (max-width: 768px) {
    .ib-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
    .ib-kpi { padding: 14px; border-color: rgba(0,0,0,0.08); border-radius: 14px; }
    .ib-kpi-value { font-size: 22px; }
}

/* ═══ Chips de estado CANÓNICOS (owner 2026-08-06): neutros por defecto —
   el color SOLO cuando es semántico (--dark = requiere acción/nuevo,
   --warn = advertencia, --danger = crítico/agotado). ═══ */
.ib-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 13px; font-weight: 600; white-space: nowrap;
    background: var(--ib-bg-soft, #f6f7f9); color: var(--ib-muted, #4b5563);
}
.ib-chip--dark { background: var(--ib-text, #111827); color: #fff; }
.ib-chip--warn { background: #fef3c7; color: #92400e; }
.ib-chip--danger { background: #fee2e2; color: #b91c1c; }

/* ═══ Nota / banner informativo CANÓNICO (owner 2026-08-06): caja plana con
   ícono + texto. Neutra por defecto; color SOLO semántico (--warn aviso, --danger crítico). El ícono LÍDER es hijo directo
   (> i/> svg) para no teñir íconos dentro del texto. ═══ */
.ib-note {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--ib-bg-soft, #f6f7f9); border-radius: 12px;
    padding: 12px 14px; font-size: 14px; color: var(--ib-muted, #4b5563); line-height: 1.55;
}
.ib-note > i, .ib-note > svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--ib-muted, #4b5563); }
.ib-note strong { color: var(--ib-text, #111827); }
.ib-note a { color: var(--ib-text, #111827); text-decoration: underline; }
.ib-note--warn { background: #fef3c7; color: #92400e; }
.ib-note--warn > i, .ib-note--warn > svg, .ib-note--warn strong, .ib-note--warn a { color: #92400e; }
.ib-note--danger { background: #fee2e2; color: #b91c1c; }
.ib-note--danger > i, .ib-note--danger > svg, .ib-note--danger strong, .ib-note--danger a { color: #b91c1c; }

/* ═══ Barra "cambios sin guardar" CANÓNICA (owner 2026-08-06): fija abajo,
   fondo negro; en móvil sube sobre el footerbar (54px+safe). Para vistas con
   edición inline (inventario, productos…). Botones = .ib-btn con modificadores
   on-dark. ═══ */
.ib-savebar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    background: var(--ib-text, #111827); color: #fff;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
}
.ib-savebar[hidden] { display: none; }
.ib-savebar-txt { font-size: 14px; }
.ib-savebar-txt strong { font-weight: 700; }
.ib-savebar-acts { display: flex; gap: 10px; flex-shrink: 0; }
.ib-savebar .ib-savebar-ghost { background: transparent; border-color: rgba(255,255,255,0.35); color: #fff; }
.ib-savebar .ib-savebar-save { background: #fff; border-color: #fff; color: var(--ib-text, #111827); }
@media (max-width: 768px) { .ib-savebar { bottom: calc(54px + env(safe-area-inset-bottom, 0px)); } }


/* ═══ LISTA DE AJUSTES CANÓNICA (owner 2026-08-09, rediseño de "Mi tienda";
   owner 2026-08-10: métricas ALINEADAS con las filas de "Mi panel"
   (mkd-att-row/mkd-order-row) — ESE es el diseño modo APP de referencia).
   Patrón de pantalla de ajustes: cada fila resume su estado y abre una VISTA
   DEL SHELL. Escritorio = card blanca 16px con las filas dentro; móvil = a
   sangre completa SIN caja (como las secciones del panel), separadores
   hairline. Un solo nivel de borde, nunca tarjeta dentro de tarjeta. ═══ */
.ib-list { display: flex; flex-direction: column; background: #fff;
    border: 1px solid rgba(0,0,0,0.06); border-radius: 16px; padding: 6px 20px; }
.ib-list-row {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 12px 0; background: none; border: 0; text-align: left; cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-family: inherit; color: var(--ib-text, #111827);
    text-decoration: none;   /* la fila puede ser <a>: nunca subrayada */
}
.ib-list-row, .ib-list-row * { text-decoration: none; }
.ib-list-row:last-child { border-bottom: 0; }
.ib-list-row:hover .ib-list-ic, .ib-list-row:focus-visible .ib-list-ic {
    background: var(--ib-text, #111827); color: #fff; }
.ib-list-row[disabled] { cursor: default; opacity: .55; }
/* Chip de icono 34px como mkd-att-ico (lucide reemplaza el <i> por <svg>:
   el chip se logra con padding sobre el propio svg, sin wrapper). */
.ib-list-ic { width: 34px; height: 34px; padding: 8px; box-sizing: border-box;
    border-radius: 10px; flex-shrink: 0;
    background: var(--ib-bg-soft, #f6f7f9); color: var(--ib-text, #111827);
    transition: background .15s ease, color .15s ease; }
.ib-list-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ib-list-label { font-size: 14px; font-weight: 600; color: var(--ib-text, #111827); }
.ib-list-value { font-size: 13px; color: var(--ib-muted, #4b5563);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-list-go { width: 18px; height: 18px; flex-shrink: 0; color: var(--ib-muted, #4b5563); }
.ib-list-sep { padding: 14px 0 6px; font-size: 13px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em; color: var(--ib-muted, #4b5563); }

/* Fantasma de la lista: misma forma que la fila real (chip + dos líneas). */
.ib-list-skel { display: flex; align-items: center; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04); }
.ib-list-skel:last-child { border-bottom: 0; }
.ib-list-skel-ic { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; }
.ib-list-skel-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 7px; }
.ib-list-skel-l1 { height: 13px; width: 38%; border-radius: 7px; }
.ib-list-skel-l2 { height: 12px; width: 66%; border-radius: 6px; }

/* MÓVIL = APP (RSD): la lista va a sangre completa sin caja, igual que
   .mkd-section del panel (el content móvil deja 12px de padding lateral). */
@media (max-width: 768px) {
    .ib-list { border: 0; border-radius: 0; margin: 0 -12px; padding: 0 16px; }
}

/* ═══ MEGAMENU de escritorio (H-065 / D-MENU-1, owner 2026-08-10) ═══
   Un solo menú global: clic en el avatar del topbar (NUNCA hover) abre
   columnas por identidad. Sustituye a `.avatar-mega`. Solo flexbox — sin
   grid ni inline*, que no existen en RSD. El backdrop empieza BAJO la
   topbar para que el chrome siga legible mientras el menú está abierto. */
.ib-mm-backdrop {
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
    z-index: 9990; display: none;
}
.ib-mm-backdrop.is-open { display: block; }

.ib-mm {
    position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
    width: calc(100vw - 48px); max-width: 1180px;
    max-height: calc(100vh - 92px); overflow-y: auto;
    background: var(--ib-bg, #fff);
    border: 1px solid var(--ib-border, rgba(0,0,0,0.12));
    border-radius: 18px;
    box-shadow: 0 24px 60px -18px rgba(15, 23, 42, 0.42);
    z-index: 9991; display: none;
    padding: 22px 26px 0;
}
.ib-mm.is-open { display: block; }
/* Solo identidad personal (comprador sin tienda): panel compacto —
   personal (272) + invitación (320) + separaciones. */
.ib-mm--solo { max-width: 700px; }

.ib-mm-cols { display: flex; gap: 30px; align-items: flex-start; }
/* 272px: cabe un nombre real completo ("Juan García López") junto al
   enlace "Mi perfil" sin recortar. */
.ib-mm-col { flex: 0 0 272px; min-width: 0; }
.ib-mm-col--wide { flex: 1 1 auto; }
.ib-mm-col--invite { flex: 0 0 320px; border-left: 1px solid var(--ib-border-soft, rgba(0,0,0,0.06)); padding-left: 26px; }
.ib-mm-col + .ib-mm-col { border-left: 1px solid var(--ib-border-soft, rgba(0,0,0,0.06)); padding-left: 26px; }

/* Cabecera de la identidad */
.ib-mm-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--ib-border-soft, rgba(0,0,0,0.06)); margin-bottom: 14px; }
.ib-mm-ava { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--ib-bg-soft, #f6f7f9); border: 1px solid var(--ib-border, rgba(0,0,0,0.12)); box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.ib-mm-ava img { width: 100%; height: 100%; object-fit: cover; }
.ib-mm-ava-i { font-size: 16px; font-weight: 700; color: var(--ib-text-2, #1f2937); }
.ib-mm-head-tx { flex: 1; min-width: 0; }
.ib-mm-head-t { display: block; font-size: 15px; font-weight: 700; color: var(--ib-text, #111827); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-mm-head-s { display: block; font-size: 14px; color: var(--ib-muted, #4b5563); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Seguidores y Seguidos de la identidad personal (owner 2026-09-17). La
   tipografía es la de esta cabecera —no se copia `.ibm-drawer-stats` del
   drawer móvil—: número en negro y rótulo muted, 14px como el resto. */
.ib-mm-head-stats { display: flex; gap: 14px; margin-top: 4px; }
.ib-mm-head-stats a { font-size: 14px; color: var(--ib-muted, #4b5563); text-decoration: none; white-space: nowrap; }
.ib-mm-head-stats a:hover { color: var(--ib-text, #111827); }
.ib-mm-head-stats strong { color: var(--ib-text, #111827); font-weight: 700; }
/* El fantasma mientras llega el dato necesita caja propia: un `<strong>` es
   inline y el degradado no se vería. */
.ib-mm-head-stats strong.ib-skel { display: inline-block; min-width: 18px; color: transparent; }
.ib-mm-head-link { flex-shrink: 0; font-size: 14px; font-weight: 600; color: var(--ib-text-2, #1f2937); text-decoration: underline; text-underline-offset: 3px; }
.ib-mm-head-link:hover { color: var(--ib-text, #111827); }

/* Grupos: la columna de la tienda reparte sus grupos en dos sub-columnas */
.ib-mm-groups { display: flex; flex-wrap: wrap; gap: 0 26px; }
.ib-mm-colpart { min-width: 0; }
.ib-mm-colpart--1, .ib-mm-colpart--2 { flex: 1 1 220px; }
.ib-mm-colpart--full { flex: 1 1 100%; }
.ib-mm-col:not(.ib-mm-col--wide) .ib-mm-colpart { flex: 1 1 100%; }
.ib-mm-group { margin-bottom: 14px; }
.ib-mm-cap { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ib-muted, #4b5563); margin: 4px 0 8px; }
.ib-mm-items { display: flex; flex-direction: column; }

.ib-mm-item {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 10px; border-radius: 10px;
    font-size: 15px; color: var(--ib-text, #111827); text-decoration: none;
}
.ib-mm-item i, .ib-mm-item svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--ib-muted, #4b5563); }
/* Solo la ETIQUETA crece; el badge conserva su ancho (si no, el `span`
   genérico también lo estiraba y la píldora ocupaba media fila). */
.ib-mm-item > span:not(.ib-mm-badge) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-mm-item:hover { background: var(--ib-bg-soft, #f6f7f9); }
.ib-mm-item.is-current { background: var(--ib-bg-soft, #f6f7f9); font-weight: 700; }
.ib-mm-item.is-current i, .ib-mm-item.is-current svg { color: var(--ib-text, #111827); }
.ib-mm-item--danger, .ib-mm-item--danger i, .ib-mm-item--danger svg { color: var(--ib-danger, #dc2626); }
.ib-mm-item--danger:hover { background: #fef2f2; }

/* Badge de trabajo pendiente (pedidos nuevos, incidencias abiertas) */
.ib-mm-badge {
    flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 999px; background: var(--ib-text, #111827); color: #fff;
    font-size: 13px; font-weight: 700; line-height: 22px; text-align: center;
}
.ib-mm-badge--skel {
    background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%);
    background-size: 400% 100%; animation: ib-mm-sh 1.4s ease infinite;
    color: transparent; min-width: 22px;
}
@keyframes ib-mm-sh { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Invitación a los features que el usuario aún no tiene: tarjeta CENTRADA
   con la silueta del negocio y su llamada a la acción (owner 2026-08-12). */
.ib-mm-invite {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 10px; padding: 24px 20px; border-radius: 16px; text-decoration: none;
    background: var(--ib-bg-soft, #f6f7f9);
    border: 1px solid var(--ib-border-soft, rgba(0,0,0,0.06));
}
.ib-mm-invite + .ib-mm-invite { margin-top: 12px; }
.ib-mm-invite:hover { border-color: var(--ib-border, rgba(0,0,0,0.12)); }
.ib-mm-invite-ic {
    width: 64px; height: 64px; border-radius: 50%; background: var(--ib-bg, #fff);
    border: 1px solid var(--ib-border, rgba(0,0,0,0.12)); box-sizing: border-box;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ib-mm-invite-ic i, .ib-mm-invite-ic svg { width: 30px; height: 30px; color: var(--ib-text, #111827); stroke-width: 1.5; }
.ib-mm-invite-t { display: block; font-size: 16px; font-weight: 800; color: var(--ib-text, #111827); letter-spacing: -0.2px; }
.ib-mm-invite-d { display: block; font-size: 14px; color: var(--ib-muted, #4b5563); line-height: 1.4; max-width: 260px; }
.ib-mm-invite-cta { margin-top: 4px; pointer-events: none; }   /* la tarjeta entera es el enlace */

.ib-mm-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin-top: 6px; padding: 13px 0; border-top: 1px solid var(--ib-border-soft, rgba(0,0,0,0.06));
    font-size: 14px; color: var(--ib-muted, #4b5563);
}

/* El megamenu es de ESCRITORIO: en móvil manda el drawer de mobile_nav. */
@media (max-width: 768px) {
    .ib-mm, .ib-mm-backdrop { display: none !important; }
}
/* Pantallas medias: las sub-columnas de la tienda se apilan antes de apretar. */
@media (max-width: 1100px) {
    .ib-mm-cols { flex-wrap: wrap; }
    .ib-mm-col--invite { flex: 1 1 100%; border-left: 0; padding-left: 0; border-top: 1px solid var(--ib-border-soft, rgba(0,0,0,0.06)); padding-top: 14px; }
}

/* ══════════════════════════════════════════════════════════════════════
   D-DESIGN-9 · TIRA HORIZONTAL DESPLAZABLE — la ÚNICA de la casa.
   Móvil: se arrastra con el dedo y SIN barra de desplazamiento visible
   (modo app / RSD). Escritorio: flechas a los lados, y solo si el
   contenido no cabe (`.no-nav` la esconde sola, la pone ibStripSync).
   Vive aquí —en el chrome— y no dentro de una vista, porque la mecánica
   ya estaba escrita dos veces dentro de vistas concretas y desde el
   layout no se podían llamar. Su gesto: window.ibStripScroll (dashboard_layout).
   ══════════════════════════════════════════════════════════════════════ */
.ib-strip { position: relative; display: flex; align-items: center; min-width: 0; flex: 1 1 auto; }
.ib-strip-rail {
    display: flex; align-items: center; min-width: 0; flex: 1 1 auto;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
    scroll-behavior: smooth;
}
.ib-strip-rail::-webkit-scrollbar { display: none; }
.ib-strip-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px; border-radius: 50%;
    background: #fff; border: 1px solid var(--ib-border, #e6e8ef);
    box-shadow: 0 2px 8px rgba(15,23,42,.16);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 2; padding: 0;
    color: var(--ib-text, #111827); transition: .14s;
}
.ib-strip-nav i, .ib-strip-nav svg { width: 18px; height: 18px; }
.ib-strip-nav.prev { left: -6px; }
.ib-strip-nav.next { right: -6px; }
.ib-strip-nav:hover { background: var(--ib-bg-soft, #f6f7f9); }
.ib-strip.no-nav .ib-strip-nav { display: none; }
/* En el móvil manda el dedo: las flechas no existen (nada de responsive de
   escritorio dentro de la app). */
@media (max-width: 768px) { .ib-strip-nav { display: none !important; } }
