:root {
  --brand-primary-color: #001545ff;
  --brand-secondary-color: #157a97ff;
  --brand-text-color: #838587ff;
  --brand-tertiary-color: #26c5edff;
  --bw-primary: #1b3a6b;
  --bw-secondary: #243756;
  --bw-accent: #0096c7;
  --bw-success: #28b463;
  --bw-warning: #e67e22;
  --bw-danger: #e74c3c;
  --bw-light: #f0f4f8;
  --bw-card-bg: #ffffff;
  --bw-border: #dde3ed;
  --bw-text-muted: #6b7a99;
  --bw-shadow: 0 2px 12px rgba(27, 58, 107, 0.08);
  --bw-radius: 0.625rem;
  --bw-radius-sm: 0.375rem;
}

#overlay {
  background: rgba(255, 255, 255, 0.8);
  position: fixed;
  height: 100%;
  width: 100%;
  z-index: 5000;
  top: 0;
  left: 0;
}

.app-sidebar-logo {
  background-color: #ffffff;
}

.loader--facebook {
  display: inline-block;
  position: relative;
  height: 64px;
  width: 64px;
  margin-bottom: 30px;
}

.loader--facebook div {
  display: inline-block;
  position: absolute;
  left: 6px;
  animation: loader--facebook 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
  width: 13px;
}

.loader--facebook div:nth-child(1) {
  left: 6px;
  animation-delay: -0.24s;
}

.loader--facebook div:nth-child(2) {
  left: 26px;
  animation-delay: -0.12s;
}

.loader--facebook div:nth-child(3) {
  left: 45px;
  animation-delay: 0;
}

@keyframes loader--facebook {
  0% {
    top: 6px;
    height: 51px;
  }

  50%,
  100% {
    top: 19px;
    height: 26px;
  }
}

.colord_bg_1 div {
  background-color: var(--brand-primary-color) !important;
}

.loginBg {
  background-color: var(--brand-primary-color);
  box-shadow:
    rgba(0, 0, 0, 0.25) 0px 14px 28px,
    rgba(0, 0, 0, 0.22) 0px 10px 10px;
}

.app-sidebar {
  background-color: var(--brand-primary-color) !important;
}

.app-sidebar .menu .menu-item .menu-link .menu-title {
  color: #ffffff !important;
}

.app-sidebar .menu .menu-item .menu-link .menu-icon,
.app-sidebar .menu .menu-item .menu-link .menu-icon .svg-icon,
.app-sidebar .menu .menu-item .menu-link .menu-icon i {
  color: #ffffff !important;
}

.app-sidebar .menu .menu-item .menu-heading {
  color: #ffffff !important;
}

.app-sidebar .menu .menu-item .menu-link .menu-bullet .bullet {
  background-color: #ffffff !important;
}

.app-sidebar .menu .menu-item .menu-link.active,
.app-sidebar .menu .menu-item .menu-link:hover {
  background-color: var(--brand-secondary-color) !important;
}

[data-kt-app-sidebar-minimize="on"][data-kt-app-sidebar-hoverable="true"]
  #desk_sidebar_min_logo {
  display: block !important;
}

.menu-item .menu-link .menu-arrow:after {
  background-color: #ffffff;
}

.ki-duotone,
.ki-outline,
.ki-solid {
  color: #000000;
}

.ki-double-left .path2:before {
  opacity: 0.5;
}

#search_result_table th,
#search_result_table td,
#search_result_table_r th,
#search_result_table_r td,
#search_result_table_s th,
#search_result_table_s td,
#search_result_table2 th,
#search_result_table2 td {
  text-wrap: nowrap;
  padding: 10px;
  vertical-align: middle;
}

#search_result_table td,
.dataTables_scrollHeadInner th,
#search_result_table2 td,
.dataTables_scrollHeadInner th {
  border-color: #ccc !important;
}

.dataTables_scrollHeadInner th {
  padding: 10px !important;
  vertical-align: middle !important;
}

.hover-shadow:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
  transition: box-shadow 0.2s ease-in-out;
}

fieldset {
  border: 1px dotted gray;
  padding: 5px 10px;
}

.evalLegend {
  font-size: 14px;
}

.evalAnswer {
  font-size: 16px;
  font-weight: bold;
}

.dlr_image_container a {
  flex: 1 1 calc(33.33% - 10px);
  box-sizing: border-box;
}

.dlr_image_inner {
  border: 1px solid #555;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.dlr_image {
  max-height: 350px;
  max-width: 100%;
}

.dlr_image_inner p {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
}

.question-box {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  background-color: #f8f9fa;
}

.mismatch {
  background-color: #fce2e2 !important;
}

.match {
  background-color: rgb(226 255 233) !important;
}

#modify_form .col-6,
#modify_form .col-12,
#create_form .col-6,
#create_form .col-12 {
  display: flex;
  align-items: center;
}

#modify_form h4,
#create_form h4 {
  margin-bottom: 0px;
}

.custom-card {
  background: #ffffff;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.custom-card:hover {
  border-color: #dee2e6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

#gr_history_container {
  max-height: 883px;
  overflow-y: auto;
}

.customTableLink {
  height: 12px;
  line-height: 10px;
  margin-top: -5px;
}

.customTableLink i {
  color: blue !important;
  transition: all 300ms;
  padding: 0px !important;
}

.customTableLink i:hover {
  color: red !important;
}

.custom-accordion-item {
  border: none !important;
}

.custom-accordion-item .accordion-button:hover {
  background-color: #eee !important;
}

.checklist-card {
  background: #ffffff;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.checklist-card:hover {
  border-color: #dee2e6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.checklist-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
}

.checklist-label {
  font-size: 15px;
  font-weight: 500;
  color: #2d3748;
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

.checklist-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.status-buttons {
  display: flex;
  gap: 10px;
}

.btn-check:checked + .btn-outline-success {
  background-color: #10b981;
  border-color: #10b981;
  color: white;
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-check:checked + .btn-outline-danger {
  background-color: #ef4444;
  border-color: #ef4444;
  color: white;
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.btn-outline-success,
.btn-outline-danger {
  font-weight: 600;
  padding: 10px 20px;
  border: 1px solid !important;
  transition: all 0.2s ease;
  font-size: 14px;
}

.btn-outline-success:hover {
  background-color: #10b981;
  border-color: #10b981;
  transform: translateY(-1px);
}

.btn-outline-danger:hover {
  background-color: #ef4444;
  border-color: #ef4444;
  transform: translateY(-1px);
}

.spare-parts-container {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed #e5e7eb;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spare-parts-select {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  transition: all 0.2s ease;
  background-color: #f9fafb;
}

.spare-parts-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background-color: white;
}

.spare-parts-label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
  display: block;
}

.spare-parts-label i {
  color: #ef4444;
  margin-right: 4px;
}

.checklist-row {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .checklist-card {
    margin-bottom: 15px;
  }

  .status-buttons {
    flex-direction: column;
  }

  .btn-outline-success,
  .btn-outline-danger {
    width: 100%;
  }
}

.iqc-form {
  padding-bottom: calc(140px + env(safe-area-inset-bottom));
}

/* Sticky bottom bar */
.iqc-actionbar {
  position: sticky;
  /* stays within scroll container like Bootstrap sticky utilities */
  bottom: 0;
  /* stick to bottom */
  z-index: 1030;
  background: rgba(255, 255, 255, 1);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -12px 30px rgba(16, 24, 40, 0.1);
  padding: 12px 0 calc(40px + env(safe-area-inset-bottom));
}

/* Make textarea comfortable but not too tall */
.iqc-remarks {
  min-height: 44px;
  max-height: 110px;
}

#dynamic_form_container .col-md-8 {
  display: flex;
  align-items: center;
}

/* ── Menu Auth Masonry Layout ── */
.menu-auth-container {
  column-count: 2;
  column-gap: 1.5rem;
}

#kt_accordion_1_body_2 .menu-section {
  break-inside: avoid;
  page-break-inside: avoid; /* Safari fallback */
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

#kt_accordion_1_body_2 .menu-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

#kt_accordion_1_body_2 .section-header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f3f4f6;
}

#kt_accordion_1_body_2 .section-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#kt_accordion_1_body_2 .section-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

#kt_accordion_1_body_2 .section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

#kt_accordion_1_body_2 .select-all-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: #f9fafb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#kt_accordion_1_body_2 .select-all-wrapper:hover {
  background: #f3f4f6;
}

#kt_accordion_1_body_2 .select-all-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0496ff;
}

#kt_accordion_1_body_2 .select-all-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#kt_accordion_1_body_2 .subsection-header {
  font-size: 0.875rem;
  font-weight: 600;
  color: #667eea;
  margin: 1.25rem 0 0.75rem 0;
  padding-left: 0.75rem;
  border-left: 3px solid #667eea;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

#kt_accordion_1_body_2 .menu-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
}

#kt_accordion_1_body_2 .menu-item-card {
  position: relative;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  transition: all 0.25s ease;
  cursor: pointer;
}

#kt_accordion_1_body_2 .sub-menu-item {
  margin-left: 3rem;
}

#kt_accordion_1_body_2 .menu-item-card:hover {
  border-color: #667eea;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.15);
  transform: translateY(-1px);
}

#kt_accordion_1_body_2 .menu-item-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

#kt_accordion_1_body_2
  .menu-item-card
  input[type="checkbox"]:checked
  ~ .menu-checkbox-label {
  color: #0496ff;
  font-weight: 600;
}

#kt_accordion_1_body_2
  .menu-item-card
  input[type="checkbox"]:checked
  ~ .menu-checkbox-label::before {
  background: linear-gradient(135deg, #0496ff 0%, #0496ff 100%);
  border-color: #0496ff;
}

#kt_accordion_1_body_2
  .menu-item-card
  input[type="checkbox"]:checked
  ~ .menu-checkbox-label::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

#kt_accordion_1_body_2 .menu-checkbox-label {
  display: block;
  cursor: pointer;
  color: #374151;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  padding-left: 2rem;
  position: relative;
  line-height: 1.4;
}

#kt_accordion_1_body_2 .menu-checkbox-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 5px;
  background: #ffffff;
  transition: all 0.25s ease;
}

#kt_accordion_1_body_2 .menu-checkbox-label::after {
  content: "✓";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  color: white;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transition: all 0.2s ease;
}

/* Animation for checkbox selection */
@keyframes checkBounce {
  0%,
  100% {
    transform: translateY(-50%) scale(1);
  }

  50% {
    transform: translateY(-50%) scale(1.2);
  }
}

#kt_accordion_1_body_2
  .menu-item-card
  input[type="checkbox"]:checked
  ~ .menu-checkbox-label::after {
  animation: checkBounce 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .menu-auth-container {
    column-count: 1;
  }

  #kt_accordion_1_body_2 .menu-items-grid {
    grid-template-columns: 1fr;
  }

  #kt_accordion_1_body_2 .section-header-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Stats badge */
#kt_accordion_1_body_2 .selected-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  background: #0496ff;
  color: white;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0 0.5rem;
  margin-left: 0.5rem;
}

#success_modal .modal-dialog,
#failed_modal .modal-dialog {
  max-width: 420px;
}

#success_modal .modal-content,
#failed_modal .modal-content {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: modalPop 0.35s ease-out;
}

#success_modal .modal-header,
#failed_modal .modal-header {
  border-bottom: none;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#success_modal .modal-title,
#failed_modal .modal-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

#success_modal .modal-header .btn,
#failed_modal .modal-header .btn {
  padding: 0;
  background: transparent;
  border: none;
  opacity: 0.85;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

#success_modal .modal-header .btn:hover,
#failed_modal .modal-header .btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

#success_modal .modal-body,
#failed_modal .modal-body {
  padding: 16px;
}

#success_modal .modal-body h2,
#failed_modal .modal-body h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.5;
}

#success_modal .modal-footer,
#failed_modal .modal-footer {
  border-top: none;
  padding: 16px 24px 24px;
  justify-content: center;
}

#success_modal .modal-footer .btn,
#failed_modal .modal-footer .btn {
  min-width: 120px;
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

#success_modal .modal-header {
  background: linear-gradient(135deg, #198754, #20c997);
}

#success_modal .modal-body h2 {
  color: #198754;
}

#failed_modal .modal-header {
  background: linear-gradient(135deg, #dc3545, #ff6b6b);
}

#failed_modal .modal-body h2 {
  color: #dc3545;
}

@keyframes modalPop {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.excelDownButton {
  padding: 8px 20px !important;
  margin-bottom: 0px;
  margin-top: 8px;
}

.dr-header {
  background: var(--color-background-primary, #fff);
  border: 0.5px solid var(--color-border-tertiary, #e5e5e5);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0;
}

.dr-header-top {
  padding: 20px 24px 16px;
  border-bottom: 0.5px solid var(--color-border-tertiary, #e5e5e5);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dr-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dr-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 4px;
}

.dr-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text-primary, #111);
  margin: 0;
}

.dr-device-line {
  font-size: 13px;
  color: var(--color-text-secondary, #555);
  margin: 4px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.dr-badge svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.dr-badge-admin {
  background: #fcebeb;
  color: #a32d2d;
  border: 0.5px solid #f09595;
}

.dr-badge-tech {
  background: #eaf3de;
  color: #3b6d11;
  border: 0.5px solid #97c459;
}

.dr-meta {
  padding: 14px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
}

.dr-meta-item {
  padding: 8px 16px 8px 0;
  border-right: 0.5px solid var(--color-border-tertiary, #e5e5e5);
  margin-right: 16px;
}

.dr-meta-item:last-child {
  border-right: none;
  margin-right: 0;
}

.dr-meta-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 3px;
}

.dr-meta-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary, #111);
  margin: 0;
}

.dr-meta-value.muted {
  color: var(--color-text-secondary, #555);
  font-weight: 400;
}

.dr-status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: #e1f5ee;
  color: #0f6e56;
  border: 0.5px solid #5dcaa5;
}

/* ════════════════════════════════════════════════
          Dashboard
  ════════════════════════════════════════════════ */

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.widget-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--bw-radius-sm);
  display: inline-block;
}

.bw-skeleton-value {
  width: 80px;
  height: 28px;
}

/* ── Zone 1: Hero Strip ── */
#bw-hero {
  background: #eef3fa;
  border: 1px solid #d4dded;
  border-radius: var(--bw-radius);
  padding: 16px 20px 18px;
  margin: 0 10px 14px 10px;
  box-shadow: 0 1px 4px rgba(27, 58, 107, 0.05);
}

.bw-hero-greeting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bw-hero-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bw-secondary);
  line-height: 1.3;
}

.bw-hero-sub {
  display: block;
  font-size: 0.9rem;
  color: var(--bw-text-muted);
  margin-top: 3px;
}

.bw-hero-date {
  background: #fff;
  border: 1px solid #d4dded;
  border-radius: 7px;
  padding: 5px 13px;
  font-size: 0.78rem;
  color: var(--bw-secondary);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Zone 1: KPI Cards ── */
#bw-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.bw-kpi-card {
  background: #fff;
  border: 1px solid #d4dded;
  border-radius: var(--bw-radius);
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(27, 58, 107, 0.07);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.bw-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(27, 58, 107, 0.12);
}

.kpi-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--bw-text-muted);
  margin-bottom: 5px;
  font-weight: 700;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--bw-secondary);
  margin-bottom: 7px;
  min-height: 36px;
  display: flex;
  align-items: center;
  line-height: 1.1;
}

.kpi-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}

.kpi-delta {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.kpi-delta-label {
  color: var(--bw-text-muted);
  font-size: 0.7rem;
}

.kpi-delta-text {
  font-weight: 600;
}

.kpi-up {
  color: var(--bw-success);
}

.kpi-down {
  color: var(--bw-danger);
}

.kpi-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  transition: transform 0.3s;
}

.kpi-up .kpi-arrow {
  border-bottom: 6px solid var(--bw-success);
}

.kpi-down .kpi-arrow {
  border-top: 6px solid var(--bw-danger);
}

/* ── Decorative sparklines ── */
.bw-spark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
  flex-shrink: 0;
}

.bw-spark-bar {
  width: 5px;
  border-radius: 2px 2px 0 0;
  background: rgba(0, 150, 199, 0.22);
  flex-shrink: 0;
  transition: background 0.3s;
}

.bw-spark-bar:last-child {
  background: rgba(0, 150, 199, 0.65);
}

/* ── Zone 2: Toolbar ── */
#bw-dashboard-toolbar {
  background: #fff;
  border: 1px solid var(--bw-border);
  border-radius: var(--bw-radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  margin: 0 10px 14px 10px;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(27, 58, 107, 0.07);
}

.bw-toolbar-left,
.bw-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bw-toolbar-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bw-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.bw-date-input {
  width: 120px;
  height: 30px;
  border: 1px solid var(--bw-border);
  border-radius: var(--bw-radius-sm);
  padding: 0 8px;
  font-size: 0.82rem;
  color: var(--bw-secondary);
  cursor: pointer;
  background: #f7f9fc;
  font-weight: 500;
}

.bw-date-input:focus {
  outline: none;
  border-color: var(--bw-accent);
  background: #fff;
}

.bw-toolbar-sep {
  color: var(--bw-text-muted);
  font-weight: 500;
}

.bw-refresh-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.bw-refresh-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bw-text-muted);
  display: inline-block;
  transition: background 0.3s;
}

.bw-refresh-dot.active {
  background: var(--bw-success);
}

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

/* ════════════════════════════════════════════════
           ZONE 3: Widget Cards
        ════════════════════════════════════════════════ */
.grid-stack {
  min-height: 200px;
}

.bw-widget-card {
  height: 100%;
  background: var(--bw-card-bg);
  border: 1px solid var(--bw-border) !important;
  border-radius: var(--bw-radius) !important;
  box-shadow: var(--bw-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bw-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px !important;
  background: #fafbfd;
  border-bottom: 1px solid var(--bw-border) !important;
  flex-shrink: 0;
  cursor: grab;
  min-height: unset !important;
  position: relative;
}

.bw-widget-header:active {
  cursor: grabbing;
}

.bw-widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bw-secondary);
}

.bw-widget-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bw-widget-card .card-body {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.bw-chart-container {
  width: 100%;
  height: 100%;
  min-height: 160px;
}

/* Overlays */
.bw-widget-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.2s;
  flex-direction: column;
  gap: 8px;
}

.bw-widget-overlay.d-none {
  display: none !important;
}

.bw-overlay-error {
  text-align: center;
  color: var(--bw-danger);
  font-size: 0.85rem;
}

.bw-overlay-empty {
  text-align: center;
  color: var(--bw-text-muted);
  font-size: 0.85rem;
}

/* Drag handle hint */
.grid-stack-item-content:hover .bw-widget-header::before {
  content: "⠿";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--bw-border);
  font-size: 14px;
  pointer-events: none;
}

/* ── Toggle button active states ── */
.bw-yoy-toggle.active,
.bw-order-filter.active {
  background: var(--bw-primary);
  border-color: var(--bw-primary);
  color: #fff;
}

/* ── Recent Orders Table ── */
.bw-orders-table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  height: 100%;
}

.bw-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.bw-orders-table thead th {
  position: sticky;
  top: 0;
  padding: 10px 14px;
  background: var(--bw-light);
  color: var(--bw-text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  border-bottom: 2px solid var(--bw-border);
  white-space: nowrap;
  z-index: 1;
}

.bw-orders-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--bw-border);
  vertical-align: middle;
}

.bw-orders-table tbody tr:last-child td {
  border-bottom: none;
}

.bw-orders-table tbody tr:hover td {
  background: var(--bw-light);
  transition: background 0.15s;
}

/* Status badges */
.bw-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.bw-badge-approved {
  background: rgba(40, 180, 99, 0.12);
  color: #28b463;
}

.bw-badge-submitted {
  background: rgba(0, 150, 199, 0.12);
  color: #0096c7;
}

.bw-badge-default {
  background: rgba(107, 122, 153, 0.12);
  color: #6b7a99;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  #bw-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  #bw-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .bw-hero-greeting {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 576px) {
  #bw-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Announcements */
.bw-announcement-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.bw-announcement-icon:hover {
  background-color: rgba(27, 58, 107, 0.1);
}

.bw-announcement-icon .ki-notification-status {
  color: #1b3a6b;
}

.bw-announcement-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  background-color: #dc3545;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.3);
  animation: bw-announcement-pulse 2s ease-in-out infinite;
}

@keyframes bw-announcement-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.3);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15);
  }
}

.bw-announcement-modal {
  border-radius: 0.75rem;
  border: none;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
}

.bw-announcement-modal .modal-header {
  background-color: #071437;
  padding: 1.25rem 1.5rem;
  border-bottom: none;
  border-radius: 0;
  align-items: flex-start;
}

.bw-announcement-modal .modal-header .modal-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.bw-announcement-modal .modal-header .bw-announcement-header-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.bw-announcement-modal .modal-header .bw-announcement-unread-badge {
  display: inline-flex;
  align-items: center;
  background-color: #dc3545;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  white-space: nowrap;
  margin-top: 2px;
}

.bw-announcement-modal .modal-header .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
  opacity: 0.7;
  margin-top: 2px;
}

.bw-announcement-modal .modal-header .btn-close:hover {
  opacity: 1;
}

.bw-announcement-modal .modal-body {
  max-height: 60vh;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

.bw-announcement-modal .modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 0.85rem 1.5rem;
  background-color: #f8f9fa;
  border-radius: 0 0 0.75rem 0.75rem;
}

.bw-announcement-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.25rem;
  position: relative;
}

.bw-announcement-item:last-child {
  padding-bottom: 0;
}

.bw-announcement-timeline-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 16px;
}

.bw-announcement-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.bw-announcement-item.is-unviewed .bw-announcement-timeline-dot {
  background-color: #17a2b8;
  box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.2);
}

.bw-announcement-item:not(.is-unviewed) .bw-announcement-timeline-dot {
  background-color: #ced4da;
}

.bw-announcement-timeline-line {
  width: 1px;
  flex: 1;
  margin-top: 5px;
  background-color: #dee2e6;
  min-height: 12px;
}

.bw-announcement-item:last-child .bw-announcement-timeline-line {
  display: none;
}

.bw-announcement-item-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 0.25rem;
}

.bw-announcement-item-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.bw-announcement-item-meta-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bw-announcement-item-date {
  font-size: 0.72rem;
  color: #6c757d;
  white-space: nowrap;
}

.bw-announcement-item-content {
  color: #2c3e50;
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.bw-announcement-type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bw-announcement-type-platform {
  color: #185fa5;
}

.bw-announcement-type-service {
  color: #854f0b;
}

.bw-announcement-type-launch {
  color: #3b6d11;
}

.bw-announcement-type-default {
  color: #6c757d;
}

.bw-announcement-new-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #17a2b8;
}

.bw-announcement-new-chip::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #17a2b8;
  flex-shrink: 0;
}

.bw-announcement-empty,
.bw-announcement-loading {
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.bw-announcement-empty-icon {
  font-size: 2.5rem;
  color: #ced4da;
  display: block;
  margin-bottom: 0.75rem;
}

@media (max-width: 576px) {
  .bw-announcement-modal .modal-header,
  .bw-announcement-modal .modal-footer {
    padding: 1rem;
  }

  .bw-announcement-modal .modal-body {
    padding: 1rem;
  }

  .bw-announcement-modal .modal-footer {
    flex-direction: column-reverse;
    gap: 0.75rem;
    align-items: stretch !important;
  }

  .bw-announcement-modal .modal-footer .btn,
  .bw-announcement-modal .modal-footer .form-check {
    width: 100%;
  }
}

.bw-pc-panel {
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.bw-pc-panel-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: #f7f8fa;
  border-bottom: 1px solid #e8eaf0;
}

.bw-pc-panel-header .bw-pc-signal {
  width: 3px;
  height: 18px;
  border-radius: 2px;
  flex-shrink: 0;
}

.bw-pc-panel-header h6 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.bw-pc-panel-body {
  padding: 14px 16px;
}

.bw-pc-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bw-pc-field-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

.bw-pc-field-value {
  font-size: 13.5px;
  font-weight: 600;
  color: #111827;
  font-variant-numeric: tabular-nums;
}

.bw-pc-field-value.mono {
  font-family: "Courier New", monospace;
  font-size: 12.5px;
  letter-spacing: 0.03em;
}

.bw-pc-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.bw-pc-pill-ok {
  background: #dcfce7;
  color: #15803d;
}

.bw-pc-pill-warn {
  background: #fef9c3;
  color: #854d0e;
}

.bw-pc-pill-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.bw-pc-pill-neutral {
  background: #f1f5f9;
  color: #475569;
}

.bw-pc-batt-bar {
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  overflow: hidden;
  margin-top: 6px;
}

.bw-pc-batt-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.bw-pc-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid #d1d5db;
  color: #374151;
  background: #fff;
  transition: all 0.15s;
}

.bw-pc-report-btn:hover:not(.disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
}

.bw-pc-report-btn.disabled {
  opacity: 0.38;
  pointer-events: none;
}

.bw-pc-edit-zone {
  background: #f0f7ff;
  border: 1.5px dashed #93c5fd;
  border-radius: 8px;
  padding: 16px;
  margin-top: 4px;
}

.bw-pc-edit-zone .bw-pc-edit-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bw-pc-test-area {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.bw-pc-test-area .bw-pc-test-col {
  padding: 10px 14px;
}

.bw-pc-test-col-header {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.bw-pc-test-col-pass {
  color: #15803d;
  background: #f0fdf4;
}

.bw-pc-test-col-fail {
  color: #b91c1c;
  background: #fef2f2;
}

.bw-pc-test-col-pend {
  color: #b45309;
  background: #fffbeb;
}

.bw-pc-test-tag {
  display: inline-block;
  font-size: 13.5px;
  background: #f1f5f9;
  color: #334155;
  border-radius: 4px;
  padding: 2px 7px;
  margin: 2px 2px 2px 0;
}

.bw-pc-submit-bar {
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
