/* ==========================================================================
   SOLTELEMATICAS — Prompt Generator Styles v8.0
   ========================================================================== */

/* ============ TABS DE SECCIÓN ============ */
.tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    border-bottom: 2px solid rgba(27, 58, 95, 0.08);
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(27, 58, 95, 0.15);
    background: var(--color-blanco);
    color: var(--color-azul);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-body);
}

.tab-btn:hover {
    border-color: var(--color-mandarina);
    color: var(--color-mandarina);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--color-mandarina) 0%, var(--color-dorado) 100%);
    color: var(--color-blanco);
    border-color: transparent;
    box-shadow: var(--shadow-soft);
}

/* ============ CATEGORY TABS ============ */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 0.5rem 1rem;
    background: rgba(27, 58, 95, 0.06);
    border: 1.5px solid rgba(27, 58, 95, 0.15);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-azul);
    transition: all var(--transition);
    font-family: var(--font-body);
    cursor: pointer;
}

.cat-btn:hover {
    border-color: var(--color-mandarina);
    color: var(--color-mandarina);
}

.cat-btn.active {
    background: var(--color-azul);
    color: var(--color-blanco);
    border-color: var(--color-azul);
}

/* ============ GENERADOR ============ */
.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.generator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-azul);
}

.form-group select,
.form-group input,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid rgba(27, 58, 95, 0.18);
    border-radius: 8px;
    background: var(--color-blanco);
    color: var(--color-azul);
    min-height: 44px;
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
    box-sizing: border-box;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-mandarina);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

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

.char-counter {
    font-size: 0.75rem;
    color: var(--color-azul-suave);
    text-align: right;
    font-weight: 600;
}

.ai-warning {
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    color: #9a4a0d;
    font-weight: 500;
    margin-top: 0.5rem;
    line-height: 1.5;
    word-wrap: break-word;
}

/* ============ COMANDOS SUGERIDOS ============ */
.commands-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.75rem;
    background: rgba(27, 58, 95, 0.02);
    border-radius: 8px;
}

.command-chip {
    padding: 0.5rem 1rem;
    background: rgba(27, 58, 95, 0.06);
    border: 1.5px solid rgba(27, 58, 95, 0.15);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-azul);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    font-family: var(--font-body);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-chip:hover {
    background: rgba(249, 115, 22, 0.1);
    border-color: var(--color-mandarina);
    color: var(--color-mandarina);
    transform: translateY(-1px);
}

.command-chip.selected {
    background: var(--color-mandarina);
    border-color: var(--color-mandarina);
    color: var(--color-blanco);
    box-shadow: var(--shadow-soft);
}

.command-chip.auto-detected {
    border-color: var(--color-dorado);
    background: rgba(212, 160, 23, 0.08);
}

/* ============ TOOLTIP JS FLOTANTE ============ */
.ai-tooltip {
    position: fixed;
    background: var(--color-azul);
    color: var(--color-blanco);
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.55;
    max-width: 320px;
    min-width: 220px;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(27, 58, 95, 0.35);
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-family: var(--font-body);
}

.ai-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.ai-tooltip::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
}

.ai-tooltip.below::before {
    top: -6px;
    border-bottom-color: var(--color-azul);
    border-top: none;
}

.ai-tooltip.above::before {
    bottom: -6px;
    border-top-color: var(--color-azul);
    border-bottom: none;
}

.ai-tooltip .tooltip-cmd {
    display: block;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--color-mandarina);
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.ai-tooltip .tooltip-desc {
    display: block;
    color: var(--color-blanco);
    opacity: 0.95;
}

.ai-tooltip .tooltip-hint {
    display: block;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(248, 250, 255, 0.2);
    font-size: 0.7rem;
    opacity: 0.7;
    font-style: italic;
}

/* ============ PANEL LATERAL ============ */
.cmd-details-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27, 58, 95, 0.4);
    z-index: 7999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(3px);
}

.cmd-details-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.cmd-details-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 100px);
    background: var(--color-blanco);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(27, 58, 95, 0.3);
    z-index: 8000;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    border: 1.5px solid rgba(27, 58, 95, 0.1);
    display: flex;
    flex-direction: column;
}

.cmd-details-panel.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.cmd-details-header {
    background: linear-gradient(135deg, var(--color-azul) 0%, var(--color-azul-suave) 100%);
    color: var(--color-blanco);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cmd-details-header .cmd-title {
    margin: 0;
    font-size: 1rem;
    color: var(--color-blanco);
    font-family: 'Courier New', monospace;
    font-weight: 700;
    word-break: break-word;
    flex: 1;
    min-width: 0;
}

.cmd-details-close {
    background: rgba(248, 250, 255, 0.15);
    border: 1.5px solid rgba(248, 250, 255, 0.25);
    color: var(--color-blanco);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.cmd-details-close:hover {
    background: rgba(248, 250, 255, 0.3);
    transform: rotate(90deg);
}

.cmd-details-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.cmd-details-desc {
    font-size: 0.9rem;
    color: var(--color-azul);
    line-height: 1.7;
    margin: 0 0 1rem 0;
    word-wrap: break-word;
}

.cmd-details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(27, 58, 95, 0.08);
}

.cmd-details-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(27, 58, 95, 0.06);
    color: var(--color-azul);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.cmd-details-tag.platform {
    background: rgba(249, 115, 22, 0.1);
    color: var(--color-mandarina);
}

.cmd-details-tag.category {
    background: rgba(212, 160, 23, 0.1);
    color: var(--color-dorado);
}

.cmd-details-footer {
    padding: 0.85rem 1.25rem;
    background: rgba(27, 58, 95, 0.02);
    border-top: 1px solid rgba(27, 58, 95, 0.08);
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cmd-details-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.cmd-details-btn.primary {
    background: linear-gradient(135deg, var(--color-mandarina) 0%, var(--color-dorado) 100%);
    color: var(--color-blanco);
    box-shadow: var(--shadow-soft);
}

.cmd-details-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-strong);
}

.cmd-details-btn.secondary {
    background: var(--color-blanco);
    color: var(--color-azul);
    border: 1.5px solid rgba(27, 58, 95, 0.18);
}

.cmd-details-btn.secondary:hover {
    border-color: var(--color-mandarina);
    color: var(--color-mandarina);
}

/* ============ AUTO-DETECT BADGE ============ */
.auto-badge {
    display: inline-block;
    background: rgba(249, 115, 22, 0.12);
    color: var(--color-mandarina);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-left: 0.5rem;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* ============ PREVIEW ============ */
.generator-preview {
    background: var(--color-blanco);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.preview-header {
    background: var(--color-azul);
    color: var(--color-blanco);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.preview-header h3 {
    color: var(--color-blanco);
    font-size: 1rem;
    margin: 0;
}

.preview-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(248, 250, 255, 0.1);
    border: 1.5px solid rgba(248, 250, 255, 0.25);
    color: var(--color-blanco);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.icon-btn:hover:not(:disabled) {
    background: rgba(248, 250, 255, 0.2);
    border-color: var(--color-blanco);
    transform: scale(1.05);
}

.icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.icon-btn.clear-btn {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

.icon-btn.clear-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.9);
    border-color: #ef4444;
}

.preview-content {
    flex: 1;
    padding: 1.5rem;
    min-height: 300px;
    max-height: 600px;
    overflow-y: auto;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--color-azul-suave);
}

.preview-placeholder p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.preview-placeholder small {
    font-size: 0.85rem;
    opacity: 0.7;
}

.preview-text {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-azul);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.preview-text.editable {
    background: rgba(27, 58, 95, 0.03);
    padding: 1rem;
    border-radius: 8px;
    border: 1.5px solid rgba(27, 58, 95, 0.15);
    outline: none;
}

.preview-text.editable:focus {
    border-color: var(--color-mandarina);
}

.preview-meta {
    border-top: 1px solid rgba(27, 58, 95, 0.08);
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: rgba(27, 58, 95, 0.02);
}

.meta-item {
    display: flex;
    gap: 0.5rem;
    font-size: 0.82rem;
}

.meta-label {
    font-weight: 700;
    color: var(--color-azul);
}

.meta-value {
    color: var(--color-azul-suave);
}

/* ============ CATÁLOGO ============ */
.catalog-search {
    margin-bottom: 2rem;
}

.catalog-search input {
    width: 100%;
    max-width: 500px;
    padding: 0.85rem 1.2rem;
    border: 1.5px solid rgba(27, 58, 95, 0.18);
    border-radius: 999px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: var(--color-blanco);
    color: var(--color-azul);
    box-sizing: border-box;
}

.catalog-search input:focus {
    outline: none;
    border-color: var(--color-mandarina);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.catalog-category {
    background: var(--color-blanco);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border-top: 4px solid var(--color-mandarina);
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: visible;
}

.catalog-category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.catalog-category h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-azul);
    flex-wrap: wrap;
}

.catalog-category h3 .count {
    background: rgba(249, 115, 22, 0.1);
    color: var(--color-mandarina);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 700;
}

.catalog-commands {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.catalog-command {
    padding: 0.4rem 0.8rem;
    background: rgba(27, 58, 95, 0.06);
    border: 1px solid rgba(27, 58, 95, 0.12);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-azul);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    font-family: var(--font-body);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-command:hover {
    background: var(--color-mandarina);
    border-color: var(--color-mandarina);
    color: var(--color-blanco);
    transform: translateY(-1px);
}

/* ============ INSTRUCCIONES ============ */
.instructions-panel {
    background: linear-gradient(135deg, rgba(27, 58, 95, 0.04) 0%, rgba(249, 115, 22, 0.06) 100%);
    border: 1.5px solid rgba(27, 58, 95, 0.12);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    overflow: hidden;
}

.instructions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--color-azul);
    color: var(--color-blanco);
}

.instructions-header h2 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--color-blanco);
}

.instructions-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(248, 250, 255, 0.15);
    color: var(--color-blanco);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.instructions-toggle:hover {
    background: rgba(248, 250, 255, 0.3);
}

.instructions-body {
    padding: 1.5rem;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.instructions-body.collapsed {
    max-height: 0;
    padding: 0 1.5rem;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.instruction-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    flex: 0 0 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-mandarina) 0%, var(--color-dorado) 100%);
    color: var(--color-blanco);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.step-content h3 {
    font-size: 0.95rem;
    color: var(--color-azul);
    margin-bottom: 0.35rem;
}

.step-content p {
    font-size: 0.85rem;
    color: var(--color-azul-suave);
    line-height: 1.5;
}

.instructions-tips {
    background: rgba(248, 250, 255, 0.7);
    border-radius: 8px;
    padding: 1.25rem;
    border-left: 4px solid var(--color-dorado);
}

.instructions-tips h3 {
    font-size: 0.95rem;
    color: var(--color-azul);
    margin-bottom: 0.75rem;
}

.instructions-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instructions-tips li {
    font-size: 0.85rem;
    color: var(--color-azul-suave);
    line-height: 1.6;
    padding: 0.3rem 0 0.3rem 1.2rem;
    position: relative;
}

.instructions-tips li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-mandarina);
    font-weight: 700;
}

.instructions-tips code {
    background: rgba(27, 58, 95, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: 'Courier New', monospace;
    color: var(--color-azul);
    word-break: break-word;
}

.instructions-reopen {
    display: block;
    margin: 0 auto 2rem;
    padding: 0.6rem 1.5rem;
    background: var(--color-blanco);
    border: 1.5px solid var(--color-azul);
    border-radius: 999px;
    color: var(--color-azul);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
}

.instructions-reopen:hover {
    background: var(--color-azul);
    color: var(--color-blanco);
}

/* ============ ESTADÍSTICAS ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--color-blanco);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.stat-card h3 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--color-azul);
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    flex: 0 0 120px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-azul);
}

.bar-track {
    flex: 1;
    height: 24px;
    background: rgba(27, 58, 95, 0.06);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-mandarina) 0%, var(--color-dorado) 100%);
    border-radius: 12px;
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 0.75rem;
    color: var(--color-blanco);
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 40px;
    overflow: hidden;
    white-space: nowrap;
}

.chart-donut {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.donut-svg {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-label {
    flex: 1;
    color: var(--color-azul);
}

.legend-value {
    font-weight: 700;
    color: var(--color-azul-suave);
}

.top-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(27, 58, 95, 0.03);
    border-radius: 8px;
    overflow: hidden;
}

.top-rank {
    flex: 0 0 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-mandarina) 0%, var(--color-dorado) 100%);
    color: var(--color-blanco);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.top-command {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-azul);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-count {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-mandarina);
    flex-shrink: 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.summary-item {
    text-align: center;
    padding: 1rem;
    background: rgba(27, 58, 95, 0.03);
    border-radius: 8px;
}

.summary-num {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-mandarina);
    margin-bottom: 0.25rem;
}

.summary-label {
    font-size: 0.78rem;
    color: var(--color-azul-suave);
    font-weight: 600;
}

/* ============ LOG / HISTORIAL ============ */
.log-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

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

.log-item {
    background: var(--color-blanco);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
    border-left: 4px solid var(--color-mandarina);
    cursor: pointer;
    transition: all var(--transition);
    overflow: hidden;
}

.log-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.log-time {
    font-size: 0.75rem;
    color: var(--color-azul-suave);
    font-weight: 600;
}

.log-ai {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    background: rgba(249, 115, 22, 0.1);
    color: var(--color-mandarina);
    border-radius: 999px;
    text-transform: uppercase;
}

.log-preview {
    font-size: 0.85rem;
    color: var(--color-azul);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
}

.log-actions-item {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.log-btn {
    padding: 0.4rem 0.8rem;
    background: rgba(27, 58, 95, 0.06);
    border: 1px solid rgba(27, 58, 95, 0.12);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-azul);
    cursor: pointer;
    transition: all var(--transition);
}

.log-btn:hover {
    background: var(--color-mandarina);
    border-color: var(--color-mandarina);
    color: var(--color-blanco);
}

.log-empty {
    text-align: center;
    padding: 3rem;
    color: var(--color-azul-suave);
    font-size: 0.95rem;
    grid-column: 1 / -1;
}

/* ============ NOTIFICACIONES ============ */
.notification-container {
    position: fixed;
    top: 100px;
    right: 20px;
    left: 20px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 400px;
    margin-left: auto;
}

.notification {
    background: var(--color-blanco);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-strong);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    max-width: 100%;
    animation: slideIn 0.3s ease;
    pointer-events: auto;
    border-left: 4px solid var(--color-mandarina);
    word-wrap: break-word;
}

.notification.success {
    border-left-color: #10b981;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification.info {
    border-left-color: #3b82f6;
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-azul);
    margin-bottom: 0.2rem;
}

.notification-message {
    font-size: 0.82rem;
    color: var(--color-azul-suave);
    word-wrap: break-word;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* ============ BOTONES ============ */
.btn-generate {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--color-mandarina) 0%, var(--color-dorado) 100%);
    color: var(--color-blanco);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    transition: all var(--transition);
    box-shadow: var(--shadow-soft);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
    .generator-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .instructions-grid {
        grid-template-columns: 1fr;
    }

    .chart-donut {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .bar-label {
        flex: 0 0 100px;
        font-size: 0.78rem;
    }

    .cmd-details-panel {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        max-height: 75vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

    .cmd-details-panel.visible {
        transform: translateY(0);
    }

    .cmd-details-panel::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: rgba(27, 58, 95, 0.2);
        border-radius: 2px;
        margin: 8px auto 0;
    }
}

@media (max-width: 600px) {
    .tabs-nav {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .log-grid {
        grid-template-columns: 1fr;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .ai-tooltip {
        max-width: 260px;
        min-width: 180px;
        font-size: 0.72rem;
    }

    .notification-container {
        right: 10px;
        left: 10px;
        top: 80px;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cmd-details-btn {
        min-width: 100%;
    }

    .cmd-details-footer {
        flex-direction: column;
    }
}

@media print {

    .site-header,
    .site-footer,
    .tabs-nav,
    .generator-form,
    .catalog-search,
    .catalog-grid,
    .stats-grid,
    .log-grid,
    .log-actions,
    .preview-actions,
    .preview-meta,
    .notification-container,
    .hero-tool,
    .instructions-panel,
    .instructions-reopen,
    .ai-tooltip,
    .cmd-details-panel,
    .cmd-details-overlay {
        display: none !important;
    }

    .generator-preview {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .preview-content {
        max-height: none;
        overflow: visible;
    }
}