/* ----------------------------------------------------------------
   CSS Variables & Reset
---------------------------------------------------------------- */
:root {
  /* Dark theme - Graphite gradient (default) */
  --bg-base: #2D3136;
  --bg-surface: #363B42;
  --bg-surface-2: #3F454D;
  --bg-hover: rgba(255, 255, 255, 0.08);
  --sidebar-w: 260px;

  --accent: #FF5C1A;
  --accent-hover: #E84D0E;
  --accent-light: rgba(255, 92, 26, 0.14);

  --danger: #FF3B3B;
  --danger-hover: #E02020;
  --danger-light: rgba(255, 59, 59, 0.14);

  --success: #C8FF47;
  --success-light: rgba(200, 255, 71, 0.12);

  --text-primary: #F8F6F0;
  --text-secondary: #B8B4AC;
  --text-muted: #7A7670;

  --border: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(255, 92, 26, 0.55);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 0.18s ease;
}

/* Light theme - warm tones */
[data-theme="light"] {
  --bg-base: #F0EDE8;
  --bg-surface: #E8E4DC;
  --bg-surface-2: #DCD6CC;
  --bg-hover: rgba(0, 0, 0, 0.05);

  --accent: #FF5C1A;
  --accent-hover: #E84D0E;
  --accent-light: rgba(255, 92, 26, 0.12);

  --danger: #FF3B3B;
  --danger-hover: #D32F2F;
  --danger-light: rgba(255, 59, 59, 0.12);

  --success: #2E7D32;
  --success-light: rgba(46, 125, 50, 0.12);

  --text-primary: #2D2A26;
  --text-secondary: #5C5650;
  --text-muted: #9C9490;

  --border: rgba(0, 0, 0, 0.10);
  --border-focus: rgba(255, 92, 26, 0.55);

  --shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.10);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 90% 70% at 75% 5%, rgba(255, 92, 26, 0.08) 0%, transparent 65%),
    radial-gradient(ellipse 70% 55% at 15% 90%, rgba(200, 150, 100, 0.06) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 180, 100, 0.03) 0%, transparent 60%);
}

[data-theme="light"] body::after {
  opacity: 0.02;
}

[data-theme="light"] body {
  background: linear-gradient(135deg, #F0EDE8 0%, #E8E4DC 50%, #DCD6CC 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: linear-gradient(135deg, #2D3136 0%, #25282C 50%, #1F2226 100%);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow: hidden;
}

/* Ambient glow background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 70% at 75% 5%, rgba(255, 92, 26, 0.10) 0%, transparent 65%),
    radial-gradient(ellipse 70% 55% at 15% 90%, rgba(120, 70, 255, 0.06) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 180, 100, 0.03) 0%, transparent 60%);
}

/* Grain noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  background-repeat: repeat;
}

/* ----------------------------------------------------------------
   Sidebar
---------------------------------------------------------------- */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(45, 49, 54, 0.92) 0%, rgba(37, 40, 44, 0.94) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
}

.sidebar-logo:hover {
  background: rgba(255, 92, 26, 0.1);
  opacity: 0.9;
}

.sidebar-logo:active {
  background: rgba(255, 92, 26, 0.15);
}

/* Logo image container */
.logo-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-img {
  max-width: 65px;
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 92, 26, 0.4));
  animation: logoFloat 3s ease-in-out infinite, logoGlow 2s ease-in-out infinite;
}

@keyframes logoFloat {

  0%,
  100% {
    transform: translateY(0) translateX(0);
  }

  25% {
    transform: translateY(-3px) translateX(1px);
  }

  50% {
    transform: translateY(-2px) translateX(2px);
  }

  75% {
    transform: translateY(-4px) translateX(1px);
  }
}

@keyframes logoGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(255, 92, 26, 0.4)) brightness(1);
  }

  50% {
    filter: drop-shadow(0 0 18px rgba(255, 92, 26, 0.7)) brightness(1.05);
  }
}

/* Old SVG animation keyframes removed - now using Logo_gpt.png image */

.logo-icon {
  display: none;
}

.logo-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 8px;
}

.nav-group {
  margin-bottom: 4px;
}

.nav-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  user-select: none;
  list-style: none;
}

.nav-group-title::-webkit-details-marker {
  display: none;
}

.nav-group-title:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
}

.chevron {
  margin-left: auto;
  transition: transform var(--transition);
  opacity: 0.5;
}

details[open] .chevron {
  transform: rotate(180deg);
}

.nav-group-content {
  padding-left: 24px;
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  letter-spacing: 0.01em;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(255, 92, 26, 0.14);
  color: var(--accent);
}

.nav-item.active svg {
  stroke: var(--accent);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-version {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: rgba(255, 92, 26, 0.15);
  border-color: rgba(255, 92, 26, 0.3);
  color: var(--accent);
}

.theme-toggle .theme-icon-sun {
  display: none;
}

.theme-toggle .theme-icon-moon {
  display: block;
}

/* Light theme - show sun icon */
[data-theme="light"] .theme-toggle .theme-icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(255, 92, 26, 0.12);
  border-color: rgba(255, 92, 26, 0.25);
}

/* ----------------------------------------------------------------
   Main Layout
---------------------------------------------------------------- */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

/* ----------------------------------------------------------------
   Topbar
---------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(135deg, rgba(45, 49, 54, 0.85) 0%, rgba(37, 40, 44, 0.88) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-wrap: wrap;
  animation: fadeUp 0.45s ease both;
}

.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.product-count,
.client-count,
.user-count {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  letter-spacing: 0.03em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ----------------------------------------------------------------
   Search
---------------------------------------------------------------- */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}

.search-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 32px 8px 36px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  width: 260px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 92, 26, 0.10);
}

.search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  display: none;
  transition: color var(--transition);
}

.search-clear:hover {
  color: var(--text-primary);
}

/* ----------------------------------------------------------------
   Category Filter
---------------------------------------------------------------- */
.filter-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
  z-index: 1;
}

.category-filter {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 32px 8px 36px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  min-width: 170px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: 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='%237A7670' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.category-filter:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 92, 26, 0.10);
}

.category-filter option {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

/* ----------------------------------------------------------------
   Buttons
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition), color var(--transition);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
}

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

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-base);
  box-shadow: 0 2px 16px rgba(255, 92, 26, 0.20);
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 24px rgba(255, 92, 26, 0.40);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.20);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(255, 59, 59, 0.3);
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 11px;
}

.btn-icon {
  padding: 6px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid transparent;
}

/* Edit button */
.btn-edit-invoice,
.btn-edit-receipt,
.btn-edit-waybill {
  color: var(--accent);
  background: var(--accent-light);
  border-radius: var(--radius-sm);
}

.btn-edit-invoice:hover,
.btn-edit-receipt:hover,
.btn-edit-waybill:hover {
  background: rgba(255, 92, 26, 0.22);
}

/* Delete button */
.btn-delete-invoice,
.btn-delete-receipt,
.btn-delete-waybill {
  color: var(--danger);
  background: var(--danger-light);
  border-radius: var(--radius-sm);
}

.btn-delete-invoice:hover,
.btn-delete-receipt:hover,
.btn-delete-waybill:hover {
  background: rgba(255, 59, 59, 0.22);
}

.btn-edit {
  background: var(--accent-light);
  color: var(--accent);
  border-color: transparent;
  border-radius: var(--radius-sm);
}

.btn-edit:hover {
  background: rgba(255, 92, 26, 0.22);
}

.btn-del {
  background: var(--danger-light);
  color: var(--danger);
  border-color: transparent;
  border-radius: var(--radius-sm);
}

.btn-del:hover {
  background: rgba(255, 59, 59, 0.22);
}

/* ----------------------------------------------------------------
   Table Section
---------------------------------------------------------------- */
.table-section {
  flex: 1;
  padding: 24px 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.50s 0.08s ease both;
}

.table-wrap {
  flex: 1;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(54, 59, 66, 0.75) 0%, rgba(45, 49, 54, 0.80) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  min-height: 200px;
  max-height: calc(100vh - 160px);
}

/* Custom scrollbar */
.table-wrap::-webkit-scrollbar {
  width: 5px;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.16);
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.products-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-surface);
}

.products-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  white-space: nowrap;
  user-select: none;
  position: relative;
}

.resizer {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 5px;
  background: transparent;
  cursor: col-resize;
  user-select: none;
  touch-action: none;
  transition: background 0.2s;
}

.resizer:hover,
.resizing {
  background: var(--accent);
}

.products-table th:first-child {
  width: 12%;
}

.products-table th:nth-child(2) {
  width: 30%;
}

.products-table th:nth-child(3) {
  width: 16%;
}

.products-table th:nth-child(4) {
  width: 7%;
}

.products-table th:nth-child(5) {
  width: 12%;
}

.products-table th:nth-child(6) {
  width: 12%;
}

.products-table th:last-child {
  width: 11%;
}

/* Specific overrides for Clients Table */
#clients-table th:nth-child(1) {
  width: 35% !important;
}

/* Назва */
#clients-table th:nth-child(2) {
  width: 15% !important;
}

/* Телефон */
#clients-table th:nth-child(3) {
  width: 25% !important;
}

/* Email */
#clients-table th:nth-child(4) {
  width: 15% !important;
}

/* Категорія */
#clients-table th:nth-child(5) {
  width: 10% !important;
}

/* Дії */

.sortable {
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.sortable:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.sortable.sort-asc .sort-icon::after {
  content: ' ↑';
  color: var(--accent);
}

.sortable.sort-desc .sort-icon::after {
  content: ' ↓';
  color: var(--accent);
}

.sort-icon {
  color: var(--text-muted);
  font-size: 14px;
  margin-left: 2px;
}

.sortable.sort-asc .sort-icon,
.sortable.sort-desc .sort-icon {
  color: var(--accent);
}

.th-num {
  text-align: left;
}

.td-num {
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.th-actions {
  text-align: center;
}

/* Table rows */
.products-table tbody tr {
  transition: background var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.products-table tbody tr:last-child {
  border-bottom: none;
}

.products-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

.products-table td {
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-name {
  font-weight: 500;
}

.td-sku {
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

.td-category {
  color: var(--text-secondary);
}

.td-unit {
  color: var(--text-muted);
  font-size: 12px;
}


.td-purchase {
  color: var(--text-secondary);
}

.td-sale {
  color: var(--success);
  font-weight: 600;
}

.td-actions {
  text-align: center;
}

.actions-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Category badge */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.10);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.badge-supplier {
  background: rgba(255, 92, 26, 0.12);
  color: var(--accent);
  border-color: rgba(255, 92, 26, 0.2);
}

.badge-buyer {
  background: rgba(200, 255, 71, 0.10);
  color: var(--success);
  border-color: rgba(200, 255, 71, 0.2);
}

/* ----------------------------------------------------------------
   Empty / Loading states
---------------------------------------------------------------- */
.empty-state,
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 80px 20px;
  color: var(--text-muted);
  position: absolute;
  inset: 0;
}

.empty-icon {
  font-size: 40px;
  opacity: 0.4;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-sub {
  font-size: 14px;
  text-align: center;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ----------------------------------------------------------------
   Modal
---------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: linear-gradient(135deg, rgba(45, 49, 54, 0.96) 0%, rgba(37, 40, 44, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 540px;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-sm {
  max-width: 400px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color var(--transition), background var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
}

.modal-form,
.modal-body {
  padding: 20px 24px;
}

.modal-body p {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}

.confirm-product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 10px 0;
}

.confirm-warn {
  color: var(--danger) !important;
  font-size: 12.5px !important;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

/* ----------------------------------------------------------------
   Form
---------------------------------------------------------------- */
.form-row {
  margin-bottom: 16px;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.required {
  color: var(--accent);
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13.5px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 92, 26, 0.12);
}

.form-control.error {
  border-color: rgba(255, 59, 59, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 59, 59, 0.10);
}

.form-error {
  font-size: 11.5px;
  color: var(--danger);
  margin-top: 4px;
  min-height: 16px;
}

/* Input with prefix */
.input-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix .prefix {
  position: absolute;
  left: 11px;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.input-prefix .form-control {
  padding-left: 24px;
}

/* Remove number input spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ----------------------------------------------------------------
   Toast
---------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 44px;
  right: 28px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  z-index: 9999;
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 340px;
  pointer-events: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  background: rgba(13, 43, 26, 0.95);
  border: 1px solid var(--success);
}

.toast.error {
  background: rgba(42, 13, 13, 0.95);
  border: 1px solid var(--danger);
}

.toast.info {
  background: rgba(26, 18, 16, 0.95);
  border: 1px solid var(--accent);
}

/* ----------------------------------------------------------------
   Print / PDF styles
---------------------------------------------------------------- */
@media print {

  .sidebar,
  .topbar,
  .modal-overlay,
  .toast,
  .btn,
  .search-wrapper {
    display: none !important;
  }

  .main {
    margin-left: 0 !important;
  }

  body {
    background: #fff !important;
    color: #111 !important;
    font-size: 12pt;
  }

  body::before,
  body::after {
    display: none !important;
  }

  .table-section {
    padding: 0;
    overflow: visible;
  }

  .table-wrap {
    border: 1px solid #ccc;
    max-height: none;
    overflow: visible;
    backdrop-filter: none;
  }

  .products-table th,
  .products-table td {
    color: #111;
    border-color: #ddd;
    background: #fff;
  }

  .products-table thead tr,
  .products-table th {
    background: #f0f0f0 !important;
  }

  .td-sale {
    color: #166534;
  }
}

/* ----------------------------------------------------------------
   Modal: Product Details
---------------------------------------------------------------- */
.modal-lg {
  max-width: 560px;
}

.modal-header .modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
}

.product-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 92, 26, 0.15) 0%, rgba(255, 92, 26, 0.05) 100%);
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.product-card-icon {
  font-size: 48px;
  line-height: 1;
}

.product-card-title h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.product-sku {
  font-size: 13px;
  opacity: 0.7;
  font-weight: 400;
}

.product-card-body {
  padding: 20px;
}

.product-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.product-detail-row:last-child {
  border-bottom: none;
}

.product-detail-row-sm {
  padding: 8px 0;
  font-size: 14px;
}

.product-detail-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.product-detail-value {
  font-weight: 600;
  font-size: 14px;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--success);
}

.product-detail-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 0;
}

#details-edit {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Print styles for details overlay */
@media print {

  .sidebar,
  .topbar,
  .table-section,
  .modal-overlay:not(#details-overlay) {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  #details-overlay {
    position: static !important;
    background: none !important;
  }

  #details-overlay .modal {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* ----------------------------------------------------------------
   Login Overlay
---------------------------------------------------------------- */
#login-overlay {
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 92, 26, 0.18) 0%, transparent 34%),
    radial-gradient(circle at 18% 88%, rgba(255, 163, 102, 0.08) 0%, transparent 28%),
    linear-gradient(135deg, rgba(33, 37, 42, 0.98) 0%, rgba(22, 25, 29, 0.99) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 9999;
  padding: 24px;
}

#login-overlay .login-modal {
  position: relative;
  width: 100%;
  max-width: 760px;
  overflow: hidden;
  border: 1px solid rgba(255, 140, 56, 0.18);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%),
    rgba(17, 19, 22, 0.78);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#login-overlay .login-modal::before {
  content: '';
  position: absolute;
  inset: -20% auto auto 52%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 120, 24, 0.22) 0%, rgba(255, 120, 24, 0.05) 42%, transparent 72%);
  pointer-events: none;
  filter: blur(8px);
}

#login-overlay .login-modal::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 15%, rgba(255, 140, 56, 0.18) 50%, rgba(255, 255, 255, 0.08) 85%, transparent 100%);
  pointer-events: none;
}

#login-overlay .login-modal-header {
  position: relative;
  justify-content: flex-start;
  padding: 34px 30px 18px;
  border-bottom: none;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  width: 100%;
}

.login-logo-container {
  min-height: 140px;
  max-width: none;
  padding: 14px 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 92, 26, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-logo-container .logo-img {
  width: 100%;
  max-width: 210px;
  max-height: 118px;
  filter: drop-shadow(0 0 18px rgba(255, 92, 26, 0.34));
  animation: loginLogoEntrance 0.6s ease-out both, loginLogoFloat 3s ease-in-out infinite 0.8s;
}

.login-brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 92, 26, 0.12);
  border: 1px solid rgba(255, 176, 138, 0.18);
  color: #ffb08a;
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-title {
  margin: 0;
  max-width: 8ch;
  color: #ff981f;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 140, 0, 0.42), 0 0 36px rgba(255, 92, 26, 0.18);
  animation: loginTitlePulse 2.8s ease-in-out infinite alternate;
}

.login-subtitle {
  margin: 0;
  max-width: 38ch;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.login-form {
  position: relative;
  z-index: 1;
}

.login-modal-body {
  display: grid;
  gap: 20px;
  padding: 12px 30px 22px;
}

.login-field {
  margin: 0;
}

#login-overlay .login-field label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

#login-overlay .login-field .form-control {
  border-radius: 13px;
  padding: 15px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 15px;
}

#login-overlay .login-field .form-control::placeholder {
  color: rgba(248, 246, 240, 0.42);
}

#login-overlay .login-field .form-control:focus {
  border-color: rgba(255, 140, 56, 0.34);
  box-shadow: 0 0 0 4px rgba(255, 92, 26, 0.10), 0 12px 30px rgba(0, 0, 0, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.05) 100%);
}

#login-overlay .form-error {
  min-height: 18px;
  margin-top: 6px;
  color: #ff9a8b;
}

.login-modal-footer {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 30px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-meta {
  margin: 0;
  max-width: 24ch;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.6;
}

#login-overlay #btn-login {
  min-width: 154px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f9f4ee 0%, #efe8df 100%);
  color: #3b3732;
  font-size: 14px;
  letter-spacing: 0.08em;
  box-shadow: 0 0 28px rgba(255, 92, 26, 0.16);
}

#login-overlay #btn-login:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f4ece3 100%);
  color: #2f2b27;
  box-shadow: 0 10px 30px rgba(255, 92, 26, 0.24);
}

#login-overlay #btn-login:disabled {
  opacity: 0.78;
  cursor: wait;
}

@keyframes loginLogoEntrance {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(15px);
  }

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

@keyframes loginLogoFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes loginTitlePulse {
  from {
    text-shadow: 0 0 16px rgba(255, 140, 0, 0.34), 0 0 28px rgba(255, 92, 26, 0.14);
  }

  to {
    text-shadow: 0 0 24px rgba(255, 140, 0, 0.56), 0 0 46px rgba(255, 92, 26, 0.24);
  }
}

@media (max-width: 680px) {
  #login-overlay {
    align-items: flex-start;
    overflow-y: auto;
    padding: 18px;
  }

  #login-overlay .login-modal {
    max-width: 100%;
  }

  #login-overlay .login-modal-header,
  #login-overlay .login-modal-body,
  #login-overlay .login-modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .login-brand {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
  }

  .login-brand-copy {
    align-items: center;
  }

  .login-title,
  .login-subtitle,
  .login-meta {
    max-width: none;
  }

  .login-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  #login-overlay #btn-login {
    width: 100%;
  }
}

/* ----------------------------------------------------------------
   Welcome Screen Overlay
---------------------------------------------------------------- */
#welcome-screen {
  background:
    radial-gradient(ellipse 80% 50% at 80% 10%, rgba(255, 92, 26, 0.14) 0%, transparent 65%),
    linear-gradient(135deg, rgba(45, 49, 54, 0.97) 0%, rgba(37, 40, 44, 0.98) 100%) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#welcome-screen.show {
  opacity: 1;
  visibility: visible;
}

.welcome-content {
  animation: welcomePop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transform: scale(0.9);
  opacity: 0;
}

#welcome-screen.show .welcome-content {
  animation-delay: 0.2s;
}

.welcome-logo-container {
  margin-bottom: 24px;
}

.welcome-logo-container .logo-img {
  max-width: 220px;
  max-height: 170px;
  filter: drop-shadow(0 0 24px rgba(255, 92, 26, 0.5));
  animation: welcomeLogoEntrance 0.7s ease-out 0.2s both, welcomeLogoFloat 3.5s ease-in-out infinite 1s;
}

@keyframes welcomeLogoEntrance {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(25px);
  }

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

@keyframes welcomeLogoFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  33% {
    transform: translateY(-7px) rotate(1deg);
  }

  66% {
    transform: translateY(-5px) rotate(-1deg);
  }
}

.welcome-greeting {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.welcome-subtext {
  font-size: 15px;
  font-weight: 400;
}

@keyframes welcomePop {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }

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

/* ----------------------------------------------------------------
   Home / Welcome Section
---------------------------------------------------------------- */
.home-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: calc(100vh - 30px);
  position: relative;
  overflow: hidden;
  background: transparent;
}

.home-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.home-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 92, 26, 0.15);
  animation: floatParticle linear infinite;
}

@keyframes floatParticle {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.4;
  }

  50% {
    opacity: 0.8;
  }

  100% {
    transform: translateY(-60px) scale(1.1);
    opacity: 0;
  }
}

.home-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 16px;
  animation: homeAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes homeAppear {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

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

@keyframes homeLogoEntrance {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px) translateX(-30px);
  }

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

@keyframes homeLogoFloat {

  0%,
  100% {
    transform: translateY(0) translateX(0);
  }

  25% {
    transform: translateY(-8px) translateX(3px);
  }

  50% {
    transform: translateY(-5px) translateX(5px);
  }

  75% {
    transform: translateY(-10px) translateX(3px);
  }
}

@keyframes homeLogoGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 30px rgba(255, 92, 26, 0.6)) brightness(1);
  }

  50% {
    filter: drop-shadow(0 0 50px rgba(255, 92, 26, 0.9)) brightness(1.08);
  }
}

/* Old SVG logo styles removed - now using Logo_gpt.png image */

.home-logo-ring {
  display: none;
}

@keyframes ringPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.12);
    opacity: 0.2;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

.home-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  text-align: center;
  letter-spacing: -0.02em;
}

.home-username {
  background: linear-gradient(135deg, #FF5C1A, #FF9A4D);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-cards {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.home-card {
  background: linear-gradient(135deg, rgba(54, 59, 66, 0.50) 0%, rgba(45, 49, 54, 0.55) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 22px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: default;
  transition: transform 0.28s, border-color 0.28s, box-shadow 0.28s;
  animation: cardSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  min-width: 110px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.home-card:nth-child(1) {
  animation-delay: 0.10s;
}

.home-card:nth-child(2) {
  animation-delay: 0.18s;
}

.home-card:nth-child(3) {
  animation-delay: 0.26s;
}

.home-card:nth-child(4) {
  animation-delay: 0.34s;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

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

.home-card:hover {
  border-color: rgba(255, 92, 26, 0.40);
  box-shadow: 0 8px 30px rgba(255, 92, 26, 0.14);
  transform: translateY(-4px);
}

.home-card-icon {
  font-size: 28px;
}

.home-card-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.home-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ----------------------------------------------------------------
   Currency Marquee Ticker
---------------------------------------------------------------- */
.marquee-bar {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-w);
  right: 0;
  height: 32px;
  background: linear-gradient(180deg, rgba(45, 49, 54, 0.95) 0%, rgba(37, 40, 44, 0.97) 100%);
  border-top: 1px solid rgba(255, 92, 26, 0.22);
  display: flex;
  align-items: center;
  z-index: 200;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.marquee-label {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border-right: 1px solid rgba(255, 92, 26, 0.20);
  white-space: nowrap;
  height: 100%;
  background: rgba(255, 92, 26, 0.07);
  flex-shrink: 0;
}

.marquee-track-wrapper {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
  animation: marqueeScroll 28s linear infinite;
  will-change: transform;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.marquee-item {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.marquee-item strong {
  color: var(--accent);
  margin-left: 4px;
}

.marquee-sep {
  color: rgba(255, 92, 26, 0.35);
  font-size: 14px;
  padding: 0 6px;
}

.marquee-updated {
  padding: 0 14px;
  font-size: 11px;
  color: var(--text-muted);
  border-left: 1px solid rgba(255, 92, 26, 0.20);
  white-space: nowrap;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  align-items: center;
  background: rgba(255, 92, 26, 0.04);
}

/* Push main content up so tickers don't overlap bottom */
.main {
  padding-bottom: 32px;
}

/* Currency sidebar widget */
.currency-ticker {
  margin: 0 10px 12px;
  background: linear-gradient(135deg, rgba(255, 92, 26, 0.10), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 92, 26, 0.20);
  border-radius: var(--radius);
  padding: 12px 14px 8px;
  position: relative;
  overflow: hidden;
}

.currency-ticker::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

.currency-ticker-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
}

.currency-flag {
  font-size: 18px;
  line-height: 1;
}

.currency-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: 34px;
}

.currency-rate {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  flex: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.currency-rate.rate-flash {
  animation: rateFlash 0.6s ease-out;
}

@keyframes rateFlash {
  0% {
    color: #fff;
    text-shadow: 0 0 8px var(--accent);
  }

  100% {
    color: var(--accent);
    text-shadow: none;
  }
}

.currency-label {
  font-size: 11px;
  color: var(--text-muted);
}

.currency-updated {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
  opacity: 0.7;
}

/* ----------------------------------------------------------------
   Entrance Animations
---------------------------------------------------------------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

/* Data table (inside invoice modal) */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Settings / user-info inline */
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(54, 59, 66, 0.50);
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 0;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ----------------------------------------------------------------
   Light Theme Additional Styles
---------------------------------------------------------------- */
[data-theme="light"] .sidebar {
  background: rgba(232, 228, 220, 0.92);
  border-right: 1px solid rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .sidebar-logo {
  border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .sidebar-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .nav-group-title {
  color: var(--text-muted);
}

[data-theme="light"] .nav-group-title:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav-item {
  color: var(--text-secondary);
}

[data-theme="light"] .nav-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .nav-item.active {
  background: rgba(255, 92, 26, 0.10);
  color: var(--accent);
}

[data-theme="light"] .topbar {
  background: rgba(232, 228, 220, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .table-wrap {
  background: rgba(232, 228, 220, 0.80);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .products-table th {
  background: rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .products-table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .products-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .search-input {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .category-filter {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .category-filter option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

[data-theme="light"] .btn-ghost {
  border: 1px solid rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .btn-primary {
  background: var(--accent);
  color: #fff;
}

[data-theme="light"] .btn-primary:hover {
  background: var(--accent-hover);
}

[data-theme="light"] .modal {
  background: rgba(240, 237, 232, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .form-control {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .home-section {
  background: transparent;
}

[data-theme="light"] .home-particle {
  background: rgba(255, 92, 26, 0.25);
}

[data-theme="light"] .home-card {
  background: rgba(232, 228, 220, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .home-card:hover {
  border-color: rgba(255, 92, 26, 0.35);
  box-shadow: 0 8px 30px rgba(255, 92, 26, 0.12);
}

[data-theme="light"] .marquee-bar {
  background: rgba(240, 237, 232, 0.95);
  border-top: 1px solid rgba(255, 92, 26, 0.25);
}

[data-theme="light"] .marquee-label {
  background: rgba(255, 92, 26, 0.10);
  border-right: 1px solid rgba(255, 92, 26, 0.25);
}

[data-theme="light"] .marquee-updated {
  background: rgba(255, 92, 26, 0.06);
  border-left: 1px solid rgba(255, 92, 26, 0.25);
}

[data-theme="light"] .currency-ticker {
  background: linear-gradient(135deg, rgba(255, 92, 26, 0.08), rgba(0, 0, 0, 0.03));
  border: 1px solid rgba(255, 92, 26, 0.18);
}

[data-theme="light"] #login-overlay {
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 92, 26, 0.16) 0%, transparent 34%),
    radial-gradient(circle at 18% 88%, rgba(255, 196, 140, 0.14) 0%, transparent 28%),
    linear-gradient(135deg, rgba(243, 239, 232, 0.98) 0%, rgba(233, 226, 217, 0.99) 100%);
}

[data-theme="light"] #login-overlay .login-modal {
  border-color: rgba(255, 92, 26, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0.52) 100%),
    rgba(244, 238, 229, 0.92);
  box-shadow: 0 24px 64px rgba(88, 65, 40, 0.16);
}

[data-theme="light"] #login-overlay .login-logo-container {
  background:
    linear-gradient(135deg, rgba(255, 92, 26, 0.10) 0%, rgba(255, 255, 255, 0.55) 100%),
    rgba(255, 255, 255, 0.46);
  border-color: rgba(255, 92, 26, 0.12);
}

[data-theme="light"] #login-overlay .login-title {
  color: #ff7a12;
}

[data-theme="light"] #login-overlay .login-field .form-control {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] #login-overlay #btn-login {
  background: linear-gradient(180deg, #2d2a26 0%, #403a34 100%);
  color: #f8f6f0;
}

[data-theme="light"] #welcome-screen {
  background:
    radial-gradient(ellipse 80% 50% at 80% 10%, rgba(255, 92, 26, 0.14) 0%, transparent 65%),
    rgba(240, 237, 232, 0.98) !important;
}

[data-theme="light"] .empty-state,
[data-theme="light"] .loading-state {
  color: var(--text-muted);
}

[data-theme="light"] .product-count,
[data-theme="light"] .client-count,
[data-theme="light"] .user-count {
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .badge {
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .user-profile {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* ----------------------------------------------------------------
   Form Controls (inputs, selects inside modals and forms)
---------------------------------------------------------------- */
.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 92, 26, 0.12);
  background: rgba(255, 255, 255, 0.09);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Select-specific: dropdown arrow + dark color-scheme so native popup is dark */
select.form-control {
  color-scheme: dark;
  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='%237A7670' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
}

select.form-control option {
  background: #363B42;
  color: #F8F6F0;
}

select.form-control option:checked,
select.form-control option:hover {
  background: #FF5C1A;
  color: #fff;
}

/* Light theme overrides */
[data-theme="light"] .form-control {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
}

[data-theme="light"] .form-control:focus {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] select.form-control {
  color-scheme: light;
}

[data-theme="light"] select.form-control option {
  background: #E8E4DC;
  color: #2D2A26;
}

/* Login title glow animation */
@keyframes glow {
  from {
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5),
      0 0 20px rgba(255, 140, 0, 0.3),
      0 0 30px rgba(255, 140, 0, 0.2);
    transform: scale(1);
  }

  to {
    text-shadow: 0 0 20px rgba(255, 140, 0, 0.8),
      0 0 30px rgba(255, 140, 0, 0.5),
      0 0 40px rgba(255, 140, 0, 0.3),
      0 0 50px rgba(255, 140, 0, 0.2);
    transform: scale(1.02);
  }
}


/* ----------------------------------------------------------------
   Brand Motion Enhancements
---------------------------------------------------------------- */
.sidebar-logo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.sidebar-logo::after {
  content: '';
  position: absolute;
  inset: -24% -48%;
  background: linear-gradient(105deg, transparent 34%, rgba(255, 255, 255, 0.05) 47%, rgba(255, 176, 138, 0.18) 54%, transparent 67%);
  transform: translateX(-120%) rotate(10deg);
  animation: sidebarSweep 7.5s ease-in-out infinite;
  pointer-events: none;
}

.logo-image-container {
  position: relative;
  isolation: isolate;
}

.logo-image-container::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 20px;
  background: radial-gradient(circle, rgba(255, 122, 31, 0.24) 0%, rgba(255, 122, 31, 0.08) 42%, transparent 74%);
  filter: blur(14px);
  opacity: 0.7;
  transform: scale(0.9);
  animation: brandAura 5.2s ease-in-out infinite;
  z-index: -1;
}

.logo-img {
  transform-origin: center;
  animation: logoFloat 3s ease-in-out infinite, logoGlow 2.4s ease-in-out infinite, logoTilt 5.8s ease-in-out infinite;
}

#login-overlay .login-modal {
  animation: loginPanelIn 0.78s cubic-bezier(0.16, 1, 0.3, 1) both, loginPanelDrift 8.5s ease-in-out infinite 1.2s;
}

#login-overlay .login-modal::before {
  animation: loginAuraDrift 11s ease-in-out infinite;
}

.login-brand {
  animation: loginBrandRise 0.9s cubic-bezier(0.18, 1, 0.32, 1) both;
}

.login-logo-container {
  position: relative;
  overflow: hidden;
}

.login-logo-container::after {
  content: '';
  position: absolute;
  top: -30%;
  left: -65%;
  width: 58%;
  height: 170%;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 244, 232, 0.28) 48%, transparent 100%);
  transform: rotate(16deg);
  opacity: 0.42;
  animation: loginShine 5.8s linear infinite;
  pointer-events: none;
}

#login-overlay .login-kicker {
  animation: kickerGlow 3.6s ease-in-out infinite;
}

#login-overlay .login-field {
  opacity: 1;
  animation: loginFieldIn 0.55s ease-out both;
}

#login-overlay .login-field:nth-child(1) {
  animation-delay: 0.18s;
}

#login-overlay .login-field:nth-child(2) {
  animation-delay: 0.3s;
}

#login-overlay #btn-login {
  overflow: hidden;
  animation: buttonPulse 3.6s ease-in-out infinite;
}

#login-overlay #btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.16) 42%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.16) 58%, transparent 100%);
  transform: translateX(-135%);
  animation: buttonSheen 3.5s linear infinite;
}

.welcome-logo-container .logo-img {
  animation: welcomeLogoEntrance 0.7s ease-out 0.2s both, welcomeLogoFloat 3.5s ease-in-out infinite 1s, welcomeLogoGlow 2.8s ease-in-out infinite 1.1s;
}

@keyframes sidebarSweep {
  0%, 100% {
    transform: translateX(-120%) rotate(10deg);
    opacity: 0;
  }

  18%, 34% {
    opacity: 1;
  }

  46% {
    transform: translateX(120%) rotate(10deg);
    opacity: 0;
  }
}

@keyframes brandAura {
  0%, 100% {
    transform: scale(0.88);
    opacity: 0.48;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.86;
  }
}

@keyframes logoOrbit {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }

  25% {
    transform: rotate(-1.4deg) scale(1.015);
  }

  50% {
    transform: rotate(1.1deg) scale(1.03);
  }

  75% {
    transform: rotate(-0.8deg) scale(1.012);
  }
}

@keyframes loginPanelIn {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
  }

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

@keyframes loginPanelDrift {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes loginAuraDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(0.96);
    opacity: 0.72;
  }

  50% {
    transform: translate3d(-12px, 10px, 0) scale(1.04);
    opacity: 0.96;
  }
}

@keyframes loginBrandRise {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }

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

@keyframes loginShine {
  0% {
    transform: translateX(-12%) rotate(16deg);
    opacity: 0;
  }

  10%, 32% {
    opacity: 0.44;
  }

  55% {
    transform: translateX(220%) rotate(16deg);
    opacity: 0;
  }

  100% {
    transform: translateX(220%) rotate(16deg);
    opacity: 0;
  }
}

@keyframes kickerGlow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 92, 26, 0);
  }

  50% {
    box-shadow: 0 0 24px rgba(255, 92, 26, 0.18);
  }
}

@keyframes loginFieldIn {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }

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

@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 0 0 28px rgba(255, 92, 26, 0.16);
  }

  50% {
    box-shadow: 0 0 38px rgba(255, 92, 26, 0.28);
  }
}

@keyframes buttonSheen {
  0% {
    transform: translateX(-135%);
  }

  55%, 100% {
    transform: translateX(135%);
  }
}

@keyframes welcomeLogoGlow {
  0%, 100% {
    filter: drop-shadow(0 0 24px rgba(255, 92, 26, 0.5)) brightness(1);
  }

  50% {
    filter: drop-shadow(0 0 34px rgba(255, 120, 24, 0.68)) brightness(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-logo::after,
  .logo-image-container::before,
  .logo-img,
  #login-overlay .login-modal,
  #login-overlay .login-modal::before,
  .login-brand,
  .login-logo-container::after,
  #login-overlay .login-kicker,
  #login-overlay .login-field,
  #login-overlay #btn-login,
  #login-overlay #btn-login::before,
  .welcome-logo-container .logo-img {
    animation: none !important;
  }
}
/* ----------------------------------------------------------------
   Brand Motion Fixes
---------------------------------------------------------------- */
.logo-img {
  animation: logoOrbitFixed 5.8s ease-in-out infinite, logoGlow 2.4s ease-in-out infinite;
}

#login-overlay .login-modal {
  animation: loginPanelIn 0.78s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-form {
  animation: loginFormDrift 8.5s ease-in-out infinite 1.2s;
}

@keyframes logoOrbitFixed {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  25% {
    transform: translateY(-2px) rotate(-1.4deg) scale(1.015);
  }

  50% {
    transform: translateY(-4px) rotate(1.1deg) scale(1.03);
  }

  75% {
    transform: translateY(-2px) rotate(-0.8deg) scale(1.012);
  }
}

@keyframes loginFormDrift {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}
/* ----------------------------------------------------------------
   Home 2026 Refresh
---------------------------------------------------------------- */
.home-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 32px);
  padding: 42px 52px 86px;
  position: relative;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 92, 26, 0.10) 0%, transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(255, 168, 99, 0.09) 0%, transparent 22%),
    linear-gradient(135deg, rgba(24, 28, 33, 0.92) 0%, rgba(20, 23, 27, 0.96) 100%);
}

.home-section::before,
.home-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(10px);
}

.home-section::before {
  width: 320px;
  height: 320px;
  top: 8%;
  right: 12%;
  background: radial-gradient(circle, rgba(255, 120, 24, 0.16) 0%, rgba(255, 120, 24, 0.04) 42%, transparent 72%);
}

.home-section::after {
  width: 260px;
  height: 260px;
  left: 8%;
  bottom: 12%;
  background: radial-gradient(circle, rgba(255, 180, 120, 0.08) 0%, rgba(255, 180, 120, 0.03) 42%, transparent 72%);
}

.home-particles {
  inset: 24px;
}

.home-particle {
  background: radial-gradient(circle, rgba(255, 111, 34, 0.36) 0%, rgba(255, 111, 34, 0.12) 55%, transparent 100%);
  filter: blur(1px);
}

.home-content {
  width: min(1180px, 100%);
  align-items: stretch;
  gap: 22px;
}

.home-hero-panel,
.home-actions-shell,
.home-hint-row {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%),
    rgba(17, 19, 22, 0.72);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.home-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 22px;
  padding: 28px;
}

.home-hero-copy {
  display: flex;
  flex-direction: column;
}

.home-kicker,
.home-brand-badge,
.home-card-eyebrow,
.home-microcopy {
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 92, 26, 0.12);
  border: 1px solid rgba(255, 176, 138, 0.18);
  color: #ffb08a;
}

.home-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.home-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-align: left;
}

.home-logout {
  padding: 10px 14px;
  border-color: rgba(255, 255, 255, 0.1);
}

.home-subtitle {
  max-width: 56ch;
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
}

.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.home-stat-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-stat-card.accent {
  background:
    linear-gradient(180deg, rgba(255, 92, 26, 0.18) 0%, rgba(255, 92, 26, 0.06) 100%),
    rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 176, 138, 0.22);
}

.home-stat-card span {
  color: var(--text-secondary);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
}

.home-stat-card p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.home-hero-side {
  display: flex;
}

.home-brand-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%),
    rgba(11, 13, 15, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-brand-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.home-brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.home-brand-logo {
  width: 98px;
  height: 98px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(255, 92, 26, 0.24));
  animation: homeBrandFloat 5s ease-in-out infinite;
}

.home-brand-card h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-brand-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.home-brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-brand-pills span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 12px;
}

.home-actions-shell {
  padding: 20px;
}

.home-actions-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 6px 18px;
}

.home-actions-head h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-actions-head p {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

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

.home-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
}

.home-action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  min-height: 220px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.02) 100%),
    rgba(12, 14, 17, 0.58);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.home-action-card::before {
  content: '';
  position: absolute;
  inset: auto -10% -40% 40%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 120, 24, 0.14) 0%, transparent 72%);
  opacity: 0.75;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.home-action-card.accent {
  border-color: rgba(255, 176, 138, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 92, 26, 0.16) 0%, rgba(255, 92, 26, 0.05) 100%),
    rgba(12, 14, 17, 0.58);
}

.home-action-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 176, 138, 0.26);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.home-action-card:hover::before {
  transform: scale(1.12);
  opacity: 1;
}

.home-action-card strong {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.home-action-card p {
  margin-top: auto;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.home-action-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffb08a;
}

.home-card-eyebrow {
  color: var(--text-muted);
}

.home-hint-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 22px;
}

.home-hint-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.home-hint-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 92, 26, 0.14);
  color: var(--text-primary);
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

@keyframes homeBrandFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-6px) rotate(2deg);
  }
}

[data-theme="light"] .home-section {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 92, 26, 0.08) 0%, transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(255, 168, 99, 0.10) 0%, transparent 22%),
    linear-gradient(135deg, rgba(244, 239, 231, 0.94) 0%, rgba(234, 227, 218, 0.98) 100%);
}

[data-theme="light"] .home-hero-panel,
[data-theme="light"] .home-actions-shell,
[data-theme="light"] .home-hint-row,
[data-theme="light"] .home-brand-card,
[data-theme="light"] .home-action-card,
[data-theme="light"] .home-stat-card {
  box-shadow: 0 20px 54px rgba(88, 65, 40, 0.12);
}

[data-theme="light"] .home-action-card.accent {
  background:
    linear-gradient(180deg, rgba(255, 92, 26, 0.12) 0%, rgba(255, 92, 26, 0.04) 100%),
    rgba(255, 255, 255, 0.58);
}

@media (max-width: 1120px) {
  .home-section {
    padding-left: 28px;
    padding-right: 28px;
  }

  .home-hero-panel {
    grid-template-columns: 1fr;
  }

  .home-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hint-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .home-section {
    padding: 24px 18px 86px;
  }

  .home-title-row,
  .home-actions-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-title,
  .home-subtitle {
    text-align: left;
  }

  .home-stat-grid,
  .home-cards {
    grid-template-columns: 1fr;
  }

  .home-action-card {
    min-height: 0;
  }
}
/* ----------------------------------------------------------------
   Products 2026 Refresh
---------------------------------------------------------------- */
.products-section-2026 {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 28px 86px;
  overflow: auto;
}

.products-topbar {
  padding: 22px 24px;
  border-radius: 28px;
  border-bottom: none;
}

.products-topbar-copy,
.products-section-2026 .design-topbar-copy {
  align-items: center;
}

.products-topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.products-search-wrapper .search-input {
  width: 332px;
}

.products-filter-wrapper .category-filter {
  min-width: 190px;
}

.products-print-btn,
.products-add-btn {
  min-height: 42px;
}

.products-user-profile {
  min-height: 52px;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.products-section-2026 .design-subline {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.products-table-section {
  padding: 14px;
  border-radius: 28px;
}

.products-table-wrap {
  min-height: 200px;
  max-height: calc(100vh - 228px);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%),
    rgba(11, 13, 15, 0.72);
}

.products-section-2026 .products-table thead,
.products-section-2026 .products-table th {
  background: rgba(53, 58, 67, 0.78);
}

.products-section-2026 .products-table th {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #8e877c;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.products-section-2026 .products-table td {
  padding: 17px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13.5px;
}

.products-section-2026 .products-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.045);
}

.products-section-2026 .td-sku,
.products-section-2026 .td-purchase,
.products-section-2026 .td-sale {
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 13px;
}

.products-section-2026 .td-sku {
  color: #d9d2c8;
}

.products-section-2026 .td-name {
  font-size: 15px;
  font-weight: 600;
  color: #f2eee8;
}

.products-section-2026 .td-unit {
  color: #d2cbc2;
  font-size: 13px;
  text-transform: lowercase;
}

.products-section-2026 .td-purchase {
  color: #e1d9cf;
}

.products-section-2026 .td-sale {
  color: #f8f6f0;
}

.products-section-2026 .badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c8c2ba;
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.products-section-2026 .actions-cell {
  gap: 8px;
}

.products-section-2026 .btn-edit,
.products-section-2026 .btn-del {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 11px;
}

.products-section-2026 .empty-state,
.products-section-2026 .loading-state {
  background: linear-gradient(180deg, rgba(11, 13, 15, 0.32) 0%, rgba(11, 13, 15, 0.12) 100%);
}

[data-theme="light"] .products-topbar,
[data-theme="light"] .products-table-section {
  box-shadow: 0 20px 54px rgba(88, 65, 40, 0.12);
}

[data-theme="light"] .products-table-wrap {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54) 0%, rgba(255, 255, 255, 0.36) 100%),
    rgba(244, 238, 229, 0.82);
}

[data-theme="light"] .products-section-2026 .products-table thead,
[data-theme="light"] .products-section-2026 .products-table th {
  background: rgba(225, 220, 212, 0.92);
}

@media (max-width: 1120px) {
  .products-search-wrapper .search-input {
    width: 260px;
  }
}

@media (max-width: 860px) {
  .products-section-2026 {
    padding: 18px 18px 86px;
  }

  .products-topbar,
  .products-table-section {
    padding: 18px;
  }

  .products-topbar-actions {
    justify-content: flex-start;
  }

  .products-search-wrapper,
  .products-filter-wrapper,
  .products-print-btn,
  .products-add-btn,
  .products-user-profile {
    width: 100%;
  }

  .products-search-wrapper .search-input,
  .products-filter-wrapper .category-filter {
    width: 100%;
    min-width: 0;
  }
}
/* ----------------------------------------------------------------
   Clients 2026 Refresh
---------------------------------------------------------------- */
.clients-section-2026 {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 28px 86px;
  overflow: auto;
}

.clients-topbar {
  padding: 22px 24px;
  border-radius: 28px;
  border-bottom: none;
}

.clients-topbar-copy,
.clients-section-2026 .design-topbar-copy {
  align-items: center;
}

.clients-topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.clients-search-wrapper .search-input {
  width: 332px;
}

.clients-filter-wrapper .category-filter {
  min-width: 190px;
}

.clients-add-btn {
  min-height: 42px;
}

.clients-user-profile {
  min-height: 52px;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.clients-section-2026 .design-subline {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.clients-table-section {
  padding: 14px;
  border-radius: 28px;
}

.clients-table-wrap {
  min-height: 200px;
  max-height: calc(100vh - 228px);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%),
    rgba(11, 13, 15, 0.72);
}

.clients-section-2026 #clients-table thead,
.clients-section-2026 #clients-table th {
  background: rgba(53, 58, 67, 0.78);
}

.clients-section-2026 #clients-table th {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #8e877c;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.clients-section-2026 #clients-table td {
  padding: 17px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13.5px;
}

.clients-section-2026 #clients-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.045);
}

.clients-section-2026 #clients-table td:nth-child(1) {
  font-size: 15px;
  font-weight: 600;
  color: #f2eee8;
}

.clients-section-2026 #clients-table td:nth-child(2),
.clients-section-2026 #clients-table td:nth-child(3) {
  color: #d9d2c8;
}

.clients-section-2026 #clients-table .badge {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(180, 225, 72, 0.24);
  background: rgba(164, 212, 65, 0.12);
  color: #c5f15c;
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.clients-section-2026 .actions-cell {
  gap: 8px;
}

.clients-section-2026 .btn-edit,
.clients-section-2026 .btn-del {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 11px;
}

.clients-section-2026 .empty-state,
.clients-section-2026 .loading-state {
  background: linear-gradient(180deg, rgba(11, 13, 15, 0.32) 0%, rgba(11, 13, 15, 0.12) 100%);
}

[data-theme="light"] .clients-topbar,
[data-theme="light"] .clients-table-section {
  box-shadow: 0 20px 54px rgba(88, 65, 40, 0.12);
}

[data-theme="light"] .clients-table-wrap {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54) 0%, rgba(255, 255, 255, 0.36) 100%),
    rgba(244, 238, 229, 0.82);
}

[data-theme="light"] .clients-section-2026 #clients-table thead,
[data-theme="light"] .clients-section-2026 #clients-table th {
  background: rgba(225, 220, 212, 0.92);
}

@media (max-width: 1120px) {
  .clients-search-wrapper .search-input {
    width: 260px;
  }
}

@media (max-width: 860px) {
  .clients-section-2026 {
    padding: 18px 18px 86px;
  }

  .clients-topbar,
  .clients-table-section {
    padding: 18px;
  }

  .clients-topbar-actions {
    justify-content: flex-start;
  }

  .clients-search-wrapper,
  .clients-filter-wrapper,
  .clients-add-btn,
  .clients-user-profile {
    width: 100%;
  }

  .clients-search-wrapper .search-input,
  .clients-filter-wrapper .category-filter {
    width: 100%;
    min-width: 0;
  }
}
/* ----------------------------------------------------------------
   Remaining Screens 2026 Refresh
---------------------------------------------------------------- */
#users-section,
#settings-main-section,
#invoices-section,
#section-receipts,
#section-waybills,
#wip-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 28px 86px;
  overflow: auto;
}

#users-section .topbar,
#settings-main-section .topbar,
#invoices-section .topbar,
#section-receipts .topbar,
#section-waybills .topbar,
#wip-section .topbar {
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(23, 25, 29, 0.92) 0%, rgba(33, 36, 41, 0.90) 100%);
  border-bottom: none;
}

#users-section .topbar-left,
#settings-main-section .topbar-left,
#invoices-section .topbar-left,
#section-receipts .topbar-left,
#section-waybills .topbar-left,
#wip-section .topbar-left {
  align-items: center;
}

#users-section .topbar-right,
#settings-main-section .topbar-right,
#invoices-section .topbar-right,
#section-receipts .topbar-right,
#section-waybills .topbar-right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

#users-section .table-section,
#settings-main-section .table-section,
#invoices-section .table-section,
#section-receipts .table-section,
#section-waybills .table-section,
#wip-section .table-section {
  padding: 14px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.015) 100%),
    rgba(14, 16, 18, 0.74);
}

#users-section .table-wrap,
#invoices-section .table-wrap,
#section-receipts .table-wrap,
#section-waybills .table-wrap,
#wip-section .table-section {
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%),
    rgba(11, 13, 15, 0.72);
}

#users-section .products-table thead,
#users-section .products-table th,
#invoices-section .products-table thead,
#invoices-section .products-table th,
#section-receipts .products-table thead,
#section-receipts .products-table th,
#section-waybills .products-table thead,
#section-waybills .products-table th {
  background: rgba(53, 58, 67, 0.78);
}

#users-section .products-table th,
#invoices-section .products-table th,
#section-receipts .products-table th,
#section-waybills .products-table th {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #8e877c;
  font-size: 11px;
  letter-spacing: 0.14em;
}

#users-section .products-table td,
#invoices-section .products-table td,
#section-receipts .products-table td,
#section-waybills .products-table td {
  padding: 17px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13.5px;
}

#users-section .products-table tbody tr:hover,
#invoices-section .products-table tbody tr:hover,
#section-receipts .products-table tbody tr:hover,
#section-waybills .products-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.045);
}

#users-section .empty-state,
#invoices-section .empty-state,
#section-receipts .empty-state,
#section-waybills .empty-state,
#wip-section .table-section {
  background: linear-gradient(180deg, rgba(11, 13, 15, 0.32) 0%, rgba(11, 13, 15, 0.12) 100%);
}

#settings-main-section .settings-container {
  max-width: 980px !important;
  margin: 0 auto !important;
  border-radius: 28px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.018) 100%),
    rgba(18, 20, 24, 0.74) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24) !important;
  padding: 26px !important;
}

#settings-main-section .form-label,
#settings-main-section .user-info,
#invoices-section .filter-wrapper span,
#section-receipts .topbar .form-control,
#section-waybills .topbar .form-control {
  color: var(--text-secondary);
}

#settings-main-section .form-control,
#invoices-section .form-control,
#section-receipts .form-control,
#section-waybills .form-control {
  min-height: 44px;
  border-radius: 14px;
}

#users-section .user-profile,
#invoices-section .user-profile,
#section-receipts .user-profile,
#section-waybills .user-profile,
#settings-main-section .user-info {
  min-height: 52px;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#wip-section .table-section {
  min-height: 320px;
  display: flex;
  justify-content: center !important;
  align-items: center !important;
  text-align: center;
}

.modal-overlay:not(#login-overlay):not(#welcome-screen) {
  background: rgba(7, 9, 11, 0.76);
  backdrop-filter: blur(16px);
}

.modal-overlay:not(#login-overlay):not(#welcome-screen) .modal {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(28, 31, 37, 0.94) 0%, rgba(21, 23, 27, 0.96) 100%);
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.4);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay:not(#login-overlay):not(#welcome-screen) .modal-header {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0));
}

.modal-overlay:not(#login-overlay):not(#welcome-screen) .modal-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.modal-overlay:not(#login-overlay):not(#welcome-screen) .modal-body,
.modal-overlay:not(#login-overlay):not(#welcome-screen) .modal-form,
#invoice-modal-overlay > .modal > div[style*='padding: 16px 20px'],
#invoice-modal-overlay > .modal > div[style*='padding: 10px 20px'],
#receipt-modal-overlay > .modal > div[style*='padding: 16px 20px'],
#receipt-modal-overlay > .modal > div[style*='padding: 10px 20px'],
#waybill-modal-overlay > .modal > div[style*='padding: 16px 20px'],
#waybill-modal-overlay > .modal > div[style*='padding: 10px 20px'],
#picker-modal-overlay > .modal > div[style*='padding: 12px 16px'] {
  background: transparent;
}

.modal-overlay:not(#login-overlay):not(#welcome-screen) .modal-footer {
  padding: 18px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.02));
}

.modal-overlay:not(#login-overlay):not(#welcome-screen) .form-control,
.modal-overlay:not(#login-overlay):not(#welcome-screen) select.form-control {
  min-height: 44px;
  border-radius: 14px;
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
}

#invoice-modal-overlay table,
#receipt-modal-overlay table,
#waybill-modal-overlay table,
#picker-modal-overlay table {
  border-collapse: collapse;
}

#invoice-modal-overlay thead tr,
#receipt-modal-overlay thead tr,
#waybill-modal-overlay thead tr,
#picker-modal-overlay thead {
  background: rgba(53, 58, 67, 0.78) !important;
}

#invoice-modal-overlay th,
#receipt-modal-overlay th,
#waybill-modal-overlay th,
#picker-modal-overlay th {
  color: #8e877c !important;
  font-size: 11px !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

#invoice-modal-overlay td,
#receipt-modal-overlay td,
#waybill-modal-overlay td,
#picker-modal-overlay td {
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}

#picker-modal-overlay table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

#picker-modal-overlay thead {
  position: static !important;
}

#picker-modal-overlay th {
  position: sticky;
  top: 0;
  z-index: 6;
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(36, 40, 48, 0.96) !important;
  backdrop-filter: blur(12px);
}

#invoice-status-badge,
#receipt-modal-overlay .badge,
#waybill-modal-overlay .badge {
  border-radius: 999px !important;
  padding: 7px 12px !important;
}

#invoice-modal-overlay [style*='background: var(--bg-surface-2)'],
#receipt-modal-overlay [style*='background:var(--bg-surface-2)'],
#waybill-modal-overlay [style*='background:var(--bg-surface-2)'],
#picker-modal-overlay [style*='background: var(--bg-surface)'] {
  background: rgba(255,255,255,0.03) !important;
}

#invoice-modal-overlay [style*='border: 1px solid var(--border)'],
#receipt-modal-overlay [style*='border: 1px solid var(--border)'],
#waybill-modal-overlay [style*='border: 1px solid var(--border)'] {
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 22px !important;
}

#modal-overlay .modal,
#modal-overlay-client .modal,
#user-modal-overlay .modal,
#quantity-modal-overlay .modal,
#confirm-overlay .modal,
#confirm-overlay-client .modal,
#confirm-overlay-user .modal,
#confirm-generic-overlay .modal,
#details-overlay .modal {
  max-width: 720px;
}

#details-overlay .modal {
  max-width: 860px;
}

[data-theme="light"] #users-section .topbar,
[data-theme="light"] #settings-main-section .topbar,
[data-theme="light"] #invoices-section .topbar,
[data-theme="light"] #section-receipts .topbar,
[data-theme="light"] #section-waybills .topbar,
[data-theme="light"] #users-section .table-section,
[data-theme="light"] #settings-main-section .table-section,
[data-theme="light"] #invoices-section .table-section,
[data-theme="light"] #section-receipts .table-section,
[data-theme="light"] #section-waybills .table-section,
[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) .modal {
  box-shadow: 0 20px 54px rgba(88, 65, 40, 0.12);
}

[data-theme="light"] #users-section .table-wrap,
[data-theme="light"] #invoices-section .table-wrap,
[data-theme="light"] #section-receipts .table-wrap,
[data-theme="light"] #section-waybills .table-wrap,
[data-theme="light"] .clients-table-wrap,
[data-theme="light"] .products-table-wrap {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54) 0%, rgba(255, 255, 255, 0.36) 100%),
    rgba(244, 238, 229, 0.82);
}

@media (max-width: 860px) {
  #users-section,
  #settings-main-section,
  #invoices-section,
  #section-receipts,
  #section-waybills,
  #wip-section {
    padding: 18px 18px 86px;
  }

  #users-section .topbar,
  #settings-main-section .topbar,
  #invoices-section .topbar,
  #section-receipts .topbar,
  #section-waybills .topbar,
  #users-section .table-section,
  #settings-main-section .table-section,
  #invoices-section .table-section,
  #section-receipts .table-section,
  #section-waybills .table-section {
    padding: 18px;
  }

  #users-section .topbar-right,
  #settings-main-section .topbar-right,
  #invoices-section .topbar-right,
  #section-receipts .topbar-right,
  #section-waybills .topbar-right {
    justify-content: flex-start;
  }

  #invoices-section .search-wrapper,
  #section-receipts .search-wrapper,
  #section-waybills .search-wrapper,
  #invoices-section .btn,
  #section-receipts .btn,
  #section-waybills .btn,
  #users-section .btn,
  #users-section .user-profile,
  #invoices-section .user-profile,
  #section-receipts .user-profile,
  #section-waybills .user-profile {
    width: 100%;
  }

  .modal-overlay:not(#login-overlay):not(#welcome-screen) .modal {
    width: calc(100% - 24px) !important;
    max-width: none !important;
    height: auto !important;
    max-height: calc(100vh - 24px) !important;
  }
}

/* Light Theme 2026 Fixes */
[data-theme="light"] .main {
  background:
    radial-gradient(circle at top right, rgba(215, 146, 101, 0.14), transparent 30%),
    radial-gradient(circle at 18% 16%, rgba(248, 241, 233, 0.48), transparent 24%),
    linear-gradient(180deg, #efe6da 0%, #e5d9cb 100%);
}

[data-theme="light"] .main::before {
  opacity: 0.14;
  filter: blur(2px);
}

[data-theme="light"] .main::after {
  opacity: 0.24;
}

[data-theme="light"] .home-hero-panel,
[data-theme="light"] .home-actions-shell,
[data-theme="light"] .home-hint-row,
[data-theme="light"] .home-brand-card,
[data-theme="light"] .home-action-card,
[data-theme="light"] .home-stat-card,
[data-theme="light"] .products-topbar,
[data-theme="light"] .products-table-section,
[data-theme="light"] .clients-topbar,
[data-theme="light"] .clients-table-section,
[data-theme="light"] #users-section .topbar,
[data-theme="light"] #settings-main-section .topbar,
[data-theme="light"] #settings-main-section .settings-container,
[data-theme="light"] #invoices-section .topbar,
[data-theme="light"] #invoices-section .table-section,
[data-theme="light"] #section-receipts .topbar,
[data-theme="light"] #section-receipts .table-section,
[data-theme="light"] #section-waybills .topbar,
[data-theme="light"] #section-waybills .table-section,
[data-theme="light"] #wip-section .wip-card,
[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) .modal {
  background:
    linear-gradient(180deg, rgba(248, 241, 233, 0.82) 0%, rgba(236, 226, 214, 0.74) 100%),
    rgba(229, 219, 206, 0.9);
  border-color: rgba(129, 111, 90, 0.16);
  box-shadow: 0 20px 54px rgba(106, 83, 58, 0.12);
}

[data-theme="light"] .home-brand-card,
[data-theme="light"] .home-action-card,
[data-theme="light"] .home-stat-card,
[data-theme="light"] #wip-section .wip-card {
  backdrop-filter: blur(20px);
}

[data-theme="light"] .home-brand-card {
  background:
    linear-gradient(160deg, rgba(246, 238, 229, 0.82) 0%, rgba(233, 221, 208, 0.74) 100%),
    rgba(229, 219, 206, 0.88);
}

[data-theme="light"] .home-action-card.accent,
[data-theme="light"] .home-stat-card.accent {
  background:
    linear-gradient(180deg, rgba(216, 137, 96, 0.16) 0%, rgba(216, 137, 96, 0.06) 100%),
    rgba(243, 234, 224, 0.82);
  border-color: rgba(196, 124, 86, 0.18);
}

[data-theme="light"] .home-section,
[data-theme="light"] .products-section-2026,
[data-theme="light"] .clients-section-2026,
[data-theme="light"] #users-section,
[data-theme="light"] #settings-main-section,
[data-theme="light"] #invoices-section,
[data-theme="light"] #section-receipts,
[data-theme="light"] #section-waybills,
[data-theme="light"] #wip-section {
  color: #2f2923;
}

[data-theme="light"] .home-kicker,
[data-theme="light"] .home-section .product-count,
[data-theme="light"] .topbar .product-count,
[data-theme="light"] .design-subline,
[data-theme="light"] .home-subtitle,
[data-theme="light"] .home-brand-card p,
[data-theme="light"] .home-action-card p,
[data-theme="light"] .home-stat-card p,
[data-theme="light"] #settings-main-section .settings-subtitle,
[data-theme="light"] #wip-section .wip-card p,
[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) .modal .text-secondary {
  color: #6e6257;
}

[data-theme="light"] .home-title,
[data-theme="light"] .home-brand-card h2,
[data-theme="light"] .home-action-card strong,
[data-theme="light"] .home-stat-card strong,
[data-theme="light"] .page-title,
[data-theme="light"] #settings-main-section .settings-title,
[data-theme="light"] #wip-section .wip-card h3,
[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) .modal-title {
  color: #2b2622;
}

[data-theme="light"] .products-user-profile,
[data-theme="light"] .clients-user-profile,
[data-theme="light"] #users-section .user-profile,
[data-theme="light"] #invoices-section .user-profile,
[data-theme="light"] #section-receipts .user-profile,
[data-theme="light"] #section-waybills .user-profile,
[data-theme="light"] #settings-main-section .user-info {
  background: rgba(244, 236, 227, 0.72);
  border-color: rgba(129, 111, 90, 0.14);
  color: #5f5449;
  box-shadow: inset 0 1px 0 rgba(255, 247, 240, 0.45);
}

[data-theme="light"] .products-table-wrap,
[data-theme="light"] .clients-table-wrap,
[data-theme="light"] #users-section .table-wrap,
[data-theme="light"] #invoices-section .table-wrap,
[data-theme="light"] #section-receipts .table-wrap,
[data-theme="light"] #section-waybills .table-wrap {
  background:
    linear-gradient(180deg, rgba(245, 238, 230, 0.7) 0%, rgba(235, 226, 215, 0.56) 100%),
    rgba(230, 220, 208, 0.88);
  border-color: rgba(129, 111, 90, 0.14);
}

[data-theme="light"] .products-table thead,
[data-theme="light"] .clients-table thead,
[data-theme="light"] #users-section table thead,
[data-theme="light"] #invoices-section table thead,
[data-theme="light"] #section-receipts table thead,
[data-theme="light"] #section-waybills table thead {
  background: rgba(124, 112, 98, 0.12);
}

[data-theme="light"] .products-table th,
[data-theme="light"] .clients-table th,
[data-theme="light"] .products-table td,
[data-theme="light"] .clients-table td,
[data-theme="light"] #users-section th,
[data-theme="light"] #users-section td,
[data-theme="light"] #invoices-section th,
[data-theme="light"] #invoices-section td,
[data-theme="light"] #section-receipts th,
[data-theme="light"] #section-receipts td,
[data-theme="light"] #section-waybills th,
[data-theme="light"] #section-waybills td {
  border-color: rgba(120, 108, 93, 0.1);
}

[data-theme="light"] .products-table td,
[data-theme="light"] .clients-table td,
[data-theme="light"] #users-section td,
[data-theme="light"] #invoices-section td,
[data-theme="light"] #section-receipts td,
[data-theme="light"] #section-waybills td {
  color: #3f382f;
}

[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) {
  background: rgba(223, 212, 199, 0.62);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) .modal-header,
[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) .modal-footer {
  border-color: rgba(120, 108, 93, 0.12);
}

[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) .form-control,
[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) select.form-control,
[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) textarea.form-control {
  background: rgba(245, 237, 228, 0.78);
  border-color: rgba(129, 111, 90, 0.14);
  color: #3b332c;
}


[data-theme="light"] .clients-section-2026 #clients-table td:nth-child(1) {
  color: #302922;
}

[data-theme="light"] .clients-section-2026 #clients-table td:nth-child(2),
[data-theme="light"] .clients-section-2026 #clients-table td:nth-child(3) {
  color: #5f554b;
}

[data-theme="light"] .clients-section-2026 #clients-table .badge {
  border-color: rgba(154, 186, 68, 0.22);
  background: rgba(190, 219, 118, 0.2);
  color: #6f8a1f;
}

[data-theme="light"] .clients-section-2026 .btn-edit {
  background: rgba(220, 145, 103, 0.16);
  border-color: rgba(194, 125, 88, 0.18);
  color: #bf6942;
}

[data-theme="light"] .clients-section-2026 .btn-del {
  background: rgba(201, 132, 123, 0.14);
  border-color: rgba(182, 116, 108, 0.18);
  color: #b45c52;
}

[data-theme="light"] .clients-section-2026 .btn-edit:hover,
[data-theme="light"] .clients-section-2026 .btn-del:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(111, 84, 54, 0.1);
}

[data-theme="light"] .products-section-2026 .badge {
  background: rgba(214, 198, 181, 0.48);
  border-color: rgba(159, 136, 111, 0.22);
  color: #8b7259;
  box-shadow: inset 0 1px 0 rgba(248, 240, 232, 0.34);
}


/* Light Theme Warm Balance */
[data-theme="light"] {
  --bg: #e4d7c7;
  --bg-surface: #ddd0c0;
  --bg-surface-2: #d4c5b4;
  --text-primary: #2f2924;
  --text-secondary: #5e5348;
  --text-muted: #817466;
  --border: rgba(117, 99, 78, 0.14);
}

[data-theme="light"] body {
  background: linear-gradient(180deg, #e7dbcc 0%, #ddd0c0 100%);
}

[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(223, 211, 197, 0.94) 0%, rgba(213, 199, 183, 0.96) 100%);
  border-right-color: rgba(117, 99, 78, 0.12);
  box-shadow: inset -1px 0 0 rgba(255, 245, 236, 0.28);
}

[data-theme="light"] .sidebar-logo,
[data-theme="light"] .sidebar-footer {
  border-color: rgba(117, 99, 78, 0.12);
}

[data-theme="light"] .nav-group-title:hover,
[data-theme="light"] .nav-item:hover {
  background: rgba(96, 80, 61, 0.06);
}

[data-theme="light"] .nav-item.active {
  background: rgba(196, 124, 86, 0.16);
  color: #a25736;
}

[data-theme="light"] .theme-toggle {
  background: rgba(241, 231, 220, 0.68);
  border-color: rgba(117, 99, 78, 0.12);
}

[data-theme="light"] .marquee-bar {
  background: rgba(226, 214, 201, 0.94);
  border-top: 1px solid rgba(196, 124, 86, 0.18);
}

[data-theme="light"] .marquee-label {
  background: rgba(207, 143, 104, 0.14);
  border-right: 1px solid rgba(196, 124, 86, 0.18);
}

[data-theme="light"] .marquee-updated {
  background: rgba(207, 143, 104, 0.08);
  border-left: 1px solid rgba(196, 124, 86, 0.18);
}

[data-theme="light"] .currency-ticker {
  background: linear-gradient(135deg, rgba(215, 185, 159, 0.34), rgba(197, 177, 158, 0.18));
  border-color: rgba(196, 124, 86, 0.14);
}

[data-theme="light"] .form-control,
[data-theme="light"] .search-input,
[data-theme="light"] .category-filter,
[data-theme="light"] select.form-control,
[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) .form-control,
[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) select.form-control,
[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) textarea.form-control {
  background: rgba(228, 216, 202, 0.84);
  border-color: rgba(117, 99, 78, 0.14);
}

[data-theme="light"] .product-count,
[data-theme="light"] .client-count,
[data-theme="light"] .user-count,
[data-theme="light"] .badge,
[data-theme="light"] .user-profile,
[data-theme="light"] .products-user-profile,
[data-theme="light"] .clients-user-profile,
[data-theme="light"] #users-section .user-profile,
[data-theme="light"] #invoices-section .user-profile,
[data-theme="light"] #section-receipts .user-profile,
[data-theme="light"] #section-waybills .user-profile,
[data-theme="light"] #settings-main-section .user-info {
  background: rgba(229, 217, 204, 0.74);
  border-color: rgba(117, 99, 78, 0.14);
}

[data-theme="light"] .home-hero-panel,
[data-theme="light"] .home-actions-shell,
[data-theme="light"] .home-hint-row,
[data-theme="light"] .home-brand-card,
[data-theme="light"] .home-action-card,
[data-theme="light"] .home-stat-card,
[data-theme="light"] .products-topbar,
[data-theme="light"] .products-table-section,
[data-theme="light"] .clients-topbar,
[data-theme="light"] .clients-table-section,
[data-theme="light"] #users-section .topbar,
[data-theme="light"] #settings-main-section .topbar,
[data-theme="light"] #settings-main-section .settings-container,
[data-theme="light"] #invoices-section .topbar,
[data-theme="light"] #invoices-section .table-section,
[data-theme="light"] #section-receipts .topbar,
[data-theme="light"] #section-receipts .table-section,
[data-theme="light"] #section-waybills .topbar,
[data-theme="light"] #section-waybills .table-section,
[data-theme="light"] #wip-section .wip-card,
[data-theme="light"] .modal-overlay:not(#login-overlay):not(#welcome-screen) .modal {
  background:
    linear-gradient(180deg, rgba(234, 223, 211, 0.84) 0%, rgba(220, 206, 191, 0.8) 100%),
    rgba(211, 196, 180, 0.9);
  border-color: rgba(117, 99, 78, 0.15);
  box-shadow: 0 18px 42px rgba(101, 80, 57, 0.1);
}

[data-theme="light"] .products-table-wrap,
[data-theme="light"] .clients-table-wrap,
[data-theme="light"] #users-section .table-wrap,
[data-theme="light"] #invoices-section .table-wrap,
[data-theme="light"] #section-receipts .table-wrap,
[data-theme="light"] #section-waybills .table-wrap {
  background:
    linear-gradient(180deg, rgba(232, 221, 210, 0.78) 0%, rgba(219, 206, 191, 0.72) 100%),
    rgba(208, 193, 177, 0.9);
  border-color: rgba(117, 99, 78, 0.14);
}

[data-theme="light"] .products-table thead,
[data-theme="light"] .clients-table thead,
[data-theme="light"] #users-section table thead,
[data-theme="light"] #invoices-section table thead,
[data-theme="light"] #section-receipts table thead,
[data-theme="light"] #section-waybills table thead {
  background: rgba(137, 121, 104, 0.14);
}


[data-theme="light"] #settings-main-section .settings-container {
  background:
    linear-gradient(180deg, rgba(234, 223, 211, 0.88) 0%, rgba(220, 206, 191, 0.82) 100%),
    rgba(211, 196, 180, 0.92) !important;
  border: 1px solid rgba(117, 99, 78, 0.15) !important;
  box-shadow: 0 18px 42px rgba(101, 80, 57, 0.1) !important;
}

[data-theme="light"] #settings-main-section .form-label {
  color: #735f4e;
}

[data-theme="light"] #settings-main-section .form-control {
  background: rgba(228, 216, 202, 0.86) !important;
  border-color: rgba(117, 99, 78, 0.14) !important;
  color: #3b332c;
}

[data-theme="light"] #settings-main-section #btn-edit-company-settings {
  background: rgba(229, 217, 204, 0.74);
  border-color: rgba(117, 99, 78, 0.14);
  color: #6c5948;
}
