:root {
  --tlf-midnight: #04101d;
  --tlf-navy: #07192b;
  --tlf-blue: #0b6bff;
  --tlf-blue-soft: #eaf2ff;
  --tlf-paper: #f3f5f8;
  --tlf-white: #fff;
  --tlf-ink: #071321;
  --tlf-muted: #6c7887;
  --tlf-line: #dce2e9;
  --tlf-green: #1faf68;
  --tlf-red: #c94149;
  --tlf-orange: #d87a19;
  --tlf-sidebar: 250px;
}

/* ==========================================================================
   HSLOG Control 3.0 · legibilidad, expedientes y finanzas
   ========================================================================== */

#tlf-portal-app {
  font-size: 16px;
  line-height: 1.55;
}

.tlf-content {
  max-width: 1680px;
}

.tlf-page-head h1 {
  font-size: clamp(2rem, 3vw, 3.15rem);
  letter-spacing: -.04em;
}

.tlf-page-head p,
.tlf-form label > span,
.tlf-form input,
.tlf-form select,
.tlf-form textarea,
.tlf-document-row,
table {
  font-size: .95rem;
}

.tlf-sidebar nav button {
  min-height: 48px;
  font-size: .92rem;
}

.tlf-panel h2 {
  font-size: 1.28rem;
}

.tlf-provider-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 18px;
}

.tlf-provider-folder {
  border: 1px solid #d8e2ea;
  border-radius: 18px;
  padding: 22px;
  background: #fff;
  display: grid;
  grid-template-columns: 48px 1fr 22px;
  gap: 15px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 34px rgba(7, 26, 45, .07);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.tlf-provider-folder:hover,
.tlf-provider-folder.is-active {
  transform: translateY(-3px);
  border-color: #e8b52b;
  box-shadow: 0 18px 44px rgba(7, 26, 45, .13);
}

.tlf-provider-folder > span {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #0b6bff;
  background: #edf5ff;
}

.tlf-provider-folder svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.tlf-provider-folder strong,
.tlf-fixed-provider strong {
  display: block;
  color: #0b2238;
  font-size: 1.05rem;
}

.tlf-provider-folder small {
  color: #708397;
}

.tlf-fixed-provider {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid #cbdbea;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5f9fd, #fff);
}

.tlf-fixed-provider > span {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #071a2d;
  color: #fff;
  font-weight: 800;
}

.tlf-fixed-provider small,
.tlf-fixed-provider p {
  margin: 0;
  color: #708397;
  font-size: .75rem;
}

.tlf-fixed-provider button {
  border: 0;
  background: transparent;
  color: #0b6bff;
  font-weight: 750;
  cursor: pointer;
}

.tlf-expiry-wrap[hidden],
.tlf-custom-title[hidden] {
  display: none !important;
}

.tlf-expiry-wrap > small {
  display: block;
  margin-top: -7px;
  color: #708397;
  font-size: .76rem;
}

.tlf-document-row {
  grid-template-columns: 42px minmax(230px, 1fr) auto auto auto auto auto;
  gap: 12px;
  min-height: 76px;
}

.tlf-small {
  min-height: 34px !important;
  padding: 7px 10px !important;
  font-size: .76rem !important;
}

.tlf-attendance-row-v3 {
  grid-template-columns: minmax(190px, 1.35fr) 130px minmax(170px, 1.2fr) 120px 130px 105px 105px minmax(150px, 1fr) 135px 42px 42px;
}

.tlf-attendance-row-v3 .tlf-route-field {
  min-width: 170px;
}

.tlf-table-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #071a2d;
  color: #fff !important;
  text-decoration: none;
  font-size: .75rem;
  font-weight: 750;
}

.tlf-finance-command {
  display: grid;
  grid-template-columns: minmax(310px, .8fr) 2fr;
  background: linear-gradient(125deg, #06182a, #0c2c49);
  border-radius: 24px;
  padding: 28px;
  color: #fff;
  box-shadow: 0 24px 60px rgba(5, 24, 43, .2);
}

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

.tlf-finance-command > article span,
.tlf-opening-balance span {
  color: #e8b52b;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.tlf-finance-command > article strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  letter-spacing: -.05em;
}

.tlf-finance-command > article small {
  color: #a9bfd3;
}

.tlf-finance-command > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
  padding-left: 28px;
}

.tlf-pulse {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
}

.tlf-pulse small,
.tlf-pulse strong {
  display: block;
}

.tlf-pulse small {
  color: #a9bfd3;
}

.tlf-pulse strong {
  margin-top: 5px;
  font-size: 1.15rem;
}

.tlf-cash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 18px 0;
}

.tlf-opening-balance {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px 22px;
  border: 1px solid #dce5ec;
  border-radius: 16px;
  background: #fff;
}

.tlf-opening-balance strong {
  display: block;
  color: #10283f;
}

.tlf-opening-balance input {
  min-height: 44px;
  border: 1px solid #ccd9e4;
  border-radius: 10px;
  padding: 0 12px;
}

.tlf-financial-ledgers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.tlf-ledger-list article {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e7edf2;
}

.tlf-ledger-list article:last-child {
  border-bottom: 0;
}

.tlf-ledger-list p,
.tlf-ledger-list small {
  display: block;
  margin: 2px 0 0;
  color: #6e8194;
  font-size: .78rem;
}

.tlf-form-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1280px) {
  .tlf-attendance-row-v3 {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }
  .tlf-attendance-vehicle,
  .tlf-route-field {
    grid-column: span 2;
  }
  .tlf-financial-ledgers {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  #tlf-portal-app {
    font-size: 15px;
  }
  .tlf-finance-command,
  .tlf-cash-grid {
    grid-template-columns: 1fr;
  }
  .tlf-finance-command > article {
    padding: 0 0 22px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
  }
  .tlf-finance-command > div {
    grid-template-columns: 1fr;
    padding: 22px 0 0;
  }
  .tlf-opening-balance {
    grid-template-columns: 1fr;
  }
  .tlf-document-row,
  .tlf-ledger-list article,
  .tlf-attendance-row-v3 {
    grid-template-columns: 1fr;
  }
  .tlf-attendance-vehicle,
  .tlf-route-field {
    grid-column: auto;
  }
  .tlf-form-grid-3 {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

html {
  margin: 0 !important;
}

body.tlf-portal-body {
  background: var(--tlf-paper);
  color: var(--tlf-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

body.tlf-portal-body button,
body.tlf-portal-body input,
body.tlf-portal-body select,
body.tlf-portal-body textarea {
  font: inherit;
}

body.tlf-portal-body button,
body.tlf-portal-body a {
  -webkit-tap-highlight-color: transparent;
}

.tlf-portal-app {
  min-height: 100vh;
}

.tlf-portal-loading,
.tlf-fatal {
  align-items: center;
  background: var(--tlf-midnight);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.tlf-portal-loading strong {
  font-size: 16px;
  margin-top: 10px;
}

.tlf-portal-loading small,
.tlf-fatal p {
  color: rgba(255, 255, 255, .55);
  font-size: 11px;
}

.tlf-loader {
  animation: tlf-spin .8s linear infinite;
  border: 2px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  border-top-color: #5ca2ff;
  height: 34px;
  width: 34px;
}

@keyframes tlf-spin {
  to { transform: rotate(360deg); }
}

.tlf-sidebar {
  background: linear-gradient(180deg, #061526, #030c16);
  bottom: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  left: 0;
  padding: 25px 17px 18px;
  position: fixed;
  top: 0;
  width: var(--tlf-sidebar);
  z-index: 40;
}

.tlf-brand {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .11);
  display: flex;
  gap: 11px;
  padding: 0 4px 22px;
}

.tlf-brand img {
  background: #fff;
  border-radius: 6px;
  height: 38px;
  object-fit: contain;
  padding: 5px;
  width: 75px;
}

.tlf-brand span {
  display: flex;
  flex-direction: column;
}

.tlf-brand strong {
  font-size: 10px;
  letter-spacing: -.01em;
}

.tlf-brand small {
  color: rgba(255, 255, 255, .42);
  font-size: 6px;
  margin-top: 4px;
  text-transform: uppercase;
}

.tlf-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 24px;
}

.tlf-sidebar nav button,
.tlf-home-link {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: rgba(255, 255, 255, .6);
  cursor: pointer;
  display: flex;
  font-size: 9px;
  font-weight: 650;
  gap: 12px;
  padding: 12px 13px;
  text-align: left;
  text-decoration: none;
  transition: .2s ease;
}

.tlf-sidebar nav button svg,
.tlf-home-link svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 18px;
}

.tlf-sidebar nav button:hover,
.tlf-sidebar nav button.is-active,
.tlf-home-link:hover {
  background: rgba(56, 143, 255, .14);
  color: #fff;
}

.tlf-sidebar nav button.is-active {
  box-shadow: inset 2px 0 #388fff;
}

.tlf-system {
  align-items: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 12px;
}

.tlf-system > i,
.tlf-live-dot {
  animation: tlf-pulse 2s infinite;
  background: #25cb76;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(37, 203, 118, .12);
  height: 6px;
  width: 6px;
}

@keyframes tlf-pulse {
  50% { box-shadow: 0 0 0 10px transparent; }
}

.tlf-system span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tlf-system strong {
  font-size: 7px;
}

.tlf-system small {
  color: rgba(255, 255, 255, .38);
  font-size: 6px;
  letter-spacing: .06em;
}

.tlf-home-link {
  margin-top: 9px;
}

.tlf-workspace {
  margin-left: var(--tlf-sidebar);
  min-height: 100vh;
}

.tlf-topbar {
  align-items: center;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--tlf-line);
  display: flex;
  height: 74px;
  justify-content: space-between;
  padding: 0 27px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.tlf-search {
  align-items: center;
  background: #f2f5f8;
  border: 1px solid #e4e9ee;
  border-radius: 7px;
  display: flex;
  gap: 9px;
  max-width: 370px;
  padding: 0 13px;
  width: 38vw;
}

.tlf-search span {
  color: #6d7a89;
  font-size: 17px;
}

.tlf-search input {
  background: transparent;
  border: 0;
  color: var(--tlf-ink);
  font-size: 9px;
  outline: 0;
  padding: 11px 0;
  width: 100%;
}

.tlf-user {
  align-items: center;
  display: flex;
  gap: 10px;
}

.tlf-user > span {
  align-items: center;
  background: var(--tlf-blue);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 8px;
  font-weight: 750;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.tlf-user > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tlf-user strong {
  font-size: 9px;
}

.tlf-user small {
  color: var(--tlf-muted);
  font-size: 7px;
}

.tlf-user a {
  color: #718093;
  font-size: 7px;
  margin-left: 6px;
  text-decoration: none;
}

.tlf-content {
  margin: auto;
  max-width: 1600px;
  padding: 48px 32px 80px;
}

.tlf-page-head {
  align-items: flex-end;
  display: flex;
  gap: 30px;
  justify-content: space-between;
  margin-bottom: 29px;
}

.tlf-page-head > div:first-child > span,
.tlf-panel-head span,
.tlf-modal > header span {
  color: var(--tlf-blue);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .16em;
}

.tlf-page-head h1 {
  font-size: clamp(32px, 3.4vw, 53px);
  font-weight: 540;
  letter-spacing: -.055em;
  margin: 9px 0 10px;
}

.tlf-page-head p {
  color: var(--tlf-muted);
  font-size: 10px;
  line-height: 1.6;
  margin: 0;
  max-width: 680px;
}

.tlf-head-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tlf-primary,
.tlf-secondary,
.tlf-head-actions button,
.tlf-panel-head button {
  align-items: center;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font-size: 8px;
  font-weight: 720;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
}

.tlf-primary {
  background: var(--tlf-blue);
  border: 1px solid var(--tlf-blue);
  color: #fff;
}

.tlf-secondary {
  background: #fff;
  border: 1px solid var(--tlf-line);
  color: #34516f;
}

.tlf-primary svg,
.tlf-secondary svg,
.tlf-panel-head button svg,
.tlf-head-actions button svg {
  fill: none;
  height: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 15px;
}

.tlf-primary:disabled,
.tlf-secondary:disabled,
button:disabled {
  cursor: not-allowed !important;
  opacity: .55;
}

.tlf-full {
  width: 100%;
}

.tlf-menu-button,
.tlf-menu-backdrop {
  display: none;
}

.tlf-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}

.tlf-metric {
  background: #fff;
  border: 1px solid var(--tlf-line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 145px;
  overflow: hidden;
  padding: 22px;
  position: relative;
}

.tlf-metric > span {
  color: var(--tlf-muted);
  font-size: 8px;
}

.tlf-metric > strong {
  font-size: 28px;
  letter-spacing: -.05em;
  margin: 17px 0 auto;
}

.tlf-metric > small {
  align-items: center;
  color: var(--tlf-muted);
  display: flex;
  font-size: 7px;
  gap: 7px;
}

.tlf-metric > small i {
  background: currentColor;
  border-radius: 50%;
  height: 4px;
  width: 4px;
}

.tlf-metric > b {
  border: 14px solid currentColor;
  border-radius: 50%;
  height: 105px;
  opacity: .06;
  position: absolute;
  right: -32px;
  top: -33px;
  width: 105px;
}

.tlf-tone-blue { color: var(--tlf-blue); }
.tlf-tone-green { color: var(--tlf-green); }
.tlf-tone-violet { color: #7658bd; }
.tlf-tone-orange { color: var(--tlf-orange); }
.tlf-metric > span,
.tlf-metric > strong { color: var(--tlf-ink); }

.tlf-panel {
  background: #fff;
  border: 1px solid var(--tlf-line);
  border-radius: 10px;
}

.tlf-panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 20px 21px;
}

.tlf-panel-head h2 {
  font-size: 14px;
  font-weight: 570;
  letter-spacing: -.025em;
  margin: 7px 0 0;
}

.tlf-panel-head > svg {
  fill: none;
  height: 22px;
  stroke: var(--tlf-blue);
  stroke-width: 1.5;
  width: 22px;
}

.tlf-panel-head > button {
  background: transparent;
  border: 0;
  color: var(--tlf-blue);
}

.tlf-overview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.08fr .92fr;
  margin-top: 12px;
}

.tlf-alert {
  align-items: center;
  border-top: 1px solid var(--tlf-line);
  display: flex;
  gap: 13px;
  padding: 17px 20px;
}

.tlf-alert > i {
  background: #e2a536;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.tlf-alert.success > i {
  background: var(--tlf-green);
}

.tlf-alert > div {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.tlf-alert strong {
  font-size: 9px;
}

.tlf-alert p {
  color: var(--tlf-muted);
  font-size: 7px;
  margin: 4px 0 0;
}

.tlf-live-row {
  align-items: center;
  border-top: 1px solid var(--tlf-line);
  display: flex;
  gap: 11px;
  padding: 14px 20px;
}

.tlf-live-row > span:first-child,
.tlf-attendance-vehicle > span,
.tlf-doc-icon {
  align-items: center;
  background: var(--tlf-blue-soft);
  border-radius: 7px;
  color: var(--tlf-blue);
  display: flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.tlf-live-row svg,
.tlf-attendance-vehicle svg,
.tlf-doc-icon svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 18px;
}

.tlf-live-row > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.tlf-live-row strong {
  font-size: 9px;
}

.tlf-live-row small {
  color: var(--tlf-muted);
  font-size: 7px;
}

.tlf-recent,
.tlf-orders,
.tlf-table-panel {
  margin-top: 12px;
  overflow: hidden;
}

.tlf-status {
  border-radius: 20px;
  display: inline-flex;
  font-size: 7px;
  font-weight: 750;
  padding: 5px 8px;
  white-space: nowrap;
}

.tlf-status-active,
.tlf-status-valid,
.tlf-status-paid {
  background: #e5f6ec;
  color: #157244;
}

.tlf-status-review,
.tlf-status-pending,
.tlf-status-planning,
.tlf-status-draft {
  background: #fff3dc;
  color: #98621c;
}

.tlf-status-blocked,
.tlf-status-rejected,
.tlf-status-failed,
.tlf-status-absent {
  background: #ffeaec;
  color: var(--tlf-red);
}

.tlf-status-expiring,
.tlf-status-incident {
  background: #fff0d9;
  color: #a76617;
}

.tlf-status-sent,
.tlf-status-received,
.tlf-status-invoiced,
.tlf-status-present {
  background: var(--tlf-blue-soft);
  color: #195fbf;
}

.tlf-status-paused,
.tlf-status-completed {
  background: #f0ecfa;
  color: #7258a8;
}

.tlf-summary-strip {
  align-items: center;
  background: var(--tlf-navy);
  border-radius: 9px;
  color: rgba(255, 255, 255, .6);
  display: flex;
  gap: 35px;
  padding: 15px 19px;
}

.tlf-summary-strip span {
  font-size: 8px;
}

.tlf-summary-strip strong {
  color: #fff;
  font-size: 12px;
  margin-right: 5px;
}

.tlf-table-scroll {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 900px;
  width: 100%;
}

th {
  background: #f8fafc;
  color: #788697;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: .08em;
  padding: 11px 15px;
  text-align: left;
  text-transform: uppercase;
}

td {
  border-top: 1px solid var(--tlf-line);
  color: #304050;
  font-size: 8px;
  padding: 13px 15px;
  vertical-align: middle;
}

td > strong {
  color: var(--tlf-ink);
}

.tlf-company {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 205px;
}

.tlf-company > span {
  align-items: center;
  background: var(--tlf-navy);
  border-radius: 7px;
  color: #fff;
  display: flex;
  font-size: 7px;
  font-weight: 750;
  height: 35px;
  justify-content: center;
  width: 35px;
}

.tlf-company > div,
.tlf-bank {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tlf-company strong,
.tlf-bank strong {
  color: var(--tlf-ink);
  font-size: 8px;
}

.tlf-company small,
.tlf-bank small,
.tlf-note {
  color: var(--tlf-muted);
  display: block;
  font-size: 7px;
}

.tlf-bank {
  min-width: 120px;
}

.tlf-bank a {
  color: var(--tlf-blue);
  font-size: 7px;
  font-weight: 700;
  text-decoration: underline;
}

.tlf-pending {
  color: #9a681f;
  font-size: 7px;
  font-weight: 680;
  white-space: nowrap;
}

.tlf-progress-label {
  display: flex;
  justify-content: space-between;
  min-width: 110px;
}

.tlf-progress-label span,
.tlf-progress-label small {
  font-size: 7px;
}

.tlf-progress {
  background: #e9edf2;
  border-radius: 5px;
  height: 4px;
  margin-top: 7px;
  overflow: hidden;
}

.tlf-progress i {
  background: linear-gradient(90deg, var(--tlf-blue), #52a2ff);
  display: block;
  height: 100%;
}

.tlf-icon-button {
  align-items: center;
  background: #f0f4f8;
  border: 0;
  border-radius: 50%;
  color: var(--tlf-blue);
  cursor: pointer;
  display: flex;
  height: 29px;
  justify-content: center;
  width: 29px;
}

.tlf-icon-button svg {
  fill: none;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  width: 14px;
}

.tlf-empty {
  align-items: center;
  color: var(--tlf-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-height: 190px;
  padding: 30px;
  text-align: center;
}

.tlf-empty svg {
  fill: none;
  height: 28px;
  opacity: .45;
  stroke: currentColor;
  stroke-width: 1.4;
  width: 28px;
}

.tlf-empty strong {
  color: #455467;
  font-size: 10px;
}

.tlf-empty p {
  font-size: 8px;
  margin: 0;
}

.tlf-doc-layout,
.tlf-finance-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.tlf-form-panel,
.tlf-requirements,
.tlf-generator,
.tlf-finance-summary {
  padding: 0 21px 22px;
}

.tlf-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.tlf-form label,
.tlf-date-control,
.tlf-attendance-row label {
  color: #5f6d7d;
  display: flex;
  flex-direction: column;
  font-size: 7px;
  font-weight: 720;
  gap: 7px;
  text-transform: uppercase;
}

.tlf-form input,
.tlf-form select,
.tlf-form textarea,
.tlf-date-control input,
.tlf-attendance-row input,
.tlf-attendance-row select,
.tlf-document-row select {
  background: #f7f9fb;
  border: 1px solid #d9e0e7;
  border-radius: 6px;
  color: var(--tlf-ink);
  font-size: 9px;
  min-height: 39px;
  outline: 0;
  padding: 9px 10px;
  text-transform: none;
  width: 100%;
}

.tlf-form input:focus,
.tlf-form select:focus,
.tlf-form textarea:focus {
  border-color: var(--tlf-blue);
  box-shadow: 0 0 0 3px rgba(11, 107, 255, .1);
}

.tlf-form-grid {
  display: grid;
  gap: 11px;
  grid-template-columns: 1fr 1fr;
}

.tlf-file {
  align-items: center;
  background: #f7f9fb;
  border: 1px dashed #bdcad8;
  border-radius: 8px;
  cursor: pointer;
  padding: 20px;
  text-align: center;
}

.tlf-file span svg {
  fill: none;
  height: 25px;
  stroke: var(--tlf-blue);
  stroke-width: 1.5;
  width: 25px;
}

.tlf-file strong {
  color: var(--tlf-ink);
  font-size: 9px;
  text-transform: none;
}

.tlf-file small {
  color: var(--tlf-muted);
  font-size: 7px;
  font-weight: 400;
  text-transform: none;
}

.tlf-file input {
  max-width: 310px;
}

.tlf-requirements > .tlf-panel-head {
  padding-left: 0;
  padding-right: 0;
}

.tlf-requirements > .tlf-panel-head b {
  background: var(--tlf-blue-soft);
  border-radius: 18px;
  color: var(--tlf-blue);
  font-size: 7px;
  padding: 6px 9px;
}

.tlf-requirement {
  border-top: 1px solid var(--tlf-line);
  display: grid;
  gap: 18px;
  grid-template-columns: 90px 1fr;
  padding: 16px 0;
}

.tlf-requirement > strong {
  font-size: 8px;
}

.tlf-requirement > div {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.tlf-requirement span {
  align-items: center;
  color: #526174;
  display: flex;
  font-size: 7px;
  gap: 7px;
}

.tlf-requirement i {
  align-items: center;
  background: #e5f6ec;
  border-radius: 50%;
  color: var(--tlf-green);
  display: flex;
  height: 17px;
  justify-content: center;
  width: 17px;
}

.tlf-requirement svg {
  fill: none;
  height: 10px;
  stroke: currentColor;
  stroke-width: 2;
  width: 10px;
}

.tlf-documents-list {
  margin-top: 12px;
}

.tlf-document-row {
  align-items: center;
  border-top: 1px solid var(--tlf-line);
  display: grid;
  gap: 12px;
  grid-template-columns: 36px 1fr auto 110px;
  padding: 13px 20px;
}

.tlf-document-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tlf-document-row strong {
  font-size: 8px;
}

.tlf-document-row small {
  color: var(--tlf-muted);
  font-size: 7px;
}

.tlf-document-row > a {
  color: var(--tlf-blue);
  font-size: 7px;
  font-weight: 720;
}

.tlf-document-row select {
  font-size: 7px;
  min-height: 33px;
}

.tlf-operation-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.tlf-operation-card {
  background: linear-gradient(145deg, #071a2e, #04101d);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 11px;
  color: #fff;
  min-height: 280px;
  padding: 21px;
}

.tlf-operation-card > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.tlf-operation-card > div > span {
  color: #65a7ff;
  font-size: 7px;
  letter-spacing: .12em;
}

.tlf-operation-card h2 {
  font-size: 21px;
  font-weight: 540;
  letter-spacing: -.04em;
  margin: 35px 0 8px;
}

.tlf-operation-card > p {
  color: rgba(255, 255, 255, .48);
  font-size: 8px;
}

.tlf-operation-card > section {
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  border-top: 1px solid rgba(255, 255, 255, .13);
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
  margin-top: 27px;
  padding: 17px 0;
}

.tlf-operation-card section div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tlf-operation-card section small {
  color: rgba(255, 255, 255, .42);
  font-size: 6px;
}

.tlf-operation-card section strong {
  font-size: 10px;
}

.tlf-operation-card footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
}

.tlf-operation-card footer span {
  color: rgba(255, 255, 255, .4);
  font-size: 7px;
}

.tlf-operation-card footer button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #7eb7ff;
  cursor: pointer;
  display: flex;
  font-size: 7px;
  gap: 6px;
}

.tlf-operation-card footer svg {
  fill: none;
  height: 13px;
  stroke: currentColor;
  width: 13px;
}

.tlf-date-control {
  background: #fff;
  border: 1px solid var(--tlf-line);
  border-radius: 7px;
  padding: 8px 10px;
}

.tlf-date-control input {
  border: 0;
  min-height: 22px;
  padding: 0;
}

.tlf-attendance-banner {
  align-items: center;
  background: linear-gradient(100deg, #061526, #0b294a);
  border-radius: 10px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 17px 20px;
}

.tlf-attendance-banner > div {
  align-items: center;
  display: flex;
  gap: 13px;
}

.tlf-attendance-banner svg {
  fill: none;
  height: 24px;
  stroke: #67a9ff;
  stroke-width: 1.5;
  width: 24px;
}

.tlf-attendance-banner span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tlf-attendance-banner strong {
  font-size: 9px;
}

.tlf-attendance-banner small {
  color: rgba(255, 255, 255, .48);
  font-size: 7px;
}

.tlf-attendance-banner b {
  background: rgba(255, 255, 255, .08);
  border-radius: 20px;
  font-size: 7px;
  padding: 7px 10px;
}

.tlf-attendance-row {
  align-items: end;
  border-top: 1px solid var(--tlf-line);
  display: grid;
  gap: 9px;
  grid-template-columns: 1.25fr .7fr .55fr .55fr 1fr .65fr auto;
  padding: 14px 17px;
}

.tlf-attendance-row:first-child {
  border-top: 0;
}

.tlf-attendance-vehicle {
  align-items: center;
  display: flex;
  gap: 10px;
}

.tlf-attendance-vehicle > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tlf-attendance-vehicle strong {
  font-size: 9px;
}

.tlf-attendance-vehicle small {
  color: var(--tlf-muted);
  font-size: 7px;
}

.tlf-attendance-row input,
.tlf-attendance-row select {
  min-width: 0;
  padding: 7px;
}

.tlf-row-total {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 7px;
}

.tlf-row-total small {
  color: var(--tlf-muted);
  font-size: 6px;
}

.tlf-row-total strong {
  font-size: 8px;
}

.tlf-save-row {
  align-items: center;
  background: var(--tlf-blue);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.tlf-save-row svg {
  fill: none;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  width: 15px;
}

.tlf-finance-flow {
  align-items: center;
  background: #fff;
  border: 1px solid var(--tlf-line);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 17px 20px;
}

.tlf-finance-flow > i {
  background: #dce3ea;
  flex: 1;
  height: 1px;
  margin: 0 12px;
}

.tlf-flow-step {
  align-items: center;
  display: flex;
  gap: 8px;
}

.tlf-flow-step > span {
  align-items: center;
  background: #edf1f5;
  border-radius: 50%;
  color: #8895a4;
  display: flex;
  font-size: 7px;
  font-weight: 760;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.tlf-flow-step.is-active > span {
  background: var(--tlf-blue-soft);
  color: var(--tlf-blue);
}

.tlf-flow-step > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
}

.tlf-flow-step strong {
  font-size: 7px;
}

.tlf-flow-step small {
  color: var(--tlf-muted);
  font-size: 6px;
}

.tlf-prefacture-total {
  background: #f4f7fa;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 17px;
}

.tlf-prefacture-total span,
.tlf-prefacture-total small {
  color: var(--tlf-muted);
  font-size: 7px;
}

.tlf-prefacture-total strong {
  font-size: 18px;
  letter-spacing: -.04em;
  margin: 8px 0;
}

.tlf-finance-kpi {
  align-items: center;
  border-top: 1px solid var(--tlf-line);
  display: flex;
  justify-content: space-between;
  padding: 17px 0;
}

.tlf-finance-kpi span {
  color: var(--tlf-muted);
  font-size: 8px;
}

.tlf-finance-kpi strong {
  font-size: 15px;
}

.tlf-table-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 100px;
}

.tlf-table-actions button {
  background: var(--tlf-blue-soft);
  border: 0;
  border-radius: 5px;
  color: var(--tlf-blue);
  cursor: pointer;
  font-size: 7px;
  font-weight: 720;
  padding: 7px 8px;
}

.tlf-table-actions button.is-pay {
  background: var(--tlf-navy);
  color: #fff;
}

.tlf-table-actions button:disabled {
  background: #edf1f5;
  color: #8793a1;
}

.tlf-modal-backdrop {
  align-items: center;
  background: rgba(2, 10, 18, .7);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 100;
}

.tlf-modal {
  animation: tlf-modal-in .25s both;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, .27);
  max-height: 90vh;
  overflow-y: auto;
  padding: 25px;
  width: min(570px, 100%);
}

@keyframes tlf-modal-in {
  from { opacity: 0; transform: translateY(15px) scale(.98); }
}

.tlf-modal > header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.tlf-modal > header h2 {
  font-size: 27px;
  font-weight: 540;
  letter-spacing: -.05em;
  margin: 7px 0 0;
}

.tlf-modal > header button {
  align-items: center;
  background: #f0f3f6;
  border: 0;
  border-radius: 50%;
  color: #687587;
  cursor: pointer;
  display: flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.tlf-modal > header svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  width: 16px;
}

.tlf-form-section {
  border-top: 1px solid var(--tlf-line);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 17px;
}

.tlf-form-section span {
  color: var(--tlf-blue);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .14em;
}

.tlf-form-section strong {
  font-size: 12px;
}

.tlf-security-note {
  background: #f1f6fc;
  border-left: 3px solid #83afe9;
  border-radius: 4px;
  color: #617188;
  font-size: 7px;
  line-height: 1.55;
  margin: 0;
  padding: 9px 11px;
}

.tlf-payment-order {
  background: var(--tlf-navy);
  border-radius: 8px;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 15px 17px;
}

.tlf-payment-order span,
.tlf-payment-bank small {
  color: #6ba9ff;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .12em;
}

.tlf-payment-order strong {
  font-size: 17px;
  margin: 7px 0 4px;
}

.tlf-payment-order small {
  color: rgba(255, 255, 255, .5);
  font-size: 7px;
}

.tlf-payment-bank {
  align-items: flex-start;
  background: linear-gradient(135deg, #eef5ff, #f8fbff);
  border: 1px solid #d5e4f6;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  padding: 14px;
}

.tlf-payment-bank > span {
  align-items: center;
  background: #fff;
  border-radius: 7px;
  color: var(--tlf-blue);
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.tlf-payment-bank svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.6;
  width: 20px;
}

.tlf-payment-bank > div {
  display: flex;
  flex-direction: column;
}

.tlf-payment-bank strong {
  font-size: 11px;
  margin: 6px 0 3px;
}

.tlf-payment-bank p {
  color: #607086;
  font-size: 7px;
  margin: 2px 0;
}

.tlf-toast {
  align-items: center;
  animation: tlf-toast-in .3s both;
  background: #062039;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  bottom: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
  color: #fff;
  display: flex;
  font-size: 9px;
  gap: 9px;
  padding: 13px 15px;
  position: fixed;
  right: 21px;
  z-index: 150;
}

.tlf-toast.is-error {
  background: #781e27;
}

.tlf-toast svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  width: 16px;
}

@keyframes tlf-toast-in {
  from { opacity: 0; transform: translateY(10px); }
}

.tlf-auth {
  background: var(--tlf-midnight);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  min-height: 100vh;
}

.tlf-auth-story {
  background:
    radial-gradient(circle at 25% 60%, rgba(11, 107, 255, .22), transparent 32%),
    linear-gradient(135deg, #061526, #020910);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px clamp(42px, 6vw, 95px);
  position: relative;
}

.tlf-auth-story::after {
  border: 1px solid rgba(91, 160, 255, .13);
  border-radius: 50%;
  content: "";
  height: 700px;
  left: -300px;
  position: absolute;
  top: 15%;
  width: 700px;
}

.tlf-auth-brand {
  align-items: center;
  color: #fff;
  display: flex;
  gap: 13px;
  position: relative;
  text-decoration: none;
  z-index: 2;
}

.tlf-auth-brand img {
  background: #fff;
  border-radius: 7px;
  height: 48px;
  object-fit: contain;
  padding: 6px;
  width: 105px;
}

.tlf-auth-brand span {
  border-left: 1px solid rgba(255, 255, 255, .25);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 13px;
}

.tlf-auth-brand strong {
  font-size: 11px;
}

.tlf-auth-brand small {
  color: rgba(255, 255, 255, .45);
  font-size: 7px;
}

.tlf-auth-story > div {
  position: relative;
  z-index: 2;
}

.tlf-auth-story > div > p {
  color: #5ea0ff;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .17em;
}

.tlf-auth-story h1 {
  font-size: clamp(48px, 5.2vw, 78px);
  font-weight: 520;
  letter-spacing: -.06em;
  line-height: .95;
  margin: 23px 0;
}

.tlf-auth-story h1 em {
  color: #8fa5bc;
  font-style: normal;
  font-weight: 320;
}

.tlf-auth-story > div > span {
  color: rgba(255, 255, 255, .52);
  display: block;
  font-size: 12px;
  line-height: 1.65;
  max-width: 560px;
}

.tlf-auth-story > small {
  color: rgba(255, 255, 255, .35);
  font-size: 7px;
  letter-spacing: .1em;
  position: relative;
  z-index: 2;
}

.tlf-auth-panel {
  align-items: center;
  background: #f3f5f8;
  display: flex;
  justify-content: center;
  padding: 35px;
}

.tlf-auth-card {
  background: #fff;
  border: 1px solid var(--tlf-line);
  border-radius: 13px;
  box-shadow: 0 30px 100px rgba(3, 18, 33, .13);
  padding: 38px;
  width: min(450px, 100%);
}

.tlf-eyebrow {
  color: var(--tlf-blue);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .15em;
}

.tlf-auth-card h2 {
  font-size: 32px;
  font-weight: 540;
  letter-spacing: -.05em;
  margin: 11px 0;
}

.tlf-auth-card > p {
  color: var(--tlf-muted);
  font-size: 10px;
  line-height: 1.6;
}

.tlf-auth-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 26px;
}

.tlf-auth-card form p {
  margin: 0;
}

.tlf-auth-card label {
  color: #526175;
  display: block;
  font-size: 8px;
  font-weight: 700;
  margin-bottom: 7px;
}

.tlf-auth-card input[type="text"],
.tlf-auth-card input[type="password"] {
  background: #f7f9fb;
  border: 1px solid #d9e0e7;
  border-radius: 7px;
  font-size: 10px;
  min-height: 45px;
  padding: 10px 12px;
  width: 100%;
}

.tlf-auth-card .login-remember label {
  align-items: center;
  display: flex;
  gap: 7px;
}

.tlf-auth-card input[type="submit"],
.tlf-auth-button {
  background: var(--tlf-blue);
  border: 0;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  display: block;
  font-size: 10px;
  font-weight: 720;
  padding: 14px 16px;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.tlf-back-home {
  color: #718095;
  display: block;
  font-size: 8px;
  margin-top: 22px;
  text-decoration: none;
}

.tlf-fatal {
  padding: 30px;
}

.tlf-fatal button {
  background: var(--tlf-blue);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  padding: 11px 15px;
}

.tlf-sidebar nav {
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}

.tlf-inline-actions {
  align-items: center;
  display: flex;
  gap: 5px;
}

.tlf-icon-button.is-danger,
.tlf-row-delete,
.tlf-table-actions button.is-danger,
.tlf-operation-card footer button.is-danger {
  color: var(--tlf-red);
}

.tlf-row-delete,
.tlf-compact-list button {
  align-items: center;
  background: #fff0f1;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  height: 32px;
  justify-content: center;
  min-width: 32px;
}

.tlf-row-delete svg,
.tlf-compact-list button svg,
.tlf-inline-actions svg {
  fill: none;
  height: 14px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 14px;
}

.tlf-resource-grid,
.tlf-template-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.tlf-compact-list {
  max-height: 390px;
  overflow-y: auto;
}

.tlf-compact-list > div {
  align-items: center;
  border-top: 1px solid var(--tlf-line);
  display: flex;
  gap: 11px;
  padding: 12px 18px;
}

.tlf-compact-list p {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.tlf-compact-list strong {
  font-size: 8px;
}

.tlf-compact-list small {
  color: var(--tlf-muted);
  font-size: 7px;
}

.tlf-resource-icon {
  align-items: center;
  background: var(--tlf-blue-soft);
  border-radius: 7px;
  color: var(--tlf-blue);
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.tlf-resource-icon svg,
.tlf-access-panel > svg,
.tlf-email-hero svg,
.tlf-governance svg,
.tlf-smtp-note svg,
.tlf-user-invite svg,
.tlf-email-recipient svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 18px;
}

.tlf-access-panel {
  align-items: center;
  background: linear-gradient(145deg, #071a2e, #04101d);
  color: #fff;
  display: flex;
  gap: 18px;
  min-height: 250px;
  padding: 28px;
}

.tlf-access-panel > svg {
  color: #72b0ff;
  height: 34px;
  width: 34px;
}

.tlf-access-panel span,
.tlf-email-hero section > span {
  color: #66a8ff;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .14em;
}

.tlf-access-panel h2 {
  font-size: 22px;
  font-weight: 560;
  margin: 8px 0;
}

.tlf-access-panel p {
  color: rgba(255, 255, 255, .52);
  font-size: 8px;
  line-height: 1.6;
  margin: 0;
}

.tlf-document-row:has(.tlf-row-delete) {
  grid-template-columns: 36px 1fr auto 110px 32px;
}

.tlf-attendance-readonly {
  align-items: center;
  border-top: 1px solid var(--tlf-line);
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr auto 150px;
  padding: 16px 18px;
}

.tlf-attendance-readonly > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tlf-attendance-readonly > div:last-child small {
  color: var(--tlf-muted);
  font-size: 7px;
}

.tlf-attendance-readonly > div:last-child strong {
  font-size: 10px;
}

.tlf-document-folio {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.tlf-document-folio span {
  color: var(--tlf-blue);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.tlf-document-folio strong {
  font-size: 8px;
}

.tlf-table-actions button.is-danger {
  background: #fff0f1;
}

.tlf-user-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}

.tlf-users-panel {
  margin-top: 12px;
}

.tlf-security-chip {
  align-items: center;
  background: #eaf7f0;
  border-radius: 20px;
  color: #16824d;
  display: flex;
  font-size: 7px;
  font-weight: 720;
  gap: 7px;
  padding: 8px 11px;
}

.tlf-security-chip svg {
  fill: none;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  width: 14px;
}

.tlf-user-row {
  align-items: center;
  border-top: 1px solid var(--tlf-line);
  display: grid;
  gap: 14px;
  grid-template-columns: 42px 1.25fr .9fr 1fr auto;
  padding: 15px 20px;
}

.tlf-user-avatar {
  align-items: center;
  background: linear-gradient(145deg, #0b6bff, #084dba);
  border-radius: 10px;
  color: #fff;
  display: flex;
  font-size: 8px;
  font-weight: 780;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.tlf-user-identity,
.tlf-user-access,
.tlf-permission-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.tlf-user-identity strong,
.tlf-permission-summary strong {
  font-size: 8px;
}

.tlf-user-identity small,
.tlf-user-access small,
.tlf-permission-summary small {
  color: var(--tlf-muted);
  font-size: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tlf-wp-admin {
  background: #edf1f5;
  border-radius: 4px;
  color: #667689;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 7px;
}

.tlf-governance {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 12px;
}

.tlf-governance > div {
  align-items: center;
  background: var(--tlf-navy);
  border-radius: 9px;
  color: #74b1ff;
  display: flex;
  gap: 12px;
  padding: 17px;
}

.tlf-governance span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tlf-governance strong {
  color: #fff;
  font-size: 8px;
}

.tlf-governance small {
  color: rgba(255, 255, 255, .45);
  font-size: 7px;
  line-height: 1.45;
}

.tlf-email-hero {
  align-items: center;
  background: linear-gradient(120deg, #051729, #0b2a49);
  border-radius: 12px;
  color: #fff;
  display: grid;
  gap: 22px;
  grid-template-columns: 52px 1fr 1.1fr;
  padding: 26px;
}

.tlf-email-hero > div {
  align-items: center;
  background: rgba(255, 255, 255, .1);
  border-radius: 11px;
  color: #76b4ff;
  display: flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.tlf-email-hero > div svg {
  height: 25px;
  width: 25px;
}

.tlf-email-hero h2 {
  font-size: 21px;
  font-weight: 560;
  letter-spacing: -.035em;
  margin: 7px 0;
}

.tlf-email-hero p,
.tlf-email-hero aside > strong {
  color: rgba(255, 255, 255, .55);
  font-size: 8px;
  line-height: 1.6;
  margin: 0;
}

.tlf-email-hero aside {
  border-left: 1px solid rgba(255, 255, 255, .13);
  padding-left: 22px;
}

.tlf-email-hero aside > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.tlf-email-hero code {
  background: rgba(255, 255, 255, .09);
  border-radius: 4px;
  color: #a8d0ff;
  font-size: 7px;
  padding: 5px 7px;
}

.tlf-template-detail {
  color: var(--tlf-muted);
  font-size: 8px;
  line-height: 1.55;
  margin: 0;
  padding: 0 21px;
}

.tlf-template-card form {
  padding: 20px 21px 23px;
}

.tlf-smtp-note {
  align-items: center;
  background: #eaf2ff;
  border: 1px solid #d5e4f8;
  border-radius: 9px;
  color: var(--tlf-blue);
  display: flex;
  gap: 14px;
  margin-top: 12px;
  padding: 17px 19px;
}

.tlf-smtp-note strong {
  color: var(--tlf-ink);
  font-size: 8px;
}

.tlf-smtp-note p {
  color: var(--tlf-muted);
  font-size: 7px;
  line-height: 1.5;
  margin: 4px 0 0;
}

.tlf-modal.is-wide {
  width: min(840px, 100%);
}

.tlf-modal.is-medium {
  width: min(660px, 100%);
}

.tlf-user-invite,
.tlf-email-recipient {
  align-items: center;
  background: linear-gradient(135deg, #edf5ff, #f7fbff);
  border: 1px solid #d9e8fa;
  border-radius: 9px;
  color: var(--tlf-blue);
  display: flex;
  gap: 12px;
  padding: 14px;
}

.tlf-user-invite > div,
.tlf-email-recipient > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.tlf-user-invite strong,
.tlf-email-recipient strong {
  color: var(--tlf-ink);
  font-size: 9px;
}

.tlf-user-invite small,
.tlf-email-recipient small,
.tlf-email-recipient p {
  color: var(--tlf-muted);
  font-size: 7px;
  line-height: 1.45;
  margin: 0;
}

.tlf-email-recipient b {
  background: #fff;
  border-radius: 5px;
  color: var(--tlf-blue);
  font-size: 7px;
  padding: 7px 9px;
}

.tlf-permission-matrix {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.tlf-permission-group {
  border: 1px solid var(--tlf-line);
  border-radius: 9px;
  overflow: hidden;
}

.tlf-permission-group > header {
  background: #f6f8fa;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
}

.tlf-permission-group > header strong {
  font-size: 8px;
}

.tlf-permission-group > header small {
  color: var(--tlf-muted);
  font-size: 6px;
}

.tlf-permission-option {
  align-items: flex-start;
  border-top: 1px solid var(--tlf-line);
  cursor: pointer;
  display: flex !important;
  gap: 10px;
  margin: 0 !important;
  padding: 11px 12px;
}

.tlf-permission-option input {
  left: -9999px;
  position: absolute;
}

.tlf-permission-option > span {
  align-items: center;
  background: #edf1f5;
  border-radius: 5px;
  color: transparent;
  display: flex;
  height: 23px;
  justify-content: center;
  min-width: 23px;
}

.tlf-permission-option input:checked + span {
  background: var(--tlf-blue);
  color: #fff;
}

.tlf-permission-option > span svg {
  fill: none;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  width: 12px;
}

.tlf-permission-option > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tlf-permission-option strong {
  color: var(--tlf-ink);
  font-size: 7px;
}

.tlf-permission-option small {
  color: var(--tlf-muted);
  font-size: 6px;
  line-height: 1.4;
}

.tlf-form .is-readonly input {
  background: #edf1f5;
  color: #788797;
}

.tlf-document-preview {
  background: var(--tlf-navy);
  border-radius: 8px;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 15px 17px;
}

.tlf-document-preview span {
  color: #6aa9ff;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .13em;
}

.tlf-document-preview strong {
  font-size: 16px;
  margin: 7px 0 4px;
}

.tlf-document-preview small {
  color: rgba(255, 255, 255, .5);
  font-size: 7px;
}

.tlf-auth-help {
  align-items: flex-start;
  border-top: 1px solid var(--tlf-line);
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 18px;
  padding-top: 15px;
}

.tlf-auth-help a {
  color: var(--tlf-blue);
  font-size: 8px;
  font-weight: 700;
  text-decoration: none;
}

.tlf-auth-help small {
  color: var(--tlf-muted);
  font-size: 7px;
  line-height: 1.45;
}

@media (max-width: 1200px) {
  .tlf-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .tlf-user-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .tlf-operation-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tlf-attendance-row {
    grid-template-columns: 1.2fr .75fr .6fr .6fr 1fr;
  }

  .tlf-row-total,
  .tlf-save-row {
    margin-top: 7px;
  }
}

@media (max-width: 900px) {
  .tlf-sidebar {
    transform: translateX(-100%);
    transition: transform .28s ease;
  }

  .tlf-sidebar.is-open {
    transform: none;
  }

  .tlf-sidebar.is-open + .tlf-workspace + .tlf-menu-backdrop {
    display: block;
  }

  .tlf-workspace {
    margin-left: 0;
  }

  .tlf-menu-button {
    align-items: center;
    background: #eef3f8;
    border: 0;
    border-radius: 6px;
    color: #43556a;
    display: flex;
    height: 34px;
    justify-content: center;
    width: 34px;
  }

  .tlf-menu-button svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.7;
    width: 18px;
  }

  .tlf-menu-backdrop {
    background: rgba(0, 0, 0, .45);
    border: 0;
    inset: 0;
    position: fixed;
    z-index: 30;
  }

  .tlf-overview-grid,
  .tlf-doc-layout,
  .tlf-finance-layout,
  .tlf-resource-grid,
  .tlf-template-grid {
    grid-template-columns: 1fr;
  }

  .tlf-email-hero {
    grid-template-columns: 52px 1fr;
  }

  .tlf-email-hero aside {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .13);
    grid-column: 1 / -1;
    padding-left: 0;
    padding-top: 17px;
  }

  .tlf-user-row {
    grid-template-columns: 42px 1.2fr 1fr auto;
  }

  .tlf-permission-summary {
    display: none;
  }

  .tlf-finance-flow {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .tlf-finance-flow > i {
    flex: none;
    height: 14px;
    margin: 0 0 0 13px;
    width: 1px;
  }

  .tlf-auth {
    grid-template-columns: 1fr;
  }

  .tlf-auth-story {
    display: none;
  }

  .tlf-auth-panel {
    min-height: 100vh;
  }
}

@media (max-width: 640px) {
  .tlf-topbar {
    height: 66px;
    padding: 0 14px;
  }

  .tlf-search,
  .tlf-user > div {
    display: none;
  }

  .tlf-content {
    padding: 32px 14px 65px;
  }

  .tlf-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tlf-page-head h1 {
    font-size: 37px;
  }

  .tlf-head-actions {
    justify-content: flex-start;
  }

  .tlf-metrics,
  .tlf-operation-grid,
  .tlf-user-metrics,
  .tlf-governance {
    grid-template-columns: 1fr;
  }

  .tlf-user-row {
    align-items: flex-start;
    grid-template-columns: 38px 1fr auto;
  }

  .tlf-user-access {
    grid-column: 2;
  }

  .tlf-user-row > .tlf-inline-actions {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .tlf-permission-matrix {
    grid-template-columns: 1fr;
  }

  .tlf-email-hero {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .tlf-email-hero aside {
    grid-column: auto;
  }

  .tlf-summary-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .tlf-form-grid,
  .tlf-requirement > div {
    grid-template-columns: 1fr;
  }

  .tlf-requirement {
    grid-template-columns: 1fr;
  }

  .tlf-document-row {
    grid-template-columns: 36px 1fr;
  }

  .tlf-document-row > a,
  .tlf-document-row > select,
  .tlf-document-row > .tlf-row-delete {
    grid-column: 2;
  }

  .tlf-document-row:has(.tlf-row-delete) {
    grid-template-columns: 36px 1fr;
  }

  .tlf-attendance-row {
    grid-template-columns: 1fr;
  }

  .tlf-attendance-readonly {
    grid-template-columns: 1fr;
  }

  .tlf-attendance-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .tlf-modal {
    padding: 21px 17px;
  }

  .tlf-auth-panel {
    padding: 18px;
  }

  .tlf-auth-card {
    padding: 29px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Ajustes finales de precedencia para HSLOG Control 3.0 */
#tlf-portal-app { font-size: 16px; line-height: 1.55; }
.tlf-content { max-width: 1680px; }
.tlf-page-head h1 { font-size: clamp(2rem, 3vw, 3.15rem); }
.tlf-page-head p,
.tlf-form input,
.tlf-form select,
.tlf-form textarea,
.tlf-document-row,
.tlf-table-scroll table { font-size: .95rem; }
.tlf-sidebar nav button { min-height: 48px; font-size: .92rem; }
.tlf-attendance-row.tlf-attendance-row-v3 {
  grid-template-columns: minmax(190px, 1.35fr) 130px minmax(170px, 1.2fr) 120px 130px 105px 105px minmax(150px, 1fr) 135px 42px 42px;
}
@media (max-width: 1280px) {
  .tlf-attendance-row.tlf-attendance-row-v3 { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
}
@media (max-width: 860px) {
  .tlf-attendance-row.tlf-attendance-row-v3 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   HSLOG Control 4.0 · sistema visual ejecutivo y accesible
   ========================================================================== */

:root {
  --tlf-midnight: #06182b;
  --tlf-navy: #09233f;
  --tlf-blue: #0a62e8;
  --tlf-blue-hover: #0753c7;
  --tlf-blue-soft: #edf5ff;
  --tlf-paper: #f4f7fb;
  --tlf-white: #fff;
  --tlf-ink: #0a1f35;
  --tlf-muted: #63758a;
  --tlf-line: #dbe4ed;
  --tlf-line-strong: #c9d5e1;
  --tlf-green: #178454;
  --tlf-red: #bd3540;
  --tlf-orange: #b96a1c;
  --tlf-sidebar: 286px;
  --tlf-radius-sm: 10px;
  --tlf-radius: 16px;
  --tlf-radius-lg: 24px;
  --tlf-shadow-sm: 0 8px 24px rgba(12, 35, 58, .06);
  --tlf-shadow: 0 18px 48px rgba(12, 35, 58, .09);
  --tlf-shadow-lg: 0 30px 80px rgba(4, 20, 38, .18);
}

body.tlf-portal-body {
  background:
    radial-gradient(circle at 82% 0%, rgba(10, 98, 232, .055), transparent 27rem),
    var(--tlf-paper);
  color: var(--tlf-ink);
  font-family: "Inter var", Inter, Aptos, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.tlf-portal-body button,
body.tlf-portal-body input,
body.tlf-portal-body select,
body.tlf-portal-body textarea {
  font-family: inherit;
}

#tlf-portal-app {
  color: var(--tlf-ink);
  font-size: 16px;
  line-height: 1.55;
}

#tlf-portal-app button,
#tlf-portal-app a,
#tlf-portal-app input,
#tlf-portal-app select,
#tlf-portal-app textarea,
#tlf-portal-app table {
  font-size: .875rem;
}

#tlf-portal-app small {
  font-size: .78rem;
  line-height: 1.45;
}

#tlf-portal-app button:focus-visible,
#tlf-portal-app a:focus-visible,
#tlf-portal-app input:focus-visible,
#tlf-portal-app select:focus-visible,
#tlf-portal-app textarea:focus-visible,
.tlf-auth-card input:focus-visible,
.tlf-auth-card a:focus-visible {
  outline: 3px solid rgba(10, 98, 232, .24);
  outline-offset: 2px;
}

.tlf-sidebar {
  background:
    radial-gradient(circle at 10% 0%, rgba(57, 141, 255, .19), transparent 19rem),
    linear-gradient(180deg, #071b30 0%, #04111f 100%);
  box-shadow: 16px 0 42px rgba(3, 17, 31, .14);
  padding: 26px 18px 20px;
  width: var(--tlf-sidebar);
}

.tlf-brand {
  border-bottom-color: rgba(255, 255, 255, .1);
  gap: 14px;
  min-height: 74px;
  padding: 0 6px 22px;
}

.tlf-brand img {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
  height: 48px;
  padding: 5px 8px;
  width: 92px;
}

.tlf-brand span {
  min-width: 0;
}

.tlf-brand strong {
  color: #fff;
  font-size: .9rem;
  font-weight: 750;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.tlf-brand small {
  color: rgba(255, 255, 255, .5);
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .08em;
  margin-top: 5px;
  text-transform: uppercase;
}

.tlf-sidebar nav {
  flex: 1;
  gap: 5px;
  margin: 18px 0 14px;
  overflow-y: auto;
  padding: 0 4px 8px 0;
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
  scrollbar-width: thin;
}

.tlf-nav-label {
  color: rgba(255, 255, 255, .34);
  display: block;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .14em;
  margin: 17px 13px 6px;
}

.tlf-nav-label:first-child {
  margin-top: 3px;
}

#tlf-portal-app .tlf-sidebar nav button,
#tlf-portal-app .tlf-home-link {
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(255, 255, 255, .68);
  font-size: .88rem;
  font-weight: 650;
  gap: 12px;
  min-height: 46px;
  padding: 0 13px;
  position: relative;
}

.tlf-sidebar nav button svg,
.tlf-home-link svg {
  flex: 0 0 auto;
  height: 20px;
  width: 20px;
}

.tlf-sidebar nav button:hover,
.tlf-sidebar nav button.is-active,
.tlf-home-link:hover {
  background: rgba(74, 150, 255, .13);
  border-color: rgba(104, 170, 255, .12);
  color: #fff;
  transform: translateX(2px);
}

.tlf-sidebar nav button.is-active {
  background: linear-gradient(90deg, rgba(10, 98, 232, .38), rgba(10, 98, 232, .13));
  box-shadow: none;
}

.tlf-sidebar nav button.is-active::before {
  background: #5ca1ff;
  border-radius: 0 5px 5px 0;
  content: "";
  height: 24px;
  left: -18px;
  position: absolute;
  top: 11px;
  width: 4px;
}

.tlf-system {
  background: rgba(255, 255, 255, .055);
  border-color: rgba(255, 255, 255, .09);
  border-radius: 12px;
  gap: 12px;
  padding: 13px 14px;
}

.tlf-system > i,
.tlf-live-dot {
  height: 8px;
  width: 8px;
}

.tlf-system strong {
  color: #fff;
  font-size: .75rem;
}

.tlf-system small {
  color: rgba(255, 255, 255, .43);
  font-size: .62rem;
  letter-spacing: .075em;
}

.tlf-home-link {
  margin-top: 10px;
}

.tlf-logout-link {
  color: rgba(255, 255, 255, .5) !important;
  margin-top: 2px;
}

.tlf-logout-link:hover {
  background: rgba(230, 76, 88, .1) !important;
  border-color: rgba(230, 76, 88, .15) !important;
  color: #ffb7bd !important;
}

.tlf-skip-link {
  background: #fff;
  border: 2px solid var(--tlf-blue);
  border-radius: 8px;
  color: var(--tlf-ink);
  font-size: .86rem;
  font-weight: 750;
  left: 18px;
  padding: 10px 14px;
  position: fixed;
  top: -100px;
  transition: top .15s ease;
  z-index: 99999;
}

.tlf-skip-link:focus {
  top: 18px;
}

.tlf-workspace {
  margin-left: var(--tlf-sidebar);
}

.tlf-topbar {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, .9);
  border-bottom-color: rgba(201, 213, 225, .85);
  gap: 22px;
  height: 84px;
  padding: 0 34px;
}

.tlf-topbar-context {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
}

.tlf-topbar-context small {
  color: var(--tlf-blue);
  font-size: .64rem !important;
  font-weight: 800;
  letter-spacing: .12em;
}

.tlf-topbar-context strong {
  color: var(--tlf-ink);
  font-size: .98rem;
  font-weight: 750;
  letter-spacing: -.02em;
}

.tlf-search {
  background: #f4f7fa;
  border-color: #dde6ee;
  border-radius: 12px;
  gap: 10px;
  margin-right: auto;
  max-width: 520px;
  min-height: 46px;
  padding: 0 15px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  width: min(36vw, 520px);
}

.tlf-search:focus-within {
  background: #fff;
  border-color: #8dbbfa;
  box-shadow: 0 0 0 4px rgba(10, 98, 232, .08);
}

.tlf-search svg {
  fill: none;
  height: 19px;
  stroke: #7890a6;
  stroke-linecap: round;
  stroke-width: 1.8;
  width: 19px;
}

#tlf-portal-app .tlf-search input {
  font-size: .86rem;
  min-height: 44px;
  padding: 0;
}

.tlf-user {
  border-left: 1px solid var(--tlf-line);
  gap: 11px;
  padding-left: 22px;
}

.tlf-user > span {
  background: linear-gradient(135deg, #0a62e8, #0648a9);
  box-shadow: 0 8px 20px rgba(10, 98, 232, .22);
  font-size: .78rem;
  height: 42px;
  width: 42px;
}

.tlf-user > div {
  gap: 1px;
  max-width: 180px;
}

.tlf-user strong {
  font-size: .86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tlf-user small {
  color: var(--tlf-muted);
  font-size: .7rem !important;
}

#tlf-portal-app .tlf-user a {
  align-items: center;
  border: 1px solid var(--tlf-line);
  border-radius: 9px;
  color: #4d6277;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 700;
  min-height: 34px;
  padding: 0 10px;
}

.tlf-content {
  max-width: 1720px;
  padding: 44px 42px 96px;
}

.tlf-page-head {
  align-items: center;
  gap: 34px;
  margin-bottom: 30px;
}

.tlf-page-head-copy {
  max-width: 860px;
}

.tlf-page-head > div:first-child > span,
.tlf-panel-head span,
.tlf-modal > header span {
  color: var(--tlf-blue);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .14em;
}

.tlf-page-head h1 {
  color: var(--tlf-ink);
  font-size: clamp(2.15rem, 3.15vw, 3.55rem);
  font-weight: 720;
  letter-spacing: -.045em;
  line-height: 1.04;
  margin: 10px 0 11px;
}

.tlf-page-head p {
  color: var(--tlf-muted);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 780px;
}

.tlf-head-actions {
  gap: 10px;
}

#tlf-portal-app .tlf-primary,
#tlf-portal-app .tlf-secondary,
#tlf-portal-app .tlf-head-actions button,
#tlf-portal-app .tlf-panel-head button,
#tlf-portal-app .tlf-table-actions button {
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 750;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.tlf-primary {
  background: linear-gradient(135deg, #0a69f5, #0957d0);
  border-color: #0957d0;
  box-shadow: 0 9px 22px rgba(10, 98, 232, .19);
}

.tlf-primary:hover {
  background: linear-gradient(135deg, #095bd7, #0648ad);
  box-shadow: 0 13px 28px rgba(10, 98, 232, .24);
  transform: translateY(-1px);
}

.tlf-secondary {
  background: #fff;
  border-color: var(--tlf-line-strong);
  color: #31506e;
  box-shadow: 0 3px 10px rgba(10, 31, 53, .035);
}

.tlf-secondary:hover {
  border-color: #9db5cc;
  color: #103e70;
  transform: translateY(-1px);
}

.tlf-metrics,
.tlf-user-metrics {
  gap: 16px;
}

.tlf-metric {
  border-color: #dfe7ef;
  border-radius: var(--tlf-radius);
  box-shadow: var(--tlf-shadow-sm);
  min-height: 168px;
  padding: 24px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.tlf-metric:hover {
  box-shadow: var(--tlf-shadow);
  transform: translateY(-2px);
}

.tlf-metric > span {
  color: #61758a;
  font-size: .8rem;
  font-weight: 650;
}

.tlf-metric > strong {
  color: var(--tlf-ink);
  font-size: clamp(1.75rem, 2.7vw, 2.55rem);
  font-weight: 760;
  letter-spacing: -.045em;
  margin: 17px 0 auto;
}

.tlf-metric > small {
  color: var(--tlf-muted);
  font-size: .72rem;
  gap: 8px;
}

.tlf-metric > b {
  border-width: 17px;
  height: 118px;
  opacity: .055;
  width: 118px;
}

.tlf-panel {
  border-color: #dfe7ef;
  border-radius: var(--tlf-radius);
  box-shadow: var(--tlf-shadow-sm);
}

.tlf-panel-head {
  gap: 20px;
  min-height: 78px;
  padding: 23px 25px;
}

.tlf-panel-head h2 {
  color: var(--tlf-ink);
  font-size: 1.18rem;
  font-weight: 730;
  letter-spacing: -.025em;
  margin-top: 7px;
}

.tlf-panel-head > svg {
  height: 25px;
  width: 25px;
}

.tlf-overview-grid,
.tlf-doc-layout,
.tlf-finance-layout,
.tlf-financial-ledgers,
.tlf-resource-grid,
.tlf-template-grid {
  gap: 16px;
}

.tlf-overview-grid,
.tlf-recent,
.tlf-orders,
.tlf-table-panel,
.tlf-documents-list {
  margin-top: 16px;
}

.tlf-alert,
.tlf-live-row {
  gap: 15px;
  min-height: 72px;
  padding: 17px 24px;
}

.tlf-alert strong,
.tlf-live-row strong {
  color: var(--tlf-ink);
  font-size: .9rem;
}

.tlf-alert p,
.tlf-live-row small {
  color: var(--tlf-muted);
  font-size: .76rem;
}

.tlf-live-row > span:first-child,
.tlf-attendance-vehicle > span,
.tlf-doc-icon,
.tlf-resource-icon {
  border-radius: 11px;
  height: 42px;
  width: 42px;
}

.tlf-status {
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 760;
  letter-spacing: .01em;
  padding: 6px 10px;
}

.tlf-status-active,
.tlf-status-valid,
.tlf-status-paid {
  border-color: #c8ead8;
}

.tlf-status-review,
.tlf-status-pending,
.tlf-status-planning,
.tlf-status-draft {
  border-color: #f0ddba;
}

.tlf-summary-strip {
  background:
    radial-gradient(circle at 82% -150%, rgba(67, 147, 255, .6), transparent 16rem),
    linear-gradient(120deg, #071a2d, #0d3152);
  border-radius: 14px;
  box-shadow: 0 15px 34px rgba(7, 26, 45, .13);
  gap: 44px;
  margin-bottom: 16px;
  min-height: 62px;
  padding: 15px 22px;
}

.tlf-summary-strip span {
  color: rgba(255, 255, 255, .66);
  font-size: .82rem;
}

.tlf-summary-strip strong {
  font-size: 1.05rem;
}

.tlf-table-panel,
.tlf-orders,
.tlf-recent {
  overflow: hidden;
}

.tlf-table-scroll {
  scrollbar-color: #bdcddd #f1f5f8;
  scrollbar-width: thin;
}

#tlf-portal-app table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
}

#tlf-portal-app th {
  background: #f5f8fb;
  border-bottom: 1px solid var(--tlf-line);
  color: #63788d;
  font-size: .68rem;
  font-weight: 820;
  letter-spacing: .09em;
  padding: 14px 18px;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 2;
}

#tlf-portal-app td {
  background: #fff;
  border-top: 0;
  border-bottom: 1px solid #e5ebf1;
  color: #334b63;
  font-size: .82rem;
  line-height: 1.5;
  padding: 16px 18px;
}

#tlf-portal-app tbody tr:last-child td {
  border-bottom: 0;
}

#tlf-portal-app tbody tr:hover td {
  background: #fbfdff;
}

.tlf-company {
  gap: 12px;
  min-width: 235px;
}

.tlf-company > span {
  border-radius: 11px;
  font-size: .72rem;
  height: 42px;
  width: 42px;
}

.tlf-company strong,
.tlf-bank strong,
.tlf-document-row strong,
.tlf-compact-list strong {
  color: var(--tlf-ink);
  font-size: .84rem;
}

.tlf-company small,
.tlf-bank small,
.tlf-note,
.tlf-document-row small,
.tlf-compact-list small {
  color: var(--tlf-muted);
  font-size: .72rem;
}

.tlf-pending {
  font-size: .75rem;
}

.tlf-progress-label span,
.tlf-progress-label small {
  font-size: .7rem;
}

.tlf-progress {
  height: 6px;
}

.tlf-icon-button,
.tlf-row-delete,
.tlf-save-row {
  border-radius: 10px;
  height: 38px;
  width: 38px;
}

.tlf-icon-button:hover,
.tlf-save-row:hover {
  background: #e8f2ff;
  transform: translateY(-1px);
}

.tlf-empty {
  min-height: 220px;
  padding: 38px;
}

.tlf-empty svg {
  height: 34px;
  width: 34px;
}

.tlf-empty strong {
  font-size: 1rem;
}

.tlf-empty p {
  font-size: .84rem;
  max-width: 430px;
}

.tlf-form-panel,
.tlf-requirements,
.tlf-generator,
.tlf-finance-summary,
.tlf-template-card {
  padding: 0 25px 26px;
}

.tlf-form {
  gap: 16px;
}

.tlf-form label,
.tlf-date-control,
.tlf-attendance-row label {
  color: #526b82;
  font-size: .7rem;
  font-weight: 790;
  gap: 8px;
  letter-spacing: .045em;
}

#tlf-portal-app .tlf-form input,
#tlf-portal-app .tlf-form select,
#tlf-portal-app .tlf-form textarea,
#tlf-portal-app .tlf-date-control input,
#tlf-portal-app .tlf-attendance-row input,
#tlf-portal-app .tlf-attendance-row select,
#tlf-portal-app .tlf-document-row select,
.tlf-modal input,
.tlf-modal select,
.tlf-modal textarea {
  background: #fbfcfe;
  border-color: #ccd8e4;
  border-radius: 10px;
  color: var(--tlf-ink);
  font-size: .88rem;
  min-height: 46px;
  padding: 11px 12px;
}

#tlf-portal-app .tlf-form textarea,
.tlf-modal textarea {
  line-height: 1.55;
  min-height: 96px;
  resize: vertical;
}

.tlf-form input:hover,
.tlf-form select:hover,
.tlf-form textarea:hover {
  border-color: #aebfd0;
}

.tlf-form input:focus,
.tlf-form select:focus,
.tlf-form textarea:focus {
  background: #fff;
  border-color: #6ea8f8;
  box-shadow: 0 0 0 4px rgba(10, 98, 232, .09);
}

.tlf-form-grid {
  gap: 14px;
}

.tlf-file {
  background: linear-gradient(145deg, #f8fbff, #f2f7fc);
  border: 1.5px dashed #a9bfd3;
  border-radius: 14px;
  padding: 24px;
  transition: border-color .2s ease, background .2s ease;
}

.tlf-file:hover {
  background: #eef6ff;
  border-color: #6da9f8;
}

.tlf-file strong {
  font-size: .92rem;
}

.tlf-file small {
  font-size: .76rem;
}

.tlf-fixed-provider {
  border-color: #bdd0e2;
  border-radius: 14px;
  box-shadow: inset 4px 0 #0a62e8;
  gap: 15px;
  padding: 17px;
}

.tlf-fixed-provider > span {
  border-radius: 11px;
  height: 48px;
  width: 48px;
}

.tlf-fixed-provider strong {
  font-size: .95rem;
}

.tlf-fixed-provider small,
.tlf-fixed-provider p,
.tlf-fixed-provider button,
.tlf-expiry-wrap > small {
  font-size: .73rem;
}

.tlf-provider-folder-grid {
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.tlf-provider-folder {
  border-radius: var(--tlf-radius);
  box-shadow: var(--tlf-shadow-sm);
  min-height: 104px;
  padding: 20px;
}

.tlf-provider-folder:hover,
.tlf-provider-folder.is-active {
  border-color: #6da9f8;
  box-shadow: var(--tlf-shadow);
}

.tlf-provider-folder strong {
  font-size: .96rem;
}

.tlf-provider-folder small {
  font-size: .74rem;
}

.tlf-requirement {
  gap: 20px;
  grid-template-columns: 110px 1fr;
  padding: 18px 0;
}

.tlf-requirement > strong {
  font-size: .85rem;
}

.tlf-requirement span {
  font-size: .77rem;
}

.tlf-document-row {
  gap: 14px;
  min-height: 82px;
  padding: 14px 22px;
}

.tlf-document-row > a,
.tlf-document-row select {
  font-size: .75rem;
}

.tlf-operation-grid {
  gap: 16px;
}

.tlf-operation-card {
  border-radius: var(--tlf-radius);
  box-shadow: var(--tlf-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

.tlf-operation-card:hover {
  box-shadow: var(--tlf-shadow);
  transform: translateY(-2px);
}

.tlf-operation-card h2 {
  font-size: 1.16rem;
}

.tlf-operation-card > p,
.tlf-operation-card section small,
.tlf-operation-card footer span {
  font-size: .76rem;
}

.tlf-operation-card section strong {
  font-size: .88rem;
}

.tlf-attendance-banner {
  border-radius: var(--tlf-radius);
  min-height: 82px;
  padding: 20px 24px;
}

.tlf-attendance-banner span {
  font-size: .7rem;
}

.tlf-attendance-banner strong {
  font-size: .96rem;
}

.tlf-attendance-banner small {
  font-size: .76rem;
}

.tlf-attendance-row {
  gap: 12px;
  padding: 18px 22px;
}

.tlf-attendance-vehicle strong,
.tlf-row-total strong {
  font-size: .86rem;
}

.tlf-attendance-vehicle small,
.tlf-row-total small {
  font-size: .7rem;
}

.tlf-finance-flow {
  background: #fff;
  border: 1px solid var(--tlf-line);
  border-radius: var(--tlf-radius);
  box-shadow: var(--tlf-shadow-sm);
  margin-bottom: 16px;
  padding: 20px 24px;
}

.tlf-flow-step > span {
  height: 38px;
  width: 38px;
}

.tlf-flow-step strong {
  font-size: .82rem;
}

.tlf-flow-step small {
  font-size: .68rem;
}

.tlf-prefacture-total {
  border-radius: 13px;
  padding: 18px;
}

.tlf-prefacture-total span,
.tlf-prefacture-total small {
  font-size: .72rem;
}

.tlf-prefacture-total strong {
  font-size: 1rem;
}

.tlf-finance-kpi {
  min-height: 58px;
}

.tlf-finance-kpi span {
  font-size: .8rem;
}

.tlf-finance-kpi strong {
  font-size: 1rem;
}

.tlf-document-folio span {
  font-size: .68rem;
}

.tlf-document-folio strong {
  font-size: .82rem;
}

.tlf-table-actions {
  gap: 7px;
  min-width: 280px;
}

#tlf-portal-app .tlf-table-actions button,
#tlf-portal-app .tlf-table-link {
  border-radius: 8px;
  font-size: .7rem;
  min-height: 34px;
  padding: 7px 10px;
}

.tlf-finance-command {
  border-radius: var(--tlf-radius-lg);
  box-shadow: 0 26px 64px rgba(5, 24, 43, .2);
  gap: 0;
  padding: 30px;
}

.tlf-finance-command > article span,
.tlf-opening-balance span {
  font-size: .7rem;
}

.tlf-finance-command > article strong {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.tlf-finance-command > article small {
  font-size: .76rem;
}

.tlf-pulse {
  border-radius: 14px;
  min-height: 76px;
  padding: 16px;
}

.tlf-pulse small {
  font-size: .7rem;
}

.tlf-pulse strong {
  font-size: 1.08rem;
}

.tlf-opening-balance {
  border-radius: var(--tlf-radius);
  box-shadow: var(--tlf-shadow-sm);
  padding: 20px 24px;
}

.tlf-ledger-list article {
  min-height: 82px;
  padding: 17px 22px;
}

.tlf-ledger-list article > div > strong,
.tlf-ledger-list article > strong {
  font-size: .84rem;
}

.tlf-ledger-list p,
.tlf-ledger-list small,
.tlf-ledger-list article > a {
  font-size: .72rem;
}

.tlf-user-row {
  min-height: 84px;
  padding: 16px 22px;
}

.tlf-user-avatar {
  font-size: .76rem;
  height: 42px;
  width: 42px;
}

.tlf-user-identity strong,
.tlf-permission-summary strong,
.tlf-user-access strong {
  font-size: .86rem;
}

.tlf-user-identity small,
.tlf-permission-summary small,
.tlf-user-access small {
  font-size: .72rem;
}

.tlf-security-chip,
.tlf-wp-admin {
  font-size: .68rem;
}

.tlf-governance {
  gap: 14px;
}

.tlf-governance > div {
  border-radius: 14px;
  min-height: 88px;
  padding: 18px;
}

.tlf-governance strong {
  font-size: .84rem;
}

.tlf-governance small {
  font-size: .72rem;
}

.tlf-email-hero {
  border-radius: var(--tlf-radius-lg);
  box-shadow: var(--tlf-shadow);
  padding: 28px;
}

.tlf-email-hero h2 {
  font-size: 1.45rem;
}

.tlf-email-hero p,
.tlf-template-detail,
.tlf-smtp-note p {
  font-size: .82rem;
}

.tlf-email-hero aside strong,
.tlf-smtp-note strong {
  font-size: .84rem;
}

.tlf-email-hero code {
  font-size: .68rem;
}

.tlf-modal-backdrop {
  backdrop-filter: blur(8px);
  background: rgba(4, 16, 29, .64);
  padding: 24px;
}

.tlf-modal {
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: var(--tlf-radius-lg);
  box-shadow: var(--tlf-shadow-lg);
  max-height: calc(100vh - 48px);
  max-width: 780px;
  overflow-y: auto;
  padding: 28px;
}

.tlf-modal > header {
  margin-bottom: 22px;
  padding-bottom: 19px;
}

.tlf-modal > header h2 {
  font-size: 1.5rem;
  font-weight: 750;
}

.tlf-form-section {
  border-radius: 14px;
  padding: 18px;
}

.tlf-toast {
  border-radius: 13px;
  box-shadow: var(--tlf-shadow-lg);
  font-size: .84rem;
  gap: 11px;
  max-width: 420px;
  min-height: 54px;
  padding: 14px 18px;
}

.tlf-small {
  font-size: .72rem !important;
  min-height: 34px !important;
}

/* Acceso privado */

.tlf-auth {
  background: #f4f7fb;
  min-height: 100vh;
}

.tlf-auth-story {
  background:
    radial-gradient(circle at 15% 14%, rgba(66, 151, 255, .25), transparent 25rem),
    radial-gradient(circle at 100% 100%, rgba(23, 132, 84, .14), transparent 28rem),
    linear-gradient(145deg, #06182b, #092947 68%, #071a2d);
  min-height: 100vh;
  padding: clamp(38px, 5vw, 74px);
}

.tlf-auth-brand {
  gap: 16px;
}

.tlf-auth-brand img {
  border-radius: 12px;
  height: 60px;
  padding: 7px 10px;
  width: 118px;
}

.tlf-auth-brand strong {
  font-size: 1.05rem;
}

.tlf-auth-brand small {
  font-size: .72rem;
}

.tlf-auth-story > div {
  max-width: 720px;
}

.tlf-auth-story > div > p {
  color: #69a8ff;
  font-size: .72rem;
  font-weight: 820;
  letter-spacing: .15em;
}

.tlf-auth-story h1 {
  font-size: clamp(2.65rem, 5.2vw, 5.2rem);
  font-weight: 690;
  letter-spacing: -.055em;
  line-height: 1.02;
}

.tlf-auth-story > div > span {
  color: rgba(255, 255, 255, .66);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 620px;
}

.tlf-auth-story > small {
  font-size: .72rem;
}

.tlf-auth-panel {
  padding: clamp(26px, 5vw, 72px);
}

.tlf-auth-card {
  border: 1px solid #dde6ee;
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(5, 27, 49, .13);
  max-width: 500px;
  padding: clamp(30px, 5vw, 52px);
}

.tlf-eyebrow {
  font-size: .68rem;
}

.tlf-auth-card h2 {
  font-size: clamp(2rem, 3vw, 2.65rem);
  font-weight: 750;
  letter-spacing: -.045em;
}

.tlf-auth-card > p {
  font-size: .94rem;
  line-height: 1.65;
}

.tlf-auth-card label {
  font-size: .75rem;
  font-weight: 740;
}

.tlf-auth-card input[type="text"],
.tlf-auth-card input[type="password"] {
  border-radius: 11px;
  font-size: .94rem;
  min-height: 50px;
  padding: 12px 14px;
}

.tlf-auth-card input[type="submit"],
.tlf-auth-button {
  border-radius: 11px;
  font-size: .88rem;
  min-height: 50px;
}

.tlf-auth-help a,
.tlf-back-home {
  font-size: .78rem;
}

.tlf-auth-help small {
  font-size: .7rem;
}

@media (max-width: 1500px) {
  :root {
    --tlf-sidebar: 268px;
  }

  .tlf-content {
    padding-left: 30px;
    padding-right: 30px;
  }

  .tlf-topbar {
    padding-left: 28px;
    padding-right: 28px;
  }

  .tlf-attendance-row.tlf-attendance-row-v3 {
    grid-template-columns: repeat(4, minmax(155px, 1fr));
  }

  .tlf-attendance-row-v3 .tlf-attendance-vehicle,
  .tlf-attendance-row-v3 .tlf-route-field {
    grid-column: span 2;
  }
}

@media (max-width: 1180px) {
  .tlf-topbar-context {
    display: none;
  }

  .tlf-search {
    width: min(44vw, 440px);
  }

  .tlf-metrics,
  .tlf-user-metrics,
  .tlf-cash-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tlf-operation-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tlf-doc-layout,
  .tlf-finance-layout,
  .tlf-template-grid {
    grid-template-columns: 1fr;
  }

  .tlf-finance-flow {
    overflow-x: auto;
  }

  .tlf-finance-flow > * {
    flex: 0 0 auto;
  }
}

@media (max-width: 860px) {
  :root {
    --tlf-sidebar: 290px;
  }

  .tlf-sidebar {
    box-shadow: 24px 0 60px rgba(2, 13, 25, .28);
  }

  .tlf-workspace {
    margin-left: 0;
  }

  .tlf-topbar {
    gap: 12px;
    height: 74px;
    padding: 0 18px;
  }

  .tlf-menu-button {
    align-items: center;
    background: #eef4fb;
    border: 1px solid #d7e2ed;
    border-radius: 10px;
    color: #244765;
    display: flex;
    flex: 0 0 auto;
    height: 42px;
    justify-content: center;
    width: 42px;
  }

  .tlf-menu-button svg {
    fill: none;
    height: 21px;
    stroke: currentColor;
    stroke-width: 1.8;
    width: 21px;
  }

  .tlf-search {
    flex: 1;
    margin-right: 0;
    width: auto;
  }

  .tlf-user {
    border-left: 0;
    padding-left: 0;
  }

  .tlf-user > div,
  .tlf-user a {
    display: none !important;
  }

  .tlf-content {
    padding: 32px 18px 74px;
  }

  .tlf-page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .tlf-page-head h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .tlf-head-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .tlf-head-actions > * {
    flex: 1 1 180px;
  }

  .tlf-overview-grid,
  .tlf-financial-ledgers,
  .tlf-resource-grid,
  .tlf-operation-grid {
    grid-template-columns: 1fr;
  }

  .tlf-finance-command {
    padding: 24px;
  }

  .tlf-document-row,
  .tlf-ledger-list article,
  .tlf-attendance-row.tlf-attendance-row-v3 {
    grid-template-columns: 1fr;
  }

  .tlf-attendance-row-v3 .tlf-attendance-vehicle,
  .tlf-attendance-row-v3 .tlf-route-field {
    grid-column: auto;
  }

  .tlf-document-row > .tlf-doc-icon {
    margin-bottom: 4px;
  }

  .tlf-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .tlf-modal {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 92vh;
    max-width: none;
    padding: 24px 20px;
    width: 100%;
  }

  .tlf-auth {
    grid-template-columns: 1fr;
  }

  .tlf-auth-story {
    display: none;
  }

  .tlf-auth-panel {
    min-height: 100vh;
    padding: 20px;
  }
}

@media (max-width: 560px) {
  #tlf-portal-app {
    font-size: 15px;
  }

  .tlf-topbar {
    padding: 0 12px;
  }

  .tlf-search input::placeholder {
    color: transparent;
  }

  .tlf-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .tlf-metrics,
  .tlf-user-metrics,
  .tlf-cash-grid {
    grid-template-columns: 1fr;
  }

  .tlf-metric {
    min-height: 150px;
  }

  .tlf-panel-head {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
  }

  .tlf-panel-head > button,
  .tlf-panel-head > .tlf-security-chip {
    align-self: stretch;
  }

  .tlf-form-panel,
  .tlf-requirements,
  .tlf-generator,
  .tlf-finance-summary,
  .tlf-template-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .tlf-form-grid,
  .tlf-form-grid-3,
  .tlf-requirement > div {
    grid-template-columns: 1fr;
  }

  .tlf-summary-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tlf-finance-command > div {
    grid-template-columns: 1fr;
  }

  .tlf-auth-card {
    border-radius: 20px;
    padding: 30px 22px;
  }
}

/* ==========================================================================
   HSLOG Broker Control 7.0 · venta cliente, costo proveedor y margen diario
   ========================================================================== */

.tlf-service-stack {
  display: grid;
  gap: 6px;
  min-width: 174px;
}

.tlf-service-chip {
  align-items: center;
  border: 1px solid;
  border-radius: 10px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 6px 8px;
}

.tlf-service-chip strong {
  font-size: .76rem;
  letter-spacing: .035em;
}

.tlf-service-chip small {
  font-size: .7rem;
  font-weight: 750;
  white-space: nowrap;
}

.tlf-service-chip.is-tlf {
  background: #eaf3ff;
  border-color: #b9d5ff;
  color: #0756b6;
}

.tlf-service-chip.is-provider {
  background: #eefaf3;
  border-color: #bce5ca;
  color: #17643b;
}

.tlf-provider-service-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tlf-sale-value {
  color: #0756b6;
}

.tlf-client-rate-table {
  border-top: 4px solid #0b6bff;
}

.tlf-attendance-row-v3 .tlf-client-rate-field {
  grid-column: span 4;
}

.tlf-attendance-row-v3 .tlf-manual-sale,
.tlf-attendance-row-v3 .tlf-manual-provider {
  grid-column: span 2;
}

.tlf-attendance-row-v3 .tlf-client-rate-field select {
  background-color: #f1f7ff;
  border-color: #9dc8ff;
}

.tlf-attendance-row-v3 .tlf-row-margin {
  align-items: flex-start;
  background: #eaf8f0;
  border: 1px solid #b7dfc7;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  justify-content: center;
  min-height: 54px;
  padding: 7px 11px;
}

.tlf-attendance-row-v3 .tlf-row-margin small {
  color: #33704f;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tlf-attendance-row-v3 .tlf-row-margin strong {
  color: #17643b;
  font-size: .98rem;
}

.tlf-attendance-row-v3 .tlf-row-margin.is-negative {
  background: #fff0f0;
  border-color: #f2b9b9;
}

.tlf-attendance-row-v3 .tlf-row-margin.is-negative small,
.tlf-attendance-row-v3 .tlf-row-margin.is-negative strong {
  color: #aa2828;
}

.tlf-readonly-finance {
  display: flex;
  flex-direction: column;
  min-width: 130px;
}

.tlf-readonly-finance small {
  color: var(--tlf-muted);
  font-size: .72rem;
}

.tlf-readonly-finance strong {
  color: var(--tlf-ink);
  font-size: .88rem;
}

.tlf-readonly-finance.is-margin strong {
  color: #17643b;
}

.tlf-period-control {
  align-items: center;
  background: #fff;
  border: 1px solid var(--tlf-line);
  border-radius: 12px;
  display: flex;
  gap: 10px;
  padding: 7px 11px;
}

.tlf-period-control span {
  color: var(--tlf-muted);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tlf-period-control input {
  border: 0;
  color: var(--tlf-ink);
  font-weight: 800;
  min-height: 34px;
  padding: 0;
}

.tlf-margin-ledger {
  margin-bottom: 22px;
}

.tlf-margin-ledger table {
  min-width: 920px;
}

.tlf-margin-value,
.tlf-margin-percent {
  border-radius: 8px;
  display: inline-flex;
  font-weight: 850;
  padding: 6px 9px;
  white-space: nowrap;
}

.tlf-margin-value.is-positive,
.tlf-margin-percent.is-positive {
  background: #eaf8f0;
  color: #17643b;
}

.tlf-margin-value.is-negative,
.tlf-margin-percent.is-negative {
  background: #fff0f0;
  color: #aa2828;
}

.tlf-margin-value.is-zero,
.tlf-margin-percent.is-zero {
  background: #f1f4f7;
  color: #60758a;
}

@media (max-width: 1500px) {
  .tlf-attendance-row-v3 .tlf-client-rate-field,
  .tlf-attendance-row-v3 .tlf-rate-card-field {
    grid-column: span 2;
  }

  .tlf-attendance-row-v3 .tlf-manual-sale,
  .tlf-attendance-row-v3 .tlf-manual-provider,
  .tlf-attendance-row-v3 .tlf-row-margin {
    grid-column: span 1;
  }
}

@media (max-width: 860px) {
  .tlf-provider-service-grid {
    grid-template-columns: 1fr;
  }

  .tlf-attendance-row-v3 .tlf-client-rate-field,
  .tlf-attendance-row-v3 .tlf-manual-sale,
  .tlf-attendance-row-v3 .tlf-manual-provider,
  .tlf-attendance-row-v3 .tlf-row-margin {
    grid-column: 1;
  }

  .tlf-period-control {
    justify-content: space-between;
    width: 100%;
  }
}

/* Portal HSLOG 6.0 · tarifarios diarios y contratos indefinidos */
.tlf-rate-table .tlf-panel-head {
  align-items: end;
}

.tlf-rate-table .tlf-panel-head > small {
  color: var(--tlf-muted);
  font-size: .82rem;
}

.tlf-rate-table td {
  vertical-align: middle;
}

.tlf-attendance-row.tlf-attendance-row-v3 {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  padding: 22px;
}

.tlf-attendance-row-v3 .tlf-attendance-vehicle {
  grid-column: span 3;
}

.tlf-attendance-row-v3 .tlf-attendance-status {
  grid-column: span 2;
}

.tlf-attendance-row-v3 .tlf-rate-card-field {
  grid-column: span 4;
}

.tlf-attendance-row-v3 .tlf-route-field {
  grid-column: span 3;
}

.tlf-attendance-row-v3 .tlf-manual-rate {
  grid-column: span 2;
}

.tlf-attendance-row-v3 .tlf-deduction,
.tlf-attendance-row-v3 .tlf-adjustment {
  grid-column: span 1;
}

.tlf-attendance-row-v3 .tlf-reason {
  grid-column: span 2;
}

.tlf-attendance-row-v3 .tlf-row-total {
  grid-column: span 2;
}

.tlf-attendance-row-v3 .tlf-save-row,
.tlf-attendance-row-v3 .tlf-row-delete {
  grid-column: span 1;
  justify-self: stretch;
  width: 100%;
}

.tlf-attendance-row-v3 label.is-catalog-value input {
  background: #eef6ff;
  border-color: #b9d5ff;
  color: #064ea8;
  font-weight: 800;
}

.tlf-attendance-row-v3 .tlf-rate-card-field select {
  background-color: #f6faff;
  border-color: #b9d5ff;
}

@media (max-width: 1500px) {
  .tlf-attendance-row.tlf-attendance-row-v3 {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .tlf-attendance-row-v3 .tlf-attendance-vehicle,
  .tlf-attendance-row-v3 .tlf-rate-card-field,
  .tlf-attendance-row-v3 .tlf-route-field {
    grid-column: span 2;
  }

  .tlf-attendance-row-v3 .tlf-attendance-status,
  .tlf-attendance-row-v3 .tlf-manual-rate,
  .tlf-attendance-row-v3 .tlf-deduction,
  .tlf-attendance-row-v3 .tlf-adjustment,
  .tlf-attendance-row-v3 .tlf-reason,
  .tlf-attendance-row-v3 .tlf-row-total,
  .tlf-attendance-row-v3 .tlf-save-row,
  .tlf-attendance-row-v3 .tlf-row-delete {
    grid-column: span 1;
  }
}

@media (max-width: 860px) {
  .tlf-rate-table .tlf-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tlf-attendance-row.tlf-attendance-row-v3 {
    grid-template-columns: 1fr;
  }

  .tlf-attendance-row-v3 .tlf-attendance-vehicle,
  .tlf-attendance-row-v3 .tlf-attendance-status,
  .tlf-attendance-row-v3 .tlf-rate-card-field,
  .tlf-attendance-row-v3 .tlf-route-field,
  .tlf-attendance-row-v3 .tlf-manual-rate,
  .tlf-attendance-row-v3 .tlf-deduction,
  .tlf-attendance-row-v3 .tlf-adjustment,
  .tlf-attendance-row-v3 .tlf-reason,
  .tlf-attendance-row-v3 .tlf-row-total,
  .tlf-attendance-row-v3 .tlf-save-row,
  .tlf-attendance-row-v3 .tlf-row-delete {
    grid-column: 1;
  }
}

/* ==========================================================================
   HSLOG Control 5.2 · legibilidad consistente y visor documental
   ========================================================================== */

#tlf-portal-app button,
#tlf-portal-app a,
#tlf-portal-app input,
#tlf-portal-app select,
#tlf-portal-app textarea,
#tlf-portal-app table {
  font-size: .9375rem;
}

#tlf-portal-app small {
  font-size: .8125rem;
  line-height: 1.5;
}

.tlf-brand strong {
  font-size: 1rem;
}

.tlf-brand small {
  font-size: .75rem;
}

.tlf-nav-label {
  font-size: .72rem;
}

#tlf-portal-app .tlf-sidebar nav button,
#tlf-portal-app .tlf-home-link {
  font-size: .94rem;
  min-height: 50px;
}

.tlf-system strong {
  font-size: .82rem;
}

.tlf-system small {
  font-size: .7rem;
}

.tlf-topbar-context small {
  font-size: .72rem !important;
}

.tlf-topbar-context strong {
  font-size: 1.05rem;
}

#tlf-portal-app .tlf-search input {
  font-size: .94rem;
}

.tlf-user strong {
  font-size: .94rem;
}

.tlf-user small {
  font-size: .8rem !important;
}

#tlf-portal-app .tlf-user a {
  font-size: .8rem;
}

.tlf-page-head > div:first-child > span,
.tlf-panel-head span,
.tlf-modal > header span {
  font-size: .74rem;
}

.tlf-page-head p {
  font-size: 1.05rem;
}

#tlf-portal-app .tlf-primary,
#tlf-portal-app .tlf-secondary,
#tlf-portal-app .tlf-head-actions button,
#tlf-portal-app .tlf-panel-head button,
#tlf-portal-app .tlf-table-actions button {
  font-size: .9rem;
  min-height: 46px;
}

.tlf-metric > span {
  font-size: .875rem;
}

.tlf-metric > small {
  font-size: .8rem;
}

.tlf-panel-head h2 {
  font-size: 1.28rem;
}

.tlf-alert strong,
.tlf-live-row strong {
  font-size: .95rem;
}

.tlf-alert p,
.tlf-live-row small {
  font-size: .82rem;
}

.tlf-status {
  font-size: .78rem;
  padding: 7px 11px;
}

.tlf-panel-head > b:not(.tlf-live-dot),
.tlf-attendance-banner b,
.tlf-email-recipient b {
  font-size: .78rem;
}

.tlf-access-panel span,
.tlf-email-hero section > span,
.tlf-email-hero code {
  font-size: .75rem;
}

#tlf-portal-app th {
  font-size: .78rem;
  padding: 15px 18px;
}

#tlf-portal-app td {
  font-size: .9rem;
  padding: 17px 18px;
}

.tlf-company strong,
.tlf-bank strong,
.tlf-document-row strong,
.tlf-compact-list strong {
  font-size: .94rem;
}

.tlf-company small,
.tlf-bank small,
.tlf-note,
.tlf-document-row small,
.tlf-compact-list small {
  font-size: .8rem;
}

.tlf-pending,
.tlf-progress-label span,
.tlf-progress-label small {
  font-size: .8rem;
}

.tlf-form label,
.tlf-date-control,
.tlf-attendance-row label {
  font-size: .8rem;
}

#tlf-portal-app .tlf-form input,
#tlf-portal-app .tlf-form select,
#tlf-portal-app .tlf-form textarea,
#tlf-portal-app .tlf-date-control input,
#tlf-portal-app .tlf-attendance-row input,
#tlf-portal-app .tlf-attendance-row select,
#tlf-portal-app .tlf-document-row select,
.tlf-modal input,
.tlf-modal select,
.tlf-modal textarea {
  font-size: .95rem;
  min-height: 48px;
}

.tlf-file strong,
.tlf-fixed-provider strong,
.tlf-provider-folder strong {
  font-size: 1rem;
}

.tlf-file small,
.tlf-fixed-provider small,
.tlf-fixed-provider p,
.tlf-fixed-provider button,
.tlf-expiry-wrap > small,
.tlf-provider-folder small {
  font-size: .8rem;
}

.tlf-requirement > strong,
.tlf-requirement span {
  font-size: .86rem;
}

.tlf-document-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 22px;
}

.tlf-document-row > div {
  flex: 1 1 300px;
  min-width: 0;
}

.tlf-document-row > .tlf-doc-icon {
  flex: 0 0 42px;
}

.tlf-operation-card > p,
.tlf-operation-card section small,
.tlf-operation-card footer span,
.tlf-attendance-banner small,
.tlf-attendance-vehicle small,
.tlf-row-total small,
.tlf-flow-step small,
.tlf-prefacture-total span,
.tlf-prefacture-total small,
.tlf-document-folio span,
.tlf-finance-command > article small,
.tlf-pulse small,
.tlf-ledger-list p,
.tlf-ledger-list small,
.tlf-user-identity small,
.tlf-permission-summary small,
.tlf-user-access small,
.tlf-governance small {
  font-size: .8rem;
}

.tlf-operation-card section strong,
.tlf-attendance-vehicle strong,
.tlf-row-total strong,
.tlf-flow-step > span,
.tlf-flow-step strong,
.tlf-finance-kpi span,
.tlf-document-folio strong,
.tlf-ledger-list article > div > strong,
.tlf-ledger-list article > strong,
.tlf-user-identity strong,
.tlf-permission-summary strong,
.tlf-user-access strong,
.tlf-governance strong {
  font-size: .92rem;
}

.tlf-small {
  font-size: .8rem !important;
  min-height: 38px !important;
}

.tlf-preview-trigger {
  align-items: center;
  background: #f4f8fd;
  border: 1px solid #cbd9e7;
  border-radius: 10px;
  color: #174b7d;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 750;
  gap: 7px;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.tlf-preview-trigger:hover {
  background: #e8f2ff;
  border-color: #82afe9;
  color: #064fa9;
  transform: translateY(-1px);
}

.tlf-preview-trigger svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

#tlf-portal-app .tlf-table-actions .tlf-preview-trigger,
#tlf-portal-app .tlf-table-link.tlf-preview-trigger {
  background: #071a2d;
  border-color: #071a2d;
  color: #fff !important;
  font-size: .8rem;
  min-height: 38px;
}

.tlf-bank .tlf-preview-trigger,
.tlf-ledger-list .tlf-preview-trigger {
  font-size: .8rem;
  min-height: 36px;
}

.tlf-modal.is-preview {
  display: flex;
  flex-direction: column;
  height: min(900px, calc(100vh - 48px));
  max-width: min(1180px, calc(100vw - 48px));
  overflow: hidden;
  width: 100%;
}

.tlf-modal.is-preview > header {
  flex: 0 0 auto;
}

.tlf-preview-shell {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.tlf-preview-loading,
.tlf-preview-error {
  align-items: center;
  color: var(--tlf-muted);
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  min-height: 420px;
  padding: 36px;
  text-align: center;
}

.tlf-preview-loading .tlf-loader {
  border-color: rgba(10, 98, 232, .17);
  border-top-color: var(--tlf-blue);
}

.tlf-preview-loading strong,
.tlf-preview-error strong {
  color: var(--tlf-ink);
  font-size: 1.1rem;
}

.tlf-preview-error svg {
  fill: none;
  height: 44px;
  stroke: #7b90a5;
  stroke-width: 1.5;
  width: 44px;
}

.tlf-preview-error p {
  max-width: 600px;
}

.tlf-preview-toolbar {
  align-items: center;
  background: #f6f9fc;
  border: 1px solid var(--tlf-line);
  border-radius: 13px;
  display: flex;
  flex: 0 0 auto;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 13px 15px;
}

.tlf-preview-toolbar > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tlf-preview-toolbar span {
  color: var(--tlf-blue);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .1em;
}

.tlf-preview-toolbar strong {
  color: var(--tlf-ink);
  font-size: .95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tlf-preview-toolbar small {
  color: var(--tlf-muted);
}

.tlf-preview-toolbar .tlf-primary {
  flex: 0 0 auto;
  text-decoration: none;
}

.tlf-preview-toolbar svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.tlf-preview-stage {
  align-items: center;
  background:
    linear-gradient(45deg, rgba(5, 31, 55, .035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(5, 31, 55, .035) 25%, transparent 25%),
    #eaf0f6;
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
  border: 1px solid #cbd8e4;
  border-radius: 14px;
  display: flex;
  flex: 1;
  justify-content: center;
  min-height: 0;
  overflow: auto;
}

.tlf-preview-stage iframe {
  background: #fff;
  border: 0;
  height: 100%;
  min-height: 600px;
  width: 100%;
}

.tlf-preview-stage img {
  background: #fff;
  box-shadow: 0 14px 42px rgba(5, 31, 55, .18);
  display: block;
  height: auto;
  margin: 28px;
  max-height: calc(100% - 56px);
  max-width: calc(100% - 56px);
  object-fit: contain;
}

.tlf-preview-help {
  color: var(--tlf-muted);
  flex: 0 0 auto;
  font-size: .78rem;
  margin: 9px 2px 0;
}

.tlf-document-preview .tlf-preview-trigger {
  margin-top: 10px;
}

@media (max-width: 860px) {
  #tlf-portal-app button,
  #tlf-portal-app a,
  #tlf-portal-app input,
  #tlf-portal-app select,
  #tlf-portal-app textarea,
  #tlf-portal-app table {
    font-size: .9375rem;
  }

  .tlf-modal.is-preview {
    height: 94vh;
    max-height: 94vh;
    max-width: none;
  }

  .tlf-preview-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tlf-preview-toolbar .tlf-primary {
    width: 100%;
  }

  .tlf-preview-stage iframe {
    min-height: 62vh;
  }

  .tlf-document-row {
    align-items: stretch;
  }

  .tlf-document-row > div {
    flex-basis: calc(100% - 58px);
  }

  .tlf-document-row > .tlf-preview-trigger,
  .tlf-document-row > .tlf-status,
  .tlf-document-row > .tlf-secondary {
    flex: 1 1 150px;
  }
}

@media (max-width: 560px) {
  .tlf-content {
    padding-top: 28px;
  }

  .tlf-page-head p {
    font-size: 1rem;
  }

  .tlf-preview-stage img {
    margin: 12px;
    max-height: calc(100% - 24px);
    max-width: calc(100% - 24px);
  }
}

/* ==========================================================================
   HSLOG Broker Control 8.0 · tarifa comercial vinculada
   ========================================================================== */

.tlf-unified-rate-table {
  border-top: 4px solid #0b6bff;
}

.tlf-unified-rate-table table {
  min-width: 1380px;
}

.tlf-unified-rate-table .tlf-cost-value {
  color: #172e45;
}

.tlf-unified-rate-table .tlf-margin-value {
  display: inline-flex;
  font-size: .9rem;
  justify-content: center;
  min-width: 118px;
}

.tlf-rate-value-grid {
  align-items: stretch;
}

.tlf-rate-value-grid label {
  background: #f7faff;
  border: 1px solid #d9e7f7;
  border-radius: 14px;
  padding: 14px;
}

.tlf-rate-value-grid label:first-child {
  background: #f0f7ff;
  border-color: #b9d7ff;
}

.tlf-rate-value-grid label:last-child {
  background: #f8fafc;
}

.tlf-rate-value-grid input {
  font-size: 1.05rem !important;
  font-weight: 800;
}

.tlf-rate-margin-preview {
  background: linear-gradient(135deg, #071d33, #0a3154);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(5, 31, 55, .16);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.tlf-rate-margin-preview > div {
  background: rgba(255, 255, 255, .04);
  display: flex;
  flex-direction: column;
  min-height: 92px;
  padding: 17px 18px;
}

.tlf-rate-margin-preview small {
  color: #9bb6ce;
  font-size: .69rem;
  font-weight: 850;
  letter-spacing: .08em;
}

.tlf-rate-margin-preview strong {
  color: #fff;
  font-size: 1.25rem;
  margin-top: 8px;
}

.tlf-rate-margin-preview span {
  color: #9ee2b8;
  font-size: .72rem;
  margin-top: 4px;
}

.tlf-rate-margin-preview .is-margin {
  background: rgba(35, 173, 94, .16);
}

.tlf-rate-margin-preview.is-negative .is-margin {
  background: rgba(215, 69, 69, .2);
}

.tlf-rate-margin-preview.is-negative .is-margin strong,
.tlf-rate-margin-preview.is-negative .is-margin span {
  color: #ffb9b9;
}

.tlf-rate-margin-preview.is-zero .is-margin {
  background: rgba(222, 165, 39, .18);
}

.tlf-rate-margin-preview.is-zero .is-margin span {
  color: #ffdc8f;
}

.tlf-attendance-row-v3 .tlf-rate-card-field select {
  background-color: #eef6ff;
  border-color: #8ebfff;
  font-weight: 750;
}

.tlf-attendance-row-v3 .tlf-manual-sale,
.tlf-attendance-row-v3 .tlf-manual-provider {
  grid-column: span 2;
}

@media (max-width: 860px) {
  .tlf-rate-margin-preview {
    grid-template-columns: 1fr;
  }

  .tlf-rate-margin-preview > div {
    min-height: 78px;
  }

  .tlf-attendance-row-v3 .tlf-manual-sale,
  .tlf-attendance-row-v3 .tlf-manual-provider {
    grid-column: 1;
  }
}
