/* ============================================================
   Green Apple Shop - Layout & components
   Mobile-first. Depends on theme.css tokens + Bootstrap 5.3.
   ============================================================ */
* {
  -webkit-tap-highlight-color: transparent;
}

body.gas-body {
  font-family: var(--bs-body-font-family);
  background: var(--surface-2);
  color: var(--text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
a {
  text-decoration: none;
}
::selection {
  background: var(--gas-green-200);
  color: var(--gas-green-900);
}

/* ---------- Scrollbars ---------- */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-muted) 35%, transparent);
  border-radius: 99px;
}

/* ================= SIDEBAR ================= */
.gas-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1045;
  width: var(--sidebar-w);
  background: var(--gradient-ink);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition:
    transform var(--transition),
    width var(--transition);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.gas-sidebar.show {
  transform: translateX(0);
}
@media (min-width: 992px) {
  .gas-sidebar {
    transform: translateX(0);
  }
}

.gas-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--navbar-h);
  padding: 0 1.15rem;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 6px 16px -6px var(--gas-green-500);
}
.brand-text strong {
  display: block;
  color: #fff;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}
.brand-text small {
  color: var(--gas-green-300);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand-close {
  color: var(--sidebar-text);
  margin-left: auto;
}

.gas-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.9rem 0.7rem 1rem;
}
.gas-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.62rem 0.7rem;
  margin-bottom: 0.18rem;
  border: 0;
  background: transparent;
  color: var(--sidebar-text);
  border-radius: var(--radius-sm);
  font-size: 0.89rem;
  font-weight: 500;
  text-align: left;
  transition:
    background var(--transition),
    color var(--transition);
}
.gas-link i:first-child {
  font-size: 1.05rem;
  width: 1.25rem;
  text-align: center;
  flex: 0 0 auto;
}
.gas-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.gas-link.active {
  background: color-mix(in srgb, var(--gas-green-500) 22%, transparent);
  color: #fff;
}
.gas-link.active i:first-child {
  color: var(--gas-green-300);
}
.gas-toggle .caret {
  margin-left: auto;
  font-size: 0.72rem;
  transition: transform var(--transition);
}
.gas-toggle[aria-expanded="true"] .caret {
  transform: rotate(90deg);
}

.gas-sub {
  padding: 0.15rem 0 0.35rem 2rem;
}
.gas-sublink {
  display: block;
  padding: 0.42rem 0.6rem;
  margin-bottom: 0.1rem;
  color: color-mix(in srgb, var(--sidebar-text) 80%, transparent);
  font-size: 0.84rem;
  border-radius: 0.5rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}
.gas-sublink:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.gas-sublink.active {
  color: #fff;
  border-left-color: var(--gas-green-400);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
}

.gas-sidebar-foot {
  padding: 0.8rem 0.9rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.sidebar-card {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.sidebar-card i {
  color: var(--gas-green-300);
  font-size: 1.1rem;
}
.sidebar-card strong {
  display: block;
  font-size: 0.8rem;
  color: #fff;
}
.sidebar-card small {
  color: var(--sidebar-text);
  font-size: 0.72rem;
}

.gas-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(4, 14, 9, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
body.sidebar-open .gas-backdrop {
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 992px) {
  .gas-backdrop {
    display: none;
  }
}

/* Collapsed (icon-only) sidebar on desktop */
@media (min-width: 992px) {
  body.sidebar-collapsed .gas-sidebar {
    width: var(--sidebar-w-collapsed);
  }
  body.sidebar-collapsed .gas-sidebar .brand-text,
  body.sidebar-collapsed .gas-sidebar .gas-link span,
  body.sidebar-collapsed .gas-sidebar .caret,
  body.sidebar-collapsed .gas-sidebar .sidebar-card div,
  body.sidebar-collapsed .gas-sidebar .collapse {
    display: none !important;
  }
  body.sidebar-collapsed .gas-sidebar .gas-link {
    justify-content: center;
  }
  body.sidebar-collapsed .gas-brand {
    justify-content: center;
    padding: 0;
  }
  body.sidebar-collapsed .sidebar-card {
    justify-content: center;
  }
  body.sidebar-collapsed .gas-main {
    margin-left: var(--sidebar-w-collapsed);
  }
}

/* ================= MAIN + NAVBAR ================= */
.gas-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin var(--transition);
}
@media (min-width: 992px) {
  .gas-main {
    margin-left: var(--sidebar-w);
  }
}

.gas-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--navbar-h);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.85rem;
  background: var(--surface-glass);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 576px) {
  .gas-navbar {
    padding: 0 1.35rem;
  }
}

.icon-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  border-radius: 11px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition:
    background var(--transition),
    color var(--transition);
}
.icon-btn:hover {
  background: color-mix(in srgb, var(--gas-green-500) 12%, transparent);
  color: var(--gas-green-600);
}
.dot-badge {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 17px;
  height: 17px;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--surface);
}

.gas-search {
  position: relative;
  flex: 1 1 auto;
  max-width: 420px;
}
.gas-search i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.gas-search .form-control {
  padding-left: 2.4rem;
  padding-right: 2.4rem;
  height: 42px;
  background: color-mix(in srgb, var(--text-muted) 8%, transparent);
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--text);
}
.gas-search .form-control:focus {
  background: var(--surface);
  border-color: var(--gas-green-300);
  box-shadow: 0 0 0 4px
    color-mix(in srgb, var(--gas-green-500) 12%, transparent);
}
.gas-search kbd {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0 0.4rem;
  font-size: 0.7rem;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 0;
  background: transparent;
  padding: 0.3rem 0.5rem 0.3rem 0.3rem;
  border-radius: 999px;
  color: var(--text);
  transition: background var(--transition);
}
.profile-btn:hover {
  background: color-mix(in srgb, var(--text-muted) 10%, transparent);
}
.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}
.theme-icon-light {
  display: none;
}
[data-bs-theme="dark"] .theme-icon-dark {
  display: none;
}
[data-bs-theme="dark"] .theme-icon-light {
  display: inline;
}

.gas-dropdown {
  min-width: 290px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  padding: 0.4rem;
}
.gas-dropdown .dropdown-item {
  border-radius: 0.55rem;
  font-size: 0.875rem;
  padding: 0.5rem 0.7rem;
}
.notif-list {
  max-height: 340px;
  overflow-y: auto;
}
.notif-item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.7rem 0.85rem;
  border-radius: 0.6rem;
  color: var(--text);
}
.notif-item:hover {
  background: var(--surface-2);
}
.notif-item.unread {
  background: color-mix(in srgb, var(--gas-green-500) 7%, transparent);
}
.notif-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--gas-green-500) 14%, transparent);
  color: var(--gas-green-600);
}

/* ================= CONTENT ================= */
.gas-content {
  flex: 1 1 auto;
  padding: 1.25rem 0.9rem 2rem;
}
@media (min-width: 576px) {
  .gas-content {
    padding: 1.6rem 1.35rem 2.5rem;
  }
}
@media (min-width: 1400px) {
  .gas-content {
    padding: 1.9rem 2rem 3rem;
  }
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
@media (min-width: 768px) {
  .page-title {
    font-size: 1.65rem;
  }
}
.breadcrumb {
  font-size: 0.8rem;
  --bs-breadcrumb-divider: "›";
}
.breadcrumb-item a {
  color: var(--text-muted);
}
.breadcrumb-item.active {
  color: var(--gas-green-600);
  font-weight: 600;
}

.gas-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.8rem;
  background: var(--surface);
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.card-header h2,
.card-header h3,
.card-title {
  font-size: 1rem;
  font-weight: 650;
  margin: 0;
  letter-spacing: -0.01em;
}
.card-body {
  padding: 1.15rem;
}
.card-hover {
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* KPI card */
.kpi {
  position: relative;
  overflow: hidden;
  height: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.15rem;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}
.kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.kpi::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.07;
}
.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
  background: color-mix(in srgb, var(--gas-green-500) 12%, transparent);
  color: var(--gas-green-600);
}
.kpi-icon.is-amber {
  background: color-mix(in srgb, #f59e0b 14%, transparent);
  color: #b45309;
}
.kpi-icon.is-blue {
  background: color-mix(in srgb, #0ea5e9 14%, transparent);
  color: #0284c7;
}
.kpi-icon.is-rose {
  background: color-mix(in srgb, #ef4444 14%, transparent);
  color: #dc2626;
}
.kpi-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.kpi-value {
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0.15rem 0 0.35rem;
}
.kpi-trend {
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.trend-up {
  color: #16a34a;
}
.trend-down {
  color: #dc2626;
}

/* Stat / mini rows */
.stat-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line);
}
.stat-row:last-child {
  border-bottom: 0;
}
.thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  object-fit: cover;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

/* Progress */
.progress {
  height: 7px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--text-muted) 14%, transparent);
}
.progress-bar {
  background: var(--gradient-primary);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.6rem;
  margin: 0;
  list-style: none;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 2px;
  background: var(--line);
}
.timeline li {
  position: relative;
  padding-bottom: 1.05rem;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.18rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gas-green-500);
  box-shadow: 0 0 0 4px
    color-mix(in srgb, var(--gas-green-500) 16%, transparent);
}
.timeline .t-title {
  font-size: 0.875rem;
  font-weight: 600;
}
.timeline .t-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Chart wrappers keep a fixed aspect so Chart.js can't grow infinitely */
.chart-box {
  position: relative;
  width: 100%;
  height: 300px;
}
.chart-box.sm {
  height: 240px;
}

/* ---------- Forms / buttons ---------- */
.form-control,
.form-select {
  border-radius: 0.7rem;
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--gas-green-400);
  box-shadow: 0 0 0 4px
    color-mix(in srgb, var(--gas-green-500) 12%, transparent);
}
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.btn {
  border-radius: 0.7rem;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0.95rem;
}
.btn-primary {
  background: var(--gas-green-500);
  border-color: var(--gas-green-500);
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--gas-green-600);
  border-color: var(--gas-green-600);
}
.btn-brand {
  background: var(--gradient-primary);
  border: 0;
  color: #fff;
  box-shadow: 0 10px 22px -12px var(--gas-green-500);
}
.btn-brand:hover {
  color: #fff;
  filter: brightness(1.05);
}
.btn-outline-primary {
  color: var(--gas-green-600);
  border-color: color-mix(in srgb, var(--gas-green-500) 40%, transparent);
}
.btn-outline-primary:hover {
  background: var(--gas-green-500);
  border-color: var(--gas-green-500);
}
.btn-soft {
  background: color-mix(in srgb, var(--gas-green-500) 12%, transparent);
  color: var(--gas-green-600);
  border: 0;
}
.btn-soft:hover {
  background: color-mix(in srgb, var(--gas-green-500) 20%, transparent);
  color: var(--gas-green-700);
}

/* ---------- Tables / DataTables ---------- */
.table {
  --bs-table-bg: transparent;
  color: var(--text);
  margin-bottom: 0;
}
.table > thead th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table > tbody > tr > td {
  border-color: var(--line);
  vertical-align: middle;
  font-size: 0.875rem;
  padding: 0.7rem 0.75rem;
}
.table-hover > tbody > tr:hover > * {
  background: color-mix(in srgb, var(--gas-green-500) 5%, transparent);
}
.dataTables_wrapper {
  padding: 0.25rem;
}
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: 0.6rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0.35rem 0.6rem;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.page-link {
  border-radius: 0.55rem !important;
  margin: 0 2px;
  border: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.page-item.active .page-link {
  background: var(--gas-green-500);
  color: #fff;
}
.dt-buttons .btn {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  margin-right: 0.3rem;
}
.dt-buttons .btn:hover {
  background: var(--gas-green-500);
  border-color: var(--gas-green-500);
  color: #fff;
}

/* Select2 + Flatpickr to match the theme */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-radius: 0.7rem !important;
  border-color: var(--line) !important;
  background: var(--surface) !important;
  min-height: 40px;
  padding-top: 3px;
}
.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: var(--text);
  line-height: 34px;
}
.select2-dropdown {
  border-color: var(--line);
  border-radius: 0.7rem;
  background: var(--surface);
  color: var(--text);
}
.select2-container--default
  .select2-results__option--highlighted[aria-selected] {
  background: var(--gas-green-500);
}
.flatpickr-day.selected {
  background: var(--gas-green-500);
  border-color: var(--gas-green-500);
}

/* Utility */
.text-muted {
  color: var(--text-muted) !important;
}
.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
}
.hstack-sep > * + * {
  border-left: 1px solid var(--line);
  padding-left: 1rem;
  margin-left: 1rem;
}
@media print {
  .gas-sidebar,
  .gas-navbar,
  .gas-footer,
  .no-print {
    display: none !important;
  }
  .gas-main {
    margin: 0 !important;
  }
}

/* ================= POS TERMINAL ================= */
.pos-product {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.2rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}
.pos-product:hover:not(:disabled) {
  border-color: var(--gas-green-400);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.pos-product:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pos-product img,
.pos-noimg {
  width: 100%;
  height: 74px;
  object-fit: cover;
  border-radius: 0.6rem;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 1.3rem;
}
.pos-product strong {
  font-size: 0.82rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.2rem;
}
.pos-product small {
  color: var(--text-muted);
  font-size: 0.72rem;
}
.pos-price {
  font-weight: 700;
  color: var(--gas-green-600);
  font-size: 0.85rem;
}
.pos-stock {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.pos-cart-card {
  position: sticky;
  top: calc(var(--navbar-h) + 1rem);
}
.cart-qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

/* ================= REPAIR STATUS BOARD TABS ================= */
.status-tabs {
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.65rem;
  gap: 0.5rem;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.status-tab-btn,
.status-tabs .nav-link {
  border-radius: var(--radius-sm) !important;
  padding: 0.55rem 1.05rem !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease !important;
  cursor: pointer;
}

/* Active Tab: Vibrant Brand Theme Green Fill */
.active-tab-green,
.status-tabs .nav-link.active,
.status-tabs button.nav-link.active,
.status-tabs .nav-link[aria-selected="true"] {
  background: #1ba463 !important;
  background: linear-gradient(135deg, #1ba463 0%, #106a41 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #1ba463 !important;
  box-shadow: 0 6px 18px -2px rgba(27, 164, 99, 0.55), 0 0 0 2px rgba(27, 164, 99, 0.35) !important;
  font-weight: 700 !important;
  transform: translateY(-1px);
}

.active-tab-green *,
.active-tab-green i,
.active-tab-green span:not(.tab-count-badge),
.status-tabs .nav-link.active i,
.status-tabs .nav-link.active span:not(.tab-count-badge),
.status-tabs .nav-link[aria-selected="true"] i,
.status-tabs .nav-link[aria-selected="true"] span:not(.tab-count-badge) {
  color: #ffffff !important;
}

.active-tab-green .tab-count-badge,
.status-tabs .nav-link.active .tab-count-badge,
.status-tabs .nav-link[aria-selected="true"] .tab-count-badge {
  background: #ffffff !important;
  color: #08361f !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

/* Inactive Tabs */
.inactive-tab-grey,
.status-tabs .nav-link:not(.active):not([aria-selected="true"]) {
  background: var(--surface) !important;
  color: var(--text-muted) !important;
  border: 1.5px solid var(--line) !important;
  font-weight: 600 !important;
}
.inactive-tab-grey:hover,
.status-tabs .nav-link:not(.active):not([aria-selected="true"]):hover {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border-color: var(--gas-green-400) !important;
  transform: translateY(-1px);
}
.inactive-tab-grey .tab-count-badge,
.status-tabs .nav-link:not(.active) .tab-count-badge {
  background: color-mix(in srgb, var(--text-muted) 20%, transparent) !important;
  color: var(--text) !important;
  font-weight: 700 !important;
}

.btn-icon-dots {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-muted);
  transition: all var(--transition);
}
.btn-icon-dots:hover,
.btn-icon-dots[aria-expanded="true"] {
  background: color-mix(in srgb, var(--gas-green-500) 18%, transparent);
  color: var(--gas-green-600);
  border-color: var(--gas-green-400);
}

/* Ensure card 3-dots dropdown menu opens on the right side of the card */
.rc-head .dropdown {
  position: relative !important;
}
.rc-head .dropdown-menu,
.dropdown-menu.gas-dropdown {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;
  margin-top: 0.35rem !important;
}

.repair-tab-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.repair-tab-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--gas-green-500) 40%, transparent);
}
.repair-tab-card .rc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}
.repair-tab-card .rc-code {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--gas-green-600);
}
.repair-tab-card .rc-customer {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
  color: var(--text);
}
.repair-tab-card .rc-device {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.repair-tab-card .rc-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  border-top: 1px dashed var(--line);
  margin-top: auto;
}
.repair-tab-card .rc-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.kanban-wrap {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  height: 75vh;
}
.kanban-col {
  flex: 0 0 260px;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 0.75rem;
}
.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  padding: 0 0.2rem;
}
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.6rem;
  box-shadow: var(--shadow-xs);
}
.kanban-card:last-child {
  margin-bottom: 0;
}
.kanban-card .k-code {
  font-weight: 700;
  font-size: 0.82rem;
}
.kanban-card .k-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ================= PRINT LAYOUTS ================= */
.print-wrap {
  max-width: 780px;
  margin: 0 auto;
  background: #fff;
  color: #111;
  padding: 2rem;
}
.print-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.print-wrap th,
.print-wrap td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #e4ebe7;
  text-align: left;
}
.print-wrap .text-end {
  text-align: right;
}
@media print {
  .print-wrap .no-print {
    display: none !important;
  }
}

/* Technician assignment dropdown on repair cards */
.card-tech-select {
  font-size: 0.78rem !important;
  height: 25px !important;
  min-height: 25px !important;
  line-height: 1.2 !important;
  padding: 1px 22px 1px 6px !important;
  border-radius: 4px !important;
  border: 1px solid var(--line, #d1d5db) !important;
  background-color: var(--surface-subtle, #f8fafc) !important;
  color: var(--text, #1f2937) !important;
  font-weight: 500 !important;
  max-width: 135px !important;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.card-tech-select:hover,
.card-tech-select:focus {
  background-color: var(--surface, #ffffff) !important;
  border-color: var(--gas-green-500, #10b981) !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
  outline: none;
}
.card-tech-select.is-updating {
  opacity: 0.6;
  pointer-events: none;
}

