:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#e5e7eb;
  --primary:#17519B;
  --primary2:#0f3a73;
  --shadow: 0 6px 18px rgba(16,24,40,.08);
}

.tf-body{
  background:var(--bg);
  color:var(--text);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 10pt;
  margin:0;
}

/* Topbar */
.tf-topbar{
  height:56px;
  background: linear-gradient(90deg, var(--primary2), var(--primary));
  color:#fff;
  box-shadow: var(--shadow);
  position: sticky;
  top:0;
  z-index: 1000;
}

.tf-icon-btn{
  width:36px; height:36px;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid rgba(255,255,255,.3);
}

.tf-brand-title{ font-weight:700; line-height:1.1; }
.tf-brand-sub{ font-size:9pt; opacity:.9; }
.tf-user-name{ font-weight:600; line-height:1.1; }
.tf-user-group{ font-size:9pt; opacity:.9; }

/* Layout */
.tf-shell{
  display:flex;
  height: calc(100vh - 56px); /* topbar fijo */
  overflow: hidden;           /* evita scroll del body */
}

.tf-sidebar{
  width:260px;
  background:#fff;
  border-right:1px solid var(--border);
  padding:14px 12px;
  transition: width .2s ease;
  height: calc(100vh - 56px);
  overflow-y: auto;           /* sidebar con scroll si crece */
}

.tf-sidebar.collapsed{
  width:72px;
}

.tf-sidebar-section{
  margin-bottom:14px;
}

.tf-sidebar-title{
  font-size:9pt;
  color:var(--muted);
  margin:10px 10px 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tf-nav-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:10px;
  color:var(--text);
  text-decoration:none;
  border:1px solid transparent;
}

.tf-nav-link:hover{
  background:#f3f6ff;
  border-color:#dbe5ff;
}

.tf-ico{
  width:22px;
  text-align:center;
  font-size:14px;
}

.tf-sidebar.collapsed .tf-sidebar-title{
  display:none;
}

.tf-sidebar.collapsed .tf-nav-link{
  justify-content:center;
}

.tf-sidebar.collapsed .tf-nav-link span:not(.tf-ico){
  display:none;
}

.tf-sidebar-footer{
  margin-top:auto;
  padding:10px;
  border-top:1px dashed var(--border);
}

/* Main */
.tf-main{
  flex:1;
  padding:8px 10px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.tf-container{
  width:99%;
  max-width:none;
  margin:0;
}

.tf-breadcrumb{
  padding:10px 12px;
  background: var(--card);
  border:1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Scroll interno de tablas (para listas largas sin bajar toda la pantalla) */
.tf-table-scroll{
  max-height: 60vh;
  overflow: auto;
}

/* Mejoras visuales generales */
.table thead th{
  font-weight: 700;
  color: #111827;
}

.card{
  box-shadow: var(--shadow);
}
