/* =========================================================================
   Combril Mejoras — Sistema de diseño
   Tema oscuro (default) + tema claro vía [data-theme="light"]
   ========================================================================= */
:root {
  /* Marca PME · Sunset Flow */
  --brand:        #6E5CE6;
  --brand-2:      #F7941E;
  --brand-grad:   linear-gradient(120deg, #13B0EF 0%, #6E5CE6 38%, #EE5E72 70%, #F7941E 100%);
  --brand-grad-soft: linear-gradient(120deg, #2A9FE2 0%, #7E6FE0 38%, #ED6E81 70%, #F7A23A 100%);

  /* Estados */
  --c-todo:    #8E86B5;
  --c-curso:   #F7941E;
  --c-fin:     #17B58E;

  /* Prioridades */
  --p-baja:    #34C0E0;
  --p-media:   #F5B042;
  --p-alta:    #FF7A45;
  --p-urgente: #EE4F66;

  /* Tema oscuro */
  --bg:        #130E1F;
  --bg-2:      #1A1230;
  --surface:   #1F1733;
  --surface-2: #271C3E;
  --surface-3: #322648;
  --border:    #312547;
  --border-2:  #41315E;
  --text:      #F1EAF7;
  --text-2:    #C3B4D6;
  --text-3:    #9A8CB0;
  --shadow:    0 8px 30px rgba(0,0,0,.45);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.30);
  --ring:      rgba(110,92,230,.32);
}

[data-theme="light"] {
  --bg:        #FAF6FB;
  --bg-2:      #F2ECF6;
  --surface:   #FFFFFF;
  --surface-2: #F8F3FB;
  --surface-3: #F0E8F5;
  --border:    #ECE2EE;
  --border-2:  #DCD0E5;
  --text:      #241E2E;
  --text-2:    #635970;
  --text-3:    #968AA4;
  --shadow:    0 10px 35px rgba(70,50,120,.12);
  --shadow-sm: 0 2px 12px rgba(70,50,120,.08);
  --ring:      rgba(110,92,230,.20);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  background: var(--bg);
}
body {
  min-height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: transparent;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: color .35s ease;
}

/* Fondo de olas líquidas animado (detrás de todo) */
#liquid-bg {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: -1; pointer-events: none; display: block;
}
[data-theme="dark"] .col {
  background: rgba(29, 20, 48, 0.62);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.07);
}
[data-theme="light"] .col {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-color: rgba(123, 42, 130, 0.10);
}

a { color: var(--brand-2); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================== AUTH (login / registro / reset) ===================== */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
@media (max-width: 880px) { .auth-wrap { grid-template-columns: 1fr; } .auth-hero { display:none; } }

.auth-hero {
  position: relative;
  overflow: hidden;
  background: var(--brand-grad);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
}
.auth-hero::before, .auth-hero::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.12); filter: blur(2px);
}
.auth-hero::before { width: 380px; height: 380px; top: -120px; right: -90px; }
.auth-hero::after  { width: 260px; height: 260px; bottom: -90px; left: -60px; background: rgba(255,255,255,.08); }
.auth-hero .logo { display:flex; align-items:center; gap:14px; margin-bottom: 38px; position: relative; z-index:1; }
.logo-card { background:transparent; padding:0; display:inline-block; box-shadow:none; }
.logo-card img { max-height:300px; max-width:720px; width:100%; display:block; filter: drop-shadow(0 6px 18px rgba(0,0,0,.20)); }
.auth-hero .logo .mark {
  width: 46px; height: 46px; border-radius: 13px; background: rgba(255,255,255,.18);
  display:grid; place-items:center; font-size: 24px; backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
}
.auth-hero h1 { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -.5px; position:relative; z-index:1; }
.auth-hero p  { margin-top: 18px; font-size: 17px; opacity: .92; max-width: 420px; position:relative; z-index:1; line-height:1.6; }
.auth-hero .feats { margin-top: 38px; display:flex; flex-direction:column; gap:14px; position:relative; z-index:1; }
.auth-hero .feat { display:flex; align-items:center; gap:12px; font-size:15px; opacity:.95; }
.auth-hero .feat .ic { width:30px; height:30px; border-radius:9px; background:rgba(255,255,255,.18); display:grid; place-items:center; }

.auth-panel { display:flex; align-items:center; justify-content:center; padding: 48px 32px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 26px; font-weight: 800; letter-spacing:-.4px; }
.auth-card .sub { color: var(--text-2); margin-top: 8px; margin-bottom: 28px; font-size: 14px; }

.field { margin-bottom: 16px; }
.field label { display:block; font-size: 13px; font-weight:600; color: var(--text-2); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  color: var(--text); font-size: 14px; transition: border .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring);
}
.field .row2 { display:grid; grid-template-columns:1fr 1fr; gap: 12px; }

.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 12px 18px; border-radius: 11px; border: none;
  background: var(--brand-grad); color: #fff; font-weight: 700; font-size: 14px;
  width: 100%; transition: transform .12s, filter .15s, box-shadow .15s;
  box-shadow: 0 8px 22px rgba(108,92,231,.35);
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--text); border:1.5px solid var(--border-2); box-shadow:none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { width:auto; padding: 9px 14px; font-size: 13px; }
.btn.danger { background: linear-gradient(135deg,#ff4d6d,#ff7a45); box-shadow:0 8px 22px rgba(255,77,109,.3); }
.btn.solid { background: var(--brand); box-shadow: 0 6px 16px rgba(110,92,231,.28); }

/* Botones de exportar (Informes) */
.btn-exp {
  display:inline-flex; align-items:center; gap:9px;
  padding:8px 15px 8px 8px; border-radius:12px;
  font-weight:700; font-size:13px; cursor:pointer; color:var(--text);
  background:var(--surface-2); border:1.5px solid var(--border-2);
  box-shadow:0 2px 8px rgba(0,0,0,.05);
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.btn-exp:hover { transform:translateY(-1px); box-shadow:0 8px 18px rgba(0,0,0,.12); }
.btn-exp:active { transform:translateY(0); }
.exp-ic { width:26px; height:26px; border-radius:8px; flex:none;
  display:inline-flex; align-items:center; justify-content:center; transition:box-shadow .15s; }
.exp-ic svg { width:16px; height:16px; }
.exp-ic.exc { background:#1E9E63; }
.exp-ic.pdf { background:#E0413B; }
.btn-exp:hover .exp-ic.exc { box-shadow:0 0 0 3px rgba(30,158,99,.20); }
.btn-exp:hover .exp-ic.pdf { box-shadow:0 0 0 3px rgba(224,65,59,.20); }

/* Asunto de ticket: selector + bloques dinámicos */
.asunto-seg .opt { font-size:12.5px; }
.asunto-box { background:var(--surface-2); border:1px solid var(--border); border-radius:12px;
  padding:14px 14px 15px; margin-top:10px; }
.asunto-box .a-ttl { display:flex; align-items:center; gap:8px; color:var(--brand-2);
  font-size:12.5px; font-weight:700; margin-bottom:12px; }
.cdf-row { display:flex; gap:8px; align-items:flex-start; margin-bottom:9px; }
.cdf-row .inp-id { flex:none; width:130px; }
.cdf-row .inp-desc { flex:1; resize:none; overflow:hidden; min-height:42px; line-height:1.4; }
.cdf-row input, .cdf-row textarea { margin:0; }
.addbtn { display:inline-flex; align-items:center; gap:6px; background:transparent;
  border:1.5px dashed var(--border-2); color:var(--brand); font-weight:600; font-size:12.5px;
  padding:8px 12px; border-radius:9px; cursor:pointer; margin-top:2px; }
.addbtn:hover { border-color:var(--brand); }
.delrow { flex:none; width:40px; height:42px; border-radius:9px; background:var(--surface-3);
  border:1.5px solid var(--border); color:var(--p-urgente); font-size:16px; cursor:pointer; }
.delrow:hover { border-color:var(--p-urgente); }
.a-hint { color:var(--text-3); font-size:11px; margin-top:4px; }
.cdf-item { margin-bottom:10px; }
.cdf-clip { flex:none; width:40px; height:42px; border-radius:9px; background:var(--surface-3);
  border:1.5px solid var(--border); color:var(--brand); font-size:15px; cursor:pointer; }
.cdf-clip:hover { border-color:var(--brand); }
.cdf-files { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 0 138px; }
.cdf-files:empty { margin:0; }
.fchip { display:inline-flex; align-items:center; gap:5px; background:var(--surface-3);
  border:1px solid var(--border); border-radius:7px; padding:3px 8px; font-size:11.5px; color:var(--text-2); }
.fchip a { color:var(--brand); }
.fchip button { background:none; border:none; color:var(--text-3); cursor:pointer; font-size:11px; padding:0; }
.fchip button:hover { color:var(--p-urgente); }
.fchip.pend { border-style:dashed; }

/* Alta de Consorcio: filas múltiples */
.alta-item { position:relative; border:1px solid var(--border); border-radius:11px;
  padding:13px 14px; margin-bottom:10px; background:var(--surface); }
.alta-item .alta-del { position:absolute; top:8px; right:8px; width:28px; height:28px;
  border-radius:8px; background:var(--surface-3); border:1.5px solid var(--border);
  color:var(--p-urgente); font-size:14px; cursor:pointer; }
.alta-item .alta-del:hover { border-color:var(--p-urgente); }
.alta-item input, .alta-item textarea { width:100%; box-sizing:border-box; }
.alta-item .alta-nom { margin-top:4px; }

/* Buscador de tickets (asunto / ID) */
.tk-search { width:250px; max-width:48vw; padding:9px 13px; border-radius:11px;
  background:var(--surface-2); border:1.5px solid var(--border-2); color:var(--text);
  font-size:13px; transition:border-color .15s, box-shadow .15s; }
.tk-search::placeholder { color:var(--text-3); }
.tk-search:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 4px var(--ring); }
/* Barra y selects de filtros de tablero */
.board-tools { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.bf { padding:8px 11px; border-radius:10px; background:var(--surface-2); border:1.5px solid var(--border-2);
  color:var(--text); font-size:12.5px; font-weight:600; cursor:pointer; transition:border-color .15s, box-shadow .15s; }
.bf:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 4px var(--ring); }
.bf:hover { border-color:var(--brand); }
/* Separador entre bloques de filtros en la barra de herramientas */
.tools-sep { width:1.5px; align-self:stretch; min-height:24px; background:var(--border-2); border-radius:2px; margin:0 8px; }

/* Administración Correos */
.ac-card { background:var(--surface-2); border:1px solid var(--border); border-radius:16px;
  padding:20px 22px; margin-top:16px; max-width:760px; }
.ac-vars { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:9px; }
.varchip { background:var(--surface-3); border:1.5px dashed var(--border-2); color:var(--brand);
  font-weight:600; font-size:12px; padding:6px 11px; border-radius:8px; cursor:pointer;
  font-family:"DejaVu Sans Mono", ui-monospace, monospace; transition:all .12s; }
.varchip:hover { border-color:var(--brand); background:var(--brand); color:#fff; }
#ac-cuerpo { min-height:170px; resize:vertical; line-height:1.5; }
#ac-tabs { margin-top:6px; }
.ac-formato { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.ac-formato select { width:auto; padding:7px 10px; }
.fmt-align { display:inline-flex; gap:4px; }
.fmt-align .opt { width:34px; height:34px; border-radius:8px; border:1.5px solid var(--border-2);
  background:var(--surface-2); color:var(--text-2); cursor:pointer; font-size:13px; }
.fmt-align .opt.active { background:var(--brand); color:#fff; border-color:transparent; }
.fmt-bold { width:34px; height:34px; border-radius:8px; border:1.5px solid var(--border-2);
  background:var(--surface-2); color:var(--text-2); cursor:pointer; font-size:14px; }
.fmt-bold.active { background:var(--brand); color:#fff; border-color:transparent; }
.fmt-color { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--text-2); }
.fmt-color input[type=color] { width:38px; height:30px; border:1px solid var(--border-2);
  border-radius:6px; background:none; cursor:pointer; padding:2px; }
.ac-preview { background:#fff; border:1px solid var(--border); border-radius:10px;
  padding:16px 18px; min-height:70px; line-height:1.6; }
.firma-prev { min-width:120px; min-height:54px; display:flex; align-items:center; justify-content:center;
  background:var(--surface-3); border:1px solid var(--border); border-radius:10px; padding:8px 12px; }
.firma-prev img { max-height:80px; max-width:300px; border-radius:6px; }

.auth-foot { margin-top: 20px; font-size: 14px; color: var(--text-2); text-align:center; }
.auth-foot a { font-weight: 600; cursor:pointer; }
.linkbtn { background:none; border:none; color: var(--brand-2); font-weight:600; cursor:pointer; font-size:inherit; padding:0; }

.alert { padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; display:none; }
.alert.err { background: rgba(255,77,109,.12); color: #ff8fa3; border:1px solid rgba(255,77,109,.3); }
.alert.ok  { background: rgba(25,195,125,.12); color: #4fdfa0; border:1px solid rgba(25,195,125,.3); }
.alert.show { display:block; }

/* ===================== APP SHELL ===================== */
.topbar {
  display:flex; align-items:center; gap: 18px;
  padding: 0 22px; height: 60px; background: var(--brand-grad);
  border-bottom: none; position: sticky; top:0; z-index: 50;
  box-shadow: 0 4px 20px rgba(123, 42, 130, .28);
}
.topbar .brand { color:#fff; }
.topbar .brand small { color: rgba(255,255,255,.82); }
.topbar .icon-btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.28); color:#fff; }
.topbar .icon-btn:hover { background: rgba(255,255,255,.30); color:#fff; border-color: rgba(255,255,255,.4); }
.topbar #btn-nueva { background:#fff; color:#6E5CE6; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.topbar #btn-nueva:hover { background:#f5ecfa; filter:none; }
.topbar .userchip { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.28); }
.topbar .userchip .name { color:#fff; }
.topbar .userchip-btn:hover { background: rgba(255,255,255,.16); }
.topbar .userchip-btn:hover .name { color:#fff; }
#btn-logout { font-size: 23px; line-height: 1; color: #ff5d6e; padding: 0 6px; transition: color .15s, transform .12s; }
#btn-logout:hover { color: #ff2d4d; transform: scale(1.12); background: transparent; }
.brand { display:flex; align-items:center; gap: 11px; font-weight: 800; font-size: 16px; letter-spacing:-.3px; }
.brand .mark { width: 34px; height:34px; border-radius:10px; background: var(--brand-grad); display:grid; place-items:center; color:#fff; font-size:18px; box-shadow: 0 4px 14px rgba(108,92,231,.4); }
.brand-logo-box { width: 44px; height: 44px; border-radius: 11px; background:#fff; display:grid; place-items:center; padding:5px; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.brand-logo-box img { max-width:100%; max-height:100%; display:block; }
.brand small { display:block; font-size:11px; font-weight:600; color: var(--text-3); letter-spacing:.3px; }

.topbar .spacer { flex:1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border:1px solid var(--border);
  background: var(--surface); color: var(--text-2); display:grid; place-items:center;
  font-size: 17px; transition: all .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }

.userchip { display:flex; align-items:center; gap:6px; padding: 5px 8px 5px 6px; border-radius: 30px; background: var(--surface); border:1px solid var(--border); }
.userchip .name { font-size: 13px; font-weight:600; }
.userchip-btn { display:flex; align-items:center; gap:10px; background:none; border:none; color:inherit; cursor:pointer; padding:2px 6px; border-radius:24px; transition: background .15s; }
.userchip-btn:hover { background: var(--surface-2); }
.userchip-btn:hover .name { color: var(--brand-2); }

/* Modal Mi cuenta */
.modal h4 { font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 14px; display:flex; align-items:center; gap:8px; }
.modal .divider { height:1px; background: var(--border); margin: 24px 0; }
.perfil-hero { display:flex; align-items:center; gap:16px; padding-bottom: 20px; margin-bottom: 20px; border-bottom:1px solid var(--border); }
.perfil-hero .perfil-nom { font-size: 17px; font-weight: 700; }
.perfil-hero .perfil-mail { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.avatar { width: 30px; height:30px; border-radius:50%; background: var(--brand-grad); color:#fff; display:grid; place-items:center; font-size:13px; font-weight:700; }

/* Barra de módulos (nivel superior) */
.modulenav { display:flex; gap: 10px; padding: 12px 22px; background: var(--bg-2); border-bottom: 1px solid var(--border); flex-wrap:wrap; }
.modulenav .mtab {
  display:flex; align-items:center; gap:8px; padding: 10px 18px; border-radius: 12px;
  border:1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 14px; font-weight: 700; transition: all .15s;
}
.modulenav .mtab .ic { font-size: 16px; }
.modulenav .mtab:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-1px); }
.modulenav .mtab.active { background: var(--brand-grad); color:#fff; border-color: transparent; box-shadow: 0 6px 18px rgba(110,92,230,.30); }

/* Tabs / nav de vistas */
.viewnav { display:flex; gap: 4px; padding: 0 22px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.viewnav .tab {
  padding: 13px 16px; font-size: 14px; font-weight:600; color: var(--text-2);
  border:none; background:none; border-bottom: 2.5px solid transparent;
  display:flex; align-items:center; gap:8px; transition: color .15s;
}
.viewnav .tab:hover { color: var(--text); }
.viewnav .tab.active { color: var(--text); border-bottom-color: var(--brand); }
.viewnav .tab .ic { font-size: 16px; }

.main { padding: 26px clamp(20px, 2.5vw, 56px); width: 100%; max-width: 2200px; margin: 0 auto; }
.view { display:none; animation: fade .25s ease; }
.view.active { display:block; }
@keyframes fade { from {opacity:0; transform: translateY(6px);} to {opacity:1; transform:none;} }

.view-head { display:flex; align-items:center; justify-content:space-between; margin-bottom: 22px; flex-wrap:wrap; gap:14px; }
.view-head h2 { font-size: 22px; font-weight: 800; letter-spacing:-.4px; }
.view-head .desc { color: var(--text-3); font-size: 13px; margin-top:3px; }

/* ===================== RESUMEN ===================== */
.stats { display:grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 22px; }
@media (max-width: 1000px){ .stats { grid-template-columns: repeat(2,1fr); } }
.stat {
  background: var(--surface); border:1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; display:flex; align-items:center; gap: 16px; box-shadow: var(--shadow-sm);
  transition: transform .15s, border-color .15s;
}
.stat:hover { transform: translateY(-2px); border-color: var(--border-2); }
.stat .ic { width: 48px; height:48px; border-radius: 13px; display:grid; place-items:center; font-size: 22px; flex-shrink:0; }
.stat .big { font-size: 28px; font-weight: 800; line-height:1; }
.stat .lbl { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }

.cards2 { display:grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
@media (max-width: 1000px){ .cards2 { grid-template-columns: 1fr; } }

/* Resumen reordenable (drag & drop por usuario) */
.resumen-panels { display:grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items:start; }
.resumen-panels .block-wide { grid-column: 1 / -1; }
@media (max-width: 1000px){ .resumen-panels { grid-template-columns: 1fr; } }
.resumen-panels .panel[draggable="true"], .stats .stat[draggable="true"] { cursor: grab; }
.resumen-panels .panel[draggable="true"]:active, .stats .stat[draggable="true"]:active { cursor: grabbing; }
.dragging { opacity: .45; }

/* Administración en fichas */
.user-cards { display:grid; grid-template-columns: repeat(auto-fill, minmax(290px,1fr)); gap: 14px; }
.user-card { background: var(--surface); border:1px solid var(--border); border-radius:16px; padding:16px 18px;
  cursor:pointer; transition: border-color .15s, transform .12s, box-shadow .15s; display:flex; flex-direction:column; gap:12px; }
.user-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
/* Mismo cursor del sistema (pointer) que el resto de elementos clickeables. */
.user-card, .pend-row, .sr-item, tbody tr { cursor: pointer; }
.user-card .uc-top { display:flex; align-items:center; gap:12px; }
.user-card .uc-av { width:46px; height:46px; border-radius:50%; flex:none; display:grid; place-items:center;
  font-weight:700; font-size:16px; color:#fff; background: var(--brand-grad); }
.user-card .uc-name { font-weight:700; font-size:15px; color: var(--text); line-height:1.2; }
.user-card .uc-user { font-size:12.5px; color: var(--text-3); }
.user-card .uc-mail { font-size:12.5px; color: var(--text-2); word-break:break-all; }
.user-card .uc-badges { display:flex; gap:7px; flex-wrap:wrap; }
.uc-badge { font-size:10.5px; font-weight:700; padding:3px 10px; border-radius:20px; letter-spacing:.3px; }

/* Informes */
.inf-filtros { display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; margin-bottom:20px;
  background: var(--surface); border:1px solid var(--border); border-radius:14px; padding:14px 16px; box-shadow: var(--shadow-sm); }
.inf-filtros > div { display:flex; flex-direction:column; gap:5px; }
.inf-filtros label { font-size:12px; font-weight:600; color: var(--text-3); }
.inf-filtros select, .inf-filtros input { min-width:150px; padding:8px 10px; border-radius:10px;
  border:1.5px solid var(--border); background: var(--surface-2); color: var(--text); font-size:13px; }
.inf-bar { display:flex; align-items:center; gap:10px; margin-bottom:9px; }
.inf-bar .lbl { width:120px; font-size:12.5px; color: var(--text-2); flex:none; }
.inf-bar .track { flex:1; height:10px; border-radius:6px; background: var(--surface-3); overflow:hidden; }
.inf-bar .fill { height:100%; border-radius:6px; }
.inf-bar b { width:38px; text-align:right; font-size:13px; }
.panel { background: var(--surface); border:1px solid var(--border); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-sm); }
.panel h3 { font-size: 15px; font-weight: 700; margin-bottom: 18px; display:flex; align-items:center; gap:8px; }

.donut-wrap { display:flex; align-items:center; gap: 30px; }
.legend { display:flex; flex-direction:column; gap: 12px; }
.legend .it { display:flex; align-items:center; gap:10px; font-size: 13.5px; }
.legend .dot { width: 12px; height:12px; border-radius:4px; }
.legend .it b { margin-left:auto; font-weight:700; }

.prio-bars { display:flex; flex-direction:column; gap: 14px; }
.prio-bar .top { display:flex; justify-content:space-between; font-size:13px; margin-bottom:6px; }
.prio-bar .track { height: 9px; border-radius:6px; background: var(--surface-3); overflow:hidden; }
.prio-bar .fill { height:100%; border-radius:6px; transition: width .6s ease; }

.activity { display:flex; flex-direction:column; gap: 2px; }
.act-it { display:flex; gap: 12px; padding: 11px 4px; border-bottom:1px solid var(--border); font-size: 13.5px; }
.act-it:last-child { border-bottom:none; }
.act-it .av { width:30px; height:30px; flex-shrink:0; }
.act-it .txt { color: var(--text-2); line-height:1.45; }
.act-it .txt b { color: var(--text); }
.act-it time { color: var(--text-3); font-size: 12px; }

.col-more { text-align:center; font-size:12px; color:var(--text-3); padding:10px 6px 4px; margin-top:6px; border-top:1px dashed var(--border); }
.col-more .lnk { color:var(--brand); font-weight:600; cursor:pointer; }
.col-more .lnk:hover { text-decoration:underline; }

/* ===================== TABLERO (KANBAN) ===================== */
.board { display:grid; grid-template-columns: repeat(3,1fr); gap: 18px; align-items:stretch; }
@media (max-width: 900px){ .board { grid-template-columns: 1fr; } }
.col { background: var(--bg-2); border:1px solid var(--border); border-radius: 16px; padding: 14px; height: calc(100vh - 195px); display:flex; flex-direction:column; transition: background .15s, box-shadow .15s; }
/* Cada columna scrollea sola: muestra ~5 tarjetas y el resto se ve scrolleando. */
.col-body { flex:1 1 auto; min-height:0; overflow-y:auto; padding-right:5px; margin-right:-3px;
  scrollbar-width:thin; scrollbar-color: var(--border-2) transparent; }
.col-body::-webkit-scrollbar { width:8px; }
.col-body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius:8px; }
.col-body::-webkit-scrollbar-track { background: transparent; }
.col.drop { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--brand); }
.col-head { display:flex; align-items:center; gap: 9px; margin-bottom: 14px; padding: 2px 4px; }
.col-head .dot { width: 9px; height:9px; border-radius:50%; }
.col-head .t { font-size: 13.5px; font-weight: 700; }
.col-head .count { margin-left:auto; font-size:12px; font-weight:700; color: var(--text-3); background: var(--surface-3); padding: 2px 9px; border-radius: 20px; }

.kcard {
  background: var(--surface); border:1px solid var(--border); border-radius: 13px;
  padding: 14px; margin-bottom: 11px; cursor: pointer; box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--brand); transition: transform .12s, box-shadow .15s;
}
.kcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kcard.dragging { opacity:.5; transform: rotate(2deg); }
.kcard.tipo-consulta { border-left-color:#2bb6d9; }
.kcard.tipo-reclamo  { border-left-color:#ff5d73; }
[data-theme="light"] .kcard.tipo-consulta { border-left-color:#1f9fc0; }
[data-theme="light"] .kcard.tipo-reclamo  { border-left-color:#e24b4a; }
.dias-badge { display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:600; color:var(--text-2); background:var(--surface-3); padding:3px 9px; border-radius:7px; }
.dias-badge.done { color:#19c3a0; background:rgba(25,195,160,.16); }

/* Filtro de C&R: color del botón activo según el tipo */
#cr-filtro .opt.active { color:#fff; border-color:transparent; }
#cr-filtro .opt.active[data-f="todos"]    { background: var(--brand-grad); box-shadow:0 4px 14px rgba(110,92,230,.30); }
#cr-filtro .opt.active[data-f="consulta"] { background:#2bb6d9; box-shadow:0 4px 14px rgba(43,182,217,.32); }
#cr-filtro .opt.active[data-f="reclamo"]  { background:#ff5d73; box-shadow:0 4px 14px rgba(255,93,115,.32); }

/* Filtro de sectores (Tickets) */
#tk-filtro .opt.active { color:#fff; border-color:transparent; }
#tk-filtro .opt.active[data-f="todos"]          { background: var(--brand-grad); }
#tk-filtro .opt.active[data-f="Administración"] { background:#7b6ef0; }
#tk-filtro .opt.active[data-f="Operaciones"]    { background:#2bb6d9; }
#tk-filtro .opt.active[data-f="Comercial"]      { background:#f7941e; }
#cr-depto .opt.active { color:#fff; border-color:transparent; }
#cr-depto .opt.active[data-f="todos"]          { background: var(--brand-grad); box-shadow:0 4px 14px rgba(110,92,230,.30); }
#cr-depto .opt.active[data-f="Administración"] { background:#7b6ef0; }
#cr-depto .opt.active[data-f="Operaciones"]    { background:#2bb6d9; }
#cr-depto .opt.active[data-f="Comercial"]      { background:#f7941e; }

/* ===== Botones con degradé: borde de degradé nítido (anillo) ===== */
/* Relleno apenas más suave + anillo del degradé vivo alrededor, sin sombra de un solo color. */
.btn:not(.ghost),
.modulenav .mtab.active,
#tk-filtro .opt.active[data-f="todos"],
#cr-filtro .opt.active[data-f="todos"],
#cr-depto .opt.active[data-f="todos"] {
  position: relative;
  background: var(--brand-grad-soft);
  border: none;
  box-shadow: 0 4px 12px rgba(20,20,40,.16);
}
.btn:not(.ghost)::after,
.modulenav .mtab.active::after,
#tk-filtro .opt.active[data-f="todos"]::after,
#cr-filtro .opt.active[data-f="todos"]::after,
#cr-depto .opt.active[data-f="todos"]::after {
  content:""; position:absolute; inset:0; border-radius:inherit; padding:1.8px;
  background: var(--brand-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events:none;
}

/* Comentarios (Tickets) */
.com-list { display:flex; flex-direction:column; gap:8px; max-height:220px; overflow-y:auto; }
.com-item { background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:9px 12px; }
.com-item .com-h { display:flex; justify-content:space-between; gap:8px; font-size:11.5px; color:var(--text-3); margin-bottom:3px; }
.com-item .com-h b { color:var(--text-2); font-weight:700; }
.com-item .com-tx { font-size:13px; color:var(--text); line-height:1.45; white-space:pre-wrap; }
.com-empty { font-size:12.5px; color:var(--text-3); padding:6px 2px; }
/* Línea de tiempo del historial */
.hist-list { display:flex; flex-direction:column; gap:0; max-height:240px; overflow-y:auto; padding-left:4px; }
.hist-it { position:relative; padding:0 0 14px 18px; border-left:2px solid var(--border); }
.hist-it:last-child { border-left-color:transparent; padding-bottom:2px; }
.hist-dot { position:absolute; left:-6px; top:4px; width:10px; height:10px; border-radius:50%; background:var(--brand); box-shadow:0 0 0 3px var(--surface); }
.hist-bd .hist-tx { font-size:13px; color:var(--text); line-height:1.45; }
.hist-bd .hist-tx b { font-weight:700; }
.hist-det { color:var(--text-2); }
.hist-when { font-size:11.5px; color:var(--text-3); margin-top:2px; }
.kcard .code { font-size: 11px; font-weight:700; color: var(--text-3); letter-spacing:.4px; }
.kcard .ti { font-size: 14px; font-weight:600; margin: 6px 0 8px; line-height:1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .summary { font-size: 12.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .meta { display:flex; align-items:center; gap: 8px; flex-wrap:wrap; }
.kcard .progress { height:6px; border-radius:4px; background: var(--surface-3); margin: 11px 0 4px; overflow:hidden; }
.kcard .progress > i { display:block; height:100%; border-radius:4px; }
.kcard .foot { display:flex; align-items:center; justify-content:space-between; margin-top: 10px; }

.chip { font-size: 11px; font-weight:700; padding: 3px 9px; border-radius: 7px; display:inline-flex; align-items:center; gap:5px; }
.pill-dev { display:flex; align-items:center; gap:6px; font-size:12px; color: var(--text-2); }
.pill-dev .av { width:22px; height:22px; font-size:10px; }
.attach-badge { font-size:12px; color: var(--text-3); display:inline-flex; align-items:center; gap:4px; }
.date-badge { font-size:11.5px; color: var(--text-3); display:inline-flex; align-items:center; gap:5px; }
.date-badge.late { color: var(--p-urgente); font-weight:600; }

/* ===================== LISTA ===================== */
.tablewrap { background: var(--surface); border:1px solid var(--border); border-radius: 16px; overflow:hidden; box-shadow: var(--shadow-sm); }
table { width:100%; border-collapse: collapse; }
thead th { text-align:left; font-size: 12px; font-weight:700; color: var(--text-3); text-transform:uppercase; letter-spacing:.5px; padding: 14px 16px; border-bottom:1px solid var(--border); background: var(--surface-2); }
tbody td { padding: 14px 16px; border-bottom:1px solid var(--border); font-size: 13.5px; vertical-align:middle; }
tbody tr { transition: background .12s; cursor:pointer; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom:none; }
.t-code { font-weight:700; color: var(--brand-2); font-size:12.5px; }
.t-name { font-weight:600; }
.t-prog { display:flex; align-items:center; gap:10px; min-width:140px; }
.t-prog .track { flex:1; height:7px; border-radius:5px; background: var(--surface-3); overflow:hidden; }
.t-prog .track > i { display:block; height:100%; }
.t-prog small { font-size:11px; color: var(--text-3); width:34px; }

/* ===================== MODAL ===================== */
.overlay { position: fixed; inset:0; background: rgba(5,7,12,.6); backdrop-filter: blur(4px); display:none; align-items:center; justify-content:center; z-index: 100; padding: 24px; }
.overlay.show { display:flex; animation: fade .2s; }
.modal { background: var(--surface); border:1px solid var(--border); border-radius: 20px; width:100%; max-width: 620px; max-height: 90vh; overflow:hidden; box-shadow: var(--shadow); animation: pop .25s; display:flex; flex-direction:column; }
@keyframes pop { from { transform: scale(.96) translateY(10px); opacity:0; } to { transform:none; opacity:1; } }
.modal-head { display:flex; align-items:center; justify-content:space-between; padding: 20px 24px; border-bottom:1px solid var(--border); background: var(--surface); flex:none; }
.modal-head h3 { font-size: 18px; font-weight:800; }
.modal-body { padding: 22px 24px; overflow-y:auto; flex:1 1 auto; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.m-cargado { font-size:12.5px; color:var(--text-2); background:rgba(110,92,230,.06); border:1px solid var(--border); border-radius:9px; padding:8px 12px; margin-bottom:16px; }
.m-cargado b { color:var(--text-1); font-weight:700; }
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-foot { padding: 16px 24px; border-top:1px solid var(--border); display:flex; gap: 10px; justify-content:flex-end; background: var(--surface); flex:none; }
.modal-foot .btn { width:auto; }

.seg { display:flex; gap:8px; flex-wrap:wrap; }
.seg .opt { padding: 9px 14px; border-radius:10px; border:1.5px solid var(--border); background: var(--surface-2); font-size:13px; font-weight:600; color: var(--text-2); transition: all .12s; }
.seg .opt.active { color:#fff; border-color: transparent; }

.hint { font-size: 12px; color: var(--text-3); margin-top: 7px; line-height: 1.5; }

/* Switch on/off */
.switch { display:inline-flex; align-items:center; gap:11px; cursor:pointer; user-select:none; }
.switch input { display:none; }
.switch .track { display:inline-block; width:46px; height:26px; border-radius:20px; background:var(--surface-3); border:1px solid var(--border-2); transition:.2s; position:relative; flex-shrink:0; }
.switch .track::after { content:""; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; transition:.2s; box-shadow:0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .track { background:var(--c-fin); border-color:transparent; }
.switch input:checked + .track::after { transform:translateX(20px); }
.switch #m-notificar-lbl { font-size:13.5px; font-weight:600; }

/* Chips de usuarios notificados */
.seg-users { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.uchip { display:flex; align-items:center; gap:7px; padding:5px 10px 5px 6px; background:var(--surface-2); border:1px solid var(--border); border-radius:20px; font-size:12.5px; }
.uchip .av { width:22px; height:22px; font-size:10px; }
.uchip button { background:none; border:none; color:var(--text-3); cursor:pointer; font-size:13px; padding:0; line-height:1; }
.uchip button:hover { color:var(--p-urgente); }
.uchip.owner { border-color:var(--brand); background:rgba(108,92,231,.10); }
.uchip.owner .badge { font-size:9px; color:var(--brand-2); font-weight:700; text-transform:uppercase; letter-spacing:.4px; background:rgba(108,92,231,.18); padding:2px 6px; border-radius:5px; }

.dropzone { border:2px dashed var(--border-2); border-radius:12px; padding: 22px; text-align:center; color: var(--text-3); font-size:13px; transition: all .15s; cursor:pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--surface-2); color: var(--text-2); }
.adj-list { display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.adj-it { display:flex; align-items:center; gap:10px; padding:10px 12px; background: var(--surface-2); border:1px solid var(--border); border-radius:10px; font-size:13px; }
.adj-it .nm { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.adj-it .sz { color: var(--text-3); font-size:11.5px; }
.adj-it a, .adj-it button { color: var(--text-3); background:none; border:none; cursor:pointer; font-size:15px; }
.adj-it a:hover { color: var(--brand-2); } .adj-it button:hover { color: var(--p-urgente); }

.empty { text-align:center; padding: 70px 20px; color: var(--text-3); }
.empty .ic { font-size: 52px; opacity:.5; margin-bottom: 14px; }
.empty h4 { font-size: 17px; color: var(--text-2); font-weight:700; }
.empty p { font-size: 14px; margin-top: 6px; }

/* Bandeja de correos */
.mail-it { padding: 14px 16px; border-bottom:1px solid var(--border); }
.mail-it:last-child { border-bottom:none; }
.mail-it .hd { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.mail-it .asunto { font-weight:700; font-size:14px; }
.mail-st { margin-left:auto; flex:none; font-size:11px; font-weight:700; padding:3px 9px; border-radius:20px; white-space:nowrap; }
.mail-st.mail-ok   { background:rgba(23,181,142,.16);  color:var(--c-fin); }
.mail-st.mail-err  { background:rgba(238,94,114,.18);  color:var(--p-urgente); cursor:help; }
.mail-st.mail-pend { background:rgba(245,176,66,.18);  color:var(--p-media); }
.mail-st.mail-sim  { background:var(--surface-3);      color:var(--text-2); }
.mail-it .to { font-size:12px; color: var(--text-3); }
.mail-it pre { font-family: inherit; white-space: pre-wrap; color: var(--text-2); font-size:13px; line-height:1.5; margin-top:6px; }
/* Bandeja: caja de alto acotado con scroll interno + paginador */
.mail-box { max-height: calc(100vh - 300px); overflow-y:auto; scrollbar-width:thin; scrollbar-color: var(--border-2) transparent; }
.mail-box::-webkit-scrollbar { width:9px; }
.mail-box::-webkit-scrollbar-thumb { background: var(--border-2); border-radius:8px; }
.mail-pager { display:flex; align-items:center; justify-content:center; gap:14px; margin-top:12px; }
.mail-pager .mail-pg-info { font-size:12.5px; font-weight:600; color:var(--text-2); white-space:nowrap; }
.mail-pager .btn[disabled] { opacity:.45; pointer-events:none; }
.tag { font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:6px; text-transform:uppercase; letter-spacing:.3px; }
.tag.alta { background: rgba(25,195,125,.15); color:#4fdfa0; }
.tag.reset { background: rgba(240,165,0,.15); color:#f0a500; }
.tag.notificacion { background: rgba(108,92,231,.15); color: var(--brand-2); }

.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; display:flex; flex-direction:column; gap:10px; }
.toast { background: var(--surface); border:1px solid var(--border); border-left:4px solid var(--c-fin); border-radius:12px; padding:13px 18px; font-size:13.5px; box-shadow: var(--shadow); animation: slidein .3s; min-width: 240px; }
.toast.err { border-left-color: var(--p-urgente); }
@keyframes slidein { from { transform: translateX(120%); } to { transform:none; } }

/* Pantalla cuenta en revisión */
#pending-overlay { position: fixed; inset: 0; z-index: 60; display:none; align-items:center; justify-content:center; padding: 24px; background: var(--bg); }
#pending-overlay.show { display:flex; }
.pending-card { max-width: 460px; text-align:center; background: var(--surface); border:1px solid var(--border); border-radius: 20px; padding: 44px 38px; box-shadow: var(--shadow); }
.pending-card .pending-ic { font-size: 52px; margin-bottom: 14px; }
.pending-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.pending-card p { color: var(--text-2); font-size: 14.5px; line-height:1.6; margin-bottom: 24px; }

/* Panel de administración */
#admin-body td { vertical-align: middle; }
#admin-body select { padding: 7px 10px; border-radius: 9px; background: var(--surface-2); border:1.5px solid var(--border); color: var(--text); font-size: 13px; }
.admin-check { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
.admin-check-cell { text-align:center; }
.tag.rol-admin { background: rgba(110,92,230,.16); color: var(--brand-2); }
.tag.rol-usuario { background: var(--surface-3); color: var(--text-2); }
.tag.estado-activo { background: rgba(25,195,125,.15); color:#19c3a0; }
.tag.estado-pendiente { background: rgba(240,165,0,.16); color:#f0a500; }
.nu-chk { display:flex; align-items:center; gap:8px; font-size:13.5px; color:var(--text); cursor:pointer; }
.nu-chk input { width:18px; height:18px; accent-color:var(--brand); cursor:pointer; }
#seg-nu-rol .opt.active { background: var(--brand); color:#fff; border-color:transparent; }
.btn-del-user { display:inline-flex; align-items:center; justify-content:center; vertical-align:middle;
  color:#ff5d6e; border-color:transparent; background:transparent; margin-left:8px; font-size:16px; width:36px; height:36px; }
.btn-del-user:hover { color:#ff2d4d; background:rgba(255,77,109,.12); border-color:transparent; }

.spinner { width:18px; height:18px; border:2.5px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Centros de cómputos (fichas) ----- */
.cc-iconbox { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  font-size:20px; background:var(--surface-3); overflow:hidden; flex:none; }
.cc-iconbox img.cc-fav { width:28px; height:28px; border-radius:6px; display:block; }
.cc-row { display:flex; gap:8px; align-items:center; margin-bottom:8px; }
.cc-row input, .cc-row select {
  padding:10px 12px; border-radius:10px; background:var(--surface-2);
  border:1.5px solid var(--border); color:var(--text); font-size:14px;
  transition:border .15s, box-shadow .15s;
}
.cc-row input:focus, .cc-row select:focus {
  outline:none; border-color:var(--brand); box-shadow:0 0 0 4px var(--ring);
}
.cc-row .cc-em { flex:1 1 auto; min-width:0; }
.cc-row .cc-em-tipo, .cc-row .cc-tel-tipo { width:128px; flex:none; }
.cc-row-tel { flex-wrap:wrap; }
.cc-row-tel .cc-tel { flex:1 1 140px; min-width:0; }
.cc-row-tel .cc-tel-nom, .cc-row-tel .cc-tel-ape { flex:1 1 110px; min-width:0; }
.cc-del-row { flex:none; width:34px; height:34px; border:1px solid var(--border-2); background:var(--surface-2);
  color:var(--text-3); border-radius:9px; cursor:pointer; font-size:13px; line-height:1; }
.cc-del-row:hover { color:var(--p-urgente); border-color:var(--p-urgente); }
#cc-com-input { width:100%; min-height:96px; resize:vertical; box-sizing:border-box;
  padding:11px 13px; border-radius:11px; background:var(--surface-2); border:1.5px solid var(--border);
  color:var(--text); font-size:14px; font-family:inherit; line-height:1.5; transition:border .15s, box-shadow .15s; }
#cc-com-input:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 4px var(--ring); }

/* ----- Mis pendientes ----- */
.pend-resumen { display:flex; gap:8px; align-items:center; }
.pend-pill { background:var(--surface-3); color:var(--text-2); border-radius:999px; padding:5px 12px; font-size:12.5px; font-weight:600; }
.pend-pill.venc { background:rgba(238,94,114,.16); color:var(--p-urgente); }
.pend-head { display:flex; align-items:center; gap:12px; padding:4px 15px 8px; margin-bottom:2px;
  font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--text-3); }
.pend-head .pend-main { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; }
.pend-head .pend-pri, .pend-head .pend-est { justify-content:center; }
.pend-row { display:flex; align-items:center; gap:12px; background:var(--surface); border:1px solid var(--border);
  border-radius:12px; padding:11px 14px; margin-bottom:9px; cursor:pointer; transition:border .15s, box-shadow .15s; }
.pend-row:hover { border-color:var(--brand); box-shadow:0 2px 12px rgba(40,55,90,.08); }
.pend-row.venc { border-left:4px solid var(--p-urgente); }
.pend-mod { flex:none; width:62px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--text-3); }
.pend-main { flex:1; min-width:0; }
.pend-name { font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pend-asunto { font-size:12.5px; color:var(--text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin:2px 0 1px; }
.pend-asunto::before { content:""; }
.pend-sub { font-size:12px; color:var(--text-3); }
/* Columnas alineadas a la derecha: prioridad · estado · fecha */
.pend-col { flex:none; display:inline-flex; align-items:center; justify-content:flex-start; }
.pend-col .chip { width:100%; justify-content:center; text-align:center; }
.pend-creador { width:150px; gap:7px; justify-content:flex-start; }
.pend-creador .pend-cre-nom { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:12.5px; color:var(--text-2); }
.pend-head .pend-creador { justify-content:flex-start; }
.pend-pri { width:96px; }
.pend-est { width:110px; }
.pend-fin { width:104px; font-size:12.5px; color:var(--text-2); white-space:nowrap; justify-content:flex-end; }
.pend-fin.venc { color:var(--p-urgente); font-weight:700; }

/* ----- Alertas SLA en tarjetas ----- */
.sla-tag { display:inline-flex; align-items:center; border-radius:999px; padding:2px 8px; font-size:11px; font-weight:700; }
.sla-tag.venc { background:rgba(238,94,114,.16); color:var(--p-urgente); }
.sla-tag.stale { background:rgba(245,176,66,.18); color:var(--p-media); }
.sla-tag.ok { background:rgba(38,191,148,.16); color:#1f9d77; }
.sla-tag.warn { background:rgba(245,176,66,.20); color:var(--p-media); }
[data-theme="dark"] .sla-tag.ok { color:#34d9a3; }
.kcard.venc { box-shadow:inset 0 0 0 1.5px rgba(238,94,114,.45); }

/* ----- Buscador global ----- */
.topsearch { position:relative; display:flex; align-items:center; gap:8px; margin-left:18px;
  background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:0 10px;
  height:38px; width:min(380px, 32vw); }
.topsearch .ts-ic { color:var(--text-3); font-size:14px; flex:none; }
.topsearch input { border:none; background:transparent; outline:none; color:var(--text); font-size:14px; width:100%; height:100%; }
.topsearch input::placeholder { color:var(--text-3); }
.search-results { position:absolute; top:46px; left:0; right:0; background:var(--surface);
  border:1px solid var(--border); border-radius:12px; box-shadow:0 12px 40px rgba(20,25,40,.28);
  max-height:62vh; overflow:auto; z-index:60; display:none; padding:6px; }
.search-results.show { display:block; }
.sr-item { display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:9px; cursor:pointer; }
.sr-item:hover { background:var(--surface-2); }
.sr-tag { flex:none; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.4px;
  color:#fff; background:var(--brand); border-radius:6px; padding:2px 7px; }
.sr-tag.cc { background:var(--p-media); }
.sr-tag.usr { background:#3FA7F0; }

/* ----- Desarrolladores asignados (varios) ----- */
.dev-chips { display:flex; flex-wrap:wrap; gap:8px; }
.dev-empty { color:var(--text-3); font-size:13px; }

/* ----- Notificaciones in-app (campana) ----- */
.notif-wrap { position:relative; display:inline-flex; }
#btn-notif { position:relative; }
.notif-badge { position:absolute; top:-3px; right:-3px; background:var(--p-urgente); color:#fff;
  font-size:10px; font-weight:800; min-width:16px; height:16px; line-height:16px; text-align:center;
  border-radius:999px; padding:0 4px; box-shadow:0 0 0 2px var(--surface); }
.notif-panel { position:absolute; top:48px; right:0; width:340px; max-width:90vw; background:var(--surface);
  border:1px solid var(--border); border-radius:14px; box-shadow:0 14px 44px rgba(20,25,40,.3);
  z-index:70; display:none; overflow:hidden; }
.notif-panel.show { display:block; }
.notif-head { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--border); }
.notif-head b { font-size:14px; color:var(--text); }
.notif-head button { background:none; border:none; color:var(--brand); font-size:12px; cursor:pointer; font-weight:600; }
.notif-list { max-height:60vh; overflow:auto; }
.notif-item { display:flex; gap:8px; align-items:flex-start; padding:11px 14px; border-bottom:1px solid var(--border-2); cursor:pointer; }
.notif-item:hover { background:var(--surface-2); }
.notif-item.unread { background:rgba(110,92,230,.07); }
.notif-item:not(.unread) .notif-tx { padding-left:16px; }
.notif-dot { flex:none; width:8px; height:8px; border-radius:50%; background:var(--brand); margin-top:5px; }
.notif-tx { font-size:13px; color:var(--text); line-height:1.4; }
.notif-when { display:block; font-size:11px; color:var(--text-3); margin-top:3px; }
.notif-empty { padding:22px; text-align:center; color:var(--text-3); font-size:13px; }
.sr-tx { min-width:0; font-size:13.5px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sr-empty { padding:12px; color:var(--text-3); font-size:13px; text-align:center; }
@media (max-width: 720px) { .topsearch { display:none; } }
