/* Panel de licencias: versión reducida del sistema de diseño de STRUMIS Imports (app/static/app.css). */

@font-face { font-family: "Bebas Neue"; src: url("vendor/fonts/bebas-neue-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("vendor/fonts/roboto-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("vendor/fonts/roboto-500.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("vendor/fonts/roboto-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root,
[data-bs-theme="light"] {
  
  --st-orange: #E06426;
  --st-orange-bright: #EE6622;
  --st-orange-dark: #C4531B;
  --st-navy-900: #032838;
  --st-navy-800: #152831;
  --st-navy-700: #1A3C4A;

  
  --ih-bg: #F3F5F7;
  --ih-surface: #FFFFFF;
  --ih-surface-2: #F7F9FA;
  --ih-surface-3: #EDF1F3;
  --ih-border: #E1E6EA;
  --ih-border-strong: #C9D2D8;
  --ih-text: #22343D;
  --ih-heading: var(--st-navy-700);
  --ih-muted: #5C6D77;
  --ih-faint: #8795A0;

  --ih-accent: var(--st-orange);
  --ih-accent-hover: var(--st-orange-dark);
  --ih-accent-soft: rgba(224, 100, 38, .09);
  --ih-accent-line: rgba(224, 100, 38, .38);
  --ih-accent-text: #A84515;
  --ih-success: #1B9055;
  --ih-success-soft: rgba(27, 144, 85, .09);
  --ih-danger: #D23A3A;
  --ih-danger-soft: rgba(210, 58, 58, .08);
  --ih-info: #1F6F9E;
  --ih-info-soft: rgba(31, 111, 158, .09);

  --ih-radius: 8px;
  --ih-radius-sm: 6px;
  --ih-shadow: 0 1px 2px rgba(3, 40, 56, .05), 0 8px 24px -16px rgba(3, 40, 56, .18);

  --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;

  
  --bs-body-bg: var(--ih-bg);
  --bs-body-color: var(--ih-text);
  --bs-emphasis-color: var(--st-navy-900);
  --bs-secondary-color: var(--ih-muted);
  --bs-tertiary-bg: var(--ih-surface-2);
  --bs-border-color: var(--ih-border);
  --bs-link-color: var(--st-orange-dark);
  --bs-link-color-rgb: 196, 83, 27;
  --bs-link-hover-color: var(--st-orange);
  --bs-link-hover-color-rgb: 224, 100, 38;
  --bs-font-sans-serif: "Roboto", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --bs-font-monospace: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --bs-body-font-size: .9375rem;
  --bs-focus-ring-color: rgba(224, 100, 38, .28);
  --bs-success: var(--ih-success);
  --bs-danger: var(--ih-danger);
}
body { background: var(--ih-bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(224, 100, 38, .2); }
a { text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { color: var(--ih-accent-text); background: var(--ih-accent-soft); padding: .08rem .35rem; border-radius: 4px; }
.text-muted, .text-body-secondary { color: var(--ih-muted) !important; }
.text-success { color: var(--ih-success) !important; }
.text-danger { color: var(--ih-danger) !important; }
.tabular { font-variant-numeric: tabular-nums; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 24px; height: 24px; }
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 1.4rem;
  padding: 1.4rem 1rem;
  background: var(--st-navy-900);
  color: #CCD4D7;
}
.brand { display: flex; flex-direction: column; gap: .55rem; padding: .25rem .55rem .9rem; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #fff; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-logo { height: 30px; width: auto; align-self: flex-start; }
.brand-title { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .04em; line-height: 1; color: #fff; }
.brand-sub { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #8FA3AD; }
.nav-side { display: flex; flex-direction: column; gap: .15rem; }
.nav-side .nav-label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #6F8791; padding: .8rem .8rem .35rem; }
.nav-side a {
  position: relative; display: flex; align-items: center; gap: .75rem;
  padding: .6rem .8rem; border-radius: var(--ih-radius-sm);
  color: #CCD4D7; font-family: var(--font-display); font-size: 1.12rem; letter-spacing: .05em; font-weight: 400;
  transition: background .15s, color .15s;
}
.nav-side a .icon { color: #8FA3AD; }
.nav-side a:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }
.nav-side a.active { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-side a.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--st-orange-bright); }
.nav-side a.active .icon { color: var(--st-orange-bright); }
.nav-side .lock-hint { margin-left: auto; }
.nav-side .lock-hint .icon { color: #6F8791; }
.sidebar-foot { margin-top: auto; }
.app-version { margin: .6rem 0 0; padding: 0 .3rem; font-size: .7rem; color: #6F8791; }
.main { min-width: 0; padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem; }
.page { max-width: 1280px; margin: 0 auto; }
@media (max-width: 991.98px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: sticky; height: auto; z-index: 20; flex-direction: row; align-items: center; gap: .75rem;
    padding: .6rem 1rem; overflow-x: auto; min-width: 0; max-width: 100vw;
  }
  .brand { flex: none; padding: 0; border: 0; }
  .brand-logo { height: 22px; }
  .brand-text, .nav-side .nav-label, .sidebar-foot, .nav-side .lock-hint { display: none; }
  .nav-side { flex-direction: row; }
  .nav-side a { padding: .45rem .7rem; white-space: nowrap; }
  .nav-side a.active::before { left: 10px; right: 10px; top: auto; bottom: 0; width: auto; height: 3px; }
  .main { padding-top: 1.25rem; }
}
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.page-head h1 { font-family: var(--font-display); font-size: 2.6rem; font-weight: 400; letter-spacing: .02em; line-height: .95; color: var(--ih-heading); margin: 0; text-transform: uppercase; }
.page-head p { margin: .45rem 0 0; color: var(--ih-muted); }
.eyebrow { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; color: var(--st-orange); margin-bottom: .2rem; }
.panel { background: var(--ih-surface); border: 1px solid var(--ih-border); border-radius: var(--ih-radius); box-shadow: var(--ih-shadow); }
.panel-body { padding: 1.35rem 1.4rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--ih-border); }
.panel-title { display: flex; align-items: center; gap: .6rem; font-size: 1rem; font-weight: 600; color: var(--ih-heading); margin: 0; }
.panel-title .icon { color: var(--st-orange); }
.panel-sub { color: var(--ih-muted); font-size: .85rem; margin: .2rem 0 0; }
.section-title { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .04em; font-weight: 400; color: var(--ih-heading); text-transform: uppercase; margin: 0 0 .8rem; }
.pill {
  display: inline-flex; align-items: center; gap: .45rem; padding: .2rem .62rem;
  border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap;
  color: var(--pill-color, var(--ih-muted)); background: var(--pill-bg, var(--ih-surface-3));
  border: 1px solid color-mix(in srgb, var(--pill-color, var(--ih-muted)) 28%, transparent);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.no-dot::before { display: none; }
.pill.ok { --pill-color: var(--ih-success); --pill-bg: var(--ih-success-soft); }
.pill.err { --pill-color: var(--ih-danger); --pill-bg: var(--ih-danger-soft); }
.pill.acc { --pill-color: var(--ih-accent-text); --pill-bg: var(--ih-accent-soft); }
.pill.info { --pill-color: var(--ih-info); --pill-bg: var(--ih-info-soft); }
.btn { --bs-btn-font-weight: 600; --bs-btn-border-radius: 4px; --bs-btn-padding-y: .55rem; --bs-btn-padding-x: 1.05rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { --bs-btn-padding-y: .35rem; --bs-btn-padding-x: .7rem; --bs-btn-font-size: .82rem; }
.btn-accent {
  --bs-btn-color: #fff; --bs-btn-bg: var(--st-orange-bright); --bs-btn-border-color: var(--st-orange-bright);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--st-orange-dark); --bs-btn-hover-border-color: var(--st-orange-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #A94715; --bs-btn-active-border-color: #A94715;
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: #F0A57F; --bs-btn-disabled-border-color: #F0A57F;
  font-family: var(--font-display); font-weight: 400; font-size: 1.12rem; letter-spacing: .06em; padding-top: .45rem; padding-bottom: .4rem;
}
.btn-accent.btn-sm { font-size: .98rem; }
.btn-soft {
  --bs-btn-color: var(--st-orange-dark); --bs-btn-bg: #fff; --bs-btn-border-color: var(--ih-accent-line);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--st-orange); --bs-btn-hover-border-color: var(--st-orange);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--st-orange-dark); --bs-btn-active-border-color: var(--st-orange-dark);
}
.btn-ghost {
  --bs-btn-color: var(--st-navy-700); --bs-btn-bg: #fff; --bs-btn-border-color: var(--ih-border-strong);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--st-navy-700); --bs-btn-hover-border-color: var(--st-navy-700);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--st-navy-900); --bs-btn-active-border-color: var(--st-navy-900);
  --bs-btn-disabled-color: var(--ih-faint); --bs-btn-disabled-bg: var(--ih-surface-2); --bs-btn-disabled-border-color: var(--ih-border);
}
.btn:focus-visible { box-shadow: 0 0 0 .22rem var(--bs-focus-ring-color); }
.form-label { font-size: .82rem; font-weight: 600; color: var(--st-navy-700); margin-bottom: .4rem; }
.form-text { color: var(--ih-faint); font-size: .78rem; }
.form-control, .form-select { background-color: #fff; border: 1px solid var(--ih-border-strong); color: var(--ih-text); border-radius: 5px; padding: .6rem .85rem; }
.form-control::placeholder { color: #A3AFB7; }
.form-control:focus, .form-select:focus { border-color: var(--st-orange); box-shadow: 0 0 0 .22rem var(--bs-focus-ring-color); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--ih-danger); }
.invalid-feedback { color: var(--ih-danger); }
.form-check-input { border-color: var(--ih-border-strong); }
.form-check-input:checked { background-color: var(--st-orange); border-color: var(--st-orange); }
.form-check-input:focus { box-shadow: 0 0 0 .22rem var(--bs-focus-ring-color); border-color: var(--st-orange); }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; }
.notice {
  display: flex; gap: .85rem; align-items: flex-start; padding: .95rem 1.1rem; border-radius: var(--ih-radius);
  border: 1px solid color-mix(in srgb, var(--n-color) 30%, transparent); border-left: 4px solid var(--n-color);
  background: color-mix(in srgb, var(--n-color) 6%, #fff); color: var(--ih-text); margin-bottom: 1.25rem;
}
.notice > .icon { color: var(--n-color); margin-top: .1rem; }
.notice-title { font-weight: 700; color: var(--ih-heading); margin: 0 0 .15rem; }
.notice p { margin: 0; color: var(--ih-muted); }
.notice.ok { --n-color: var(--ih-success); }
.notice.err { --n-color: var(--ih-danger); }
.notice.warn { --n-color: var(--st-orange); }
.notice.info { --n-color: var(--ih-info); }
.notice .grow { flex: 1; min-width: 0; }
.table-ih { --bs-table-bg: transparent; --bs-table-color: var(--ih-text); --bs-table-border-color: var(--ih-border); --bs-table-hover-bg: rgba(224, 100, 38, .035); margin: 0; }
.table-ih thead th {
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ih-muted); font-weight: 700;
  background: var(--ih-surface-2); border-bottom: 1px solid var(--ih-border); padding: .75rem 1rem; white-space: nowrap;
}
.table-ih tbody td { padding: .7rem 1rem; border-color: var(--ih-border); vertical-align: middle; }
.table-ih tbody tr:last-child td { border-bottom: 0; }
.table-ih .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--ih-radius) var(--ih-radius); }
.list-ih { list-style: none; margin: 0; padding: 0; }
.list-ih li { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.25rem; border-bottom: 1px solid var(--ih-border); }
.list-ih li:last-child { border-bottom: 0; }
.list-ih .grow { flex: 1; min-width: 0; }
.list-ih .title { color: var(--ih-heading); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.list-ih .meta { font-size: .78rem; color: var(--ih-muted); }

/* ---------- Propio del panel ---------- */

.mono { font-family: var(--bs-font-monospace); }
.pre { white-space: pre-wrap; }
.small { font-size: .82rem; }
.form-narrow { max-width: 720px; }
.logout { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .6rem .8rem; border: 0; border-radius: var(--ih-radius-sm);
  background: transparent; color: #CCD4D7; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .05em; text-align: left; }
.logout:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.logout small { font-family: var(--bs-font-sans-serif); font-size: .72rem; letter-spacing: 0; color: #8FA3AD; }
.main-solo { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.login-box { width: 100%; max-width: 400px; }
.login-logo { height: 30px; width: auto; margin-bottom: 1rem; filter: brightness(.2); }
.login-title { font-family: var(--font-display); font-size: 2rem; color: var(--ih-heading); margin: 0; text-transform: uppercase; }
.key-once { font-family: var(--bs-font-monospace); font-size: 1.9rem; font-weight: 700; letter-spacing: .08em; color: var(--st-navy-900);
  background: var(--ih-surface-2); border: 1px dashed var(--ih-border-strong); border-radius: var(--ih-radius-sm); padding: .8rem 1rem;
  display: inline-block; user-select: all; }
.data-list { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; margin-bottom: 1.5rem; }
.data-list dt { font-size: .8rem; color: var(--ih-muted); font-weight: 600; }
.data-list dd { margin: 0; }
.regen { border-top: 1px solid var(--ih-border); padding-top: 1rem; }
tr.released td { color: var(--ih-faint); }
.page-head h1 .mono { font-family: var(--bs-font-monospace); font-size: 2rem; text-transform: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
a.mono { white-space: nowrap; }
td.mono.small { word-break: break-all; min-width: 9rem; max-width: 16rem; }
.table-ih td.tabular { white-space: nowrap; }
.table-ih td.mono:not(.small) { white-space: nowrap; }

/* ---------- Tabla de clientes ---------- */

.page-wide { max-width: 1680px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.faint { color: var(--ih-faint); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; margin-bottom: .9rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; flex: 1; min-width: 0; }
.filters .search { position: relative; flex: 1; min-width: 14rem; max-width: 26rem; }
.filters .search .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--ih-faint); }
.filters .search .form-control { padding-left: 2.2rem; }
.filters .form-select { min-width: 13rem; }
.sync-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .84rem; color: var(--ih-muted); margin: 0 .2rem .75rem; }
.sync-line .sync-last { margin-left: auto; }
.table-clients thead th a.sort { color: inherit; text-decoration: none; }
.table-clients thead th a.sort:hover, .table-clients thead th a.sorted { color: var(--st-navy-700); }
.table-clients tbody td { padding: .6rem .8rem; }
.table-clients thead th { padding: .7rem .8rem; }
.col-company { min-width: 12rem; }
.company { display: block; font-weight: 700; color: var(--st-navy-900); }
.sub { display: block; font-size: .74rem; color: var(--ih-faint); white-space: nowrap; }
.sub.warn { color: var(--ih-accent-text); }
.lic-id { font-size: .85rem; color: var(--st-navy-700); background: var(--ih-surface-2); border: 1px solid var(--ih-border); border-radius: 4px; padding: .1rem .4rem; white-space: nowrap; }
.products { min-width: 9rem; }
.pill.prod { --pill-color: #5B4BA8; --pill-bg: rgba(91, 75, 168, .08); }
.pill.prod-off { --pill-color: var(--ih-faint); --pill-bg: var(--ih-surface-3); text-decoration: line-through; }
.pill.off { --pill-color: #6B7780; --pill-bg: #EEF1F3; }
.pill.none { --pill-color: var(--ih-faint); --pill-bg: transparent; border-style: dashed; }
.last .ver { display: block; font-weight: 600; font-size: .84rem; white-space: nowrap; }
.never { display: inline-flex; align-items: center; gap: .35rem; color: var(--ih-faint); font-size: .84rem; white-space: nowrap; }
.table-foot { padding: .6rem 1rem; font-size: .78rem; color: var(--ih-muted); border-top: 1px solid var(--ih-border); }
th.actions, td.actions { width: 1%; white-space: nowrap; }
.acts { display: flex; gap: .3rem; justify-content: flex-end; }
.act {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 6px;
  color: var(--act-color); background: var(--act-bg); border: 1px solid color-mix(in srgb, var(--act-color) 22%, transparent);
  transition: background .12s, color .12s, transform .12s;
}
.act .icon { width: 16px; height: 16px; vertical-align: 0; }
.act:hover { text-decoration: none; color: #fff; background: var(--act-color); }
.act:focus-visible { outline: 0; box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.act-editar { --act-color: #1F6F9E; --act-bg: rgba(31, 111, 158, .09); }
.act-clave { --act-color: #A8710F; --act-bg: rgba(214, 150, 30, .12); }
.act-productos { --act-color: #5B4BA8; --act-bg: rgba(91, 75, 168, .09); }
.act-instalaciones { --act-color: #17806F; --act-bg: rgba(23, 128, 111, .09); }
.act-archivo { --act-color: #4F6470; --act-bg: rgba(79, 100, 112, .09); }
.act-estado { --act-color: #C23B3B; --act-bg: rgba(194, 59, 59, .08); }
.act-crm { --act-color: #C4531B; --act-bg: rgba(224, 100, 38, .09); }
.act-off { --act-color: #B5BFC6; --act-bg: var(--ih-surface-2); cursor: not-allowed; }
.act-off:hover { color: var(--act-color); background: var(--act-bg); }

/* ---------- Ventana flotante ---------- */

.modal-flot { padding: 0; border: 0; border-radius: 10px; width: min(680px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem);
  box-shadow: 0 24px 60px -20px rgba(3, 40, 56, .45); color: var(--ih-text); background: var(--ih-surface); }
.modal-flot::backdrop { background: rgba(3, 40, 56, .45); }
.modal-flot-body { display: flex; flex-direction: column; max-height: calc(100vh - 3rem); }
.m-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem .9rem; border-bottom: 1px solid var(--ih-border); }
.m-eyebrow { margin: 0; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--st-orange-dark); font-weight: 700; }
.m-title { margin: .15rem 0 0; font-size: 1.15rem; font-weight: 700; color: var(--ih-heading); }
.m-close { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--ih-border); background: #fff; color: var(--ih-muted); }
.m-close:hover { background: var(--ih-surface-3); color: var(--st-navy-900); }
.m-main { padding: 1.1rem 1.3rem 1.3rem; overflow-y: auto; }
.m-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.1rem; }
.m-subtitle { display: flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 700; color: var(--ih-heading); margin: 0 0 .7rem; }
.m-section { border-top: 1px solid var(--ih-border); margin-top: 1rem; padding-top: 1rem; }
.m-list { border: 1px solid var(--ih-border); border-radius: var(--ih-radius-sm); }
.m-list li { padding: .65rem .9rem; }
.m-table { border: 1px solid var(--ih-border); border-radius: var(--ih-radius-sm); }
.m-done { margin: 0; }
.modal-flot .key-once { font-size: 1.5rem; }
.key-box { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.key-box .key-once { margin: 0; }
.key-masked { font-family: var(--bs-font-monospace); font-size: 1.3rem; letter-spacing: .08em; color: var(--ih-muted); }
.cands { max-height: 15rem; overflow-y: auto; margin-top: .6rem; padding: .2rem .1rem; }
.cands .cand { padding: .35rem 0 .35rem 1.8rem; border-bottom: 1px solid var(--ih-border); }
.btn-danger-soft {
  --bs-btn-color: var(--ih-danger); --bs-btn-bg: #fff; --bs-btn-border-color: rgba(210, 58, 58, .4);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ih-danger); --bs-btn-hover-border-color: var(--ih-danger);
}
.btn[disabled] { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .act { transition: none; } }

/* ---------- Configuración › Zoho CRM ---------- */

.steps { padding-left: 1.2rem; margin: 0 0 1.1rem; color: var(--ih-muted); font-size: .88rem; }
.steps li { margin-bottom: .25rem; }
.scope-box { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.scope-box code { font-size: .85rem; padding: .35rem .6rem; word-break: break-all; }

/* Tabla de clientes compacta: entera y sin scroll a 1600 px. Por debajo de 1400 px, la columna de acciones queda fija
   a la derecha y el resto se desplaza. */
.table-clients { font-size: .84rem; }
.table-clients tbody td { padding: .5rem .4rem; }
.table-clients thead th { padding: .55rem .4rem; letter-spacing: .04em; font-size: .64rem; white-space: normal;
  line-height: 1.25; vertical-align: bottom; }
.table-clients tr > :first-child { padding-left: .85rem; }
.table-clients tr > :last-child { padding-right: .7rem; }
.table-clients .col-company { min-width: 0; }
.table-clients .company { font-size: .88rem; }
.table-clients .sub { font-size: .68rem; }
.table-clients .products { min-width: 0; }
.table-clients .pill { font-size: .7rem; padding: .12rem .45rem; gap: .3rem; }
.table-clients .lic-id { font-size: .78rem; padding: .08rem .3rem; }
.table-clients .last .ver, .table-clients .never { font-size: .8rem; }
@media (max-width: 1399.98px) {
  .table-clients td.actions, .table-clients th.actions { position: sticky; right: 0; z-index: 1; background: var(--ih-surface);
    box-shadow: -8px 0 8px -8px rgba(3, 40, 56, .18); }
  .table-clients thead th.actions { background: var(--ih-surface-2); }
  .table-clients tbody tr:hover td.actions { background: #FDF9F7; }
}
.acts { gap: .2rem; }
.act { width: 28px; height: 28px; border-radius: 5px; }
.act .icon { width: 15px; height: 15px; }
.page-wide { max-width: none; }

/* Filtro rápido «Todos / Con licencia» y paginación */
.seg { display: inline-flex; border: 1px solid var(--ih-border-strong); border-radius: 5px; overflow: hidden; margin: 0; padding: 0; }
.seg-opt { padding: .5rem .85rem; font-size: .86rem; font-weight: 600; color: var(--ih-muted); background: #fff; cursor: pointer; margin: 0; }
.seg-opt + .btn-check + .seg-opt, .btn-check + .seg-opt ~ .seg-opt { border-left: 1px solid var(--ih-border-strong); }
.btn-check:checked + .seg-opt { color: #fff; background: var(--st-navy-700); }
.btn-check:focus-visible + .seg-opt { box-shadow: inset 0 0 0 .2rem var(--bs-focus-ring-color); }
.table-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.pager { display: flex; align-items: center; gap: .6rem; }
.table-clients tr.empty td { padding: 1.2rem 1rem; }
a.pill.prod-dup { text-decoration: none; border-style: dashed; }
a.pill.prod-dup:hover { background: rgba(91, 75, 168, .16); }
.table-clients .sub.warn { white-space: normal; }

/* ---------- Dos botones por fila y ventana «Gestionar» con pestañas ---------- */

.act-btn { display: inline-flex; align-items: center; gap: .3rem; height: 30px; padding: 0 .6rem; border-radius: 5px; font-size: .78rem;
  font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--act-color); background: var(--act-bg);
  border: 1px solid color-mix(in srgb, var(--act-color) 25%, transparent); transition: background .12s, color .12s; }
.act-btn:hover { text-decoration: none; color: #fff; background: var(--act-color); }
.act-btn:focus-visible { outline: 0; box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.act-btn .icon { width: 14px; height: 14px; vertical-align: 0; }
.act-key { --act-color: #A8710F; --act-bg: rgba(214, 150, 30, .12); min-width: 4.9rem; justify-content: center; }
.act-key[data-copied="1"] { --act-color: var(--ih-success); --act-bg: var(--ih-success-soft); }
.act-manage { --act-color: var(--st-navy-700); --act-bg: #fff; }
.act-new { --act-color: var(--st-orange-dark); --act-bg: var(--ih-accent-soft); }
.modal-flot { width: min(760px, calc(100vw - 2rem)); }
.m-sub { margin: .15rem 0 0; font-size: .8rem; color: var(--ih-muted); }
.m-tabs { display: flex; gap: .2rem; padding: 0 1.1rem; border-bottom: 1px solid var(--ih-border); background: var(--ih-surface-2); }
.m-tab { padding: .6rem .85rem; font-size: .86rem; font-weight: 600; color: var(--ih-muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; text-decoration: none; }
.m-tab:hover { color: var(--st-navy-900); text-decoration: none; }
.m-tab.active { color: var(--st-navy-900); border-bottom-color: var(--st-orange); background: var(--ih-surface); }
.m-tab.disabled { color: var(--ih-faint); cursor: not-allowed; }
.m-count { font-size: .72rem; color: var(--ih-faint); font-weight: 500; }
.m-main { min-height: 15rem; }
.m-saved { margin-bottom: .9rem; }
.m-pick a { margin-right: .2rem; }
.form-static { display: block; padding: .6rem 0; font-weight: 600; }
.inst-acts { display: inline-flex; gap: .3rem; }
.m-table .table-ih td, .m-table .table-ih th { padding: .5rem .6rem; }
.form-switch .form-check-input:checked { background-color: var(--ih-success); border-color: var(--ih-success); }
.form-switch { padding-left: 3.4em; }
.form-switch .form-check-input { margin-left: -3.4em; margin-top: .05em; }
/* «Nunca comprobó» puede partirse en dos líneas cuando la columna es estrecha (1366 px). */
.table-clients .never { white-space: normal; align-items: flex-start; }
.table-clients .never .icon { margin-top: .1em; }

/* ---------- Fase 1: ficha completa del cliente (tabla de solo consulta con una línea por CD-Key) ---------- */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi { display: block; padding: .85rem 1rem; color: var(--ih-text); }
.kpi:hover { text-decoration: none; border-color: var(--ih-accent-line); background: var(--ih-accent-soft); }
.kpi b { display: block; font-size: 1.6rem; color: var(--st-navy-900); line-height: 1.1; }
.kpi span { font-size: .78rem; color: var(--ih-muted); font-weight: 400; }
.kpi-warn b { color: var(--ih-accent-text); }
.kpi-err b { color: var(--ih-danger); }
.filters .form-select { width: auto; min-width: 0; padding-right: 2.4rem; }
.d-ok { color: var(--ih-success); }
.d-warn { color: var(--ih-accent-text); }
.d-err { color: var(--ih-danger); }
.d-off { color: var(--ih-faint); }
.date { font-weight: 600; white-space: nowrap; }
.pill.warn { --pill-color: #A8710F; --pill-bg: rgba(214, 150, 30, .12); }
.pill.dist-iberia { --pill-color: var(--ih-accent-text); --pill-bg: var(--ih-accent-soft); }
.pill.dist-gessteel { --pill-color: var(--ih-info); --pill-bg: var(--ih-info-soft); }
.cdk { font-family: var(--bs-font-monospace); font-weight: 700; color: var(--st-navy-900); white-space: nowrap; font-size: .84rem; }
.tipo { display: inline-block; margin-top: .15rem; font-size: .64rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .05rem .4rem; border-radius: 3px; background: var(--ih-surface-3); color: var(--ih-muted); }
.tipo-prod { background: var(--ih-info-soft); color: var(--ih-info); }
.ed { display: block; font-weight: 600; white-space: nowrap; font-size: .82rem; }
.seats { display: block; font-size: .64rem; color: var(--ih-muted); max-width: 8.5rem; }
.yes { color: var(--ih-success); font-weight: 700; }
.no { color: var(--ih-faint); }
.mob-line { display: inline-flex; align-items: center; white-space: nowrap; }
.mobkey { font-family: var(--bs-font-monospace); font-size: .68rem; letter-spacing: -.02em; color: var(--st-navy-900); }
.copy-ic { display: inline-grid; place-items: center; border: 0; background: none; padding: 0 .25rem; color: var(--ih-faint); cursor: pointer; }
.copy-ic:hover, .copy-ic:focus-visible { color: var(--st-orange); }
.copy-ic[data-copied="1"] { color: var(--ih-success); }
.aviso { display: inline-flex; align-items: flex-start; gap: .3rem; font-size: .72rem; font-weight: 600; line-height: 1.25; }
.aviso .icon { width: 14px; height: 14px; margin-top: .05rem; }
.aviso.w { color: var(--ih-accent-text); }
.nw { white-space: nowrap; }
.aviso.e { color: var(--ih-danger); }
.avisos-list { display: flex; flex-direction: column; gap: .15rem; max-width: 7rem; }
.table-clients tbody.cli td { vertical-align: top; }
.table-clients tbody.cli tr.cli-first td { border-top: 2px solid var(--ih-border-strong); }
.table-clients tbody.cli tr.cli-more td { border-top: 1px dashed var(--ih-border); }
.table-clients tbody.cli td[rowspan] { background: var(--ih-surface); }
.table-clients tbody.st-alerta td.col-company { box-shadow: inset 3px 0 0 var(--st-orange-bright); }
.table-clients tbody.st-vencido td.col-company { box-shadow: inset 3px 0 0 var(--ih-danger); }
.table-clients tbody.st-baja .company, .table-clients tr.k-baja td { color: var(--ih-faint); }
.table-clients .col-company { max-width: 9rem; }
.table-clients .company { font-size: .84rem; }
.table-clients tbody td { padding: .5rem .35rem; }
.table-clients thead th { white-space: normal; }
.table-clients .act-manage { padding: 0 .5rem; }
.cfg-tabs { display: flex; gap: .2rem; margin: -.75rem 0 1.25rem; border-bottom: 1px solid var(--ih-border); }
.cfg-tab { padding: .6rem .95rem; font-size: .9rem; font-weight: 600; color: var(--ih-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cfg-tab:hover { color: var(--st-navy-900); text-decoration: none; }
.cfg-tab.active { color: var(--st-navy-900); border-bottom-color: var(--st-orange); }
.input-days { max-width: 6rem; }
.m-subtabs { display: flex; gap: .4rem; margin: -.2rem 0 1rem; }
.m-subtab { padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--ih-muted); border: 1px solid var(--ih-border); }
.m-subtab:hover { text-decoration: none; color: var(--st-navy-900); background: var(--ih-surface-2); }
.m-subtab.active { color: #fff; background: var(--st-navy-700); border-color: var(--st-navy-700); }
#lista-cdkeys tr.sel td { background: var(--ih-accent-soft); }
.mobility-code { font-size: 1.05rem; }
.list-ih .title { white-space: normal; }
@media (max-width: 1399.98px) {
  .table-clients tbody.cli td.actions { position: sticky; right: 0; z-index: 1; box-shadow: -8px 0 8px -8px rgba(3, 40, 56, .18); }
}
.regen-erp { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }

/* ---------- Fase 1b: botón Historial, historial de cambios y usuarios ---------- */
.act-history { --act-color: #17806F; --act-bg: rgba(23, 128, 111, .09); }
.table-clients .acts { flex-direction: column; align-items: stretch; gap: .3rem; }
.filters-history { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; align-items: end; }
.history-detail { white-space: normal; max-width: 60rem; }
.pill.warn.no-dot::before { display: none; }
