/* ==========================================
   EXCEL I/O — Import/Export Styles
   ========================================== */

/* Overlay */
.xlio-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.xlio-overlay.xlio-visible { opacity: 1; }

/* Modal */
.xlio-modal {
    background: #fff;
    border-radius: 16px;
    width: 620px;
    max-width: 94vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
    overflow: hidden;
}
.xlio-visible .xlio-modal { transform: translateY(0) scale(1); }

/* Header */
.xlio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}
.xlio-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}
.xlio-close {
    background: none; border: none; color: #94a3b8;
    font-size: 1.6rem; cursor: pointer; line-height: 1;
    transition: color 0.2s;
}
.xlio-close:hover { color: #fff; }

/* Body */
.xlio-body { padding: 24px; overflow-y: auto; flex: 1; }

/* Dropzone */
.xlio-dropzone {
    border: 2.5px dashed #cbd5e1;
    border-radius: 14px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fafbfc;
}
.xlio-dropzone:hover, .xlio-drag-active {
    border-color: #00ADEF;
    background: rgba(0, 173, 239, 0.04);
    transform: scale(1.01);
}
.xlio-drop-icon { font-size: 3rem; margin-bottom: 10px; }
.xlio-drop-text { font-size: 1rem; font-weight: 700; color: #334155; margin-bottom: 4px; }
.xlio-drop-sub { font-size: 0.85rem; color: #94a3b8; }
.xlio-drop-formats { font-size: 0.7rem; color: #cbd5e1; margin-top: 8px; letter-spacing: 0.1em; font-weight: 600; }

/* Tip */
.xlio-tip {
    display: flex; gap: 8px; align-items: center;
    margin-top: 16px; padding: 10px 14px;
    background: #f8fafc; border-radius: 8px;
    font-size: 0.82rem; color: #64748b;
    border: 1px solid #e2e8f0;
}
.xlio-tip a { color: #00ADEF; font-weight: 600; text-decoration: none; }
.xlio-tip a:hover { text-decoration: underline; }

/* Mode selector */
.xlio-mode-selector {
    margin-top: 16px; padding: 14px;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
}
.xlio-mode-label { font-size: 0.85rem; font-weight: 700; color: #92400e; margin-bottom: 10px; }
.xlio-radio {
    display: block; margin-bottom: 6px; font-size: 0.85rem; color: #334155;
    cursor: pointer;
}
.xlio-radio input { margin-right: 8px; accent-color: #00ADEF; }

/* Preview — Summary */
.xlio-summary-grid { margin-bottom: 16px; }
.xlio-summary-total { font-size: 1.1rem; font-weight: 800; color: #1e293b; margin-bottom: 10px; }
.xlio-summary-num { color: #00ADEF; font-size: 1.4rem; }
.xlio-summary-breakdown { display: flex; flex-wrap: wrap; gap: 8px; }
.xlio-chip {
    padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600;
}
.xlio-chip-fase { background: #0f172a; color: #fff; }
.xlio-chip-task { background: #dbeafe; color: #1e40af; }
.xlio-chip-sub { background: #f1f5f9; color: #64748b; }
.xlio-chip-hito { background: #fef3c7; color: #92400e; }
.xlio-chip-ent { background: #ede9fe; color: #6d28d9; }

/* Preview — Warnings */
.xlio-warnings {
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
    padding: 12px 14px; margin-bottom: 16px;
}
.xlio-warn-title { font-size: 0.85rem; font-weight: 700; color: #92400e; margin-bottom: 6px; }
.xlio-warn-item { font-size: 0.78rem; color: #78350f; margin-bottom: 2px; }
.xlio-no-warn {
    background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
    padding: 10px 14px; font-size: 0.85rem; color: #166534;
    font-weight: 600; margin-bottom: 16px;
}

/* Preview — Table */
.xlio-preview-table-wrap {
    max-height: 300px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 8px;
}
.xlio-preview-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.xlio-preview-table th {
    background: #f1f5f9; color: #64748b; font-weight: 700; font-size: 0.72rem;
    text-transform: uppercase; padding: 8px 10px; position: sticky; top: 0; z-index: 1;
    border-bottom: 2px solid #e2e8f0;
}
.xlio-preview-table td { padding: 6px 10px; border-bottom: 1px solid #f1f5f9; }
.xlio-row-fase td { font-weight: 800; background: #f8fafc; color: #0f172a; }
.xlio-row-hito td { font-weight: 700; color: #92400e; }
.xlio-row-entregable td { font-weight: 700; color: #7c3aed; }
.xlio-row-subtarea td { color: #64748b; font-size: 0.78rem; padding-left: 24px; }

/* Footer */
.xlio-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 24px; border-top: 1px solid #e2e8f0; background: #f8fafc;
}
.xlio-btn {
    padding: 8px 20px; border-radius: 8px; font-size: 0.85rem; font-weight: 700;
    cursor: pointer; border: none; transition: all 0.2s;
}
.xlio-btn-secondary { background: #e2e8f0; color: #475569; }
.xlio-btn-secondary:hover { background: #cbd5e1; }
.xlio-btn-back { background: #fff; color: #475569; border: 1px solid #cbd5e1; }
.xlio-btn-back:hover { background: #f1f5f9; border-color: #94a3b8; }
.xlio-btn-primary { background: #00ADEF; color: #fff; }
.xlio-btn-primary:hover { background: #0090c0; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,173,239,0.3); }

/* Toolbar Excel buttons */
.btn-toolbar-excel {
    background: #166534 !important;
    color: #fff !important;
    border-color: #166534 !important;
}
.btn-toolbar-excel:hover {
    background: #15803d !important;
    border-color: #15803d !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(22,101,52,0.3);
}
.btn-toolbar-template {
    background: #f8fafc !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
    font-weight: 500 !important;
}
.btn-toolbar-template:hover {
    color: #00ADEF !important;
    border-color: #00ADEF !important;
}
