/* ================================================================
   AE ERP — Public CSS
   Panel de cliente y shortcodes del frontend.
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Variables ──────────────────────────────────────────────────*/
:root {
    --ae-primary: #0E3950;
    --ae-primary-light: #1a5278;
    --ae-accent: #1a7a5e;
    --ae-success: #10b981;
    --ae-warning: #f59e0b;
    --ae-danger: #ef4444;
    --ae-info: #3b82f6;
    --ae-bg: #f0f4f8;
    --ae-surface: #ffffff;
    --ae-border: #e2e8f0;
    --ae-text: #1e293b;
    --ae-text-mid: #475569;
    --ae-text-light: #94a3b8;
    --ae-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ae-radius: 10px;
    --ae-radius-sm: 6px;
    --ae-radius-full: 9999px;
    --ae-shadow: 0 4px 16px rgba(14, 57, 80, .08);
    --ae-shadow-sm: 0 1px 4px rgba(14, 57, 80, .06);
    --ae-transition: 180ms ease;
}

/* ── Contenedor principal ───────────────────────────────────────*/
.ae-panel-container *:not(.dashicons),
.ae-panel-container input,
.ae-panel-container select,
.ae-panel-container button {
    font-family: var(--ae-font);
    box-sizing: border-box;
}

.ae-panel-container .dashicons {
    font-family: 'dashicons' !important;
}

.ae-panel-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
    color: var(--ae-text);
}

/* ── Panel Header bienvenida ────────────────────────────────────*/
.ae-panel-welcome {
    background: linear-gradient(135deg, var(--ae-primary) 0%, var(--ae-primary-light) 100%);
    border-radius: 16px;
    padding: 28px 32px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
}

.ae-panel-welcome::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}

.ae-panel-welcome h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
}

.ae-panel-welcome p {
    font-size: 14px;
    margin: 0;
    opacity: .85;
}

/* ── Módulos Stats ──────────────────────────────────────────────*/
.ae-panel-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.ae-panel-stat {
    background: var(--ae-surface);
    border-radius: var(--ae-radius);
    box-shadow: var(--ae-shadow-sm);
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--ae-border);
    transition: all var(--ae-transition);
    position: relative;
    overflow: hidden;
}

.ae-panel-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ae-primary);
}

.ae-panel-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--ae-shadow);
    color: inherit;
    text-decoration: none;
}

.ae-panel-stat--tickets::before {
    background: var(--ae-danger);
}

.ae-panel-stat--servicios::before {
    background: var(--ae-success);
}

.ae-panel-stat--proyectos::before {
    background: var(--ae-info);
}

.ae-panel-stat--ordenes::before {
    background: var(--ae-warning);
}

.ae-panel-stat .stat-icon {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}

.ae-panel-stat .stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--ae-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.ae-panel-stat .stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--ae-text-light);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Section card ───────────────────────────────────────────────*/
.ae-section {
    background: var(--ae-surface);
    border-radius: var(--ae-radius);
    border: 1px solid var(--ae-border);
    box-shadow: var(--ae-shadow-sm);
    overflow: hidden;
    margin-bottom: 20px;
}

.ae-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--ae-border);
    background: var(--ae-primary);
}

.ae-section__title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ae-section__body {
    padding: 20px;
}

/* ── Lista de items ─────────────────────────────────────────────*/
.ae-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ae-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--ae-border);
    gap: 12px;
}

.ae-list__item:last-child {
    border-bottom: none;
}

.ae-list__item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--ae-text);
    margin-bottom: 2px;
}

.ae-list__item-sub {
    font-size: 12.5px;
    color: var(--ae-text-light);
}

.ae-list__item-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: var(--ae-radius-sm);
    font-size: 12px;
    font-weight: 500;
    background: var(--ae-primary);
    color: #fff;
    text-decoration: none;
    transition: background var(--ae-transition);
    white-space: nowrap;
}

.ae-list__item-action:hover {
    background: var(--ae-primary-light);
    color: #fff;
    text-decoration: none;
}

/* ── Badge público ──────────────────────────────────────────────*/
.ae-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--ae-radius-full);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.ae-badge--success {
    background: #d1fae5;
    color: #059669;
}

.ae-badge--warning {
    background: #fef3c7;
    color: #d97706;
}

.ae-badge--danger {
    background: #fee2e2;
    color: #dc2626;
}

.ae-badge--info {
    background: #dbeafe;
    color: #2563eb;
}

.ae-badge--neutral {
    background: #f1f5f9;
    color: #64748b;
}

/* ── Tabla pública ──────────────────────────────────────────────*/
.ae-public-table-wrap {
    overflow-x: auto;
    border-radius: var(--ae-radius);
    border: 1px solid var(--ae-border);
}

.ae-public-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--ae-surface);
}

.ae-public-table thead th {
    background: #f1f5f9;
    color: var(--ae-text-mid);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 10px 14px;
    border-bottom: 2px solid var(--ae-border);
    text-align: left;
}

.ae-public-table tbody tr {
    border-bottom: 1px solid var(--ae-border);
    transition: background var(--ae-transition);
}

.ae-public-table tbody tr:last-child {
    border-bottom: none;
}

.ae-public-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.ae-public-table tbody tr:hover {
    background: #f0f5ff;
}

.ae-public-table tbody td {
    padding: 11px 14px;
    vertical-align: middle;
}

/* ── Knowledge Base Premium ─────────────────────────────────────*/
.ae-kb-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 30px 20px;
}

.ae-kb-hero {
    text-align: center;
    margin-bottom: 60px;
}

.ae-kb-hero__title {
    font-size: 32px;
    font-weight: 700;
    color: var(--ae-primary);
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.ae-kb-search-box {
    max-width: 600px;
    margin: 0 auto 16px;
    position: relative;
    background: #fff;
    border-radius: 100px;
    /* Estilo píldora moderna */
    box-shadow: 0 10px 30px rgba(14, 57, 80, 0.08);
    border: 1px solid rgba(14, 57, 80, 0.05);
    padding: 6px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.ae-kb-search-box:focus-within {
    box-shadow: 0 15px 40px rgba(14, 57, 80, 0.12);
    transform: translateY(-2px);
    border-color: var(--ae-primary);
}

.ae-kb-search-icon {
    font-size: 24px;
    color: var(--ae-text-light);
    margin: 0 15px;
    width: 24px;
    height: 24px;
}

.ae-kb-search-box input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
    color: var(--ae-text-main);
    box-shadow: none !important;
}

/* Base de Conocimiento - Resultados de Búsqueda */
.ae-kb-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(14, 57, 80, 0.15);
    border: 1px solid rgba(14, 57, 80, 0.08);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ae-kb-result-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--ae-text-main);
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
    text-align: left;
    width: 100%;
}

.ae-kb-result-item:last-child {
    border-bottom: none;
}

.ae-kb-result-item:hover {
    background: #f8fafc;
}

.ae-kb-result-item .dashicons {
    color: var(--ae-primary);
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin-right: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.ae-kb-result-content {
    flex-grow: 1;
}

.ae-kb-result-content strong {
    display: block;
    font-size: 15px;
    color: #0E3950;
    margin-bottom: 4px;
}

.ae-kb-result-content p {
    margin: 0;
    font-size: 13px;
    color: var(--ae-text-light);
    line-height: 1.4;
}

.ae-kb-no-results {
    padding: 24px;
    text-align: center;
    color: var(--ae-text-light);
    font-size: 14px;
}

.ae-kb-hero__subtitle {
    font-size: 14px;
    color: var(--ae-text-light);
    margin-top: 20px;
}

.ae-kb-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.ae-kb-cat-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none !important;
    border: 1px solid var(--ae-border);
    transition: all 0.3s ease;
}

.ae-kb-cat-card:hover {
    border-color: var(--ae-primary);
    box-shadow: 0 10px 25px rgba(14, 57, 80, 0.05);
    transform: translateY(-4px);
}

.ae-kb-cat-icon {
    width: 48px;
    height: 48px;
    background: rgba(14, 57, 80, 0.03);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ae-primary);
    font-size: 24px;
}

.ae-kb-cat-info h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ae-primary);
}

.ae-kb-cat-info span {
    font-size: 13px;
    color: var(--ae-text-light);
}

.ae-kb-sofia-cta {
    background: linear-gradient(135deg, rgba(14, 57, 80, 0.03) 0%, rgba(236, 173, 32, 0.05) 100%);
    border: 1px solid var(--ae-border);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.ae-kb-sofia-avatar {
    width: 64px;
    height: 64px;
    background: var(--ae-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
}

.ae-kb-sofia-content {
    flex: 1;
}

.ae-kb-sofia-content h4 {
    margin: 0 0 4px;
    font-size: 18px;
    color: var(--ae-primary);
}

.ae-kb-sofia-content p {
    margin: 0;
    font-size: 14px;
    color: var(--ae-text-mid);
}

.ae-open-chat-trigger {
    background: linear-gradient(135deg, var(--ae-primary) 0%, #1a5c80 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 15px rgba(14, 57, 80, 0.2) !important;
}

.ae-open-chat-trigger:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(14, 57, 80, 0.3) !important;
    background: linear-gradient(135deg, #1a5c80 0%, var(--ae-primary) 100%) !important;
}

.ae-open-chat-trigger:active {
    transform: translateY(0) scale(0.98) !important;
}

.ae-open-chat-trigger::before {
    content: '💬';
    font-size: 16px;
}

/* ── Empty State Premium (Sofia First) ─────────────────────────*/
.ae-empty-state {
    text-align: center;
    padding: 80px 40px;
    background: transparent !important;
    /* Más integrado, sin recuadros toscos */
    margin: 0;
    animation: aeFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aeFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ae-empty-icon-container {
    width: 64px;
    height: 64px;
    background: rgba(14, 57, 80, 0.03);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    color: var(--ae-primary);
    border: 1px solid rgba(14, 57, 80, 0.05);
}

.ae-empty-state .ae-empty-icon {
    font-size: 32px;
    width: 32px;
    height: 32px;
    opacity: 0.6;
}

.ae-empty-state h3 {
    font-size: 26px;
    font-weight: 300;
    /* Apple-style thin weight */
    color: var(--ae-primary);
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}

.ae-empty-state p {
    font-size: 16px;
    color: var(--ae-text-light);
    max-width: 420px;
    margin: 0 auto 40px;
    line-height: 1.6;
    font-weight: 400;
}

/* Sugerencia Sofia - Enfoque Principal */
.ae-sofia-suggestion {
    background: #ffffff;
    border: 1px solid var(--ae-border);
    border-radius: 20px;
    padding: 24px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 15px 35px rgba(14, 57, 80, 0.06);
    transition: transform 0.3s ease;
}

.ae-sofia-suggestion:hover {
    transform: translateY(-5px);
}

.ae-sofia-suggestion-icon {
    font-size: 32px;
    color: var(--ae-chat-accent, #ECAD20);
    flex-shrink: 0;
    background: rgba(236, 173, 32, 0.1);
    padding: 12px;
    border-radius: 12px;
    width: 56px;
    height: 56px;
}

.ae-sofia-suggestion-text {
    font-size: 14px;
    color: var(--ae-text-mid);
    line-height: 1.6;
}

.ae-sofia-suggestion-text strong {
    color: var(--ae-primary);
    font-weight: 700;
}

.ae-sofia-suggestion-text strong {
    color: var(--ae-primary);
    font-weight: 700;
}

/* ── Responsive ─────────────────────────────────────────────────*/
@media (max-width: 640px) {
    .ae-panel-welcome {
        flex-direction: column;
        gap: 16px;
    }

    .ae-panel-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .ae-alerts-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Base de Conocimiento: Archive & Single ─────────────────────────*/

.ae-kb-archive,
.ae-kb-single-container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ae-kb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 30px;
}

.ae-kb-breadcrumb a {
    color: #0E3950;
    text-decoration: none;
    font-weight: 500;
}

.ae-kb-archive-header {
    margin-bottom: 50px;
}

.ae-kb-cat-badge {
    width: 64px;
    height: 64px;
    background: #0E3950;
    color: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 24px;
    box-shadow: 0 10px 20px rgba(14, 57, 80, 0.15);
}

.ae-kb-archive-header h1 {
    font-size: 40px;
    margin: 0 0 12px;
    color: #0E3950;
    font-weight: 800;
    letter-spacing: -1px;
}

.ae-kb-archive-header p {
    font-size: 20px;
    color: #64748b;
    font-weight: 300;
}

.ae-kb-articles-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.ae-kb-article-card a {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 24px;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ae-kb-article-card a:hover {
    border-color: #0E3950;
    transform: translateY(-4px) translateX(4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.ae-kb-article-content {
    flex: 1;
}

.ae-kb-article-content h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #0E3950;
    font-weight: 700;
}

.ae-kb-article-content p {
    margin: 0 0 16px;
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
}

.ae-kb-article-meta {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: #94a3b8;
}

.ae-kb-article-arrow {
    font-size: 24px;
    color: #0E3950;
    opacity: 0.2;
    transition: opacity 0.3s;
}

.ae-kb-article-card a:hover .ae-kb-article-arrow {
    opacity: 1;
}

/* Single Article Layout Premium */
.ae-kb-single-container {
    max-width: 1300px;
    margin: 40px auto;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: start;
}

.ae-kb-sidebar {
    width: 280px;
    min-width: 280px;
    position: sticky;
    top: 40px;
    flex-shrink: 0;
}

.ae-kb-main-content {
    min-width: 0;
}

.ae-kb-sidebar-sticky {
    position: sticky;
    top: 100px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(14, 57, 80, 0.05);
}

.ae-kb-sidebar h5 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #0E3950;
    margin-bottom: 24px;
    font-weight: 800;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ae-kb-sidebar h5::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: #0E3950;
    border-radius: 2px;
}

.ae-kb-toc {
    margin-bottom: 48px;
}

.ae-kb-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ae-kb-toc li {
    margin-bottom: 14px;
}

.ae-kb-toc a {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.5;
    display: block;
    padding: 6px 0 6px 0;
    position: relative;
}

.ae-kb-toc a:hover {
    color: #0E3950;
    transform: translateX(4px);
}

.ae-kb-toc a.active {
    color: #0E3950;
    font-weight: 700;
}

.ae-kb-toc a.active::after {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    width: 4px;
    height: 4px;
    background: #0E3950;
    border-radius: 50%;
    transform: translateY(-50%);
}

.ae-kb-action-btn {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px;
    border-radius: 14px;
    color: #0E3950;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
}

.ae-kb-action-btn:hover {
    background: #fff;
    border-color: #0E3950;
    box-shadow: 0 4px 12px rgba(14, 57, 80, 0.1);
}

.ae-kb-single-header h1 {
    font-size: 48px;
    margin: 0 0 24px;
    color: #0E3950;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.ae-kb-post-meta {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid #f1f5f9;
}

.ae-kb-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #64748b;
}

.ae-kb-summary-box {
    background: #f0f7ff;
    border: 1px solid #d0e7ff;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 48px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.05);
}

.ae-kb-summary-tag {
    position: absolute;
    top: -12px;
    left: 28px;
    background: #0E3950;
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(14, 57, 80, 0.2);
}

.ae-kb-summary-box p {
    margin: 0;
    line-height: 1.7;
    color: #1e40af;
    font-size: 16px;
}

.ae-kb-content-body {
    font-size: 18px;
    line-height: 1.8;
    color: #334155;
}

.ae-kb-content-body h2 {
    margin: 56px 0 32px;
    font-size: 30px;
    color: #0E3950;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ae-kb-content-body h3 {
    margin: 40px 0 24px;
    font-size: 24px;
    color: #0E3950;
    font-weight: 600;
}

.ae-kb-content-body p {
    margin-bottom: 24px;
}

/* Listas con alineación corregida */
.ae-kb-content-body ul,
.ae-kb-content-body ol {
    margin-bottom: 32px;
    padding-left: 28px;
    list-style-position: outside;
}

.ae-kb-content-body li {
    margin-bottom: 12px;
    padding-left: 4px;
}

/* Imágenes con espaciado */
.ae-kb-content-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 40px auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Feedback Section Premium Refined */
.ae-kb-feedback {
    margin-top: 80px;
    padding: 50px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    text-align: center;
    width: 100%;
    /* Ocupar todo el ancho del contenido */
}

.ae-kb-feedback h3 {
    font-size: 22px;
    margin: 0 0 32px;
    color: #0E3950;
    font-weight: 700;
}

.ae-kb-feedback-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.ae-kb-feedback-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ae-kb-feedback-btn:hover {
    border-color: #0E3950;
    background: #f0f7ff;
    color: #0E3950;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 57, 80, 0.1);
}

#ae-kb-feedback-msg {
    font-size: 16px;
    color: #0E3950;
    font-weight: 600;
    margin-top: 10px;
}

@media (max-width: 1100px) {
    .ae-kb-single-container {
        grid-template-columns: 240px 1fr;
        gap: 30px;
        padding: 30px;
    }
    .ae-kb-sidebar, .ae-kb-sidebar-sticky {
        width: 240px;
        min-width: 240px;
    }
}

@media (max-width: 960px) {
    .ae-kb-single-container {
        grid-template-columns: 1fr;
        gap: 40px;
        margin: 20px auto;
        padding: 24px;
        border-radius: 0; /* Full width feel on small tablets */
    }

    .ae-kb-sidebar {
        width: 100%;
        min-width: 100%;
        position: static;
        order: 2; /* Move sidebar/TOC below article on mobile */
    }

    .ae-kb-sidebar-sticky {
        position: static;
        width: 100%;
        padding: 20px;
    }

    .ae-kb-main-content {
        order: 1;
    }

    .ae-kb-single-header h1 {
        font-size: 32px;
    }
}

@media (max-width: 640px) {
    .ae-kb-single-header h1 {
        font-size: 32px;
    }

    .ae-kb-archive-header h1 {
        font-size: 32px;
    }
}

@media print {

    .ae-kb-sidebar,
    .ae-kb-feedback,
    .ae-kb-breadcrumb,
    header,
    footer,
    #adminbar {
        display: none !important;
    }

    .ae-kb-single-container {
        grid-template-columns: 1fr;
        padding-top: 0;
    }

    body {
        background: #fff !important;
    }
}

/* ── Centro de Notificaciones (Shortcode) ───────────────────────*/
.ae-notif-full-container {
    max-width: 1300px;
    margin: 40px auto;
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(14, 57, 80, 0.05);
}

.ae-notif-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.ae-notif-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.ae-notif-header-title h3 {
    margin: 0;
    font-size: 24px;
    color: #0E3950;
    font-weight: 800;
}

.ae-notif-header-title .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #0E3950;
}

.ae-notif-header p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

/* Empty State */
.ae-notif-empty-state {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ae-notif-empty-icon {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    color: #94a3b8;
}

.ae-notif-empty-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    z-index: 2;
}

.ae-notif-empty-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(14, 57, 80, 0.05);
    animation: aeNotifPulse 2s infinite;
}

@keyframes aeNotifPulse {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.ae-notif-empty-state h4 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #0E3950;
    font-weight: 700;
}

.ae-notif-empty-state p {
    margin: 0;
    color: #64748b;
    max-width: 400px;
    line-height: 1.6;
}

/* List Items */
.ae-notif-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ae-notif-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    animation: aeFadeUp 0.5s ease backwards;
}

.ae-notif-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    border-color: #cbd5e1;
}

.ae-notif-item__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ae-notif-icon--ticket { background: #fee2e2; color: #ef4444; }
.ae-notif-icon--factura { background: #d1fae5; color: #059669; }
.ae-notif-icon--cotizacion { background: #dbeafe; color: #2563eb; }
.ae-notif-icon--pago, .ae-notif-icon--orden_pago { background: #fef3c7; color: #d97706; }
.ae-notif-icon--proyecto { background: #ede9fe; color: #7c3aed; }
.ae-notif-icon--system { background: #f1f5f9; color: #64748b; }

.ae-notif-item__content {
    flex: 1;
}

.ae-notif-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    gap: 10px;
}

.ae-notif-item__title {
    font-weight: 700;
    color: #0f172a;
    font-size: 16px;
}

.ae-notif-item__date {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

.ae-notif-item__body {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.ae-notif-item__footer {
    margin-top: 12px;
}

.ae-notif-link {
    font-size: 13px;
    font-weight: 700;
    color: #0E3950;
    text-decoration: none !important;
}

.ae-notif-link:hover {
    text-decoration: underline !important;
}

.ae-notif-unread {
    background: #fff;
    border-left: 5px solid #0E3950;
    box-shadow: 0 4px 12px rgba(14, 57, 80, 0.05);
}

.ae-notif-unread .ae-notif-item__title {
    color: #0E3950;
}

.ae-notif-unread-dot {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

@media (max-width: 768px) {
    .ae-notif-full-container {
        padding: 24px;
        margin: 10px auto;
        border-radius: 0;
    }
    .ae-notif-item {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }
    .ae-notif-item__header {
        flex-direction: column;
        gap: 4px;
    }
    .ae-notif-unread-dot {
        top: 16px;
        right: 16px;
    }
}

/* ── Adjuntos de Tickets ────────────────────────────────────────*/
.ae-attachment-zone {
    transition: all 0.3s ease;
}

.ae-attachment-zone.ae-dragover {
    border-color: var(--ae-primary) !important;
    background: rgba(14, 57, 80, 0.08) !important;
    transform: scale(1.01);
}

.ae-file-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ae-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    color: var(--ae-text-mid);
    animation: aeFadeIn 0.3s ease;
}

@keyframes aeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ae-file-item .ae-file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.ae-file-item .ae-file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ae-file-item .ae-file-size {
    font-size: 11px;
    color: var(--ae-text-light);
    flex-shrink: 0;
}

.ae-file-item .ae-file-remove {
    cursor: pointer;
    color: var(--ae-danger);
    opacity: 0.7;
    transition: opacity 0.2s;
    margin-left: 10px;
}

.ae-file-item .ae-file-remove:hover {
    opacity: 1;
}

/* ── Toasts / Notificaciones ────────────────────────────────────*/
.ae-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ae-toast {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(14, 57, 80, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 6px solid #0E3950;
}

.ae-toast.ae-toast--show {
    transform: translateX(0);
    opacity: 1;
}

.ae-toast--success {
    border-left-color: #10b981;
}

.ae-toast--error {
    border-left-color: #ef4444;
}

.ae-toast-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ae-toast--success .ae-toast-icon {
    color: #10b981;
}

.ae-toast--error .ae-toast-icon {
    color: #ef4444;
}

.ae-toast-content {
    flex: 1;
}

.ae-toast-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.ae-toast-message {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.ae-toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ae-toast-close:hover {
    background: #f1f5f9;
    color: #475569;
}

/* ── Typography and Rich Text inside Quotes & Documents ────────────────────────*/
.ae-paper .ae-quote-presentacion,
.ae-paper .ae-quote-condiciones {
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
}

.ae-paper .ae-quote-presentacion p,
.ae-paper .ae-quote-condiciones p {
    margin-bottom: 16px;
}

.ae-paper .ae-quote-presentacion h1,
.ae-paper .ae-quote-condiciones h1,
.ae-paper .ae-quote-presentacion h2,
.ae-paper .ae-quote-condiciones h2,
.ae-paper .ae-quote-presentacion h3,
.ae-paper .ae-quote-condiciones h3,
.ae-paper .ae-quote-presentacion h4,
.ae-paper .ae-quote-condiciones h4 {
    color: #0E3950;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 700;
}

.ae-paper .ae-quote-presentacion ul,
.ae-paper .ae-quote-condiciones ul,
.ae-paper .ae-quote-presentacion ol,
.ae-paper .ae-quote-condiciones ol {
    margin-top: 0;
    margin-bottom: 20px;
    padding-left: 32px; /* Increased for better alignment */
    list-style-position: outside;
}

.ae-paper .ae-quote-presentacion li,
.ae-paper .ae-quote-condiciones li {
    margin-bottom: 6px;
}

.ae-paper .ae-quote-presentacion blockquote,
.ae-paper .ae-quote-condiciones blockquote {
    border-left: 4px solid #cbd5e1;
    margin: 0 0 16px 0;
    padding: 8px 16px;
    background: #f8fafc;
    color: #475569;
    font-style: italic;
}