/* HSLOG Broker Control 9.1 · World-class operational UI */
:root {
  --tlf-ink: #071729;
  --tlf-ink-2: #0c2945;
  --tlf-blue: #0868ff;
  --tlf-blue-2: #3b8cff;
  --tlf-sky: #eaf3ff;
  --tlf-canvas: #f3f6fa;
  --tlf-surface: #fff;
  --tlf-line: #dce5ee;
  --tlf-muted: #63778b;
  --tlf-green: #087f5b;
  --tlf-red: #c43232;
  --tlf-shadow: 0 20px 54px rgba(17, 40, 66, .09);
  --tlf-radius: 18px;
}

.tlf-portal-body,
.tlf-portal-app {
  background: var(--tlf-canvas);
  color: var(--tlf-ink);
  font-family: Inter, "Aptos", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.tlf-sidebar {
  background:
    radial-gradient(circle at 12% 4%, rgba(35, 126, 255, .28), transparent 28%),
    linear-gradient(180deg, #07192d 0%, #061525 100%);
  border-right: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 18px 0 48px rgba(5, 22, 39, .12);
  padding: 26px 18px 20px;
  width: 286px;
}

.tlf-brand {
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  gap: 13px;
  margin: 0 4px 20px;
  padding: 0 4px 24px;
}

.tlf-brand img {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
  height: 52px;
  object-fit: contain;
  padding: 5px;
  width: 78px;
}

.tlf-brand strong { font-size: 15px; letter-spacing: -.01em; }
.tlf-brand small { color: #8db3d9; font-size: 10px; letter-spacing: .08em; }

.tlf-sidebar nav { gap: 4px; }
.tlf-nav-label {
  color: #6583a0;
  font-size: 10px !important;
  font-weight: 800;
  letter-spacing: .14em;
  margin: 20px 12px 7px;
}

.tlf-sidebar nav button {
  border: 1px solid transparent;
  border-radius: 11px;
  color: #bdd0e2;
  font-size: 14px !important;
  font-weight: 650;
  gap: 12px;
  min-height: 45px;
  padding: 10px 12px;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.tlf-sidebar nav button:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff;
  transform: translateX(2px);
}

.tlf-sidebar nav button.is-active {
  background: linear-gradient(135deg, rgba(11, 108, 255, .95), rgba(43, 126, 255, .82));
  border-color: rgba(149, 198, 255, .35);
  box-shadow: 0 10px 28px rgba(0, 84, 211, .24);
  color: #fff;
}

.tlf-sidebar nav svg,
.tlf-home-link svg { height: 19px; width: 19px; }
.tlf-system { border-radius: 12px; margin-top: auto; }
.tlf-home-link { border-radius: 10px; font-size: 13px !important; }

.tlf-workspace { margin-left: 286px; min-width: 0; }
.tlf-topbar {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid rgba(209, 220, 231, .9);
  box-shadow: 0 8px 28px rgba(18, 43, 67, .04);
  min-height: 76px;
  padding: 0 34px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.tlf-topbar-context small { color: var(--tlf-blue); font-size: 10px !important; font-weight: 850; letter-spacing: .13em; }
.tlf-topbar-context strong { font-size: 15px !important; }
.tlf-search { background: #f5f8fb; border: 1px solid #dfe7ef; border-radius: 12px; min-height: 44px; }
.tlf-search:focus-within { background: #fff; border-color: #80b5ff; box-shadow: 0 0 0 4px rgba(8, 104, 255, .1); }
.tlf-search input { font-size: 14px !important; }
.tlf-user > span { background: linear-gradient(135deg, var(--tlf-blue), #5aa4ff); box-shadow: 0 8px 20px rgba(8, 104, 255, .2); }
.tlf-user strong { font-size: 13px !important; }
.tlf-user small { font-size: 11px !important; }

.tlf-content { max-width: 1640px; padding: 34px clamp(22px, 3vw, 48px) 70px; }
.tlf-page-head { align-items: flex-end; gap: 22px; margin-bottom: 26px; }
.tlf-page-head-copy > span { color: var(--tlf-blue); font-size: 11px !important; font-weight: 850; letter-spacing: .14em; }
.tlf-page-head-copy h1 { color: var(--tlf-ink); font-size: clamp(28px, 3.1vw, 43px) !important; letter-spacing: -.045em; line-height: 1.04; margin: 8px 0 10px; }
.tlf-page-head-copy p { color: var(--tlf-muted); font-size: 15px !important; line-height: 1.65; max-width: 760px; }
.tlf-head-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }

.tlf-primary,
.tlf-secondary,
.tlf-head-actions button,
.tlf-head-actions a {
  border-radius: 11px !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  min-height: 44px;
  padding: 10px 15px !important;
}

.tlf-primary {
  background: linear-gradient(135deg, var(--tlf-blue), #317fff) !important;
  border: 1px solid #0b62e6 !important;
  box-shadow: 0 9px 22px rgba(8, 104, 255, .19);
}

.tlf-primary:hover { box-shadow: 0 13px 28px rgba(8, 104, 255, .25); transform: translateY(-1px); }
.tlf-secondary { background: #fff !important; border: 1px solid #d8e2ec !important; color: #17324d !important; }
.tlf-secondary:hover { background: #f7faff !important; border-color: #a9c8ed !important; }

.tlf-panel,
.tlf-metric,
.tlf-operation-card,
.tlf-clause-card {
  background: var(--tlf-surface);
  border: 1px solid rgba(211, 222, 233, .95);
  border-radius: var(--tlf-radius);
  box-shadow: var(--tlf-shadow);
}

.tlf-panel { padding: 24px; }
.tlf-panel-head { margin-bottom: 20px; }
.tlf-panel-head span { color: var(--tlf-blue); font-size: 10px !important; font-weight: 850; letter-spacing: .12em; }
.tlf-panel-head h2 { font-size: 19px !important; letter-spacing: -.025em; margin-top: 5px; }
.tlf-panel-head small { color: var(--tlf-muted); font-size: 12px !important; }

.tlf-metrics,
.tlf-cash-grid { gap: 15px; }
.tlf-metric { min-height: 142px; padding: 21px; }
.tlf-metric > span { color: #607489; font-size: 12px !important; font-weight: 700; }
.tlf-metric > strong { color: var(--tlf-ink); font-size: clamp(24px, 2.4vw, 34px) !important; letter-spacing: -.04em; }
.tlf-metric small { font-size: 11px !important; }

.tlf-summary-strip {
  background: linear-gradient(180deg, #fff, #f9fbfd);
  border: 1px solid var(--tlf-line);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(17, 40, 66, .05);
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 18px;
}
.tlf-summary-strip span { color: #63778b; font-size: 12px !important; }
.tlf-summary-strip strong { color: var(--tlf-ink); font-size: 15px !important; }

.tlf-table-scroll { border: 1px solid #e0e8f0; border-radius: 14px; overflow: auto; }
.tlf-table-scroll table { min-width: 980px; }
.tlf-table-scroll thead { background: #f1f5f9; }
.tlf-table-scroll th {
  color: #526a80;
  font-size: 10px !important;
  font-weight: 850;
  letter-spacing: .08em;
  padding: 13px 14px !important;
  white-space: nowrap;
}
.tlf-table-scroll td { color: #243c53; font-size: 13px !important; padding: 14px !important; vertical-align: middle; }
.tlf-table-scroll tbody tr { transition: background .15s ease; }
.tlf-table-scroll tbody tr:hover { background: #f8fbff; }
.tlf-table-scroll td strong { color: var(--tlf-ink); font-size: 13px !important; }
.tlf-note { color: #708397; display: block; font-size: 11px !important; line-height: 1.45; margin-top: 4px; }

.tlf-form { gap: 17px; }
.tlf-form label > span { color: #425a70; font-size: 11px !important; font-weight: 780; letter-spacing: .02em; margin-bottom: 7px; }
.tlf-form input,
.tlf-form select,
.tlf-form textarea {
  background: #fff;
  border: 1px solid #cfdbe7;
  border-radius: 10px;
  color: var(--tlf-ink);
  font-size: 14px !important;
  min-height: 44px;
  padding: 10px 12px;
}
.tlf-form textarea { line-height: 1.55; min-height: 88px; }
.tlf-form input:focus,
.tlf-form select:focus,
.tlf-form textarea:focus { border-color: #78adf6; box-shadow: 0 0 0 4px rgba(8, 104, 255, .09); outline: none; }
.tlf-form-grid { gap: 13px; }
.tlf-form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tlf-form-section {
  border-top: 1px solid #e1e8ef;
  margin-top: 10px;
  padding-top: 18px;
}
.tlf-form-section > span { color: var(--tlf-blue); font-size: 10px !important; font-weight: 850; letter-spacing: .13em; }
.tlf-form-section > strong { color: var(--tlf-ink); display: block; font-size: 17px !important; margin-top: 5px; }
.tlf-form-section > small { color: var(--tlf-muted); display: block; font-size: 12px !important; margin-top: 4px; }
.tlf-security-note { background: #f2f7fd; border: 1px solid #d8e8fb; border-radius: 10px; color: #4f6880; font-size: 12px !important; line-height: 1.55; padding: 12px 14px; }

.tlf-modal-backdrop { backdrop-filter: blur(9px); background: rgba(4, 18, 31, .67); padding: 24px; }
.tlf-modal {
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 20px;
  box-shadow: 0 36px 100px rgba(3, 16, 29, .35);
  max-height: calc(100vh - 48px);
}
.tlf-modal.is-wide { max-width: 1160px; }
.tlf-modal > header { background: linear-gradient(180deg, #fff, #f8fafc); border-bottom: 1px solid #dfe7ef; padding: 21px 25px; }
.tlf-modal > header span { color: var(--tlf-blue); font-size: 10px !important; letter-spacing: .13em; }
.tlf-modal > header h2 { color: var(--tlf-ink); font-size: 23px !important; letter-spacing: -.03em; }

/* New purchase experience */
.tlf-purchase-hero {
  align-items: center;
  background: linear-gradient(135deg, #07192d, #0b3156);
  border: 1px solid #234969;
  border-radius: 20px;
  box-shadow: 0 24px 56px rgba(7, 25, 45, .18);
  color: #fff;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(260px, .8fr) 1.7fr;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 25px 28px;
  position: relative;
}
.tlf-purchase-hero::after { background: #0b6cff; border-radius: 999px; content: ""; filter: blur(55px); height: 160px; opacity: .22; position: absolute; right: -35px; top: -60px; width: 260px; }
.tlf-purchase-hero > div:first-child { position: relative; z-index: 1; }
.tlf-purchase-hero > div:first-child span { color: #8db3d9; display: block; font-size: 10px !important; font-weight: 850; letter-spacing: .13em; }
.tlf-purchase-hero > div:first-child strong { color: #fff; display: block; font-size: 31px !important; letter-spacing: -.035em; margin: 6px 0; }
.tlf-purchase-hero > div:first-child small { color: #a9bfd3; font-size: 11px !important; }
.tlf-purchase-metrics { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative; z-index: 1; }
.tlf-purchase-metrics .tlf-pulse { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); }
.tlf-purchase-metrics .tlf-pulse strong { color: #fff; }

.tlf-document-architecture { align-items: center; display: grid; gap: 10px; grid-template-columns: 1fr 34px 1fr 34px 1fr; margin: 18px 0; }
.tlf-document-architecture article { align-items: center; background: #fff; border: 1px solid var(--tlf-line); border-radius: 14px; box-shadow: 0 10px 28px rgba(17, 40, 66, .05); display: flex; gap: 12px; min-height: 76px; padding: 15px; }
.tlf-document-architecture article b { align-items: center; background: var(--tlf-sky); border-radius: 10px; color: var(--tlf-blue); display: flex; height: 40px; justify-content: center; width: 40px; }
.tlf-document-architecture article strong { display: block; font-size: 13px !important; }
.tlf-document-architecture article small { color: var(--tlf-muted); display: block; font-size: 10px !important; line-height: 1.4; margin-top: 3px; }
.tlf-document-architecture > i { background: #bad0e5; height: 1px; position: relative; }
.tlf-document-architecture > i::after { border-color: transparent transparent transparent #8dadca; border-style: solid; border-width: 4px 0 4px 6px; content: ""; position: absolute; right: 0; top: -4px; }
.tlf-document-folio small { color: #71869a; display: block; font-size: 10px !important; margin-top: 4px; }
.tlf-table-actions .is-issue { background: #0b6cff !important; color: #fff !important; }

.tlf-order-wizard,
.tlf-import-steps { background: #f2f6fa; border: 1px solid #dde6ef; border-radius: 12px; display: grid; gap: 5px; grid-template-columns: repeat(5, 1fr); padding: 5px; }
.tlf-order-wizard span,
.tlf-import-steps span { border-radius: 8px; color: #63778b; font-size: 10px !important; font-weight: 800; padding: 9px; text-align: center; }
.tlf-order-wizard span.is-active,
.tlf-import-steps span.is-active { background: #fff; box-shadow: 0 4px 14px rgba(17, 40, 66, .08); color: var(--tlf-blue); }
.tlf-auto-consolidation,
.tlf-mandatory-clause-note,
.tlf-legal-notice { align-items: flex-start; background: #eef5ff; border: 1px solid #d2e5ff; border-radius: 13px; color: #284968; display: flex; gap: 12px; padding: 14px 16px; }
.tlf-auto-consolidation svg,
.tlf-mandatory-clause-note svg,
.tlf-legal-notice > svg { color: var(--tlf-blue); flex: 0 0 auto; height: 21px; width: 21px; }
.tlf-auto-consolidation strong,
.tlf-mandatory-clause-note strong,
.tlf-legal-notice strong { color: var(--tlf-ink); display: block; font-size: 13px !important; }
.tlf-auto-consolidation small,
.tlf-mandatory-clause-note small,
.tlf-legal-notice p { color: #607890; display: block; font-size: 11px !important; line-height: 1.55; margin: 3px 0 0; }
.tlf-charge-row { background: #f8fafc; border: 1px solid #dbe5ee; border-radius: 14px; margin-bottom: 12px; padding: 15px; }
.tlf-charge-title { align-items: center; display: flex; gap: 9px; margin-bottom: 12px; }
.tlf-charge-title > span { align-items: center; background: #e7f1ff; border-radius: 8px; color: var(--tlf-blue); display: flex; font-size: 10px !important; font-weight: 850; height: 28px; justify-content: center; width: 28px; }
.tlf-charge-title > strong { color: var(--tlf-ink); font-size: 13px !important; }
.tlf-charge-title > button { background: transparent; border: 0; color: var(--tlf-red); margin-left: auto; }
.tlf-add-charge { align-self: flex-start; }
.tlf-optional-clauses { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tlf-optional-clauses label { align-items: flex-start; background: #fff; border: 1px solid #dce5ee; border-radius: 11px; display: flex; gap: 10px; padding: 12px; }
.tlf-optional-clauses input { min-height: auto; width: auto; }
.tlf-optional-clauses strong { display: block; font-size: 12px !important; }
.tlf-optional-clauses small { color: var(--tlf-muted); display: block; font-size: 10px !important; margin-top: 3px; }
.tlf-draft-actions { align-items: center; background: #071a2d; border-radius: 14px; color: #fff; display: flex; gap: 20px; justify-content: space-between; padding: 17px; }
.tlf-draft-actions p { color: #a9bfd3; font-size: 11px !important; line-height: 1.55; margin: 0; }
.tlf-inline-create { align-items: center; align-self: flex-start; background: #fff7e8; border: 1px solid #f3d291; border-radius: 10px; color: #8a5b00; display: flex; font-size: 12px !important; font-weight: 750; gap: 8px; padding: 10px 12px; }
.tlf-issue-summary { background: linear-gradient(135deg, #07192d, #0c3155); border-radius: 15px; color: #fff; padding: 20px; text-align: center; }
.tlf-issue-summary span { color: #8db3d9; display: block; font-size: 10px !important; letter-spacing: .12em; }
.tlf-issue-summary strong { display: block; font-size: 28px !important; margin: 5px 0; }
.tlf-issue-summary small { color: #a9bfd3; font-size: 11px !important; }
.tlf-issue-numbers { display: grid; gap: 9px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tlf-issue-numbers div { background: #f5f8fb; border: 1px solid #dde6ef; border-radius: 11px; padding: 13px; }
.tlf-issue-numbers small { color: var(--tlf-muted); display: block; font-size: 10px !important; }
.tlf-issue-numbers strong { color: var(--tlf-ink); display: block; font-size: 16px !important; margin-top: 4px; }
.tlf-confirm-issue { align-items: center; background: #eefaf5; border: 1px solid #bfe8d8; border-radius: 12px; display: flex; gap: 11px; padding: 14px; }
.tlf-confirm-issue input { min-height: auto; width: auto; }
.tlf-confirm-issue strong { color: #155b45; font-size: 12px !important; line-height: 1.45; }

/* Clauses */
.tlf-legal-notice { margin-bottom: 18px; }
.tlf-clause-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tlf-clause-card { display: flex; flex-direction: column; min-height: 300px; padding: 19px; }
.tlf-clause-card header { align-items: center; display: flex; justify-content: space-between; }
.tlf-clause-card header > div { display: flex; gap: 7px; }
.tlf-clause-card header > div span,
.tlf-clause-card header > div strong { background: #edf4fd; border-radius: 7px; color: #3a6388; font-size: 9px !important; font-weight: 850; padding: 5px 7px; }
.tlf-clause-card > small { color: var(--tlf-blue); font-size: 10px !important; font-weight: 800; letter-spacing: .06em; margin-top: 17px; text-transform: uppercase; }
.tlf-clause-card h2 { color: var(--tlf-ink); font-size: 17px !important; letter-spacing: -.02em; line-height: 1.25; margin: 8px 0; }
.tlf-clause-card p { color: #536c82; display: -webkit-box; font-size: 12px !important; line-height: 1.6; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 7; }
.tlf-clause-card footer { align-items: center; border-top: 1px solid #e4ebf1; display: flex; justify-content: space-between; margin-top: auto; padding-top: 13px; }
.tlf-clause-card footer span { color: #708397; font-size: 10px !important; }
.tlf-clause-card footer button { background: transparent; border: 0; color: var(--tlf-blue); font-size: 11px !important; font-weight: 750; }

/* Imports */
.tlf-import-history { margin-bottom: 16px; }
.tlf-import-summary { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.tlf-import-summary span { background: #eefaf5; border: 1px solid #c9eadc; border-radius: 11px; color: #207056; padding: 14px; }
.tlf-import-summary span.is-error { background: #fff2f2; border-color: #f0cbcb; color: #a43131; }
.tlf-import-summary strong { font-size: 20px !important; margin-right: 6px; }
.tlf-import-preview { max-height: 52vh; }
.tlf-import-preview tr.is-error { background: #fff8f8; }
.tlf-error-list { color: var(--tlf-red); font-size: 10px !important; line-height: 1.4; }

.tlf-status-issued { background: #e8f8f1 !important; color: #087351 !important; }
.tlf-status-cancelled { background: #fff0f0 !important; color: #b42318 !important; }
.tlf-status-pending_approval { background: #fff7e6 !important; color: #8d5a00 !important; }

@media (max-width: 1220px) {
  .tlf-sidebar { width: 250px; }
  .tlf-workspace { margin-left: 250px; }
  .tlf-topbar { padding: 0 22px; }
  .tlf-clause-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tlf-form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .tlf-workspace { margin-left: 0; }
  .tlf-topbar { min-height: 68px; }
  .tlf-content { padding: 26px 18px 60px; }
  .tlf-page-head { align-items: stretch; flex-direction: column; }
  .tlf-head-actions { justify-content: flex-start; }
  .tlf-purchase-hero { grid-template-columns: 1fr; }
  .tlf-document-architecture { grid-template-columns: 1fr; }
  .tlf-document-architecture > i { display: none; }
  .tlf-sidebar { width: min(88vw, 310px); }
}

@media (max-width: 700px) {
  .tlf-page-head-copy h1 { font-size: 30px !important; }
  .tlf-topbar-context { display: none; }
  .tlf-user div { display: none; }
  .tlf-head-actions,
  .tlf-head-actions > * { width: 100%; }
  .tlf-head-actions button,
  .tlf-head-actions label { justify-content: center; }
  .tlf-purchase-metrics,
  .tlf-issue-numbers,
  .tlf-clause-grid,
  .tlf-optional-clauses,
  .tlf-form-grid,
  .tlf-form-grid-3,
  .tlf-form-grid-4 { grid-template-columns: 1fr !important; }
  .tlf-order-wizard { grid-template-columns: 1fr 1fr; }
  .tlf-order-wizard span:last-child { grid-column: 1 / -1; }
  .tlf-draft-actions { align-items: stretch; flex-direction: column; }
  .tlf-modal-backdrop { padding: 0; }
  .tlf-modal { border-radius: 0; max-height: 100vh; min-height: 100vh; }
  .tlf-charge-row { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .tlf-portal-app *, .tlf-portal-app *::before, .tlf-portal-app *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* --------------------------------------------------------------------------
   HSLOG 9.10 · interfaz compacta para dashboard, OC y Centro Tributario
   -------------------------------------------------------------------------- */

.tlf-content { padding: 22px clamp(18px, 2.2vw, 34px) 48px; }
.tlf-page-head { align-items: center; margin-bottom: 16px; }
.tlf-page-head-copy h1 { font-size: clamp(25px, 2.5vw, 34px) !important; margin: 5px 0 6px; }
.tlf-page-head-copy p { font-size: 13px !important; line-height: 1.48; max-width: 680px; }
.tlf-primary,
.tlf-secondary,
.tlf-head-actions button,
.tlf-head-actions a { min-height: 38px; padding: 8px 12px !important; }
.tlf-panel { border-radius: 14px; box-shadow: 0 10px 28px rgba(17, 40, 66, .055); padding: 17px; }
.tlf-panel-head { margin-bottom: 13px; }
.tlf-panel-head h2 { font-size: 16px !important; margin-top: 3px; }
.tlf-topbar { min-height: 66px; }

.tlf-command-center {
  align-items: center;
  background: linear-gradient(135deg, #071a2d, #0b3156);
  border: 1px solid #244968;
  border-radius: 15px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(200px, .7fr) 2fr;
  margin-bottom: 12px;
  padding: 13px 15px;
}
.tlf-command-copy span { color: #7db7ef; display: block; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.tlf-command-copy strong { color: #fff; display: block; font-size: 15px; margin-top: 3px; }
.tlf-command-copy small { color: #9fb5c9; display: block; font-size: 9px; margin-top: 3px; }
.tlf-command-actions { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tlf-command-actions button {
  align-items: center;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  color: #fff;
  display: grid;
  gap: 8px;
  grid-template-columns: 27px 1fr;
  min-height: 52px;
  padding: 8px 10px;
  text-align: left;
}
.tlf-command-actions button:hover { background: rgba(255, 255, 255, .13); }
.tlf-command-actions svg { color: #7db7ef; height: 18px; width: 18px; }
.tlf-command-actions strong { display: block; font-size: 10px; }
.tlf-command-actions small { color: #9fb5c9; display: block; font-size: 8px; margin-top: 2px; }

.tlf-dashboard-kpis { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; }
.tlf-dashboard-kpi {
  background: #fff;
  border: 1px solid #dae4ed;
  border-radius: 13px;
  min-height: 87px;
  overflow: hidden;
  padding: 13px 14px;
  position: relative;
}
.tlf-dashboard-kpi > span { color: #667b8e; display: block; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.tlf-dashboard-kpi > strong { color: #0b2238; display: block; font-size: 20px; letter-spacing: -.03em; margin-top: 5px; }
.tlf-dashboard-kpi > small { color: #71869a; display: block; font-size: 9px; margin-top: 4px; }
.tlf-dashboard-kpi > i { background: #1475e8; bottom: 0; height: 3px; left: 0; position: absolute; right: 0; }
.tlf-dashboard-kpi.tlf-tone-green > i { background: #149764; }
.tlf-dashboard-kpi.tlf-tone-violet > i { background: #7857d8; }
.tlf-dashboard-kpi.tlf-tone-orange > i { background: #e69022; }

.tlf-dashboard-grid { align-items: stretch; display: grid; gap: 12px; grid-template-columns: minmax(270px, .72fr) minmax(520px, 1.6fr); }
.tlf-dashboard-side { display: grid; gap: 12px; }
.tlf-dashboard-side .tlf-panel { min-width: 0; }
.tlf-dashboard-side .tlf-empty { min-height: 82px; padding: 10px; }
.tlf-alert { padding: 11px; }
.tlf-alert p { margin-top: 2px; }
.tlf-live-row { min-height: 49px; padding: 8px 2px; }
.tlf-live-row > span { height: 32px; width: 32px; }
.tlf-dashboard-orders { min-width: 0; }
.tlf-dashboard-orders .tlf-panel-head > button { background: transparent; border: 0; color: #0b67cb; display: inline-flex; font-size: 10px; font-weight: 800; gap: 5px; }
.tlf-compact-order-list { border: 1px solid #e0e8ef; border-radius: 11px; overflow: hidden; }
.tlf-compact-order-list article {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e7edf3;
  display: grid;
  gap: 10px;
  grid-template-columns: 4px minmax(190px, 1fr) minmax(120px, .55fr) auto 30px;
  min-height: 58px;
  padding: 7px 9px 7px 0;
}
.tlf-compact-order-list article:last-child { border-bottom: 0; }
.tlf-compact-order-list article > i { align-self: stretch; background: #1475e8; border-radius: 0 4px 4px 0; }
.tlf-compact-order-list article > i.is-issued { background: #15965f; }
.tlf-compact-order-list article > i.is-cancelled { background: #d54a53; }
.tlf-compact-order-id small,
.tlf-compact-order-id strong,
.tlf-compact-order-id span,
.tlf-compact-order-money small,
.tlf-compact-order-money strong { display: block; }
.tlf-compact-order-id small { color: #0b6edb; font-size: 8px; font-weight: 900; }
.tlf-compact-order-id strong { color: #173149; font-size: 10px; margin-top: 2px; }
.tlf-compact-order-id span,
.tlf-compact-order-money small { color: #74889b; font-size: 8px; margin-top: 2px; }
.tlf-compact-order-money { text-align: right; }
.tlf-compact-order-money strong { color: #0b2238; font-size: 11px; margin-top: 3px; }
.tlf-compact-order-list article > button { align-items: center; background: #eef5fd; border: 0; border-radius: 8px; color: #0b67ca; display: flex; height: 28px; justify-content: center; padding: 0; width: 28px; }
.tlf-compact-order-list article > button svg { height: 13px; width: 13px; }

.tlf-purchase-hero-compact { border-radius: 14px; gap: 16px; grid-template-columns: minmax(190px, .55fr) 1.7fr; margin-bottom: 12px; padding: 13px 16px; }
.tlf-purchase-hero-compact > div:first-child strong { font-size: 22px !important; margin: 3px 0; }
.tlf-purchase-hero-compact .tlf-pulse { min-height: 58px; padding: 9px 11px; }
.tlf-purchase-hero-compact .tlf-pulse strong { font-size: 16px; margin-top: 4px; }
.tlf-document-center { padding-bottom: 12px; }
.tlf-document-center > .tlf-panel-head { padding: 15px 17px 11px; }
.tlf-order-filters { padding: 8px 17px; }
.tlf-order-filters button { padding: 6px 9px 6px 11px; }
.tlf-order-compact-list { display: grid; gap: 7px; padding: 12px 14px 0; }
.tlf-order-compact-row {
  align-items: center;
  background: #fff;
  border: 1px solid #dde6ee;
  border-radius: 11px;
  display: grid;
  gap: 12px;
  grid-template-columns: 4px minmax(165px, .8fr) minmax(180px, 1.1fr) minmax(110px, .55fr) minmax(145px, .7fr) auto auto;
  min-height: 72px;
  overflow: hidden;
  padding: 8px 10px 8px 0;
}
.tlf-order-compact-row > i { align-self: stretch; background: #1475e8; border-radius: 0 4px 4px 0; }
.tlf-order-compact-row.is-issued > i { background: #15965f; }
.tlf-order-compact-row.is-cancelled > i { background: #d54a53; }
.tlf-order-compact-doc small,
.tlf-order-compact-doc strong,
.tlf-order-compact-doc span,
.tlf-order-compact-provider strong,
.tlf-order-compact-provider small,
.tlf-order-compact-meta small,
.tlf-order-compact-meta strong,
.tlf-order-compact-money small,
.tlf-order-compact-money strong,
.tlf-order-compact-money span { display: block; }
.tlf-order-compact-doc small { color: #1470d8; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.tlf-order-compact-doc strong { color: #0a2238; font-size: 12px; margin-top: 3px; }
.tlf-order-compact-doc span,
.tlf-order-compact-provider small,
.tlf-order-compact-meta small,
.tlf-order-compact-money small { color: #74889a; font-size: 8px; margin-top: 3px; }
.tlf-order-compact-provider { align-items: center; display: flex; gap: 8px; min-width: 0; }
.tlf-order-compact-provider > span { align-items: center; background: #eaf3fd; border-radius: 9px; color: #0b64c5; display: flex; flex: 0 0 32px; font-size: 9px; font-weight: 900; height: 32px; justify-content: center; }
.tlf-order-compact-provider strong { color: #203950; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlf-order-compact-meta strong { color: #1f3b54; font-size: 10px; margin-top: 4px; }
.tlf-order-compact-money { text-align: right; }
.tlf-order-compact-money strong { color: #183149; font-size: 11px; margin-top: 3px; }
.tlf-order-compact-money span { color: #0b7d52; font-size: 10px; font-weight: 850; margin-top: 2px; }
.tlf-order-compact-row > button { min-height: 34px; padding: 7px 10px !important; }
.tlf-order-compact-row > button svg { height: 14px; width: 14px; }

.tlf-modal.is-wide { max-width: min(1320px, calc(100vw - 36px)); }
.tlf-modal > header { padding: 14px 18px; }
.tlf-modal > header h2 { font-size: 19px !important; }
.tlf-order-composer { gap: 10px; padding: 14px 16px 16px; }
.tlf-order-wizard { position: sticky; top: 0; z-index: 6; }
.tlf-order-wizard span { padding: 6px 8px; }
.tlf-oc-composer-layout { align-items: start; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) 260px; }
.tlf-oc-composer-main { display: grid; gap: 10px; min-width: 0; }
.tlf-order-composer .tlf-form-section { margin-top: 3px; padding-top: 11px; }
.tlf-order-composer .tlf-form-section > strong { font-size: 14px !important; margin-top: 2px; }
.tlf-order-composer .tlf-form-section > small { font-size: 9px !important; margin-top: 2px; }
.tlf-order-composer .tlf-form-grid { gap: 9px; }
.tlf-order-composer label > span { font-size: 9px !important; margin-bottom: 4px; }
.tlf-order-composer input,
.tlf-order-composer select,
.tlf-order-composer textarea { border-radius: 8px; font-size: 12px !important; min-height: 37px; padding: 7px 9px; }
.tlf-order-composer textarea { min-height: 66px; }
.tlf-service-row { border-radius: 10px; margin-bottom: 8px; padding: 10px; }
.tlf-service-row-title { margin-bottom: 8px; }
.tlf-service-row-title > span { height: 24px; width: 24px; }
.tlf-add-service,
.tlf-add-charge { min-height: 34px; padding: 7px 10px !important; }
.tlf-charge-row { background: #f8fafc; border-radius: 10px; margin-bottom: 7px; padding: 0; }
.tlf-charge-title { align-items: center; cursor: pointer; list-style: none; margin: 0; padding: 8px 10px; }
.tlf-charge-title::-webkit-details-marker { display: none; }
.tlf-charge-title > span { height: 23px; width: 23px; }
.tlf-charge-title > small { color: #72869a; font-size: 9px; margin-left: auto; }
.tlf-charge-title > svg { color: #7790a6; height: 13px; margin-left: 5px; transform: rotate(90deg); width: 13px; }
.tlf-charge-row[open] .tlf-charge-title > svg { transform: rotate(-90deg); }
.tlf-charge-fields { border-top: 1px solid #e0e8ef; display: grid; gap: 9px; padding: 10px; }
.tlf-remove-charge { align-items: center; align-self: start; background: #fff1f1; border: 1px solid #efcaca; border-radius: 8px; color: #a53d43; display: inline-flex; font-size: 9px; gap: 5px; justify-self: start; min-height: 30px; padding: 5px 8px; }
.tlf-remove-charge svg { height: 13px; width: 13px; }
.tlf-mandatory-clause-note,
.tlf-auto-consolidation { border-radius: 9px; padding: 9px 11px; }
.tlf-optional-clauses { gap: 6px; }
.tlf-optional-clauses label { border-radius: 8px; padding: 8px; }
.tlf-oc-summary-rail {
  background: #071a2d;
  border: 1px solid #183e5e;
  border-radius: 13px;
  color: #fff;
  display: grid;
  gap: 9px;
  padding: 13px;
  position: sticky;
  top: 42px;
}
.tlf-oc-summary-rail > div:first-child > span { color: #75b3ed; display: block; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.tlf-oc-summary-rail > div:first-child > strong { display: block; font-size: 14px; margin-top: 4px; }
.tlf-oc-summary-rail > div:first-child > small { color: #9eb5ca; display: block; font-size: 8px; line-height: 1.4; margin-top: 3px; }
.tlf-oc-summary-rail .tlf-composer-total { background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; display: grid; grid-template-columns: 1fr; }
.tlf-oc-summary-rail .tlf-composer-total > span { border-bottom: 1px solid rgba(255, 255, 255, .09); border-right: 0; padding: 8px 10px; }
.tlf-oc-summary-rail .tlf-composer-total > span:last-child { border-bottom: 0; }
.tlf-oc-summary-rail .tlf-composer-total strong { font-size: 13px; margin-top: 3px; }
.tlf-oc-summary-rail .tlf-composer-total .is-final { background: #0c61c5; border-radius: 0 0 9px 9px; }
.tlf-oc-process-note { align-items: center; display: grid; gap: 7px; grid-template-columns: 22px 1fr; }
.tlf-oc-process-note b { align-items: center; background: rgba(116, 179, 238, .15); border-radius: 7px; color: #83c0f7; display: flex; font-size: 8px; height: 22px; justify-content: center; }
.tlf-oc-process-note strong { display: block; font-size: 9px; }
.tlf-oc-process-note small { color: #9eb5ca; display: block; font-size: 8px; margin-top: 1px; }
.tlf-oc-save { justify-content: center; margin-top: 3px; width: 100%; }
.tlf-oc-summary-rail > p { color: #9eb5ca; font-size: 8px; line-height: 1.45; margin: 0; text-align: center; }

.tlf-order-detail { gap: 10px; }
.tlf-order-detail-hero { border-radius: 12px; padding: 14px 17px; }
.tlf-order-detail-hero > div > strong { font-size: 19px; }
.tlf-order-detail-actions { gap: 6px; padding: 9px; }
.tlf-order-detail-actions button { min-height: 33px; padding: 7px 9px !important; }
.tlf-order-detail-grid { gap: 1px; }
.tlf-order-detail-grid > article { min-height: 68px; padding: 10px 12px; }
.tlf-order-detail-numbers article { padding: 10px 12px; }
.tlf-order-detail-columns { gap: 10px; }

.tlf-tax-link-facts { border-bottom: 1px solid #e2e9f0; border-top: 1px solid #e2e9f0; display: grid; gap: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 18px; }
.tlf-tax-link-facts > span { border-right: 1px solid #e2e9f0; padding: 9px 11px; }
.tlf-tax-link-facts > span:last-child { border-right: 0; }
.tlf-tax-link-facts small { color: #74889a; display: block; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.tlf-tax-link-facts strong { color: #18334a; display: block; font-size: 10px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlf-sync-range-control { display: grid; gap: 3px; }
.tlf-sync-range-control > span { color: #657b8f; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.tlf-sync-range-control select { background: #fff; border: 1px solid #ccd9e5; border-radius: 8px; color: #173149; font-size: 10px; min-height: 35px; padding: 6px 9px; }
.tlf-tax-import-history-detailed { gap: 7px; }
.tlf-tax-import-history-detailed article { align-items: center; border: 1px solid #e1e8ef; border-radius: 10px; gap: 9px; grid-template-columns: auto minmax(130px, .8fr) minmax(360px, 2fr) minmax(105px, .55fr); padding: 8px 9px; }
.tlf-tax-import-history-detailed article.is-empty { background: #fffaf0; border-color: #edd9ad; }
.tlf-tax-import-counts { display: grid; gap: 3px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tlf-tax-import-counts > span { background: #f3f7fa; border-radius: 6px; padding: 5px; text-align: center; }
.tlf-tax-import-counts small { font-size: 6px; font-weight: 800; margin: 0; text-transform: uppercase; }
.tlf-tax-import-counts strong { font-size: 10px; margin-top: 2px; }
.tlf-tax-import-result { display: grid; gap: 4px; justify-items: end; }
.tlf-tax-import-result > small { line-height: 1.35; margin: 0; text-align: right; }

@media (max-width: 1180px) {
  .tlf-command-center { grid-template-columns: 1fr; }
  .tlf-dashboard-grid { grid-template-columns: 1fr; }
  .tlf-dashboard-side { grid-template-columns: 1fr 1fr; }
  .tlf-order-compact-row { grid-template-columns: 4px minmax(150px, .8fr) minmax(170px, 1fr) minmax(105px, .6fr) minmax(130px, .7fr) auto; }
  .tlf-order-compact-row > .tlf-status { display: none; }
  .tlf-oc-composer-layout { grid-template-columns: minmax(0, 1fr) 230px; }
  .tlf-tax-import-history-detailed article { grid-template-columns: auto 1fr; }
  .tlf-tax-import-counts,
  .tlf-tax-import-result { grid-column: 1 / -1; }
  .tlf-tax-import-result { grid-template-columns: auto 1fr; justify-items: start; }
}

@media (max-width: 820px) {
  .tlf-command-actions,
  .tlf-dashboard-kpis { grid-template-columns: 1fr 1fr; }
  .tlf-dashboard-side { grid-template-columns: 1fr; }
  .tlf-order-compact-row { grid-template-columns: 4px 1fr auto; padding: 9px 9px 9px 0; }
  .tlf-order-compact-provider,
  .tlf-order-compact-meta { grid-column: 2; }
  .tlf-order-compact-money { grid-column: 3; grid-row: 1 / 3; }
  .tlf-order-compact-row > button { grid-column: 3; }
  .tlf-oc-composer-layout { grid-template-columns: 1fr; }
  .tlf-oc-summary-rail { bottom: 0; position: sticky; top: auto; }
  .tlf-oc-process-note,
  .tlf-oc-summary-rail > div:first-child,
  .tlf-oc-summary-rail > p { display: none; }
  .tlf-oc-summary-rail .tlf-composer-total { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tlf-tax-link-facts { grid-template-columns: 1fr 1fr; }
  .tlf-tax-link-facts > span:nth-child(2) { border-right: 0; }
  .tlf-tax-link-facts > span:nth-child(n+3) { border-top: 1px solid #e2e9f0; }
  .tlf-tax-import-counts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .tlf-command-actions,
  .tlf-dashboard-kpis { grid-template-columns: 1fr; }
  .tlf-compact-order-list article { grid-template-columns: 4px 1fr 28px; }
  .tlf-compact-order-money,
  .tlf-compact-order-list .tlf-status { display: none; }
  .tlf-purchase-hero-compact { grid-template-columns: 1fr; }
  .tlf-order-compact-money { display: none; }
  .tlf-order-compact-row { grid-template-columns: 4px 1fr auto; }
  .tlf-tax-link-facts { grid-template-columns: 1fr; }
  .tlf-tax-link-facts > span { border-right: 0; border-top: 1px solid #e2e9f0; }
  .tlf-tax-link-facts > span:first-child { border-top: 0; }
  .tlf-tax-import-counts { grid-template-columns: 1fr 1fr; }
}

/* HSLOG 9.1 · jerarquía cliente/subcliente y asistencia masiva estable */
.tlf-workflow-shortcuts { display: grid; gap: 11px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: -4px 0 20px; }
.tlf-workflow-shortcuts > button {
  align-items: center;
  background: #fff;
  border: 1px solid #d9e4ee;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(17, 40, 66, .055);
  color: var(--tlf-ink);
  display: grid;
  gap: 10px;
  grid-template-columns: 24px 34px 1fr 17px;
  min-height: 76px;
  padding: 13px;
  text-align: left;
  transition: .16s ease;
}
.tlf-workflow-shortcuts > button:hover { border-color: #9fc4f3; box-shadow: 0 14px 32px rgba(17, 67, 116, .1); transform: translateY(-2px); }
.tlf-workflow-shortcuts > button > span { align-items: center; background: #eaf3ff; border-radius: 8px; color: var(--tlf-blue); display: flex; font-size: 10px !important; font-weight: 900; height: 24px; justify-content: center; width: 24px; }
.tlf-workflow-shortcuts > button > svg { color: #4a79a8; height: 20px; width: 20px; }
.tlf-workflow-shortcuts > button > svg:last-child { color: #9bb0c5; height: 15px; width: 15px; }
.tlf-workflow-shortcuts strong { display: block; font-size: 12px !important; }
.tlf-workflow-shortcuts small { color: #71869a; display: block; font-size: 9px !important; margin-top: 3px; }
.tlf-client-directory { display: grid; gap: 18px; margin-bottom: 24px; }
.tlf-client-account {
  background: #fff;
  border: 1px solid #d8e3ed;
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(17, 40, 66, .08);
  overflow: hidden;
}
.tlf-client-account-head {
  align-items: center;
  background: linear-gradient(120deg, #071a2d 0%, #0b3156 75%, #0b68f4 130%);
  color: #fff;
  display: flex;
  gap: 16px;
  min-height: 104px;
  padding: 21px 24px;
  position: relative;
}
.tlf-client-account-head::after {
  background: rgba(52, 132, 255, .32);
  border-radius: 999px;
  content: "";
  filter: blur(35px);
  height: 90px;
  position: absolute;
  right: 4%;
  top: -35px;
  width: 180px;
}
.tlf-client-avatar {
  align-items: center;
  background: linear-gradient(145deg, #fff, #cfe3ff);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 15px;
  color: #0a4fae;
  display: flex;
  flex: 0 0 56px;
  font-size: 18px !important;
  font-weight: 900;
  height: 56px;
  justify-content: center;
  letter-spacing: -.03em;
}
.tlf-client-account-head > div { position: relative; z-index: 1; }
.tlf-client-account-head small { color: #8fb5da; display: block; font-size: 9px !important; font-weight: 850; letter-spacing: .14em; }
.tlf-client-account-head h2 { color: #fff; font-size: clamp(23px, 2.4vw, 32px) !important; letter-spacing: -.035em; margin: 4px 0 2px; }
.tlf-client-account-head p { color: #bdd0e3; font-size: 12px !important; margin: 0; }
.tlf-subclient-grid { display: grid; gap: 13px; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); padding: 18px; }
.tlf-subclient-card {
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid #dbe5ee;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  min-height: 228px;
  padding: 17px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.tlf-subclient-card:hover { border-color: #a9c9f2; box-shadow: 0 14px 30px rgba(25, 69, 112, .09); transform: translateY(-2px); }
.tlf-subclient-top { align-items: center; display: flex; justify-content: space-between; }
.tlf-subclient-top > span:first-child { color: var(--tlf-blue); font-size: 9px !important; font-weight: 850; letter-spacing: .12em; }
.tlf-subclient-card h3 { color: var(--tlf-ink); font-size: 20px !important; letter-spacing: -.025em; margin: 15px 0 2px; }
.tlf-operation-code { color: #7a8da0; font-size: 10px !important; }
.tlf-subclient-metrics { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin-top: 18px; }
.tlf-subclient-metrics > span { background: #f1f6fb; border-radius: 10px; padding: 10px 11px; }
.tlf-subclient-metrics small { color: #75899d; display: block; font-size: 9px !important; }
.tlf-subclient-metrics strong { color: #17324d; display: block; font-size: 15px !important; margin-top: 3px; }
.tlf-subclient-card footer { align-items: center; border-top: 1px solid #e3eaf1; display: flex; justify-content: space-between; margin-top: auto; padding-top: 13px; }
.tlf-subclient-card footer > small { color: #72869a; font-size: 10px !important; }
.tlf-subclient-card footer button { align-items: center; background: transparent; border: 0; color: var(--tlf-blue); display: inline-flex; font-size: 11px !important; font-weight: 800; gap: 5px; padding: 5px; }
.tlf-subclient-card footer button svg { height: 15px; width: 15px; }
.tlf-subclient-card footer button.is-danger { color: var(--tlf-red); }

.tlf-client-form-hierarchy {
  background: linear-gradient(145deg, #071a2d, #0c3155);
  border-radius: 15px;
  display: grid;
  gap: 13px;
  grid-template-columns: 1fr 1fr;
  padding: 17px;
}
.tlf-client-form-hierarchy label > span { color: #bcd0e3 !important; }
.tlf-client-form-hierarchy input { border-color: rgba(255, 255, 255, .28) !important; }

.tlf-template-choice { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.tlf-template-choice label { cursor: pointer; position: relative; }
.tlf-template-choice input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.tlf-template-choice label > span {
  align-items: flex-start;
  background: #f7f9fc;
  border: 2px solid #dce5ee;
  border-radius: 14px;
  display: grid;
  gap: 5px;
  min-height: 122px;
  padding: 17px;
  transition: .16s ease;
}
.tlf-template-choice label > span > svg { color: var(--tlf-blue); height: 25px; width: 25px; }
.tlf-template-choice strong { color: var(--tlf-ink); font-size: 15px !important; }
.tlf-template-choice small { color: var(--tlf-muted); font-size: 11px !important; line-height: 1.45; }
.tlf-template-choice input:checked + span { background: #edf5ff; border-color: #3d8cff; box-shadow: 0 0 0 4px rgba(8, 104, 255, .08); }
.tlf-inline-template-download {
  align-items: center;
  background: #eef5ff;
  border: 1px solid #cfe2fb;
  border-radius: 12px;
  color: var(--tlf-blue);
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  text-align: left;
}
.tlf-inline-template-download > svg { flex: 0 0 auto; height: 21px; width: 21px; }
.tlf-inline-template-download strong { color: var(--tlf-ink); display: block; font-size: 12px !important; }
.tlf-inline-template-download small { color: #637c94; display: block; font-size: 10px !important; margin-top: 2px; }
.tlf-download-actions { display: grid; gap: 10px; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); }
.tlf-download-actions button { align-items: center; display: inline-flex; justify-content: center; min-height: 46px; }
.tlf-download-actions svg { height: 18px; width: 18px; }

@media (max-width: 1180px) {
  .tlf-workflow-shortcuts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .tlf-workflow-shortcuts { grid-template-columns: 1fr; }
  .tlf-client-account-head { min-height: 88px; padding: 17px; }
  .tlf-client-avatar { flex-basis: 48px; height: 48px; }
  .tlf-subclient-grid, .tlf-template-choice, .tlf-client-form-hierarchy, .tlf-download-actions { grid-template-columns: 1fr; }
  .tlf-subclient-grid { padding: 12px; }
}

/* Portal HSLOG 9.3 · producción diaria, contexto semanal y acumulado mensual */
.tlf-finance-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tlf-today-button {
  min-height: 50px !important;
}

.tlf-daily-production {
  background: #fff;
  border: 1px solid #dce6ef;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(9, 37, 64, .09);
  margin-bottom: 28px;
  overflow: hidden;
}

.tlf-daily-production-head {
  align-items: center;
  background: linear-gradient(180deg, #fff, #f7faff);
  border-bottom: 1px solid #dfe8f1;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 24px 28px;
}

.tlf-daily-production-head > div:first-child > span,
.tlf-period-section-title span,
.tlf-week-context > div:first-child span {
  color: var(--tlf-blue);
  display: block;
  font-size: 10px !important;
  font-weight: 900;
  letter-spacing: .14em;
}

.tlf-daily-production-head h2 {
  color: var(--tlf-ink);
  font-size: clamp(22px, 2.2vw, 31px) !important;
  letter-spacing: -.035em;
  margin: 5px 0 4px;
}

.tlf-daily-production-head p {
  color: #647a8f;
  font-size: 12px !important;
  margin: 0;
}

.tlf-day-navigation {
  align-items: center;
  background: #edf4fb;
  border: 1px solid #d5e2ef;
  border-radius: 12px;
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
}

.tlf-day-navigation button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #34536f;
  display: inline-flex;
  font-size: 10px !important;
  font-weight: 850;
  gap: 6px;
  min-height: 36px;
  padding: 8px 10px;
}

.tlf-day-navigation button:hover,
.tlf-day-navigation button:focus-visible {
  background: #fff;
  box-shadow: 0 5px 14px rgba(14, 47, 78, .09);
  color: var(--tlf-blue);
}

.tlf-day-navigation button:nth-child(2) {
  background: #fff;
  color: var(--tlf-blue);
}

.tlf-day-navigation button svg {
  height: 14px;
  width: 14px;
}

.tlf-day-navigation button:first-child svg {
  transform: rotate(180deg);
}

.tlf-daily-command {
  background:
    radial-gradient(circle at 14% 10%, rgba(27, 112, 203, .28), transparent 34%),
    linear-gradient(128deg, #041628, #0b2e4d 70%, #113a5e);
  color: #fff;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(330px, .9fr) minmax(520px, 1.6fr);
  padding: 30px 28px;
}

.tlf-daily-command > article {
  border-right: 1px solid rgba(255, 255, 255, .14);
  padding-right: 30px;
}

.tlf-daily-command > article > span:first-child {
  color: #f1bd30;
  display: block;
  font-size: 10px !important;
  font-weight: 900;
  letter-spacing: .13em;
}

.tlf-daily-command > article > strong {
  display: block;
  font-size: clamp(38px, 4vw, 58px) !important;
  letter-spacing: -.055em;
  line-height: 1;
  margin: 12px 0 13px;
}

.tlf-daily-command > article > small {
  color: #b8ccde;
  display: block;
  font-size: 11px !important;
  margin-top: 15px;
}

.tlf-daily-delta {
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px !important;
  font-weight: 800;
  padding: 7px 10px;
}

.tlf-daily-delta.is-positive { background: rgba(52, 196, 119, .15); color: #8de5b5; }
.tlf-daily-delta.is-negative { background: rgba(243, 86, 86, .15); color: #ffaaaa; }
.tlf-daily-delta.is-neutral { background: rgba(255, 255, 255, .08); color: #c3d4e3; }

.tlf-daily-kpis {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  padding-left: 30px;
}

.tlf-daily-kpi {
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 84px;
  padding: 15px 17px;
}

.tlf-daily-kpi small {
  color: #aec3d6;
  font-size: 10px !important;
}

.tlf-daily-kpi strong {
  font-size: 18px !important;
  margin-top: 6px;
}

.tlf-daily-kpi-orange strong { color: #ffc673; }
.tlf-daily-kpi-green strong { color: #8de5b5; }
.tlf-daily-kpi-red strong { color: #ffaaaa; }
.tlf-daily-kpi-violet strong { color: #c8b7ff; }

.tlf-daily-facts {
  background: #f8fbfe;
  border-bottom: 1px solid #e1e9f1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 28px;
}

.tlf-daily-facts > span {
  border-right: 1px solid #e0e8ef;
  padding: 18px 20px;
}

.tlf-daily-facts > span:first-child { padding-left: 0; }
.tlf-daily-facts > span:last-child { border-right: 0; }
.tlf-daily-facts small { color: #71869a; display: block; font-size: 10px !important; }
.tlf-daily-facts strong { color: var(--tlf-ink); display: block; font-size: 20px !important; margin-top: 5px; }
.tlf-daily-facts strong.is-positive { color: #197044; }
.tlf-daily-facts strong.is-negative { color: #b52d2d; }
.tlf-daily-facts strong.is-zero { color: #60758a; }

.tlf-week-context {
  align-items: center;
  background: #eef5fc;
  border: 1px solid #d8e5f1;
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(190px, 1.3fr) repeat(4, 1fr);
  margin: 20px 28px 0;
  padding: 15px 18px;
}

.tlf-week-context > div:first-child strong {
  color: var(--tlf-ink);
  display: block;
  font-size: 13px !important;
  margin-top: 4px;
}

.tlf-week-context > span {
  border-left: 1px solid #cfdeec;
  padding-left: 16px;
}

.tlf-week-context small { color: #71869a; display: block; font-size: 9px !important; }
.tlf-week-context strong { color: var(--tlf-ink); display: block; font-size: 14px !important; margin-top: 3px; }
.tlf-week-context strong.is-positive { color: #197044; }
.tlf-week-context strong.is-negative { color: #b52d2d; }

.tlf-daily-detail {
  padding: 24px 28px 28px;
}

.tlf-daily-detail .tlf-panel-head {
  align-items: end;
}

.tlf-daily-detail .tlf-panel-head > strong {
  color: #60758a;
  font-size: 11px !important;
}

.tlf-daily-table {
  min-width: 1120px;
}

.tlf-period-section-title {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 32px 2px 15px;
}

.tlf-period-section-title h2 {
  color: var(--tlf-ink);
  font-size: 22px !important;
  margin: 5px 0 0;
}

.tlf-period-section-title p {
  color: #71869a;
  font-size: 11px !important;
  margin: 0;
}

@media (max-width: 1220px) {
  .tlf-daily-command { grid-template-columns: 1fr; }
  .tlf-daily-command > article { border-bottom: 1px solid rgba(255, 255, 255, .14); border-right: 0; padding: 0 0 24px; }
  .tlf-daily-kpis { padding: 24px 0 0; }
  .tlf-week-context { grid-template-columns: repeat(4, 1fr); }
  .tlf-week-context > div:first-child { grid-column: 1 / -1; }
  .tlf-week-context > span:first-of-type { border-left: 0; padding-left: 0; }
}

@media (max-width: 860px) {
  .tlf-finance-filters { width: 100%; }
  .tlf-finance-filters .tlf-period-control { flex: 1 1 210px; width: auto; }
  .tlf-daily-production-head { align-items: stretch; flex-direction: column; }
  .tlf-day-navigation { justify-content: space-between; }
  .tlf-daily-facts { grid-template-columns: 1fr 1fr; }
  .tlf-daily-facts > span:nth-child(2) { border-right: 0; }
  .tlf-daily-facts > span:nth-child(n+3) { border-top: 1px solid #e0e8ef; }
  .tlf-daily-facts > span:nth-child(3) { padding-left: 0; }
  .tlf-week-context { grid-template-columns: 1fr 1fr; }
  .tlf-week-context > span:nth-of-type(3) { border-left: 0; padding-left: 0; }
  .tlf-period-section-title { align-items: start; flex-direction: column; gap: 7px; }
}

@media (max-width: 620px) {
  .tlf-daily-production { border-radius: 16px; }
  .tlf-daily-production-head, .tlf-daily-command, .tlf-daily-detail { padding-left: 17px; padding-right: 17px; }
  .tlf-day-navigation button span { display: none; }
  .tlf-daily-kpis { grid-template-columns: 1fr; }
  .tlf-daily-facts { padding: 0 17px; }
  .tlf-daily-facts > span { padding: 15px 10px; }
  .tlf-daily-facts > span:nth-child(odd) { padding-left: 0; }
  .tlf-week-context { grid-template-columns: 1fr; margin-left: 17px; margin-right: 17px; }
  .tlf-week-context > span { border-left: 0; border-top: 1px solid #cfdeec; padding-left: 0; padding-top: 10px; }
  .tlf-week-context > span:first-of-type { border-top: 0; padding-top: 0; }
}

/* --------------------------------------------------------------------------
   Centro documental v9.4 · prefacturas, OC y administración contextual
   -------------------------------------------------------------------------- */

.tlf-document-center {
  overflow: hidden;
  padding: 0 0 28px;
}

.tlf-document-center > .tlf-panel-head {
  padding: 24px 26px 18px;
}

.tlf-order-filters {
  align-items: center;
  border-bottom: 1px solid #e3eaf1;
  border-top: 1px solid #e3eaf1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 26px;
}

.tlf-order-filters button {
  align-items: center;
  background: #f5f8fb;
  border: 1px solid #dce5ee;
  border-radius: 999px;
  color: #50677d;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  gap: 8px;
  padding: 8px 11px 8px 14px;
}

.tlf-order-filters button strong {
  align-items: center;
  background: #e5edf5;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  justify-content: center;
  min-height: 22px;
  min-width: 22px;
  padding: 0 6px;
}

.tlf-order-filters button.is-active {
  background: #071f35;
  border-color: #071f35;
  color: #fff;
}

.tlf-order-filters button.is-active strong {
  background: #1574e7;
  color: #fff;
}

.tlf-order-card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 22px 26px 0;
}

.tlf-order-card {
  background: #fff;
  border: 1px solid #dce5ee;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(24, 51, 77, .055);
  display: flex;
  flex-direction: column;
  min-height: 330px;
  overflow: hidden;
  position: relative;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.tlf-order-card::before {
  background: #1371e6;
  content: "";
  height: 4px;
  inset: 0 0 auto;
  position: absolute;
}

.tlf-order-card.is-issued::before { background: #1a9a5b; }
.tlf-order-card.is-cancelled::before { background: #d44b55; }

.tlf-order-card:hover {
  border-color: #b8cce0;
  box-shadow: 0 18px 38px rgba(24, 51, 77, .11);
  transform: translateY(-2px);
}

.tlf-order-card > header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 22px 20px 16px;
}

.tlf-order-card > header > div > span {
  color: #6e8295;
  display: block;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tlf-order-card > header > div > strong {
  color: #0a2339;
  display: block;
  font-size: 17px;
  letter-spacing: -.025em;
  margin-top: 5px;
}

.tlf-order-card-provider {
  align-items: center;
  display: flex;
  gap: 11px;
  padding: 0 20px 16px;
}

.tlf-order-card-provider > span {
  align-items: center;
  background: #eaf3fd;
  border-radius: 12px;
  color: #075ec8;
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 12px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
}

.tlf-order-card-provider strong,
.tlf-order-card-provider small {
  display: block;
}

.tlf-order-card-provider strong { color: #18334b; font-size: 12px; }
.tlf-order-card-provider small { color: #7b8fa1; font-size: 9px; margin-top: 3px; }

.tlf-order-card-meta,
.tlf-order-card-money {
  display: grid;
  gap: 1px;
  grid-template-columns: 1fr 1fr;
  margin: 0 20px;
  overflow: hidden;
}

.tlf-order-card-meta { border: 1px solid #e4eaf0; border-radius: 11px 11px 0 0; }
.tlf-order-card-money { background: #f5f8fb; border: 1px solid #e4eaf0; border-radius: 0 0 11px 11px; border-top: 0; }

.tlf-order-card-meta > span,
.tlf-order-card-money > span {
  min-width: 0;
  padding: 11px 12px;
}

.tlf-order-card-meta > span + span,
.tlf-order-card-money > span + span { border-left: 1px solid #e4eaf0; }

.tlf-order-card-meta small,
.tlf-order-card-money small {
  color: #7a8fa2;
  display: block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tlf-order-card-meta strong,
.tlf-order-card-money strong {
  color: #173047;
  display: block;
  font-size: 11px;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tlf-order-card-money strong { font-size: 14px; }

.tlf-order-card > footer {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: auto;
  padding: 17px 20px 19px;
}

.tlf-order-card > footer > small {
  color: #7a8fa2;
  font-size: 8px;
  line-height: 1.35;
  max-width: 42%;
}

.tlf-order-card > footer button {
  align-items: center;
  display: inline-flex;
  font-size: 10px;
  gap: 7px;
  justify-content: center;
  padding: 10px 12px;
}

.tlf-order-card > footer button svg { height: 14px; width: 14px; }

.tlf-order-detail {
  display: grid;
  gap: 18px;
  padding-bottom: 3px;
}

.tlf-order-detail-hero {
  align-items: center;
  background: linear-gradient(130deg, #061a2d, #0d385b);
  border-radius: 16px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  overflow: hidden;
  padding: 22px 24px;
  position: relative;
}

.tlf-order-detail-hero::before {
  background: #1677ec;
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 5px;
}

.tlf-order-detail-hero.is-issued::before { background: #28b66d; }
.tlf-order-detail-hero.is-cancelled::before { background: #eb5a63; }
.tlf-order-detail-hero > div > span { color: #9fc2df; display: block; font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.tlf-order-detail-hero > div > strong { display: block; font-size: 24px; letter-spacing: -.035em; margin-top: 6px; }
.tlf-order-detail-hero > div > small { color: #c0d4e6; display: block; font-size: 10px; margin-top: 7px; }

.tlf-order-cancelled-note {
  align-items: center;
  background: #fff1f2;
  border: 1px solid #f2c3c7;
  border-radius: 12px;
  color: #8d242d;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 13px 16px;
}

.tlf-order-cancelled-note strong { font-size: 11px; }
.tlf-order-cancelled-note span { font-size: 10px; text-align: right; }

.tlf-order-detail-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tlf-order-detail-actions button {
  align-items: center;
  display: inline-flex;
  font-size: 10px;
  gap: 7px;
  justify-content: center;
  min-height: 39px;
  padding: 9px 12px;
}

.tlf-order-detail-actions svg { height: 14px; width: 14px; }

.tlf-danger-button {
  background: #fff1f2;
  border: 1px solid #efc5c9;
  border-radius: 10px;
  color: #aa2d37;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.tlf-order-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tlf-order-detail-grid > article {
  background: #f7f9fc;
  border: 1px solid #e0e7ee;
  border-radius: 12px;
  min-width: 0;
  padding: 13px 14px;
}

.tlf-order-detail-grid small,
.tlf-order-detail-grid strong,
.tlf-order-detail-grid span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlf-order-detail-grid small { color: #70869a; font-size: 8px; font-weight: 900; letter-spacing: .07em; }
.tlf-order-detail-grid strong { color: #173048; font-size: 11px; margin-top: 7px; }
.tlf-order-detail-grid span { color: #70869a; font-size: 9px; margin-top: 4px; }

.tlf-order-detail-numbers {
  background: #071f35;
  border-radius: 14px;
  color: #fff;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}

.tlf-order-detail-numbers article {
  border-right: 1px solid rgba(255, 255, 255, .11);
  padding: 15px 16px;
}

.tlf-order-detail-numbers article:last-child { border-right: 0; }
.tlf-order-detail-numbers small { color: #9fb7cb; display: block; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.tlf-order-detail-numbers strong { display: block; font-size: 14px; margin-top: 6px; }
.tlf-order-detail-numbers .is-total { background: #0d5fc1; }
.tlf-order-detail-numbers .is-total strong { font-size: 17px; }

.tlf-order-detail-columns {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
}

.tlf-order-detail-columns > aside { display: grid; gap: 14px; }

.tlf-order-detail-block {
  border: 1px solid #e0e7ee;
  border-radius: 14px;
  overflow: hidden;
}

.tlf-order-detail-block > header {
  align-items: center;
  background: #f5f8fb;
  border-bottom: 1px solid #e0e7ee;
  display: flex;
  justify-content: space-between;
  padding: 13px 15px;
}

.tlf-order-detail-block > header span { color: #6f8498; display: block; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.tlf-order-detail-block > header strong { color: #173048; display: block; font-size: 11px; margin-top: 4px; }
.tlf-order-detail-block table { min-width: 650px; }
.tlf-order-detail-block th { font-size: 8px; }
.tlf-order-detail-block td { font-size: 9px; padding-bottom: 10px; padding-top: 10px; }

.tlf-order-charge-summary { display: grid; padding: 5px 15px; }
.tlf-order-charge-summary > span { align-items: center; border-bottom: 1px solid #e7edf3; display: flex; gap: 12px; justify-content: space-between; padding: 11px 0; }
.tlf-order-charge-summary > span:last-child { border-bottom: 0; }
.tlf-order-charge-summary small { color: #60758a; font-size: 9px; }
.tlf-order-charge-summary strong { color: #a43a42; font-size: 11px; }

.tlf-order-history { list-style: none; margin: 0; padding: 10px 15px 14px; }
.tlf-order-history li { display: grid; gap: 10px; grid-template-columns: 9px 1fr; padding: 7px 0; }
.tlf-order-history li > span { background: #1677ec; border-radius: 50%; height: 8px; margin-top: 3px; width: 8px; }
.tlf-order-history strong { color: #29435a; display: block; font-size: 9px; }
.tlf-order-history small { color: #7b8fa1; display: block; font-size: 8px; margin-top: 4px; }

.tlf-service-row {
  background: #f9fbfd;
  border: 1px solid #dce5ee;
  border-radius: 14px;
  margin-bottom: 12px;
  padding: 15px;
}

.tlf-service-row-title {
  align-items: center;
  display: flex;
  gap: 9px;
  margin-bottom: 12px;
}

.tlf-service-row-title > span {
  align-items: center;
  background: #0b67d6;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 9px;
  font-weight: 900;
  height: 27px;
  justify-content: center;
  width: 31px;
}

.tlf-service-row-title > strong { color: #173048; font-size: 11px; }
.tlf-service-row-title > button { background: transparent; border: 0; color: #9b3d45; cursor: pointer; margin-left: auto; padding: 5px; }
.tlf-service-row-title > button svg { height: 15px; width: 15px; }

.tlf-add-service { margin: 0 0 8px; }

.tlf-composer-total {
  background: #071f35;
  border-radius: 14px;
  color: #fff;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 18px;
  overflow: hidden;
}

.tlf-composer-total > span {
  border-right: 1px solid rgba(255, 255, 255, .11);
  padding: 15px;
}

.tlf-composer-total > span:last-child { border-right: 0; }
.tlf-composer-total small { color: #a8bdcf; display: block; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.tlf-composer-total strong { display: block; font-size: 14px; margin-top: 6px; }
.tlf-composer-total .is-final { background: #0d61c6; }
.tlf-composer-total .is-final strong { font-size: 17px; }

@media (max-width: 1180px) {
  .tlf-order-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tlf-order-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tlf-order-detail-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .tlf-order-card-grid { grid-template-columns: 1fr; padding-left: 16px; padding-right: 16px; }
  .tlf-document-center > .tlf-panel-head, .tlf-order-filters { padding-left: 16px; padding-right: 16px; }
  .tlf-order-detail-hero { align-items: flex-start; flex-direction: column; gap: 12px; }
  .tlf-order-detail-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .tlf-order-detail-actions button { width: 100%; }
  .tlf-order-detail-grid { grid-template-columns: 1fr; }
  .tlf-order-detail-numbers, .tlf-composer-total { grid-template-columns: 1fr 1fr; }
  .tlf-order-detail-numbers article:nth-child(2n), .tlf-composer-total > span:nth-child(2n) { border-right: 0; }
  .tlf-order-detail-numbers .is-total { grid-column: 1 / -1; }
  .tlf-order-cancelled-note { align-items: flex-start; flex-direction: column; }
  .tlf-order-cancelled-note span { text-align: left; }
}

@media (max-width: 480px) {
  .tlf-order-card-meta, .tlf-order-card-money { grid-template-columns: 1fr; }
  .tlf-order-card-meta > span + span, .tlf-order-card-money > span + span { border-left: 0; border-top: 1px solid #e4eaf0; }
  .tlf-order-card > footer { align-items: stretch; flex-direction: column; }
  .tlf-order-card > footer > small { max-width: none; }
  .tlf-order-detail-actions, .tlf-order-detail-numbers, .tlf-composer-total { grid-template-columns: 1fr; }
  .tlf-order-detail-numbers article, .tlf-composer-total > span { border-bottom: 1px solid rgba(255, 255, 255, .11); border-right: 0; }
}

/* Cotizaciones comerciales HSLOG 9.5 */
.tlf-quote-hero {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.4fr);
  gap: 18px;
  margin: 0 0 18px;
}

.tlf-quote-hero > div:first-child {
  min-height: 150px;
  padding: 24px 26px;
  border-radius: 20px;
  color: #fff;
  background: radial-gradient(circle at 90% 0, rgba(52, 130, 255, .5), transparent 42%), linear-gradient(135deg, #071a2d, #0a3159);
  box-shadow: 0 18px 46px rgba(7, 26, 45, .18);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tlf-quote-hero > div:first-child span,
.tlf-quote-hero > div:first-child small {
  color: #a9c0d7;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tlf-quote-hero > div:first-child strong {
  margin: 8px 0;
  color: #fff;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -.04em;
}

.tlf-quote-card { position: relative; overflow: hidden; }
.tlf-quote-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #0b6cff; }
.tlf-quote-card.is-accepted::before { background: #13a76b; }
.tlf-quote-card.is-rejected::before,
.tlf-quote-card.is-cancelled::before { background: #d84747; }
.tlf-quote-card.is-expired::before { background: #f4a62a; }

.tlf-quote-title {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 17px 18px;
  border: 1px solid #e1e9f1;
  border-radius: 13px;
  background: #f8fafc;
}

.tlf-quote-title small,
.tlf-quote-terms small { color: #0b6cff; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.tlf-quote-title strong { color: #071a2d; font-size: 15px; }
.tlf-quote-title span { color: #60758a; font-size: 12px; }
.tlf-quote-composer .tlf-form-section { margin-top: 26px; }
.tlf-quote-line-row { border-left: 3px solid #0b6cff; }

.tlf-quote-total {
  position: sticky;
  bottom: 0;
  z-index: 4;
  box-shadow: 0 -13px 30px rgba(7, 26, 45, .12);
}

.tlf-quote-terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tlf-quote-terms article { min-height: 130px; padding: 17px; border: 1px solid #dce6ef; border-radius: 14px; background: #f8fafc; }
.tlf-quote-terms p { margin: 10px 0 0; color: #40576d; font-size: 12px; line-height: 1.65; white-space: pre-line; }

.tlf-contract-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dce6ef;
  border-radius: 14px;
  background: #f7faff;
}

.tlf-secondary.is-success { border-color: #9cd9bd; color: #087a4a; background: #effbf5; }
.tlf-status-not_required,
.tlf-status-not-required { color: #4e6377; background: #edf2f6; }
.tlf-status-expired { color: #8b5700; background: #fff4dc; }

@media (max-width: 980px) {
  .tlf-quote-hero,
  .tlf-quote-terms { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .tlf-contract-control { grid-template-columns: 1fr; }
  .tlf-quote-total { position: static; }
}

/* Caja diaria y Centro Tributario HSLOG 9.6 */
.tlf-daily-cash {
  background: linear-gradient(135deg, #071b30, #0b3156);
  border: 1px solid rgba(82, 157, 234, .35);
  border-radius: 18px;
  color: #fff;
  margin: 16px 0;
  overflow: hidden;
}

.tlf-daily-cash > header {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  justify-content: space-between;
  padding: 18px 20px;
}

.tlf-daily-cash > header span,
.tlf-daily-cash > header h3,
.tlf-daily-cash > header strong { color: #fff; display: block; }
.tlf-daily-cash > header span { color: #7fb9f1; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.tlf-daily-cash > header h3 { font-size: 16px; margin: 5px 0 0; }
.tlf-daily-cash > header > strong { font-size: 25px; }
.tlf-daily-cash > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tlf-daily-cash > div > span { border-right: 1px solid rgba(255, 255, 255, .1); padding: 16px 20px; }
.tlf-daily-cash > div > span:last-child { border-right: 0; }
.tlf-daily-cash small { color: #9eb5ca; display: block; font-size: 9px; text-transform: uppercase; }
.tlf-daily-cash > div strong { color: #fff; display: block; font-size: 15px; margin-top: 6px; }
.tlf-daily-cash > div strong.is-positive { color: #6ee7b7; }
.tlf-daily-cash .is-balance { background: rgba(25, 117, 220, .22); }
.tlf-daily-cash > p { color: #9eb5ca; font-size: 10px; line-height: 1.55; margin: 0; padding: 0 20px 17px; }

.tlf-tax-connection {
  background: #fff;
  border: 1px solid #dae5ee;
  border-radius: 20px;
  box-shadow: 0 14px 38px rgba(14, 37, 58, .08);
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}

.tlf-tax-connection::before { background: #f0a52b; content: ""; height: 5px; inset: 0 0 auto; position: absolute; }
.tlf-tax-connection.is-connected::before { background: #12a66b; }
.tlf-tax-connection.is-stored::before { background: #1474e5; }
.tlf-tax-connection-status { align-items: center; display: flex; gap: 15px; padding: 24px 24px 16px; }
.tlf-tax-connection-status > span:first-child { align-items: center; background: #eaf3fd; border-radius: 14px; color: #0d6fd8; display: inline-flex; height: 48px; justify-content: center; width: 48px; }
.tlf-tax-connection-status > span:first-child svg { height: 23px; width: 23px; }
.tlf-tax-connection-status > div { flex: 1; }
.tlf-tax-connection-status small { color: #1870cc; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.tlf-tax-connection-status h2 { color: #0a2138; font-size: 18px; margin: 5px 0; }
.tlf-tax-connection-status p { color: #667b8e; font-size: 11px; margin: 0; }
.tlf-tax-connection-actions { display: flex; gap: 10px; padding: 0 24px 18px 87px; }
.tlf-tax-connector-warning { background: #fff8e8; border: 1px solid #efd9a7; border-radius: 12px; display: grid; gap: 4px; margin: 0 24px 18px 87px; padding: 12px 14px; }
.tlf-tax-connector-warning strong { color: #875600; font-size: 10px; }
.tlf-tax-connector-warning span { color: #78684a; font-size: 9px; line-height: 1.55; }

.tlf-tax-credential-form {
  align-items: end;
  background: #f6f9fc;
  border-top: 1px solid #e1e8ef;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.25fr) minmax(180px, .8fr) minmax(220px, 1fr) auto;
  padding: 18px 24px;
}

.tlf-tax-credential-form > div > span { color: #0c6fd8; display: block; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.tlf-tax-credential-form > div > strong { color: #18324a; display: block; font-size: 12px; margin-top: 4px; }
.tlf-tax-credential-form > div > small { color: #718497; display: block; font-size: 9px; margin-top: 4px; }
.tlf-tax-credential-form label { margin: 0; }
.tlf-tax-security { align-items: center; background: #071c30; color: #fff; display: flex; flex-wrap: wrap; gap: 9px; padding: 12px 24px; }
.tlf-tax-security strong { font-size: 9px; margin-right: 6px; text-transform: uppercase; }
.tlf-tax-security span { background: rgba(255, 255, 255, .09); border-radius: 20px; color: #b8cadd; font-size: 8px; padding: 5px 9px; }
.tlf-tax-metrics { margin-bottom: 18px; }
.tlf-tax-workbench { align-items: start; display: grid; gap: 16px; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); margin-bottom: 18px; }
.tlf-tax-import-form { display: grid; gap: 12px; padding: 4px 18px 18px; }
.tlf-tax-import-form > label { margin: 0; }
.tlf-tax-import-history { display: grid; padding: 0 18px 18px; }
.tlf-tax-import-history article { align-items: center; border-bottom: 1px solid #e6edf3; display: grid; gap: 11px; grid-template-columns: auto 1fr auto auto; padding: 12px 0; }
.tlf-tax-import-history article > span:first-child { background: #e8f2fd; border-radius: 7px; color: #0c67c4; font-size: 8px; font-weight: 900; padding: 6px 7px; }
.tlf-tax-import-history strong { color: #203b53; display: block; font-size: 10px; }
.tlf-tax-import-history small { color: #74889b; display: block; font-size: 8px; margin-top: 3px; }
.tlf-tax-ledger { margin-bottom: 18px; }
.tlf-tax-direction { border-radius: 20px; display: inline-flex; font-size: 8px; font-weight: 900; padding: 6px 9px; text-transform: uppercase; }
.tlf-tax-direction.is-sale { background: #e8f8f1; color: #087b4b; }
.tlf-tax-direction.is-purchase { background: #fff0e5; color: #a94c0c; }
.tlf-tax-architecture { align-items: center; background: #f1f6fa; border: 1px solid #dce6ee; border-radius: 16px; display: grid; gap: 10px; grid-template-columns: 1fr auto 1fr auto 1fr; padding: 15px; }
.tlf-tax-architecture article { background: #fff; border: 1px solid #dfe8ef; border-radius: 12px; min-height: 76px; padding: 13px 13px 13px 48px; position: relative; }
.tlf-tax-architecture article:nth-of-type(n+4) { grid-row: 2; }
.tlf-tax-architecture > i:nth-of-type(n+3) { grid-row: 2; }
.tlf-tax-architecture b { align-items: center; background: #0d6fd8; border-radius: 50%; color: #fff; display: flex; height: 27px; justify-content: center; left: 12px; position: absolute; top: 13px; width: 27px; }
.tlf-tax-architecture strong { color: #17334c; display: block; font-size: 10px; }
.tlf-tax-architecture span { color: #74889a; display: block; font-size: 8px; margin-top: 5px; }
.tlf-tax-architecture > i { color: #86a2bb; }
.tlf-tax-architecture > i svg { height: 16px; width: 16px; }
.tlf-cash-registration { background: #f3f8fd; border: 1px solid #d8e7f4; border-radius: 14px; padding: 15px; }
.tlf-cash-registration > div:first-child { align-items: center; display: grid; gap: 5px 10px; grid-template-columns: auto 1fr; margin-bottom: 13px; }
.tlf-cash-registration > div:first-child > span { align-items: center; background: #0c6fd8; border-radius: 9px; color: #fff; display: flex; grid-row: 1 / 3; height: 34px; justify-content: center; width: 34px; }
.tlf-cash-registration > div:first-child svg { height: 17px; width: 17px; }
.tlf-cash-registration strong { color: #18354f; font-size: 11px; }
.tlf-cash-registration small { color: #6c8194; font-size: 9px; }
.tlf-ledger-amount { min-width: 190px; }
.tlf-ledger-amount small { color: #72869a; display: block; font-size: 8px; margin-top: 4px; }
.tlf-form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tlf-status-partial { background: #fff4dd; color: #965d00; }
.tlf-status-pending_review { background: #fff1dc; color: #915500; }
.tlf-status-account_created, .tlf-status-matched, .tlf-status-success, .tlf-status-file_import { background: #e6f8ef; color: #087849; }
.tlf-status-ignored, .tlf-status-revoked { background: #edf1f5; color: #5d6f80; }
.tlf-status-connector_missing, .tlf-status-credentials_saved { background: #e8f2fd; color: #0d65bd; }

@media (max-width: 1100px) {
  .tlf-tax-credential-form { grid-template-columns: 1fr 1fr; }
  .tlf-tax-credential-form > div:first-child { grid-column: 1 / -1; }
  .tlf-tax-workbench { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .tlf-form-grid-three { grid-template-columns: 1fr; }
  .tlf-daily-cash > div { grid-template-columns: 1fr 1fr; }
  .tlf-daily-cash > div > span:nth-child(2) { border-right: 0; }
  .tlf-daily-cash > div > span:nth-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .tlf-tax-credential-form { grid-template-columns: 1fr; }
  .tlf-tax-credential-form > div:first-child { grid-column: auto; }
  .tlf-tax-architecture { grid-template-columns: 1fr; }
  .tlf-tax-architecture article, .tlf-tax-architecture article:nth-of-type(n+4), .tlf-tax-architecture > i:nth-of-type(n+3) { grid-row: auto; }
  .tlf-tax-architecture > i { display: none; }
}

@media (max-width: 560px) {
  .tlf-daily-cash > header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .tlf-daily-cash > div { grid-template-columns: 1fr; }
  .tlf-daily-cash > div > span { border-bottom: 1px solid rgba(255, 255, 255, .1); border-right: 0; }
  .tlf-tax-connection-status { align-items: flex-start; flex-wrap: wrap; }
  .tlf-tax-connection-actions { display: grid; padding-left: 24px; }
  .tlf-tax-connector-warning { margin-left: 24px; }
  .tlf-tax-security { align-items: flex-start; flex-direction: column; }
}

/* Ajustes finales de densidad: deben prevalecer sobre estilos heredados. */
.tlf-order-detail { gap: 10px; }
.tlf-order-detail-hero { border-radius: 12px; padding: 14px 17px; }
.tlf-order-detail-actions { gap: 6px; padding: 9px; }
.tlf-order-detail-actions button { min-height: 33px; padding: 7px 9px !important; }
.tlf-order-detail-grid > article { min-height: 68px; padding: 10px 12px; }
.tlf-order-detail-numbers article { padding: 10px 12px; }
.tlf-order-detail-columns { gap: 10px; }
.tlf-service-row { border-radius: 10px; margin-bottom: 8px; padding: 10px; }
.tlf-service-row-title { margin-bottom: 8px; }
.tlf-service-row-title > span { height: 24px; width: 24px; }
.tlf-order-composer .tlf-composer-total { border-radius: 10px; }
.tlf-tax-import-history-detailed article { border: 1px solid #e1e8ef; border-radius: 10px; grid-template-columns: auto minmax(130px, .8fr) minmax(360px, 2fr) minmax(105px, .55fr); padding: 8px 9px; }

@media (max-width: 1180px) {
  .tlf-tax-import-history-detailed article { grid-template-columns: auto 1fr; }
}

/* --------------------------------------------------------------------------
   HSLOG 9.11 · experiencia guiada y legible
   -------------------------------------------------------------------------- */
:root {
  --tlf-friendly-blue: #0b6bdc;
  --tlf-friendly-navy: #0a2035;
  --tlf-friendly-text: #20394f;
  --tlf-friendly-muted: #64798c;
  --tlf-friendly-line: #dce5ed;
  --tlf-friendly-soft: #f5f8fb;
}

.tlf-portal-app { font-size: 14px; }
.tlf-sidebar { padding: 18px 14px 16px; width: 252px; }
.tlf-workspace { margin-left: 252px; }
.tlf-brand { gap: 10px; margin: 0 2px 14px; padding: 0 4px 16px; }
.tlf-brand img { border-radius: 9px; height: 42px; width: 64px; }
.tlf-brand strong { font-size: 14px; }
.tlf-brand small { font-size: 9px; letter-spacing: .06em; }
.tlf-sidebar nav { display: block; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.tlf-sidebar nav button { font-size: 13px !important; min-height: 40px; }
.tlf-sidebar nav button:hover { transform: none; }
.tlf-nav-home { margin-bottom: 7px; width: 100%; }
.tlf-nav-group { border-top: 1px solid rgba(255, 255, 255, .07); padding: 5px 0; }
.tlf-nav-group summary {
  align-items: center;
  border-radius: 9px;
  color: #8fa8bf;
  cursor: pointer;
  display: grid;
  font-size: 10px;
  font-weight: 850;
  gap: 9px;
  grid-template-columns: 18px 1fr 14px;
  letter-spacing: .08em;
  list-style: none;
  min-height: 36px;
  padding: 8px 10px;
}
.tlf-nav-group summary::-webkit-details-marker { display: none; }
.tlf-nav-group summary:hover { background: rgba(255, 255, 255, .055); color: #d9e6f2; }
.tlf-nav-group summary svg { height: 16px; width: 16px; }
.tlf-nav-group summary svg:last-child { height: 12px; transform: rotate(90deg); transition: transform .16s ease; width: 12px; }
.tlf-nav-group[open] summary { color: #c7d8e8; }
.tlf-nav-group[open] summary svg:last-child { transform: rotate(-90deg); }
.tlf-nav-group > div { display: grid; gap: 2px; padding: 2px 0 5px 10px; }
.tlf-nav-group > div button { font-size: 12px !important; gap: 10px; min-height: 37px; padding: 7px 10px; width: 100%; }
.tlf-nav-group > div button svg { height: 16px; width: 16px; }
.tlf-nav-group > div button.is-active { box-shadow: 0 7px 18px rgba(0, 84, 211, .2); }
.tlf-system { padding: 9px 10px; }
.tlf-system strong { font-size: 10px; }
.tlf-system small { font-size: 7px; }

.tlf-topbar { min-height: 66px; padding: 0 24px; }
.tlf-search { max-width: 440px; min-height: 40px; }
.tlf-search input { font-size: 13px !important; }
.tlf-content { max-width: 1500px; padding: 22px clamp(18px, 2.5vw, 34px) 52px; }
.tlf-page-head { align-items: center; margin-bottom: 18px; }
.tlf-page-head-copy > span { font-size: 10px !important; }
.tlf-page-head-copy h1 { font-size: clamp(27px, 2.6vw, 36px) !important; margin: 5px 0 7px; }
.tlf-page-head-copy p { font-size: 14px !important; line-height: 1.5; }
.tlf-panel { padding: 19px; }
.tlf-panel-head h2 { font-size: 18px !important; }
.tlf-panel-head small { font-size: 12px !important; }
.tlf-primary,
.tlf-secondary,
.tlf-head-actions button,
.tlf-head-actions a { font-size: 13px !important; min-height: 40px; }

.tlf-friendly-actions {
  align-items: center;
  background: #fff;
  border: 1px solid var(--tlf-friendly-line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(18, 49, 78, .055);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(190px, .65fr) minmax(520px, 2fr);
  margin-bottom: 14px;
  padding: 16px;
}
.tlf-friendly-actions-copy span { color: var(--tlf-friendly-blue); display: block; font-size: 10px; font-weight: 900; letter-spacing: .11em; }
.tlf-friendly-actions-copy strong { color: var(--tlf-friendly-navy); display: block; font-size: 18px; margin-top: 4px; }
.tlf-friendly-actions-copy small { color: var(--tlf-friendly-muted); display: block; font-size: 11px; line-height: 1.45; margin-top: 4px; }
.tlf-friendly-action-grid { display: grid; gap: 9px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tlf-friendly-action-grid > button {
  align-items: center;
  background: var(--tlf-friendly-soft);
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  color: var(--tlf-friendly-text);
  display: grid;
  gap: 9px;
  grid-template-columns: 32px 1fr 15px;
  min-height: 68px;
  padding: 11px;
  text-align: left;
}
.tlf-friendly-action-grid > button:hover { background: #eef5fd; border-color: #a9caef; }
.tlf-friendly-action-grid > button.is-primary { background: #eaf3ff; border-color: #b8d5f7; }
.tlf-friendly-action-grid > button > svg:first-child { color: var(--tlf-friendly-blue); height: 21px; width: 21px; }
.tlf-friendly-action-grid > button > svg:last-child { color: #8499ad; height: 14px; width: 14px; }
.tlf-friendly-action-grid strong { display: block; font-size: 12px; }
.tlf-friendly-action-grid small { color: var(--tlf-friendly-muted); display: block; font-size: 10px; margin-top: 3px; }

.tlf-dashboard-kpis { gap: 11px; margin-bottom: 14px; }
.tlf-dashboard-kpi { min-height: 94px; padding: 14px 15px; }
.tlf-dashboard-kpi > span { font-size: 10px; }
.tlf-dashboard-kpi > strong { font-size: 23px; }
.tlf-dashboard-kpi > small { font-size: 11px; }
.tlf-dashboard-grid { grid-template-columns: minmax(285px, .75fr) minmax(500px, 1.45fr); }
.tlf-tasks-panel { display: grid; gap: 7px; }
.tlf-friendly-task {
  align-items: center;
  background: #fff;
  border: 1px solid #e0e7ee;
  border-radius: 11px;
  color: var(--tlf-friendly-text);
  display: grid;
  gap: 9px;
  grid-template-columns: 34px 1fr auto 14px;
  min-height: 58px;
  padding: 9px 10px;
  text-align: left;
}
.tlf-friendly-task:hover { background: #f7faff; border-color: #b7d0eb; }
.tlf-friendly-task > span { align-items: center; background: #eaf3fd; border-radius: 9px; color: var(--tlf-friendly-blue); display: flex; height: 34px; justify-content: center; width: 34px; }
.tlf-friendly-task > span svg { height: 17px; width: 17px; }
.tlf-friendly-task strong { display: block; font-size: 12px; }
.tlf-friendly-task small { color: var(--tlf-friendly-muted); display: block; font-size: 10px; margin-top: 2px; }
.tlf-friendly-task > b { align-items: center; background: #eef3f8; border-radius: 999px; display: flex; font-size: 11px; height: 27px; justify-content: center; min-width: 27px; padding: 0 7px; }
.tlf-friendly-task > svg { color: #91a5b8; height: 13px; width: 13px; }
.tlf-compact-order-id small { font-size: 10px; }
.tlf-compact-order-id strong { font-size: 12px; }
.tlf-compact-order-id span,
.tlf-compact-order-money small { font-size: 10px; }
.tlf-compact-order-money strong { font-size: 12px; }
.tlf-compact-order-list article { min-height: 64px; }

.tlf-create-document { position: relative; }
.tlf-create-document > summary { align-items: center; cursor: pointer; display: inline-flex; gap: 7px; list-style: none; }
.tlf-create-document > summary::-webkit-details-marker { display: none; }
.tlf-create-document > summary svg:last-child { height: 13px; transform: rotate(90deg); width: 13px; }
.tlf-create-document[open] > summary svg:last-child { transform: rotate(-90deg); }
.tlf-create-document-menu {
  background: #fff;
  border: 1px solid #d9e3ec;
  border-radius: 14px;
  box-shadow: 0 22px 55px rgba(11, 35, 57, .18);
  display: grid;
  gap: 5px;
  min-width: 310px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 50;
}
.tlf-create-document-menu button {
  align-items: center;
  background: #fff;
  border: 0;
  border-radius: 9px;
  color: var(--tlf-friendly-text);
  display: grid;
  gap: 10px;
  grid-template-columns: 28px 1fr;
  min-height: 54px;
  padding: 9px 10px !important;
  text-align: left;
}
.tlf-create-document-menu button:hover { background: #eef5fd; }
.tlf-create-document-menu button > svg { color: var(--tlf-friendly-blue); height: 19px; width: 19px; }
.tlf-create-document-menu strong { display: block; font-size: 12px; }
.tlf-create-document-menu small { color: var(--tlf-friendly-muted); display: block; font-size: 10px; margin-top: 2px; }
.tlf-purchase-summary {
  background: #fff;
  border: 1px solid var(--tlf-friendly-line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 13px;
  overflow: hidden;
}
.tlf-purchase-summary > span { border-right: 1px solid var(--tlf-friendly-line); padding: 13px 15px; }
.tlf-purchase-summary > span:last-child { border-right: 0; }
.tlf-purchase-summary small { color: var(--tlf-friendly-muted); display: block; font-size: 10px; }
.tlf-purchase-summary strong { color: var(--tlf-friendly-navy); display: block; font-size: 17px; margin-top: 4px; }
.tlf-order-filters button span { font-size: 12px; }
.tlf-order-filters button strong { font-size: 11px; }
.tlf-order-compact-row { grid-template-columns: 4px minmax(175px, .85fr) minmax(190px, 1.1fr) minmax(155px, .75fr) auto auto; min-height: 78px; }
.tlf-order-compact-doc small { font-size: 9px; }
.tlf-order-compact-doc strong { font-size: 13px; }
.tlf-order-compact-doc span,
.tlf-order-compact-provider small,
.tlf-order-compact-money small { font-size: 10px; }
.tlf-order-compact-provider strong { font-size: 12px; }
.tlf-order-compact-money strong { font-size: 13px; }
.tlf-order-compact-money span { font-size: 10px; }

.tlf-modal.is-wide { max-width: min(1120px, calc(100vw - 34px)); }
.tlf-modal > header { padding: 16px 20px; }
.tlf-modal > header h2 { font-size: 20px !important; }
.tlf-order-composer { gap: 14px; padding: 16px 18px 20px; }
.tlf-order-wizard { background: transparent; border: 0; display: grid; gap: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; position: static; }
.tlf-order-wizard button {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 3px solid #dce5ed;
  color: #7b8ea0;
  display: flex;
  font-size: 12px;
  gap: 7px;
  justify-content: center;
  min-height: 45px;
  padding: 8px;
}
.tlf-order-wizard button b { align-items: center; background: #e9eef3; border-radius: 50%; display: flex; font-size: 10px; height: 23px; justify-content: center; width: 23px; }
.tlf-order-wizard button.is-active { border-bottom-color: var(--tlf-friendly-blue); color: var(--tlf-friendly-blue); font-weight: 800; }
.tlf-order-wizard button.is-active b { background: var(--tlf-friendly-blue); color: #fff; }
.tlf-order-wizard button.is-complete { border-bottom-color: #88b9ef; color: #326da8; }
.tlf-order-wizard button:disabled { cursor: not-allowed; opacity: .55; }
.tlf-oc-composer-layout { gap: 16px; grid-template-columns: minmax(0, 1fr) 270px; }
.tlf-oc-composer-main { display: block; }
.tlf-composer-step { display: none; gap: 13px; }
.tlf-composer-step.is-active { display: grid; }
.tlf-composer-step > header { background: #f4f8fc; border: 1px solid #dce6ef; border-radius: 12px; padding: 13px 15px; }
.tlf-composer-step > header span { color: var(--tlf-friendly-blue); display: block; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.tlf-composer-step > header strong { color: var(--tlf-friendly-navy); display: block; font-size: 18px; margin-top: 4px; }
.tlf-composer-step > header small { color: var(--tlf-friendly-muted); display: block; font-size: 11px; line-height: 1.45; margin-top: 4px; }
.tlf-order-composer label > span { font-size: 12px !important; margin-bottom: 6px; }
.tlf-order-composer input,
.tlf-order-composer select,
.tlf-order-composer textarea { border-radius: 9px; font-size: 14px !important; min-height: 42px; padding: 9px 11px; }
.tlf-order-composer textarea { min-height: 82px; }
.tlf-order-composer input.is-invalid,
.tlf-order-composer select.is-invalid,
.tlf-order-composer textarea.is-invalid { border-color: #d64a4a !important; box-shadow: 0 0 0 3px rgba(214, 74, 74, .1); }
.tlf-service-row { padding: 12px; }
.tlf-service-row-title > strong { font-size: 12px; }
.tlf-charge-title { min-height: 45px; padding: 10px 12px; }
.tlf-charge-title > strong { font-size: 12px !important; }
.tlf-charge-title > small { font-size: 10px; }
.tlf-charge-fields { gap: 11px; padding: 12px; }
.tlf-mandatory-clause-note strong,
.tlf-auto-consolidation strong { font-size: 12px !important; }
.tlf-mandatory-clause-note small,
.tlf-auto-consolidation small { font-size: 10px !important; }
.tlf-optional-clauses strong { font-size: 12px !important; }
.tlf-optional-clauses small { font-size: 10px !important; }
.tlf-step-actions { align-items: center; border-top: 1px solid #e1e8ef; display: flex; gap: 9px; justify-content: flex-end; margin-top: 4px; padding-top: 14px; }
.tlf-step-actions > span { color: var(--tlf-friendly-muted); font-size: 10px; margin-right: auto; }
.tlf-step-actions button { align-items: center; display: inline-flex; gap: 6px; justify-content: center; }
.tlf-step-actions button svg { height: 14px; width: 14px; }
.tlf-oc-summary-rail { background: #fff; border: 1px solid #d7e2eb; color: var(--tlf-friendly-text); gap: 11px; padding: 14px; top: 16px; }
.tlf-oc-summary-rail > div:first-child > span { color: var(--tlf-friendly-blue); font-size: 9px; }
.tlf-oc-summary-rail > div:first-child > strong { color: var(--tlf-friendly-navy); font-size: 15px; }
.tlf-oc-summary-rail > div:first-child > small { color: var(--tlf-friendly-muted); font-size: 10px; }
.tlf-oc-summary-rail .tlf-composer-total { background: #f5f8fb; border: 1px solid #dce5ed; }
.tlf-oc-summary-rail .tlf-composer-total > span { border-bottom-color: #dce5ed; padding: 9px 10px; }
.tlf-oc-summary-rail .tlf-composer-total small { color: var(--tlf-friendly-muted); font-size: 10px; }
.tlf-oc-summary-rail .tlf-composer-total strong { color: var(--tlf-friendly-navy); font-size: 14px; }
.tlf-oc-summary-rail .tlf-composer-total .is-final { background: var(--tlf-friendly-blue); }
.tlf-oc-summary-rail .tlf-composer-total .is-final small,
.tlf-oc-summary-rail .tlf-composer-total .is-final strong { color: #fff; }
.tlf-summary-help { align-items: flex-start; background: #eef5fd; border-radius: 10px; display: flex; gap: 8px; padding: 10px; }
.tlf-summary-help > svg { color: var(--tlf-friendly-blue); flex: 0 0 auto; height: 17px; width: 17px; }
.tlf-summary-help strong { color: var(--tlf-friendly-navy); display: block; font-size: 11px; }
.tlf-summary-help small { color: var(--tlf-friendly-muted); display: block; font-size: 9px; line-height: 1.4; margin-top: 2px; }

.tlf-portal-app button:focus-visible,
.tlf-portal-app summary:focus-visible,
.tlf-portal-app input:focus-visible,
.tlf-portal-app select:focus-visible,
.tlf-portal-app textarea:focus-visible { outline: 3px solid rgba(11, 107, 220, .22); outline-offset: 2px; }

@media (max-width: 1180px) {
  .tlf-friendly-actions { grid-template-columns: 1fr; }
  .tlf-dashboard-grid { grid-template-columns: 1fr; }
  .tlf-order-compact-row { grid-template-columns: 4px minmax(165px, .9fr) minmax(185px, 1fr) minmax(145px, .75fr) auto; }
  .tlf-order-compact-row > .tlf-status { display: none; }
}

@media (max-width: 960px) {
  .tlf-workspace { margin-left: 0; }
  .tlf-sidebar { width: min(88vw, 300px); }
  .tlf-friendly-action-grid { grid-template-columns: 1fr 1fr; }
  .tlf-friendly-action-grid > button:first-child { grid-column: 1 / -1; }
  .tlf-oc-composer-layout { grid-template-columns: 1fr; }
  .tlf-oc-summary-rail { bottom: 0; position: sticky; top: auto; z-index: 8; }
  .tlf-oc-summary-rail > div:first-child,
  .tlf-summary-help { display: none; }
  .tlf-oc-summary-rail .tlf-composer-total { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tlf-oc-summary-rail .tlf-composer-total > span { border-bottom: 0; border-right: 1px solid #dce5ed; }
}

@media (max-width: 700px) {
  .tlf-content { padding: 18px 14px 42px; }
  .tlf-page-head { align-items: stretch; }
  .tlf-page-head-copy h1 { font-size: 28px !important; }
  .tlf-head-actions { justify-content: stretch; }
  .tlf-create-document,
  .tlf-create-document > summary { width: 100%; }
  .tlf-create-document > summary { justify-content: center; }
  .tlf-create-document-menu { left: 0; min-width: 0; right: 0; width: 100%; }
  .tlf-friendly-action-grid { grid-template-columns: 1fr; }
  .tlf-friendly-action-grid > button:first-child { grid-column: auto; }
  .tlf-dashboard-kpis { grid-template-columns: 1fr 1fr; }
  .tlf-purchase-summary { grid-template-columns: 1fr 1fr; }
  .tlf-purchase-summary > span:nth-child(2) { border-right: 0; }
  .tlf-purchase-summary > span:nth-child(n+3) { border-top: 1px solid var(--tlf-friendly-line); }
  .tlf-order-compact-row { grid-template-columns: 4px 1fr auto; padding: 10px 10px 10px 0; }
  .tlf-order-compact-provider { grid-column: 2; }
  .tlf-order-compact-money { grid-column: 3; grid-row: 1 / 3; }
  .tlf-order-compact-row > button { grid-column: 3; }
  .tlf-order-wizard button { font-size: 10px; gap: 4px; }
  .tlf-order-wizard button b { height: 21px; width: 21px; }
  .tlf-composer-step > header strong { font-size: 16px; }
  .tlf-step-actions { align-items: stretch; flex-direction: column-reverse; }
  .tlf-step-actions > span { margin: 0; text-align: center; }
  .tlf-step-actions button { width: 100%; }
  .tlf-oc-summary-rail .tlf-composer-total { grid-template-columns: 1fr 1fr; }
  .tlf-oc-summary-rail .tlf-composer-total > span { border-bottom: 1px solid #dce5ed; }
}

@media (max-width: 480px) {
  .tlf-dashboard-kpis { grid-template-columns: 1fr; }
  .tlf-purchase-summary { grid-template-columns: 1fr; }
  .tlf-purchase-summary > span { border-right: 0; border-top: 1px solid var(--tlf-friendly-line); }
  .tlf-purchase-summary > span:first-child { border-top: 0; }
  .tlf-order-compact-money { display: none; }
  .tlf-order-wizard button span { display: none; }
}
/* v9.12 · Finanzas y libros SII normalizados */
.tlf-finance-mini-summary,
.tlf-book-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}
.tlf-book-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tlf-compact-stat {
  align-items: center;
  background: #fff;
  border: 1px solid #e3eaf0;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: 4px 1fr;
  min-height: 66px;
  padding: 10px 12px;
}
.tlf-compact-stat > span { align-self: stretch; background: #1474e5; border-radius: 5px; }
.tlf-compact-stat.is-green > span { background: #13a46b; }
.tlf-compact-stat.is-orange > span { background: #ef9e28; }
.tlf-compact-stat.is-violet > span { background: #7d62d9; }
.tlf-compact-stat small { color: #748596; display: block; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.tlf-compact-stat strong { color: #132f47; display: block; font-size: 17px; line-height: 1.15; margin-top: 3px; }
.tlf-compact-stat p { color: #758799; font-size: 9px; margin: 3px 0 0; }
.tlf-finance-switch,
.tlf-book-switch {
  align-items: center;
  background: #eef3f7;
  border: 1px solid #dfe7ed;
  border-radius: 12px;
  display: inline-flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
}
.tlf-finance-switch button,
.tlf-book-switch button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: #536b7f;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
}
.tlf-finance-switch button.is-active,
.tlf-book-switch button.is-active { background: #fff; box-shadow: 0 2px 8px rgba(15, 43, 66, .08); color: #0c68ca; }
.tlf-finance-switch button strong { background: #dce8f4; border-radius: 12px; font-size: 9px; padding: 2px 6px; }
.tlf-book-switch svg { height: 15px; width: 15px; }
.tlf-finance-list { overflow: hidden; }
.tlf-finance-rows { display: grid; }
.tlf-finance-row {
  align-items: center;
  border-top: 1px solid #e7edf2;
  display: grid;
  gap: 12px;
  grid-template-columns: 4px minmax(190px, 1.4fr) minmax(160px, 1fr) 140px 92px minmax(120px, auto);
  min-height: 64px;
  padding: 8px 14px;
}
.tlf-finance-row > i { align-self: stretch; background: #e1a035; border-radius: 4px; }
.tlf-finance-row.is-ready > i,
.tlf-finance-row.is-paid > i { background: #13a46b; }
.tlf-finance-row small { color: #7b8c9b; display: block; font-size: 8px; }
.tlf-finance-row strong { color: #18334b; display: block; font-size: 11px; }
.tlf-finance-row span { color: #64798b; display: block; font-size: 9px; margin-top: 2px; }
.tlf-finance-row-amount { text-align: right; }
.tlf-finance-row-amount strong { font-size: 13px; }
.tlf-finance-row-actions { align-items: center; display: flex; gap: 5px; justify-content: flex-end; }
.tlf-book-health {
  align-items: center;
  background: #f5f9fc;
  border: 1px solid #dfe8ef;
  border-radius: 11px;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px 1fr auto;
  margin-bottom: 14px;
  padding: 9px 12px;
}
.tlf-book-health > span { align-items: center; background: #e4f6ee; border-radius: 9px; color: #13845a; display: flex; height: 32px; justify-content: center; width: 32px; }
.tlf-book-health > span svg { height: 16px; width: 16px; }
.tlf-book-health strong { color: #19364f; display: block; font-size: 10px; }
.tlf-book-health small { color: #74889a; display: block; font-size: 8px; margin-top: 2px; }
.tlf-book-health.is-warning > span { background: #fff1d9; color: #a26709; }
.tlf-ledger-toolbar { align-items: center; border-top: 1px solid #e8edf2; display: flex; gap: 10px; justify-content: space-between; padding: 8px 14px; }
.tlf-ledger-toolbar > small { color: #718598; font-size: 8px; }
.tlf-ledger-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.tlf-ledger-filters button { background: #f3f6f9; border: 1px solid #e0e7ed; border-radius: 8px; color: #5d7285; font-size: 8px; font-weight: 800; padding: 6px 8px; }
.tlf-ledger-filters button strong { background: #e2eaf1; border-radius: 10px; margin-left: 5px; padding: 1px 5px; }
.tlf-ledger-filters button.is-active { background: #eaf3fd; border-color: #9dc8f2; color: #0b69c9; }
.tlf-tax-table { min-width: 1040px; }
.tlf-tax-table th { font-size: 8px; padding: 8px 10px; white-space: nowrap; }
.tlf-tax-table td { font-size: 9px; padding: 8px 10px; vertical-align: middle; }
.tlf-tax-table td strong { font-size: 10px; line-height: 1.25; }
.tlf-tax-table .tlf-tax-direction { margin-bottom: 4px; padding: 3px 6px; }
.tlf-tax-table .tlf-note { font-size: 7px; line-height: 1.4; margin-top: 2px; }
.tlf-tax-state-pair { align-items: center; display: flex; flex-wrap: wrap; gap: 4px; }
.tlf-tax-state-pair .tlf-status { font-size: 7px; padding: 4px 6px; }
.tlf-tax-history-drawer,
.tlf-settings-drawer { background: #fff; border: 1px solid #e2e9ef; border-radius: 12px; margin-top: 12px; overflow: hidden; }
.tlf-tax-history-drawer > summary,
.tlf-settings-drawer > summary { align-items: center; cursor: pointer; display: grid; gap: 10px; grid-template-columns: 28px 1fr 18px; list-style: none; padding: 11px 14px; }
.tlf-tax-history-drawer > summary::-webkit-details-marker,
.tlf-settings-drawer > summary::-webkit-details-marker { display: none; }
.tlf-tax-history-drawer summary svg,
.tlf-settings-drawer summary svg { height: 16px; width: 16px; }
.tlf-tax-history-drawer summary > svg:last-child,
.tlf-settings-drawer summary > svg:last-child { transition: transform .2s ease; }
.tlf-tax-history-drawer[open] summary > svg:last-child,
.tlf-settings-drawer[open] summary > svg:last-child { transform: rotate(90deg); }
.tlf-tax-history-drawer summary strong,
.tlf-settings-drawer summary strong { color: #19364d; display: block; font-size: 10px; }
.tlf-tax-history-drawer summary small,
.tlf-settings-drawer summary small { color: #74889a; display: block; font-size: 8px; margin-top: 2px; }
.tlf-tax-history-drawer > div,
.tlf-settings-drawer > div { border-top: 1px solid #e6edf2; padding: 12px; }
.tlf-tax-admin-grid { display: grid; gap: 14px; grid-template-columns: minmax(300px, .72fr) minmax(480px, 1.28fr); margin-top: 14px; }
.tlf-tax-connection-compact .tlf-tax-connection-status { padding: 14px 18px 10px; }
.tlf-tax-connection-compact .tlf-tax-connection-status > span:first-child { height: 38px; width: 38px; }
.tlf-tax-connection-compact .tlf-tax-connection-status h2 { font-size: 14px; margin: 3px 0; }
.tlf-tax-connection-compact .tlf-tax-link-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 18px; }
.tlf-tax-connection-compact .tlf-tax-connection-actions { padding: 10px 18px; }
.tlf-tax-credential-compact { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; padding: 0; }
.tlf-tax-import-compact { gap: 9px; padding: 0 14px 14px; }
.tlf-tax-security-compact { border-radius: 10px; margin-top: 12px; padding: 9px 14px; }

@media (max-width: 1180px) {
  .tlf-book-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tlf-finance-row { grid-template-columns: 4px minmax(170px, 1.3fr) minmax(150px, 1fr) 130px auto; }
  .tlf-finance-row-status { display: none; }
  .tlf-tax-admin-grid { grid-template-columns: 1fr; }
  .tlf-tax-connection-compact .tlf-tax-link-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tlf-finance-mini-summary,
  .tlf-book-summary { grid-template-columns: 1fr 1fr; }
  .tlf-finance-switch,
  .tlf-book-switch { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .tlf-book-switch button:last-child { grid-column: 1 / -1; }
  .tlf-finance-row { gap: 7px; grid-template-columns: 4px 1fr auto; padding: 10px; }
  .tlf-finance-row-doc { grid-column: 2; }
  .tlf-finance-row-amount { grid-column: 3; grid-row: 1; }
  .tlf-finance-row-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .tlf-ledger-toolbar { align-items: flex-start; flex-direction: column; }
  .tlf-tax-table { min-width: 0; }
  .tlf-tax-table thead { display: none; }
  .tlf-tax-table tbody,
  .tlf-tax-table tr,
  .tlf-tax-table td { display: block; width: 100%; }
  .tlf-tax-table tr { border-bottom: 1px solid #e2e9ef; padding: 9px 11px; }
  .tlf-tax-table td { border: 0; display: grid; grid-template-columns: 92px 1fr; padding: 4px 0; }
  .tlf-tax-table td::before { color: #7b8c9c; content: attr(data-label); font-size: 7px; font-weight: 900; text-transform: uppercase; }
  .tlf-tax-connection-compact .tlf-tax-link-facts,
  .tlf-tax-credential-compact { grid-template-columns: 1fr; }
}

/* HSLOG 10.1 · diagnóstico y recuperación de conexión SII */
.tlf-tax-diagnostics{margin-top:16px;padding:16px;border:1px solid rgba(8,55,96,.14);border-radius:18px;background:rgba(255,255,255,.72)}
.tlf-tax-diagnostics.is-empty{display:flex;gap:8px;flex-direction:column}
.tlf-tax-diagnostics.is-empty span{font-size:13px;color:#5f7082;line-height:1.5}
.tlf-tax-diagnostics-head{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:12px}
.tlf-tax-diagnostics-head div{display:flex;flex-direction:column;gap:3px}
.tlf-tax-diagnostics-head small{color:#6b7c8e}
.tlf-tax-diagnostic-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tlf-tax-diagnostic-list article{display:flex;gap:10px;align-items:flex-start;padding:12px;border-radius:14px;background:#fff;border:1px solid rgba(8,55,96,.1)}
.tlf-tax-diagnostic-list article>span{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#edf4f9;flex:0 0 28px}
.tlf-tax-diagnostic-list article>span svg{width:15px;height:15px}
.tlf-tax-diagnostic-list article div{display:flex;flex-direction:column;gap:3px;min-width:0}
.tlf-tax-diagnostic-list article small{line-height:1.4;color:#627487}
.tlf-tax-diagnostic-list article.is-pass{border-color:rgba(25,135,84,.22)}
.tlf-tax-diagnostic-list article.is-warn{border-color:rgba(213,139,0,.28)}
.tlf-tax-diagnostic-list article.is-fail{border-color:rgba(185,28,28,.25)}
.tlf-manual-link-drawer{margin-top:10px}
@media (max-width:760px){.tlf-tax-diagnostic-list{grid-template-columns:1fr}.tlf-tax-connection-actions{align-items:stretch}.tlf-tax-connection-actions>button{width:100%;justify-content:center}}


/* HSLOG 10.2 · acceso Fintoc y bóveda tributaria */
.tlf-fintoc-access-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px;padding:14px 16px;border:1px solid rgba(20,76,125,.14);border-radius:16px;background:rgba(238,247,255,.72)}
.tlf-fintoc-access-head>div{display:grid;gap:4px}.tlf-fintoc-access-head small{color:#617286;line-height:1.45}.tlf-external-button{text-decoration:none;white-space:nowrap}
.tlf-fintoc-key-form{align-items:end}.tlf-secret-input{display:flex;align-items:center;gap:8px}.tlf-secret-input input{flex:1;min-width:0}.tlf-secret-input .tlf-icon-button{flex:0 0 auto}
.tlf-sii-vault-drawer{border-color:rgba(239,128,35,.24)!important}.tlf-vault-warning{display:grid;gap:4px;margin:0 0 16px;padding:14px 16px;border-left:4px solid #ef8023;border-radius:12px;background:#fff8ee;color:#243447}.tlf-vault-warning span{font-size:13px;line-height:1.55;color:#6a5b4d}
.tlf-sii-vault-drawer form .is-danger{margin-left:8px}.tlf-settings-drawer[open]>summary{margin-bottom:14px}
@media(max-width:760px){.tlf-fintoc-access-head{align-items:stretch;flex-direction:column}.tlf-external-button{justify-content:center}.tlf-sii-vault-drawer form .is-danger{margin-left:0;margin-top:8px;width:100%}}


/* HSLOG 10.3 · perfiles Fintoc LIVE */
.tlf-fintoc-profiles{display:grid;gap:14px;margin-bottom:18px;padding:16px;border:1px solid var(--tlf-line,#d9e2ec);border-radius:18px;background:#f8fbfe}
.tlf-fintoc-profiles-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.tlf-fintoc-profiles-head>div{display:grid;gap:3px}.tlf-fintoc-profiles-head small{color:var(--tlf-muted,#64748b)}
.tlf-fintoc-profile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.tlf-fintoc-profile-card{display:grid;gap:12px;padding:14px;border:1px solid #dbe5ef;border-radius:15px;background:#fff;box-shadow:0 8px 24px rgba(15,49,80,.05)}
.tlf-fintoc-profile-card.is-active{border-color:#0b6aa9;box-shadow:0 0 0 2px rgba(11,106,169,.11),0 10px 28px rgba(15,49,80,.08)}
.tlf-fintoc-profile-title{display:flex;align-items:center;gap:10px}.tlf-fintoc-profile-title>span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#e7f3fb;color:#075d96}.tlf-fintoc-profile-title>div{display:grid;gap:2px;min-width:0;flex:1}.tlf-fintoc-profile-title small{overflow-wrap:anywhere;color:#64748b}.tlf-fintoc-profile-title em{font-size:11px;font-style:normal;font-weight:800;letter-spacing:.08em;color:#075d96;background:#e7f3fb;border-radius:999px;padding:5px 8px}
.tlf-fintoc-profile-meta{display:flex;flex-wrap:wrap;gap:6px}.tlf-fintoc-profile-meta span{font-size:12px;border-radius:999px;padding:5px 8px;background:#eef3f7;color:#425466}
.tlf-fintoc-profile-empty{display:grid;gap:4px;padding:18px;border:1px dashed #b7c7d6;border-radius:14px;background:#fff;color:#536779}
@media(max-width:720px){.tlf-fintoc-profiles-head{align-items:stretch;flex-direction:column}.tlf-fintoc-profiles-head .tlf-secondary{width:100%;justify-content:center}.tlf-fintoc-profile-grid{grid-template-columns:1fr}.tlf-fintoc-profile-card .tlf-inline-actions{display:grid;grid-template-columns:1fr}.tlf-fintoc-profile-card .tlf-inline-actions button{width:100%;justify-content:center}}

/* HSLOG 10.4 - ingreso visible de llaves Fintoc LIVE */
.tlf-fintoc-entry-banner{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:18px 0;padding:18px 20px;border:2px solid #0b4d85;border-radius:14px;background:linear-gradient(135deg,#eef7ff,#fff)}
.tlf-fintoc-entry-banner>div{display:flex;flex-direction:column;gap:5px}.tlf-fintoc-entry-banner strong{color:#06365f;font-size:15px}.tlf-fintoc-entry-banner span{color:#425466}.tlf-fintoc-key-highlight{padding:14px!important;border:1px solid #8ab9df!important;border-radius:10px!important;background:#f2f8fd!important}.tlf-fintoc-key-highlight>span{font-weight:800!important;color:#06365f!important}.tlf-fintoc-key-highlight>span b{color:#d65a00;font-size:11px}.tlf-fintoc-key-highlight small{display:block;margin-top:6px;color:#56636f}.tlf-fintoc-key-highlight input{border-width:2px!important;border-color:#0b4d85!important;background:#fff!important}
@media(max-width:760px){.tlf-fintoc-entry-banner{align-items:stretch;flex-direction:column}.tlf-fintoc-entry-banner .tlf-secondary{text-align:center}}
