/* ============================================================
   Category Layout Builder — Panel Admin Styles
   ============================================================ */

.loq-cat-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 30px;
    align-items: start;
}

/* Sidebar */
.loq-cat-nav {
    border-right: 1px solid #eef2f6;
    padding-right: 20px;
    position: sticky;
    top: 120px;
}

.loq-cat-item {
    padding: 18px;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loq-cat-item:hover {
    border-color: #5a37e5;
    transform: translateX(4px);
}

.loq-cat-item.is-active {
    border-color: #5a37e5;
    background: #f5f3ff;
    box-shadow: 0 10px 15px -3px rgba(90, 55, 229, 0.1);
}

.loq-cat-item .name {
    font-weight: 800;
    color: #0f172a;
    font-size: 14px;
}

.loq-cat-item .status {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.loq-cat-item.has-config .status {
    color: #10b981;
}

/* Editor */
.loq-cat-editor {
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Sortable List */
.loq-sortable-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.loq-block-icon {
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 1px solid #e2e8f0;
}

.loq-block-info {
    flex: 1;
}

.loq-block-name {
    font-weight: 800;
    color: #1e293b;
    font-size: 13px;
    display: block;
}

.loq-block-desc {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.loq-block-desc--muted {
    opacity: 0.6;
}

.btn-save-layout {
    background: #5a37e5;
    color: #fff;
    border: 0;
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
}

.btn-save-layout:hover {
    background: #4c2fd6;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(90, 55, 229, 0.3);
}

.cat-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.cat-editor-title {
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
    margin: 0;
}

.loq-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.loq-empty-state h3 {
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
}

.loq-empty-state p {
    color: #64748b;
    font-size: 14px;
}

.loq-sortable-item.is-disabled {
    opacity: 0.6;
}

/* Toolbox & Actions */
.loq-toolbox {
    background: #f1f5f9;
    border-radius: 20px;
    padding: 25px;
    margin-top: 40px;
    border: 2px dashed #cbd5e1;
    transition: padding 0.25s;
}

.loq-toolbox.is-collapsed-toolbox {
    padding-bottom: 10px;
}

.loq-toolbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.loq-toolbox-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loq-toolbox-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 8px;
    scrollbar-width: thin;
    max-width: 100%;
    -ms-overflow-style: none;
}

.loq-toolbox-filters::-webkit-scrollbar {
    height: 4px;
}

.loq-toolbox-filters::-webkit-scrollbar-track {
    background: transparent;
}

.loq-toolbox-filters::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.loq-filter-tab {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    flex-shrink: 0;
}

.loq-filter-tab:hover {
    border-color: #5a37e5;
    color: #5a37e5;
    transform: translateY(-1px);
}

.loq-filter-tab.is-active {
    background: #5a37e5;
    border-color: #5a37e5;
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(90, 55, 229, 0.25);
}

/* Drop Targets */
.loq-tab-drop-hover {
    background: #f5f3ff !important;
    border-color: #5a37e5 !important;
    border-style: dashed !important;
    color: #5a37e5 !important;
    transform: scale(1.05);
}

.loq-filter-tab.is-dropping {
    animation: pulse-purple 1s infinite;
}

@keyframes pulse-purple {
    0% {
        box-shadow: 0 0 0 0 rgba(90, 55, 229, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(90, 55, 229, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(90, 55, 229, 0);
    }
}

.loq-toolbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.loq-bank-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.loq-bank-item:hover {
    border-color: #5a37e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.loq-bank-item .name {
    font-weight: 700;
    color: #1e293b;
    font-size: 12px;
}

.loq-bank-item-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.loq-block-type {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    border-radius: 9999px;
    padding: 4px 8px;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.loq-block-type--native {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.loq-block-type--panel {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.loq-block-type--plugin {
    background: #fdf4ff;
    color: #c026d3;
    border-color: #f5d0fe;
}

.loq-block-type--bridge {
    background: #fae8ff;
    color: #a21caf;
    border-color: #e879f9;
}

.loq-block-type--legacy {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

.loq-bank-item-actions {
    display: flex;
    gap: 4px;
    margin-left: 5px;
    opacity: 0;
    transition: all 0.2s;
}

.loq-bank-item:hover .loq-bank-item-actions {
    opacity: 1;
}

.loq-rename-bank-item,
.loq-info-bank-item {
    font-size: 10px;
    cursor: pointer;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.loq-info-bank-item {
    color: #64748b;
}

.loq-rename-bank-item:hover,
.loq-info-bank-item:hover {
    background: #e2e8f0;
    transform: scale(1.1);
}

.loq-bank-item .add-icon {
    margin-left: auto;
    color: #5a37e5;
    font-weight: 900;
    font-size: 16px;
}

/* Drag & Drop Feedback */
.is-dragging-bank-item {
    pointer-events: none;
    background: #fff !important;
    border: 1px solid #5a37e5 !important;
    border-radius: 12px !important;
    padding: 12px 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.loq-sortable-list .ui-draggable-dragging {
    display: none !important;
    /* Hide the raw draggable inside sortable, we handle it via helper and receive */
}

.loq-remove-item {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fee2e2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 900;
    font-size: 10px;
    transition: all 0.2s;
    opacity: 0.4;
}

.loq-sortable-item:hover .loq-remove-item {
    opacity: 1;
}

.loq-remove-item:hover {
    background: #ef4444;
    color: #fff;
}

.loq-copy-item {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ede9fe;
    color: #5a37e5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    opacity: 0.4;
}

.loq-sortable-item:hover .loq-copy-item {
    opacity: 1;
}

.loq-copy-item:hover {
    background: #5a37e5;
    color: #fff;
}

/* --- Módulo Sección (Contenedor 2.0) --- */
.loq-sortable-item.is-section {
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    padding: 0 !important;
    overflow: hidden;
    margin-bottom: 20px;
}

.loq-section-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    cursor: grab;
}

.loq-section-header:active {
    cursor: grabbing;
}

.loq-section-title-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.loq-section-label {
    font-size: 10px;
    font-weight: 800;
    color: #5a37e5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.loq-section-name {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
}

.loq-section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-toggle-section {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 10px;
}

.btn-toggle-section:hover {
    background: #e2e8f0;
}

.loq-sortable-item.is-collapsed .loq-section-body {
    display: none;
}

.loq-sortable-item.is-collapsed .btn-toggle-section {
    transform: rotate(-90deg);
}

.loq-section-body {
    padding: 15px;
    background: #fdfcff;
}

.loq-sortable-item.is-section .loq-sortable-list {
    margin: 0;
    min-height: 100px; 
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 15px;
    background: rgba(255,255,255,0.8);
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100% !important; /* Forzar ancho completo */
    box-sizing: border-box;
}

/* Indicador de Zona de Arrastre cuando está vacía */
.loq-sortable-list:empty:before {
    content: "🍱 Arrastra módulos aquí dentro";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 70px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    font-style: italic;
    opacity: 0.6;
    pointer-events: none;
    text-align: center;
}

.loq-sortable-item.is-section .loq-sortable-list:hover {
    border-color: #5a37e5;
    background: #fff;
}

/* Items dentro de secciones */
.loq-sortable-list .loq-sortable-list .loq-sortable-item {
    background: #fff;
    margin-bottom: 10px;
    border: 1px solid #eef2f6;
}

/* Settings Drawer */
.loq-edit-link {
    font-size: 11px;
    font-weight: 800;
    color: #5a37e5;
    cursor: pointer;
    margin-right: 15px;
    border-bottom: 1px dashed;
    user-select: none;
}

.loq-block-settings {
    display: none;
    background: #ffffff;
    border-top: 1px solid #eef2f6;
    padding: 25px;
    border-radius: 0 0 16px 16px;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
    flex: 1 1 100%; /* Compatibilidad con el nuevo sistema flex de secciones */
}

/* Card abierta / activa */
.loq-sortable-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.loq-sortable-item:active {
    cursor: grabbing;
}

.loq-sortable-item.ui-sortable-placeholder {
    background: #f5f3ff;
    border: 2px dashed #5a37e5;
    visibility: visible !important;
    border-radius: 18px;
    margin-bottom: 20px;
}

.loq-sortable-item:hover {
    border-color: #5a37e5;
    background: #fdfcff;
}

.loq-sortable-item.is-open {
    border-color: #5a37e5;
    background: #fdfcff;
    box-shadow: 0 4px 15px -3px rgba(90, 55, 229, 0.15);
    cursor: default;
}

/* Resaltado de Separadores (Spacers) */
.loq-sortable-item--spacer {
    background: #fdf6ff;
    border: 1px dashed #d8b4fe;
}

.loq-sortable-item--spacer:hover {
    background: #faf5ff;
    border-color: #5a37e5;
}

/* Quick Edit para Spacers */
.loq-spacer-quick-edit {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 20px;
    background: #fff;
    padding: 4px 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.loq-spacer-quick-edit:hover,
.loq-spacer-quick-edit:focus-within {
    border-color: #5a37e5;
    box-shadow: 0 4px 10px -2px rgba(90, 55, 229, 0.1);
}

.loq-spacer-quick-edit input {
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 800;
    color: #5a37e5;
    width: 45px;
    padding: 0;
    text-align: right;
    outline: none !important;
}

.loq-spacer-quick-edit span {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
}

/* Chrome, Safari, Edge, Opera: quitar flechas de número */
.loq-spacer-quick-edit input::-webkit-outer-spin-button,
.loq-spacer-quick-edit input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Firefox: quitar flechas de número */
.loq-spacer-quick-edit input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.loq-settings-row {
    margin-bottom: 15px;
}

.loq-settings-row:last-child {
    margin-bottom: 0;
}

.loq-settings-label {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 6px;
    display: block;
}

.loq-settings-input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #1e293b;
    font-weight: 500;
}

.loq-settings-input:focus {
    border-color: #5a37e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(90, 55, 229, 0.1);
}

.loq-control-group {
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    margin-top: 10px;
}

.loq-control-label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
}

.loq-control-select {
    width: 100%;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 0 10px;
    font-size: 13px;
    background: #fff;
}

.loq-control-select:focus {
    border-color: #5a37e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(90, 55, 229, 0.1);
}

.loq-settings-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.loq-settings-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.loq-settings-grid-promo {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 15px;
}

.loq-settings-grid-top-sm {
    margin-top: 5px;
}

.loq-settings-grid-bottom-md {
    margin-bottom: 12px;
}

.loq-settings-grid-align-end {
    align-items: end;
}

.loq-settings-stack-top {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.loq-settings-section {
    border-top: 1px solid #e2e8f0;
    margin-top: 16px;
    padding-top: 14px;
}

.loq-settings-section-title {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.loq-settings-section-title span {
    font-weight: 400;
    text-transform: none;
}

.loq-settings-divider {
    border: 0;
    border-top: 1px solid #f1f5f9;
    margin: 25px 0;
}

.loq-inline-hint {
    font-weight: 400;
    color: #94a3b8;
    font-size: 10px;
}

.loq-inline-hint--body {
    font-weight: 400;
    color: #94a3b8;
    text-transform: none;
}

.loq-settings-help {
    font-size: 11px;
    color: #94a3b8;
    margin: 6px 0 0;
}

.loq-settings-help--compact {
    font-size: 11px;
    color: #94a3b8;
    margin: 0 0 10px;
}

.loq-settings-help--xs {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}

.loq-flex-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loq-flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.loq-flex-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.loq-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.loq-templates-ui {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.loq-templates-title {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.loq-template-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.loq-template-select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    background: #fff;
}

.loq-template-btn {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.loq-template-btn--ghost {
    background: none;
    border: none;
    color: #5a37e5;
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    font-weight: 700;
}

.loq-template-btn--danger {
    background: none;
    border: 1px solid #fca5a5;
    color: #ef4444;
    border-radius: 8px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.loq-template-name-row {
    display: none;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.loq-template-name {
    flex: 1;
    font-size: 12px;
}

.loq-template-cancel {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #94a3b8;
}

.loq-media-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.loq-media-preview {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loq-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loq-media-placeholder {
    font-size: 22px;
}

.loq-media-select {
    font-size: 12px;
    font-weight: 700;
}

.loq-media-remove {
    font-size: 11px;
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    text-align: left;
    padding: 0;
}

.loq-color-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loq-color-swatch {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
}

.loq-color-hex {
    font-family: monospace;
    font-size: 12px;
    padding: 8px 10px;
    width: 90px;
}

.loq-checkbox-row {
    display: flex;
    align-items: center;
}

.loq-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.loq-checkbox-label input[type="checkbox"] {
    width: auto;
}

.loq-toggle-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loq-toggle-meta--top-sm {
    margin-top: 10px;
}

.loq-switch--compact {
    width: 32px;
    height: 18px;
}

.loq-settings-label--inline {
    margin-bottom: 0;
}

.loq-settings-input--accent {
    background: #fdf2f2;
    border-color: #ffcfcf;
}

.loq-textarea-mono {
    width: 100%;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    line-height: 1.5;
}

.loq-chip-button {
    font-size: 10px;
    font-family: monospace;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
}

.loq-settings-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.loq-settings-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.loq-settings-grid-promo {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 15px;
}

.loq-settings-stack-top {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.loq-settings-section {
    border-top: 1px solid #e2e8f0;
    margin-top: 16px;
    padding-top: 14px;
}

.loq-settings-section-title {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.loq-settings-section-title span {
    font-weight: 400;
    text-transform: none;
}

.loq-settings-divider {
    border: 0;
    border-top: 1px solid #f1f5f9;
    margin: 25px 0;
}

.loq-inline-hint {
    font-weight: 400;
    color: #94a3b8;
    font-size: 10px;
}

.loq-inline-hint--body {
    font-weight: 400;
    color: #94a3b8;
    text-transform: none;
}

.loq-settings-help {
    font-size: 11px;
    color: #94a3b8;
    margin: 6px 0 0;
}

.loq-settings-help--compact {
    font-size: 11px;
    color: #94a3b8;
    margin: 0 0 10px;
}

.loq-settings-help--xs {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}

.loq-flex-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loq-flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.loq-flex-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.loq-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.loq-templates-ui {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.loq-templates-title {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.loq-template-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.loq-template-select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    background: #fff;
}

.loq-template-btn {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.loq-template-btn--ghost {
    background: none;
    border: none;
    color: #5a37e5;
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    font-weight: 700;
}

.loq-template-btn--danger {
    background: none;
    border: 1px solid #fca5a5;
    color: #ef4444;
    border-radius: 8px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.loq-template-name-row {
    display: none;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.loq-template-name {
    flex: 1;
    font-size: 12px;
}

.loq-template-cancel {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #94a3b8;
}

.loq-media-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.loq-media-preview {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loq-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loq-media-placeholder {
    font-size: 22px;
}

.loq-media-select {
    font-size: 12px;
    font-weight: 700;
}

.loq-media-remove {
    font-size: 11px;
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    text-align: left;
    padding: 0;
}

.loq-color-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loq-color-swatch {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
}

.loq-color-hex {
    font-family: monospace;
    font-size: 12px;
    padding: 8px 10px;
    width: 90px;
}

.loq-checkbox-row {
    display: flex;
    align-items: center;
}

.loq-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.loq-checkbox-label input[type="checkbox"] {
    width: auto;
}

.loq-checkbox-label--offset {
    margin-top: 22px;
}

.loq-toggle-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loq-switch--compact {
    width: 32px;
    height: 18px;
}

.loq-settings-label--inline {
    margin-bottom: 0;
}

.loq-settings-input--accent {
    background: #fdf2f2;
    border-color: #ffcfcf;
}

.loq-textarea-mono {
    width: 100%;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    line-height: 1.5;
}

.loq-chip-button {
    font-size: 10px;
    font-family: monospace;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
}

/* Toggle switch */
.loq-switch {
    position: relative;
    display: inline-block;
}

.loq-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.loq-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.loq-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.loq-slider {
    background-color: #5a37e5;
}

input:checked+.loq-slider:before {
    transform: translateX(14px);
}

/* ════════════════════════════════════════════════
   CATEGORY TEMPLATES MANAGER UI
   ════════════════════════════════════════════════ */
.cat-header-actions {
    display: flex;
    gap: 10px;
}

.btn-templates-toggle {
    background: #fff;
    color: #5a37e5;
    border: 1px solid #5a37e5;
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-templates-toggle:hover {
    background: #f5f3ff;
}

.loq-templates-manager {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 30px;
    border-left: 5px solid #5a37e5;
    animation: slide-in-top 0.3s ease-out;
}

@keyframes slide-in-top {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.loq-tm-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    position: relative;
}

.loq-tm-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loq-tm-label {
    font-size: 11px;
    font-weight: 900;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loq-tm-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.loq-tm-name-input,
.loq-tm-select-template,
.loq-tm-select-category {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    background: #fff;
    min-width: 0;
}

.loq-tm-row button {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-save-as-template {
    background: #5a37e5;
    color: #fff;
}

.btn-load-template {
    background: #0f172a;
    color: #fff;
}

.btn-import-category {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0 !important;
}

.btn-delete-template {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    padding: 10px 12px !important;
}

.btn-delete-template:hover {
    background: #ef4444 !important;
    color: #fff !important;
}

.btn-tm-close {
    position: absolute;
    top: -14px;
    right: 0;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    padding: 5px;
}

.btn-tm-close:hover {
    color: #ef4444;
}

/* ════════════════════════════════════════════════
   CARD STYLE MANAGER UI
   ════════════════════════════════════════════════ */
.btn-card-styles-toggle {
    background: #fff;
    color: #10b981;
    border: 1px solid #10b981;
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-card-styles-toggle:hover {
    background: #f0fdf4;
}

.loq-card-style-manager {
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 30px;
    border-left: 5px solid #10b981;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.05);
    animation: slide-in-top 0.3s ease-out;
}

.loq-csm-inner {
    position: relative;
}

.loq-csm-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 15px;
}

.loq-csm-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #10b981;
}

.loq-csm-toggle span {
    font-weight: 800;
    color: #1e293b;
    font-size: 13px;
}

.loq-csm-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: opacity 0.2s;
}

.loq-csm-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.loq-csm-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 120px;
}

.loq-csm-col label {
    font-size: 11px;
    font-weight: 900;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loq-csm-col input[type="text"],
.loq-csm-col select {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

.loq-csm-col input[type="color"] {
    width: 100%;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 2px;
    cursor: pointer;
    background: #fff;
}

.btn-csm-close {
    position: absolute;
    top: -14px;
    right: 0;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    padding: 5px;
}

.btn-csm-close:hover {
    color: #ef4444;
}