/* ============================================================
   Avender Inmobiliaria — Admin (estética PRO3 / Porto)
   Sistema propio (sin Tailwind) para el panel administrativo.
   ============================================================ */
:root {
    --pro-blue:#0088cc; --pro-blue-d:#0072ad; --pro-blue-l:#e8f4fb;
    --pro-bg:#f2f3f5; --pro-white:#fff; --pro-border:#e5e7ec; --pro-border2:#eef0f3;
    --pro-text:#33353a; --pro-muted:#7a7f88; --pro-head:#f7f8fa;
    --pro-danger:#e2574c; --pro-green:#2bab6b; --pro-amber:#e0a800;
    --pro-sidebar-w:250px; --pro-header-h:54px;
    --pro-font:"Open Sans","Segoe UI",Roboto,-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;
}
* { box-sizing:border-box; }
[x-cloak]{ display:none !important; }
html,body{ margin:0; padding:0; }
body.pro-app{
    font-family:var(--pro-font); font-size:13px; line-height:1.5;
    color:var(--pro-text); background:var(--pro-bg); -webkit-font-smoothing:antialiased;
}
body.pro-app a{ color:var(--pro-blue); text-decoration:none; }
body.pro-app a:hover{ color:var(--pro-blue-d); }
img{ max-width:100%; }

/* ---- Layout ---- */
.pro-sidebar{
    position:fixed; top:0; left:0; bottom:0; width:var(--pro-sidebar-w);
    background:var(--pro-white); border-right:1px solid var(--pro-border);
    display:flex; flex-direction:column; z-index:1030; transition:transform .2s ease;
}
.pro-main{ margin-left:var(--pro-sidebar-w); min-height:100vh; display:flex; flex-direction:column; }
.pro-header{
    position:sticky; top:0; height:var(--pro-header-h); background:var(--pro-white);
    border-bottom:1px solid var(--pro-border); display:flex; align-items:center;
    justify-content:space-between; padding:0 18px; z-index:1020;
}
.pro-content{ flex:1; padding:22px; }
.pro-content.narrow{ max-width:1180px; }

/* ---- Sidebar brand + nav ---- */
.pro-brand{ height:var(--pro-header-h); display:flex; align-items:center; gap:9px; padding:0 16px; border-bottom:1px solid var(--pro-border); }
.pro-brand-logo{ width:31px; height:31px; border-radius:7px; background:var(--pro-blue); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; letter-spacing:.5px; }
.pro-brand-name{ font-weight:700; font-size:14px; line-height:1.05; }
.pro-brand-sub{ font-size:9.5px; color:var(--pro-muted); letter-spacing:1.2px; }
.pro-nav{ list-style:none; margin:0; padding:6px 0 20px; overflow-y:auto; flex:1; }
.pro-nav-section{ padding:15px 18px 6px; font-size:10px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:#a7acb5; }
.pro-nav-link{ display:flex; align-items:center; gap:11px; padding:9px 18px; color:#5b6068; font-weight:600; border-left:3px solid transparent; }
.pro-nav-link svg{ width:18px; height:18px; stroke-width:2; color:#9aa0a8; flex:0 0 auto; }
.pro-nav-link:hover{ background:#f6f7f9; color:var(--pro-text); }
.pro-nav-link.active{ color:var(--pro-blue); background:var(--pro-blue-l); border-left-color:var(--pro-blue); }
.pro-nav-link.active svg{ color:var(--pro-blue); }

/* ---- Header ---- */
.pro-toggle{ background:none; border:0; cursor:pointer; color:#5b6068; display:flex; padding:6px; border-radius:6px; }
.pro-toggle:hover{ background:#f1f2f4; }
.pro-header-title{ font-size:15px; font-weight:700; }
.pro-user{ display:flex; align-items:center; gap:9px; cursor:pointer; padding:4px 6px; border-radius:8px; }
.pro-user:hover{ background:#f6f7f9; }
.pro-avatar{ width:34px; height:34px; border-radius:50%; background:var(--pro-blue); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12.5px; flex:0 0 auto; }
.pro-user-meta{ line-height:1.15; }
.pro-user-name{ font-weight:700; font-size:12.5px; }
.pro-user-mail{ font-size:11px; color:var(--pro-muted); }
.pro-caret{ color:#a7acb5; }
.pro-dropdown{ position:absolute; right:0; top:44px; background:#fff; border:1px solid var(--pro-border); border-radius:8px; box-shadow:0 10px 30px rgba(16,24,40,.14); min-width:190px; padding:6px; z-index:1050; }
.pro-dropdown a, .pro-dropdown button{ display:flex; align-items:center; gap:9px; width:100%; padding:8px 10px; border-radius:6px; color:var(--pro-text); font-size:12.5px; background:none; border:0; cursor:pointer; text-align:left; font-family:inherit; }
.pro-dropdown a:hover, .pro-dropdown button:hover{ background:#f4f5f7; }
.pro-dropdown svg{ width:16px; height:16px; color:#8a8f98; }
.pro-dropdown form{ margin:0; }

/* ---- Page header ---- */
.pro-page{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.pro-page h1{ font-size:20px; font-weight:700; margin:0 0 2px; }
.pro-page .sub{ color:var(--pro-muted); font-size:12px; }
.pro-back{ font-size:12px; color:var(--pro-muted); display:inline-flex; align-items:center; gap:4px; }

/* ---- Cards ---- */
.pro-card{ background:#fff; border:1px solid var(--pro-border); border-radius:6px; box-shadow:0 1px 2px rgba(16,24,40,.04); margin-bottom:18px; }
.pro-card-head{ padding:12px 18px; border-bottom:1px solid var(--pro-border2); font-weight:700; font-size:11px; text-transform:uppercase; letter-spacing:.7px; color:#6b7178; }
.pro-card-body{ padding:18px; }
.pro-card-body.flush{ padding:0; }

/* ---- Buttons ---- */
.pro-btn{ display:inline-flex; align-items:center; gap:7px; padding:8px 15px; border-radius:5px; font-weight:600; font-size:12.5px; border:1px solid transparent; cursor:pointer; line-height:1.1; font-family:inherit; transition:background .15s,border-color .15s; }
.pro-btn svg{ width:15px; height:15px; }
.pro-btn-primary{ background:var(--pro-blue); color:#fff; border-color:var(--pro-blue); }
.pro-btn-primary:hover{ background:var(--pro-blue-d); color:#fff; }
.pro-btn-light{ background:#fff; color:var(--pro-text); border-color:var(--pro-border); }
.pro-btn-light:hover{ border-color:#c9cdd4; color:var(--pro-text); }
.pro-btn-danger{ background:#fff; color:var(--pro-danger); border-color:var(--pro-border); }
.pro-btn-danger:hover{ background:#fdecea; }
.pro-btn-sm{ padding:5px 10px; font-size:11.5px; }
.pro-btn[disabled]{ opacity:.55; cursor:default; }

/* ---- Forms ---- */
.pro-field{ margin-bottom:2px; }
.pro-label{ display:block; font-size:11.5px; font-weight:600; color:#5b6068; margin-bottom:5px; }
.pro-input, .pro-select, .pro-textarea{ width:100%; padding:8px 11px; border:1px solid var(--pro-border); border-radius:5px; font-size:13px; color:var(--pro-text); background:#fff; font-family:inherit; }
.pro-input:focus, .pro-select:focus, .pro-textarea:focus{ outline:0; border-color:var(--pro-blue); box-shadow:0 0 0 3px rgba(0,136,204,.12); }
.pro-input.sm, .pro-select.sm{ padding:5px 8px; font-size:12px; }
.pro-help{ font-size:11px; color:var(--pro-muted); margin-top:4px; }
.pro-error{ font-size:11px; color:var(--pro-danger); margin-top:4px; }
.pro-check{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--pro-text); cursor:pointer; }
.pro-check input{ width:15px; height:15px; accent-color:var(--pro-blue); }
.pro-grid{ display:grid; gap:15px; }
.pro-grid.c2{ grid-template-columns:1fr 1fr; }
.pro-grid.c3{ grid-template-columns:1fr 1fr 1fr; }

/* ---- Table ---- */
.pro-table-wrap{ overflow-x:auto; }
.pro-table{ width:100%; border-collapse:collapse; font-size:12.5px; min-width:760px; }
.pro-table th{ background:var(--pro-head); text-align:left; padding:11px 14px; font-size:10.5px; text-transform:uppercase; letter-spacing:.5px; color:#7a7f88; border-bottom:1px solid var(--pro-border); font-weight:700; }
.pro-table td{ padding:10px 14px; border-bottom:1px solid var(--pro-border2); vertical-align:middle; }
.pro-table tr:last-child td{ border-bottom:0; }
.pro-table tr:hover td{ background:#fafbfc; }
.pro-table .empty{ text-align:center; color:var(--pro-muted); padding:44px 14px; }

/* ---- Badges / chips ---- */
.pro-badge{ display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:20px; font-size:11px; font-weight:600; }
.pro-badge-blue{ background:var(--pro-blue-l); color:var(--pro-blue-d); }
.pro-badge-green{ background:#e5f6ec; color:#1e8a53; }
.pro-badge-gray{ background:#eef0f3; color:#6b7178; }
.pro-badge-amber{ background:#fdf3d8; color:#8a6d00; }
.pro-badge-red{ background:#fdecea; color:#c0392b; }
.pro-dot{ width:7px; height:7px; border-radius:50%; display:inline-block; }
.pro-code{ font-family:ui-monospace,SFMono-Regular,Menlo,monospace; background:#eef0f3; color:#4b5058; padding:2px 7px; border-radius:4px; font-size:11px; font-weight:600; }
.pro-star{ background:none; border:0; cursor:pointer; padding:4px; font-size:16px; line-height:1; color:#c9cdd4; }
.pro-star.on{ color:var(--pro-amber); }

/* ---- Alerts ---- */
.pro-alert{ padding:11px 15px; border-radius:6px; font-size:12.5px; margin-bottom:18px; border:1px solid; }
.pro-alert-ok{ background:#e9f7ef; border-color:#c3e9d3; color:#1e7e46; }

/* ---- Filters row ---- */
.pro-filters{ display:grid; grid-template-columns:1.6fr repeat(4,1fr); gap:10px; }

/* ---- Thumb ---- */
.pro-thumb{ width:66px; height:46px; border-radius:5px; object-fit:cover; background:#eef0f3; display:block; }
.pro-thumb.ph{ display:flex; align-items:center; justify-content:center; font-size:9px; color:#a7acb5; }

/* ---- Photos manager ---- */
.pro-drop{ border:1.5px dashed #cfd4db; background:#fafbfc; border-radius:8px; padding:16px; margin-bottom:16px; }
.pro-file{ display:block; width:100%; font-size:12.5px; color:var(--pro-muted); }
.pro-file::file-selector-button{ margin-right:12px; border:0; background:var(--pro-blue); color:#fff; padding:8px 14px; border-radius:5px; font-weight:600; font-size:12px; cursor:pointer; font-family:inherit; }
.pro-file::file-selector-button:hover{ background:var(--pro-blue-d); }
.pro-photos{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
.pro-photo{ border:1px solid var(--pro-border); border-radius:7px; overflow:hidden; background:#fff; }
.pro-photo-img{ position:relative; aspect-ratio:4/3; background:#eef0f3; }
.pro-photo-img img{ width:100%; height:100%; object-fit:cover; display:block; }
.pro-photo-cover{ position:absolute; top:6px; left:6px; background:var(--pro-blue); color:#fff; font-size:9px; font-weight:700; padding:2px 7px; border-radius:4px; text-transform:uppercase; letter-spacing:.4px; }
.pro-photo-body{ padding:8px; }
.pro-photo-alt{ width:100%; border:1px solid var(--pro-border); border-radius:4px; padding:5px 7px; font-size:11.5px; margin-bottom:7px; font-family:inherit; }
.pro-photo-acts{ display:flex; align-items:center; justify-content:space-between; gap:4px; }
.pro-iconbtn{ background:none; border:1px solid var(--pro-border); border-radius:4px; cursor:pointer; padding:3px 7px; font-size:12px; color:#5b6068; line-height:1; }
.pro-iconbtn:hover{ border-color:#c9cdd4; }
.pro-iconbtn[disabled]{ opacity:.35; cursor:default; }
.pro-linkbtn{ background:none; border:0; cursor:pointer; font-size:11px; font-weight:600; padding:3px 5px; font-family:inherit; }

/* ---- Auth (login) ---- */
.pro-auth{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px; background:linear-gradient(180deg,#eef1f4,#f2f3f5); }
.pro-auth-card{ width:100%; max-width:380px; background:#fff; border:1px solid var(--pro-border); border-radius:10px; box-shadow:0 12px 40px rgba(16,24,40,.10); padding:30px; }
.pro-auth-brand{ text-align:center; margin-bottom:22px; }
.pro-auth-logo{ width:48px; height:48px; border-radius:12px; background:var(--pro-blue); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-weight:800; font-size:18px; margin-bottom:10px; }
.pro-auth-title{ font-size:17px; font-weight:700; }
.pro-auth-sub{ font-size:12px; color:var(--pro-muted); }

/* ---- Utilities ---- */
.pro-flex{ display:flex; } .pro-ic{ align-items:center; } .pro-jb{ justify-content:space-between; }
.pro-gap{ gap:10px; } .pro-gap-sm{ gap:5px; } .pro-ml-auto{ margin-left:auto; } .pro-mt{ margin-top:16px; }
.pro-muted{ color:var(--pro-muted); } .pro-right{ text-align:right; } .pro-wrap{ flex-wrap:wrap; }
.pro-layout-2{ display:grid; grid-template-columns:2fr 1fr; gap:18px; align-items:start; }
.pro-truncate{ max-width:230px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---- Backdrop / mobile ---- */
.pro-backdrop{ display:none; }
.pro-toggle-mobile{ display:none; }
@media (max-width:900px){
    .pro-sidebar{ transform:translateX(-100%); }
    body.pro-app.sb-open .pro-sidebar{ transform:translateX(0); }
    .pro-main{ margin-left:0; }
    .pro-toggle-mobile{ display:flex; }
    body.pro-app.sb-open .pro-backdrop{ display:block; position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:1025; }
    .pro-filters{ grid-template-columns:1fr 1fr; }
    .pro-layout-2{ grid-template-columns:1fr; }
    .pro-grid.c2, .pro-grid.c3{ grid-template-columns:1fr 1fr; }
    .pro-user-meta{ display:none; }
}

/* ---- Dashboard avance del ciclo ---- */
.pro-title{ font-size:1.4rem; font-weight:700; color:#2b2f38; margin:0; }
.pro-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.pro-grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.pro-card-head{ font-size:.8rem; font-weight:600; color:var(--pro-muted); text-transform:uppercase; letter-spacing:.03em; margin-bottom:10px; }
.pro-kpi{ font-size:2.1rem; font-weight:700; color:#2b2f38; line-height:1; }
.pro-kpi-of{ font-size:1.1rem; font-weight:500; color:var(--pro-muted); }
.pro-progress{ height:8px; border-radius:6px; background:var(--pro-border); overflow:hidden; margin:12px 0 6px; }
.pro-progress > span{ display:block; height:100%; background:var(--pro-blue); border-radius:6px; }
.pro-stat{ display:flex; flex-direction:column; gap:4px; }
.pro-stat-label{ font-size:.78rem; color:var(--pro-muted); text-transform:uppercase; letter-spacing:.03em; }
.pro-stat-value{ font-size:1.35rem; font-weight:700; color:#2b2f38; }
.pro-stat-alert{ border-left:3px solid var(--pro-danger); }
.pro-stat-alert .pro-stat-value{ color:var(--pro-danger); }
@media (max-width:900px){ .pro-grid-2{ grid-template-columns:1fr; } .pro-grid-4{ grid-template-columns:1fr 1fr; } }

/* ============================================================
   LOGIN — porte del diseño de PRO3 (auth.scss) a la marca del cliente
   Dos paneles: ilustración/checklist a la izquierda, formulario a la derecha.
   ============================================================ */
.auth{ display:flex; align-items:stretch; width:100%; min-height:100vh; }
.auth__image{
    flex:1; position:relative; background:#f6f7f9;
    display:flex; flex-direction:column; justify-content:center;
    padding:5% 6%; overflow:hidden;
}
.auth__logo{ position:absolute; max-width:96px; }
.auth__logo.top-left{ left:32px; top:28px; }
.auth__checklist{ list-style:none; margin:0 0 34px; padding:0; }
.auth__checklist li{
    display:flex; align-items:center; gap:14px;
    font-size:22px; font-weight:600; color:#3a3f4b; margin-bottom:20px;
}
.auth__checklist li svg{ width:30px; height:30px; color:var(--pro-blue); flex:none; }
.auth__illus{ max-width:520px; width:100%; align-self:center; }

.auth__form{
    width:33%; min-width:380px; background:#fff; padding:4rem;
    display:flex; align-items:center; box-shadow:0 0 8px rgba(0,0,0,.12);
}
.auth__form form{ width:100%; }
.auth__title{ font-size:1.6rem; line-height:1.3; font-weight:700; color:#2b2f38; margin:0 0 .5rem; }
.auth__lead{ font-size:14px; color:#8a8f99; margin:0 0 2rem; }
.auth-field{ margin-bottom:1.1rem; position:relative; }
.auth-field label{ display:block; font-size:13px; font-weight:600; color:#5a5f6a; margin-bottom:.4rem; }
.auth-input{
    width:100%; height:44px; padding:0 42px 0 14px; font-size:14px; font-family:var(--pro-font);
    color:var(--pro-text); background:#fff; border:1px solid #d7dae0; border-radius:8px; outline:none;
    transition:border-color .15s, box-shadow .15s;
}
.auth-input:focus{ border-color:var(--pro-blue); box-shadow:0 0 0 3px rgba(0,136,204,.12); }
.auth-input.is-invalid{ border-color:var(--pro-danger); }
.auth-eye{
    position:absolute; right:6px; top:31px; width:34px; height:34px; border:none; background:transparent;
    color:#9aa0aa; cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.auth-eye:hover{ color:#4a4f59; }
.auth-err{ color:var(--pro-danger); font-size:12px; margin:.35rem 0 0; }
.btn-signin{
    width:100%; height:46px; margin-top:.6rem; border:none; border-radius:8px; cursor:pointer;
    background:#182338; color:#fff; font-family:var(--pro-font); font-size:15px; font-weight:600;
    display:flex; align-items:center; justify-content:center; gap:8px; transition:background .15s;
}
.btn-signin:hover{ background:#0f1830; }
.btn-signin:disabled{ opacity:.7; cursor:default; }
.auth-remember{ display:flex; align-items:center; gap:8px; font-size:13px; color:#5a5f6a; margin:.2rem 0 1rem; }

@media (max-width:1024px){ .auth__form{ width:42%; } }
@media (max-width:800px){
    .auth__image{ display:none; }
    .auth__form{ width:100%; min-width:0; padding:2.5rem 1.5rem; }
}

/* ---- Sidebar PRO3: caja de logo del cliente + módulos expandibles ---- */
.pro-brand{ height:auto; padding:14px; justify-content:center; }
.pro-brand-box{ width:100%; display:flex; align-items:center; justify-content:center; padding:9px 12px; border:1px solid var(--pro-border); border-radius:10px; background:#fff; }
.pro-brand-box img{ max-height:54px; width:auto; object-fit:contain; }
.pro-nav-parent{ width:100%; background:none; border:0 none; border-left:3px solid transparent; cursor:pointer; font-family:inherit; font-size:13px; text-align:left; }
.pro-nav-chev{ margin-left:auto; width:15px !important; height:15px !important; color:#b6bbc3 !important; transition:transform .18s ease; }
.pro-nav-parent.open .pro-nav-chev{ transform:rotate(90deg); }
.pro-nav-parent.open{ color:var(--pro-text); }
.pro-subnav{ list-style:none; margin:0; padding:2px 0 6px; }
.pro-subnav-link{ display:flex; align-items:center; gap:10px; padding:7px 18px 7px 46px; color:#6b7079; font-weight:600; font-size:12.5px; border-left:3px solid transparent; }
.pro-subnav-link::before{ content:""; width:5px; height:5px; border-radius:50%; background:#c4c9d1; flex:0 0 auto; }
.pro-subnav-link:hover{ background:#f6f7f9; color:var(--pro-text); }
.pro-subnav-link.active{ color:var(--pro-blue); background:var(--pro-blue-l); border-left-color:var(--pro-blue); }
.pro-subnav-link.active::before{ background:var(--pro-blue); }

/* ---- Chips (codeudores, multi-select) ---- */
.pro-chip{ display:inline-flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--pro-border); border-radius:24px; padding:5px 10px 5px 5px; font-size:12.5px; transition:border-color .15s,box-shadow .15s; }
.pro-chip:hover{ border-color:#b6bbc3; box-shadow:0 1px 3px rgba(16,24,40,.07); }
.pro-chip-avatar{ width:29px; height:29px; border-radius:50%; background:var(--pro-blue-l); color:var(--pro-blue-d); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:10.5px; letter-spacing:.3px; flex:0 0 auto; }
.pro-chip-avatar.small{ width:24px; height:24px; font-size:9.5px; }
.pro-chip-body{ display:flex; flex-direction:column; line-height:1.2; }
.pro-chip-body strong{ font-size:12.5px; color:var(--pro-text); }
.pro-chip-body small{ font-size:10.5px; color:var(--pro-muted); }
.pro-chip-x{ width:22px; height:22px; border-radius:50%; border:0; background:#eef0f3; color:#7a7f88; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:13px; line-height:1; padding:0; transition:background .15s,color .15s; }
.pro-chip-x:hover{ background:var(--pro-danger); color:#fff; }

/* ---- Multi-select con búsqueda (codeudores) ---- */
.pro-multi-search{ position:relative; }
.pro-multi-search .pro-input{ padding-right:36px; }
.pro-multi-drop{ position:absolute; top:100%; left:0; right:0; background:#fff; border:1px solid var(--pro-border); border-radius:6px; box-shadow:0 8px 30px rgba(16,24,40,.16); z-index:50; max-height:260px; overflow-y:auto; margin-top:4px; }
.pro-multi-opt{ display:flex; align-items:center; gap:10px; width:100%; padding:9px 12px; border:0; background:transparent; cursor:pointer; font-family:inherit; font-size:12.5px; text-align:left; transition:background .12s; }
.pro-multi-opt:hover{ background:var(--pro-blue-l); }
.pro-multi-opt span{ display:flex; flex-direction:column; line-height:1.25; }
.pro-multi-opt strong{ font-size:12.5px; color:var(--pro-text); }
.pro-multi-opt small{ font-size:10.5px; color:var(--pro-muted); }
.pro-multi-empty{ padding:18px 14px; text-align:center; color:var(--pro-muted); font-size:12px; }
.pro-multi-empty a{ color:var(--pro-blue); font-weight:600; }

/* ---- Layout maestro-detalle (Otros cobros) ---- */
.pro-layout-master-detail{ display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:start; }
.pro-master{ min-width:0; }
.pro-detail{ min-width:0; position:sticky; top:72px; }
.pro-row-sel{ background:var(--pro-blue-l) !important; }
.pro-row-sel td{ border-bottom-color:#d4e8f7 !important; }
@media (max-width:1100px){ .pro-layout-master-detail{ grid-template-columns:1fr; } .pro-detail{ position:static; } }

/* ---- Garantías / Codeudores (cards + formulario inline) ---- */
.pro-garantias-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(380px,1fr)); gap:14px; margin-bottom:18px; }
.pro-garantia-card{ background:#fff; border:1px solid var(--pro-border); border-radius:8px; overflow:hidden; transition:border-color .15s,box-shadow .15s; }
.pro-garantia-card:hover{ border-color:#c4c9d1; box-shadow:0 2px 8px rgba(16,24,40,.06); }
.pro-garantia-header{ display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--pro-border2); gap:8px; flex-wrap:wrap; }
.pro-garantia-body{ padding:12px 14px; }
.pro-garantia-label{ display:block; font-size:9.5px; text-transform:uppercase; letter-spacing:.5px; color:var(--pro-muted); margin-bottom:2px; }
.pro-garantia-form{ background:var(--pro-head); border:1px solid var(--pro-border); border-radius:8px; padding:18px; margin-top:18px; }

/* ---- Document chips (adjuntos de garantías) ---- */
.pro-doc-chip{ display:inline-flex; align-items:center; gap:4px; background:#fff; border:1px solid var(--pro-border); border-radius:16px; padding:3px 8px 3px 8px; font-size:11px; }
.pro-doc-chip-x{ width:16px; height:16px; border-radius:50%; border:0; background:#eef0f3; color:#7a7f88; cursor:pointer; font-size:10px; line-height:1; padding:0; }
.pro-doc-chip-x:hover{ background:var(--pro-danger); color:#fff; }

/* ---- Filter bar (PRO3: horizontal, gris, sin sombras) ---- */
.pro-filter-bar{
    display:flex; align-items:center; gap:10px; flex-wrap:wrap;
    padding:12px 18px; background:#fff; border:1px solid var(--pro-border);
    border-radius:4px; margin-bottom:16px;
}
.pro-filter-bar .pro-field{ margin-bottom:0; }
.pro-filter-bar .pro-input,
.pro-filter-bar .pro-select{ width:auto; min-width:140px; }
.pro-filter-bar .pro-input.search{ min-width:200px; }
.pro-filter-group{ display:flex; align-items:center; gap:6px; position:relative; }
.pro-filter-clear{
    position:absolute; right:6px; top:50%; transform:translateY(-50%);
    width:20px; height:20px; border-radius:50%; border:0; background:#d7dae0;
    color:#fff; cursor:pointer; font-size:13px; line-height:1; display:none;
    align-items:center; justify-content:center; padding:0;
}
.pro-filter-group.has-value .pro-filter-clear{ display:flex; }
.pro-filter-clear:hover{ background:var(--pro-danger); }
.pro-filter-bar .pro-btn{ white-space:nowrap; flex-shrink:0; }
.pro-filter-bar .pro-spacer{ flex:1; min-width:0; }

/* ---- Table sortable headers ---- */
.pro-table th.sortable{ cursor:pointer; user-select:none; position:relative; padding-right:22px; }
.pro-table th.sortable:hover{ color:var(--pro-text); }
.pro-table th.sortable::after{
    content:""; position:absolute; right:8px; top:50%; margin-top:-2px;
    border:4px solid transparent; border-top-color:#c4c9d1;
}
.pro-table th.sortable.asc::after{ border-top-color:var(--pro-blue); }
.pro-table th.sortable.desc::after{
    border-top-color:var(--pro-blue);
    transform:rotate(180deg); margin-top:-8px;
}

/* ---- Table footer (totales) ---- */
.pro-table tfoot td{
    background:var(--pro-head); font-weight:700; font-size:13px;
    border-top:2px solid var(--pro-border); padding:10px 14px;
}

/* ---- Empty state ---- */
.pro-empty{ text-align:center; padding:48px 18px; }
.pro-empty-icon{ width:48px; height:48px; border-radius:50%; background:var(--pro-head); display:inline-flex; align-items:center; justify-content:center; margin-bottom:12px; color:var(--pro-muted); }
.pro-empty p{ color:var(--pro-muted); font-size:13px; margin:0 0 4px; }
.pro-empty p strong{ color:#5b6068; }
.pro-empty .pro-btn{ margin-top:12px; }

/* ---- Column visibility toggle ---- */
.pro-col-toggle{ position:relative; display:inline-block; }
.pro-col-drop{
    display:none; position:absolute; right:0; top:100%; z-index:100;
    background:#fff; border:1px solid var(--pro-border); border-radius:6px;
    box-shadow:0 8px 24px rgba(16,24,40,.14); min-width:200px; padding:8px;
    margin-top:4px;
}
.pro-col-drop.open{ display:block; }
.pro-col-drop label{ display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:4px; font-size:12px; cursor:pointer; }
.pro-col-drop label:hover{ background:#f6f7f9; }
.pro-col-drop input[type=checkbox]{ accent-color:var(--pro-blue); }

/* ---- Export button ---- */
.pro-btn-export{ background:#fff; color:#5b6068; border-color:var(--pro-border); }
.pro-btn-export:hover{ background:#f6f7f9; border-color:#b6bbc3; color:var(--pro-text); }
