@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bs-primary: #6366F1;
  --bs-primary-rgb: 99,102,241;
  --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bs-body-font-size: 0.875rem;
  --bs-body-color: #1E293B;
  --bs-body-bg: #F1F5F9;
  --bs-border-color: #E2E8F0;
  --bs-border-radius: 0.625rem;
  --bs-card-border-color: #E2E8F0;
  --bs-card-cap-bg: transparent;

  --c-accent: #6366F1;
  --c-accent-hover: #4F46E5;
  --c-accent-light: #EEF2FF;
  --c-accent-text: #3730A3;

  --c-bg: #F1F5F9;
  --c-surface: #FFFFFF;
  --c-surface-2: #F8FAFC;
  --c-sidebar: #18181B;
  --c-sidebar-hover: #27272A;
  --c-sidebar-active: #3F3F46;

  --c-text: #1E293B;
  --c-text-2: #64748B;
  --c-text-3: #94A3B8;
  --c-text-inv: #F8FAFC;

  --c-border: #E2E8F0;
  --c-border-2: #CBD5E1;

  --c-success: #10B981;
  --c-success-bg: #ECFDF5;
  --c-danger: #EF4444;
  --c-danger-bg: #FEF2F2;
  --c-warning: #F59E0B;
  --c-warning-bg: #FFFBEB;
  --c-info: #3B82F6;
  --c-info-bg: #EFF6FF;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10);

  --ink: #0f0f0f;
  --ink-60: rgba(15, 15, 15, 0.6);
  --ink-30: rgba(15, 15, 15, 0.3);
  --ink-12: rgba(15, 15, 15, 0.12);
  --ink-06: rgba(15, 15, 15, 0.06);
  --paper: #f7f6f3;
  --surface: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
}

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

body {
  background: var(--paper);
  color: var(--c-text);
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

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

a:hover {
  color: var(--c-accent-hover);
  text-decoration: none;
}

/* Sidebar */
.wms-sidebar {
  width: 252px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: linear-gradient(180deg, #fff 0%, #f4f2ec 100%);
  border-right: 1px solid var(--ink-12);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
  transform: translateX(0);
  transition: width 280ms ease, transform 180ms ease;
  box-shadow: 0 12px 24px rgba(15, 15, 15, 0.08);
  border-radius: 0 22px 22px 0;
}

.wms-sidebar.is-collapsed {
  width: 70px;
}

.wms-sidebar.is-open {
  transform: translateX(0);
}

.sidebar-brand {
  margin: 14px 12px 10px;
  padding: 12px;
  border: 0.5px solid var(--ink-12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  white-space: nowrap;
  transition: padding 280ms ease;
}

.wms-sidebar.is-collapsed .sidebar-brand {
  padding: 12px 8px;
  justify-content: center;
}

.wms-sidebar.is-collapsed .sidebar-brand span,
.wms-sidebar.is-collapsed .sidebar-brand a {
  display: none;
}

.sidebar-brand a {
  color: var(--ink);
  text-decoration: none;
}

.sidebar-brand img {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  object-fit: cover;
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 12px 12px;
}

.sidebar-body::-webkit-scrollbar {
  width: 4px;
}

.sidebar-body::-webkit-scrollbar-thumb {
  background: var(--ink-30);
  border-radius: 4px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-30);
  text-transform: uppercase;
  padding: 12px 8px 6px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 280ms ease;
}

.wms-sidebar.is-collapsed .nav-section-label {
  opacity: 0;
  height: 0;
  padding: 0;
}

.wms-sidebar-nav,
.wms-sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--ink-60);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 140ms ease, transform 120ms ease;
  margin-bottom: 3px;
  border: 0.5px solid transparent;
  white-space: nowrap;
  overflow: hidden;
}

.wms-sidebar.is-collapsed .nav-item {
  justify-content: center;
  padding: 9px 8px;
}

.wms-sidebar.is-collapsed .nav-item span {
  display: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  border-color: var(--ink-12);
  transform: translateX(2px);
}

.nav-item.active {
  background: #fff;
  color: var(--ink);
  border: 0.5px solid var(--ink-12);
  box-shadow: 0 4px 12px rgba(15, 15, 15, 0.08);
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ink-60);
}

.sub-nav {
  margin: 2px 0 12px;
  padding-left: 12px !important;
  border-left: 1px dashed var(--ink-12);
  margin-left: 10px;
  transition: opacity 280ms ease, height 280ms ease;
}

.has-submenu > .sub-nav {
  display: none;
}

.has-submenu.open > .sub-nav {
  display: block;
}

.wms-sidebar.is-collapsed .sub-nav {
  display: none;
}

.submenu-caret {
  margin-left: auto;
  transition: transform 180ms ease;
}

.has-submenu.open > .nav-parent .submenu-caret {
  transform: rotate(180deg);
}

.wms-sidebar.is-collapsed .submenu-caret {
  display: none;
}

.sub-nav .nav-item {
  font-size: 12px;
  color: var(--ink-60);
  padding-left: 12px;
}

.sidebar-footer {
  padding: 10px 12px 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 0.5px solid var(--ink-12);
  border-radius: var(--radius);
  padding: 10px;
  overflow: hidden;
  transition: padding 280ms ease;
}

.wms-sidebar.is-collapsed .user-chip {
  padding: 10px 8px;
  justify-content: center;
}

.wms-sidebar.is-collapsed .user-chip > div:not(.user-avatar) {
  display: none;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e6f1fb;
  color: #185fa5;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}

.user-role {
  font-size: 11px;
  color: var(--ink-60);
  margin: 0;
}

/* Topbar */
.wms-topbar {
  height: 68px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f2ec 100%);
  border: 1px solid var(--ink-12);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  justify-content: unset;
  padding: 0 14px;
  gap: 16px;
  position: sticky;
  top: 10px;
  z-index: 70;
  margin-left: 252px;
  margin-right: 14px;
  width: calc(100% - 252px - 28px);
  border-radius: 999px;
  box-shadow: 0 16px 32px rgba(15, 15, 15, 0.12);
  box-sizing: border-box;
  transition: margin-left 280ms ease, width 280ms ease;
}

body.sidebar-collapsed .wms-topbar {
  margin-left: 70px;
  width: calc(100% - 70px - 28px);
}

.topbar-search-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  flex: 1 1 auto;
}

.topbar-search {
  max-width: 100%;
  background: #f8f8f8;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  height: 40px;
  padding: 0 14px 0 40px;
  font-size: 13px;
  color: #121317;
  outline: none;
  width: 100%;
  font-weight: 500;
  line-height: 40px;
  display: block;
}

.topbar-search-wrap i,
.topbar-search-wrap .feather,
.topbar-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: rgba(20, 20, 24, 0.62);
  stroke-width: 2;
  pointer-events: none;
  z-index: 2;
}

.topbar-search::placeholder {
  color: rgba(20, 20, 24, 0.56);
}

.topbar-search:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.topbar-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-toggle-btn {
  display: inline-flex;
}

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

.topbar-actions > * {
  flex-shrink: 0;
}

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--ink-12);
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-60);
  transition: background 140ms, border-color 140ms;
  position: relative;
}

.topbar-icon-btn:hover {
  background: #fff;
  border-color: var(--ink-30);
}

.topbar-icon-btn .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #1d9e75;
  color: #fff;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 10px;
  border: 2px solid #f4f2ec;
  padding: 0 4px;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: #0f1014;
}

.topbar-profile:hover {
  background: #fff;
  color: #0f1014;
}

.topbar-profile .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #111215;
  color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  font-family: 'DM Mono', monospace;
}

.topbar-profile-meta {
  line-height: 1.1;
}

.topbar-profile-name {
  font-size: 12px;
  font-weight: 500;
  color: #0f1014;
}

.topbar-profile-role {
  font-size: 11px;
  color: rgba(15, 16, 20, 0.62);
}

.topbar-actions .btn {
  height: 38px;
  border-radius: 999px !important;
  border: 1px solid var(--ink-12);
  box-shadow: none;
  padding: 0 14px;
}

.topbar-actions .btn-primary {
  background: #f5f5f5;
  color: #0f1014;
  font-weight: 600;
}

.topbar-actions .btn-primary:hover {
  background: #ffffff;
  color: #0f1014;
}

.wms-topbar .dropdown-menu {
  margin-top: 10px;
  border: 0.5px solid var(--ink-12);
  border-radius: 12px;
  box-shadow: 0 12px 20px rgba(15, 15, 15, 0.1);
}

.wms-topbar .dropdown-toggle::after {
  display: none !important;
}

.wms-topbar .dropdown-item-text {
  color: var(--ink);
}

.wms-topbar .dropdown-item {
  color: var(--ink-60);
}

.wms-topbar .dropdown-item:hover {
  color: var(--ink);
  background: #f4f2ec;
}

/* Main */
.wms-main {
  margin-left: 252px;
  width: calc(100% - 252px);
  min-width: 0;
  padding: 28px 32px;
  min-height: calc(100vh - 64px);
  background: var(--paper);
  transition: margin-left 280ms ease, width 280ms ease;
}

body.sidebar-collapsed .wms-main {
  margin-left: 70px;
  width: calc(100% - 70px);
}

.wms-main .container-fluid {
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
}

.wms-app-shell {
  min-height: 100vh;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.wms-main .row {
  row-gap: 16px;
}

.wms-main .row > [class*="col-"] {
  margin-bottom: 0;
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 4px;
}

.page-breadcrumb {
  font-size: 12px;
  color: var(--c-text-3);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* Cards */
.card,
.wms-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 160ms;
  overflow: hidden;
}

.wms-main .row > [class*="col-"] > .wms-card,
.wms-main .row > [class*="col-"] > .card {
  height: 100%;
}

.card:hover,
.wms-card:hover {
  box-shadow: var(--shadow-md);
}

.card-header,
.wms-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--c-border);
  background: transparent;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  margin: 0;
}

.card-body,
.wms-card-body {
  padding: 20px;
}

.wms-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  margin: 0;
}

.wms-card-header-tabs {
  margin-bottom: -14px;
}

.filter-wms-card,
.report-wms-card {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
}

.wms-card .wms-card {
  box-shadow: none;
  border: 1px solid var(--c-border);
}

.kpi-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  padding: 20px;
  border-left: 4px solid var(--c-accent);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-grid > [class*="col-"] {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.kpi-card.success {
  border-left-color: var(--c-success);
}

.kpi-card.danger {
  border-left-color: var(--c-danger);
}

.kpi-card.warning {
  border-left-color: var(--c-warning);
}

.kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-value {
  font-size: 30px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.1;
}

.kpi-delta {
  font-size: 12px;
  color: var(--c-success);
}

/* Forms */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
  height: 40px;
  padding: 0 12px;
  border: 0.5px solid var(--ink-12);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  width: 100%;
  transition: border 140ms, box-shadow 140ms;
  -webkit-appearance: none;
}

textarea.form-control,
textarea {
  height: auto;
  padding: 10px 12px;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--ink-30);
  box-shadow: 0 0 0 3px rgba(15, 15, 15, 0.06);
}

.form-control.is-valid {
  border-color: var(--c-success);
}

.form-control.is-invalid {
  border-color: var(--c-danger);
}

.valid-feedback {
  font-size: 12px;
  color: var(--c-success);
  margin-top: 4px;
}

.invalid-feedback {
  font-size: 12px;
  color: var(--c-danger);
  margin-top: 4px;
}

label,
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 6px;
}

/* Buttons */
.btn {
  border-radius: var(--radius-sm) !important;
  font-size: 13px;
  font-weight: 500;
  height: 38px;
  padding: 0 16px;
  border: 0.5px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 140ms;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary,
.btn-soft-primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn-primary:hover,
.btn-soft-primary:hover {
  background: var(--ink-60);
  color: #fff;
  border-color: var(--ink-60);
}

.btn-secondary,
.btn-outline-light,
.btn-light {
  background: var(--surface);
  color: var(--ink-60);
  border: 0.5px solid var(--ink-12);
}

.btn-secondary:hover,
.btn-outline-light:hover,
.btn-light:hover {
  background: #f9f8f5;
  color: var(--ink);
  border-color: var(--ink-30);
}

.btn-danger {
  background: var(--c-danger);
  color: #fff;
}

.btn-success {
  background: var(--c-success);
  color: #fff;
}

.btn-warning {
  background: var(--c-warning);
  color: #fff;
}

.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 15, 15, 0.08);
}

/* Badge */
.badge {
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
}

.badge-active,
.badge-success,
.badge-soft-success {
  background: var(--c-success-bg);
  color: var(--c-success);
}

.badge-pending,
.badge-warning,
.badge-soft-warning {
  background: var(--c-warning-bg);
  color: var(--c-warning);
}

.badge-danger,
.badge-soft-danger {
  background: var(--c-danger-bg);
  color: var(--c-danger);
}

.badge-info,
.badge-soft-info {
  background: var(--c-info-bg);
  color: var(--c-info);
}

/* Tables / DataTables */
.table {
  color: var(--c-text);
}

.table thead th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-text-2);
  border-top: 0;
  border-bottom: 1px solid var(--c-border);
}

.table td,
.table th {
  border-color: var(--c-border);
  vertical-align: middle;
}

table.dataTable thead th {
  background: var(--c-surface-2) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  color: var(--c-text-2) !important;
  border-bottom: 1px solid var(--c-border) !important;
  padding: 12px 16px !important;
}

table.dataTable tbody td {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--c-border) !important;
  vertical-align: middle !important;
}

table.dataTable tbody tr:hover td {
  background: var(--c-surface-2) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--c-accent) !important;
  color: #fff !important;
  border-radius: var(--r-md) !important;
  border: none !important;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--c-border) !important;
  border-radius: var(--r-xl) !important;
  padding: 6px 14px !important;
}

.dataTables_wrapper {
  overflow-x: auto;
}

.dataTables_wrapper .row {
  margin-left: 0;
  margin-right: 0;
}

/* Legacy Page Harmonization */
.wms-main .container-fluid > .row:first-child {
  margin-bottom: 12px;
}

.page-title-box {
  background: var(--surface);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(15, 15, 15, 0.05);
}

.page-title-box .row {
  align-items: center;
}

.page-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 2px;
}

.breadcrumb {
  margin: 0;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-item,
.breadcrumb-item a {
  color: var(--ink-60);
  font-size: 12px;
  font-weight: 400;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--ink-30);
}

.breadcrumb-item.active {
  color: var(--ink);
  font-weight: 500;
}

.button-items {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button-items > .btn {
  margin: 0 !important;
}

.header-title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

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

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

.wms-card,
.wms-card-body,
.wms-card-header,
.wms-card-title {
  font-family: 'DM Sans', -apple-system, sans-serif;
}

.wms-card .border {
  border: 1px solid var(--ink-12) !important;
}

.wms-card .gradient-warning,
.wms-card .gradient-success,
.wms-card .gradient-danger,
.wms-card .gradient-primary,
.wms-card .gradient-info {
  border-radius: 12px;
  border: 0 !important;
  box-shadow: none !important;
}

.wms-card .gradient-warning {
  background: #faeeda !important;
}

.wms-card .gradient-success {
  background: #e1f5ee !important;
}

.wms-card .gradient-danger {
  background: #fcebeb !important;
}

.wms-card .gradient-info,
.wms-card .gradient-primary {
  background: #e6f1fb !important;
}

.wms-card .gradient-warning .text-white,
.wms-card .gradient-success .text-white,
.wms-card .gradient-danger .text-white,
.wms-card .gradient-info .text-white,
.wms-card .gradient-primary .text-white {
  color: var(--ink) !important;
}

.wms-card .bg-light {
  background: #f9f8f5 !important;
}

.wms-main .tab-content > .tab-pane > .table-responsive,
.wms-main .wms-card .table-responsive {
  border: 1px solid var(--ink-12);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.table tfoot th {
  background: #faf9f6;
  border-top: 1px solid var(--ink-12) !important;
}

.table td .btn,
.table th .btn {
  margin-right: 6px;
}

.nav-tabs {
  border-bottom: 1px solid var(--ink-12);
  gap: 6px;
}

.nav-tabs .nav-link {
  border: 1px solid transparent;
  border-radius: 10px 10px 0 0;
  color: var(--ink-60);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  background: transparent;
}

.nav-tabs .nav-link:hover {
  color: var(--ink);
  background: #f6f4ef;
}

.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
  color: var(--ink);
  background: #fff;
  border-color: var(--ink-12) var(--ink-12) #fff;
}

.nav-pills .nav-link {
  border-radius: 10px;
  color: var(--ink-60);
  border: 1px solid transparent;
  font-weight: 500;
  padding: 8px 10px;
}

.nav-pills .nav-link:hover {
  background: #f6f4ef;
  color: var(--ink);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background: #fff;
  color: var(--ink);
  border-color: var(--ink-12);
  box-shadow: 0 6px 12px rgba(15, 15, 15, 0.06);
}

.input-group-text {
  border: 0.5px solid var(--ink-12);
  border-radius: var(--radius-sm);
  background: #f9f8f5;
  color: var(--ink-60);
  font-size: 12px;
  font-weight: 500;
  padding: 0 12px;
  height: 40px;
  display: flex;
  align-items: center;
}

.input-group-prepend .input-group-text {
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group-append .input-group-text {
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group-prepend + .form-control,
.input-group-prepend + input {
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.form-control + .input-group-append .input-group-text,
input + .input-group-append .input-group-text {
  border-left: 0.5px solid var(--ink-12);
}

.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child),
.input-group > .custom-file:not(:last-child) .custom-file-label,
.input-group > .custom-file:not(:last-child) .custom-file-label::after {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group > .input-group-append > .input-group-text,
.input-group > .input-group-prepend > .input-group-text {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Phone code select styling */
.wui-select-sm {
  height: 40px !important;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
  margin-right: -1px !important;
  min-width: 120px !important;
  padding: 0 12px !important;
}

.input-group .wui-select-sm + .wui-input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
  margin-left: -1px !important;
}

.input-group .wui-select-sm:focus {
  z-index: 3 !important;
}

.input-group .wui-input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

/* Input addon styling (for phone code dropdown) */
.input-addon {
  display: flex;
  align-items: center;
  border: 0.5px solid var(--ink-12);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.addon-prefix {
  padding: 8px 10px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--ink-60);
  background: var(--ink-06);
  border-right: 0.5px solid var(--ink-12);
  white-space: nowrap;
}

.addon-input {
  flex: 1;
  padding: 8px 10px;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  outline: none;
}

.input-addon.customer-select-wrap {
  overflow: visible;
  position: relative;
}

.input-addon.customer-select-wrap .choices {
  flex: 1;
  width: 100%;
  margin-bottom: 0;
}

.input-addon.customer-select-wrap .choices__inner {
  border: none;
  background: transparent;
  min-height: 36px;
  padding: 6px 10px 2px 0;
  font-size: 13px;
  color: var(--ink);
}

.input-addon.customer-select-wrap .choices[data-type*="select-one"] .choices__input {
  background: transparent;
  margin-bottom: 0;
  font-size: 13px;
  color: var(--ink);
  width: 100% !important;
}

.input-addon.customer-select-wrap .choices__list--single {
  padding: 0;
}

.input-addon.customer-select-wrap .choices__list--dropdown {
  z-index: 2000;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 18px rgba(15, 15, 15, 0.1);
  overflow: hidden;
}

.input-addon.customer-select-wrap .choices__list--dropdown .choices__item {
  font-size: 13px;
  color: var(--ink);
}

.select2-container .select2-selection--single {
  height: 40px !important;
  border: 1px solid var(--c-border) !important;
  border-radius: var(--r-md) !important;
  background: #fff !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 38px !important;
  color: var(--ink) !important;
  font-size: 13px;
  padding-left: 12px !important;
}

.select2-container .select2-selection--single .select2-selection__arrow {
  height: 38px !important;
  right: 8px !important;
}

.select2-dropdown {
  border: 1px solid var(--ink-12) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 18px rgba(15, 15, 15, 0.1);
}

.select2-search--dropdown .select2-search__field {
  border: 1px solid var(--c-border) !important;
  border-radius: 8px !important;
  height: 34px !important;
}

.custom-file-label {
  height: 40px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding-top: 9px;
  color: var(--ink-60);
}

.custom-file-label::after {
  height: 38px;
  border-left: 1px solid var(--c-border);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.loading-indicator {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(247, 246, 243, 0.72);
  backdrop-filter: blur(2px);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-border {
  width: 2.1rem;
  height: 2.1rem;
  border-width: 0.2em;
}

.modal-content {
  border: 0.5px solid var(--ink-12);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(15, 15, 15, 0.15);
  background: var(--surface);
}

.modal-header {
  border-bottom: 0.5px solid var(--ink-12);
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.85);
}

.modal-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.modal-body {
  padding: 20px;
  background: var(--surface);
}

.modal-footer {
  border-top: 0.5px solid var(--ink-12);
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.85);
  gap: 8px;
  display: flex;
  justify-content: flex-end;
}

.modal-footer .btn {
  min-width: 90px;
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  border-radius: var(--radius-sm) !important;
}

.modal-footer .btn.w-100 {
  min-width: auto;
}

.modal-backdrop.show {
  opacity: 0.5;
  background: rgba(15, 15, 15, 0.7);
}

.close {
  opacity: 0.6;
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-60);
  text-shadow: none;
  transition: opacity 140ms;
  padding: 0;
  background: transparent;
  border: none;
}

.close:hover {
  opacity: 1;
  color: var(--ink);
}

/* Global SweetAlert Styling */
.swal2-popup {
  border: 0.5px solid var(--ink-12) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 12px 36px rgba(15, 15, 15, 0.14) !important;
  font-family: 'DM Sans', sans-serif !important;
  background: var(--surface) !important;
}

.swal2-title {
  font-size: 17px !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
  letter-spacing: -0.2px !important;
}

.swal2-html-container {
  font-size: 13px !important;
  color: var(--ink-60) !important;
}

.swal2-styled {
  border-radius: var(--radius-sm) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 8px 14px !important;
  box-shadow: none !important;
}

.swal2-styled.swal2-confirm {
  background: var(--ink) !important;
  color: #fff !important;
}

.swal2-styled.swal2-cancel {
  background: #eef0f3 !important;
  color: #202734 !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'],
.swal2-icon.swal2-success .swal2-success-ring {
  border-color: #1D9E75 !important;
  color: #1D9E75 !important;
}

.swal2-input,
.swal2-select,
.swal2-textarea {
  border: 1px solid rgb(15 15 15 / 11%) !important;
  border-radius: var(--radius-sm) !important;
  background: #fff !important;
  color: var(--ink) !important;
  font-size: 13px !important;
  box-shadow: none !important;
}

.swal2-input:focus,
.swal2-select:focus,
.swal2-textarea:focus {
  border-color: rgba(15, 15, 15, 0.58) !important;
  box-shadow: 0 0 0 2px rgba(15, 15, 15, 0.1) !important;
}

.form-group {
  margin-bottom: 14px;
}

.form-group .col-form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-60);
  padding-top: 6px;
  padding-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group.row {
  margin-bottom: 14px;
}

.form-group.row .col-form-label {
  display: flex;
  align-items: center;
}

.img-fluid {
  border-radius: 10px;
}

/* Dropdown + misc component cleanup */
.dropdown-menu {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

.dropdown-item {
  color: var(--c-text);
  font-size: 13px;
}

.dropdown-item:hover {
  background: var(--c-surface-2);
}

.progress {
  background: var(--c-surface-2);
  border-radius: 999px;
}

.progress-bar {
  background: var(--c-accent);
}

.footer {
  margin-top: 16px;
  color: var(--c-text-2);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Auth */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
}

.auth-panel-left {
  width: 44%;
  background: var(--c-sidebar);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 56px;
  position: relative;
  overflow: hidden;
}

.auth-panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(99, 102, 241, 0.25) 0%, transparent 65%);
}

.auth-panel-left > * {
  position: relative;
  z-index: 1;
}

.auth-panel-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg);
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--c-surface);
  border-radius: var(--r-xl);
  padding: 40px 36px;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

.auth-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
}

.auth-sub {
  font-size: 14px;
  color: var(--c-text-2);
  margin: 0 0 28px;
}

.auth-brand {
  color: var(--c-text-inv);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
}

.auth-copy {
  color: #A1A1AA;
  max-width: 360px;
  margin: 0;
}

.otp-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.otp-input {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  border: 2px solid var(--c-border);
  border-radius: var(--r-lg);
  color: var(--c-text);
  background: var(--c-surface);
  outline: none;
}

.otp-input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* Compatibility overrides for legacy classes */
.text-white,
.text-white-50 {
  color: var(--c-text) !important;
}

.bg-light,
.bg-light-alt,
.bg-white,
.bg-soft-primary,
.bg-soft-success,
.bg-soft-info,
.bg-soft-danger,
.bg-soft-warning {
  background: var(--c-surface-2) !important;
  color: var(--c-text) !important;
}

.thead-light th {
  background: var(--c-surface-2) !important;
}

.report-card,
.gradient-blue,
.gradient-green,
.gradient-yellow,
.gradient-red,
.gradient-purple,
.gradient-success,
.gradient-warning,
.gradient-danger,
.gradient-indigo,
.gradient-emerald,
.gradient-cyan,
.gradient-amber {
  background: var(--c-surface) !important;
  border: 1px solid var(--c-border) !important;
}

.location-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  border-radius: var(--r-md);
}

.suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
}

.suggestion-item:hover {
  background-color: var(--c-surface-2);
}

#searchResults {
  margin-top: 6px;
  display: none;
}

@media (max-width: 1199.98px) {
  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 90;
  }

  .wms-sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    z-index: 100;
  }

  .wms-sidebar.is-open {
    transform: translateX(0);
  }

  .wms-topbar {
    grid-template-columns: minmax(180px, 1fr) auto;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    top: 0;
    border-radius: 0;
    padding: 0 12px;
    gap: 10px;
  }

  .wms-main {
    margin-left: 0;
    width: 100%;
    padding: 16px;
  }

  .sidebar-toggle-btn {
    display: inline-flex;
  }

  .topbar-search-wrap {
    max-width: 280px;
  }

  .auth-panel-left {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .page-title-box {
    padding: 12px;
  }

  .page-title {
    font-size: 18px;
  }

  .page-title-box .col-auto {
    width: 100%;
    margin-top: 10px;
  }

  .button-items {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .wms-main .tab-content > .tab-pane > .table-responsive,
  .wms-main .wms-card .table-responsive {
    border-radius: 10px;
  }

  .wms-topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    height: 56px;
    min-height: 56px;
    padding: 8px 12px;
    gap: 8px;
  }

  .topbar-left-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
  }

  .topbar-actions .btn span {
    display: none;
  }

  .topbar-profile {
    padding-right: 8px;
  }

  .topbar-search-wrap {
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar-search {
    max-width: 100%;
  }

  .wms-main {
    padding: 12px;
  }

  .page-header {
    margin-bottom: 14px;
  }

  .page-title {
    font-size: 18px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .card-header,
  .wms-card-header {
    padding: 14px 14px;
  }

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

  .btn {
    height: 36px;
    padding: 0 14px;
  }

  .auth-panel-right {
    padding: 20px 14px;
  }

  .auth-card {
    padding: 24px 18px;
  }
}
