/* ==========================================================================
   Waadaa Insure — Application Theme
   Global design layer loaded after vendor CSS. Restyles every page through
   shared classes, so individual templates need minimal changes.
   ========================================================================== */

:root {
  --wd-primary: #1d5fc4;
  --wd-primary-600: #174fa6;
  --wd-primary-700: #123f86;
  --wd-primary-50: #eef4fd;
  --wd-primary-100: #dbe7fb;
  --wd-accent: #19b4d6;
  --wd-gradient: linear-gradient(135deg, #1d5fc4 0%, #19b4d6 100%);

  --wd-success: #12a26b;
  --wd-success-50: #e7f7f0;
  --wd-warning: #e59a12;
  --wd-warning-50: #fdf4e3;
  --wd-danger: #dc3d4b;
  --wd-danger-50: #fdecee;
  --wd-info: #0e8fb3;
  --wd-info-50: #e5f5fa;

  --wd-bg: #f3f5f9;
  --wd-surface: #ffffff;
  --wd-surface-2: #f8fafc;
  --wd-border: #e4e8ef;
  --wd-border-strong: #d3d9e3;
  --wd-text: #1b2537;
  --wd-text-2: #4a5568;
  --wd-muted: #7b8798;

  --wd-sidebar-bg: #0e1a30;
  --wd-sidebar-bg-2: #12223f;
  --wd-sidebar-text: rgba(226, 233, 245, 0.72);
  --wd-sidebar-text-hover: #ffffff;

  --wd-radius-sm: 6px;
  --wd-radius: 10px;
  --wd-radius-lg: 14px;
  --wd-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --wd-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --wd-shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, 0.16);
  --wd-focus: 0 0 0 3px rgba(29, 95, 196, 0.18);

  --wd-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html, body {
  background-color: var(--wd-bg) !important;
}
body {
  font-family: var(--wd-font);
  font-size: 0.875rem;
  color: var(--wd-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--wd-text);
  font-family: var(--wd-font);
  letter-spacing: -0.01em;
}
a { color: var(--wd-primary); }
a:hover { color: var(--wd-primary-700); }
.text-muted { color: var(--wd-muted) !important; }
.text-black { color: var(--wd-text-2) !important; }
::selection { background: var(--wd-primary-100); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #c3cad6 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #c3cad6; border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* --------------------------------------------------------------------------
   Layout: use the full content width instead of the 10/12 centred column
   -------------------------------------------------------------------------- */
.content-wrapper .row > .col-lg-1.order-0:empty { display: none; }
@media (min-width: 992px) {
  .content-wrapper .row > .col-lg-1.order-0:empty + .col-lg-10 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
.container-xxl.container-p-y { padding-top: 1.75rem !important; padding-bottom: 2rem !important; }
.layout-page { background: transparent; }
@media (min-width: 1200px) {
  .container-xxl { padding-left: 2rem; padding-right: 2rem; }
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.layout-menu.bg-menu-theme,
.bg-menu-theme {
  background: linear-gradient(180deg, var(--wd-sidebar-bg) 0%, var(--wd-sidebar-bg-2) 100%) !important;
  color: var(--wd-sidebar-text);
  box-shadow: none !important;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.layout-menu { width: 16.25rem; }

.wd-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  text-decoration: none !important;
  position: relative;
}
.wd-brand-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(25, 180, 214, 0.25);
}
.wd-brand-logo img { width: 54px; height: 54px; object-fit: cover; object-position: center 35%; }
.wd-brand-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.wd-brand-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(226, 233, 245, 0.5);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}
.wd-brand .layout-menu-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
}

.bg-menu-theme .menu-inner-shadow { display: none !important; }
.bg-menu-theme .menu-inner { padding: 0.25rem 0.75rem 1rem !important; }

.wd-menu-label {
  padding: 1rem 0.75rem 0.4rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(226, 233, 245, 0.38);
  list-style: none;
}

.layout-wrapper:not(.layout-horizontal) .bg-menu-theme .menu-inner .menu-item .menu-link,
.bg-menu-theme .menu-inner .menu-item .menu-link,
.bg-menu-theme .menu-link {
  color: var(--wd-sidebar-text) !important;
  border-radius: 8px !important;
  margin: 1px 0 !important;
  padding: 0.6rem 0.75rem !important;
  font-size: 0.86rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-decoration: none !important;
}
.bg-menu-theme .menu-link:hover,
.bg-menu-theme .menu-link:focus {
  color: var(--wd-sidebar-text-hover) !important;
  background-color: rgba(255, 255, 255, 0.06) !important;
}
.bg-menu-theme .menu-icon {
  font-size: 0.95rem !important;
  width: 1.25rem;
  margin-right: 0.75rem !important;
  text-align: center;
  opacity: 0.85;
}
.bg-menu-theme .menu-inner > .menu-item.active > .menu-link {
  color: #fff !important;
  background: var(--wd-gradient) !important;
  box-shadow: 0 6px 16px -6px rgba(25, 140, 214, 0.65);
}
.bg-menu-theme .menu-inner > .menu-item.active > .menu-link .menu-icon { opacity: 1; }
.layout-wrapper:not(.layout-horizontal) .bg-menu-theme .menu-inner > .menu-item.active:before,
.bg-menu-theme .menu-inner > .menu-item.active:before { display: none !important; }

.bg-menu-theme .menu-item.open:not(.menu-item-closing) > .menu-toggle,
.bg-menu-theme .menu-item.active > .menu-toggle {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
}
.bg-menu-theme .menu-toggle::after { color: rgba(255, 255, 255, 0.45); }
.bg-menu-theme .menu-sub { padding: 0.15rem 0 0.25rem; }
.bg-menu-theme .menu-sub > .menu-item > .menu-link { padding-left: 2.75rem !important; font-size: 0.83rem; }
.bg-menu-theme .menu-sub > .menu-item > .menu-link:before {
  background-color: rgba(255, 255, 255, 0.3) !important;
  left: 1.45rem !important;
}
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link { color: #fff !important; background: rgba(25, 180, 214, 0.16) !important; }
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link:not(.menu-toggle):before {
  background-color: var(--wd-accent) !important;
  border-color: rgba(25, 180, 214, 0.35) !important;
}

/* Sidebar footer / user card */
.wd-sidebar-footer {
  margin-top: auto;
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.wd-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.wd-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--wd-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}
.wd-user-meta { min-width: 0; flex: 1; line-height: 1.25; }
.wd-user-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.83rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wd-user-role { color: rgba(226, 233, 245, 0.5); font-size: 0.72rem; }
.wd-logout {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgba(226, 233, 245, 0.7) !important;
  text-decoration: none !important;
  transition: background-color 0.15s, color 0.15s;
}
.wd-logout:hover { background: rgba(220, 61, 75, 0.18); color: #ff8a94 !important; }

/* Mobile top bar (sidebar is off-canvas below 1200px) */
.wd-mobilebar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 1075;
  height: 56px;
  padding: 0 1rem;
  align-items: center;
  gap: 0.75rem;
  background: var(--wd-surface);
  border-bottom: 1px solid var(--wd-border);
}
.wd-mobilebar .wd-burger {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--wd-text);
  border: 1px solid var(--wd-border);
  text-decoration: none;
}
.wd-mobilebar .wd-mobile-title { font-weight: 700; color: var(--wd-text); }
@media (max-width: 1199.98px) {
  .wd-mobilebar { display: flex; }
  .layout-menu { z-index: 1100 !important; }
}

/* --------------------------------------------------------------------------
   Page headings  (h4.fw-bold.py-3 pattern used across the app)
   -------------------------------------------------------------------------- */
.content-wrapper h4.fw-bold.py-3 {
  font-size: 1.35rem;
  font-weight: 700 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 1.25rem !important;
  color: var(--wd-text);
}
.content-wrapper h4.fw-bold.py-3 .text-muted.fw-light {
  color: var(--wd-muted) !important;
  font-weight: 500 !important;
}
.card-header h4.fw-bold.py-3,
.card-header h4 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--wd-surface);
  border: 1px solid var(--wd-border) !important;
  border-radius: var(--wd-radius-lg) !important;
  box-shadow: var(--wd-shadow) !important;
}
.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--wd-border) !important;
  padding: 1rem 1.25rem !important;
  border-radius: var(--wd-radius-lg) var(--wd-radius-lg) 0 0 !important;
}
.card-body { padding: 1.25rem; }
.card-title { color: var(--wd-text); }
.costom-caed-header,
.add-user-caed-header,
.table-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  height: auto !important;
  min-height: 60px;
}
.costom-caed-header form,
.add-user-caed-header form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  font-family: var(--wd-font);
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  line-height: 1.35;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  box-shadow: none;
}
.btn:focus, .btn:focus-visible { box-shadow: var(--wd-focus) !important; }
.btn-sm { padding: 0.32rem 0.6rem; font-size: 0.78rem; border-radius: 6px; }
.btn.rounded-0 { border-radius: 6px !important; }
.btn-block { width: auto; }

/* Primary actions: the app uses .btn-secondary as its main action button */
.btn-primary,
.btn-secondary {
  background: var(--wd-primary) !important;
  border-color: var(--wd-primary) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-secondary:hover,
.btn-primary:active, .btn-secondary:active {
  background: var(--wd-primary-600) !important;
  border-color: var(--wd-primary-600) !important;
  color: #fff !important;
  transform: none;
}
.btn-outline-secondary {
  color: var(--wd-text-2) !important;
  border-color: var(--wd-border-strong) !important;
  background: var(--wd-surface) !important;
}
.btn-outline-secondary:hover {
  background: var(--wd-surface-2) !important;
  color: var(--wd-text) !important;
  border-color: var(--wd-muted) !important;
}
.btn-outline-primary { color: var(--wd-primary) !important; border-color: var(--wd-primary) !important; }
.btn-outline-primary:hover { background: var(--wd-primary) !important; color: #fff !important; }

.btn-success { background: var(--wd-success) !important; border-color: var(--wd-success) !important; color: #fff !important; }
.btn-success:hover { background: #0e8a5a !important; border-color: #0e8a5a !important; }
.btn-danger { background: var(--wd-danger) !important; border-color: var(--wd-danger) !important; color: #fff !important; }
.btn-danger:hover { background: #c22f3c !important; border-color: #c22f3c !important; }
.btn-info { background: var(--wd-info) !important; border-color: var(--wd-info) !important; color: #fff !important; }
.btn-info:hover { background: #0b7899 !important; border-color: #0b7899 !important; }
.btn-warning { background: var(--wd-warning) !important; border-color: var(--wd-warning) !important; color: #fff !important; }

/* Compact icon buttons inside tables become soft, tinted chips */
.table .btn-sm {
  width: 32px;
  height: 32px;
  padding: 0 !important;
  display: inline-grid;
  place-items: center;
  border-radius: 8px !important;
  font-size: 0.95rem;
}
.table .btn-sm.btn-success { background: var(--wd-primary-50) !important; color: var(--wd-primary) !important; border-color: transparent !important; }
.table .btn-sm.btn-success:hover { background: var(--wd-primary) !important; color: #fff !important; }
.table .btn-sm.btn-danger { background: var(--wd-danger-50) !important; color: var(--wd-danger) !important; border-color: transparent !important; }
.table .btn-sm.btn-danger:hover { background: var(--wd-danger) !important; color: #fff !important; }
.table .btn-sm.btn-info,
.table .btn-sm.btn-secondary { background: var(--wd-info-50) !important; color: var(--wd-info) !important; border-color: transparent !important; }
.table .btn-sm.btn-info:hover,
.table .btn-sm.btn-secondary:hover { background: var(--wd-info) !important; color: #fff !important; }
.table .btn-sm.btn-warning { background: var(--wd-warning-50) !important; color: var(--wd-warning) !important; border-color: transparent !important; }
.table .list-inline { white-space: nowrap; }
.table .list-inline-item:not(:last-child) { margin-right: 0.25rem; }

/* Legacy custom buttons from demo.css */
.btn-custom, .remove-button {
  border: 1px solid var(--wd-border-strong) !important;
  background: var(--wd-surface);
  border-radius: 8px !important;
}
.btn-custom:hover { background: var(--wd-primary-50) !important; color: var(--wd-primary); transform: none; }
.btn-view-pdf, .notification-btn { background-color: var(--wd-primary); border-radius: 8px; font-weight: 500; }
.btn-view-pdf:hover { background-color: var(--wd-primary-600); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wd-text-2);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0.4rem;
}
.form-control,
.form-select,
input.date-picker,
.gj-textbox-md {
  font-family: var(--wd-font);
  font-size: 0.875rem;
  color: var(--wd-text);
  background-color: var(--wd-surface);
  border: 1px solid var(--wd-border-strong);
  border-radius: 8px;
  min-height: 40px;
  padding: 0.5rem 0.8rem;
  box-shadow: var(--wd-shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control::placeholder { color: #a0a9b8; }
.form-control:hover, .form-select:hover { border-color: #b9c2d0; }
.form-control:focus,
.form-select:focus,
input.date-picker:focus {
  border-color: var(--wd-primary) !important;
  box-shadow: var(--wd-focus) !important;
  outline: 0;
}
input.date-picker { width: 100%; }
.form-control:disabled, .form-control[readonly] { background-color: var(--wd-surface-2); }
.input-group-text {
  background: var(--wd-surface-2);
  border-color: var(--wd-border-strong);
  color: var(--wd-muted);
  border-radius: 8px;
}
.input-group-merge .form-control:not(:last-child) { border-right: 0; }
.input-group-merge .input-group-text:last-child { border-left: 0; background: var(--wd-surface); }
.input-group:focus-within .input-group-text { border-color: var(--wd-primary); }
.invalid-feedback { font-size: 0.76rem; }
.was-validated .form-control:invalid, .form-control.is-invalid { border-color: var(--wd-danger); }
.was-validated .form-control:valid, .form-control.is-valid { border-color: var(--wd-success); }

.form-check-input:checked { background-color: var(--wd-primary) !important; border-color: var(--wd-primary) !important; }
.form-check-input:focus { box-shadow: var(--wd-focus) !important; }

/* Search field inside the toolbar row above tables */
#search-field {
  padding-left: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237b8798' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
}

/* Native file inputs (bulk upload forms) */
input[type='file'] {
  font-family: var(--wd-font);
  font-size: 0.8rem;
  color: var(--wd-text-2);
  max-width: 260px;
  border: 1px dashed var(--wd-border-strong);
  border-radius: 8px;
  padding: 3px;
  background: var(--wd-surface-2);
}
input[type='file']::file-selector-button {
  font-family: var(--wd-font);
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--wd-primary);
  background: var(--wd-primary-50);
  border: 0;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  margin-right: 0.6rem;
  cursor: pointer;
  transition: background-color 0.15s;
}
input[type='file']::file-selector-button:hover { background: var(--wd-primary-100); }
input.form-control[type='file'] { max-width: none; border-style: solid; padding: 0.35rem; }

/* Inline status selects rendered in tables */
.status-dropdown,
.table select {
  font-family: var(--wd-font);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--wd-text);
  background-color: var(--wd-surface);
  border: 1px solid var(--wd-border-strong);
  border-radius: 999px;
  padding: 0.25rem 1.75rem 0.25rem 0.75rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='%237b8798' stroke-width='2.5' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  cursor: pointer;
}
.status-dropdown:focus, .table select:focus { outline: 0; border-color: var(--wd-primary); box-shadow: var(--wd-focus); }

/* Select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border: 1px solid var(--wd-border-strong) !important;
  border-radius: 8px !important;
  min-height: 40px !important;
  height: auto !important;
  box-shadow: var(--wd-shadow-sm);
}
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--wd-primary) !important;
  box-shadow: var(--wd-focus);
}
.select2-selection__rendered { line-height: 38px !important; padding-left: 0.8rem !important; color: var(--wd-text) !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow b {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%237b8798' stroke-width='2.5' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 12px !important;
}
.select2-dropdown { border-color: var(--wd-border-strong) !important; border-radius: 8px !important; box-shadow: var(--wd-shadow-lg); overflow: hidden; }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background-color: var(--wd-primary) !important; }
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--wd-primary-50) !important;
  border: 1px solid var(--wd-primary-100) !important;
  color: var(--wd-primary-700);
  border-radius: 6px !important;
}
.select2-search--dropdown .select2-search__field { border-radius: 6px; border-color: var(--wd-border-strong) !important; }

/* jQuery UI datepicker */
.ui-datepicker {
  font-family: var(--wd-font) !important;
  font-size: 0.82rem !important;
  border: 1px solid var(--wd-border) !important;
  border-radius: 10px !important;
  box-shadow: var(--wd-shadow-lg);
  padding: 0.5rem !important;
  z-index: 1200 !important;
}
.ui-datepicker .ui-datepicker-header { background: var(--wd-surface-2) !important; border: 0 !important; border-radius: 8px; }
.ui-datepicker .ui-state-default { border: 0 !important; background: transparent !important; text-align: center; border-radius: 6px; }
.ui-datepicker .ui-state-hover { background: var(--wd-primary-50) !important; color: var(--wd-primary) !important; }
.ui-datepicker .ui-state-active,
.ui-datepicker .ui-state-highlight { background: var(--wd-primary) !important; color: #fff !important; }

/* --------------------------------------------------------------------------
   Tables & DataTables
   -------------------------------------------------------------------------- */
.table-responsive { border-radius: 0 0 var(--wd-radius-lg) var(--wd-radius-lg); }
.table {
  color: var(--wd-text);
  margin-bottom: 0;
  font-size: 0.84rem;
  border-color: var(--wd-border);
}
.table > :not(caption) > * > * { padding: 0.75rem 1rem; border-bottom-color: var(--wd-border); }
.table.table-sm > :not(caption) > * > * { padding: 0.65rem 1rem; }
.table thead th,
table.dataTable thead th {
  background: var(--wd-surface-2) !important;
  color: var(--wd-muted) !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--wd-border) !important;
  border-top: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
}
.table tbody td { vertical-align: middle; }
.table tbody td p { margin: 0; }
.table > :not(:first-child) { border-top: 0 !important; }
.table-hover tbody tr:hover > *,
table.dataTable.display tbody tr:hover > *,
table.dataTable tbody tr:hover > * { background-color: #f6f9fe !important; box-shadow: none !important; }
table.dataTable.display tbody tr.odd > *,
table.dataTable.display tbody tr.even > *,
table.dataTable.display tbody tr > .sorting_1,
table.dataTable.order-column tbody tr > .sorting_1 { background-color: transparent !important; box-shadow: none !important; }
table.dataTable.no-footer { border-bottom: 1px solid var(--wd-border) !important; }
table.dataTable { border-collapse: collapse !important; width: 100% !important; }
table.dataTable thead > tr > th.sorting:before,
table.dataTable thead > tr > th.sorting:after { opacity: 0.25; }

.dataTables_wrapper { font-size: 0.82rem; color: var(--wd-text-2); }
.dataTables_wrapper .dataTables_info { padding: 1rem 1.25rem !important; color: var(--wd-muted) !important; }
.dataTables_wrapper .dataTables_paginate { padding: 0.75rem 1.25rem !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  min-width: 34px;
  padding: 0.35rem 0.7rem !important;
  margin: 0 2px !important;
  color: var(--wd-text-2) !important;
  background: transparent !important;
  font-weight: 500;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--wd-primary-50) !important;
  border-color: transparent !important;
  color: var(--wd-primary) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--wd-primary) !important;
  border-color: var(--wd-primary) !important;
  color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover { color: #b7bfcc !important; background: transparent !important; }
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter { padding: 0.75rem 1.25rem; }
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--wd-border-strong) !important;
  border-radius: 8px !important;
  padding: 0.3rem 0.6rem !important;
  background: var(--wd-surface);
}
.dataTables_wrapper .dataTables_processing {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid var(--wd-border);
  border-radius: 10px;
  box-shadow: var(--wd-shadow-lg);
  color: var(--wd-text-2);
  font-weight: 500;
  padding: 0.85rem 1.25rem !important;
  height: auto !important;
  z-index: 5;
}
.dataTables_wrapper .dataTables_processing > div:last-child > div { background: var(--wd-primary) !important; }
.dataTables_empty { padding: 2.5rem 1rem !important; color: var(--wd-muted); }

/* Excel export button generated by DataTables Buttons */
div.dt-buttons { padding: 0.75rem 1.25rem 0; }
.dt-button.custom-excel-button,
button.dt-button.custom-excel-button {
  background: var(--wd-success-50) !important;
  color: var(--wd-success) !important;
  border: 1px solid #bfe8d6 !important;
  border-radius: 8px !important;
  padding: 0.45rem 0.9rem !important;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  margin: 0 !important;
  box-shadow: none !important;
}
.dt-button.custom-excel-button:hover:not(.disabled) { background: var(--wd-success) !important; color: #fff !important; border-color: var(--wd-success) !important; }

/* --------------------------------------------------------------------------
   Badges, alerts, toasts, modals
   -------------------------------------------------------------------------- */
.badge { font-weight: 600; border-radius: 6px; padding: 0.35em 0.6em; letter-spacing: 0.01em; }
.alert { border-radius: 10px; border: 1px solid transparent; font-size: 0.85rem; }
.alert-info { background: var(--wd-info-50); color: #0a6b87; border-color: #c4e8f2; }
.alert-success, .alert.success { background: var(--wd-success-50); color: #0b7a50; border-color: #c2ead9; }
.alert-danger, .alert.error { background: var(--wd-danger-50); color: #a8202c; border-color: #f6c9ce; }
.alert-warning, .alert.warning { background: var(--wd-warning-50); color: #8f5d07; border-color: #f5ddb0; }

.toast {
  border-radius: 10px !important;
  box-shadow: var(--wd-shadow-lg) !important;
  font-size: 0.84rem;
  backdrop-filter: none;
}
.toast.bg-success { background: var(--wd-success) !important; }
.toast.bg-warning { background: #c9770b !important; }
.toast.bg-danger { background: var(--wd-danger) !important; }

.modal-content {
  border: 0;
  border-radius: var(--wd-radius-lg);
  box-shadow: var(--wd-shadow-lg);
}
.modal-header { border-bottom: 1px solid var(--wd-border); padding: 1rem 1.25rem; }
.modal-footer { border-top: 1px solid var(--wd-border); padding: 0.85rem 1.25rem; }
.modal-confirm .modal-content { border-radius: var(--wd-radius-lg); padding: 1.75rem 1.5rem; }
.modal-confirm .modal-header, .modal-confirm .modal-footer { border: 0; }
.modal-confirm h4 { font-size: 1.25rem; font-weight: 700; margin: 1rem 0 0; }
.modal-confirm .modal-body { color: var(--wd-muted); }
.modal-confirm .icon-box {
  width: 64px;
  height: 64px;
  border: 0;
  background: var(--wd-danger-50);
  display: grid;
  place-items: center;
}
.modal-confirm .icon-box i { color: var(--wd-danger); font-size: 32px; margin: 0; }
.modal-confirm .btn { border-radius: 8px; min-width: 110px; min-height: 40px; font-weight: 500; }
.modal-confirm .btn-info { background: var(--wd-surface-2) !important; color: var(--wd-text-2) !important; border: 1px solid var(--wd-border-strong) !important; }
.modal-confirm .btn-info:hover { background: #eef1f6 !important; }
.modal-backdrop.show { opacity: 0.45; }

/* Loading overlay */
#overlay { background: rgba(14, 26, 48, 0.55); backdrop-filter: blur(2px); }
.loader {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50%;
  background: none !important;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: wd-spin 0.8s linear infinite !important;
}
@keyframes wd-spin { to { transform: rotate(360deg); } }

/* Nav tabs & pills */
.nav-tabs { border-bottom: 1px solid var(--wd-border); gap: 0.25rem; }
.nav-tabs .nav-link {
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--wd-muted);
  font-weight: 500;
  padding: 0.65rem 1rem;
  border-radius: 0;
}
.nav-tabs .nav-link:hover { color: var(--wd-text); border-color: transparent; }
.nav-tabs .nav-link.active { color: var(--wd-primary); background: transparent; border-bottom-color: var(--wd-primary); }
.nav-pills .nav-link { border-radius: 8px; color: var(--wd-text-2); font-weight: 500; }
.nav-pills .nav-link.active { background: var(--wd-primary); color: #fff; box-shadow: none; }

.dropdown-menu { border: 1px solid var(--wd-border); border-radius: 10px; box-shadow: var(--wd-shadow-lg); padding: 0.35rem; }
.dropdown-item { border-radius: 6px; padding: 0.45rem 0.75rem; font-size: 0.84rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--wd-primary-50); color: var(--wd-primary); }

/* --------------------------------------------------------------------------
   Dashboard stat cards
   -------------------------------------------------------------------------- */
.wd-stat { height: 100%; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.wd-stat:hover { box-shadow: var(--wd-shadow-lg) !important; }
.wd-stat .card-body { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.35rem; }
.wd-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.15rem;
}
.wd-stat-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--wd-muted);
  margin-bottom: 0.2rem;
}
.wd-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wd-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.wd-stat-value small { font-size: 0.75rem; font-weight: 600; color: var(--wd-muted); margin-left: 0.25rem; letter-spacing: 0; }
.wd-tone-blue   { background: var(--wd-primary-50); color: var(--wd-primary); }
.wd-tone-cyan   { background: var(--wd-info-50); color: var(--wd-info); }
.wd-tone-green  { background: var(--wd-success-50); color: var(--wd-success); }
.wd-tone-amber  { background: var(--wd-warning-50); color: var(--wd-warning); }
.wd-tone-red    { background: var(--wd-danger-50); color: var(--wd-danger); }
.wd-tone-violet { background: #f1edfd; color: #6a4bd8; }
.wd-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wd-muted);
  margin: 0.25rem 0 0.75rem;
}
.wd-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.wd-page-head h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.wd-page-head p { margin: 0.25rem 0 0; color: var(--wd-muted); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.content-footer { color: var(--wd-muted); font-size: 0.8rem; }

/* --------------------------------------------------------------------------
   Authentication pages
   -------------------------------------------------------------------------- */
.authentication-wrapper.authentication-basic {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.authentication-wrapper .authentication-inner { max-width: 420px; width: 100%; }
.authentication-wrapper .card { border-radius: 16px !important; box-shadow: var(--wd-shadow-lg) !important; }
.authentication-wrapper .card-body { padding: 2rem; }

.wd-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--wd-surface);
}
.wd-auth-aside {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at -10% -10%, rgba(25, 180, 214, 0.35), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, rgba(29, 95, 196, 0.55), transparent 60%),
              var(--wd-sidebar-bg);
  color: #fff;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.wd-auth-aside::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 85%);
  pointer-events: none;
}
.wd-auth-aside > * { position: relative; z-index: 1; }
.wd-auth-aside h2 { color: #fff; font-size: 2.1rem; font-weight: 700; line-height: 1.2; max-width: 440px; letter-spacing: -0.02em; }
.wd-auth-aside p { color: rgba(226, 233, 245, 0.75); max-width: 420px; font-size: 0.95rem; line-height: 1.6; }
.wd-auth-points { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 0.85rem; }
.wd-auth-points li { display: flex; align-items: center; gap: 0.75rem; color: rgba(226, 233, 245, 0.88); font-size: 0.9rem; }
.wd-auth-points i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: #7fe1f5;
  font-size: 0.85rem;
}
.wd-auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.wd-auth-form { width: 100%; max-width: 380px; }
.wd-auth-form h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.35rem; letter-spacing: -0.02em; }
.wd-auth-form .wd-auth-lead { color: var(--wd-muted); margin-bottom: 1.75rem; }
.wd-auth-form .form-control { min-height: 44px; }
.wd-auth-form .btn-primary { min-height: 44px; font-weight: 600; }
.wd-auth-mobile-brand { display: none; }
@media (max-width: 991.98px) {
  .wd-auth { grid-template-columns: 1fr; }
  .wd-auth-aside { display: none; }
  .wd-auth-mobile-brand { display: flex; margin-bottom: 1.75rem; }
}

/* --------------------------------------------------------------------------
   Error / status pages
   -------------------------------------------------------------------------- */
.wd-status-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--wd-bg);
}
.wd-status-card { max-width: 460px; width: 100%; text-align: center; padding: 2.5rem 2rem; }
.wd-status-code {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--wd-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.75rem;
}
.wd-status-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 1.25rem; font-size: 1.6rem; }
.wd-status-card h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.5rem; }
.wd-status-card p { color: var(--wd-muted); margin-bottom: 1.5rem; }

/* --------------------------------------------------------------------------
   Responsive tweaks
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .container-xxl.container-p-y { padding-top: 1.25rem !important; }
  .content-wrapper .justify-content-between.d-flex.align-items-center.mb-4 { flex-wrap: wrap; gap: 0.75rem; }
  .content-wrapper .justify-content-between.d-flex.align-items-center.mb-4 > form { width: 100% !important; flex: 1 1 100%; }
  input[type='file'] { max-width: 100%; }
  .wd-stat-value { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Gradient layer
   ========================================================================== */
:root {
  --wd-grad-blue:   linear-gradient(135deg, #1d5fc4 0%, #19b4d6 100%);
  --wd-grad-violet: linear-gradient(135deg, #5b3fd6 0%, #9a6bff 100%);
  --wd-grad-green:  linear-gradient(135deg, #0f9a66 0%, #34d399 100%);
  --wd-grad-amber:  linear-gradient(135deg, #e5800f 0%, #f7b733 100%);
  --wd-grad-rose:   linear-gradient(135deg, #d6365a 0%, #ff7a8a 100%);
  --wd-grad-teal:   linear-gradient(135deg, #0e7f9e 0%, #2dd4bf 100%);
}

/* Soft gradient wash behind the app */
body {
  background:
    radial-gradient(1100px 420px at 100% -10%, rgba(25, 180, 214, 0.10), transparent 60%),
    radial-gradient(900px 380px at 15% -15%, rgba(29, 95, 196, 0.09), transparent 60%),
    var(--wd-bg) !important;
  background-attachment: fixed !important;
}

/* Sidebar: richer gradient with brand glow */
.layout-menu.bg-menu-theme,
.bg-menu-theme {
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(25, 180, 214, 0.20), transparent 70%),
    radial-gradient(380px 300px at 100% 100%, rgba(29, 95, 196, 0.28), transparent 70%),
    linear-gradient(180deg, #0c1730 0%, #10224a 100%) !important;
}

/* Gradient primary buttons */
.btn-primary,
.btn-secondary {
  background: var(--wd-grad-blue) !important;
  border: 0 !important;
  box-shadow: 0 6px 14px -6px rgba(29, 95, 196, 0.55) !important;
}
.btn-primary:hover, .btn-secondary:hover,
.btn-primary:active, .btn-secondary:active {
  background: linear-gradient(135deg, #174fa6 0%, #1399b8 100%) !important;
  box-shadow: 0 8px 18px -6px rgba(29, 95, 196, 0.65) !important;
}
.btn-success:not(.btn-sm) { background: var(--wd-grad-green) !important; border: 0 !important; }
.btn-danger:not(.btn-sm)  { background: var(--wd-grad-rose) !important; border: 0 !important; }
.btn-info:not(.btn-sm)    { background: var(--wd-grad-teal) !important; border: 0 !important; }
.btn-warning:not(.btn-sm) { background: var(--wd-grad-amber) !important; border: 0 !important; }

/* Gradient accent strip on every card that has a header */
.card { position: relative; overflow: visible; }
.card > .card-header:first-child { position: relative; }
.card > .card-header:first-child::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 3px;
  background: var(--wd-grad-blue);
  border-radius: var(--wd-radius-lg) var(--wd-radius-lg) 0 0;
}

/* Page titles get a gradient marker */
.content-wrapper h4.fw-bold.py-3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.content-wrapper h4.fw-bold.py-3::before {
  content: '';
  width: 4px;
  height: 1.3em;
  border-radius: 4px;
  background: var(--wd-grad-blue);
  flex-shrink: 0;
}
.content-wrapper h4.fw-bold.py-3 .text-muted.fw-light { margin-right: 0.3rem; }

/* Current pagination page */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--wd-grad-blue) !important;
  border-color: transparent !important;
}

/* Gradient stat icons */
.wd-stat-icon { color: #fff !important; box-shadow: 0 8px 18px -8px rgba(16, 24, 40, 0.45); }
.wd-stat-icon.wd-tone-blue   { background: var(--wd-grad-blue); }
.wd-stat-icon.wd-tone-cyan   { background: var(--wd-grad-teal); }
.wd-stat-icon.wd-tone-green  { background: var(--wd-grad-green); }
.wd-stat-icon.wd-tone-amber  { background: var(--wd-grad-amber); }
.wd-stat-icon.wd-tone-red    { background: var(--wd-grad-rose); }
.wd-stat-icon.wd-tone-violet { background: var(--wd-grad-violet); }

/* Full-gradient feature stat cards */
.wd-stat-feature { border: 0 !important; color: #fff; overflow: hidden; }
.wd-stat-feature::after {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  right: -50px; top: -70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.wd-stat-feature::before {
  content: '';
  position: absolute;
  width: 120px; height: 120px;
  right: 40px; bottom: -70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.wd-stat-feature.wd-grad-blue   { background: var(--wd-grad-blue) !important; }
.wd-stat-feature.wd-grad-violet { background: var(--wd-grad-violet) !important; }
.wd-stat-feature.wd-grad-green  { background: var(--wd-grad-green) !important; }
.wd-stat-feature.wd-grad-amber  { background: var(--wd-grad-amber) !important; }
.wd-stat-feature .wd-stat-label { color: rgba(255, 255, 255, 0.82); }
.wd-stat-feature .wd-stat-value,
.wd-stat-feature .wd-stat-value small { color: #fff; }
.wd-stat-feature .wd-stat-icon { background: rgba(255, 255, 255, 0.2) !important; box-shadow: none; backdrop-filter: blur(4px); }

/* Dashboard hero banner */
.wd-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  color: #fff;
  background:
    radial-gradient(500px 220px at 85% 0%, rgba(255, 255, 255, 0.18), transparent 70%),
    linear-gradient(120deg, #123f86 0%, #1d5fc4 45%, #19b4d6 100%);
  box-shadow: 0 18px 40px -18px rgba(29, 95, 196, 0.7);
}
.wd-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  pointer-events: none;
}
.wd-hero > * { position: relative; z-index: 1; }
.wd-hero h1 { color: #fff; font-size: 1.6rem; font-weight: 700; margin: 0 0 0.3rem; letter-spacing: -0.02em; }
.wd-hero p { color: rgba(255, 255, 255, 0.82); margin: 0; }
.wd-hero-date {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.8rem; font-weight: 500;
}

/* Mobile bar brand text */
.wd-mobilebar .wd-mobile-title {
  background: var(--wd-grad-blue);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Avatar ring */
.wd-avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12); }

/* Auth form title */
.wd-auth-form h1 .wd-grad-text,
.wd-grad-text {
  background: var(--wd-grad-blue);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.card-header h4.fw-bold.py-3 { display: block; }
.card-header h4.fw-bold.py-3::before { display: none !important; }

/* Fixes after visual review */
.btn i, .btn > i { font-style: normal; }
.card-header + .card-body,
.card-header + .card-body.pt-0 { padding-top: 1.25rem !important; }
.wd-auth-aside {
  background:
    radial-gradient(700px 480px at 0% 0%, rgba(25, 180, 214, 0.55), transparent 65%),
    radial-gradient(700px 520px at 100% 100%, rgba(91, 63, 214, 0.45), transparent 65%),
    linear-gradient(150deg, #0c1730 0%, #123f86 55%, #0f6fa8 100%) !important;
}

/* ==========================================================================
   Premium dashboard stat cards
   ========================================================================== */
:root {
  --wd-grad-indigo: linear-gradient(135deg, #2b3a9e 0%, #4f7cff 100%);
}
.wd-stat-feature {
  --wd-glow: rgba(29, 95, 196, 0.45);
  border-radius: 18px !important;
  min-height: 150px;
  isolation: isolate;
  box-shadow: 0 14px 30px -14px var(--wd-glow), 0 2px 6px -2px rgba(16, 24, 40, 0.12) !important;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s ease !important;
  animation: wd-card-in 0.55s cubic-bezier(.2,.8,.2,1) both;
}
.wd-stat-feature.wd-grad-blue   { --wd-glow: rgba(29, 95, 196, 0.55); }
.wd-stat-feature.wd-grad-violet { --wd-glow: rgba(91, 63, 214, 0.55); }
.wd-stat-feature.wd-grad-amber  { --wd-glow: rgba(229, 128, 15, 0.55);  background: var(--wd-grad-amber) !important; }
.wd-stat-feature.wd-grad-rose   { --wd-glow: rgba(214, 54, 90, 0.55);   background: var(--wd-grad-rose) !important; }
.wd-stat-feature.wd-grad-green  { --wd-glow: rgba(15, 154, 102, 0.55);  background: var(--wd-grad-green) !important; }
.wd-stat-feature.wd-grad-teal   { --wd-glow: rgba(14, 127, 158, 0.55);  background: var(--wd-grad-teal) !important; }
.wd-stat-feature.wd-grad-indigo { --wd-glow: rgba(43, 58, 158, 0.55);   background: var(--wd-grad-indigo) !important; }

.wd-stat-feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -16px var(--wd-glow), 0 4px 10px -4px rgba(16, 24, 40, 0.15) !important;
}

/* Decorative wave along the bottom + light sheen on hover */
.wd-stat-feature .card-body {
  position: relative;
  z-index: 1;
  align-items: flex-start;
  padding: 1.4rem 1.5rem 2.4rem;
}
.wd-stat-feature .card-body::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M0 38 C60 18 110 52 170 34 S280 10 330 28 S390 40 400 30 L400 60 L0 60Z' fill='%23ffffff' fill-opacity='.14'/%3E%3Cpath d='M0 48 C70 30 120 58 190 44 S300 26 350 40 S395 50 400 44 L400 60 L0 60Z' fill='%23ffffff' fill-opacity='.10'/%3E%3C/svg%3E") no-repeat bottom / 100% 100%;
  border-radius: 0 0 18px 18px;
  pointer-events: none;
}
.wd-stat-feature .card-body::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}
.wd-stat-feature:hover .card-body::before {
  animation: wd-sheen 0.9s ease forwards;
}

/* Glass icon tile */
.wd-stat-feature .wd-stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px -10px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.25s ease;
}
.wd-stat-feature:hover .wd-stat-icon { transform: rotate(-6deg) scale(1.06); }

.wd-stat-feature .wd-stat-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.35rem;
}
.wd-stat-feature .wd-stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.wd-stat-feature .wd-stat-value small {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  margin-left: 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  vertical-align: middle;
  letter-spacing: 0.04em;
}
.wd-stat-caption {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
}

/* Bigger decorative circles */
.wd-stat-feature::after { width: 210px; height: 210px; right: -60px; top: -90px; background: rgba(255, 255, 255, 0.13); }
.wd-stat-feature::before { width: 140px; height: 140px; right: 60px; bottom: -90px; background: rgba(255, 255, 255, 0.08); }

/* Staggered entrance */
.row > div:nth-child(2) > .wd-stat-feature { animation-delay: 0.08s; }
.row > div:nth-child(3) > .wd-stat-feature { animation-delay: 0.16s; }

@keyframes wd-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes wd-sheen {
  0%   { left: -60%; opacity: 0; }
  20%  { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}

/* Section titles with a gradient dot */
.wd-section-title { display: flex; align-items: center; gap: 0.5rem; }
.wd-section-title::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--wd-grad-blue);
  box-shadow: 0 0 0 3px rgba(29, 95, 196, 0.15);
}

@media (max-width: 767.98px) {
  .wd-stat-feature .wd-stat-value { font-size: 1.5rem; }
}

/* ==========================================================================
   Auth pages — password reset flow
   ========================================================================== */
.wd-auth-main {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(420px 320px at 100% 0%, rgba(25, 180, 214, 0.12), transparent 70%),
    radial-gradient(420px 320px at 0% 100%, rgba(91, 63, 214, 0.10), transparent 70%),
    var(--wd-surface);
}
.wd-auth-form { position: relative; z-index: 1; animation: wd-card-in 0.5s cubic-bezier(.2,.8,.2,1) both; }

/* Gradient icon badge */
.wd-auth-badge {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  font-size: 1.7rem;
  color: #fff;
  background: var(--wd-grad-blue);
  box-shadow: 0 14px 28px -12px rgba(29, 95, 196, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  position: relative;
}
.wd-auth-badge::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 22px;
  border: 1px solid rgba(29, 95, 196, 0.18);
}
.wd-auth-badge-lg { width: 76px; height: 76px; border-radius: 22px; font-size: 2.1rem; }
.wd-auth-badge-lg::after { border-radius: 26px; inset: -8px; }
.wd-auth-badge-success { background: var(--wd-grad-green); box-shadow: 0 14px 28px -12px rgba(15, 154, 102, 0.7); }
.wd-auth-badge-success::after { border-color: rgba(15, 154, 102, 0.2); animation: wd-pulse 1.8s ease-out infinite; }
.wd-auth-badge-danger { background: var(--wd-grad-rose); box-shadow: 0 14px 28px -12px rgba(214, 54, 90, 0.7); }
.wd-auth-badge-danger::after { border-color: rgba(214, 54, 90, 0.2); }
@keyframes wd-pulse {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Step tracker */
.wd-steps {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  margin: 0 0 2rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--wd-muted);
}
.wd-steps li { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.wd-steps li:not(:last-child)::after {
  content: '';
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--wd-border-strong);
  margin-left: 0.2rem;
}
.wd-steps li.is-done:not(:last-child)::after { background: var(--wd-grad-blue); }
.wd-steps span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  background: var(--wd-surface-2);
  border: 1px solid var(--wd-border-strong);
  color: var(--wd-muted);
}
.wd-steps li.is-active { color: var(--wd-text); }
.wd-steps li.is-active span,
.wd-steps li.is-done span {
  background: var(--wd-grad-blue);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 10px -4px rgba(29, 95, 196, 0.7);
}
.wd-steps li.is-done { color: var(--wd-primary); }
.text-center .wd-steps { justify-content: center; }
@media (max-width: 400px) { .wd-steps li:not(.is-active) { font-size: 0; gap: 0; } }

/* Input with leading icon */
.wd-input-icon { position: relative; }
.wd-input-icon > i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--wd-muted);
  pointer-events: none;
  transition: color 0.15s;
}
.wd-input-icon .form-control { padding-left: 2.5rem; }
.wd-input-icon:focus-within > i { color: var(--wd-primary); }

/* Back link */
.wd-back-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--wd-muted) !important;
  text-decoration: none !important;
  transition: color 0.15s, gap 0.15s;
}
.wd-back-link:hover { color: var(--wd-primary) !important; gap: 0.6rem; }

/* Hint box */
.wd-hint {
  display: flex;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.82rem;
  color: var(--wd-text-2);
  background: linear-gradient(135deg, rgba(29, 95, 196, 0.06), rgba(25, 180, 214, 0.08));
  border: 1px solid var(--wd-primary-100);
}
.wd-hint i { color: var(--wd-primary); font-size: 1.1rem; margin-top: 1px; }

/* Password rules */
.wd-pw-rules {
  list-style: none;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  border-radius: 12px;
  background: var(--wd-surface-2);
  border: 1px solid var(--wd-border);
  display: grid;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--wd-text-2);
}
.wd-pw-rules i { color: var(--wd-success); margin-right: 0.35rem; vertical-align: -2px; }
.wd-auth-badge > i { font-size: 1.75rem !important; line-height: 1; }
.wd-auth-badge-lg > i { font-size: 2.2rem !important; }

/* ==========================================================================
   Multi-brand UI
   ========================================================================== */
/* Brand switcher */
.wd-brand-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
}
.wd-brand-switch-inline {
  margin: 0;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--wd-border);
  background: linear-gradient(90deg, rgba(29, 95, 196, 0.04), rgba(25, 180, 214, 0.04));
}
.wd-brand-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wd-muted);
}
.wd-brand-switch-track {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 12px;
  background: var(--wd-surface);
  border: 1px solid var(--wd-border);
  box-shadow: var(--wd-shadow-sm);
}
.wd-brand-switch-track a {
  padding: 0.4rem 0.9rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wd-text-2);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.wd-brand-switch-track a:hover { background: var(--wd-primary-50); color: var(--wd-primary); }
.wd-brand-switch-track a.active {
  background: var(--wd-grad-blue);
  color: #fff;
  box-shadow: 0 6px 14px -6px rgba(29, 95, 196, 0.6);
}

/* Brand tag in tables */
.wd-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--wd-primary-700);
  background: var(--wd-primary-50);
  border: 1px solid var(--wd-primary-100);
}
.wd-brand-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--wd-grad-blue);
}

/* Brand picker on onboarding forms */
.wd-brand-picker { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.wd-brand-chip { position: relative; cursor: pointer; margin: 0; }
.wd-brand-chip input { position: absolute; opacity: 0; pointer-events: none; }
.wd-brand-chip span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--wd-border-strong);
  background: var(--wd-surface);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wd-text-2);
  transition: all 0.15s ease;
  user-select: none;
}
.wd-brand-chip span i { font-size: 1rem; width: 0; overflow: hidden; transition: width 0.15s ease; }
.wd-brand-chip:hover span { border-color: var(--wd-primary); color: var(--wd-primary); }
.wd-brand-chip input:checked + span {
  background: var(--wd-grad-blue);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px -6px rgba(29, 95, 196, 0.6);
}
.wd-brand-chip input:checked + span i { width: 1rem; }
.wd-brand-chip input:focus-visible + span { box-shadow: var(--wd-focus); }

/* Brands page */
.wd-brand-avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 700;
  color: #fff;
  background: var(--wd-grad-blue);
  box-shadow: 0 6px 12px -6px rgba(29, 95, 196, 0.6);
}
tr:nth-child(4n+2) .wd-brand-avatar { background: var(--wd-grad-violet); }
tr:nth-child(4n+3) .wd-brand-avatar { background: var(--wd-grad-green); }
tr:nth-child(4n+4) .wd-brand-avatar { background: var(--wd-grad-amber); }
.wd-code {
  font-size: 0.78rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: var(--wd-surface-2);
  border: 1px solid var(--wd-border);
  color: var(--wd-text-2);
}
.wd-pill { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; }
.wd-pill-success { background: var(--wd-success-50); color: var(--wd-success); }
.wd-pill-muted { background: var(--wd-surface-2); color: var(--wd-muted); border: 1px solid var(--wd-border); }

/* ==========================================================================
   Price history timeline
   ========================================================================== */
.wd-ph-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.wd-ph-back {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--wd-surface); border: 1px solid var(--wd-border);
  color: var(--wd-text-2); font-size: 1.2rem; box-shadow: var(--wd-shadow-sm);
  transition: all 0.15s;
}
.wd-ph-back:hover { color: var(--wd-primary); border-color: var(--wd-primary); }
.wd-ph-crumbs { font-size: 0.75rem; color: var(--wd-muted); display: flex; align-items: center; gap: 0.15rem; }
.wd-ph-title h1 { font-size: 1.6rem; font-weight: 800; margin: 0.1rem 0 0.35rem; letter-spacing: -0.02em; }
.wd-ph-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.wd-count {
  display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 0.4rem;
  margin-left: 0.35rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  color: #fff; background: var(--wd-grad-blue); vertical-align: middle;
}
.wd-pill-info { background: var(--wd-info-50); color: var(--wd-info); }
.wd-pill-warning { background: var(--wd-warning-50, #fff6e5); color: var(--wd-warning, #b54708); }

.wd-timeline { list-style: none; margin: 0; padding: 0 0 0 0.25rem; position: relative; }
.wd-timeline::before {
  content: ''; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--wd-primary-100), var(--wd-border) 70%, transparent);
}
.wd-tl-item { position: relative; padding-left: 60px; margin-bottom: 1rem; animation: wd-card-in 0.4s ease both; }
.wd-tl-item:last-child { margin-bottom: 0; }
.wd-tl-dot {
  position: absolute; left: 2px; top: 10px; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: #fff; font-size: 1.15rem;
  background: var(--wd-grad-blue); box-shadow: 0 0 0 4px var(--wd-surface), 0 8px 16px -8px rgba(29, 95, 196, 0.7);
}
.wd-tl-screen .wd-tl-dot { background: var(--wd-grad-violet); box-shadow: 0 0 0 4px var(--wd-surface), 0 8px 16px -8px rgba(91, 63, 214, 0.7); }
.wd-tl-warranty .wd-tl-dot { background: var(--wd-grad-teal); box-shadow: 0 0 0 4px var(--wd-surface), 0 8px 16px -8px rgba(14, 127, 158, 0.7); }
.wd-tl-card {
  border: 1px solid var(--wd-border); border-radius: 14px; padding: 0.9rem 1.1rem;
  background: var(--wd-surface); transition: box-shadow 0.2s, border-color 0.2s;
}
.wd-tl-card:hover { box-shadow: var(--wd-shadow-lg); border-color: var(--wd-primary-100); }
.wd-tl-top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.wd-tl-label { font-weight: 700; font-size: 0.88rem; color: var(--wd-text); }
.wd-tl-time { margin-left: auto; font-size: 0.76rem; color: var(--wd-muted); font-variant-numeric: tabular-nums; }
.wd-chg { display: inline-flex; align-items: center; gap: 0.15rem; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.wd-chg i { font-size: 0.95rem; }
.wd-chg-up { background: var(--wd-primary-50); color: var(--wd-primary); }
.wd-chg-down { background: var(--wd-warning-50); color: #b06f05; }
.wd-chg-flat { background: var(--wd-surface-2); color: var(--wd-muted); border: 1px solid var(--wd-border); }
.wd-tl-prices { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.55rem 0 0.4rem; font-variant-numeric: tabular-nums; }
.wd-tl-old { font-size: 0.95rem; color: var(--wd-muted); text-decoration: line-through; text-decoration-color: rgba(123, 135, 152, 0.6); }
.wd-tl-arrow { color: var(--wd-muted); font-size: 1.1rem; align-self: center; }
.wd-tl-new { font-size: 1.3rem; font-weight: 800; color: var(--wd-text); letter-spacing: -0.02em; }
.wd-tl-new small { font-size: 0.7rem; font-weight: 600; color: var(--wd-muted); letter-spacing: 0; }
.wd-tl-note {
  font-size: 0.8rem; color: var(--wd-text-2); padding: 0.45rem 0.65rem; border-radius: 8px;
  background: var(--wd-warning-50); border: 1px solid #f5ddb0; margin-bottom: 0.4rem;
}
.wd-tl-foot { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: var(--wd-muted); padding-top: 0.5rem; border-top: 1px dashed var(--wd-border); }
.wd-tl-foot strong { color: var(--wd-text-2); }
.wd-tl-avatar {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.68rem; font-weight: 700; color: #fff; background: var(--wd-grad-blue);
}
.wd-empty { text-align: center; padding: 2.5rem 1rem; }
.wd-empty h5 { font-weight: 700; margin-bottom: 0.25rem; }
#historyFilter { margin-left: auto; }
@media (max-width: 575.98px) {
  .wd-tl-time { margin-left: 0; width: 100%; }
  .wd-ph-head .btn { width: 100%; }
}

/* Numeric table cells line up digit-for-digit */
.wd-num, td.wd-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Bulk upload form in card headers */
.wd-upload { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.wd-upload-brand { width: auto; min-height: 36px; padding-top: 0.35rem; padding-bottom: 0.35rem; font-size: 0.8rem; }
.wd-sample-link { font-size: 0.8rem; font-weight: 500; color: var(--wd-primary); text-decoration: none; white-space: nowrap; }
.wd-sample-link:hover { text-decoration: underline; }
.wd-upload-result .alert { font-size: 0.84rem; }
.wd-upload-brand { min-width: 160px; padding-right: 2.25rem !important; background-position: right 0.7rem center; }
.wd-upload-result .alert-dismissible { padding-right: 3rem; }
.wd-upload-result .alert-dismissible .btn-close {
  top: 50%; transform: translateY(-50%); padding: 0.5rem; margin-right: 0.5rem;
  width: 0.7rem; height: 0.7rem; background-size: 0.65rem; opacity: 0.55;
}
.wd-upload-result .alert-dismissible .btn-close:hover { opacity: 0.9; }

/* Premium prices by coverage (add / edit device model) */
.wd-premiums { padding: 1rem; border-radius: 14px; background: linear-gradient(135deg, rgba(29,95,196,.04), rgba(25,180,214,.06)); border: 1px solid var(--wd-primary-100); }
.wd-premium-card { background: var(--wd-surface); border: 1px solid var(--wd-border); border-radius: 12px; padding: 0.75rem 0.85rem; height: 100%; }
.wd-premium-card .form-label { display: flex; align-items: center; gap: 0.35rem; }
.wd-premium-card .form-label i { color: var(--wd-primary); font-size: 1rem; }
.wd-premium-brand { font-size: 0.76rem; }

/* IMEI page upload panels */
.wd-imei-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.wd-imei-upload { padding: 0.85rem 1rem; border-radius: 12px; border: 1px solid var(--wd-border); background: var(--wd-surface-2); }
.wd-imei-upload-title { display: flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.85rem; margin-bottom: 0.6rem; color: var(--wd-text); }
.wd-imei-upload-title i { color: var(--wd-primary); font-size: 1.1rem; }
@media (max-width: 991.98px) { .wd-imei-uploads { grid-template-columns: 1fr; } }
