/* ============================================
   HOWT Design System
   ============================================ */

:root {
  --howt-primary: #2563eb;
  --howt-primary-dark: #1d4ed8;
  --howt-secondary: #64748b;
  --howt-success: #16a34a;
  --howt-warning: #d97706;
  --howt-danger: #dc2626;
  --howt-info: #0891b2;
  --howt-dark: #1e293b;
  --howt-light: #f8fafc;
  --howt-border: #e2e8f0;
  --howt-text: #1e293b;
  --howt-text-muted: #64748b;
  --howt-radius: 10px;
  --howt-radius-lg: 14px;
  --howt-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --howt-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --howt-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --howt-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --howt-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Global ---- */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--howt-text);
  background: #f1f5f9;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

/* ---- Skip Link (a11y) ---- */
.howt-skip-link {
  position: absolute;
  top: -100%;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--howt-primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.2s ease;
}
.howt-skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---- Focus states (a11y) ---- */
*:focus-visible {
  outline: 2px solid var(--howt-primary);
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--howt-primary);
  outline-offset: 2px;
}

/* ---- Cursor pointer for interactive elements ---- */
a[href],
button,
[role="button"],
.howt-metric-card,
.howt-action-btn,
.howt-nav-link,
.howt-dropdown-item,
.howt-order-link,
.howt-btn-create,
.howt-btn-upload,
.howt-recent-item[href],
a.howt-recent-item {
  cursor: pointer;
}

/* ---- Tabular nums for financial data ---- */
.text-end,
td.text-end,
th.text-end,
.howt-amount,
.howt-recent-item .item-value,
.metric-value {
  font-variant-numeric: tabular-nums;
}

/* ---- Navbar ---- */
.howt-navbar {
  background: #fff;
  border-bottom: 1px solid var(--howt-border);
  box-shadow: var(--howt-shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: var(--howt-transition);
}
.howt-navbar .nav-brand img {
  height: 36px;
  transition: transform 0.2s ease;
}
.howt-navbar .nav-brand img:hover {
  transform: scale(1.05);
}
.howt-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--howt-text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: var(--howt-transition);
  letter-spacing: -0.01em;
}
.howt-nav-link:hover {
  color: var(--howt-primary);
  background: rgba(37, 99, 235, 0.06);
}
.howt-nav-link.active {
  color: var(--howt-primary);
  background: rgba(37, 99, 235, 0.08);
}
.howt-nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--howt-text-muted);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--howt-transition);
  letter-spacing: -0.01em;
}
.howt-nav-dropdown-btn:hover {
  color: var(--howt-primary);
  background: rgba(37, 99, 235, 0.06);
}
.howt-dropdown-menu {
  min-width: 200px;
  padding: 0.375rem;
  background: #fff;
  border: 1px solid var(--howt-border);
  border-radius: var(--howt-radius);
  box-shadow: var(--howt-shadow-lg);
}
.howt-dropdown-item {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--howt-text);
  text-decoration: none;
  border-radius: 6px;
  transition: var(--howt-transition);
}
.howt-dropdown-item:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--howt-primary);
}

/* ---- Page Header ---- */
.howt-page-header {
  background: #fff;
  border-bottom: 1px solid var(--howt-border);
  padding: 1.25rem 1.5rem;
}
.howt-page-header h1 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--howt-dark);
  margin: 0;
  letter-spacing: -0.025em;
}

/* ---- Breadcrumbs ---- */
.howt-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.howt-breadcrumb a {
  color: var(--howt-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.howt-breadcrumb a:hover { color: var(--howt-primary); }
.howt-breadcrumb .separator {
  color: #cbd5e1;
  font-size: 0.875rem;
}
.howt-breadcrumb .current {
  color: var(--howt-text);
  font-weight: 600;
}

/* ---- Content Card ---- */
.howt-card {
  background: #fff;
  border-radius: var(--howt-radius-lg);
  box-shadow: var(--howt-shadow);
  border: 1px solid var(--howt-border);
  overflow: hidden;
}
.howt-card-body {
  padding: 1.5rem;
}

/* ---- Status Cards (KPI / Metric Cards) ---- */
.howt-metric-card {
  border-radius: var(--howt-radius-lg);
  border: 1px solid var(--howt-border);
  overflow: hidden;
  transition: var(--howt-transition);
  text-decoration: none !important;
  display: block;
}
.howt-metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--howt-shadow-lg);
}
.howt-metric-card.active {
  box-shadow: 0 0 0 2px var(--howt-primary);
}
.howt-metric-card .metric-body {
  padding: 1.25rem;
  text-align: center;
}
.howt-metric-card .metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--howt-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 1.5rem;
}
.howt-metric-card .metric-value {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.howt-metric-card .metric-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--howt-text-muted);
  margin-top: 0.5rem;
}
.howt-metric-card .metric-sub {
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* Metric card color variants */
.howt-metric-card.metric-danger { background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%); }
.howt-metric-card.metric-danger .metric-icon { background: rgba(239, 68, 68, 0.15); color: var(--howt-danger); }
.howt-metric-card.metric-warning { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); }
.howt-metric-card.metric-warning .metric-icon { background: rgba(245, 158, 11, 0.15); color: var(--howt-warning); }
.howt-metric-card.metric-success { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); }
.howt-metric-card.metric-success .metric-icon { background: rgba(34, 197, 94, 0.15); color: var(--howt-success); }
.howt-metric-card.metric-primary { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); }
.howt-metric-card.metric-primary .metric-icon { background: rgba(59, 130, 246, 0.15); color: var(--howt-primary); }
.howt-metric-card.metric-info { background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%); }
.howt-metric-card.metric-info .metric-icon { background: rgba(8, 145, 178, 0.15); color: var(--howt-info); }

/* ---- Filter Card ---- */
.howt-filter-card {
  background: #fff;
  border-radius: var(--howt-radius-lg);
  border: 1px solid var(--howt-border);
  box-shadow: var(--howt-shadow-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

/* ---- Tables ---- */
.howt-table-wrap {
  border-radius: var(--howt-radius-lg);
  overflow: hidden;
  border: 1px solid var(--howt-border);
  box-shadow: var(--howt-shadow-sm);
  background: #fff;
}
.howt-table-wrap table {
  margin-bottom: 0;
}
.howt-table-wrap thead th {
  background: linear-gradient(135deg, var(--howt-dark) 0%, #334155 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 0.625rem;
  border: none;
  white-space: nowrap;
}
.howt-table-wrap tbody td {
  padding: 0.625rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.8125rem;
}
.howt-table-wrap tbody tr {
  transition: background 0.15s ease;
}
.howt-table-wrap tbody tr:hover {
  background: #f8fafc;
}
.howt-table-wrap tfoot th,
.howt-table-wrap tfoot td {
  background: #f8fafc;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.75rem 0.625rem;
  border-top: 2px solid var(--howt-border);
}

/* DataTables overrides */
.howt-card .table-sm {
  font-size: 0.8125rem;
}
.howt-card .table-sm th {
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--howt-text-muted);
  border-bottom: 2px solid var(--howt-border);
  padding: 0.75rem 0.5rem;
}
.howt-card .table-sm td {
  padding: 0.5rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}
.howt-card .table-sm tbody tr:hover {
  background: #f8fafc;
}

/* ---- Status Badges ---- */
.howt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.howt-badge-danger { background: #fef2f2; color: var(--howt-danger); }
.howt-badge-warning { background: #fefce8; color: #ca8a04; }
.howt-badge-success { background: #f0fdf4; color: var(--howt-success); }
.howt-badge-primary { background: #eff6ff; color: var(--howt-primary); }
.howt-badge-info { background: #ecfeff; color: var(--howt-info); }
.howt-badge-secondary { background: #f1f5f9; color: var(--howt-secondary); }

/* Order status badge aliases */
.howt-badge.pending { background: #fef2f2; color: var(--howt-danger); }
.howt-badge.arranging { background: #fefce8; color: #ca8a04; }
.howt-badge.transit { background: #f0fdf4; color: var(--howt-success); }
.howt-badge.shipped { background: #eff6ff; color: var(--howt-primary); }

/* ---- Action Buttons ---- */
.howt-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  border: none;
  background: transparent;
  transition: var(--howt-transition);
  font-size: 1.125rem;
  cursor: pointer;
}
.howt-action-btn:hover { background: #f1f5f9; }
.howt-action-btn.view { color: var(--howt-primary); }
.howt-action-btn.view:hover { background: rgba(37, 99, 235, 0.1); }
.howt-action-btn.edit { color: var(--howt-warning); }
.howt-action-btn.edit:hover { background: rgba(217, 119, 6, 0.1); }
.howt-action-btn.complete { color: var(--howt-success); }
.howt-action-btn.complete:hover { background: rgba(22, 163, 74, 0.1); }
.howt-action-btn.delete { color: var(--howt-danger); }
.howt-action-btn.delete:hover { background: rgba(220, 38, 38, 0.1); }

/* ---- Bulk Actions Bar ---- */
.howt-bulk-bar {
  background: linear-gradient(135deg, var(--howt-primary) 0%, var(--howt-primary-dark) 100%);
  border-radius: var(--howt-radius-lg);
  padding: 0.75rem 1.25rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  box-shadow: var(--howt-shadow-md);
}
.howt-bulk-bar .btn { border-radius: 8px; font-size: 0.8125rem; }

/* ---- Quick Stats Bar ---- */
.howt-quick-stats {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.howt-quick-stat {
  background: #fff;
  padding: 0.4rem 0.875rem;
  border-radius: 8px;
  border: 1px solid var(--howt-border);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--howt-text-muted);
}
.howt-quick-stat strong { color: var(--howt-primary); }

/* ---- Order Number Link ---- */
.howt-order-link {
  font-weight: 700;
  color: var(--howt-primary);
  text-decoration: none;
  transition: var(--howt-transition);
}
.howt-order-link:hover { text-decoration: underline; color: var(--howt-primary-dark); }

/* ---- Amount Display ---- */
.howt-amount { font-weight: 700; color: var(--howt-dark); font-variant-numeric: tabular-nums; }
.howt-amount-negative { color: var(--howt-danger); }

/* ---- Mobile Order Cards ---- */
.howt-mobile-card {
  border-radius: var(--howt-radius-lg);
  margin-bottom: 0.75rem;
  box-shadow: var(--howt-shadow);
  border: 1px solid var(--howt-border);
  overflow: hidden;
  background: #fff;
}
.howt-mobile-card-header {
  padding: 0.75rem 1rem;
  background: var(--howt-light);
  border-bottom: 1px solid var(--howt-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.howt-mobile-card-body { padding: 1rem; }
.howt-mobile-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.howt-mobile-card-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--howt-text-muted);
  font-weight: 700;
  margin-bottom: 0.125rem;
}
.howt-mobile-card-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--howt-text);
}
.howt-mobile-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--howt-border);
}


/* ---- Dashboard ---- */
.howt-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 992px) {
  .howt-dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .howt-dashboard-grid { grid-template-columns: 1fr; }
}

.howt-dashboard-section {
  margin-bottom: 1.5rem;
}
.howt-dashboard-section-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--howt-text-muted);
  margin-bottom: 0.75rem;
  padding-left: 0.125rem;
}

.howt-recent-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}
.howt-recent-item:last-child { border-bottom: none; }
.howt-recent-item:hover { background: var(--howt-light); }
.howt-recent-item .item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}
.howt-recent-item .item-content { flex: 1; min-width: 0; }
.howt-recent-item .item-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--howt-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.howt-recent-item .item-sub {
  font-size: 0.6875rem;
  color: var(--howt-text-muted);
}
.howt-recent-item .item-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--howt-text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---- Create New Record Button ---- */
.howt-btn-create {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--howt-primary) 0%, var(--howt-primary-dark) 100%);
  border: none;
  border-radius: var(--howt-radius);
  box-shadow: var(--howt-shadow-md);
  text-decoration: none;
  transition: var(--howt-transition);
}
.howt-btn-create:hover {
  transform: translateY(-1px);
  box-shadow: var(--howt-shadow-lg);
  color: #fff;
}

/* ---- Upload Button ---- */
.howt-btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--howt-primary);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  text-decoration: none;
  transition: var(--howt-transition);
  cursor: pointer;
}
.howt-btn-upload:hover {
  background: rgba(37, 99, 235, 0.14);
  color: var(--howt-primary-dark);
}

/* ---- Alerts ---- */
.howt-alert {
  border-radius: var(--howt-radius);
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  box-shadow: var(--howt-shadow-sm);
}
.howt-alert-close {
  position: absolute;
  top: 0.625rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.125rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
  line-height: 1;
}
.howt-alert-close:hover { opacity: 1; }
.howt-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.howt-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* ---- Empty State ---- */
.howt-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--howt-text-muted);
}
.howt-empty-state i {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 0.75rem;
}
.howt-empty-state p {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---- List Page Header ---- */
.howt-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .howt-metric-card .metric-body { padding: 0.875rem; }
  .howt-metric-card .metric-icon { width: 40px; height: 40px; font-size: 1.25rem; }
  .howt-metric-card .metric-value { font-size: 1.5rem; }
  .howt-metric-card .metric-label { font-size: 0.625rem; }
  .howt-mobile-show { display: block !important; }
  .howt-mobile-hide { display: none !important; }
}
@media (min-width: 769px) {
  .howt-mobile-show { display: none !important; }
  .howt-mobile-hide { display: block !important; }
}

/* ---- Animations ---- */
@keyframes howt-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes howt-slide-down {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes howt-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes howt-page-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
.howt-animate-in {
  animation: howt-fade-in 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.howt-stagger-1 { animation-delay: 0.05s; }
.howt-stagger-2 { animation-delay: 0.1s; }
.howt-stagger-3 { animation-delay: 0.15s; }
.howt-stagger-4 { animation-delay: 0.2s; }

/* Page enter transition */
main {
  animation: howt-page-enter 0.25s ease both;
}

/* ---- Loading Skeleton ---- */
.howt-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: howt-shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}
.howt-skeleton-text {
  height: 0.875rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}
.howt-skeleton-text:last-child { width: 60%; }
.howt-skeleton-circle {
  border-radius: 50%;
}
/* DataTable loading overlay */
.dataTables_processing {
  background: rgba(255,255,255,0.92) !important;
  border: none !important;
  border-radius: var(--howt-radius) !important;
  box-shadow: var(--howt-shadow-md) !important;
  padding: 0.75rem 1.5rem !important;
  font-weight: 600 !important;
  color: var(--howt-primary) !important;
  z-index: 10 !important;
}

/* ============================================
   Dark Mode
   ============================================ */
[data-theme="dark"] {
  --howt-primary: #60a5fa;
  --howt-primary-dark: #3b82f6;
  --howt-dark: #f1f5f9;
  --howt-light: #1e293b;
  --howt-border: #334155;
  --howt-text: #e2e8f0;
  --howt-text-muted: #94a3b8;
  --howt-shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --howt-shadow: 0 1px 3px rgba(0,0,0,0.4);
  --howt-shadow-md: 0 4px 6px rgba(0,0,0,0.4);
  --howt-shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
  color-scheme: dark;
}
[data-theme="dark"] body { background: #0f172a; color: #e2e8f0; }
[data-theme="dark"] .howt-navbar { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .howt-page-header { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .howt-page-header h1 { color: #f1f5f9; }
[data-theme="dark"] .howt-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .howt-card-body { color: #e2e8f0; }
[data-theme="dark"] .howt-filter-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .howt-table-wrap { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .howt-table-wrap tbody td { border-color: #334155; color: #cbd5e1; }
[data-theme="dark"] .howt-table-wrap tbody tr:hover { background: #253347 !important; }
[data-theme="dark"] .howt-table-wrap tfoot th,
[data-theme="dark"] .howt-table-wrap tfoot td { background: #1a2332; border-color: #334155; }
[data-theme="dark"] .howt-dropdown-menu { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .howt-dropdown-item { color: #cbd5e1; }
[data-theme="dark"] .howt-dropdown-item:hover { background: rgba(96,165,250,0.1); color: #60a5fa; }
[data-theme="dark"] .howt-metric-card { border-color: #334155; }
[data-theme="dark"] .howt-metric-card.metric-danger { background: linear-gradient(135deg, #2a1215 0%, #3b1219 100%); }
[data-theme="dark"] .howt-metric-card.metric-warning { background: linear-gradient(135deg, #2a2008 0%, #3b2c0e 100%); }
[data-theme="dark"] .howt-metric-card.metric-success { background: linear-gradient(135deg, #0a2a14 0%, #0f3d1c 100%); }
[data-theme="dark"] .howt-metric-card.metric-primary { background: linear-gradient(135deg, #0c1a2e 0%, #112240 100%); }
[data-theme="dark"] .howt-recent-item { border-color: #334155; }
[data-theme="dark"] .howt-recent-item:hover { background: #253347; }
[data-theme="dark"] .howt-recent-item .item-title { color: #e2e8f0; }
[data-theme="dark"] .howt-recent-item .item-value { color: #e2e8f0; }
[data-theme="dark"] .howt-amount { color: #e2e8f0; }
[data-theme="dark"] .howt-order-link { color: #60a5fa; }
[data-theme="dark"] .howt-alert-error { background: #2a1215; border-color: #5c1e24; color: #fca5a5; }
[data-theme="dark"] .howt-alert-success { background: #0a2a14; border-color: #166534; color: #86efac; }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,0.15); }
[data-theme="dark"] .modal-content { background: #1e293b; }
[data-theme="dark"] .modal-header { border-color: #334155; }
[data-theme="dark"] .modal-footer { border-color: #334155; }
[data-theme="dark"] .howt-quick-stat { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .howt-mobile-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .howt-mobile-card-header { background: #253347; border-color: #334155; }
[data-theme="dark"] .howt-company-section .howt-table-wrap { border-color: #334155; }
/* DT dark mode */
[data-theme="dark"] .dataTables_wrapper table.dataTable tbody td { color: #cbd5e1; border-color: #334155 !important; }
[data-theme="dark"] .dataTables_wrapper table.dataTable tbody tr.odd { background: #1e293b; }
[data-theme="dark"] .dataTables_wrapper table.dataTable tbody tr.even { background: #1a2332; }
[data-theme="dark"] .dataTables_wrapper table.dataTable tbody tr:hover { background: #253347 !important; }
[data-theme="dark"] .dataTables_wrapper .dataTables_length select { background: #0f172a; border-color: #334155; color: #e2e8f0; }
[data-theme="dark"] .dataTables_wrapper .dataTables_filter input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button { background: #1e293b !important; border-color: #334155 !important; color: #94a3b8 !important; }
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: rgba(96,165,250,0.1) !important; color: #60a5fa !important; }
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current { background: #3b82f6 !important; border-color: #3b82f6 !important; }
/* Dark forms */
[data-theme="dark"] .form-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .form-card-header { border-color: #334155; }
[data-theme="dark"] .form-card-body { color: #cbd5e1; }
[data-theme="dark"] .form-label { color: #94a3b8; }
[data-theme="dark"] .form-input,
[data-theme="dark"] .table-input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
[data-theme="dark"] .form-input:read-only,
[data-theme="dark"] .form-input:disabled,
[data-theme="dark"] .table-input:read-only { background: #1a2332; color: #64748b; }
[data-theme="dark"] .form-check-custom { background: #253347; }
[data-theme="dark"] .form-check-custom:hover { background: #2d3d52; }
[data-theme="dark"] .form-check-custom span { color: #cbd5e1; }
[data-theme="dark"] .form-actions { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .btn-cancel { background: #334155; color: #94a3b8; border-color: #475569; }
[data-theme="dark"] .btn-cancel:hover { background: #475569; color: #e2e8f0; }
[data-theme="dark"] .quick-fill { background: #112240; border-color: #1e3a5f; }
[data-theme="dark"] .quick-fill-label { color: #60a5fa; }
[data-theme="dark"] .quick-fill-btn { background: #1e293b; border-color: #334155; color: #cbd5e1; }
[data-theme="dark"] .quick-fill-btn:hover { background: #253347; border-color: #475569; }
[data-theme="dark"] .product-table tbody tr.has-qty { background: #0a2a14; }
[data-theme="dark"] .product-table tbody tr.has-qty:hover { background: #0f3d1c; }
[data-theme="dark"] .product-table tfoot { background: #1a2332; border-color: #334155; }
[data-theme="dark"] .product-table .product-name { color: #e2e8f0; }
/* Dark Bootstrap cards (salary forms) */
[data-theme="dark"] .card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .card-header { border-color: #334155; }
[data-theme="dark"] .card-body { color: #cbd5e1; }
[data-theme="dark"] .card.bg-light { background: #253347 !important; }
[data-theme="dark"] .bg-light { background: #253347 !important; }
[data-theme="dark"] .text-muted { color: #94a3b8 !important; }
[data-theme="dark"] .progress { background: #334155; }
[data-theme="dark"] .input-group-text { background: #334155; border-color: #475569; color: #94a3b8; }
[data-theme="dark"] .salary-summary-card { border-color: #334155; }
/* Dark breadcrumb */
[data-theme="dark"] .howt-breadcrumb a { color: #64748b; }
[data-theme="dark"] .howt-breadcrumb a:hover { color: #60a5fa; }
[data-theme="dark"] .howt-breadcrumb .current { color: #e2e8f0; }
/* Dark store cards */
[data-theme="dark"] .howt-store-card { background: #1e293b !important; border-color: #334155 !important; }
/* Dark error page */
[data-theme="dark"] .howt-btn-upload { background: rgba(96,165,250,0.1); border-color: rgba(96,165,250,0.2); color: #60a5fa; }
/* Dark skeleton */
[data-theme="dark"] .howt-skeleton { background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%); background-size: 200% 100%; }
/* Dark scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #475569; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Dark mode toggle button */
.howt-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--howt-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.125rem;
}
.howt-theme-toggle:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--howt-primary);
}

/* ---- Reduced Motion (a11y) ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .howt-metric-card:hover { transform: none; }
  .howt-btn-create:hover { transform: none; }
  .howt-animate-in { animation: none; }
}

/* ---- Print ---- */
@media print {
  .howt-navbar,
  .howt-page-header,
  .no-print { display: none !important; }
  body { background: #fff !important; }
  .howt-card { box-shadow: none; border: 1px solid #ddd; }
}

/* ---- Form improvements ---- */
.form-control:focus,
.form-select:focus {
  border-color: var(--howt-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ============================================
   DataTables Complete Redesign
   ============================================ */
.dataTables_wrapper {
  font-family: inherit;
  font-size: 0.8125rem;
}

/* Top controls: length + search on one row */
.dataTables_wrapper .dt-layout-row:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 0;
}
/* Bottom controls row */
.dataTables_wrapper .dt-layout-row:last-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  gap: 1rem;
}
.dataTables_wrapper .dataTables_length {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--howt-text-muted);
  font-weight: 500;
}
.dataTables_wrapper .dataTables_length label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.dataTables_wrapper .dataTables_length select {
  padding: 0.4rem 2rem 0.4rem 0.625rem;
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 600;
  border: 1.5px solid var(--howt-border);
  border-radius: 8px;
  background: #fff;
  color: var(--howt-text);
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}
.dataTables_wrapper .dataTables_length select:focus {
  outline: none;
  border-color: var(--howt-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dataTables_wrapper .dataTables_filter {
  display: flex;
  justify-content: flex-end;
}
.dataTables_wrapper .dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--howt-text-muted);
  margin: 0;
}
.dataTables_wrapper .dataTables_filter input {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  font-family: inherit;
  border: 1.5px solid var(--howt-border);
  border-radius: 8px;
  background: #fff;
  min-width: 200px;
  transition: all 0.15s ease;
}
.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: var(--howt-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.dataTables_wrapper .dataTables_filter input::placeholder {
  color: #cbd5e1;
}

/* Table header - high specificity for DT v2 */
.dataTables_wrapper table.dataTable thead th,
.dataTables_wrapper table.dataTable thead th.dt-orderable-asc,
.dataTables_wrapper table.dataTable thead th.dt-orderable-desc,
.dataTables_wrapper table.dataTable thead th.dt-orderable-none,
.dataTables_wrapper table.dataTable thead th.dt-ordering-asc,
.dataTables_wrapper table.dataTable thead th.dt-ordering-desc,
.howt-card .table-sm thead th,
.howt-card .table thead th {
  background: linear-gradient(135deg, var(--howt-dark) 0%, #334155 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.6875rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 0.625rem !important;
  border: none !important;
  white-space: nowrap;
  position: relative;
}
/* Sort indicator styling */
.dataTables_wrapper table.dataTable thead th .dt-column-order {
  color: rgba(255,255,255,0.4);
}
.dataTables_wrapper table.dataTable thead th.dt-ordering-asc .dt-column-order,
.dataTables_wrapper table.dataTable thead th.dt-ordering-desc .dt-column-order {
  color: #60a5fa;
}

/* Table body */
.dataTables_wrapper table.dataTable tbody td,
.howt-card .table-sm tbody td,
.howt-card .table tbody td {
  padding: 0.625rem !important;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9 !important;
  border-top: none !important;
  font-size: 0.8125rem;
  color: var(--howt-text);
}
.dataTables_wrapper table.dataTable tbody tr {
  transition: background 0.12s ease;
}
.dataTables_wrapper table.dataTable tbody tr:hover,
.howt-card .table-sm tbody tr:hover,
.howt-card .table tbody tr:hover {
  background: #f8fafc !important;
}
.dataTables_wrapper table.dataTable tbody tr.odd {
  background: #fff;
}
.dataTables_wrapper table.dataTable tbody tr.even {
  background: #fafbfc;
}
/* Remove default DT border */
.dataTables_wrapper table.dataTable {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}
.dataTables_wrapper table.dataTable thead th:first-child {
  border-top-left-radius: 0;
}
.dataTables_wrapper table.dataTable thead th:last-child {
  border-top-right-radius: 0;
}

/* Bottom controls: info + pagination */
.dataTables_wrapper .dataTables_info {
  font-size: 0.8125rem;
  color: var(--howt-text-muted);
  font-weight: 500;
  padding-top: 1rem !important;
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 1rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem !important;
  margin: 0 2px !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: var(--howt-text-muted) !important;
  background: #fff !important;
  border: 1.5px solid var(--howt-border) !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: rgba(37, 99, 235, 0.06) !important;
  color: var(--howt-primary) !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--howt-primary) !important;
  color: #fff !important;
  border-color: var(--howt-primary) !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--howt-primary-dark) !important;
  color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f8fafc !important;
  border-color: var(--howt-border) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  background: #f8fafc !important;
  color: var(--howt-text-muted) !important;
  border-color: var(--howt-border) !important;
}

/* Empty table */
.dataTables_wrapper .dataTables_empty {
  text-align: center;
  padding: 2rem !important;
  color: var(--howt-text-muted);
  font-weight: 500;
}

/* Processing indicator */
.dataTables_wrapper .dataTables_processing {
  background: rgba(255, 255, 255, 0.9) !important;
  border: none !important;
  box-shadow: var(--howt-shadow-md);
  border-radius: var(--howt-radius);
  padding: 0.75rem 1.5rem !important;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--howt-primary);
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
  }
  .dataTables_wrapper .dataTables_filter input {
    min-width: 160px;
  }
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    text-align: center;
    float: none !important;
  }
  .dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---- Modal improvements ---- */
.modal-content {
  border: none;
  border-radius: var(--howt-radius-lg);
  box-shadow: var(--howt-shadow-lg);
}
.modal-header {
  border-bottom: 1px solid var(--howt-border);
  padding: 1rem 1.25rem;
}
.modal-header .modal-title {
  font-weight: 700;
  font-size: 1rem;
}
.modal-footer {
  border-top: 1px solid var(--howt-border);
  padding: 0.875rem 1.25rem;
}

/* ---- Salary table company sections ---- */
.howt-company-section {
  margin-bottom: 1.5rem;
}
.howt-company-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 8px 8px 0 0;
  color: #fff;
}
.howt-company-howt { background: var(--howt-primary); }
.howt-company-hsac { background: #7c3aed; }
.howt-company-trio { background: #0891b2; }
.howt-company-duria { background: #059669; }

/* ============================================
   Form System
   ============================================ */
.form-card {
  background: #fff;
  border-radius: var(--howt-radius-lg);
  box-shadow: var(--howt-shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--howt-border);
}
.form-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--howt-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.form-card-header i { font-size: 1.25rem; }
.form-card-header h3 {
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.form-card-body { padding: 1.25rem; }
.form-group { margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.375rem;
}
.form-label .required { color: var(--howt-danger); margin-left: 0.25rem; }
.form-input {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1.5px solid var(--howt-border);
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #fff;
  color: var(--howt-text);
}
.form-input:focus {
  outline: none;
  border-color: var(--howt-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-input:disabled,
.form-input:read-only {
  background: var(--howt-light);
  color: var(--howt-text-muted);
}
.form-input-icon { position: relative; }
.form-input-icon i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.form-input-icon .form-input,
.form-input-icon .form-control {
  padding-left: 2.25rem;
}
.form-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}
.form-check-custom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--howt-light);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.form-check-custom:hover { background: #f1f5f9; }
.form-check-custom input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}
.form-check-custom span {
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

/* Form grids */
.form-grid { display: grid; gap: 1rem; }
.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* Form actions (sticky bottom bar) */
.form-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-radius: var(--howt-radius-lg);
  box-shadow: var(--howt-shadow-md);
  border: 1px solid var(--howt-border);
  position: sticky;
  bottom: 1rem;
}
.btn-submit {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: var(--howt-radius);
  cursor: pointer;
  transition: var(--howt-transition);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}
.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}
.btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--howt-text-muted);
  background: #f1f5f9;
  border: 1px solid var(--howt-border);
  border-radius: var(--howt-radius);
  text-decoration: none;
  cursor: pointer;
  transition: var(--howt-transition);
}
.btn-cancel:hover {
  background: var(--howt-border);
  color: var(--howt-text);
}
@media (max-width: 768px) {
  .form-actions { flex-direction: column; }
}

/* Validation */
.is-invalid { border-color: var(--howt-danger) !important; }
.invalid-feedback {
  color: var(--howt-danger);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Product table */
.product-table-wrapper { overflow-x: auto; margin: -1.25rem; margin-top: 0; }
.product-table { width: 100%; border-collapse: collapse; }
.product-table thead {
  background: linear-gradient(135deg, var(--howt-dark) 0%, #334155 100%);
}
.product-table thead th {
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}
.product-table tbody tr:hover { background: var(--howt-light); }
.product-table tbody tr.has-qty { background: #f0fdf4; }
.product-table tbody tr.has-qty:hover { background: #dcfce7; }
.product-table tbody td { padding: 0.5rem; vertical-align: middle; }
.product-table .product-name {
  font-weight: 600;
  color: var(--howt-dark);
  white-space: nowrap;
}
.product-table .table-input {
  width: 100%;
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  font-family: inherit;
  border: 1.5px solid var(--howt-border);
  border-radius: 6px;
  text-align: right;
  background: #fff;
  transition: all 0.15s ease;
}
.product-table .table-input:focus {
  outline: none;
  border-color: var(--howt-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
.product-table .table-input:read-only {
  background: var(--howt-light);
  color: var(--howt-text-muted);
}
.product-table .qty-input {
  width: 60px;
  text-align: center;
  font-weight: 700;
}
.product-table .delete-btn {
  background: none;
  border: none;
  color: var(--howt-danger);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background 0.15s ease;
}
.product-table .delete-btn:hover { background: #fef2f2; }
.product-table tfoot {
  background: var(--howt-light);
  border-top: 2px solid var(--howt-border);
}
.product-table tfoot td {
  padding: 0.75rem 0.5rem;
  font-weight: 700;
}
.product-table .total-input {
  font-size: 1rem;
  font-weight: 800;
  border: 2px solid var(--howt-border);
}
.product-table .grand-total { font-size: 1.125rem; color: var(--howt-success); }

/* Quick fill */
.quick-fill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #eff6ff;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid #dbeafe;
}
.quick-fill-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1e40af;
}
.quick-fill-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quick-fill-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
