:root {
  color-scheme: light;
  --collecthub-gradient: linear-gradient(120deg, #4338ca 0%, #2563eb 50%, #0ea5e9 100%);
  --collecthub-body-bg: #f5f8ff;
  --collecthub-font-family: "Inter", "SF Pro Display", "Segoe UI", system-ui, -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --collecthub-text-color: #0f172a;
  --collecthub-muted-color: #64748b;
  --collecthub-heading-color: #0b1120;
  --collecthub-surface-glass: #ffffff;
  --collecthub-surface-panel: #ffffff;
  --collecthub-surface-strong: #f1f5f9;
  --collecthub-surface-card: #ffffff;
  --collecthub-surface-dropdown: #ffffff;
  --collecthub-border-soft: #e2e8f0;
  --collecthub-border-strong: #cbd5f5;
  --collecthub-border-input: #cbd5f5;
  --collecthub-border-mobile: rgba(148, 163, 184, 0.2);
  --collecthub-shadow-soft: 0 28px 60px -40px rgba(15, 23, 42, 0.25);
  --collecthub-shadow-strong: 0 45px 90px -50px rgba(15, 23, 42, 0.28);
  --collecthub-overlay-scrim: rgba(10, 12, 24, 0.75);
  --collecthub-mobile-panel-bg: rgba(15, 20, 36, 0.94);
  --collecthub-mobile-panel-color: #f8fafc;
  --collecthub-mobile-link-bg: rgba(255, 255, 255, 0.05);
  --collecthub-mobile-link-hover-bg: rgba(99, 102, 241, 0.12);
  --collecthub-mobile-link-color: #1e293b;
  --collecthub-mobile-link-icon-bg: rgba(99, 102, 241, 0.12);
  --collecthub-avatar-bg: rgba(15, 23, 42, 0.08);
  --collecthub-avatar-color: #0f172a;
  --collecthub-chip-bg: rgba(99, 102, 241, 0.08);
  --collecthub-chip-color: #312e81;
  --collecthub-icon-circle-bg: rgba(99, 102, 241, 0.12);
  --collecthub-icon-circle-color: #4f46e5;
  --collecthub-table-head-bg: #f1f5f9;
  --collecthub-table-row-bg: #ffffff;
  --collecthub-table-border: #e2e8f0;
  --collecthub-input-bg: #ffffff;
  --collecthub-input-focus-shadow: rgba(99, 102, 241, 0.15);
  --collecthub-input-focus-border: rgba(79, 70, 229, 0.45);
  --collecthub-btn-soft-light-bg: rgba(99, 102, 241, 0.1);
  --collecthub-btn-soft-light-hover: rgba(99, 102, 241, 0.16);
  --collecthub-btn-soft-light-color: #312e81;
  --collecthub-dropdown-hover-bg: rgba(99, 102, 241, 0.08);
  --collecthub-navbar-active-bg: rgba(99, 102, 241, 0.12);
}



:root[data-bs-theme="dark"] {
  color-scheme: dark;
  --collecthub-gradient: linear-gradient(120deg, #1e1b4b 0%, #1d4ed8 50%, #0f766e 100%);
  --collecthub-body-bg: #050816;
  --collecthub-text-color: #e2e8f0;
  --collecthub-muted-color: #94a3b8;
  --collecthub-heading-color: #f8fafc;
  --collecthub-surface-glass: #0f172a;
  --collecthub-surface-panel: #0f172a;
  --collecthub-surface-strong: #111827;
  --collecthub-surface-card: #111827;
  --collecthub-surface-dropdown: #0f172a;
  --collecthub-border-soft: rgba(148, 163, 184, 0.25);
  --collecthub-border-strong: rgba(148, 163, 184, 0.35);
  --collecthub-border-input: rgba(148, 163, 184, 0.45);
  --collecthub-border-mobile: rgba(59, 73, 102, 0.7);
  --collecthub-shadow-soft: 0 34px 80px -48px rgba(2, 6, 23, 0.85);
  --collecthub-shadow-strong: 0 60px 110px -60px rgba(2, 6, 23, 0.9);
  --collecthub-overlay-scrim: rgba(2, 6, 23, 0.82);
  --collecthub-mobile-panel-bg: rgba(10, 18, 36, 0.94);
  --collecthub-mobile-panel-color: #e2e8f0;
  --collecthub-mobile-link-bg: rgba(30, 41, 59, 0.72);
  --collecthub-mobile-link-hover-bg: rgba(79, 70, 229, 0.24);
  --collecthub-mobile-link-color: #f1f5f9;
  --collecthub-mobile-link-icon-bg: rgba(79, 70, 229, 0.28);
  --collecthub-avatar-bg: rgba(148, 163, 184, 0.25);
  --collecthub-avatar-color: #f8fafc;
  --collecthub-chip-bg: rgba(99, 102, 241, 0.2);
  --collecthub-chip-color: #c7d2fe;
  --collecthub-icon-circle-bg: rgba(79, 70, 229, 0.28);
  --collecthub-icon-circle-color: #c7d2fe;
  --collecthub-table-head-bg: rgba(30, 41, 59, 0.85);
  --collecthub-table-row-bg: rgba(17, 24, 39, 0.85);
  --collecthub-table-border: rgba(71, 85, 105, 0.6);
  --collecthub-input-bg: #0f172a;
  --collecthub-input-focus-shadow: rgba(59, 130, 246, 0.35);
  --collecthub-input-focus-border: rgba(59, 130, 246, 0.55);
  --collecthub-btn-soft-light-bg: rgba(79, 70, 229, 0.24);
  --collecthub-btn-soft-light-hover: rgba(79, 70, 229, 0.35);
  --collecthub-btn-soft-light-color: #c7d2fe;
  --collecthub-dropdown-hover-bg: rgba(79, 70, 229, 0.24);
  --collecthub-navbar-active-bg: rgba(79, 70, 229, 0.24);
}


body {
  background-color: var(--collecthub-body-bg);
  font-family: var(--collecthub-font-family);
  color: var(--collecthub-text-color);
  font-size: 0.95rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
  color: var(--collecthub-heading-color);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1,
.h1 {
  font-size: clamp(1.9rem, 1.2vw + 1.6rem, 2.6rem);
  line-height: 1.2;
}

h2,
.h2 {
  font-size: clamp(1.5rem, 0.9vw + 1.25rem, 2.05rem);
}

h3,
.h3 {
  font-size: clamp(1.25rem, 0.6vw + 1.1rem, 1.65rem);
}

h4,
.h4 {
  font-size: 1.15rem;
}

h5,
.h5 {
  font-size: 1.05rem;
}

h6,
.h6 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

p {
  margin-bottom: 1rem;
  color: var(--collecthub-text-color);
}

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

small,
.small {
  font-size: 0.82rem;
  line-height: 1.5;
}

.navbar-glass {
  background: var(--collecthub-gradient);
  backdrop-filter: saturate(160%) blur(18px);
  border: none;
}

.navbar-brand .brand-icon {
  width: 38px;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.25rem;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #fff;
  opacity: 0.92;
  transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
  color: #fff;
  position: relative;
  background: var(--collecthub-navbar-active-bg);
}

.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  inset: auto 18px -0.55rem 18px;
  height: 4px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.85);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle-btn .theme-icon {
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle-btn .theme-icon-light {
  display: none;
}

.theme-toggle-btn .theme-toggle-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.theme-toggle-btn[aria-pressed="true"] {
  background-color: rgba(255, 255, 255, 0.22);
}

:root[data-bs-theme="dark"] .theme-toggle-btn {
  background-color: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.4) !important;
  color: #e2e8f0;
}

:root[data-bs-theme="dark"] .theme-toggle-btn[aria-pressed="true"] {
  background-color: rgba(79, 70, 229, 0.32);
  border-color: rgba(129, 140, 248, 0.5) !important;
}

:root[data-bs-theme="dark"] .theme-toggle-btn .theme-icon-dark {
  display: none;
}

:root[data-bs-theme="dark"] .theme-toggle-btn .theme-icon-light {
  display: inline;
}

.avatar-initials {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background-color: var(--collecthub-avatar-bg);
  color: var(--collecthub-avatar-color);
  font-weight: 600;
}

main {
  min-height: calc(100vh - 72px);
}

.flash-region .alert {
  border: none;
  box-shadow: 0 0.25rem 1rem rgba(15, 23, 42, 0.08);
}

.glass-card,
.glass-panel {
  position: relative;
  overflow: hidden;
  background-color: var(--collecthub-surface-card);
  background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(14, 165, 233, 0.04));
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 30px 72px -48px rgba(15, 23, 42, 0.42);
  border-radius: 24px;
}


/* Ajustes mobile: reducir padding y radios en contenedores de vidrio */
@media (max-width: 576.98px) {
  .glass-card,
  .glass-panel {
    padding: 0.75rem !important;
    border-radius: 20px;
  }
  .container-xxl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Responsive adjustments for authentication layouts */
body.auth-layout main.container-xxl {
  padding-top: 0;
  padding-bottom: 0;
}

body.auth-layout .auth-screen {
  min-height: 100vh;
}

.auth-screen {
  min-height: calc(100vh - 240px);
  row-gap: 1.5rem;
}

.auth-screen > [class*="col-"] {
  display: flex;
  justify-content: center;
}

.auth-screen .glass-card {
  width: 100%;
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .auth-screen {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
    min-height: calc(100vh - 180px);
  }

  .auth-screen > [class*="col-"] {
    flex: 0 0 auto;
    width: 100%;
    max-width: 520px;
  }

  .auth-screen .glass-card {
    padding: 2rem 1.75rem !important;
    border-radius: 22px;
  }
}

@media (orientation: landscape) and (max-width: 1199.98px) {
  .auth-screen {
    min-height: calc(100vh - 140px);
    padding-top: 1.75rem !important;
    padding-bottom: 1.75rem !important;
  }

  .auth-screen > [class*="col-"] {
    max-width: 500px;
  }

  .auth-screen .glass-card {
    padding: 1.85rem 1.6rem !important;
    border-radius: 22px;
  }
}

.glass-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.22), rgba(14, 165, 233, 0.16));
  color: var(--collecthub-chip-color);
  font-weight: 600;
  font-size: 0.82rem;
}

.vision-jobs-list {
  max-height: 320px;
  overflow-y: auto;
  border-radius: 18px;
  scrollbar-gutter: stable both-edges;
}

@media (min-width: 1200px) {
  .vision-jobs-list {
    max-height: 420px;
  }
}

.vision-jobs-list .list-group-item.active {
  color: #fff;
}

.vision-jobs-list .list-group-item.active .text-muted,
.vision-jobs-list .list-group-item.active .small,
.vision-jobs-list .list-group-item.active .fw-semibold {
  color: rgba(255, 255, 255, 0.88) !important;
}

.vision-jobs-list .list-group-item.active .badge {
  background-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.vision-jobs-list .list-group-item.active .btn-outline-danger {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}

.vision-jobs-list .list-group-item.active .btn-outline-danger:hover {
  background-color: rgba(255, 76, 76, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.9);
}


.icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--collecthub-icon-circle-bg);
  color: var(--collecthub-icon-circle-color);
  font-size: 1.2rem;
}

.table-glass {
  border-radius: 1.25rem;
  overflow: hidden;
  border: none;
  background: transparent;
  box-shadow: none;
}


.table-glass thead {
  background-color: transparent;
  color: var(--collecthub-muted-color);
  border-bottom: 1px solid var(--collecthub-table-border);
}


.table-glass tbody tr {
  background-color: transparent;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.table-glass tbody tr:hover {
  background-color: rgba(99, 102, 241, 0.05);
}

.table-glass tbody td {
  background-color: transparent;
}

:root[data-bs-theme="dark"] .table-glass tbody tr:hover {
  background-color: rgba(79, 70, 229, 0.24);
}

:root[data-bs-theme="dark"] .table-glass {
  border: none;
  background: transparent;
  box-shadow: none;
}


.table-glass tbody tr + tr {
  border-top: 1px solid var(--collecthub-table-border);
}


.form-control,
  .form-select {
    border-radius: 0.75rem;
    border-color: var(--collecthub-border-input);
    background-color: var(--collecthub-input-bg);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }


.form-control:focus,
  .form-select:focus {
    border-color: var(--collecthub-input-focus-border);
    box-shadow: 0 0 0 0.15rem var(--collecthub-input-focus-shadow);
  }


.btn-soft-light {
  background-color: var(--collecthub-btn-soft-light-bg);
  border: 1px solid var(--collecthub-border-strong);
  color: var(--collecthub-btn-soft-light-color);
}

.btn-soft-light:hover {
  background-color: var(--collecthub-btn-soft-light-hover);
}

.card {
  background-color: var(--collecthub-surface-card);
  border: 1px solid var(--collecthub-border-strong);
  border-radius: 20px;
  box-shadow: var(--collecthub-shadow-soft);
  backdrop-filter: blur(18px);
}

.modal-content {
  background-color: var(--collecthub-surface-strong);
  border-radius: 24px;
  border: 1px solid var(--collecthub-border-soft);
  box-shadow: var(--collecthub-shadow-strong);
  backdrop-filter: blur(24px);
}

hr {
  border-color: var(--collecthub-border-soft);
  opacity: 1;
}

.card-header,
.modal-header,
.modal-footer {
  background-color: var(--collecthub-surface-panel);
  border-color: var(--collecthub-border-soft);
  backdrop-filter: blur(12px);
}

.dropdown-menu {
  background-color: var(--collecthub-surface-dropdown);
  border: 1px solid var(--collecthub-border-strong);
  border-radius: 16px;
  backdrop-filter: blur(14px);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--collecthub-dropdown-hover-bg);
}

.navbar[data-bs-theme="dark"] .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.6);
}

.navbar[data-bs-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

#primaryNav.offcanvas {
  z-index: 1095;
}


.offcanvas-backdrop.show {
  backdrop-filter: blur(6px);
  background: var(--collecthub-overlay-scrim);
}

.offcanvas-collecthub {
  background-color: var(--collecthub-mobile-panel-bg);
  color: var(--collecthub-mobile-panel-color);
  border-left: 1px solid var(--collecthub-border-mobile);
}

.offcanvas-collecthub .mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.offcanvas-collecthub .mobile-nav-header .controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.offcanvas-collecthub .mobile-nav-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.offcanvas-collecthub .theme-toggle-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.45);
}
.offcanvas-collecthub .theme-toggle-label {
  font-size: 0.78rem;
}


:root[data-bs-theme="dark"] .offcanvas-collecthub .theme-toggle-btn {
  border-color: rgba(148, 163, 184, 0.45);
}

.offcanvas-collecthub .mobile-nav-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.offcanvas-collecthub .mobile-nav-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.offcanvas-collecthub .mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--collecthub-mobile-link-bg);
  color: var(--collecthub-mobile-link-color);
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.offcanvas-collecthub .mobile-nav-link:hover,
.offcanvas-collecthub .mobile-nav-link:focus {
  background: var(--collecthub-mobile-link-hover-bg);
  color: #fff;
  transform: translateY(-2px);
}

.offcanvas-collecthub .mobile-nav-link.is-active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.65), rgba(129, 140, 248, 0.45));
  color: #fff;
}

.offcanvas-collecthub .mobile-nav-link-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--collecthub-mobile-link-icon-bg);
  font-size: 1.35rem;
}

.offcanvas-collecthub .mobile-nav-link-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.offcanvas-collecthub .mobile-nav-link-label {
  font-weight: 600;
  font-size: 1rem;
}

.offcanvas-collecthub .mobile-nav-link-description {
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.offcanvas-collecthub .mobile-nav-link-caret {
  font-size: 1rem;
  opacity: 0.65;
}

.offcanvas-collecthub .mobile-nav-auth .btn {
  border-radius: 12px;
}

.offcanvas-collecthub .mobile-nav-footer {
  border-top: 1px solid var(--collecthub-border-mobile);
}

:root[data-bs-theme="dark"] .offcanvas-backdrop.show {
  background: rgba(2, 6, 23, 0.82);
}

:root[data-bs-theme="dark"] .offcanvas-collecthub {
  background-color: var(--collecthub-mobile-panel-bg);
  color: var(--collecthub-mobile-panel-color);
  border-left: 1px solid var(--collecthub-border-mobile);
}


@media (min-width: 992px) {
  .navbar-nav .nav-link {
    border-radius: 999px;
  }
  .navbar-nav .nav-link.active {
    background: var(--collecthub-navbar-active-bg);
  }
}


/* Item title truncation */
.item-title-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  min-width: 0;
}

.item-title-thumb {
  flex-shrink: 0;
}

.item-title-main,
.item-title-row {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.35rem;
  row-gap: 0.2rem;
}

.item-title-text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-title-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.item-title-badges .badge,
.item-title-badge {
  white-space: nowrap;
}


.table-modern thead th {
  background: transparent;
  border-top: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--collecthub-muted-color);
  padding: 0.85rem 1.1rem;
}

.table-modern tbody tr {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.table-modern tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-1px);
}

.table-modern td {
  border-color: rgba(148, 163, 184, 0.12);
  vertical-align: middle;
  padding: 0.85rem 1.1rem;
  background: transparent;
}

.table-modern,
.table-modern > :not(caption) > * {
  border-color: rgba(148, 163, 184, 0.12);
}

.table-modern > :not(caption) > * > * {
  border-color: rgba(148, 163, 184, 0.12);
}

:root[data-bs-theme="dark"] .table-modern tbody tr:hover {
  background: rgba(99, 102, 241, 0.12);
}

:root[data-bs-theme="dark"] .table-modern thead th {
  border-bottom-color: rgba(129, 140, 248, 0.26);
}

:root[data-bs-theme="dark"] .table-modern tbody tr,
:root[data-bs-theme="dark"] .table-modern td {
  border-color: rgba(129, 140, 248, 0.14);
}

:root[data-bs-theme="dark"] .table-modern,
:root[data-bs-theme="dark"] .table-modern > :not(caption) > * {
  border-color: rgba(129, 140, 248, 0.14);
}

:root[data-bs-theme="dark"] .table-modern > :not(caption) > * > * {
  border-color: rgba(129, 140, 248, 0.14);
}
