*{box-sizing:border-box}body{margin:0;background:#f5f6f8;color:#1f2937;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.topbar{min-height:70px;background:#111827;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 5%;box-shadow:0 2px 12px #0002}.brand{color:#fff;text-decoration:none;font-weight:800;letter-spacing:.08em}.brand span{font-weight:400;font-size:.75em;margin-left:5px;opacity:.7}.topbar nav{display:flex;gap:20px;flex-wrap:wrap}.topbar nav a{color:#d1d5db;text-decoration:none;font-size:14px}.container{width:min(1180px,92%);margin:38px auto;min-height:calc(100vh - 160px)}footer{text-align:center;color:#9ca3af;font-size:12px;padding:25px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.eyebrow{font-size:12px;letter-spacing:.15em;font-weight:800;color:#6b7280;margin:0 0 8px}.page-head h1{margin:0;font-size:32px}.muted{color:#6b7280}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:18px}.card,.panel,.empty,.auth-card,.stat-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 8px 30px #1118270a}.card{padding:22px}.project-card{text-decoration:none;color:inherit;transition:.15s ease}.project-card:hover{transform:translateY(-2px);box-shadow:0 12px 35px #11182715}.card-top,.card-bottom,.file-row,.simple-row{display:flex;justify-content:space-between;align-items:center;gap:12px}.card h2{margin:16px 0 6px;font-size:20px}.card-bottom{border-top:1px solid #eee;margin-top:18px;padding-top:14px;color:#6b7280;font-size:13px}.folio{font-size:12px;color:#6b7280}.badge{display:inline-block;padding:5px 10px;border-radius:999px;background:#eef2ff;color:#4338ca;font-size:12px;font-weight:700}.badge.large{padding:9px 14px}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:10px;padding:11px 16px;text-decoration:none;cursor:pointer;font-weight:700;font-size:14px}.btn.primary{background:#111827;color:#fff}.btn.ghost{background:#fff;color:#111827;border:1px solid #d1d5db}.btn.small{padding:8px 11px;background:#f3f4f6;color:#111827}.panel{padding:24px;margin-bottom:20px}.panel.narrow{max-width:560px}.two{display:grid;grid-template-columns:1fr 1fr;gap:20px}.form label{display:block;font-weight:700;font-size:14px;margin-bottom:18px}.form input,.form textarea,.form select,.admin-table select{width:100%;margin-top:7px;border:1px solid #d1d5db;border-radius:9px;padding:12px;background:#fff;font:inherit}.actions{display:flex;justify-content:flex-end}.details{display:grid;grid-template-columns:130px 1fr;gap:12px;font-size:14px}.details dt{font-weight:800;color:#6b7280}.details dd{margin:0}.upload-form{display:flex;flex-direction:column;gap:14px}.dropzone{border:2px dashed #cbd5e1;border-radius:14px;padding:28px;text-align:center;cursor:pointer;background:#f8fafc;display:flex;flex-direction:column;gap:8px}.dropzone input{display:none}.file-list{font-size:13px;color:#4b5563}.file-list div{padding:6px 0}.file-table{display:flex;flex-direction:column}.file-row,.simple-row{padding:15px 0;border-bottom:1px solid #eee}.file-row:last-child,.simple-row:last-child{border-bottom:0}.file-row small,.simple-row small,.admin-table small{display:block;color:#6b7280;margin-top:5px}.alert{padding:13px 16px;border-radius:10px;margin-bottom:18px;font-size:14px}.alert.success{background:#dcfce7;color:#166534}.alert.error{background:#fee2e2;color:#991b1b}.empty{text-align:center;padding:60px 20px}.auth-wrap{min-height:70vh;display:grid;place-items:center}.auth-card{width:min(430px,100%);padding:36px}.auth-card h1{margin:0 0 8px}.logo-mark{width:48px;height:48px;border-radius:12px;background:#111827;color:#fff;display:grid;place-items:center;font-weight:900;font-size:22px;margin-bottom:20px}.auth-card .form{margin-top:25px}.auth-link{text-align:center;margin-top:18px;font-size:14px}.auth-link a{color:#374151}.notice-box{margin-top:18px;padding:14px;border-radius:10px;background:#eef2ff;color:#312e81;word-break:break-all}.notice-box small{display:block;margin-top:8px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px}.stat-card{padding:20px}.stat-card span{display:block;color:#6b7280;font-size:13px}.stat-card strong{display:block;font-size:28px;margin-top:8px}.table-wrap{overflow:auto}.admin-table{width:100%;border-collapse:collapse}.admin-table th,.admin-table td{text-align:left;padding:14px 12px;border-bottom:1px solid #eee;vertical-align:middle}.admin-table th{font-size:12px;letter-spacing:.04em;color:#6b7280;text-transform:uppercase}.admin-table form{margin:0}.admin-table select{margin:0;padding:8px;min-width:135px}@media(max-width:900px){.stats-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:720px){.page-head,.topbar{align-items:flex-start}.page-head{flex-direction:column}.two{grid-template-columns:1fr}.topbar{height:auto;padding:18px 4%;gap:12px;flex-direction:column}.details{grid-template-columns:1fr}.file-row{align-items:flex-start}.stats-grid{grid-template-columns:1fr 1fr}}.head-actions,.row-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.row-actions form{margin:0}.btn.danger{background:#fee2e2;color:#991b1b}.filter-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto;gap:14px;align-items:end}.filter-grid label{font-weight:700;font-size:14px}.filter-grid input,.filter-grid select{width:100%;margin-top:7px;border:1px solid #d1d5db;border-radius:9px;padding:12px;background:#fff;font:inherit}.filter-actions{display:flex;gap:8px}.filter-actions .btn{white-space:nowrap}@media(max-width:1000px){.filter-grid{grid-template-columns:1fr 1fr}}@media(max-width:720px){.filter-grid{grid-template-columns:1fr}.simple-row{align-items:flex-start;flex-direction:column}}

/* ===== FASE 1.3 ===== */
.stats-six{grid-template-columns:repeat(6,1fr)}
.attention-stat{border-color:#fecaca;background:#fffafa}
.attention-stat strong{color:#b91c1c}
.section-title{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}
.section-title h2{margin:0}.section-title .eyebrow{margin-bottom:5px}
.attention-panel{border-color:#fed7aa;background:#fffbeb}
.attention-list{display:flex;flex-direction:column;gap:8px}
.attention-item{display:flex;justify-content:space-between;align-items:center;gap:15px;text-decoration:none;color:inherit;background:#fff;border:1px solid #fde68a;padding:14px;border-radius:12px}
.attention-item small{display:block;color:#6b7280;margin-top:4px}
.attention-reason{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:800;background:#f3f4f6;color:#374151}
.danger-pill,.approval-changes_requested{background:#fee2e2;color:#991b1b}
.warning-pill,.approval-pending{background:#fef3c7;color:#92400e}
.approval-approved{background:#dcfce7;color:#166534}
.approval-none{background:#f3f4f6;color:#6b7280}
.kanban{display:grid;grid-template-columns:repeat(6,minmax(210px,1fr));gap:12px;overflow-x:auto;padding-bottom:8px}
.kanban-column{background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;min-height:160px;padding:10px}
.kanban-head{display:flex;justify-content:space-between;align-items:center;padding:4px 4px 10px;font-size:13px}
.kanban-head span{background:#e5e7eb;border-radius:999px;padding:2px 7px;font-size:11px}
.kanban-cards{display:flex;flex-direction:column;gap:8px}
.kanban-card{display:flex;flex-direction:column;gap:3px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:10px;text-decoration:none;color:inherit}
.kanban-card:hover{box-shadow:0 6px 18px #11182712}
.kanban-card span{font-size:13px}.kanban-card small{font-size:11px;color:#6b7280}.kanban-card em{font-size:11px;color:#991b1b;font-style:normal;font-weight:700}
.project-summary-grid,.project-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.divider{border:0;border-top:1px solid #eee;margin:20px 0}
.compact-form{display:flex;gap:10px;align-items:flex-end}
.compact-form label{flex:1;font-size:13px;font-weight:700}
.compact-form input{width:100%;margin-top:6px;border:1px solid #d1d5db;border-radius:9px;padding:10px;font:inherit}
.approval-box{border-color:#c7d2fe;background:#eef2ff}
.approval-admin{display:flex;align-items:center;justify-content:space-between;gap:20px;border-color:#e0e7ff}
.approval-admin h2{margin:0 0 6px}.approval-admin p{margin:0}
.approval-form textarea,.comment-form textarea{width:100%;border:1px solid #d1d5db;border-radius:10px;padding:12px;font:inherit;margin-top:7px}
.approval-form label{font-weight:700;font-size:14px}
.approval-actions{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.checkbox-line{display:flex!important;align-items:center;gap:8px;font-size:13px!important;font-weight:500!important;margin:10px 0 14px}
.checkbox-line input{width:auto!important;margin:0!important}
.comments-list{display:flex;flex-direction:column;gap:10px;margin-top:20px}
.comment-card{border:1px solid #e5e7eb;border-radius:12px;padding:14px;background:#fff}
.comment-card p{margin:10px 0 0;white-space:normal}
.internal-comment{background:#fffbeb;border-color:#fde68a}
.comment-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.comment-meta span,.comment-meta small{font-size:11px;color:#6b7280}
.timeline{display:flex;flex-direction:column}
.timeline-item{display:grid;grid-template-columns:16px 1fr;gap:10px;position:relative;padding-bottom:18px}
.timeline-item:before{content:"";position:absolute;left:5px;top:14px;bottom:0;width:1px;background:#e5e7eb}
.timeline-item:last-child:before{display:none}
.timeline-dot{width:11px;height:11px;border-radius:50%;background:#111827;margin-top:4px;z-index:1}
.timeline-item small{display:block;color:#6b7280;margin-top:3px}
.timeline-item p{margin:5px 0 0;color:#4b5563;font-size:13px}
.client-action-banner{margin:12px 0 0;background:#fef3c7;color:#92400e;border-radius:8px;padding:8px 10px;font-size:12px;font-weight:800}
.client-action-banner.changes{background:#fee2e2;color:#991b1b}
.client-action-banner.approved{background:#dcfce7;color:#166534}
.upload-inline-warning{margin-top:8px;padding:8px;border-radius:8px;background:#fee2e2;color:#991b1b;font-weight:700}
@media(max-width:1180px){.stats-six{grid-template-columns:repeat(3,1fr)}}
@media(max-width:850px){.project-summary-grid,.project-detail-grid{grid-template-columns:1fr}.approval-admin{align-items:flex-start;flex-direction:column}}
@media(max-width:720px){.stats-six{grid-template-columns:1fr 1fr}.attention-item{align-items:flex-start;flex-direction:column}.attention-reason{justify-content:flex-start}.compact-form{align-items:stretch;flex-direction:column}}

.download-status{margin-top:7px;display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px;font-weight:700}
.download-status small{margin:0;font-weight:400}
.download-status.downloaded{color:#166534}
.download-status.pending-download{color:#6b7280}
.storage-stat small{display:block;color:#6b7280;font-size:11px;margin-top:5px;line-height:1.35}
.storage-progress{height:7px;background:#e5e7eb;border-radius:999px;overflow:hidden;margin-top:10px}
.storage-progress span{display:block;height:100%;background:#111827;border-radius:999px;min-width:0}

.provider-control-panel{border-left:4px solid #111827}
.provider-control-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.provider-control-head h2{margin:0}
.provider-control-numbers{display:flex;gap:12px;flex-wrap:wrap}
.provider-control-numbers>div{min-width:92px;text-align:center;background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:12px}
.provider-control-numbers strong{display:block;font-size:22px}
.provider-control-numbers span{display:block;font-size:11px;color:#6b7280;margin-top:3px}
.provider-download-status{margin-top:9px;display:flex;gap:9px;align-items:flex-start;padding:9px 11px;border-radius:10px;width:fit-content;max-width:100%}
.provider-download-status.downloaded{background:#dcfce7;color:#166534}
.provider-download-status.pending{background:#f3f4f6;color:#4b5563}
.provider-download-status .status-dot{font-size:18px;line-height:1}
.provider-download-status strong{display:block;font-size:12px;letter-spacing:.025em}
.provider-download-status small{display:block;margin-top:3px;color:inherit;font-weight:400}
.provider-own-status{margin-top:8px;font-size:12px;font-weight:700;color:#166534}
.provider-own-status.pending{color:#6b7280}
.file-info-block{min-width:0;flex:1}
.provider-file-row{align-items:center}
@media(max-width:720px){.provider-control-head{flex-direction:column}.provider-file-row{align-items:flex-start}}

.assign-provider{margin-top:8px}
.assign-provider summary{cursor:pointer;font-size:12px;font-weight:700}
.inline-assign-form{display:flex;gap:8px;align-items:center;margin-top:8px;flex-wrap:wrap}
.inline-assign-form select{min-width:260px;border:1px solid #d1d5db;border-radius:9px;padding:9px;background:#fff}

.file-preview-box{
    width:88px;
    height:70px;
    flex:0 0 88px;
    border:1px solid #e5e7eb;
    border-radius:10px;
    overflow:hidden;
    background:#f8fafc;
    display:flex;
    align-items:center;
    justify-content:center;
}
.file-preview-box img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.pdf-preview-placeholder{
    width:100%;
    height:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    text-decoration:none;
    color:#374151;
    font-size:10px;
    font-weight:700;
}
.preview-file-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:38px;
    height:28px;
    padding:0 6px;
    border-radius:6px;
    background:#e5e7eb;
    color:#374151;
    font-size:10px;
    font-weight:800;
    letter-spacing:.04em;
}
.generic-file-preview{
    color:#6b7280;
}
.preview-btn{
    background:#fff;
    border:1px solid #d1d5db;
}
.provider-file-row{
    gap:14px;
}
@media(max-width:720px){
    .file-preview-box{
        width:100%;
        height:150px;
        flex-basis:auto;
    }
    .generic-file-preview{
        height:70px;
    }
}

/* Fase 1.3.2.6 - preview compacto en tarjetas */
.project-card-with-preview{
    padding:0;
    overflow:hidden;
}
.project-card-preview{
    width:100%;
    height:145px;
    background:#eef1f5;
    border-bottom:1px solid #e5e7eb;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}
.project-card-preview img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.project-card-content{
    padding:20px 22px 18px;
}
.project-pdf-preview,
.project-no-preview{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:7px;
    color:#6b7280;
    font-size:12px;
}
.project-preview-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:52px;
    height:38px;
    padding:0 9px;
    border-radius:8px;
    background:#fff;
    border:1px solid #d1d5db;
    color:#374151;
    font-size:11px;
    font-weight:800;
    letter-spacing:.04em;
}
.project-preview-grid{
    align-items:start;
}

/* El detalle del proyecto vuelve a ser compacto */
.provider-file-row .file-info-block{
    padding-right:10px;
}

.associated-preview-note{
    display:block;
    margin-top:4px;
    color:#6b7280;
    font-size:11px;
}

.comments-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.internal-note-option{display:flex!important;align-items:center;gap:8px;margin:10px 0 16px!important;font-size:13px!important}
.internal-note-option input{width:auto!important;margin:0!important}
.public-pill{background:#dcfce7;color:#166534}
.internal-pill{background:#fef3c7;color:#92400e}

/* FASE 1.3.2.37 — tablero compacto de 4 columnas */
.kanban {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    overflow-x: visible !important;
}

.kanban-column {
    min-width: 0 !important;
    width: auto !important;
}

.kanban-card {
    min-width: 0 !important;
    overflow-wrap: anywhere;
}

.kanban-head {
    gap: 6px;
}

@media (max-width: 900px) {
    .kanban {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .kanban {
        grid-template-columns: 1fr !important;
    }
}

/* FASE 1.3.2.39 — comentarios del proveedor con mejor legibilidad */
.file-comment,
.file-comment p,
.file-comment .comment-text,
.project-file-comment,
.project-file-comment p {
    font-size: calc(1em + 2px);
}

.file-comment small,
.file-comment .comment-date,
.project-file-comment small {
    font-size: calc(1em + 2px);
}


/* FASE 1.3.2.40 — corrección del bloque real "Comentario de Impactarte" */
/* El bloque del comentario se genera dentro de la fila del archivo y usa
   estilos inline; por eso los selectores de la fase 1.3.2.39 no lo alcanzaban. */
.provider-file-row .file-info-block [style*="border-left"],
.provider-file-row .file-info-block [style*="border-left"] p,
.provider-file-row .file-info-block [style*="border-left"] div,
.provider-file-row .file-info-block [style*="border-left"] span,
.provider-file-row .file-info-block [style*="border-left"] strong {
    font-size: 18px !important;
    line-height: 1.48 !important;
}

.provider-file-row .file-info-block [style*="border-left"] small {
    font-size: 16px !important;
    line-height: 1.45 !important;
}

/* FASE 1.3.3.7 — identificación de proveedores y servicios por proveedor */
.provider-color-line{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:13px;font-weight:700;color:#374151}
.provider-color-line i{width:12px;height:12px;border-radius:50%;display:inline-block;box-shadow:0 0 0 3px rgba(0,0,0,.05)}
.provider-settings-separator{border:0;border-top:1px solid #e5e7eb;margin:8px 0 4px}
.provider-color-editor{display:flex;align-items:center;gap:12px}
.provider-color-editor input[type=color]{width:58px!important;height:42px!important;padding:3px!important;cursor:pointer}
.provider-color-editor span{font-family:monospace;font-weight:800;color:#4b5563}

/* RECOLECCIÓN 1.0 */
.pickup-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.pickup-card{display:flex;flex-direction:column;gap:8px;background:#fff;border:1px solid #e5e7eb;border-left:5px solid var(--provider-color,#2563eb);border-radius:16px;padding:20px;text-decoration:none;color:inherit;box-shadow:0 8px 30px #1118270a;transition:.15s ease}.pickup-card:hover{transform:translateY(-2px);box-shadow:0 12px 35px #11182715}.pickup-card h2{margin:5px 0 0;font-size:19px}.pickup-card p{margin:0;color:#4b5563}.pickup-card small{display:block;color:#6b7280}.pickup-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.pickup-status{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;background:#f3f4f6;color:#374151}.status-pending_pickup{background:#fef3c7;color:#92400e}.status-requested{background:#dbeafe;color:#1e40af}.status-picked_up{background:#ede9fe;color:#5b21b6}.status-arrived{background:#cffafe;color:#155e75}.status-review{background:#ffedd5;color:#9a3412}.status-completed{background:#dcfce7;color:#166534}.pickup-filters{display:grid;grid-template-columns:1fr 1fr auto;gap:14px;align-items:end}.pickup-filters label{font-weight:700;font-size:14px}.pickup-filters select{width:100%;margin-top:7px;border:1px solid #d1d5db;border-radius:9px;padding:12px;background:#fff;font:inherit}.pickup-wide{max-width:820px}.pickup-provider-step{padding-bottom:4px;border-bottom:1px solid #e5e7eb;margin-bottom:22px}.pickup-project-list{max-height:380px;overflow:auto;border:1px solid #e5e7eb;border-radius:12px;margin:-8px 0 20px}.pickup-project-option{display:flex!important;align-items:flex-start;gap:12px;margin:0!important;padding:13px 14px;border-bottom:1px solid #eee;cursor:pointer}.pickup-project-option:last-child{border-bottom:0}.pickup-project-option:hover{background:#f8fafc}.pickup-project-option input{width:auto!important;margin:4px 0 0!important}.pickup-project-option span{min-width:0}.pickup-project-option small{display:block;color:#6b7280;margin-top:4px;font-weight:400}.provider-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:7px}.pickup-notes{margin-top:20px;padding-top:16px;border-top:1px solid #eee}.pickup-notes p{white-space:normal}.section-title{display:flex;justify-content:space-between;align-items:center;gap:14px}.section-title h2{margin:0}.section-title .eyebrow{margin-bottom:5px}.btn:disabled{opacity:.45;cursor:not-allowed}@media(max-width:720px){.pickup-filters{grid-template-columns:1fr}.pickup-detail-grid{grid-template-columns:1fr}}
