/*
  Weatherblazer CRM professional responsive refresh
  Requested palette: accent interpreted as valid #FF512F, navy #0F253E.
*/
:root {
  --wb-navy: #0F253E;
  --wb-navy-2: #183A5B;
  --wb-accent: #FF512F;
  --wb-accent-2: #FF7A45;
  --wb-ink: #17263A;
  --wb-muted: #6C7A89;
  --wb-surface: #FFFFFF;
  --wb-soft: #F4F7FB;
  --wb-border: #E6EDF5;
  --wb-shadow: 0 18px 45px rgba(15, 37, 62, 0.12);
  --wb-shadow-soft: 0 10px 28px rgba(15, 37, 62, 0.08);
  --bs-primary: var(--wb-accent);
  --bs-primary-rgb: 255, 81, 47;
  --bs-body-color: var(--wb-ink);
  --bs-body-bg: var(--wb-soft);
}

html {
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  color: var(--wb-ink);
  background:
    radial-gradient(circle at top left, rgba(255, 81, 47, 0.10), transparent 28rem),
    radial-gradient(circle at 100% 0, rgba(15, 37, 62, 0.10), transparent 30rem),
    linear-gradient(180deg, #F7FAFD 0%, #EEF4FA 100%) !important;
}

a {
  color: var(--wb-accent);
}

a:hover {
  color: #D93E22;
}

/* Shell */
.layout-wrapper,
.layout-container,
.layout-page,
.content-wrapper {
  background: transparent !important;
  min-width: 0 !important;
}

.content-wrapper.container-xxl,
.container-xxl.flex-grow-1.container-p-y {
  max-width: 100% !important;
}

.container-p-y {
  padding: 1.25rem 1.5rem 1.75rem !important;
}

.layout-navbar.navbar-detached {
  min-height: 4.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.25rem !important;
  background:
    linear-gradient(135deg, rgba(15, 37, 62, 0.98), rgba(24, 58, 91, 0.96)) !important;
  box-shadow: 0 16px 40px rgba(15, 37, 62, 0.20);
  color: #FFFFFF;
  backdrop-filter: blur(16px);
}

.layout-navbar .navbar-nav-right {
  gap: 0.75rem;
}

.layout-navbar .nav-link,
.layout-navbar .nav-link i,
.layout-navbar .dropdown-toggle,
.layout-navbar .navbar-nav .nav-item > a {
  color: rgba(255, 255, 255, 0.94) !important;
}

.layout-navbar .avatar-initials {
  background: linear-gradient(135deg, var(--wb-accent), var(--wb-accent-2)) !important;
  color: #FFFFFF !important;
  box-shadow: 0 10px 22px rgba(255, 81, 47, 0.28);
}

.layout-navbar .dropdown-menu {
  border: 1px solid var(--wb-border);
  border-radius: 1rem;
  box-shadow: var(--wb-shadow);
  overflow: hidden;
}

.layout-navbar .dropdown-item {
  border-radius: 0.6rem;
  margin: 0.15rem 0.35rem;
  width: calc(100% - 0.7rem);
}

.layout-navbar .dropdown-item:hover,
.layout-navbar .dropdown-item:focus {
  background: rgba(255, 81, 47, 0.10);
  color: var(--wb-accent);
}

/* Mobile hamburger: always left aligned, large touch target */
.layout-navbar .layout-menu-toggle {
  margin-left: 0 !important;
}

.layout-navbar .layout-menu-toggle .nav-link {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--wb-accent), var(--wb-accent-2));
  box-shadow: 0 12px 24px rgba(255, 81, 47, 0.28);
}

.layout-navbar .layout-menu-toggle .bx-menu {
  color: #FFFFFF !important;
  font-size: 1.7rem !important;
}

/* Sidebar */
.layout-menu.menu-vertical {
  width: 17.5rem !important;
  border-right: 0;
  background:
    linear-gradient(180deg, #0F253E 0%, #112A47 48%, #081827 100%) !important;
  box-shadow: 18px 0 42px rgba(15, 37, 62, 0.14);
}

.bg-menu-theme {
  background-color: var(--wb-navy) !important;
  color: rgba(255, 255, 255, 0.78);
}

.layout-menu .app-brand {
  min-height: 5.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}

.app-brand-logo img {
  max-width: 7.75rem;
  max-height: 3.25rem;
  object-fit: contain;
  border-radius: 0.85rem;
  background: #FFFFFF;
  padding: 0.28rem;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.16);
}

.app-brand-title {
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
}

.app-brand-subtitle {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-inner {
  padding: 0.85rem 0.7rem 1.5rem !important;
}

.menu-vertical .menu-item {
  margin: 0.18rem 0;
}

.menu-vertical .menu-item .menu-link {
  min-height: 2.75rem;
  margin: 0;
  padding: 0.72rem 0.95rem !important;
  border-radius: 0.95rem;
  color: rgba(255, 255, 255, 0.78) !important;
  font-weight: 650;
  letter-spacing: 0.005em;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.menu-vertical .menu-item .menu-link:hover,
.menu-vertical .menu-item.open > .menu-toggle {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  transform: translateX(2px);
}

.menu-vertical .menu-item.active > .menu-link,
.menu-vertical .menu-item.active:not(.open) > .menu-link {
  background: linear-gradient(135deg, var(--wb-accent), var(--wb-accent-2)) !important;
  color: #FFFFFF !important;
  box-shadow: 0 12px 24px rgba(255, 81, 47, 0.22);
}

.menu-vertical .menu-item.active > .menu-link .menu-icon,
.menu-vertical .menu-item .menu-link:hover .menu-icon,
.menu-vertical .menu-item.open > .menu-toggle .menu-icon {
  color: #FFFFFF !important;
}

.menu-vertical .menu-icon {
  width: 1.45rem;
  min-width: 1.45rem;
  margin-right: 0.7rem !important;
  color: rgba(255, 255, 255, 0.58) !important;
}

.menu-vertical .menu-sub {
  margin: 0.35rem 0 0.45rem 0.45rem !important;
  padding-left: 0.65rem !important;
  border-left: 1px solid rgba(255, 255, 255, 0.10);
}

.menu-vertical .menu-sub .menu-link {
  min-height: 2.35rem;
  padding: 0.55rem 0.8rem !important;
  font-size: 0.89rem;
  color: rgba(255, 255, 255, 0.64) !important;
}

.menu-vertical .menu-sub .menu-item.active > .menu-link {
  background: rgba(255, 81, 47, 0.18) !important;
  color: #FFFFFF !important;
  box-shadow: none;
}

.menu-header,
.menu-header-text {
  color: rgba(255, 255, 255, 0.46) !important;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.menu-inner-shadow {
  background: linear-gradient(#0F253E 20%, rgba(15, 37, 62, 0)) !important;
}

.sidebar-toggle-btn {
  top: 4.6rem;
  right: -0.8rem;
  bottom: auto;
  width: 1.9rem;
  height: 1.9rem;
  border-color: #FFFFFF;
  background: linear-gradient(135deg, var(--wb-accent), var(--wb-accent-2)) !important;
  box-shadow: 0 12px 26px rgba(255, 81, 47, 0.26);
}

.layout-wrapper.menu-collapsed .layout-menu.menu-vertical {
  width: 4.9rem !important;
}

.layout-wrapper.menu-collapsed .layout-menu.menu-vertical .menu-link {
  justify-content: center !important;
}

.layout-wrapper.menu-collapsed .layout-menu.menu-vertical .menu-icon {
  margin-right: 0 !important;
}

.layout-wrapper.menu-collapsed .app-brand {
  justify-content: center !important;
  padding-left: 0.65rem !important;
  padding-right: 0.65rem !important;
}

/* Cards, panels and lists */
.card {
  border: 1px solid rgba(230, 237, 245, 0.88) !important;
  border-radius: 1.2rem !important;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--wb-shadow-soft) !important;
}

.card-header {
  border-bottom: 1px solid var(--wb-border) !important;
  border-radius: 1.2rem 1.2rem 0 0 !important;
  background: linear-gradient(180deg, #FFFFFF, #FAFCFE) !important;
  color: var(--wb-navy);
}

.card-title,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
h1, h2, h3, h4, h5, h6 {
  color: var(--wb-navy);
  font-weight: 800;
}

.kpi-card,
.contact-card,
.customer-card,
.employee-card,
.filter-card,
.history-card,
.employee-profile-card,
.conversion-card {
  border: 1px solid rgba(230, 237, 245, 0.9) !important;
  box-shadow: var(--wb-shadow-soft) !important;
}

.kpi-card:hover,
.contact-card:hover,
.customer-card:hover,
.employee-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--wb-shadow) !important;
}

.gradient-primary,
.bg-primary,
.btn-primary {
  background: linear-gradient(135deg, var(--wb-accent), var(--wb-accent-2)) !important;
  color: #FFFFFF !important;
}

.gradient-primary *,
.bg-primary *,
.btn-primary *,
.btn-warning,
.btn-warning *,
.badge.bg-primary,
.badge.bg-warning {
  color: #FFFFFF !important;
}

.text-primary {
  color: var(--wb-accent) !important;
}

.bg-label-primary {
  background: rgba(255, 81, 47, 0.12) !important;
  color: var(--wb-accent) !important;
}

.border-primary {
  border-color: var(--wb-accent) !important;
}

.btn {
  min-height: 2.5rem;
  border-radius: 0.8rem;
  font-weight: 750;
  box-shadow: none;
}

.btn-sm {
  min-height: 2.15rem;
  border-radius: 0.68rem;
}

.btn-primary {
  border-color: var(--wb-accent) !important;
  color: #FFFFFF !important;
  box-shadow: 0 12px 24px rgba(255, 81, 47, 0.22) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  border-color: #E84728 !important;
  filter: brightness(0.98);
}

.btn-outline-primary {
  border-color: var(--wb-accent) !important;
  color: var(--wb-accent) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--wb-accent) !important;
  color: #FFFFFF !important;
}

/* Forms */
.form-label {
  color: var(--wb-navy);
  font-weight: 750;
}

.form-control,
.form-select,
.input-group-text,
select,
textarea {
  border-color: #DAE4EF !important;
  border-radius: 0.85rem !important;
  color: var(--wb-ink);
}

.form-control,
.form-select,
select {
  min-height: 2.85rem;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: var(--wb-accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 81, 47, 0.14) !important;
}

.input-group .form-control {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.input-group .input-group-text {
  background: #F8FBFE;
}

/* Tables */
.table-responsive {
  border-radius: 1rem;
  border: 1px solid var(--wb-border);
  background: #FFFFFF;
  -webkit-overflow-scrolling: touch;
}

.table {
  margin-bottom: 0;
  color: var(--wb-ink);
}

.table thead th,
table.dataTable thead th {
  background: #F3F7FB !important;
  color: var(--wb-navy) !important;
  border-bottom: 1px solid var(--wb-border) !important;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table tbody tr {
  transition: background-color 0.15s ease;
}

.table-hover > tbody > tr:hover {
  background: rgba(255, 81, 47, 0.055) !important;
}

.table td,
.table th {
  vertical-align: middle;
}

.badge {
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.alert {
  border: 0;
  border-radius: 1rem;
  box-shadow: var(--wb-shadow-soft);
}

.modal-content {
  border: 1px solid var(--wb-border);
  border-radius: 1.25rem;
  box-shadow: var(--wb-shadow);
}

.modal-header,
.modal-footer {
  border-color: var(--wb-border);
}

/* Guest/auth screens */
.authentication-wrapper {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 81, 47, 0.18), transparent 22rem),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.13), transparent 18rem),
    linear-gradient(135deg, var(--wb-navy), #071828 78%) !important;
}

.authentication-inner {
  max-width: 28rem;
  width: 100%;
}

.authentication-wrapper .app-brand img {
  max-width: 11.5rem !important;
  border-radius: 1rem;
  background: #FFFFFF;
  padding: 0.45rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.authentication-wrapper .card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28) !important;
}

.authentication-wrapper .card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 0.35rem;
  background: linear-gradient(90deg, var(--wb-accent), var(--wb-accent-2));
}

.authentication-wrapper .card-body {
  padding: 2rem !important;
}

.authentication-wrapper h4 {
  color: var(--wb-navy);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 900;
}

.authentication-wrapper p {
  color: var(--wb-muted);
}

/* Desktop wide screens */
@media (min-width: 1400px) {
  .container-p-y {
    padding: 1.5rem 2rem 2rem !important;
  }

  .layout-navbar.navbar-detached {
    max-width: calc(100% - 3rem) !important;
  }
}

/* Tablet + mobile off-canvas */
@media (max-width: 1199.98px) {
  .layout-menu.menu-vertical {
    width: min(18rem, 82vw) !important;
  }

  .layout-wrapper.menu-collapsed .layout-menu.menu-vertical {
    width: min(18rem, 82vw) !important;
  }

  .layout-wrapper.menu-collapsed .layout-menu.menu-vertical .menu-text,
  .layout-wrapper.menu-collapsed .layout-menu.menu-vertical .menu-sub,
  .layout-wrapper.menu-collapsed .layout-menu.menu-vertical .menu-inner-shadow {
    display: block !important;
  }

  .layout-wrapper.menu-collapsed .layout-menu.menu-vertical .app-brand .menu-text {
    display: flex !important;
  }

  .layout-wrapper.menu-collapsed .layout-menu.menu-vertical .menu-link {
    justify-content: flex-start !important;
  }

  .layout-wrapper.menu-collapsed .layout-menu.menu-vertical .menu-icon {
    margin-right: 0.7rem !important;
  }

  .sidebar-toggle-btn {
    display: none !important;
  }

  .layout-navbar.navbar-detached {
    width: calc(100% - 1.25rem) !important;
    margin: 0.65rem 0.625rem 0 !important;
    padding: 0 0.75rem !important;
    border-radius: 1rem !important;
  }

  #navbar-collapse > .d-flex.d-xl-none {
    order: 0;
    margin-left: 0 !important;
    margin-right: 0.65rem !important;
  }

  #navbar-collapse > .navbar-nav {
    order: 2;
  }

  .layout-navbar .navbar-nav-right {
    justify-content: space-between;
  }

  .layout-overlay {
    background: rgba(5, 15, 25, 0.74) !important;
    backdrop-filter: blur(2px);
  }

  .container-p-y {
    padding: 1rem 0.85rem 1.5rem !important;
  }
}

/* Phones */
@media (max-width: 767.98px) {
  body {
    min-height: 100vh;
    background:
      radial-gradient(circle at top left, rgba(255, 81, 47, 0.16), transparent 17rem),
      linear-gradient(180deg, #F7FAFC 0%, #EAF1F7 100%) !important;
  }

  .layout-wrapper {
    width: 100%;
    max-width: 30rem;
    min-height: 100vh;
    margin: 0 auto;
    overflow-x: hidden !important;
  }

  .layout-page,
  .content-wrapper,
  .container-xxl.flex-grow-1.container-p-y,
  .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  html {
    font-size: 15px;
  }

  .layout-navbar.navbar-detached {
    position: sticky;
    top: 0.65rem;
    z-index: 1040;
    min-height: 4.65rem;
    border-radius: 1.35rem !important;
    box-shadow: 0 18px 44px rgba(15, 37, 62, 0.24);
  }

  .layout-navbar .layout-menu-toggle .nav-link {
    width: 3.05rem;
    height: 3.05rem;
    border-radius: 1rem;
  }

  .navbar-nav .dropdown-menu {
    left: 0.7rem !important;
    width: calc(100vw - 1.4rem) !important;
    min-width: 0 !important;
  }

  .card {
    border-radius: 1.35rem !important;
    box-shadow: 0 18px 42px rgba(15, 37, 62, 0.10) !important;
  }

  .card-header {
    border-radius: 1.35rem 1.35rem 0 0 !important;
  }

  .card-body,
  .card-header {
    padding: 1rem !important;
  }

  .row {
    --bs-gutter-x: 0.85rem;
    --bs-gutter-y: 0.85rem;
  }

  .btn {
    width: auto;
    white-space: normal;
  }

  .d-flex.justify-content-between,
  .card-header.d-flex {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .form-control,
  .form-select,
  select,
  textarea {
    font-size: 16px !important;
    max-width: 100% !important;
  }

  .container-p-y .d-flex.gap-1,
  .container-p-y .d-flex.gap-2,
  .container-p-y .d-flex.gap-3,
  .input-group {
    flex-wrap: wrap;
  }

  .input-group > .form-control,
  .input-group > .form-select,
  .input-group > .btn,
  .input-group > .input-group-text {
    flex: 1 1 100%;
    width: 100%;
    border-radius: 0.85rem !important;
  }

  .ck-editor,
  .ck-editor__main,
  .ck-editor__editable,
  .choices,
  .choices__inner {
    max-width: 100% !important;
  }

  .table-responsive {
    margin-left: -0.15rem;
    margin-right: -0.15rem;
    overflow-x: visible !important;
    border: 0;
    background: transparent;
  }

  .table {
    min-width: 0 !important;
    width: 100% !important;
  }

  .table th,
  .table td {
    padding: 0.75rem 0.85rem;
  }

  .table-responsive.text-nowrap,
  .table-responsive .text-nowrap,
  .table.text-nowrap {
    white-space: normal !important;
  }

  .table-responsive > .table:not(.mobile-keep-table) {
    display: block;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
  }

  .table-responsive > .table:not(.mobile-keep-table) thead {
    display: none;
  }

  .table-responsive > .table:not(.mobile-keep-table) tbody,
  .table-responsive > .table:not(.mobile-keep-table) tr,
  .table-responsive > .table:not(.mobile-keep-table) td {
    display: block;
    width: 100%;
  }

  .table-responsive > .table:not(.mobile-keep-table) tr {
    margin-bottom: 0.85rem;
    border: 1px solid var(--wb-border);
    border-radius: 1rem;
    background:
      radial-gradient(circle at top left, rgba(255, 81, 47, 0.08), transparent 35%),
      #FFFFFF;
    box-shadow: var(--wb-shadow-soft);
    overflow: hidden;
  }

  .table-responsive > .table:not(.mobile-keep-table) td {
    min-height: 2.75rem;
    display: grid;
    grid-template-columns: minmax(7.5rem, 42%) minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--wb-border) !important;
    text-align: right !important;
    white-space: normal !important;
    word-break: break-word;
  }

  .table-responsive > .table:not(.mobile-keep-table) td:last-child {
    border-bottom: 0 !important;
  }

  .table-responsive > .table:not(.mobile-keep-table) td::before {
    content: attr(data-label);
    color: var(--wb-muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
  }

  .table-responsive > .table:not(.mobile-keep-table) td[colspan] {
    display: block;
    text-align: center !important;
  }

  .table-responsive > .table:not(.mobile-keep-table) td[colspan]::before {
    display: none;
  }

  .table-responsive > .table:not(.mobile-keep-table) td .btn,
  .table-responsive > .table:not(.mobile-keep-table) td form {
    margin-top: 0.25rem;
  }

  .authentication-wrapper .container-xxl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .authentication-wrapper .card-body {
    padding: 1.35rem !important;
  }

}

/* Very small phones */
@media (max-width: 420px) {
  .container-p-y {
    padding-left: 0.7rem !important;
    padding-right: 0.7rem !important;
  }

  .layout-navbar.navbar-detached {
    width: calc(100% - 0.8rem) !important;
    margin-left: 0.4rem !important;
    margin-right: 0.4rem !important;
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }

  #punchBtnContainer .btn {
    min-width: 2.4rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .avatar,
  .avatar img,
  .avatar-initials {
    width: 2.25rem !important;
    height: 2.25rem !important;
  }
}

/* Requested corrections */
.layout-menu ul,
.layout-menu li,
.menu-inner,
.menu-sub {
  list-style: none !important;
}

.layout-menu li::marker,
.menu-inner li::marker,
.menu-sub li::marker {
  content: "" !important;
  font-size: 0 !important;
}

.bg-menu-theme .menu-inner > .menu-item.open > .menu-sub::before,
.bg-menu-theme .menu-inner > .menu-item.open .menu-item.open > .menu-toggle::before,
.bg-menu-theme .menu-inner > .menu-item.open .menu-item.active > .menu-link::before,
.menu-vertical .menu-sub .menu-link::before,
.menu-vertical .menu-sub .menu-toggle::before {
  display: none !important;
  content: none !important;
}

.menu-vertical .menu-item .menu-link,
.menu-vertical .menu-sub .menu-link,
.menu-vertical .menu-item .menu-link .menu-text,
.menu-vertical .menu-sub .menu-link .menu-text,
.menu-vertical .menu-icon,
.menu-vertical .menu-item .menu-link:hover,
.menu-vertical .menu-item.open > .menu-toggle {
  color: #FFFFFF !important;
}

.menu-vertical .menu-item.active > .menu-link,
.menu-vertical .menu-item.active:not(.open) > .menu-link,
.menu-vertical .menu-sub .menu-item.active > .menu-link,
.btn-primary,
.gradient-primary,
.sidebar-toggle-btn,
.layout-navbar .layout-menu-toggle .nav-link {
  color: #FFFFFF !important;
}

.menu-vertical .menu-item.active > .menu-link .menu-icon,
.menu-vertical .menu-item.active:not(.open) > .menu-link .menu-icon,
.menu-vertical .menu-item.active > .menu-link .menu-text,
.menu-vertical .menu-item.active:not(.open) > .menu-link .menu-text,
.menu-vertical .menu-sub .menu-item.active > .menu-link .menu-text,
.layout-navbar .layout-menu-toggle .bx-menu,
.btn-primary i,
.gradient-primary i {
  color: #FFFFFF !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  color: #FFFFFF !important;
}

/* Desktop sidebar collapse fix: use a hard two-column shell so the page never
   shrinks to intrinsic content width after sidebar-toggle-btn is clicked. */
@media (min-width: 1200px) {
  :root {
    --wb-sidebar-current: 17.5rem;
  }

  .layout-wrapper.menu-collapsed {
    --wb-sidebar-current: 4.5rem;
  }

  .layout-container {
    display: grid !important;
    grid-template-columns: var(--wb-sidebar-current) minmax(0, 1fr) !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 100vh !important;
  }

  .layout-menu.menu-vertical {
    grid-column: 1 !important;
    flex: 0 0 var(--wb-sidebar-current) !important;
    width: var(--wb-sidebar-current) !important;
    min-width: var(--wb-sidebar-current) !important;
    max-width: var(--wb-sidebar-current) !important;
    overflow: visible !important;
  }

  .layout-page {
    grid-column: 2 !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow-x: hidden !important;
  }

  .layout-wrapper.menu-collapsed .layout-menu.menu-vertical {
    flex-basis: var(--wb-sidebar-current) !important;
    width: var(--wb-sidebar-current) !important;
    min-width: var(--wb-sidebar-current) !important;
    max-width: var(--wb-sidebar-current) !important;
  }

  .layout-wrapper.menu-collapsed .layout-menu.menu-vertical .menu-inner {
    overflow-x: hidden !important;
  }

  .layout-wrapper.menu-collapsed .layout-menu.menu-vertical .menu-link {
    width: calc(var(--wb-sidebar-current) - 1.125rem) !important;
    min-width: 0 !important;
    max-width: calc(var(--wb-sidebar-current) - 1.125rem) !important;
  }

  .layout-wrapper.menu-collapsed .layout-page {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
  }

  .layout-navbar,
  .layout-navbar.container-xxl,
  .content-wrapper,
  .content-wrapper.container-xxl,
  .container-xxl.flex-grow-1.container-p-y {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .layout-navbar,
  .layout-navbar.container-xxl {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 4.25rem !important;
  }

  .layout-wrapper.menu-collapsed .menu-header,
  .layout-wrapper.menu-collapsed .menu-header-text,
  .layout-wrapper.menu-collapsed .app-brand .menu-text {
    display: none !important;
  }

  .layout-wrapper.menu-collapsed .menu-inner {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }
}

/* Employee management: no horizontal table scroll; card-first directory */
.employee-directory .directory-toolbar {
  gap: 1rem;
  flex-wrap: wrap;
}

.employee-directory .filter-card .card-body {
  padding: 1.25rem !important;
}

.employee-directory .employee-list-grid {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

.employee-directory .employee-directory-card {
  height: 100%;
  overflow: hidden;
}

.min-w-0 {
  min-width: 0 !important;
}

.employee-directory .employee-avatar {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--wb-accent), var(--wb-accent-2));
  color: var(--wb-navy);
  color: #FFFFFF;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(255, 81, 47, 0.18);
  object-fit: cover;
}

.employee-directory .employee-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.employee-directory .employee-meta-item {
  padding: 0.75rem;
  border: 1px solid var(--wb-border);
  border-radius: 0.9rem;
  background: #F8FBFE;
}

.employee-directory .employee-meta-label {
  display: block;
  color: var(--wb-muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.employee-directory .employee-meta-value {
  color: var(--wb-navy);
  font-weight: 800;
  word-break: break-word;
}

.employee-directory .employee-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.employee-directory .employee-actions .btn,
.employee-directory .employee-actions form {
  flex: 0 0 auto;
}

/* Add/Edit employee mobile form */
.employee-form-page .employee-page-header {
  gap: 1rem;
  flex-wrap: wrap;
}

.employee-form-page .employee-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.65rem;
  border-bottom: 0;
}

.employee-form-page .employee-tabs .nav-item {
  margin: 0;
}

.employee-form-page .employee-tabs .nav-link {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--wb-border);
  border-radius: 0.9rem;
  background: #FFFFFF;
  color: var(--wb-navy);
  font-weight: 800;
  text-align: center;
}

.employee-form-page .employee-tabs .nav-link.active {
  border-color: var(--wb-accent);
  background: linear-gradient(135deg, var(--wb-accent), var(--wb-accent-2));
  color: #FFFFFF;
  box-shadow: 0 12px 24px rgba(255, 81, 47, 0.18);
}

.employee-form-page .tab-content > .tab-pane .card {
  overflow: hidden;
}

.employee-form-page .employee-submit-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 767.98px) {
  .employee-directory .directory-toolbar > *,
  .employee-directory .directory-toolbar .btn {
    width: 100%;
  }

  .employee-directory .employee-meta {
    grid-template-columns: 1fr;
  }

  .employee-directory .employee-actions .btn,
  .employee-directory .employee-actions form,
  .employee-directory .employee-actions form .btn {
    flex: 1 1 calc(50% - 0.5rem);
    width: 100%;
  }

  .employee-form-page .employee-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-form-page .employee-tabs .nav-link {
    min-height: 3rem;
    padding: 0.65rem 0.45rem;
    font-size: 0.86rem;
  }

  .employee-form-page .employee-page-header > *,
  .employee-form-page .employee-page-header .btn {
    width: 100%;
  }

  .employee-form-page .employee-submit-actions .btn {
    width: 100%;
    margin: 0 !important;
  }
}
