:root {
  --ink: #172033;
  --ink-soft: #445168;
  --muted: #6b778c;
  --body: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #dce4ef;
  --line-strong: #c6d2e1;
  --primary: #2463eb;
  --primary-dark: #1648bd;
  --primary-soft: #e9f0ff;
  --teal: #0f9f8f;
  --teal-soft: #e3f8f5;
  --amber: #f59e0b;
  --amber-soft: #fff4d8;
  --rose: #e11d48;
  --rose-soft: #ffe7ed;
  --green: #16a34a;
  --green-soft: #e7f8ee;
  --violet: #7c3aed;
  --shadow: 0 18px 45px rgba(21, 35, 62, .08);
  --shadow-soft: 0 10px 24px rgba(21, 35, 62, .06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
}

* {
  scrollbar-color: #9fb1c8 transparent;
  scrollbar-width: thin;
}

body {
  background:
    radial-gradient(circle at 18% 0%, rgba(36, 99, 235, .10), transparent 26rem),
    radial-gradient(circle at 88% 8%, rgba(15, 159, 143, .10), transparent 24rem),
    var(--body);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.48;
  min-width: 320px;
  overflow-x: hidden;
}

strong,
b {
  font-weight: 600;
}

.text-value {
  font-weight: 500;
}

img,
svg,
canvas,
video {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1140px, calc(100% - 32px));
  margin-inline: auto;
}

.min-vh-100 {
  min-height: 100vh;
}

.d-flex {
  display: flex !important;
}

.d-inline,
.d-inline-block,
.d-inline-flex {
  display: inline-flex !important;
}

.d-inline-flex {
  align-items: center;
}

.align-items-center {
  align-items: center !important;
}

.align-items-start {
  align-items: flex-start !important;
}

.align-items-end {
  align-items: flex-end !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.justify-content-end {
  justify-content: flex-end !important;
}

.text-center {
  text-align: center !important;
}

.text-end {
  text-align: right !important;
}

.text-muted {
  color: var(--muted) !important;
}

.small {
  font-size: .84rem !important;
}

.h6 {
  font-size: .94rem !important;
  font-weight: 600;
}

.w-100 {
  width: 100% !important;
}

.h-100 {
  height: 100% !important;
}

.flex-grow-1 {
  flex-grow: 1 !important;
}

.gap-2 {
  gap: .5rem !important;
}

.gap-3 {
  gap: 1rem !important;
}

.vstack {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -.5rem;
}

.row > * {
  width: 100%;
  max-width: 100%;
  padding-inline: .5rem;
}

.g-2 {
  row-gap: .5rem;
}

.g-3 {
  row-gap: 1rem;
}

.col-12 {
  flex: 0 0 auto;
  width: 100%;
}

@media (min-width: 576px) {
  .col-sm-6 {
    flex: 0 0 auto;
    width: 50%;
  }
}

@media (min-width: 768px) {
  .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-md-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-7 { flex: 0 0 auto; width: 58.333333%; }
}

@media (min-width: 1200px) {
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
  .col-xl-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-xl-6 { flex: 0 0 auto; width: 50%; }
  .col-xl-8 { flex: 0 0 auto; width: 66.666667%; }
}

.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-1 { margin-top: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.ms-0 { margin-left: 0 !important; }
.p-2 { padding: .5rem !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

.border {
  border: 1px solid var(--line) !important;
}

.rounded {
  border-radius: 8px !important;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

a,
button,
.btn,
.nav-link,
.card,
.panel,
.metric-card,
.kanban-card,
.calendar-event {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  width: 100%;
  max-width: 100vw;
}

.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #101a2e 0%, #17243d 48%, #132b3b 100%);
  color: #fff;
  padding: 18px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 8px 0 30px rgba(15, 23, 42, .12);
  transition: width .22s ease, padding .22s ease, transform .22s ease, opacity .22s ease;
  z-index: 30;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 18px;
  padding: 8px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  white-space: nowrap;
}

.brand:hover {
  color: #fff;
}

.brand-mark,
.login-brand i {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  box-shadow: 0 12px 30px rgba(36, 99, 235, .28);
}

.nav-section {
  color: #a9bad4;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0;
  margin: 18px 9px 8px;
  font-weight: 600;
}

.main-sidebar-menu {
  display: grid;
  gap: 7px;
  flex: 1 1 auto;
}

.nav-group {
  background: transparent;
  border: 0;
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
}

.nav-group summary {
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-home {
  min-height: 42px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .10);
}

.sidebar .nav-link {
  color: #dbe5f4;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 10px 11px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.sidebar .nav-link i,
.nav-icon-wrap {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: #bcd0ed;
  background: rgba(255, 255, 255, .06);
}

.nav-icon-wrap {
  flex: 0 0 24px;
}

.nav-icon-wrap i {
  background: transparent;
  color: currentColor;
  height: auto;
  width: auto;
}

.nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-group-toggle {
  cursor: pointer;
  font-weight: 600;
}

.nav-group-toggle .right {
  background: transparent;
  color: #91a9c6;
  font-size: .78rem;
  height: auto;
  margin-left: auto;
  transition: transform .18s ease;
  width: auto;
}

.nav-group[open] .nav-group-toggle .right {
  transform: rotate(-90deg);
}

.nav-treeview {
  border-left: 1px solid rgba(255, 255, 255, .12);
  display: none;
  gap: 3px;
  margin: 3px 0 8px 21px;
  padding: 0 0 4px 8px;
}

.nav-group[open] > .nav-treeview {
  display: grid;
}

.nav-treeview .nav-link {
  color: #bed0e8;
  font-size: 14px;
  min-height: 36px;
  padding: 7px 9px;
}

.nav-treeview .nav-link i {
  font-size: .82rem;
  height: 22px;
  width: 22px;
}

.sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .10);
  transform: translateX(2px);
}

.sidebar .nav-link:hover i,
.sidebar .nav-link.active i,
.sidebar .nav-link:hover .nav-icon-wrap,
.sidebar .nav-link.active .nav-icon-wrap {
  color: #fff;
  background: rgba(255, 255, 255, .18);
}

.sidebar .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(36, 99, 235, .95), rgba(15, 159, 143, .88));
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .18);
}

.sidebar .nav-link.disabled {
  opacity: .42;
}

.sidebar-logout {
  flex: 0 0 auto;
  margin-top: 14px;
  background: rgba(225, 29, 72, .12);
  border-color: rgba(225, 29, 72, .22) !important;
  color: #ffe4ec !important;
}

.sidebar-logout:hover {
  background: rgba(225, 29, 72, .22) !important;
  border-color: rgba(225, 29, 72, .34) !important;
}

.main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 78px;
  padding-inline: 10px;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
  padding-inline: 0;
}

.app-shell.sidebar-collapsed .brand span:not(.brand-mark),
.app-shell.sidebar-collapsed .nav-section,
.app-shell.sidebar-collapsed .sidebar .nav-link span,
.app-shell.sidebar-collapsed .nav-group-toggle .right,
.app-shell.sidebar-collapsed .nav-treeview {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar .nav-link,
.app-shell.sidebar-collapsed .nav-group-toggle {
  justify-content: center;
  padding-inline: 8px;
}

.app-shell.sidebar-collapsed .sidebar .nav-link i {
  margin: 0;
}

.topbar {
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(21, 35, 62, .04);
  width: 100%;
  max-width: 100%;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.sidebar-toggle {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.sidebar-toggle:hover {
  background: #eef3fb;
  color: var(--ink);
}

.sidebar-toggle i {
  font-size: 1.35rem;
  line-height: 1;
}

.eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 2px;
}

.topbar h1 {
  font-size: 22px;
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}

.user-chip {
  align-items: center;
  border: 1px solid var(--line);
  display: inline-flex;
  gap: 6px;
  max-width: min(260px, 100%);
  min-width: 0;
  overflow: hidden;
  padding: 7px 11px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip i {
  flex: 0 0 auto;
}

.content-wrap {
  padding: 26px 28px 38px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.panel,
.metric-card,
.card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.panel,
.card {
  position: relative;
  overflow: visible;
  min-width: 0;
}

.panel *,
.card *,
.metric-card *,
.topbar *,
.form-panel * {
  min-width: 0;
}

.panel::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--teal), var(--amber));
}

.panel {
  padding: 21px;
}

.panel:hover,
.card:hover,
.metric-card:hover,
.kanban-card:hover,
.calendar-event:hover {
  box-shadow: var(--shadow);
}

.ui-ready {
  animation: liftIn .28s ease both;
}

@keyframes liftIn {
  from {
    opacity: .72;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:hover,
.metric-card:hover,
.kanban-card:hover {
  transform: translateY(-2px);
}

.card-body {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  min-width: 0;
  flex-wrap: wrap;
}

.panel-header > *,
.topbar-title > div {
  min-width: 0;
}

.panel-header h2,
.card h2 {
  font-size: 16px;
  margin: 0 0 4px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.panel-header p,
.card p {
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}

.metric-card {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--teal));
}

.metric-card span {
  color: var(--muted);
  display: block;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.metric-card strong,
.metric-card .text-value {
  display: block;
  font-size: 30px;
  line-height: 1.1;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.metric-card i {
  font-size: 30px;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--primary-soft);
}

.metric-card .text-danger,
.metric-card i.text-danger {
  background: var(--rose-soft);
  color: var(--rose) !important;
}

.metric-card .text-warning,
.metric-card i.text-warning {
  background: var(--amber-soft);
  color: #b45309 !important;
}

.metric-card .text-info,
.metric-card i.text-info {
  background: var(--teal-soft);
  color: var(--teal) !important;
}

.metric-card .text-success,
.metric-card i.text-success {
  background: var(--green-soft);
  color: var(--green) !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .5rem .85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.btn i {
  flex: 0 0 auto;
}

.btn-sm {
  padding: .38rem .62rem;
  font-size: .84rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(36, 99, 235, .20);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #143fa8);
  border-color: #1d4ed8;
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: #b7c8f5;
  background: #fff;
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-outline-secondary {
  color: var(--ink-soft);
  border-color: var(--line-strong);
  background: #fff;
}

.btn-outline-secondary:hover {
  background: #eef3fb;
  color: var(--ink);
}

.table {
  width: 100%;
  min-width: 760px;
  margin-bottom: 1rem;
  vertical-align: top;
  border-collapse: collapse;
  --bs-table-color: var(--ink);
  --bs-table-striped-bg: #f8fbff;
  border-color: var(--line);
}

.table-responsive .table {
  margin-bottom: 0;
}

.dataTables_wrapper,
.dt-container {
  max-width: 100%;
  overflow-x: auto;
}

.dataTables_wrapper .row,
.dt-container .row {
  min-width: 0;
}

.dataTables_wrapper .row > *,
.dt-container .row > *,
.dataTables_wrapper label,
.dt-container label,
.dt-search,
.dt-length,
.dt-info,
.dt-paging {
  max-width: 100%;
  min-width: 0;
}

.dataTables_wrapper label,
.dt-container label {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: .45rem;
}

.dataTables_wrapper .row,
.dt-container .row,
.dt-layout-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  margin-bottom: .8rem;
}

.dt-layout-cell,
.dataTables_length,
.dataTables_filter,
.dt-length,
.dt-search {
  align-items: center;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  gap: .5rem;
}

.dt-search,
.dataTables_filter {
  justify-content: flex-end;
  margin-left: auto;
}

.dt-search label,
.dataTables_filter label {
  margin: 0;
}

.dt-search input,
.dataTables_filter input {
  flex: 0 1 220px;
  width: min(220px, 100%);
}

.dt-length select,
.dataTables_length select {
  flex: 0 0 auto;
  width: auto;
}

.dataTables_wrapper input,
.dataTables_wrapper select,
.dt-container input,
.dt-container select {
  max-width: 100%;
}

.table th,
.table td {
  font-size: .92rem;
  line-height: 1.45;
  padding: .68rem .82rem;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.table thead th {
  background: linear-gradient(135deg, #eaf1ff, #e6f7f4);
  color: #25405f;
  font-size: 12.5px;
  line-height: 1.25;
  min-width: 88px;
  padding: .68rem .9rem;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid #c8d8ea;
  border-right: 1px solid #d7e4f1;
  vertical-align: middle;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.table thead th:first-child {
  border-top-left-radius: 8px;
}

.table thead th:last-child {
  border-right: 0;
  border-top-right-radius: 8px;
}

.table thead th,
.table thead th a {
  color: #25405f;
}

.table thead th:last-child,
.table thead th.actions-cell,
.table thead th.no-sort {
  min-width: 64px;
}

table.dataTable thead .sorting::before,
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting_desc::after,
.dt-column-order::before,
.dt-column-order::after {
  display: none !important;
  opacity: 0 !important;
}

table.dataTable thead th,
.dt-container thead th {
  padding-right: .9rem;
  position: relative;
  cursor: default;
}

.dt-column-title {
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}

.dt-column-order {
  display: none !important;
}

.table td .small,
.table td small {
  line-height: 1.35;
}

.dataTables_wrapper,
.dt-container,
.dt-info,
.dt-paging,
.dt-search,
.dt-length {
  font-size: .92rem;
}

.table tbody tr:hover {
  background: #f2f7ff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  max-width: 100%;
  min-width: 0;
  padding: .35em .6em;
  border-radius: 7px;
  font-weight: 500;
  line-height: 1;
  overflow-wrap: anywhere;
}

.text-bg-light {
  background: #eef4fb !important;
  color: var(--ink-soft) !important;
  border: 1px solid var(--line);
}

.text-primary,
.text-bg-primary,
.bg-primary {
  color: var(--primary) !important;
}

.text-success { color: var(--green) !important; }
.text-danger { color: var(--rose) !important; }
.text-warning { color: #b45309 !important; }
.text-info { color: var(--teal) !important; }

.text-bg-primary {
  background: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
}

.text-bg-success {
  background: var(--green-soft) !important;
  color: #166534 !important;
}

.text-bg-danger {
  background: var(--rose-soft) !important;
  color: #9f1239 !important;
}

.text-bg-warning {
  background: var(--amber-soft) !important;
  color: #92400e !important;
}

.text-bg-info {
  background: var(--teal-soft) !important;
  color: #0f766e !important;
}

.text-bg-secondary {
  background: #eef1f6 !important;
  color: var(--ink-soft) !important;
}

.bg-warning {
  background: linear-gradient(90deg, var(--amber), #d97706) !important;
}

.bg-info {
  background: linear-gradient(90deg, var(--teal), #0891b2) !important;
}

.progress {
  display: flex;
  overflow: hidden;
  background: #e8eef7;
  border-radius: 8px;
  height: 12px;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--primary), var(--teal));
}

.sp-dashboard {
  --sp-blue: #2563eb;
  --sp-cyan: #0891b2;
  --sp-green: #16a34a;
  --sp-amber: #d97706;
  --sp-rose: #e11d48;
  --sp-purple: #7c3aed;
}

.sp-module {
  --sp-blue: #2563eb;
  --sp-cyan: #0891b2;
  --sp-green: #16a34a;
  --sp-amber: #d97706;
  --sp-rose: #e11d48;
  --sp-purple: #7c3aed;
}

.sp-module .panel {
  border-color: rgba(198, 210, 225, .9);
}

.sp-module .panel-header {
  border-bottom: 1px solid rgba(220, 228, 239, .82);
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.sp-module .panel-header h2 {
  align-items: center;
  display: flex;
  gap: .55rem;
}

.sp-module .panel-header h2 i {
  align-items: center;
  background: linear-gradient(135deg, var(--primary-soft), var(--teal-soft));
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 1rem;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.sp-filter-panel {
  background:
    linear-gradient(135deg, rgba(36, 99, 235, .08), rgba(15, 159, 143, .08)),
    rgba(255, 255, 255, .97);
}

.sp-filter-panel .form-label {
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 500;
}

.sp-form-grid {
  background: linear-gradient(180deg, rgba(248, 250, 252, .88), rgba(255, 255, 255, .92));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.sp-status {
  border: 1px solid transparent;
  justify-content: center;
  min-width: 82px;
}

.sp-status[data-status="Activo"],
.sp-status[data-status="Activa"],
.sp-status[data-status="Vigente"],
.sp-status[data-status="Aprobado"] {
  background: #e7f8ee !important;
  border-color: #b9ebca;
  color: #166534 !important;
}

.sp-status[data-status="Registrado"],
.sp-status[data-status="Pendiente"] {
  background: #e9f0ff !important;
  border-color: #bdd2ff;
  color: #1648bd !important;
}

.sp-status[data-status="Descontado"],
.sp-status[data-status="Facturado"] {
  background: #e3f8f5 !important;
  border-color: #aee8df;
  color: #0f766e !important;
}

.sp-status[data-status="Suspendido"],
.sp-status[data-status="Suspendida"],
.sp-status[data-status="Rechazado"],
.sp-status[data-status="Vencida"],
.sp-status[data-status="Inactivo"],
.sp-status[data-status="Cerrado"],
.sp-status[data-status="Cerrada"] {
  background: #ffe7ed !important;
  border-color: #fecdd8;
  color: #9f1239 !important;
}

.sp-table-title {
  align-items: flex-start;
  display: flex;
  gap: .65rem;
}

.sp-table-title i {
  align-items: center;
  background: var(--primary-soft);
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  margin-top: .1rem;
  width: 34px;
}

.sp-report-card {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .96)),
    #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}

.sp-report-card .card-body {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-height: 178px;
}

.sp-report-icon {
  align-items: center;
  background: linear-gradient(135deg, #e9f0ff, #e3f8f5);
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.sp-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: auto;
}

.sp-empty-state {
  align-items: center;
  color: var(--muted);
  display: grid;
  gap: .4rem;
  justify-items: center;
  padding: 28px 12px;
  text-align: center;
}

.sp-empty-state i {
  color: var(--primary);
  font-size: 1.8rem;
  opacity: .8;
}

.sp-dashboard-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .94), rgba(8, 145, 178, .9) 48%, rgba(22, 163, 74, .88)),
    #2563eb;
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #fff;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  overflow: hidden;
  padding: 22px;
  position: relative;
}

.sp-dashboard-hero::after {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .12) 0 1px, transparent 1px 18px);
  content: "";
  inset: 0;
  opacity: .5;
  position: absolute;
  pointer-events: none;
}

.sp-dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.sp-dashboard-kicker {
  color: rgba(255, 255, 255, .82);
  display: block;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .08em;
  margin-bottom: .3rem;
  text-transform: uppercase;
}

.sp-dashboard-hero h2 {
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 .35rem;
}

.sp-dashboard-hero p {
  color: rgba(255, 255, 255, .86);
  margin: 0;
  max-width: 760px;
}

.sp-dashboard-balance {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  min-width: 210px;
  padding: 14px 16px;
  text-align: right;
}

.sp-dashboard-balance span {
  color: rgba(255, 255, 255, .78);
  display: block;
  font-weight: 500;
}

.sp-dashboard-balance strong,
.sp-dashboard-balance .text-value {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  margin-top: 3px;
}

.sp-metric {
  border: 0;
}

.sp-metric::before {
  width: 100%;
  height: 5px;
  bottom: auto;
}

.sp-metric-blue {
  background: linear-gradient(135deg, #ffffff 0%, #edf4ff 100%);
}

.sp-metric-blue::before,
.sp-chart-blue .sp-chart-fill,
.sp-panel-blue::before {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.sp-metric-blue i {
  background: #dbeafe;
  color: #2563eb;
}

.sp-metric-amber {
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
}

.sp-metric-amber::before,
.sp-chart-amber .sp-chart-fill,
.sp-panel-amber::before {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.sp-metric-amber i {
  background: #ffedd5;
  color: #d97706;
}

.sp-metric-green {
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}

.sp-metric-green::before,
.sp-chart-green .sp-chart-fill,
.sp-panel-green::before {
  background: linear-gradient(90deg, #16a34a, #14b8a6);
}

.sp-metric-green i {
  background: #dcfce7;
  color: #16a34a;
}

.sp-metric-cyan {
  background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
}

.sp-metric-cyan::before,
.sp-chart-cyan .sp-chart-fill,
.sp-panel-cyan::before {
  background: linear-gradient(90deg, #0891b2, #2563eb);
}

.sp-metric-cyan i {
  background: #cffafe;
  color: #0891b2;
}

.sp-chart-rose .sp-chart-fill,
.sp-panel-rose::before,
.sp-panel-red::before {
  background: linear-gradient(90deg, #e11d48, #f97316);
}

.sp-panel-purple::before {
  background: linear-gradient(90deg, #7c3aed, #2563eb, #06b6d4);
}

.sp-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .95)),
    #fff;
}

.sp-panel .panel-header h2 {
  color: var(--ink);
}

.sp-chart {
  display: grid;
  gap: .85rem;
  max-height: 292px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.sp-chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: .75rem;
  row-gap: .45rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.sp-chart-row:last-child {
  border-bottom: 0;
}

.sp-chart-label {
  color: var(--ink);
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-chart-track {
  grid-column: 1 / -1;
  width: 100%;
  height: .72rem;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
  border: 1px solid var(--line);
}

.sp-chart-fill {
  display: block;
  height: 100%;
  min-width: .35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--teal));
}

.sp-chart-value {
  color: var(--ink-soft);
  font-size: .86rem;
  font-weight: 500;
  max-width: 82px;
  min-width: max-content;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-chart-muted {
  color: var(--muted);
  padding: .75rem 0;
}

.sp-chart-months {
  align-items: end;
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  min-height: 190px;
  padding-top: .5rem;
}

.sp-chart-month {
  align-items: center;
  display: grid;
  gap: .45rem;
  grid-template-rows: 1fr auto auto;
  height: 185px;
  text-align: center;
}

.sp-chart-month-bar {
  align-self: end;
  background: linear-gradient(180deg, #7c3aed, #2563eb 55%, #0891b2);
  border-radius: 8px 8px 4px 4px;
  box-shadow: inset 0 -8px 18px rgba(15, 23, 42, .12);
  min-height: 8px;
  width: 100%;
}

.sp-chart-month-value {
  color: var(--ink-soft);
  font-size: .84rem;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}

.sp-chart-month-label {
  color: var(--muted);
  font-size: .86rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-control,
.form-select,
.input-group-text {
  display: block;
  width: 100%;
  padding: .55rem .7rem;
  font-size: .95rem;
  line-height: 1.35;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-color: var(--line-strong);
  border-radius: 8px;
  min-width: 0;
}

.form-select {
  appearance: auto;
}

.form-control-color {
  width: 56px;
  height: 40px;
  padding: .25rem;
}

.input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-group .form-control {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group-text {
  display: flex;
  align-items: center;
  width: auto;
  white-space: normal;
  border-right: 0;
  overflow-wrap: anywhere;
}

.input-group .form-control {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

.input-group-text {
  background: #f3f7fc;
  color: var(--primary);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .22rem rgba(36, 99, 235, .14);
}

.form-label {
  display: inline-block;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 6px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.form-check {
  display: block;
  min-height: 1.4rem;
  padding-left: 1.5rem;
}

.form-check-input {
  width: 1em;
  height: 1em;
  margin-top: .25em;
  margin-left: -1.5rem;
  vertical-align: top;
}

.form-check-label {
  color: var(--ink-soft);
}

.form-switch .form-check-input {
  width: 2em;
}

.list-group-item {
  display: block;
  max-width: 100%;
  min-width: 0;
  padding: .75rem 1rem;
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  overflow-wrap: anywhere;
}

.list-group-flush .list-group-item {
  border-left: 0;
  border-right: 0;
}

.list-group-item-action {
  text-decoration: none;
}

.list-group-item-action:hover {
  background: #f2f7ff;
}

.unread-item {
  background: #f2f7ff;
  border-left: 3px solid var(--primary);
}

.alert {
  padding: .85rem 1rem;
  margin-bottom: 1rem;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.alert-success { background: var(--green-soft); color: #166534; }
.alert-danger { background: var(--rose-soft); color: #9f1239; }
.alert-warning { background: var(--amber-soft); color: #92400e; }

.btn-close {
  float: right;
  border: 0;
  background: transparent;
}

.detail-label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
  font-weight: 500;
  text-transform: uppercase;
}

.thin-progress {
  height: 18px;
  min-width: 120px;
}

.project-dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 8px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 14px;
  align-items: start;
}

.kanban-column {
  background: linear-gradient(180deg, #f8fbff, #f3f7fb);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  min-height: 240px;
  padding: 12px;
}

.kanban-column.drag-over {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
  min-width: 0;
}

.kanban-column-header h3 {
  font-size: 15px;
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.kanban-dropzone {
  min-height: 170px;
}

.kanban-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: grab;
  box-shadow: var(--shadow-soft);
  min-width: 0;
  overflow-wrap: anywhere;
}

.kanban-card.dragging {
  opacity: .65;
}

.subtask-row {
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.timeline {
  border-left: 2px solid var(--line);
  margin-left: 8px;
  padding-left: 18px;
}

.timeline-item {
  min-width: 0;
  position: relative;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  position: absolute;
  left: -25px;
  top: 5px;
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.gantt-wrap {
  display: grid;
  gap: 10px;
}

.gantt-row {
  display: grid;
  grid-template-columns: minmax(min(180px, 100%), 32%) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.gantt-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.gantt-label span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.gantt-track {
  background: #e8eef7;
  border-radius: 8px;
  height: 34px;
  position: relative;
  overflow: hidden;
}

.gantt-bar {
  background: linear-gradient(90deg, var(--primary), var(--teal));
  border-radius: 8px;
  color: #fff;
  height: 100%;
  min-width: 42px;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  padding-inline: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-bar.late {
  background: linear-gradient(90deg, #d97706, var(--rose));
}

.calendar-list {
  display: grid;
  gap: 14px;
}

.calendar-day {
  display: grid;
  grid-template-columns: minmax(76px, 92px) minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.calendar-date {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.calendar-date strong,
.calendar-date .text-value {
  display: block;
  font-size: 26px;
}

.calendar-date span {
  color: var(--muted);
  font-size: 13px;
}

.calendar-events {
  display: grid;
  gap: 8px;
}

.calendar-event {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.calendar-event i {
  color: var(--primary);
  font-size: 20px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--primary-soft);
}

.calendar-event span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.actions-cell {
  min-width: 118px;
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.table:has(td.actions-cell) thead th:last-child {
  min-width: 118px;
  width: 1%;
}

.actions-cell > * {
  margin: .15rem;
  vertical-align: middle;
}

.actions-cell form {
  display: inline-flex;
}

.actions-cell .btn {
  white-space: nowrap;
  word-break: normal;
}

.form-panel .form-actions {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 16px;
}

.permission-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.permission-groups section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.permission-groups h3 {
  font-size: 15px;
  margin-bottom: 10px;
  font-weight: 600;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.login-bg {
  background:
    linear-gradient(135deg, rgba(16, 26, 46, .82), rgba(36, 99, 235, .72)),
    radial-gradient(circle at 16% 16%, rgba(15, 159, 143, .30), transparent 18rem),
    #132033;
}

.login-card {
  width: min(430px, 100%);
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .60);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .28);
}

.login-shell {
  gap: 52px;
}

.login-hero {
  max-width: 460px;
  color: #fff;
}

.login-hero span {
  display: inline-block;
  color: #bfe8ff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 10px;
}

.login-hero h1 {
  font-size: 42px;
  line-height: 1.08;
  margin: 0 0 14px;
  font-weight: 600;
}

.login-hero p {
  color: rgba(255, 255, 255, .78);
  font-size: 17px;
  margin: 0;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.login-brand h1 {
  font-size: 23px;
  margin: 0;
  font-weight: 600;
}

.login-brand p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state i {
  font-size: 52px;
  color: var(--primary);
}

.dataTables_wrapper .dt-search input,
.dataTables_wrapper .dt-length select {
  border-color: var(--line-strong);
  border-radius: 8px;
}

.dataTables_wrapper .dt-paging .page-link {
  border-radius: 7px;
  margin: 0 2px;
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    transform: translateX(0);
  }

  .app-shell.sidebar-collapsed .sidebar {
    width: 100%;
    max-width: 320px;
    padding: 18px 16px;
    transform: translateX(-105%);
    opacity: 0;
    pointer-events: none;
  }

  .app-shell:not(.sidebar-collapsed)::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    z-index: 18;
  }

  .app-shell.sidebar-collapsed .brand span:not(.brand-mark),
  .app-shell.sidebar-collapsed .nav-section,
  .app-shell.sidebar-collapsed .sidebar .nav-link span {
    display: inline;
  }

  .app-shell.sidebar-collapsed .sidebar .nav-link {
    justify-content: flex-start;
    padding: 10px 11px;
  }

  .topbar,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-title {
    width: 100%;
  }

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

  .content-wrap {
    padding: 16px;
  }

  .gantt-row,
  .calendar-day {
    grid-template-columns: 1fr;
  }

  .login-shell {
    flex-direction: column;
    gap: 22px;
    padding-block: 28px;
  }

  .login-hero {
    text-align: center;
  }

  .login-hero h1 {
    font-size: 30px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .topbar {
    padding: 14px 16px;
    gap: 12px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .top-actions .btn {
    padding-inline: .62rem;
  }

  .panel,
  .card-body {
    padding: 14px;
  }

  .metric-card {
    padding: 14px;
  }

  .metric-card strong,
  .metric-card .text-value {
    font-size: 24px;
  }

  .table {
    min-width: 680px;
    font-size: 13px;
  }

  .dt-layout-row,
  .dataTables_wrapper .row,
  .dt-container .row {
    align-items: stretch;
    flex-direction: column;
  }

  .dt-search,
  .dataTables_filter,
  .dt-length,
  .dataTables_length {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }

  .dt-search input,
  .dataTables_filter input {
    flex: 1 1 auto;
    width: 100%;
  }

  .sp-chart-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .35rem;
  }

  .sp-chart-value {
    max-width: 74px;
    text-align: right;
  }

  .sp-dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .sp-dashboard-balance {
    min-width: 0;
    text-align: left;
  }

  .form-panel .form-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .form-panel .form-actions .btn,
  .top-actions .btn-primary,
  .top-actions .btn-outline-primary {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .content-wrap {
    padding: 12px;
  }

  .topbar {
    padding: 12px;
  }

  .sidebar-toggle {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .user-chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .login-card {
    padding: 22px;
  }
}

@media print {
  body {
    background: #fff !important;
    color: #111827;
  }

  .sidebar,
  .topbar,
  .no-print,
  .dataTables_length,
  .dataTables_filter,
  .dataTables_info,
  .dataTables_paginate,
  .dt-length,
  .dt-search,
  .dt-info,
  .dt-paging {
    display: none !important;
  }

  .app-shell,
  .main,
  .content-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .panel,
  .card {
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
  }

  .panel::before,
  .card::before {
    display: none !important;
  }

  .panel-header {
    display: block !important;
    margin-bottom: 14px !important;
  }

  .table {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 11px !important;
  }

  .table th,
  .table td {
    padding: 5px !important;
  }

  a {
    color: #111827 !important;
    text-decoration: none !important;
  }
}

/* Professional navigation and role dashboard refresh */
.brand-copy,
.profile-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-name,
.profile-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subtitle,
.profile-copy small {
  color: #9fb4d2;
  font-size: .76rem;
  font-weight: 500;
}

.sidebar-profile {
  align-items: center;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  margin: 0 0 14px;
  min-width: 0;
  padding: 10px;
}

.profile-avatar {
  align-items: center;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(14, 165, 233, .20);
  color: #fff;
  display: inline-flex;
  flex: 0 0 36px;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.nav-group .nav-group-toggle {
  position: relative;
}

.nav-group .nav-group-toggle::before {
  border-radius: 999px;
  content: "";
  height: 22px;
  left: -4px;
  opacity: .78;
  position: absolute;
  width: 3px;
}

.nav-theme-blue .nav-group-toggle::before { background: #60a5fa; }
.nav-theme-teal .nav-group-toggle::before { background: #2dd4bf; }
.nav-theme-indigo .nav-group-toggle::before { background: #818cf8; }
.nav-theme-amber .nav-group-toggle::before { background: #f59e0b; }
.nav-theme-rose .nav-group-toggle::before { background: #fb7185; }
.nav-theme-green .nav-group-toggle::before { background: #22c55e; }
.nav-theme-slate .nav-group-toggle::before { background: #94a3b8; }
.nav-theme-cyan .nav-group-toggle::before { background: #06b6d4; }
.nav-theme-violet .nav-group-toggle::before { background: #a78bfa; }

.role-chip {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  display: inline-flex;
  font-size: .84rem;
  font-weight: 600;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

.role-dashboard {
  border-radius: 8px;
  overflow: hidden;
}

.role-hero {
  background:
    linear-gradient(135deg, rgba(23, 32, 51, .96), rgba(31, 72, 93, .96)),
    linear-gradient(90deg, rgba(36, 99, 235, .24), rgba(15, 159, 143, .16));
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #fff;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr);
  min-height: 210px;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.role-hero::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .14), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 14px);
  content: "";
  inset: 0;
  opacity: .55;
  pointer-events: none;
  position: absolute;
}

.role-hero > * {
  position: relative;
  z-index: 1;
}

.role-kicker {
  align-items: center;
  color: #c9f0ff;
  display: inline-flex;
  font-size: .82rem;
  font-weight: 700;
  gap: 8px;
  letter-spacing: .02em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.role-kicker i {
  align-items: center;
  background: rgba(255, 255, 255, .14);
  border-radius: 8px;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.role-hero h2 {
  color: #fff;
  font-size: clamp(1.65rem, 2.1vw, 2.35rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 10px;
}

.role-hero p {
  color: #d8e6f7;
  font-size: .98rem;
  margin: 0;
  max-width: 720px;
}

.role-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.role-focus span {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  color: #f7fbff;
  font-size: .82rem;
  padding: 6px 10px;
}

.role-hero-actions {
  align-content: center;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-action {
  align-items: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  text-decoration: none;
}

.quick-action:hover {
  background: rgba(255, 255, 255, .20);
  color: #fff;
  transform: translateY(-2px);
}

.quick-action i {
  align-items: center;
  background: rgba(255, 255, 255, .16);
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.metric-card.metric-primary::before { background: linear-gradient(180deg, #2563eb, #06b6d4); }
.metric-card.metric-warning::before { background: linear-gradient(180deg, #f59e0b, #ef4444); }
.metric-card.metric-danger::before { background: linear-gradient(180deg, #e11d48, #fb7185); }
.metric-card.metric-success::before { background: linear-gradient(180deg, #16a34a, #14b8a6); }
.metric-card.metric-info::before { background: linear-gradient(180deg, #0ea5e9, #6366f1); }

.health-panel .panel-header {
  margin-bottom: 14px;
}

.dashboard-balance-row > [class*="col-"] {
  display: flex;
}

.dashboard-balance-row .panel {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.health-panel,
.deadlines-panel {
  min-height: 360px;
}

.health-panel .panel-header,
.deadlines-panel .panel-header {
  align-items: flex-start;
  min-height: 52px;
}

.health-panel .panel-header .btn {
  margin-left: auto;
  white-space: nowrap;
}

.health-grid {
  display: grid;
  flex: 1 1 auto;
  gap: 18px;
}

.health-item {
  background: linear-gradient(180deg, #f8fbff, #fff);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.health-item .progress {
  width: 100%;
}

.timeline-list {
  display: grid;
  gap: 10px;
  max-height: 310px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
  width: 100%;
}

.timeline-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 10px;
  width: 100%;
}

.timeline-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.timeline-item > div span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-dot {
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 999px;
  box-shadow: 0 0 0 4px var(--primary-soft);
  height: 10px;
  width: 10px;
}

.timeline-item > .text-value {
  white-space: nowrap;
}

.empty-state {
  background: #f8fafc;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.app-shell.sidebar-collapsed .sidebar-profile {
  justify-content: center;
  padding-inline: 6px;
}

.app-shell.sidebar-collapsed .profile-copy,
.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .nav-group .nav-group-toggle::before {
  display: none;
}

@media (max-width: 1100px) {
  .role-hero {
    grid-template-columns: 1fr;
  }

  .role-hero-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .role-hero {
    padding: 22px;
  }

  .role-hero-actions {
    grid-template-columns: 1fr 1fr;
  }

  .top-actions .role-chip {
    display: none;
  }
}

@media (max-width: 520px) {
  .role-hero-actions {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .timeline-item > .text-value {
    grid-column: 2;
  }
}

/* Registro de horas */
.time-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(14, 116, 144, .96), rgba(37, 99, 235, .92)),
    linear-gradient(90deg, rgba(20, 184, 166, .20), rgba(245, 158, 11, .16));
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #fff;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.time-hero::after {
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 14px);
  content: "";
  inset: 0;
  opacity: .75;
  pointer-events: none;
  position: absolute;
}

.time-hero > * {
  position: relative;
  z-index: 1;
}

.time-kicker {
  align-items: center;
  color: #dffcff;
  display: inline-flex;
  font-size: .82rem;
  font-weight: 700;
  gap: 8px;
  letter-spacing: .02em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.time-kicker i {
  align-items: center;
  background: rgba(255, 255, 255, .16);
  border-radius: 8px;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.time-hero h2 {
  color: #fff;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 6px;
}

.time-hero p {
  color: #e8f7ff;
  margin: 0;
  max-width: 740px;
}

.time-summary-card {
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.time-summary-card::before {
  width: 6px;
}

.time-summary-1::before { background: linear-gradient(180deg, #2563eb, #06b6d4); }
.time-summary-2::before { background: linear-gradient(180deg, #16a34a, #14b8a6); }
.time-summary-3::before { background: linear-gradient(180deg, #f59e0b, #fb7185); }
.time-summary-4::before { background: linear-gradient(180deg, #7c3aed, #0ea5e9); }

.time-summary-1 i { background: #e9f0ff; color: #2563eb !important; }
.time-summary-2 i { background: #e7f8ee; color: #16a34a !important; }
.time-summary-3 i { background: #fff4d8; color: #b45309 !important; }
.time-summary-4 i { background: #f1ecff; color: #7c3aed !important; }

.time-panel::before {
  background: linear-gradient(90deg, #06b6d4, #2563eb, #f59e0b);
}

.time-panel-badge {
  align-items: center;
  background: #eef7ff;
  border: 1px solid #cfe8ff;
  border-radius: 999px;
  color: #075985;
  display: inline-flex;
  font-size: .84rem;
  font-weight: 600;
  gap: 6px;
  padding: 7px 11px;
}

.time-hours {
  color: #075985;
  font-weight: 700;
  white-space: nowrap;
}

.time-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 700;
  justify-content: center;
  min-width: 86px;
  padding: 5px 10px;
}

.time-status-approved {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

.time-status-pending {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.time-status-rejected {
  background: #ffe4e6;
  border: 1px solid #fda4af;
  color: #9f1239;
}

@media (max-width: 760px) {
  .time-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 21px;
  }

  .time-hero .btn {
    width: 100%;
  }
}

/* Servicios Profesionales - experiencia visual completa */
.services-experience {
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, .12), transparent 25rem),
    radial-gradient(circle at 86% 6%, rgba(20, 184, 166, .12), transparent 25rem),
    linear-gradient(180deg, #f3f8fc, #f7fafc 42%, #f3f6fb);
}

.services-experience .topbar {
  border-bottom-color: #cfe2f3;
}

.services-experience .eyebrow {
  color: #0e7490;
}

.services-experience .content-wrap > .panel:first-child,
.services-experience .content-wrap > form.panel:first-child {
  border-color: #cfe8f3;
}

.services-experience .content-wrap > .panel:first-child::before,
.services-experience .content-wrap > form.panel:first-child::before,
.services-experience .sp-panel::before {
  background: linear-gradient(90deg, #0ea5e9, #14b8a6, #f59e0b);
}

.services-experience .panel-header h2 {
  color: #132238;
}

.services-experience .btn-primary {
  background: linear-gradient(135deg, #0e7490, #2563eb);
  border-color: #0e7490;
  box-shadow: 0 8px 18px rgba(14, 116, 144, .18);
}

.services-experience .btn-outline-primary {
  border-color: #8dccdf;
  color: #0e7490;
}

.services-experience .btn-outline-primary:hover {
  background: #e8f7fb;
  color: #075985;
}

.services-experience .sp-filter-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(239, 250, 252, .96));
  border-color: #cce8ee;
}

.services-experience .form-label {
  color: #31506b;
}

.services-experience .form-control:focus,
.services-experience .form-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 .2rem rgba(14, 165, 233, .14);
}

.services-experience .table thead th {
  background: linear-gradient(180deg, #edf8fb, #e7f2fb);
  border-color: #cfe6ef;
  color: #12395a;
}

.services-experience .badge.text-bg-light {
  background-color: #eaf7fb !important;
  border: 1px solid #cbeaf3;
  color: #0f4c64 !important;
}

.sp-role-hero {
  background:
    linear-gradient(135deg, rgba(12, 74, 110, .97), rgba(15, 118, 110, .94)),
    linear-gradient(90deg, rgba(37, 99, 235, .24), rgba(245, 158, 11, .16));
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #fff;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.sp-role-hero::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .16), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 15px);
  content: "";
  inset: 0;
  opacity: .68;
  pointer-events: none;
  position: absolute;
}

.sp-role-hero > * {
  position: relative;
  z-index: 1;
}

.sp-dashboard-kicker {
  align-items: center;
  color: #dffcff;
  display: inline-flex;
  font-size: .82rem;
  font-weight: 700;
  gap: 8px;
  letter-spacing: .02em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.sp-dashboard-kicker i {
  align-items: center;
  background: rgba(255, 255, 255, .16);
  border-radius: 8px;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.sp-role-hero h2 {
  color: #fff;
  font-size: clamp(1.7rem, 2.2vw, 2.45rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 10px;
}

.sp-role-hero p {
  color: #e1f4f8;
  font-size: .98rem;
  margin: 0;
  max-width: 760px;
}

.sp-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.sp-focus span {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #f7fdff;
  font-size: .82rem;
  padding: 6px 10px;
}

.sp-hero-side {
  display: grid;
  gap: 12px;
}

.sp-dashboard-balance {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  padding: 16px;
}

.sp-dashboard-balance span:first-child {
  color: #d7f7ff;
  display: block;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sp-dashboard-balance .text-value {
  color: #fff;
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 6px 0 10px;
}

.sp-progress {
  background: rgba(255, 255, 255, .16);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.sp-progress span {
  background: linear-gradient(90deg, #22c55e, #a3e635);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.sp-quick-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sp-quick-actions a,
.sp-module-nav a {
  align-items: center;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  text-decoration: none;
}

.sp-quick-actions a {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .17);
  color: #fff;
  min-height: 56px;
  padding: 12px;
}

.sp-quick-actions a:hover {
  background: rgba(255, 255, 255, .20);
  color: #fff;
  transform: translateY(-2px);
}

.sp-quick-actions i,
.sp-module-nav i {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.sp-quick-actions i {
  background: rgba(255, 255, 255, .16);
}

.sp-module-nav {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.sp-module-nav a {
  background: #fff;
  border: 1px solid #cfe6ef;
  box-shadow: var(--shadow-soft);
  color: #24445a;
  min-height: 60px;
  padding: 12px;
}

.sp-module-nav a:hover {
  border-color: #8bd3e4;
  box-shadow: var(--shadow);
  color: #0e7490;
  transform: translateY(-2px);
}

.sp-module-nav i {
  background: #eaf8fb;
  color: #0e7490;
}

.sp-chart {
  max-height: 292px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.sp-chart-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px 12px;
  grid-template-columns: minmax(0, 1fr) minmax(130px, .75fr) auto;
  padding: 11px 0;
}

.sp-chart-label {
  color: var(--ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-chart-track {
  background: #e8f0f7;
  border: 1px solid #d3e0eb;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.sp-chart-fill {
  background: linear-gradient(90deg, #0ea5e9, #14b8a6);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.sp-chart-amber .sp-chart-fill { background: linear-gradient(90deg, #f59e0b, #fb7185); }
.sp-chart-green .sp-chart-fill { background: linear-gradient(90deg, #16a34a, #14b8a6); }
.sp-chart-rose .sp-chart-fill { background: linear-gradient(90deg, #e11d48, #fb923c); }

.sp-chart-value {
  color: #3b5168;
  font-weight: 700;
  white-space: nowrap;
}

.sp-chart-months {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  min-height: 250px;
}

.sp-chart-month {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-rows: 1fr auto auto;
  height: 250px;
  justify-items: center;
}

.sp-chart-month-bar {
  align-self: end;
  background: linear-gradient(180deg, #7c3aed, #0ea5e9);
  border-radius: 999px 999px 4px 4px;
  display: block;
  min-height: 8px;
  width: 22px;
}

.sp-chart-month-value,
.sp-chart-month-label {
  color: #40566e;
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
}

.sp-alert-list {
  display: grid;
  gap: 10px;
}

.sp-alert-item {
  align-items: center;
  background: #f8fbfd;
  border: 1px solid #d6e8ef;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 12px;
}

.sp-alert-item > span:first-child {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-alert-item i {
  color: #0e7490;
  flex: 0 0 auto;
}

.sp-empty-state {
  align-items: center;
  background: #f8fbfd;
  border: 1px dashed #c8dce6;
  border-radius: 8px;
  color: #64748b;
  display: flex;
  gap: 10px;
  justify-content: center;
  min-height: 92px;
  padding: 18px;
  text-align: center;
}

.sp-empty-state i {
  color: #0e7490;
  font-size: 1.2rem;
}

@media (max-width: 1200px) {
  .sp-role-hero {
    grid-template-columns: 1fr;
  }

  .sp-module-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sp-role-hero {
    padding: 22px;
  }

  .sp-quick-actions,
  .sp-module-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sp-chart-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sp-chart-track {
    grid-column: 1 / -1;
  }

  .sp-alert-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .sp-quick-actions,
  .sp-module-nav {
    grid-template-columns: 1fr;
  }
}
