:root{
--dw-ink:#171a22;--dw-muted:#6b7280;--dw-line:#e7eaf0;--dw-blue:#5266d8;--dw-blue-dark:#4052bb;
--dw-blue-soft:#eef1ff;--dw-green:#4f8f7c;--dw-green-soft:#edf8f4;--dw-purple:#7567b8;
--dw-purple-soft:#f2effa;--dw-soft:#f6f7fa;--dw-sidebar:#fbfbfd}
html,body{min-height:100%}body{color:var(--dw-ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.login-body{background:radial-gradient(circle at 15% 15%,rgba(79,99,216,.10),transparent 30rem),radial-gradient(circle at 85% 80%,rgba(83,160,132,.09),transparent 28rem),#f8f9fc}
.login-shell{width:100%;max-width:470px}.brand{display:flex;align-items:center;gap:.85rem}
.brand-mark{display:inline-flex;width:46px;height:46px;align-items:center;justify-content:center;border-radius:13px;background:var(--dw-ink);color:#fff;font-size:.9rem;font-weight:800}
.brand-mark-small{width:34px;height:34px;border-radius:9px;font-size:.72rem}.brand-name{font-weight:750;line-height:1.1}.brand-subtitle{color:var(--dw-muted);font-size:.9rem;margin-top:.15rem}
.login-card{border-radius:22px;box-shadow:0 22px 65px rgba(28,34,55,.09)}.login-footnote{text-align:center;color:#9298a5;font-size:.85rem}
.form-control,.form-select{border-radius:10px;border-color:#dfe2e8}.form-control:focus,.form-select:focus{border-color:rgba(82,102,216,.55);box-shadow:0 0 0 .2rem rgba(82,102,216,.08)}
.btn-primary{border:0;background:var(--dw-blue)}.btn-primary:hover,.btn-primary:focus{background:var(--dw-blue-dark)}
.app-body{margin:0;background:var(--dw-soft)}.app-navbar{min-height:65px;z-index:100}
.app-layout{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:calc(100vh - 65px)}
.sidebar{position:sticky;top:65px;height:calc(100vh - 65px);display:flex;flex-direction:column;justify-content:space-between;background:var(--dw-sidebar);border-right:1px solid var(--dw-line);padding:1.25rem .85rem}
.sidebar-nav{display:flex;flex-direction:column;gap:.35rem}.sidebar-link{display:flex;align-items:center;gap:.7rem;min-height:44px;padding:.65rem .8rem;border-radius:11px;color:#444a57;font-size:.93rem;font-weight:600;text-decoration:none}
.sidebar-link.active{background:#fff;color:var(--dw-ink);box-shadow:0 5px 18px rgba(30,36,58,.05)}.sidebar-link.disabled{color:#a2a7b2;cursor:default}
.sidebar-link small{margin-left:auto;font-size:.66rem;text-transform:uppercase;letter-spacing:.04em}.sidebar-dot{width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#c4c8d0}.sidebar-link.active .sidebar-dot{background:var(--dw-blue)}.sidebar-footer{padding:.4rem .8rem}
.app-main{min-width:0;padding:2.25rem 2.5rem 4rem}.page-heading{display:flex;justify-content:space-between;align-items:end;margin-bottom:1.8rem}
.eyebrow,.panel-kicker{color:var(--dw-blue);font-size:.72rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.metrics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.metric-card{padding:1.35rem 1.4rem;border:1px solid var(--dw-line);border-radius:17px;background:#fff;box-shadow:0 8px 24px rgba(32,39,61,.025)}
.metric-card-primary{background:radial-gradient(circle at 100% 0,rgba(82,102,216,.13),transparent 55%),#fff}.metric-label{color:var(--dw-muted);font-size:.82rem;font-weight:600}.metric-number{margin-top:.35rem;font-size:clamp(1.85rem,3vw,2.55rem);line-height:1;font-weight:780;letter-spacing:-.04em}.metric-foot{margin-top:.65rem;color:#8b909b;font-size:.78rem}
.panel{background:#fff;border:1px solid var(--dw-line);border-radius:18px;padding:1.45rem;box-shadow:0 8px 24px rgba(32,39,61,.02)}.panel-header{display:flex;justify-content:space-between;align-items:start;margin-bottom:1.4rem}.panel-title{margin:.25rem 0 0;font-size:1.1rem;font-weight:750}
.sector-list{display:flex;flex-direction:column;gap:1.15rem}.sector-topline{display:flex;justify-content:space-between;gap:1rem;margin-bottom:.45rem;font-size:.9rem}.sector-name{color:#3c414d}.sector-bar{height:7px;overflow:hidden;border-radius:999px;background:#f0f2f5}.sector-bar-fill{height:100%;min-width:5px;border-radius:999px;background:linear-gradient(90deg,var(--dw-blue),#7987df)}
.status-list{display:flex;flex-direction:column;gap:.65rem}.status-row{display:flex;align-items:center;justify-content:space-between;min-height:39px;border-bottom:1px solid #f0f1f4}.status-row:last-child{border-bottom:0}
.status-pill,.mini-badge{display:inline-flex;align-items:center;padding:.35rem .62rem;border-radius:999px;font-size:.76rem;font-weight:700}.status-neutral{background:#f1f2f4;color:#5f6470}.status-blue{background:var(--dw-blue-soft);color:var(--dw-blue-dark)}.status-green{background:var(--dw-green-soft);color:#36705e}.status-purple{background:var(--dw-purple-soft);color:#64569e}.status-dark{background:#252934;color:#fff}.status-muted{background:#f4f4f5;color:#989ca5}.mini-badge{background:#f1f2f5;color:#686d78;text-transform:capitalize}
.empty-hint{padding:1rem 1.1rem;border-radius:12px;background:#f8f9fb;color:#7a808b;font-size:.86rem;line-height:1.55}
.app-table{font-size:.86rem}.app-table thead th{border-bottom-color:var(--dw-line);color:#8a909b;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.app-table tbody td{border-bottom-color:#f0f1f3}
.empty-state{display:flex;gap:1rem;align-items:center;min-height:140px;padding:1rem 0}.empty-state-mark{display:inline-flex;width:64px;height:64px;flex:0 0 64px;align-items:center;justify-content:center;border-radius:18px;background:var(--dw-blue-soft);color:var(--dw-blue-dark);font-size:1.05rem;font-weight:800}
.demo-row{display:flex;justify-content:space-between;gap:1rem;padding:.85rem 0;border-bottom:1px solid #f0f1f3}.demo-row:last-child{border-bottom:0}

/* Prospectos */
.filter-panel{padding:1.25rem 1.4rem}.filter-label{margin-bottom:.4rem;color:#777d88;font-size:.75rem;font-weight:700}
.filter-panel .form-control,.filter-panel .form-select{min-height:44px;font-size:.88rem}.filter-panel .btn-primary{min-height:42px;border-radius:10px}
.list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.35rem;border-bottom:1px solid var(--dw-line)}
.prospect-table th,.prospect-table td{padding:.9rem 1rem}.prospect-table tbody tr:hover{background:#fafbfe}.contact-primary{font-weight:700;color:#292d36}.contact-email{display:inline-block;margin-top:.12rem;color:#6570a7;text-decoration:none;font-size:.82rem}.contact-email:hover{text-decoration:underline}.cell-wrap{display:inline-block;max-width:250px;line-height:1.35}.software-badge{display:inline-flex;padding:.3rem .55rem;border-radius:8px;background:var(--dw-blue-soft);color:var(--dw-blue-dark);font-size:.75rem;font-weight:750}.row-excluded{opacity:.62}.prospect-open{border:1px solid #e7e9ee;border-radius:8px;font-weight:650}
.pagination-wrap{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.35rem;border-top:1px solid var(--dw-line)}.pagination .page-link{color:var(--dw-blue-dark)}.pagination .active>.page-link{background:var(--dw-blue);border-color:var(--dw-blue);color:#fff}

/* Ficha */
.detail-head{display:flex;justify-content:space-between;gap:2rem;align-items:end;margin-bottom:1.8rem}.back-link{color:#707786;text-decoration:none;font-size:.88rem}.back-link:hover{text-decoration:underline}.detail-email{color:#6671a8;text-decoration:none}.detail-actions{display:flex;gap:.5rem}
.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.2rem 2rem}.detail-grid>div{padding-bottom:1rem;border-bottom:1px solid #f0f1f3}.detail-label{display:block;margin-bottom:.35rem;color:#8a909b;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.tag-row{display:flex;flex-wrap:wrap;gap:.5rem}.tag-chip{display:inline-flex;padding:.35rem .62rem;border-radius:8px;background:#f1f2f5;color:#555b66;font-size:.78rem;font-weight:700}
.note-form textarea{min-height:110px}.note-item{padding:1rem 0;border-top:1px solid #f0f1f3}.note-meta{margin-bottom:.35rem;color:#8a909b;font-size:.75rem}.note-text{line-height:1.55}
.timeline-simple{display:flex;flex-direction:column}.timeline-simple-item{display:grid;grid-template-columns:145px 1fr;gap:1rem;padding:.8rem 0;border-bottom:1px solid #f0f1f3}.timeline-simple-item:last-child{border-bottom:0}.timeline-simple-item>span{color:#8a909b;font-size:.78rem}.timeline-simple-item small{display:block;color:#8a909b;margin-top:.15rem}
.availability-ok{display:flex;gap:.8rem;align-items:center;padding:1rem;border-radius:12px;background:var(--dw-green-soft);color:#356b5a}.availability-ok>span{display:flex;width:34px;height:34px;align-items:center;justify-content:center;border-radius:50%;background:#d9efe7;font-weight:800}.availability-ok small{display:block;color:#5d8176;margin-top:.1rem}.origin-row{display:flex;flex-direction:column;padding:.75rem 0;border-bottom:1px solid #f0f1f3}.origin-row:last-child{border-bottom:0}.origin-row span{color:#8a909b;font-size:.78rem;margin-top:.15rem}

@media(max-width:1199.98px){.metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:991.98px){.app-layout{display:block}.sidebar{position:static;width:100%;height:auto;padding:.65rem 1rem;border-right:0;border-bottom:1px solid var(--dw-line);overflow-x:auto}.sidebar-nav{flex-direction:row;min-width:max-content}.sidebar-link{min-height:38px;padding:.5rem .7rem}.sidebar-link small,.sidebar-footer{display:none}.app-main{padding:1.5rem 1rem 3rem}}
@media(max-width:767.98px){.pagination-wrap{align-items:flex-start;flex-direction:column}.detail-head{align-items:flex-start;flex-direction:column}.detail-grid{grid-template-columns:1fr}.timeline-simple-item{grid-template-columns:1fr;gap:.2rem}}
@media(max-width:575.98px){.metrics-grid{grid-template-columns:1fr}.page-heading{margin-bottom:1.25rem}.metric-card{padding:1.2rem}.panel{padding:1.15rem;border-radius:15px}.login-card .card-body{padding:1.5rem!important}.form-control,.btn-primary{font-size:16px}}


/* v1.2 - Borrado lógico / restauración */
.danger-panel{border-color:rgba(190,70,70,.16)}
.danger-panel .btn-outline-danger,.danger-panel .btn-outline-success{border-radius:10px}


/* v1.3 - Plantillas y campañas */
.template-editor{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.86rem;line-height:1.55}
.campaign-subject{display:flex;flex-direction:column;gap:.3rem;padding:1rem 1.1rem;margin-bottom:1rem;border-radius:12px;background:#f7f8fb}
.campaign-subject span{color:#8a909b;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.campaign-preview{padding:1.25rem;border:1px solid #eceef3;border-radius:12px;background:#fff;line-height:1.6}
.summary-pair{display:flex;justify-content:space-between;gap:1rem;padding:.8rem 0;border-bottom:1px solid #f0f1f3}
.summary-pair:last-child{border-bottom:0}.summary-pair>span{color:#8a909b;font-size:.8rem}.summary-pair>strong{text-align:right;font-size:.88rem}
.summary-pair small{font-weight:400;color:#8a909b}

.btn-outline-primary{border-radius:10px}


/* v1.4.2 - Alta y edición manual de prospectos */
.check-list{display:flex;flex-direction:column;gap:.55rem}
.check-card{display:flex;align-items:center;gap:.65rem;padding:.7rem .8rem;border:1px solid #e8eaf0;border-radius:10px;background:#fafbfc;cursor:pointer}
.check-card:hover{background:#f5f7fb;border-color:#dfe3ec}
.check-card .form-check-input{margin:0;flex:0 0 auto}
.check-card span{font-size:.88rem;font-weight:600;color:#4c5260}
.organization-box{display:flex;flex-direction:column;gap:.2rem;padding:1rem;border-radius:12px;background:#f7f8fb}
.organization-box a{font-size:.82rem;color:#6671a8;text-decoration:none;word-break:break-all}
.organization-box a:hover{text-decoration:underline}


/* v1.4.5 - Envíos manuales */
.bulk-action-bar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:1rem;
    padding:.8rem 1rem;
    border-bottom:1px solid #eceef2;
    background:#fafbfc;
}
.bulk-check-all{display:flex;align-items:center;gap:.55rem;margin:0;cursor:pointer;font-size:.88rem;font-weight:600}
.select-col{width:42px;text-align:center}
.manual-recipient-list{display:flex;flex-direction:column}
.manual-recipient{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    padding:1rem 0;
    border-bottom:1px solid #eceef2;
}
.manual-recipient:first-child{padding-top:0}
.manual-recipient:last-child{border-bottom:0;padding-bottom:0}
.mail-history-list{display:flex;flex-direction:column}
.mail-history-item{
    display:flex;
    justify-content:space-between;
    gap:1.25rem;
    padding:1rem 0;
    border-bottom:1px solid #eceef2;
}
.mail-history-item:first-child{padding-top:0}
.mail-history-item:last-child{border-bottom:0;padding-bottom:0}
.mail-history-main{min-width:0}
.mail-history-meta{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:.25rem;
    flex:0 0 auto;
    font-size:.78rem;
    color:#7a808c;
}
.mail-history-meta a{text-decoration:none}
@media (max-width:767px){
    .bulk-action-bar{align-items:flex-start;flex-direction:column}
    .manual-recipient,.mail-history-item{align-items:flex-start;flex-direction:column}
    .mail-history-meta{align-items:flex-start}
}


/* v1.4.6 - UX selección y composición libre */
.select-col{width:58px!important;text-align:center}
.selector-hitbox{
    width:40px;
    height:40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin:0;
    border-radius:10px;
    cursor:pointer;
}
.selector-hitbox:hover{background:#f0f2f7}
.contact-selector,
#select-page{
    width:1.4rem;
    height:1.4rem;
    margin:0;
    cursor:pointer;
}
.contact-selector:disabled{cursor:not-allowed}

.message-mode-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:.85rem;
}
.message-mode-card{
    display:flex;
    gap:.8rem;
    align-items:flex-start;
    padding:1rem;
    border:1px solid #e2e5ec;
    border-radius:12px;
    background:#fafbfc;
    cursor:pointer;
}
.message-mode-card:hover{border-color:#cfd4df;background:#f7f8fb}
.message-mode-card input{
    width:1.2rem;
    height:1.2rem;
    margin-top:.1rem;
    flex:0 0 auto;
}
.message-mode-card span{display:flex;flex-direction:column;gap:.2rem}
.message-mode-card strong{font-size:.92rem}
.message-mode-card small{font-size:.78rem;color:#747b87;line-height:1.4}
.manual-mail-body{
    min-height:260px;
    resize:vertical;
    line-height:1.55;
}
@media (max-width:767px){
    .message-mode-grid{grid-template-columns:1fr}
}


/* v1.6 - Seguimiento */
.demo-follow-list{display:flex;flex-direction:column}
.demo-follow-item{
    display:flex;
    justify-content:space-between;
    gap:1rem;
    padding:1rem 1.5rem;
    border-top:1px solid #eceef2;
}
.demo-follow-item:first-child{border-top:0}
.activity-line{
    display:flex;
    justify-content:space-between;
    gap:1rem;
    padding:.65rem 0;
    border-bottom:1px solid #eceef2;
    font-size:.84rem;
}
.activity-line:last-child{border-bottom:0}
.activity-line span{color:#757c88;text-align:right}
@media(max-width:767px){
    .demo-follow-item,.activity-line{flex-direction:column}
    .activity-line span{text-align:left}
}


/* v1.6.1 - Editor de correo */
.editor-variable-bar{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}
.note-editor.note-frame{border:1px solid #dfe3ea;border-radius:10px;overflow:hidden;background:#fff}
.note-editor .note-toolbar{background:#f8f9fb;border-bottom:1px solid #e7e9ef;padding:.45rem}
.note-editor .note-editing-area .note-editable{font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.6;color:#222;padding:1rem}
.note-editor .note-statusbar{background:#f8f9fb}
.note-btn{border-radius:6px!important}
