
:root{color-scheme:dark;font-family:system-ui,sans-serif;background:#0b111a;color:#edf3fc}
*{box-sizing:border-box}body{margin:0}header{padding:1.1rem max(5%,20px);background:#121c29;
border-bottom:1px solid #273749;font-weight:750}header span{color:#ffac52}
main{width:min(960px,92%);margin:32px auto}h1{margin:0 0 20px;font-size:clamp(24px,4vw,40px)}
h2{margin:0 0 14px;font-size:20px}.card{background:#131e2e;border:1px solid #29394e;
border-radius:16px;padding:20px;margin-bottom:16px}
label{display:grid;gap:5px;margin:0 0 12px;color:#d1dcec;font-size:.9rem}input,select{width:100%;
border:1px solid #405570;background:#0b1420;color:inherit;border-radius:8px;padding:9px;font:inherit}
input[type=checkbox]{width:auto}label.check{display:flex;align-items:center}button{border:0;border-radius:9px;
background:#ffac52;color:#211206;font:inherit;font-weight:700;padding:9px 13px;cursor:pointer}
a{color:#ffc27e}small,p{color:#b6c5da}.note{background:#30241d;border:1px solid #815934;padding:12px;border-radius:10px}
table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:10px;border-bottom:1px solid #2a384a}
td{overflow-wrap:anywhere}.empty{padding:8px 0}.active{color:#a1deb8}
:focus-visible{outline:2px solid #ffc27e;outline-offset:3px}
 .topbar{width:min(960px,100%);margin:auto;display:flex;align-items:center;justify-content:space-between;gap:16px}
nav{display:flex;gap:8px}nav a{text-decoration:none;color:#c1ccdb;padding:8px 12px;border-radius:8px}
nav a[aria-current]{color:#ffc27e;background:#363023}.toolbar{margin-bottom:18px}
.action{display:inline-block;text-decoration:none;background:#ffac52;color:#211206;border-radius:9px;padding:9px 13px;font-weight:750}
.domain-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr));gap:16px}
.domain-card{min-width:0;margin:0;display:grid;gap:15px;align-content:start;background:linear-gradient(145deg,#19283a,#131e2e)}
.domain-card strong,.domain-card small{display:block;overflow-wrap:anywhere}.domain-card small{margin-top:6px}
.domain-icon{display:grid;place-items:center;width:36px;height:36px;margin-bottom:12px;background:#3c2d22;color:#ffc27e;border-radius:10px}
.editor{max-width:560px}.editor button+a{margin-left:10px}.client-list{overflow:auto}
@media(max-width:680px){.card{padding:14px}th,td{padding:7px}}
@media(max-width:380px){.topbar{align-items:flex-start;flex-direction:column;gap:8px}}

.login-page {
  min-height:100svh;display:grid;place-items:center;padding:24px;
  background:radial-gradient(ellipse at 15% 10%,#163360 0,transparent 48%),
    radial-gradient(ellipse at 95% 90%,#45261d 0,transparent 44%),#080d16;
}
.login-card {
  width:min(100%,430px);margin:0;padding:clamp(24px,6vw,42px);
  background:#101a2a;border:1px solid #314158;border-radius:24px;
  box-shadow:0 22px 70px #0008;
}
.login-brand {display:flex;align-items:center;gap:12px;font-weight:800;letter-spacing:.14em;margin-bottom:26px}
.login-mark {
  display:grid;place-items:center;width:44px;height:44px;border-radius:13px;
  background:#0a1423;color:#72baff;font-size:26px;border:1px solid #314b70;
}
.login-card h1 {font-size:clamp(26px,6vw,34px);margin-bottom:8px}
.login-card p {margin:0 0 22px}
.login-card input {min-height:46px;font-size:16px}
.login-card button {width:100%;min-height:46px;margin-top:8px}
.login-card .note {margin:0 0 16px}
.logout {margin:0}
.logout button {background:transparent;color:#d1dcec;border:1px solid #405570;white-space:nowrap}
.topbar {flex-wrap:wrap}

.kinexa-wide {width:min(1150px,94%)}
.kinexa-metrics {display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:12px}
.kinexa-metrics strong {display:block;color:#72baff;font-size:2rem;margin-top:6px}
.kinexa-due {display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #29394e}
.kinexa-controls {display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin-bottom:16px}
.kinexa-controls label {margin:0;min-width:135px}
.kinexa-renew {display:flex;align-items:center;gap:6px}
.kinexa-renew select {min-width:90px}
.kinexa-state {display:inline-block;padding:4px 8px;border-radius:8px;background:#26384e}
.kinexa-state.activa {color:#a1deb8;background:#203d33}
.kinexa-state.vencida {color:#ffc5ae;background:#482d26}

.kx-shell {
  background:#091425;color:#f1f6ff;min-height:100vh;
  display:grid;grid-template-columns:238px minmax(0,1fr);align-items:start;
}
.kx-sidebar {
  position:sticky;top:0;min-height:100vh;padding:24px 16px;
  border-right:1px solid #293b54;background:#102036;
  display:flex;flex-direction:column;gap:28px;
}
.kx-brand {display:flex;gap:10px;align-items:center;text-decoration:none;color:#fff}
.kx-brand span {font-size:42px;line-height:1;font-weight:900;font-style:italic;color:#24aaff}
.kx-brand b {color:#40afff}
.kx-sidebar nav {display:grid;gap:8px}
.kx-sidebar nav a {color:#e1edff;padding:10px 13px}
.kx-sidebar nav a[aria-current] {background:#087ccc;color:#fff}
.kx-sidebar .logout {margin-top:auto}
.kx-shell main {width:100%;max-width:1280px;margin:0 auto;padding:32px;min-width:0}
.kx-shell .card {background:#12233a;border-color:#2d4661}
.kx-shell a:not(.action):not(.kx-brand) {text-underline-offset:3px}
.kx-shell .client-list {padding:0}
.kx-shell .client-list p {padding:12px 18px}
.kx-shell table thead {background:#203551}
.kx-shell table th,.kx-shell table td {padding:13px 15px}
.kx-shell .domain-grid {grid-template-columns:1fr}
.kx-shell .domain-card {
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;padding:18px 20px;
}
.kx-shell .domain-card > a {
  border:1px solid #6782a2;border-radius:8px;
  color:#e3efff;padding:8px 12px;text-decoration:none;
}
@media(max-width:720px) {
  .kx-shell {display:block}
  .kx-sidebar {position:static;min-height:0;gap:12px;padding:12px 16px;border-right:0;border-bottom:1px solid #293b54}
  .kx-sidebar nav {display:flex;flex-wrap:wrap;gap:4px}
  .kx-sidebar nav a {padding:7px 9px}
  .kx-shell main {padding:20px 16px}
  .kx-shell .domain-card {grid-template-columns:1fr}
  .kx-shell .domain-card > a {justify-self:start}
}

/* KINEXA BOTONES 3 */
.kx-shell .kx-mobile-clients a[href^="/clientes?edit="],
.kx-shell .domain-card a[href^="/dominios?provider="],
.kx-shell .kx-mobile-clients a.kx-danger,
.kx-shell .domain-card a.kx-danger {
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid #476685; border-radius:10px;
  min-height:44px; padding:8px 12px; margin:4px 5px 0 0;
  background:#203a59; color:#edf6ff; font-size:14px; font-weight:700;
  text-decoration:none; white-space:nowrap; line-height:1.25;
}
.kx-shell .kx-mobile-clients a.kx-danger,
.kx-shell .domain-card a.kx-danger {
  background:#321d2b; border-color:#865064; color:#ffc4cc;
}
.kx-mobile-clients .kinexa-renew button {
  min-height:44px; min-width:max-content; white-space:nowrap;
  overflow-wrap:normal; word-break:normal;
}
.kx-mobile-clients .kinexa-renew select {
  min-height:44px; min-width:96px; font-size:16px;
}
.kx-mobile-clients .kinexa-state {overflow-wrap:normal; word-break:normal}

@media(max-width:900px) {
  .kx-shell .kx-mobile-clients {
    padding:0; border:0; background:transparent; overflow:visible;
  }
  .kx-mobile-clients table,.kx-mobile-clients tbody {display:block; width:100%}
  .kx-mobile-clients thead {
    position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%);
  }
  .kx-mobile-clients tr {
    display:grid; gap:10px; min-width:0; margin:0 0 12px; padding:14px;
    border:1px solid #2d4661; border-radius:16px; background:#12233a;
  }
  .kx-shell .kx-mobile-clients td {
    display:block; min-width:0; padding:0; border:0; overflow-wrap:anywhere;
  }
  .kx-shell .kx-mobile-clients td:nth-child(n+2):nth-child(-n+4) {
    display:flex; justify-content:space-between; align-items:center;
    gap:12px; text-align:right;
  }
  .kx-mobile-clients td:nth-child(2)::before {content:"Proveedor"}
  .kx-mobile-clients td:nth-child(3)::before {content:"Vencimiento"}
  .kx-mobile-clients td:nth-child(4)::before {content:"Estado"}
  .kx-mobile-clients td:nth-child(n+2):nth-child(-n+4)::before {
    color:#b4c6dd; font-size:13px; text-align:left; flex-shrink:0;
  }
  .kx-mobile-clients td:first-child > a[href^="/clientes?historial="] {
    display:block; color:#eef6ff; font-size:19px; font-weight:750;
    text-decoration:none; margin-bottom:6px;
  }
  .kx-mobile-clients td:first-child br {display:none}
  .kx-mobile-clients .kinexa-renew {
    display:grid; grid-template-columns:minmax(0,1fr) auto;
    gap:8px; padding-top:10px; border-top:1px solid #2d4661;
  }
  .kx-mobile-clients .kinexa-renew select {min-width:0}
}

/* KINEXA COMPACTO 1 */
.kx-compact-header {
    background:#091429;
    border-color:#253b58;
}
.kx-wordmark {
    display:flex; align-items:baseline; justify-content:center;
    font-size:clamp(22px,6vw,34px); line-height:1;
    font-style:italic; font-weight:900; letter-spacing:-.055em;
    color:#f5f8ff; text-decoration:none;
}
.kx-wordmark span { color:#209aff; font-size:1.2em }
.kx-wordmark strong { font-weight:900 }
.kx-wordmark b { color:#ff991f; margin-inline-start:.3em; font-weight:900 }
.kx-compact-header nav { gap:4px }
.kx-compact-header nav a[aria-current] { background:#075ce4 }
.kx-shell main:has(.kx-compact-list) { max-width:980px }
.kx-compact-filters {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px; margin-bottom:14px;
}
.kx-compact-filters input[type="search"] { grid-column:1 / -1 }
.kx-compact-filters label { margin:0; min-width:0 }
.kx-compact-filters input,.kx-compact-filters select {
    min-height:44px; min-width:0; font-size:16px;
    background:#0d1a30; border-color:#425d80;
}
.kx-compact-toolbar { margin:0 0 16px }
.kx-shell .kx-new {
    display:inline-flex; align-items:center; min-height:42px;
    border:1px solid #ed9c23; border-radius:9px; padding:7px 12px;
    background:#302110; color:#ffd078; font-weight:750; text-decoration:none;
}
.kx-compact-list { display:grid; gap:8px }
.kx-compact-row {
    display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr) auto;
    align-items:center; gap:8px; min-height:54px; padding:4px 9px;
    border:1px solid #253b58; border-radius:10px; background:#0d1b32;
}
.kx-compact-row[hidden],#kx-compact-empty[hidden] { display:none }
.kx-compact-domain { grid-template-columns:minmax(0,1fr) auto }
.kx-shell .kx-compact-name {
    display:flex; align-items:center; gap:5px; min-width:0; min-height:44px;
    font-weight:750; color:#82d5ff; text-decoration:none;
}
.kx-compact-name span:first-child,.kx-compact-provider {
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.kx-compact-provider { color:#c6d4e8; font-size:clamp(12px,3.4vw,15px) }
.kx-shell .kx-compact-delete {
    display:inline-flex; align-items:center; justify-content:center;
    min-height:44px; padding:4px 7px; border:1px solid #bd4955; border-radius:7px;
    color:#ff9ca4; font-size:clamp(11px,3.15vw,13px); font-weight:700;
    text-decoration:none; white-space:nowrap;
}
@media (max-width:720px) {
    .kx-shell .kx-compact-header {
        display:grid; grid-template-columns:minmax(0,1fr);
        gap:12px; padding:15px 14px; min-height:0;
    }
    .kx-compact-header nav {
        display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
        padding:3px; border:1px solid #314967; border-radius:10px;
    }
    .kx-compact-header nav a { text-align:center; padding:9px 3px; font-size:14px }
    .kx-compact-row { gap:6px; padding-inline:8px }
}

/* KINEXA ACTIVIDAD C2 */
.kx-compact-row .kx-client-activity {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    border-top: 1px solid #34445c;
    padding: 6px 0 5px;
    color: #b7c6dd;
    font-size: clamp(11px, 3.2vw, 13px);
    line-height: 1.3;
}
.kx-client-activity > :last-child {
    text-align: right;
    color: #e2ebfb;
}

/* Pantallas de prueba Kinexa */
.kx-shell main.trial-page {max-width:880px}
.trial-page h1 {font-size:clamp(22px,5vw,32px);margin-bottom:16px}
.trial-page .card {background:#111e31;border-color:#35465f;border-radius:13px;margin-bottom:14px}
.trial-page h2 {font-size:18px}
.trial-metrics {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.kx-shell .trial-metric {display:grid;gap:6px;text-decoration:none;color:#eef5ff}
.trial-metric strong {font-size:28px;line-height:1}
.trial-icon {display:inline-grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:8px;background:#193950;color:#5ed5ff;font-size:24px;line-height:1}
.trial-heading-icon,.trial-back {color:#a8dcff;text-decoration:none}
.trial-page .trial-orange {color:#ffb246}
.trial-line {display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:9px 0;border-bottom:1px solid #2c3b50}
.trial-line:last-child {border-bottom:0}
.trial-line strong {text-align:right}
.trial-line a {color:#e6f2ff;text-decoration:none;font-weight:700}
.trial-muted,.trial-exact {font-size:13px;color:#b9cbe3}
.trial-exact {text-align:right;margin:6px 0}
.trial-person {display:flex;align-items:center;gap:12px}
.trial-person h2 {margin:0}
.trial-client-summary .trial-person {margin-bottom:8px}
.trial-note-label textarea {display:block;width:100%;min-height:80px;border-radius:8px;padding:9px;border:1px solid #405570;background:#0b1420;color:#eef5ff;font:inherit;font-size:16px;resize:vertical}
.trial-primary,.trial-page .trial-secondary {min-height:44px;border-radius:8px;font-size:14px;font-weight:750}
.trial-primary {width:100%;background:#ffaf30;color:#15120d}
.trial-page .trial-secondary {display:inline-flex;align-items:center;justify-content:center;padding:7px 11px;background:transparent;color:#b8e7ff;border:1px solid #5e95b3;text-decoration:none;text-align:center}
.trial-actions {display:grid;gap:8px;margin-bottom:14px}
.trial-good {color:#88e8b1}
.trial-chart {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin:14px 0 0;padding:0;list-style:none}
.trial-chart li {display:grid;grid-template-rows:16px 80px 16px;gap:4px;text-align:center;align-items:end;font-size:12px}
.trial-bar {display:block;width:70%;height:2px;margin-inline:auto;background:#34bafb;border-radius:3px 3px 1px 1px}
.trial-providers .trial-provider {margin-bottom:10px}
.trial-provider-head {display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center}
.trial-provider-head .kx-compact-name {min-height:0;display:block;overflow-wrap:anywhere}
.trial-provider-head small {display:block;margin-top:4px}
.trial-provider details {margin-top:12px;padding:9px;background:#15243a;border:1px solid #2c405c;border-radius:8px}
.trial-provider summary {cursor:pointer;font-size:13px}
.trial-provider summary strong {float:right;margin-left:5px}
@media(max-width:390px) {
    .trial-provider-head .trial-secondary {font-size:12px;padding-inline:6px}
}
.trial-bar[data-level="1"] {height:8px}
.trial-bar[data-level="2"] {height:16px}
.trial-bar[data-level="3"] {height:24px}
.trial-bar[data-level="4"] {height:32px}
.trial-bar[data-level="5"] {height:40px}
.trial-bar[data-level="6"] {height:48px}
.trial-bar[data-level="7"] {height:56px}
.trial-bar[data-level="8"] {height:64px}
.trial-bar[data-level="9"] {height:72px}
.trial-bar[data-level="10"] {height:80px}
