:root {
  --primary: #4f46e5;
  --primary-deep: #4338ca;
  --primary-soft: #6366f1;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --neutral-900: #111827;
  --neutral-700: #374151;
  --neutral-500: #6b7280;
  --neutral-100: #f3f4f6;
  --neutral-50: #f9fafb;
  --border: #e5e7eb;
  --sidebar-width: 240px;
  --sidebar-collapsed: 60px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--neutral-900);
  background:
    radial-gradient(900px 420px at -12% -8%, rgba(79, 70, 229, 0.12), transparent 60%),
    radial-gradient(820px 360px at 110% 18%, rgba(79, 70, 229, 0.08), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, var(--neutral-50) 55%, #f7f8ff 100%);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

a {
  text-decoration: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%);
  color: #fff;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width var(--transition-base), padding var(--transition-base), transform var(--transition-base);
  overflow: hidden;
}

.sidebar h2 {
  margin: 0 10px 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.sidebar .nav {
  gap: 4px;
}

.sidebar .nav-link {
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
}

.sidebar .nav-link::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

.sidebar .nav-link .link-text {
  white-space: nowrap;
  transition: opacity var(--transition-fast), width var(--transition-fast);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateX(2px);
}

.sidebar .nav-link.active::before,
.sidebar .nav-link:hover::before {
  background: #fff;
}

.main {
  flex: 1;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
}

.topbar .topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--neutral-700);
}

.sidebar-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(79, 70, 229, 0.25);
  background: #fff;
  border-radius: 10px;
  color: var(--primary);
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.sidebar-toggle:hover {
  transform: scale(1.06);
  background: var(--primary);
  color: #fff;
}

.content {
  padding: 22px;
  position: relative;
}

.panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.panel + .panel {
  margin-top: 14px;
}

.panel:hover {
  border-color: rgba(79, 70, 229, 0.24);
}

h5,
.h5 {
  color: var(--neutral-900);
  font-weight: 700;
  margin-bottom: 12px;
}

.form-label {
  color: var(--neutral-700);
  font-weight: 600;
  margin-bottom: 6px;
}

.form-control,
.form-select {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  min-height: 42px;
  color: var(--neutral-900);
  background: #fff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

textarea.form-control {
  min-height: 92px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(79, 70, 229, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.12);
}

.filter-row .form-control,
.filter-row .form-select {
  min-width: 140px;
}

.search-select {
  position: relative;
}

.search-select-input {
  width: 100%;
}

.search-select-native {
  position: absolute !important;
  left: 0;
  top: 0;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.search-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 250px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.16);
  padding: 6px;
  z-index: 1200;
  display: none;
}

.search-select.open .search-select-menu {
  display: block;
}

.search-select-option {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--neutral-700);
  text-align: left;
  padding: 7px 10px;
  font-size: 14px;
}

.search-select-option:hover,
.search-select-option.active {
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary-deep);
}

.search-select-empty {
  color: var(--neutral-500);
  font-size: 13px;
  padding: 8px 10px;
}

.btn {
  border-radius: 12px;
  border: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform var(--transition-fast), filter var(--transition-fast), background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

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

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  box-shadow: 0 5px 14px rgba(79, 70, 229, 0.22);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  color: #fff;
  background: linear-gradient(135deg, #5e56ee 0%, #4338ca 100%);
}

.btn-success {
  color: #fff;
  background: linear-gradient(135deg, #14c58d 0%, #10b981 100%);
  box-shadow: 0 5px 14px rgba(16, 185, 129, 0.2);
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  color: #fff;
}

.btn-secondary {
  background: #e5e7eb;
  color: var(--neutral-700);
}

.btn-outline-primary {
  border: 1px solid rgba(79, 70, 229, 0.35);
  color: var(--primary);
  background: rgba(79, 70, 229, 0.04);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-outline-secondary {
  border: 1px solid rgba(107, 114, 128, 0.35);
  color: var(--neutral-700);
  background: #fff;
}

.btn-outline-secondary:hover {
  background: var(--neutral-100);
  color: var(--neutral-900);
}

.btn-outline-success {
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #059669;
  background: rgba(16, 185, 129, 0.06);
}

.btn-outline-success:hover {
  background: #10b981;
  color: #fff;
}

.btn-outline-danger {
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #dc2626;
  background: rgba(239, 68, 68, 0.06);
}

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

.table {
  margin-bottom: 0;
  color: var(--neutral-700);
}

.table thead th {
  background: #f4f6fb;
  color: var(--neutral-700);
  border-bottom: 1px solid var(--border);
  border-top: 0;
  font-weight: 700;
  white-space: nowrap;
  padding: 12px 10px;
}

.table td {
  border-color: var(--border);
  vertical-align: middle;
  padding: 11px 10px;
}

.table tbody tr:nth-child(even) {
  background: rgba(249, 250, 251, 0.85);
}

.table-hover tbody tr:hover {
  background: rgba(79, 70, 229, 0.06);
}

.history-expand-btn {
  min-width: 18px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.history-expand-btn:hover,
.history-expand-btn:focus {
  color: var(--primary-deep);
}

.history-detail-cell {
  background: rgba(79, 70, 229, 0.04);
}

.table-bordered > :not(caption) > * > * {
  border-color: var(--border);
}

.badge {
  border-radius: 999px;
  padding: 0.42em 0.72em;
  font-weight: 600;
}

.pagination {
  gap: 4px;
  flex-wrap: wrap;
}

.page-item .page-link {
  border-radius: 10px;
  border: 1px solid #d1d5db;
  color: var(--neutral-700);
  min-width: 36px;
  text-align: center;
}

.page-item.active .page-link {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.page-item.disabled .page-link {
  color: #9ca3af;
}

.stat-card {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  padding: 14px 16px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.26);
}

.stat-title {
  color: var(--neutral-500);
  font-size: 13px;
}

.stat-value {
  margin-top: 2px;
  color: var(--neutral-900);
  font-size: 24px;
  font-weight: 700;
}

.stat-card.tone-income {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(145deg, #ffffff, #ecfdf5);
}

.stat-card.tone-income .stat-value {
  color: #047857;
}

.stat-card.tone-cost {
  border-color: rgba(249, 115, 22, 0.35);
  background: linear-gradient(145deg, #ffffff, #fff7ed);
}

.stat-card.tone-cost .stat-value {
  color: #c2410c;
}

.stat-card.tone-cash {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(145deg, #ffffff, #eff6ff);
}

.stat-card.tone-cash .stat-value {
  color: #1d4ed8;
}

.stat-card.tone-inventory {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(145deg, #ffffff, #f5f3ff);
}

.stat-card.tone-inventory .stat-value {
  color: #6d28d9;
}

.stat-card.tone-status {
  border-color: rgba(100, 116, 139, 0.35);
  background: linear-gradient(145deg, #ffffff, #f8fafc);
}

.stat-card.tone-status .stat-value {
  color: #334155;
}

.stat-card.tone-warning {
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(145deg, #ffffff, #fffbeb);
}

.stat-card.tone-warning .stat-value {
  color: #b45309;
}

.stat-card.tone-danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(145deg, #ffffff, #fef2f2);
}

.stat-card.tone-danger .stat-value {
  color: #b91c1c;
}

.dashboard-range {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.dashboard-range .form-control {
  min-width: 140px;
}

.dashboard-chart-box {
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}

.dashboard-chart-title {
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.dashboard-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 4px;
}

.dashboard-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  font-size: 12px;
}

.dashboard-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.modal-content {
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px rgba(17, 24, 39, 0.16);
}

.modal-header,
.modal-footer {
  border-color: #eef2f7;
}

.modal-backdrop.show {
  opacity: 0.28;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(700px 320px at 15% 15%, rgba(79, 70, 229, 0.14), transparent 70%),
    radial-gradient(650px 280px at 85% 85%, rgba(79, 70, 229, 0.1), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%);
}

.login-box {
  width: 100%;
  max-width: 390px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 22px;
  padding: 30px 26px;
  box-shadow: 0 18px 35px rgba(17, 24, 39, 0.11);
}

.pointer {
  cursor: pointer;
}

/* Skeleton */
.skeleton-screen {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(1px);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: none;
  z-index: 10;
  pointer-events: none;
}

.skeleton-screen.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #eceff4 25%, #dfe4ec 50%, #eceff4 75%);
  background-size: 260% 100%;
  animation: shimmer 1.1s infinite linear;
}

.skeleton-line.w40 {
  width: 40%;
}

.skeleton-line.w55 {
  width: 55%;
}

.skeleton-line.w70 {
  width: 70%;
}

.skeleton-line.w85 {
  width: 85%;
}

.skeleton-line.w100 {
  width: 100%;
}

/* Toast + Confirm */
.toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1300;
  pointer-events: none;
}

.ui-toast {
  min-width: 260px;
  max-width: 340px;
  border-radius: 14px;
  color: #fff;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.2);
  pointer-events: auto;
  animation: toastIn 0.26s ease;
}

.ui-toast.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.ui-toast.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.ui-toast.warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.ui-toast.info {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.ui-toast.hide {
  animation: toastOut 0.2s ease forwards;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.confirm-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.confirm-dialog {
  width: min(420px, calc(100% - 24px));
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 22px 48px rgba(17, 24, 39, 0.22);
  padding: 18px;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.confirm-overlay.show .confirm-dialog {
  transform: scale(1);
  opacity: 1;
}

.confirm-title {
  color: var(--neutral-900);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}

.confirm-message {
  color: var(--neutral-700);
  margin: 0;
  font-size: 14px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Collapsed Sidebar */
body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed);
  padding-left: 8px;
  padding-right: 8px;
}

body.sidebar-collapsed .sidebar h2 {
  opacity: 0;
  transform: translateX(-6px);
  height: 0;
  margin: 0;
}

body.sidebar-collapsed .sidebar .nav-link {
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
}

body.sidebar-collapsed .sidebar .nav-link .link-text {
  width: 0;
  opacity: 0;
  overflow: hidden;
}

body.sidebar-collapsed .sidebar .nav-link:hover {
  transform: scale(1.03);
}

.mobile-nav-backdrop {
  display: none;
}

@media (max-width: 992px) {
  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(84vw, 320px);
    height: 100vh;
    z-index: 1500;
    transform: translateX(-105%);
    box-shadow: 16px 0 32px rgba(17, 24, 39, 0.24);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.mobile-layout .sidebar {
    padding: 20px 14px;
  }

  body.mobile-layout.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  body.mobile-layout .sidebar h2 {
    opacity: 1;
    transform: none;
    height: auto;
    margin: 0 10px 16px;
  }

  body.mobile-layout .sidebar .nav-link {
    justify-content: flex-start;
    padding-left: 12px;
    padding-right: 12px;
  }

  body.mobile-layout .sidebar .nav-link .link-text {
    width: auto;
    opacity: 1;
    overflow: visible;
  }

  .main {
    min-height: 100vh;
  }

  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.36);
    opacity: 0;
    pointer-events: none;
    z-index: 1400;
    transition: opacity var(--transition-fast);
  }

  body.mobile-layout.mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.mobile-layout.mobile-nav-open {
    overflow: hidden;
    touch-action: none;
  }

  .topbar {
    padding: 0 14px;
  }

  .content {
    padding: 14px;
    padding-bottom: calc(132px + env(safe-area-inset-bottom));
  }

  .panel {
    padding: 12px;
    border-radius: 14px;
  }

  .filter-row > [class*="col"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .filter-row .col-auto {
    width: 100%;
  }

  .filter-row .btn {
    width: 100%;
  }

  .table-responsive {
    border: 1px solid #eef2f7;
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    font-size: 13px;
  }

  .table thead th,
  .table td {
    padding: 9px 8px;
  }

  .table td .btn {
    white-space: nowrap;
  }

  .dashboard-range {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-dialog {
    margin: 0.55rem;
  }

  .modal-content {
    max-height: calc(100vh - 1.1rem);
  }

  .modal-body {
    overflow: auto;
  }

  .toast-host {
    left: 12px;
    right: 12px;
    top: 12px;
  }

  .ui-toast {
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 576px) {
  .topbar {
    min-height: 58px;
    height: auto;
    gap: 8px;
    padding: 10px 12px;
  }

  .topbar > div:last-child {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .topbar .js-user-name {
    display: none;
  }

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

  .stat-value {
    font-size: 20px;
  }

  .confirm-actions {
    flex-direction: column-reverse;
  }

  .confirm-actions .btn {
    width: 100%;
  }
}

.mobile-bottom-nav {
  display: none;
}

.mobile-quick-fab,
.mobile-quick-backdrop,
.mobile-quick-sheet {
  display: none;
}

@media (max-width: 992px) {
  .mobile-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    height: 64px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(79, 70, 229, 0.18);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    z-index: 1200;
    backdrop-filter: blur(8px);
  }

  .mobile-bottom-item {
    border: 0;
    background: transparent;
    height: 100%;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-bottom-item::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translateX(-50%) scale(0.72);
    background: rgba(79, 70, 229, 0.32);
    transition: transform var(--transition-fast), background var(--transition-fast);
  }

  .mobile-bottom-item.active {
    color: var(--primary-deep);
  }

  .mobile-bottom-item.active::before {
    transform: translateX(-50%) scale(1);
    background: var(--primary);
  }

  .mobile-bottom-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
  }

  .mobile-bottom-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
  }

  .mobile-bottom-label {
    margin-top: 8px;
  }

  .mobile-quick-fab {
    position: fixed;
    right: 18px;
    bottom: calc(max(84px, env(safe-area-inset-bottom) + 74px));
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    background: linear-gradient(140deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 14px 26px rgba(79, 70, 229, 0.34);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1260;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  }

  body.mobile-quick-open .mobile-quick-fab {
    transform: rotate(45deg);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.26);
  }

  .mobile-quick-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.4);
    opacity: 0;
    pointer-events: none;
    z-index: 1240;
    transition: opacity var(--transition-fast);
  }

  body.mobile-quick-open .mobile-quick-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-quick-sheet {
    display: block;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(max(84px, env(safe-area-inset-bottom) + 74px));
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 22px 38px rgba(17, 24, 39, 0.2);
    padding: 10px;
    transform: translateY(22px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    z-index: 1250;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
  }

  body.mobile-quick-open .mobile-quick-sheet {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-quick-title {
    font-size: 13px;
    color: #6b7280;
    font-weight: 700;
    margin: 2px 4px 8px;
  }

  .mobile-quick-item {
    width: 100%;
    border: 0;
    background: #fff;
    color: #111827;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    padding: 11px 12px;
    display: block;
    text-align: left;
  }

  .mobile-quick-item:hover,
  .mobile-quick-item:focus {
    background: #f3f4f6;
    color: #111827;
  }
}

@media (max-width: 576px) {
  .mobile-primary-table td:last-child .btn {
    min-height: 34px;
  }

  body[data-page="products"] .mobile-primary-table :is(th, td):nth-child(1),
  body[data-page="products"] .mobile-primary-table :is(th, td):nth-child(3),
  body[data-page="products"] .mobile-primary-table :is(th, td):nth-child(4),
  body[data-page="products"] .mobile-primary-table :is(th, td):nth-child(5),
  body[data-page="products"] .mobile-primary-table :is(th, td):nth-child(6),
  body[data-page="products"] .mobile-primary-table :is(th, td):nth-child(7),
  body[data-page="products"] .mobile-primary-table :is(th, td):nth-child(10),
  body[data-page="products"] .mobile-primary-table :is(th, td):nth-child(12) {
    display: none;
  }

  body[data-page="bills"] .mobile-primary-table :is(th, td):nth-child(5),
  body[data-page="bills"] .mobile-primary-table :is(th, td):nth-child(6),
  body[data-page="bills"] .mobile-primary-table :is(th, td):nth-child(7),
  body[data-page="bills"] .mobile-primary-table :is(th, td):nth-child(9) {
    display: none;
  }

  body[data-page="payments"] .mobile-primary-table :is(th, td):nth-child(1),
  body[data-page="payments"] .mobile-primary-table :is(th, td):nth-child(5),
  body[data-page="payments"] .mobile-primary-table :is(th, td):nth-child(6) {
    display: none;
  }

  body[data-page="verifies"] .mobile-primary-table :is(th, td):nth-child(1),
  body[data-page="verifies"] .mobile-primary-table :is(th, td):nth-child(5),
  body[data-page="verifies"] .mobile-primary-table :is(th, td):nth-child(6),
  body[data-page="verifies"] .mobile-primary-table :is(th, td):nth-child(7) {
    display: none;
  }

  body[data-page="companies"] .mobile-primary-table :is(th, td):nth-child(1),
  body[data-page="companies"] .mobile-primary-table :is(th, td):nth-child(3),
  body[data-page="companies"] .mobile-primary-table :is(th, td):nth-child(5),
  body[data-page="companies"] .mobile-primary-table :is(th, td):nth-child(8),
  body[data-page="companies"] .mobile-primary-table :is(th, td):nth-child(9),
  body[data-page="companies"] .mobile-primary-table :is(th, td):nth-child(10),
  body[data-page="companies"] .mobile-primary-table :is(th, td):nth-child(11),
  body[data-page="companies"] .mobile-primary-table :is(th, td):nth-child(12) {
    display: none;
  }

  body[data-page="categories"] .mobile-primary-table :is(th, td):nth-child(1),
  body[data-page="categories"] .mobile-primary-table :is(th, td):nth-child(3),
  body[data-page="categories"] .mobile-primary-table :is(th, td):nth-child(4),
  body[data-page="colors"] .mobile-primary-table :is(th, td):nth-child(1),
  body[data-page="colors"] .mobile-primary-table :is(th, td):nth-child(3),
  body[data-page="colors"] .mobile-primary-table :is(th, td):nth-child(4) {
    display: none;
  }

  body[data-page="products"] .mobile-primary-table td:last-child,
  body[data-page="bills"] .mobile-primary-table td:last-child,
  body[data-page="verifies"] .mobile-primary-table td:last-child {
    min-width: 92px;
  }

  body[data-page="products"] .mobile-primary-table td:last-child .btn,
  body[data-page="bills"] .mobile-primary-table td:last-child .btn,
  body[data-page="verifies"] .mobile-primary-table td:last-child .btn {
    display: block;
    width: 100%;
    margin-bottom: 6px;
  }

  body[data-page="products"] .mobile-primary-table td:last-child .btn:last-child,
  body[data-page="bills"] .mobile-primary-table td:last-child .btn:last-child,
  body[data-page="verifies"] .mobile-primary-table td:last-child .btn:last-child {
    margin-bottom: 0;
  }

  body.route-bills .panel .table-sm.table-bordered :is(th, td):nth-child(4),
  body.route-verify .content .table-responsive:first-of-type .table :is(th, td):nth-child(5),
  body.route-bill-detail .content .table-responsive:first-of-type .table :is(th, td):nth-child(2),
  body.route-bill-detail .content .table-responsive:first-of-type .table :is(th, td):nth-child(6) {
    display: none;
  }

  body.route-verify .content .table-responsive:nth-of-type(2) .table :is(th, td):nth-child(1),
  body.route-verify .content .table-responsive:nth-of-type(2) .table :is(th, td):nth-child(3),
  body.route-verify .content .table-responsive:nth-of-type(2) .table :is(th, td):nth-child(4),
  body.route-bill-detail .content .table-responsive:nth-of-type(2) .table :is(th, td):nth-child(1),
  body.route-bill-detail .content .table-responsive:nth-of-type(2) .table :is(th, td):nth-child(3),
  body.route-bill-detail .content .table-responsive:nth-of-type(2) .table :is(th, td):nth-child(4) {
    display: none;
  }
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }

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

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}
