    :root {
      --page-bg: #eff2f7;
      --surface-bg: #ffffff;
      --surface-border: rgba(15, 23, 42, 0.08);
      --surface-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
      --radius-lg: 0.9rem;
    }

    body {
      padding-top: 1rem;
      padding-bottom: 4.5rem;
      background-color: var(--page-bg);
      font-size: 0.95rem;
    }

    .navbar {
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
      padding-top: 0.35rem;
      padding-bottom: 0.35rem;
      z-index: 1100;
    }

    .navbar-brand {
      font-weight: 600;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      font-size: 1rem;
    }


    main.page-shell {
      min-height: calc(100vh - 4rem);
      padding: 1.5rem 0 2.5rem;
    }

    .page-container {
      max-width: 100%;
      width: 100%;
      margin-left: auto;
      margin-right: auto;
      padding-left: 1rem;
      padding-right: 1rem;
    }

    .page-stack {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }

    .page-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    .page-heading h1,
    .page-heading h2,
    .page-heading h3 {
      margin: 0;
      font-size: 1.45rem;
      font-weight: 600;
    }

    .section-card {
      background: var(--surface-bg);
      border-radius: var(--radius-lg);
      border: 1px solid var(--surface-border);
      box-shadow: var(--surface-shadow);
      padding: 1.15rem 1.3rem;
    }

    .section-card + .section-card {
      margin-top: 0;
    }

    .section-title {
      font-size: 1.05rem;
      font-weight: 600;
      margin-bottom: 0.85rem;
    }

    .stats-grid {
      display: grid;
      gap: 0.75rem;
    }

    @media (min-width: 576px) {
      .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      }
    }

    .stat-card {
      background: #fff;
      border-radius: 0.75rem;
      border: 1px solid var(--surface-border);
      padding: 0.85rem 0.95rem;
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
      min-height: 110px;
    }

    .stat-card small {
      color: #6c757d;
      font-size: 0.75rem;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .operator-copyright {
      position: fixed;
      right: 10px;
      bottom: 10px;
      font-size: 9px;
      color: #6c757d;
      z-index: 1500;
      pointer-events: none;
      white-space: nowrap;
      background: rgba(255, 255, 255, 0.85);
      padding: 4px 10px;
      border-radius: 999px;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    }

    .filters-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
      align-items: center;
    }

    .filters-bar .form-control,
    .filters-bar .form-select {
      min-width: 180px;
    }

    .pretty-select {
      background: linear-gradient(135deg, #fefefe, #f3f6ff);
      border: 1px solid rgba(13, 110, 253, 0.25);
      box-shadow: 0 6px 18px rgba(13, 110, 253, 0.1);
      border-radius: 0.85rem;
      transition: all 0.15s ease;
    }

    .pretty-select:focus {
      border-color: #0d6efd;
      box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    }

    .pretty-select-shell {
      position: relative;
    }

    .pretty-select.with-icon {
      padding-left: 2.2rem;
    }

    .select-icon {
      position: absolute;
      left: 0.8rem;
      top: 50%;
      transform: translateY(-50%);
      opacity: 0.65;
      font-size: 0.95rem;
      pointer-events: none;
    }

    .lang-switch-top {
      position: fixed;
      top: 0.65rem;
      right: 0.8rem;
      z-index: 1200;
    }

    .table-wrapper {
      background: #fff;
      border: 1px solid var(--surface-border);
      border-radius: 0.85rem;
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
      padding: 0.35rem;
    }

    .product-color-pill {
      width: 16px;
      height: 16px;
      border-radius: 999px;
      border: 1px solid rgba(15, 23, 42, 0.15);
      display: inline-flex;
      vertical-align: middle;
    }

    .icon-btn {
      width: 36px;
      height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      border-radius: 0.75rem;
    }

    .table {
      margin-bottom: 0;
      border-color: rgba(15, 23, 42, 0.05);
    }

    .table thead th {
      border-bottom-width: 1px;
      font-weight: 600;
      text-transform: uppercase;
      font-size: 0.72rem;
      letter-spacing: 0.04em;
      background-color: #f6f7fb;
      position: relative;
      cursor: pointer;
    }

    .table thead th.no-sort {
      cursor: default;
    }

    .table thead th.sorted-asc::after,
    .table thead th.sorted-desc::after {
      content: "";
      position: absolute;
      right: 0.45rem;
      border: 0.3rem solid transparent;
    }

    .table thead th.sorted-asc::after {
      border-bottom-color: #0d6efd;
      bottom: 0.3rem;
    }

    .table thead th.sorted-desc::after {
      border-top-color: #0d6efd;
      top: 0.3rem;
    }

    .compact-table th,
    .compact-table td {
      padding: 0.4rem 0.55rem;
    }

    .form-control,
    .form-select,
    textarea {
      border-radius: 0.65rem;
      padding: 0.45rem 0.6rem;
      font-size: 0.92rem;
      border-color: rgba(15, 23, 42, 0.18);
    }

    .form-control-sm,
    .form-select-sm {
      padding: 0.25rem 0.45rem;
      font-size: 0.85rem;
      border-radius: 0.55rem;
    }

    .form-select-inline {
      width: auto;
      min-width: 140px;
      flex: 0 0 auto;
    }

    .form-flex-row {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      align-items: flex-end;
    }

    .form-flex-row .form-field {
      flex: 1 1 200px;
    }

    .product-selection-row {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      align-items: stretch;
    }

    .product-selection-row .form-field {
      flex: 1 1 260px;
      min-width: 240px;
    }

    .selected-product-row {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      align-items: stretch;
    }

    .selected-product-info {
      flex: 1 1 300px;
    }

    .payment-details-row {
      display: flex;
      flex-wrap: wrap;
      gap: 1.25rem;
      align-items: flex-end;
    }

    .cash-input-card {
      flex: 1 1 260px;
      min-width: 240px;
      margin-bottom: 0.5rem;
    }

    .payment-summary {
      flex: 1 1 280px;
      margin-left: auto;
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: center;
      gap: 0.45rem;
      font-size: 1.1rem;
      color: #212529;
    }

    .payment-summary .summary-label {
      font-size: 0.95rem;
      text-transform: none;
      color: #6c757d;
    }

    .payment-summary .summary-value {
      font-size: 1.4rem;
      font-weight: 600;
      color: #0d6efd;
    }

    .payment-summary .summary-separator {
      font-size: 1.35rem;
      line-height: 1;
      color: #6c757d;
    }

    .debt-table td {
      vertical-align: middle;
    }

    .debt-table .debt-payments-cell {
      min-width: 220px;
    }

    .debt-table .debt-payments-list {
      list-style: none;
      padding-left: 0;
      margin-bottom: 0;
      font-size: 0.85rem;
    }

    .debt-table .debt-payments-list li + li {
      margin-top: 0.25rem;
    }

    .debt-table .debt-action-cell {
      width: 220px;
    }

    .debt-table .debt-close-cell {
      width: 220px;
    }

    .debt-table .debt-action-form {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
    }

    .debt-table .debt-close-form {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: wrap;
    }

    .form-text {
      font-size: 0.78rem;
    }

    .btn {
      border-radius: 0.65rem;
      padding: 0.4rem 0.95rem;
    }

    .alert {
      border-radius: 0.8rem;
      padding: 0.6rem 0.85rem;
      margin-bottom: 0;
      text-align: center;
    }

    .flash-popups {
      position: fixed;
      top: 16px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
      z-index: 1080;
      min-width: 280px;
      max-width: 520px;
      width: 100%;
      pointer-events: none;
    }

  .flash-popups .alert {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    border: none;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 220px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1040;
    transition: width 0.2s ease, transform 0.2s ease;
    will-change: width, transform;
  }
  .sidebar.collapsed {
    width: 72px;
  }
  .sidebar.collapsed .nav-link span:first-child {
    font-size: 1.25rem;
    width: 100%;
    text-align: center;
  }
  #sidebarToggle {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-toggle-toolbar {
    display: none;
  }
  .sidebar-toggle-mobile {
    display: none;
  }
  @media (max-width: 991.98px) {
    .sidebar {
      width: 220px;
      transform: translateX(-105%);
      box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
    }
    body.sidebar-open .sidebar {
      transform: translateX(0);
    }
    .sidebar .sidebar-brand #sidebarToggle {
      display: none;
    }
    .mobile-toggle-toolbar {
      display: flex;
      position: fixed;
      top: 50%;
      left: 0;
      right: auto;
      transform: translateY(-50%);
      z-index: 1200;
    }
    .sidebar-toggle-mobile {
      display: inline-flex;
      width: 0;
      height: 42px;
      border-radius: 999px;
      align-items: center;
      justify-content: center;
      z-index: 1200;
      border: 1px solid rgba(255, 255, 255, 0.4);
      background: rgba(33, 37, 41, 0.92);
      color: #fff;
      box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
      overflow: visible;
      position: relative;
      font-size: 1.4rem;
      line-height: 1;
      padding: 0;
    }
    body.sidebar-open .mobile-toggle-toolbar {
      left: 0;
      top: 50%;
    }
    body.sidebar-open .mobile-toggle-toolbar .sidebar-toggle-mobile {
      background: rgba(255, 255, 255, 0.9);
      color: #0f172a;
      border-color: rgba(15, 23, 42, 0.2);
    }
  }
  .sidebar.collapsed .brand-text,
  .sidebar.collapsed .badge {
    display: none;
  }
  .sidebar-nav a.nav-link {
    padding: 0.35rem 0;
  }
  .sidebar-submenu {
    margin-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 0.75rem;
    display: none;
    margin-top: 0.35rem;
  }
  .sidebar-submenu.show {
    display: block;
  }
  .sidebar-submenu .nav-link {
    font-size: 0.9rem;
    padding: 0.15rem 0;
  }
  .sidebar-submenu-toggle {
    background: transparent;
    border: none;
    padding-left: 0;
    padding-right: 0;
  }
  .sidebar-submenu-toggle .submenu-caret {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
  }
  .sidebar-submenu-toggle[aria-expanded="true"] .submenu-caret {
    transform: rotate(180deg);
  }
  .sidebar .nav-text {
    display: inline;
  }
  .sidebar.collapsed .nav-text {
    display: none;
  }
  .sidebar.collapsed .badge {
    display: none;
  }
  .sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 0.5rem;
  }
  main.page-shell {
    margin-left: 240px;
  }
  body.sidebar-collapsed main.page-shell {
    margin-left: 92px;
  }
  body.no-sidebar main.page-shell {
    margin-left: 0;
  }
  @media (max-width: 991.98px) {
    main.page-shell {
      margin-left: 0;
    }
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }
  body.sidebar-open {
    overflow: hidden;
  }

    @keyframes badge-blink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.35; }
    }
    .badge-blink {
      animation: badge-blink 1.2s ease-in-out infinite;
    }

    /* Убираем мигание/анимации модалок */
    .modal.fade .modal-dialog {
      transition: none !important;
      transform: none !important;
    }
    .modal-backdrop.fade {
      opacity: 0.5 !important;
      transition: none !important;
    }
    .modal-backdrop.show {
      opacity: 0.5 !important;
    }
    .modal {
      z-index: 1100;
    }
    .modal-backdrop {
      z-index: 1095;
    }

    /* Отключаем анимации и переходы по запросу */
    *, *::before, *::after {
      animation: none !important;
      transition: none !important;
    }

    .card {
      border: 1px solid var(--surface-border);
      border-radius: var(--radius-lg);
      box-shadow: var(--surface-shadow);
    }

    .card > .card-body {
      padding: 1rem;
    }

    .product-price {
      min-width: 280px;
    }

    .icon-marker {
      border: none;
      background: transparent;
      color: #0d6efd;
      padding: 0.1rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      width: 28px;
      height: 28px;
      transition: none;
    }

    .icon-marker:hover {
      background: transparent;
      transform: none;
    }

    .price-editor {
      margin-top: 0.75rem;
      padding-top: 0.65rem;
      border-top: 1px dashed rgba(15, 23, 42, 0.2);
      display: none;
    }

    .price-editor.active {
      display: block;
    }

    .table-action-cell {
      min-width: 220px;
    }

    .table-action-form {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
    }

    .table-action-form .input-group-text {
      font-size: 0.75rem;
    }

    .table-action-form .btn {
      width: 100%;
    }

    /* Admin products shared styles */
    .active-products-card .section-title {
      margin-bottom: 0.35rem;
    }

    .products-hero {
      background: linear-gradient(135deg, #f7f9ff, #eef3ff);
      border: 1px solid #dbe2ff;
      border-radius: 1rem;
      padding: 0.9rem 1.1rem;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.85rem;
      box-shadow: 0 10px 28px rgba(13, 110, 253, 0.08);
    }

    .products-hero .eyebrow {
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #5f6c85;
      font-size: 0.8rem;
      margin-bottom: 0.2rem;
    }

    .products-hero .hero-title {
      font-size: 1.15rem;
      font-weight: 700;
      color: #14213d;
    }

    .hero-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .hero-chip {
      background: #ffffff;
      border: 1px solid #dbe2ff;
      border-radius: 0.9rem;
      padding: 0.55rem 0.9rem;
      min-width: 140px;
      box-shadow: 0 10px 18px rgba(13, 110, 253, 0.08);
    }

    .hero-chip .chip-label {
      display: block;
      font-size: 0.75rem;
      color: #5f6c85;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      margin-bottom: 0.1rem;
    }

    .hero-chip .chip-value {
      font-weight: 700;
      color: #0d6efd;
      font-size: 1.25rem;
      line-height: 1.1;
    }

    .filter-pill {
      background: rgba(13, 110, 253, 0.08);
      color: #0d47a1;
      border-radius: 999px;
      padding: 0.35rem 0.85rem;
      border: 1px solid rgba(13, 110, 253, 0.2);
      font-weight: 600;
      font-size: 0.85rem;
    }

    .category-pill {
      border: 1px solid #d6defa;
      background: #f2f5ff;
      color: #243b64;
      font-weight: 600;
    }

    .qty-chip {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.25rem 0.65rem;
      border-radius: 999px;
      font-weight: 700;
      letter-spacing: 0.02em;
      border: 1px solid transparent;
      min-width: 54px;
      justify-content: center;
    }

    .qty-positive {
      background: #e7f6ec;
      border-color: #b8e2c5;
      color: #1b7a3e;
    }

    .qty-low {
      background: #fff4e5;
      border-color: #ffd8a8;
      color: #c77700;
    }

    .qty-empty {
      background: #ffe9ec;
      border-color: #f3c0c7;
      color: #c1121f;
    }

    .color-picker-shell {
      max-width: 220px;
    }

    .color-picker-shell .form-control-color {
      padding: 0;
      width: 60px;
      border-right: 0;
    }

    .color-picker-shell .btn.btn-outline-secondary {
      border-left: 0;
    }

    .color-picker-shell .form-control-color.color-empty {
      opacity: 0.5;
      filter: grayscale(0.9);
    }

    .barcode-cell {
      white-space: nowrap;
    }

    .product-thumb {
      width: 120px;
      height: 90px;
      border: 1px solid #e9ecef;
      border-radius: 0.65rem;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      background: #fff;
      margin-bottom: 0.35rem;
      position: relative;
    }

    .product-thumb > a {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
    }

    .product-thumb.product-thumb-sm {
      width: 64px;
      height: 48px;
      border-radius: 0.5rem;
      margin-bottom: 0;
    }

    .product-thumb.dashboard-thumb {
      overflow: visible;
      z-index: 1;
    }

    .product-thumb.dashboard-thumb img {
      transition: transform 0.15s ease, box-shadow 0.15s ease;
      transform-origin: center;
      background: #fff;
    }

    .product-thumb.dashboard-thumb:hover img {
      transform: scale(2.2);
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
      border-radius: 0.5rem;
      z-index: 999;
      position: relative;
    }

    .product-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .product-thumb .barcode-preview {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(255, 255, 255, 0.95);
      opacity: 0;
      transition: opacity 0.15s ease;
      padding: 4px;
      pointer-events: none;
    }

    .product-thumb:hover .barcode-preview {
      opacity: 1;
    }

    .product-thumb .barcode-preview img {
      max-width: 100%;
      max-height: 100%;
    }

    .product-thumb .placeholder-icon {
      font-size: 1.4rem;
      color: #adb5bd;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
    }

    .barcode-manual-form {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    .barcode-manual-form.collapsed {
      display: none;
    }

    .barcode-manual-form textarea {
      resize: vertical;
      min-height: 32px;
      max-height: 90px;
      font-size: 0.8rem;
    }

    .dashboard-chart-card .chart-canvas-wrap {
      width: 100%;
    }

    .dashboard-chart-card canvas {
      display: block;
      touch-action: pan-y;
      cursor: grab;
    }

    .dashboard-chart-card.chart-dragging canvas {
      cursor: grabbing;
    }

    .dashboard-chart-card .chart-legend {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
    }

    .dashboard-chart-card .legend-dot {
      width: 10px;
      height: 10px;
      border-radius: 999px;
      display: inline-block;
    }

    .dashboard-chart-card .legend-sold {
      background: #dc2626;
    }

    .dashboard-chart-card .legend-stock {
      background: #16a34a;
    }


    .dashboard-chart-card #dashboardChartDays {
      flex: 1 1 220px;
    }

    .dashboard-chart-card #dashboardChartDaysInput {
      width: 90px;
    }

    .dashboard-chart-card .chart-tooltip {
      position: absolute;
      z-index: 10;
      background: #0f172a;
      color: #f8fafc;
      font-size: 12px;
      padding: 8px 10px;
      border-radius: 8px;
      box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
      pointer-events: none;
      min-width: 120px;
    }

    .dashboard-chart-card .chart-tooltip .tooltip-title {
      font-weight: 600;
      margin-bottom: 6px;
    }

    .dashboard-chart-card .chart-tooltip .tooltip-row {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 4px;
    }


    .dashboard-chart-card .chart-tooltip .tooltip-row:last-child {
      margin-bottom: 0;
    }

    .dashboard-chart-card .chart-tooltip .tooltip-dot {
      width: 8px;
      height: 8px;
      border-radius: 999px;
      display: inline-block;
    }

    .dashboard-chart-card .chart-tooltip .tooltip-sold {
      background: #dc2626;
    }

    .dashboard-chart-card .chart-tooltip .tooltip-stock {
      background: #16a34a;
    }


    .active-products-table .table tbody tr {
      transition: transform 0.08s ease, box-shadow 0.08s ease;
    }

    .active-products-table .table tbody tr:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    }

    @media (max-width: 767.98px) {
      .hero-chip {
        min-width: 120px;
      }
    }

    .add-product-grid {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }

    .add-product-grid .add-grid-panel {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    @media (min-width: 992px) {
      .add-product-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
      }
    }

    .table-pagination {
      display: flex;
      gap: 0.25rem;
      justify-content: flex-end;
      margin-top: 0.5rem;
      flex-wrap: wrap;
    }

    .table-pagination .page-btn {
      border: 1px solid var(--surface-border);
      background: #fff;
      border-radius: 0.45rem;
      padding: 0.2rem 0.55rem;
      font-size: 0.8rem;
      transition: background 0.15s ease;
    }

    .table-pagination .page-btn.active {
      background: #0d6efd;
      border-color: #0d6efd;
      color: #fff;
    }

    .table-pagination .page-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .autocomplete-list {
      position: absolute;
      z-index: 1000;
      background: #fff;
      border: 1px solid rgba(0, 0, 0, 0.12);
      max-height: 240px;
      overflow-y: auto;
      width: 100%;
      border-radius: 0.5rem;
      box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    }

    .autocomplete-item {
      padding: 8px 12px;
      cursor: pointer;
      transition: none;
    }

    .autocomplete-item:hover {
      background: #f5f6fb;
    }

:root {
  --page-bg: #f6f1ea;
  --surface-bg: rgba(255, 255, 255, 0.92);
  --surface-border: rgba(15, 23, 42, 0.08);
  --surface-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
  --radius-lg: 1rem;
  --accent: #f36b21;
  --accent-strong: #d94d12;
  --accent-soft: rgba(243, 107, 33, 0.12);
  --ink: #0f172a;
  --ink-muted: #5b6475;
  --sidebar-bg: #f7f9fc;
  --sidebar-bg-2: #eef2f7;
  --sidebar-border: rgba(15, 23, 42, 0.08);
  --sidebar-ink: #0b1220;
  --sidebar-ink-muted: #637089;
  --sidebar-hover: rgba(69, 109, 255, 0.08);
  --sidebar-active: rgba(69, 109, 255, 0.16);
  --sidebar-icon-bg: rgba(69, 109, 255, 0.14);
  --font-sans: "Manrope", "Space Grotesk", sans-serif;
  --font-display: "Space Grotesk", "Manrope", sans-serif;
}

body.skin-sand {
  --page-bg: #f5efe6;
  --surface-bg: rgba(255, 251, 246, 0.94);
  --surface-border: rgba(120, 90, 50, 0.14);
  --surface-shadow: 0 18px 40px rgba(120, 90, 50, 0.18);
  --accent: #c8711c;
  --accent-strong: #a75714;
  --accent-soft: rgba(200, 113, 28, 0.16);
  --sidebar-bg: #fbf8f2;
  --sidebar-bg-2: #f1e7d9;
  --sidebar-border: rgba(120, 90, 50, 0.18);
  --sidebar-ink: #3f2a16;
  --sidebar-ink-muted: #7a5a3d;
}

body.skin-slate {
  --page-bg: #eef2f6;
  --surface-bg: rgba(248, 250, 252, 0.92);
  --surface-border: rgba(30, 41, 59, 0.18);
  --surface-shadow: 0 18px 40px rgba(30, 41, 59, 0.2);
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --sidebar-bg: #f4f7fb;
  --sidebar-bg-2: #e2e8f0;
  --sidebar-border: rgba(30, 41, 59, 0.16);
  --sidebar-ink: #0f172a;
  --sidebar-ink-muted: #475569;
}

body.skin-cloudflare {
  --page-bg: #f2f6fb;
  --surface-bg: #ffffff;
  --surface-border: rgba(15, 23, 42, 0.1);
  --surface-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
  --accent: #f48120;
  --accent-strong: #df6a0f;
  --accent-soft: rgba(244, 129, 32, 0.16);
  --ink: #0f172a;
  --ink-muted: #556070;
  --sidebar-bg: #f7f9fc;
  --sidebar-bg-2: #eef2f7;
  --sidebar-border: rgba(15, 23, 42, 0.1);
  --sidebar-ink: #0b1220;
  --sidebar-ink-muted: #64748b;
  --sidebar-hover: rgba(244, 129, 32, 0.1);
  --sidebar-active: rgba(244, 129, 32, 0.18);
}

body.skin-classic {
  --page-bg: #ffffff;
  --surface-bg: #ffffff;
  --surface-border: rgba(15, 23, 42, 0.12);
  --surface-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
  --accent: #111827;
  --accent-strong: #0b1220;
  --accent-soft: rgba(17, 24, 39, 0.12);
  --ink: #0b1220;
  --ink-muted: #6b7280;
  --sidebar-bg: #ffffff;
  --sidebar-bg-2: #ffffff;
  --sidebar-border: rgba(15, 23, 42, 0.12);
  --sidebar-ink: #0b1220;
  --sidebar-ink-muted: #6b7280;
  --sidebar-hover: rgba(15, 23, 42, 0.06);
  --sidebar-active: rgba(15, 23, 42, 0.12);
}

body.skin-sand {
  background-image:
    radial-gradient(circle at 12% 12%, rgba(200, 113, 28, 0.12), transparent 45%),
    radial-gradient(circle at 88% 0%, rgba(166, 109, 58, 0.12), transparent 40%),
    linear-gradient(180deg, #fff9f2 0%, #f5efe6 50%, #efe7dc 100%);
}

body.skin-slate {
  background-image:
    radial-gradient(circle at 12% 12%, rgba(37, 99, 235, 0.12), transparent 45%),
    radial-gradient(circle at 90% 0%, rgba(56, 189, 248, 0.12), transparent 40%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f6 50%, #e2e8f0 100%);
}

body.skin-cloudflare {
  background-image:
    radial-gradient(circle at 10% 8%, rgba(244, 129, 32, 0.12), transparent 42%),
    radial-gradient(circle at 92% 0%, rgba(59, 130, 246, 0.1), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #f2f6fb 52%, #e8eef6 100%);
}

body.skin-classic {
  background-image: none;
}

body.skin-classic .section-card,
body.skin-classic .stat-card,
body.skin-classic .table-wrapper,
body.skin-classic .table,
body.skin-classic .table thead th,
body.skin-classic .table tbody td,
body.skin-classic .table-striped > tbody > tr:nth-of-type(odd) > *,
body.skin-classic .table-striped > tbody > tr:nth-of-type(even) > *,
body.skin-classic .form-control,
body.skin-classic .form-select,
body.skin-classic .btn,
body.skin-classic .alert,
body.skin-classic .nav-link,
body.skin-classic .sidebar,
body.skin-classic .sidebar-brand,
body.skin-classic .sidebar-nav,
body.skin-classic .sidebar-submenu,
body.skin-classic .dropdown-menu,
body.skin-classic .modal-content,
body.skin-classic .table-pagination .page-btn {
  border-radius: 0;
  background-color: #ffffff;
}

body.skin-classic .btn {
  border-radius: 0;
  background-color: #ffffff;
  color: #0b1220;
  border-color: #0b1220;
}

body.skin-classic .btn-primary {
  background-color: #0b1220;
  border-color: #0b1220;
  color: #ffffff;
}

body.skin-classic .btn-outline-secondary {
  background-color: #ffffff;
  border-color: #0b1220;
  color: #0b1220;
}

body.skin-classic *,
body.skin-classic *::before,
body.skin-classic *::after {
  border-radius: 0 !important;
}

body.skin-cloudflare .section-card {
  border-radius: 0.75rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  padding: 0.95rem 1.05rem;
}

body.skin-cloudflare .stat-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
  padding: 0.75rem 0.85rem;
}

body.skin-cloudflare .table-wrapper {
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

body.skin-cloudflare .table thead th {
  background-color: #f3f5f9;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
}

body.skin-cloudflare .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(15, 23, 42, 0.02);
}

body.skin-cloudflare .form-control,
body.skin-cloudflare .form-select {
  border-radius: 0.6rem;
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: none;
}

body.skin-cloudflare .form-control:focus,
body.skin-cloudflare .form-select:focus {
  border-color: rgba(244, 129, 32, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(244, 129, 32, 0.12);
}

body.skin-cloudflare .btn {
  border-radius: 0.6rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
}

@media (max-width: 991.98px) {
  body.skin-cloudflare .btn {
    padding: 0.45rem 0.8rem;
  }
}

body.skin-cloudflare .btn-primary {
  background: linear-gradient(180deg, #f59b43 0%, var(--accent) 100%);
  border-color: var(--accent);
}

body.skin-cloudflare .btn-outline-secondary {
  border-color: rgba(15, 23, 42, 0.18);
  color: #1f2937;
}

body.skin-cloudflare .table-pagination .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 14px rgba(244, 129, 32, 0.22);
}

body.skin-cloudflare .sidebar-nav .nav-link {
  border-radius: 0.75rem;
  padding: 0.4rem 0.6rem;
}

body.skin-cloudflare .table td,
body.skin-cloudflare .table th {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--page-bg);
  background-image:
    radial-gradient(circle at 10% 10%, rgba(243, 107, 33, 0.12), transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(14, 116, 144, 0.12), transparent 40%),
    linear-gradient(180deg, #fdfbf7 0%, #f6f1ea 45%, #f1ece6 100%);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(0px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 320px;
  height: 320px;
  top: -120px;
  right: -120px;
  background: radial-gradient(circle at center, rgba(243, 107, 33, 0.25), transparent 70%);
}

body::after {
  width: 420px;
  height: 420px;
  bottom: -180px;
  left: -180px;
  background: radial-gradient(circle at center, rgba(14, 116, 144, 0.22), transparent 72%);
}

main.page-shell {
  position: relative;
  z-index: 1;
}

.page-heading h1,
.page-heading h2,
.page-heading h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.section-card {
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(6px);
}

.section-title {
  font-family: var(--font-display);
  color: var(--ink);
}

.stat-card {
  background: linear-gradient(160deg, #ffffff 0%, #fdf7f1 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.stat-card small {
  color: var(--ink-muted);
}

.table-wrapper {
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.table thead th {
  background-color: rgba(243, 107, 33, 0.08);
  color: var(--ink);
}

.table-pagination .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

.btn {
  font-weight: 600;
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-outline-secondary {
  border-color: rgba(15, 23, 42, 0.2);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-strong);
}

.navbar-brand,
.sidebar .brand-text {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
}

.sidebar .text-light {
  color: var(--sidebar-ink) !important;
}

.sidebar .sidebar-brand {
  padding: 0.35rem 0.25rem;
  border-radius: 0.85rem;
}

.sidebar #sidebarToggle,
.sidebar .btn-outline-light {
  color: var(--sidebar-ink);
  border-color: rgba(15, 23, 42, 0.2);
}

.sidebar #sidebarToggle:hover,
.sidebar .btn-outline-light:hover {
  background: rgba(15, 23, 42, 0.06);
}

.sidebar .brand-text {
  color: var(--sidebar-ink);
}

.sidebar-nav .nav-link {
  border-radius: 0.9rem;
  padding: 0.5rem 0.65rem;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  color: var(--sidebar-ink);
  position: relative;
}

.sidebar-nav > li {
  padding: 0.15rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.sidebar-nav > li.has-submenu {
  margin-left: 0;
}

.sidebar-submenu {
  margin-left: 20px;
}

.sidebar-nav > li:last-child {
  border-bottom: none;
}

.sidebar .nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, rgba(255, 179, 71, 0.22), rgba(245, 158, 11, 0.12));
  color: #1f2937;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}

.sidebar .nav-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.sidebar-submenu .nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 0.6rem;
}

.sidebar-footer .nav-icon {
  width: 22px;
  height: 22px;
  border-radius: 0.55rem;
}

.sidebar-footer .nav-icon svg {
  width: 13px;
  height: 13px;
}
.sidebar-nav .nav-link:hover {
  background: var(--sidebar-hover);
  transform: translateX(2px);
}

.sidebar-nav .nav-link.active {
  background: var(--sidebar-active);
  box-shadow: inset 3px 0 0 rgba(69, 109, 255, 0.6);
}

.sidebar-nav .nav-link.active .nav-icon {
  background: linear-gradient(140deg, rgba(251, 191, 36, 0.28), rgba(249, 115, 22, 0.18));
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.32);
}

.sidebar.collapsed .nav-link .nav-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto;
}

.sidebar-toggle-mobile {
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--sidebar-ink);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.15);
}

body.sidebar-open .mobile-toggle-toolbar .sidebar-toggle-mobile {
  background: rgba(15, 23, 42, 0.08);
  color: var(--sidebar-ink);
  border-color: rgba(15, 23, 42, 0.18);
}

.sidebar-submenu {
  border-left: 1px solid rgba(15, 23, 42, 0.12);
}

.sidebar-submenu-toggle {
  border-radius: 0.9rem;
  color: var(--sidebar-ink);
}

.sidebar-submenu .nav-link {
  color: var(--sidebar-ink);
}

.sidebar-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.products-hero {
  background: linear-gradient(135deg, rgba(243, 107, 33, 0.12), rgba(14, 116, 144, 0.08));
  border: 1px solid rgba(243, 107, 33, 0.18);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.hero-chip {
  border-radius: 1rem;
}

.filter-pill {
  background: var(--accent-soft);
  color: #9b3f10;
  border: 1px solid rgba(243, 107, 33, 0.35);
}

.operator-copyright {
  font-weight: 600;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.9);
  font-size: 9px;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-stack > * {
  animation: riseIn 0.35s ease both;
}

.page-stack > *:nth-child(2) { animation-delay: 0.04s; }
.page-stack > *:nth-child(3) { animation-delay: 0.08s; }
.page-stack > *:nth-child(4) { animation-delay: 0.12s; }
.page-stack > *:nth-child(5) { animation-delay: 0.16s; }
.page-stack > *:nth-child(6) { animation-delay: 0.2s; }

#due_date_block .due-date-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

#due_date_block .due-date-label-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#due_date_block .due-date-label-row .form-label {
  margin-bottom: 0;
}

#due_date_block #due_date {
  width: 160px;
  flex: 0 0 auto;
}

#due_offset_controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

#due_offset_controls .small {
  white-space: nowrap;
}

#due_offset_controls .input-group {
  width: auto;
  min-width: 200px;
  flex: 1 1 auto;
  flex-wrap: nowrap;
}

#due_offset_controls .input-group .btn {
  white-space: nowrap;
  flex: 0 0 auto;
}

#due_offset_controls #due_offset_value {
  width: 50px;
  flex: 0 0 50px;
}

#installment_count_col {
  flex: 0 0 140px;
  max-width: 140px;
}

#installment_count {
  width: 100%;
}

@media (max-width: 576px) {
  #due_date_block #due_date {
    width: 150px;
  }

  #due_offset_controls .input-group {
    min-width: 0;
    width: auto;
  }
}
