/* =====================================================================
   Apoyando a Venezuela — diseño editorial / neo-brutalista
   Bordes marcados, sombras sólidas, tipografía fuerte, bandera venezolana.
   ===================================================================== */
:root {
    --ink: #15191f;          /* casi negro: bordes y texto */
    --paper: #f2ede2;        /* fondo cálido (papel) */
    --card: #ffffff;
    --azul: #143cc4;
    --azul-d: #0e2c93;
    --amarillo: #ffd21e;
    --rojo: #e11d2a;
    --verde: #14784a;
    --gris: #586577;
    --line: #15191f;
    --radius: 4px;
    --bd: 2px solid var(--ink);
    --bd-thick: 3px solid var(--ink);
    --shadow-sm: 3px 3px 0 var(--ink);
    --shadow: 5px 5px 0 var(--ink);
    --shadow-lg: 8px 8px 0 var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--ink);
    background-color: var(--paper);
    background-image: radial-gradient(rgba(21,25,31,.06) 1.2px, transparent 1.2px);
    background-size: 22px 22px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }

a { color: var(--azul-d); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 18px; }

/* Franja tricolor superior (motivo recurrente) */
.flagstrip { height: 6px; background: linear-gradient(90deg, var(--amarillo) 33.33%, #fff 33.33% 66.66%, var(--rojo) 66.66%); }

/* Cinta "sin fines de lucro" (transparencia desde el inicio) */
.ribbon { background: var(--ink); color: #fff; text-align: center; font-size: .8rem; font-weight: 700;
    letter-spacing: .02em; padding: 6px 14px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.ribbon .icon { color: var(--amarillo); }

/* ------------------------------ Header --------------------------------- */
.site-header { background: var(--card); border-bottom: var(--bd-thick); position: sticky; top: 0; z-index: 50; }
.site-header .container { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.12rem; text-transform: uppercase; letter-spacing: -.01em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.flag-dot { width: 28px; height: 28px; border: var(--bd); border-radius: 5px;
    background: linear-gradient(180deg, var(--amarillo) 33.33%, var(--azul) 33.33% 66.66%, var(--rojo) 66.66%); }

.nav { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { display: inline-flex; align-items: center; gap: 5px; padding: 8px 9px; border-radius: var(--radius);
    color: var(--ink); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.nav a:hover { background: var(--amarillo); text-decoration: none; }

.lang-switch { display: inline-flex; gap: 3px; margin-left: 8px; }
.lang-switch a { display: inline-flex; align-items: center; gap: 4px; padding: 6px 9px; border: var(--bd); border-radius: var(--radius); font-weight: 800; font-size: .78rem; color: var(--ink); white-space: nowrap; }
.lang-switch .fl { font-size: .95rem; line-height: 1; }
.lang-switch a.active { background: var(--ink); color: #fff; }
.lang-switch a:hover { text-decoration: none; background: var(--amarillo); }
.lang-switch a.active:hover { background: var(--ink); color: #fff; }

.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 40px;
    background: var(--card); border: var(--bd); border-radius: var(--radius); cursor: pointer; box-shadow: var(--shadow-sm); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 22px; height: 2.5px; background: var(--ink); position: relative; transition: .2s; }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

/* ------------------------------ Botones -------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: var(--bd); cursor: pointer; font: inherit; font-weight: 800; text-transform: uppercase;
    letter-spacing: .02em; font-size: .9rem; padding: 11px 18px; border-radius: var(--radius);
    background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm);
    transition: transform .08s ease, box-shadow .08s ease, background .15s; text-align: center;
}
.btn:hover { text-decoration: none; transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.btn:active { transform: translate(0, 0); box-shadow: 2px 2px 0 var(--ink); }
.btn-primary { background: var(--azul); color: #fff; }
.btn-accent { background: var(--amarillo); color: var(--ink); }
.btn-danger { background: var(--rojo); color: #fff; }
.btn-success { background: var(--verde); color: #fff; }
.btn-ghost { background: var(--card); color: var(--ink); }
.btn-sm { padding: 7px 12px; font-size: .8rem; box-shadow: 2px 2px 0 var(--ink); }
.btn-block { display: flex; width: 100%; }

/* ------------------------------- Hero ---------------------------------- */
.hero { position: relative; background: var(--azul); color: #fff; border-bottom: var(--bd-thick); overflow: hidden; padding: 56px 0; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .5; pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; margin: 0 0 16px; }
.hero h1::after { content: ""; display: block; width: 120px; height: 8px; margin-top: 14px;
    background: linear-gradient(90deg, var(--amarillo) 33.33%, #fff 33.33% 66.66%, var(--rojo) 66.66%); }
.hero p { font-size: 1.12rem; max-width: 560px; opacity: .96; margin: 0 0 24px; }
.hero-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--amarillo); color: var(--ink);
    border: var(--bd); box-shadow: var(--shadow-sm); padding: 6px 14px; border-radius: var(--radius);
    font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 18px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; }
.trust span { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-size: .9rem; font-weight: 700; }

.hero-art { display: grid; gap: 14px; }
.art-card { display: flex; align-items: center; gap: 14px; background: #fff; color: var(--ink);
    padding: 14px 16px; border: var(--bd); border-radius: var(--radius); box-shadow: var(--shadow); }
.art-card-2 { margin-left: 34px; }
.art-card-3 { margin-left: 16px; }
.art-icon { width: 50px; height: 50px; border: var(--bd); border-radius: var(--radius); display: grid; place-items: center;
    background: var(--azul); color: #fff; flex: none; }
.art-icon-red { background: var(--rojo); color: #fff; }
.art-icon-yellow { background: var(--amarillo); color: var(--ink); }
.art-sub { color: var(--gris); font-size: .86rem; }

/* ------------------------------ Secciones ------------------------------ */
.section { padding: 46px 0; }
.section .sub { color: var(--gris); margin: 0 0 24px; font-size: 1.02rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
h2 { position: relative; display: inline-block; }
.section h2 { margin: 0 0 6px; }

/* Eyebrow / etiquetas */
.meta { color: var(--gris); font-size: .9rem; }
.amount { font-weight: 900; color: var(--ink); }

/* ------------------------------- Stats --------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stat { background: var(--card); border: var(--bd); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); }
.stat-ic { width: 44px; height: 44px; margin: 0 auto 8px; border: var(--bd); border-radius: var(--radius);
    display: grid; place-items: center; background: var(--amarillo); color: var(--ink); }
.stat .num { font-size: 2rem; font-weight: 900; color: var(--azul-d); }
.stat .lbl { color: var(--gris); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

/* ------------------------------- Cards --------------------------------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { background: var(--card); border: var(--bd); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

.case-card { position: relative; overflow: hidden; padding-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.case-strip { position: absolute; top: 0; left: 0; right: 0; height: 8px; background: var(--cat, var(--azul)); border-bottom: var(--bd); }
.case-card h3 { margin: 0; font-size: 1.12rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.case-card .desc { color: var(--gris); font-size: .94rem; }
.case-card .foot { margin-top: auto; }
.case-badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* ------------------------------- Badges -------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 800; line-height: 1;
    text-transform: uppercase; letter-spacing: .02em; padding: 5px 9px; border: var(--bd); border-radius: var(--radius); background: #fff; color: var(--ink); }
.badge-cat { background: #eef2ff; color: var(--azul-d); }
.badge-pending { background: var(--amarillo); color: var(--ink); }
.badge-pre_approved { background: #dbe4ff; color: var(--azul-d); }
.badge-approved { background: #c9f0db; color: var(--verde); }
.badge-rejected { background: #ffd4d8; color: var(--rojo); }
.badge-funded { background: #dbe4ff; color: var(--azul-d); }
.badge-verified { background: #c9f0db; color: var(--verde); }
.badge-featured { background: var(--amarillo); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }

/* ----------------------------- Barra progreso -------------------------- */
.progress { height: 14px; background: var(--paper); border: var(--bd); border-radius: var(--radius); overflow: hidden; }
.progress-bar { height: 100%; min-width: 4px; transition: width .6s ease; border-right: var(--bd); }
.progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 8px; font-size: .9rem; }

/* ------------------------ Tarjeta meta + anillo ------------------------ */
.goal-card { border-width: 2px; }
.goal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.goal-ring { width: 66px; height: 66px; border-radius: 50%; flex: none; display: grid; place-items: center; border: var(--bd);
    background: conic-gradient(var(--col) calc(var(--pct) * 1%), var(--paper) 0); }
.goal-ring span { width: 48px; height: 48px; border-radius: 50%; background: #fff; border: var(--bd); display: grid; place-items: center; font-weight: 900; font-size: .8rem; }

/* ---------------------------- Cómo funciona ---------------------------- */
.how { background: var(--card); border-top: var(--bd-thick); border-bottom: var(--bd-thick); }
.feature { text-align: center; }
.feature-ic { width: 64px; height: 64px; margin: 0 auto 12px; border: var(--bd); border-radius: var(--radius); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.feature-ic-blue { background: var(--azul); color: #fff; }
.feature-ic-yellow { background: var(--amarillo); color: var(--ink); }
.feature-ic-red { background: var(--rojo); color: #fff; }

/* ------------------------------- Buscador ------------------------------ */
.searchbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff;
    border: var(--bd); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 6px 8px; margin-bottom: 18px; }
.searchbar-ic { display: inline-flex; color: var(--gris); padding-left: 4px; flex: none; }
.searchbar-input { flex: 1 1 220px; min-width: 0; border: 0; outline: none; font: inherit; font-size: 1.05rem;
    padding: 8px 6px; background: transparent; color: var(--ink); }
.searchbar .btn { flex: none; }
@media (max-width: 560px) {
    .searchbar { padding: 8px; }
    .searchbar-input { flex-basis: 100%; }
    .searchbar .btn { flex: 1; }
}

/* ------------------------------- Filtros ------------------------------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.filters a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--radius);
    background: #fff; border: var(--bd); color: var(--ink); font-weight: 700; font-size: .85rem; box-shadow: 2px 2px 0 var(--ink); }
.filters a:hover { text-decoration: none; transform: translate(-1px,-1px); }
.filters a.active { background: var(--ink); color: #fff; }

/* ----------------------------- Formularios ----------------------------- */
.form-card { max-width: 560px; margin: 0 auto; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 800; margin-bottom: 6px; font-size: .9rem; text-transform: uppercase; letter-spacing: .02em; }
.field .hint { color: var(--gris); font-weight: 500; font-size: .82rem; text-transform: none; letter-spacing: 0; }
.input, .select, .textarea { width: 100%; padding: 11px 13px; border: var(--bd); border-radius: var(--radius); font: inherit; background: #fff; color: var(--ink); }
.input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: var(--shadow-sm); }
.textarea { min-height: 130px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-cards label { border: var(--bd); border-radius: var(--radius); padding: 14px; cursor: pointer; display: block; box-shadow: 2px 2px 0 var(--ink); text-transform: none; letter-spacing: 0; }
.radio-cards label:hover { background: #fffceb; }
.radio-cards input { margin-right: 8px; }
.file-name { margin-top: 6px; font-size: .85rem; color: var(--azul-d); font-weight: 600; word-break: break-all; }

/* ------------------------------ Alertas -------------------------------- */
.alert { padding: 13px 16px; border: var(--bd); border-radius: var(--radius); margin-bottom: 16px; font-weight: 700; box-shadow: var(--shadow-sm); }
.alert-success { background: #c9f0db; color: #0c5234; }
.alert-error { background: #ffd4d8; color: #8a121f; }
.alert ul { margin: 6px 0 0; padding-left: 20px; font-weight: 500; }

/* ------------------------------ Detalle -------------------------------- */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.pay-box { background: #fffceb; border: var(--bd); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.pay-box .pay-line { padding: 8px 0; border-bottom: 1px dashed var(--ink); }
.pay-box .pay-line:last-child { border-bottom: 0; }
.pay-box .pay-line strong { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--azul-d); }
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { padding: 8px 0; border-bottom: 1px solid rgba(21,25,31,.15); }

/* ------------------------------- Tablas -------------------------------- */
.table-wrap { border: var(--bd); border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.simple { width: 100%; min-width: 520px; border-collapse: collapse; }
table.simple th, table.simple td { text-align: left; padding: 11px 13px; border-bottom: 1px solid rgba(21,25,31,.15); }
table.simple thead th { background: var(--ink); color: #fff; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
table.simple tbody tr:last-child td { border-bottom: 0; }

/* ------------------------------ Footer --------------------------------- */
.site-footer { background: var(--ink); color: #cdd6e2; border-top: var(--bd-thick); padding: 32px 0; margin-top: 50px; }
.site-footer a { color: #fff; }
.site-footer .bar { height: 7px; border-radius: 3px; margin-bottom: 20px;
    background: linear-gradient(90deg, var(--amarillo) 33.33%, #fff 33.33% 66.66%, var(--rojo) 66.66%); }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1.1fr 1.2fr; gap: 30px; margin-bottom: 22px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; color: #fff; text-transform: uppercase; font-weight: 900; margin: 0 0 8px; }
.footer-title { color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: .85rem; margin: 0 0 8px; }
.site-footer .footer-grid a { color: #cdd6e2; line-height: 1.9; }

/* --------------------------- Estados vacíos ---------------------------- */
.empty { text-align: center; color: var(--gris); padding: 46px 20px; background: var(--card); border: var(--bd); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty-art { width: 170px; max-width: 60%; height: auto; margin: 0 auto 6px; display: block; }

/* --------------------- Overlay de subida (progreso) -------------------- */
.upload-overlay { position: fixed; inset: 0; z-index: 999; display: none; align-items: center; justify-content: center;
    background: rgba(21,25,31,.62); padding: 20px; }
.upload-overlay.show { display: flex; }
.upload-box { background: #fff; border: var(--bd-thick); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 26px; width: 100%; max-width: 380px; text-align: center; }
.upload-spinner { width: 40px; height: 40px; margin: 0 auto 14px; border: 4px solid var(--paper); border-top-color: var(--azul); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.upload-title { font-weight: 800; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 14px; }
.upload-bar { height: 18px; background: var(--paper); border: var(--bd); border-radius: var(--radius); overflow: hidden; }
.upload-fill { height: 100%; width: 0; background: var(--azul); border-right: var(--bd); transition: width .2s ease; }
.upload-meta { margin-top: 10px; font-weight: 700; color: var(--gris); font-size: .9rem; }
.upload-pct { color: var(--azul-d); }

/* --------------------------- Visor de imágenes -------------------------- */
.lightbox-overlay { position: fixed; inset: 0; z-index: 999; display: none; align-items: center; justify-content: center;
    background: rgba(21,25,31,.88); padding: 20px; }
.lightbox-overlay.show { display: flex; }
.lightbox-box { max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; background: #fff;
    border: var(--bd-thick); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.lightbox-box img { display: block; max-width: 92vw; max-height: 66vh; width: auto; height: auto; margin: 0 auto; }
.lightbox-caption { max-height: 20vh; overflow-y: auto; padding: 10px 16px; font-size: .92rem; white-space: pre-line;
    border-top: var(--bd); -webkit-overflow-scrolling: touch; }
.lightbox-caption:empty { display: none; padding: 0; border: none; }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
    background: #fff; color: var(--ink); border: var(--bd); box-shadow: var(--shadow-sm); font-size: 1.4rem; line-height: 1;
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 1; }
.lightbox-close:hover { background: var(--amarillo); }

/* ----------------------------- Paginación ------------------------------ */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 24px; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px;
    border: var(--bd); border-radius: var(--radius); background: #fff; color: var(--ink); font-weight: 800; box-shadow: 2px 2px 0 var(--ink); }
.page-btn:hover { text-decoration: none; transform: translate(-1px, -1px); background: var(--amarillo); }
.page-btn.active { background: var(--ink); color: #fff; }
.page-btn.is-disabled { opacity: .4; box-shadow: none; pointer-events: none; }
.page-ellipsis { display: inline-flex; align-items: flex-end; padding: 8px 4px; color: var(--gris); font-weight: 800; }

/* ------------------------------ Utilidades ----------------------------- */
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; } .text-center { text-align: center; }
.icon { vertical-align: -.18em; flex: none; }

/* ============================== RESPONSIVE ============================= */
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .nav { display: none; position: absolute; top: calc(100% + 3px); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 8px; background: #fff;
        border-top: var(--bd-thick); border-bottom: var(--bd-thick); padding: 14px; }
    .nav.open { display: flex; }
    .nav a { padding: 12px 14px; font-size: 1rem; border-radius: var(--radius); }
    .nav a:hover { background: var(--amarillo); }
    .nav .btn, .nav form, .nav form .btn { width: 100%; }
    .footer-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 640px) {
    .section { padding: 34px 0; }
    .row2, .radio-cards { grid-template-columns: 1fr; }
    .hero { padding: 40px 0; }
    .hero p { font-size: 1.02rem; }
    .art-card-2, .art-card-3 { margin-left: 0; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .btn { font-size: .85rem; }
}

/* ------------------------------- Buzón --------------------------------- */
/* Contador de no leídos (en el menú y títulos) */
.msg-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
    padding: 0 6px; font-size: .72rem; font-weight: 800; line-height: 1; color: #fff; background: var(--rojo);
    border: 2px solid var(--ink); border-radius: 999px; vertical-align: middle; }

/* Contenedor con scroll para que la lista/el chat no llenen la pantalla */
.msg-scroll { max-height: 62vh; overflow-y: auto; padding: 4px; }

/* Lista de conversaciones */
.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg-item { display: flex; align-items: stretch; gap: 8px; }
.msg-item .msg-row { flex: 1; }
.msg-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--card);
    border: var(--bd); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--ink);
    font-weight: 500; transition: transform .08s ease, box-shadow .08s ease; }
a.msg-row:hover { text-decoration: none; transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.msg-item.is-unread .msg-row { border-left: 6px solid var(--rojo); background: #fffdf4; }
.msg-dot { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: transparent; }
.msg-item.is-unread .msg-dot { background: var(--rojo); box-shadow: 0 0 0 2px var(--ink); }
.msg-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.msg-from { font-weight: 800; font-size: .9rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.msg-subject { font-weight: 700; }
.msg-item.is-unread .msg-subject { color: var(--azul-d); }
.msg-preview { color: var(--gris); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-date { flex: 0 0 auto; color: var(--gris); font-size: .76rem; text-align: right; font-weight: 700; }

table.simple td.td-title { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-date .icon { vertical-align: -2px; }
/* Botón de borrar conversación */
.msg-del { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 42px;
    background: var(--card); border: var(--bd); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    color: var(--rojo); cursor: pointer; transition: transform .08s ease, box-shadow .08s ease, background .08s ease; }
.msg-del:hover { background: var(--rojo); color: #fff; transform: translate(-1px, -1px); box-shadow: var(--shadow); }

/* Chat (burbujas) con scroll */
.msg-thread { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.msg-bubble { max-width: 84%; padding: 12px 15px; border: var(--bd); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.msg-bubble.theirs { align-self: flex-start; background: var(--card); }
.msg-bubble.mine { align-self: flex-end; background: #eef2ff; }
.msg-bubble-head { font-size: .8rem; margin-bottom: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.msg-bubble-body { white-space: pre-line; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.msg-new { animation: msgIn .25s ease-out; }

/* Campo trampa anti-bots: invisible para personas, pero presente en el DOM. */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; opacity: 0; pointer-events: none; }

/* Tabla clave-valor (datos de una postulación a verificar) */
.kv { width: 100%; border-collapse: collapse; font-size: .86rem; }
.kv td { padding: 4px 0; vertical-align: top; border-bottom: 1px dashed #d8d2c4; }
.kv tr:last-child td { border-bottom: 0; }
.kv td:first-child { color: var(--gris); white-space: nowrap; padding-right: 12px; font-weight: 600; }
.kv td:last-child { text-align: right; word-break: break-word; }

/* Galería de pruebas de verificación (fotos y videos) */
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 10px 0; }
.evidence-item { border: var(--bd); border-radius: var(--radius); padding: 8px; background: var(--card); box-shadow: var(--shadow-sm); }
.evidence-item img, .evidence-item video { width: 100%; height: 140px; object-fit: cover; border-radius: 4px; border: 2px solid var(--ink); display: block; background: #000; }
.evidence-item form { margin-top: 4px; }
/* Cualquier texto largo escrito por usuarios (descripción, avales, notas de
   pruebas): se recorta a unas líneas con un botón "Ver más" (agregado por JS
   solo si de verdad hace falta), para que nunca desborde la pantalla. */
.clamp-text.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-toggle { display: inline-block; margin: 4px 0 0; font-size: .82rem; font-weight: 700; color: var(--azul-d);
    cursor: pointer; background: none; border: none; padding: 0; text-decoration: underline; }
