@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-main: #0c0a09;
  --bg-surface: #171412;
  --bg-card: rgba(26, 22, 20, 0.7);
  --bg-card-hover: rgba(36, 31, 28, 0.85);
  --bg-input: rgba(20, 17, 15, 0.85);
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-active: rgba(229, 169, 80, 0.4);
  
  --accent-gold: #e5a950;
  --accent-gold-hover: #f5b964;
  --accent-gold-glow: rgba(229, 169, 80, 0.15);
  
  --accent-teal: #10b981;
  --accent-teal-bg: rgba(16, 185, 129, 0.12);
  --accent-blue: #38bdf8;
  --accent-blue-bg: rgba(56, 189, 248, 0.12);
  --accent-rose: #f43f5e;
  
  --text-primary: #f5f5f4;
  --text-secondary: #a8a29e;
  --text-muted: #78716c;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(229, 169, 80, 0.12);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(229, 169, 80, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(56, 189, 248, 0.05) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #292524;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #44403c;
}

/* Layout Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation / Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(12, 10, 9, 0.75);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #2a201b, #1e1713);
  border: 1px solid rgba(229, 169, 80, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 22px;
  box-shadow: var(--shadow-sm);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fafaf9, #d6d3d1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-teal);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-teal);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-teal);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Main Content Area */
.main-wrapper {
  padding: 36px 0 60px;
}

/* Hero & Search Header */
.hero-section {
  text-align: center;
  margin-bottom: 32px;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.hero-title span {
  color: var(--accent-gold);
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Search Bar */
.search-container {
  max-width: 720px;
  margin: 0 auto 24px;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 20px;
  color: var(--accent-gold);
  font-size: 20px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 18px 52px 18px 54px;
  background: var(--bg-input);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.05rem;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow), var(--shadow-md);
  background: rgba(24, 20, 18, 0.95);
}

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

.search-clear-btn {
  position: absolute;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  visibility: hidden;
  opacity: 0;
}

.search-clear-btn.visible {
  visibility: visible;
  opacity: 1;
}

.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

/* Category Quick Filter Chips */
.chips-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.chip-btn {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.chip-btn:hover {
  background: rgba(229, 169, 80, 0.1);
  color: var(--accent-gold);
  border-color: rgba(229, 169, 80, 0.3);
}

.chip-btn.active {
  background: var(--accent-gold);
  color: #17120e;
  border-color: var(--accent-gold);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(229, 169, 80, 0.3);
}

/* Results Header */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 0 4px;
}

.results-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.results-count b {
  color: var(--text-primary);
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-action-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 169, 80, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(229, 169, 80, 0.3);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-action-download:hover {
  background: var(--accent-gold);
  color: #171412;
  box-shadow: 0 0 15px rgba(229, 169, 80, 0.35);
}

.btn-print-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-print-tag:hover {
  background: rgba(229, 169, 80, 0.15);
  color: var(--accent-gold);
  border-color: rgba(229, 169, 80, 0.4);
}

/* Products Table Card */
.products-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.products-table th {
  background: rgba(18, 15, 13, 0.8);
  padding: 16px 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.products-table th.price-col {
  text-align: right;
  width: 170px;
}

.products-table th.th-sortable {
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.products-table th.th-sortable:hover {
  color: var(--accent-gold);
  background: rgba(229, 169, 80, 0.08);
}

.products-table th .th-content {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.products-table th.price-col .th-content {
  justify-content: flex-end;
  width: 100%;
}

.products-table th .sort-indicator {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0.45;
  transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

.products-table th.th-sortable:hover .sort-indicator {
  opacity: 0.9;
  color: var(--accent-gold);
}

.products-table th.sorted-asc,
.products-table th.sorted-desc {
  color: var(--accent-gold);
  background: rgba(229, 169, 80, 0.08);
}

.products-table th.sorted-asc .sort-indicator,
.products-table th.sorted-desc .sort-indicator {
  opacity: 1;
  color: var(--accent-gold);
  font-weight: 800;
  transform: scale(1.15);
}

.products-table td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  transition: background 0.15s ease;
}

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

.products-table tr:hover td {
  background: var(--bg-card-hover);
}

/* Item Name & Barcode */
.item-name-cell {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
}

.barcode-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: var(--transition);
}

.barcode-tag:hover {
  background: rgba(229, 169, 80, 0.12);
  color: var(--accent-gold);
  border-color: rgba(229, 169, 80, 0.25);
}

/* Unit Badge */
.unit-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: #e7e5e4;
  text-align: center;
}

/* Prices */
.price-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.price-box {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
}

.price-val {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.price-val.p1 {
  color: var(--accent-gold);
}

.price-val.p2 {
  color: var(--accent-teal);
}

.price-val.no-price {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.price-sub {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Skeletons & Empty States */
.skeleton-row td {
  padding: 22px 20px;
}

.skeleton-box {
  height: 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state {
  text-align: center;
  padding: 64px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: rgba(28, 25, 23, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fafaf9;
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
  z-index: 100;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
}

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

/* Auth Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #1c1917;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-md);
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  margin-top: 8px;
  margin-bottom: 18px;
  outline: none;
}

.modal-input:focus {
  border-color: var(--accent-gold);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-primary {
  padding: 10px 20px;
  background: var(--accent-gold);
  color: #17120e;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--accent-gold-hover);
}

/* Telegram Auth Styles */
.btn-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(34, 158, 217, 0.35);
  transition: var(--transition);
}

.btn-telegram:hover:not(:disabled) {
  background: linear-gradient(135deg, #38bdf8 0%, #2AABEE 100%);
  box-shadow: 0 6px 20px rgba(34, 158, 217, 0.5);
  transform: translateY(-1px);
}

.btn-telegram:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.btn-full {
  width: 100%;
  padding: 13px 20px;
  font-size: 0.95rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition);
}

.btn-link:hover:not(:disabled) {
  color: #7dd3fc;
}

.btn-link:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: none;
}

.code-input-wrapper {
  margin: 18px 0;
  text-align: center;
}

.code-input {
  width: 100%;
  max-width: 280px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 10px;
  text-align: center;
  outline: none;
  transition: var(--transition);
}

.code-input:focus {
  border-color: #2AABEE;
  box-shadow: 0 0 20px rgba(42, 171, 238, 0.25);
  background: rgba(0, 0, 0, 0.7);
}

.code-input::placeholder {
  letter-spacing: 6px;
  color: var(--text-muted);
  opacity: 0.4;
}

.auth-alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}

.auth-alert.info {
  background: rgba(42, 171, 238, 0.12);
  border: 1px solid rgba(42, 171, 238, 0.3);
  color: #7dd3fc;
}

.auth-alert.error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.auth-alert.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* Auth Waiting Animation */
.auth-waiting-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 10px auto 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-waiting-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 2;
  box-shadow: 0 4px 15px rgba(34, 158, 217, 0.4);
}

.radar-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(42, 171, 238, 0.25);
  animation: pulseRadar 1.8s infinite ease-out;
  z-index: 1;
}

@keyframes pulseRadar {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.auth-countdown {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-top: 6px;
}

.auth-channel-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.auth-channel-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(42, 171, 238, 0.15);
  border-radius: var(--radius-full);
  color: #2AABEE;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
}

.auth-tab-btn.active {
  background: #292524;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.auth-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.auth-badge-status.authenticated {
  background: var(--accent-teal-bg);
  color: var(--accent-teal);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.auth-badge-status.guest {
  background: rgba(244, 63, 94, 0.12);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Primary Action Button in Header */
.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #e5a950 0%, #c88120 100%);
  color: #120e0a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(229, 169, 80, 0.25);
}

.btn-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(229, 169, 80, 0.4);
  background: linear-gradient(135deg, #f5b964 0%, #d98d28 100%);
}

.btn-primary-action:active {
  transform: translateY(0);
}

/* Results Quick Actions Bar */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.results-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-quick-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-quick-action:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-quick-action.gold {
  color: var(--accent-gold);
  border-color: rgba(229, 169, 80, 0.3);
  background: rgba(229, 169, 80, 0.08);
}

.btn-quick-action.gold:hover {
  border-color: var(--accent-gold);
  background: rgba(229, 169, 80, 0.16);
}

/* Modal Wide Variation */
.modal-card-wide {
  max-width: 720px;
  width: 94%;
}

.menu-header-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(229, 169, 80, 0.12);
  border: 1px solid rgba(229, 169, 80, 0.3);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.btn-modal-swagger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-modal-swagger:hover {
  background: rgba(229, 169, 80, 0.14);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

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

/* Operations Tabs */
.operations-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.op-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.op-tab-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.op-tab-btn.active {
  background: rgba(229, 169, 80, 0.12);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 16px rgba(229, 169, 80, 0.15);
}

.op-tab-icon {
  font-size: 20px;
  margin-bottom: 4px;
  display: block;
}

.op-tab-text {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
}

.op-tab-text small {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  display: block;
  margin-top: 2px;
}

.op-tab-btn.active .op-tab-text small {
  color: rgba(229, 169, 80, 0.7);
}

/* Panels */
.op-panel {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.op-panel.active {
  display: block;
}

/* Description Box */
.op-desc-box {
  background: rgba(255, 255, 255, 0.025);
  border-left: 3px solid var(--accent-gold);
  border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

.op-desc-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.op-desc-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.op-desc-text code {
  background: rgba(0, 0, 0, 0.45);
  color: var(--accent-gold);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 30px 16px;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent-gold);
  background: rgba(229, 169, 80, 0.06);
}

.file-input-hidden {
  display: none;
}

.dropzone-icon {
  font-size: 34px;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.dropzone-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dropzone-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* File Badge */
.file-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 169, 80, 0.14);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  max-width: 90%;
  animation: fadeIn 0.2s ease-out;
}

.file-badge-icon {
  font-size: 16px;
}

.file-badge-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-gold);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-badge-size {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.file-badge-remove {
  background: none;
  border: none;
  color: var(--accent-rose);
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.file-badge-remove:hover {
  background: rgba(244, 63, 94, 0.2);
}

/* Custom Radio Option Card */
.evator-options-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.custom-radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
}

.custom-radio-option:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-card-hover);
}

.custom-radio-option:has(input:checked) {
  border-color: var(--accent-gold);
  background: rgba(229, 169, 80, 0.08);
}

.custom-radio-option input[type="radio"] {
  accent-color: var(--accent-gold);
  width: 17px;
  height: 17px;
  margin-top: 3px;
  cursor: pointer;
}

.radio-content {
  flex: 1;
}

.radio-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.radio-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Print Features Grid */
.print-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
}

.feature-icon {
  font-size: 22px;
  margin-bottom: 6px;
  color: var(--accent-gold);
}

.feature-text strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.feature-text span {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Operation Alert */
.op-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
  animation: fadeIn 0.2s ease-out;
}

.op-alert.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid #10b981;
  color: #6ee7b7;
}

.op-alert.error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid #f43f5e;
  color: #fda4af;
}

.op-alert.info {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid #38bdf8;
  color: #7dd3fc;
}

/* Operation Button */
.btn-op {
  width: 100%;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-op:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-op.gold-pulse:not(:disabled) {
  box-shadow: 0 4px 20px rgba(229, 169, 80, 0.35);
}

.btn-op-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* Swagger Panel in Operations Menu */
.swagger-endpoints-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.swagger-endpoint-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.835rem;
  transition: var(--transition);
}

.swagger-endpoint-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-card-hover);
}

.swagger-method {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.swagger-method.post {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.swagger-method.get {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.swagger-path {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 155px;
  flex-shrink: 0;
}

.swagger-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.75rem;
  }
  .products-table th, .products-table td {
    padding: 12px 14px;
  }
  .products-table th.price-col {
    width: 120px;
  }
  .price-val {
    font-size: 0.95rem;
  }
  .brand-tagline {
    display: none;
  }
  .operations-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .print-features-grid {
    grid-template-columns: 1fr;
  }
  .swagger-endpoint-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .results-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ==========================================================================
   Edit Mode (Lock Toggle & Editable Table)
   ========================================================================== */

.btn-lock-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.btn-lock-mode:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-lock-mode.unlocked {
  background: rgba(229, 169, 80, 0.16);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 14px rgba(229, 169, 80, 0.35);
}

.btn-lock-mode.unlocked:hover {
  background: rgba(229, 169, 80, 0.24);
  box-shadow: 0 0 20px rgba(229, 169, 80, 0.5);
}

.btn-lock-mode .lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Edit Mode Banner */
.edit-mode-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(229, 169, 80, 0.14), rgba(229, 169, 80, 0.04));
  border: 1px solid rgba(229, 169, 80, 0.35);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  color: #fef08a;
  font-size: 0.875rem;
  animation: slideDownNotice 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownNotice {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.edit-notice-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.edit-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold);
  animation: pulseGold 1.5s infinite;
  flex-shrink: 0;
}

@keyframes pulseGold {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.btn-edit-notice-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(229, 169, 80, 0.3);
  color: var(--accent-gold);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.785rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-edit-notice-close:hover {
  background: rgba(229, 169, 80, 0.2);
  border-color: var(--accent-gold);
}

/* Editable Table Inputs */
.edit-input-field {
  width: 100%;
  background: rgba(18, 15, 13, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #fafaf9;
  font-size: 0.925rem;
  font-family: inherit;
  padding: 8px 12px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.edit-input-field:hover {
  border-color: rgba(229, 169, 80, 0.45);
  background: rgba(24, 20, 17, 0.95);
}

.edit-input-field:focus {
  border-color: var(--accent-gold);
  background: rgba(28, 22, 18, 0.98);
  box-shadow: 0 0 0 3px rgba(229, 169, 80, 0.22);
}

.edit-field-wrapper {
  width: 100%;
  min-width: 220px;
}

.edit-price-wrapper {
  display: inline-flex;
  align-items: center;
  position: relative;
  width: 130px;
}

.edit-input-field.edit-input-price {
  text-align: right;
  padding-right: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.edit-input-field.edit-input-price::-webkit-outer-spin-button,
.edit-input-field.edit-input-price::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.edit-currency-addon {
  position: absolute;
  right: 10px;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.85rem;
  pointer-events: none;
}

/* Barcode Edit field */
.edit-barcode-container {
  margin-top: 6px;
}

.edit-barcode-wrapper {
  display: inline-flex;
  align-items: center;
  position: relative;
  max-width: 240px;
  width: 100%;
}

.barcode-addon-icon {
  position: absolute;
  left: 9px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s ease;
}

.edit-barcode-wrapper:focus-within .barcode-addon-icon {
  color: var(--accent-gold);
}

.edit-input-field.edit-input-barcode {
  padding-left: 28px;
  padding-top: 5px;
  padding-bottom: 5px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  background: rgba(14, 12, 10, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.edit-input-field.edit-input-barcode:hover {
  border-color: rgba(229, 169, 80, 0.4);
}

.edit-input-field.edit-input-barcode:focus {
  background: rgba(22, 18, 14, 0.95);
  border-color: var(--accent-gold);
}

/* Unit Edit field */
.edit-unit-wrapper {
  display: inline-flex;
  width: 75px;
}

.edit-input-field.edit-input-unit,
select.edit-input-field.edit-input-unit {
  text-align: center;
  text-align-last: center;
  padding: 6px 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffd591;
  background: rgba(14, 12, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  cursor: pointer;
  outline: none;
}

.edit-input-field.edit-input-unit:hover,
select.edit-input-field.edit-input-unit:hover {
  border-color: rgba(229, 169, 80, 0.45);
  background: rgba(24, 20, 17, 0.95);
}

.edit-input-field.edit-input-unit:focus,
select.edit-input-field.edit-input-unit:focus {
  border-color: var(--accent-gold);
  background: rgba(28, 22, 18, 0.98);
  box-shadow: 0 0 0 3px rgba(229, 169, 80, 0.22);
}

select.edit-input-field.edit-input-unit option {
  background: #1c1612;
  color: #fafaf9;
  font-size: 0.875rem;
  padding: 4px 8px;
}

/* Row states in Edit Mode */
.products-table tr.row-modified td {
  background: rgba(229, 169, 80, 0.08) !important;
}

.products-table tr.row-saved td {
  background: rgba(16, 185, 129, 0.18) !important;
  transition: background 0.3s ease;
}

.products-table tr.row-error td {
  background: rgba(244, 63, 94, 0.18) !important;
  transition: background 0.3s ease;
}

/* Row Actions in Edit Mode */
.row-actions-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-row-save {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.775rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-row-save:hover {
  background: rgba(229, 169, 80, 0.18);
  border-color: rgba(229, 169, 80, 0.4);
  color: var(--accent-gold);
}

.btn-row-save.dirty {
  background: rgba(229, 169, 80, 0.25);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(229, 169, 80, 0.3);
  animation: pulseSaveBtn 2s infinite;
}



@keyframes pulseSaveBtn {
  0% { box-shadow: 0 0 6px rgba(229, 169, 80, 0.2); }
  50% { box-shadow: 0 0 14px rgba(229, 169, 80, 0.5); }
  100% { box-shadow: 0 0 6px rgba(229, 169, 80, 0.2); }
}

/* Catalog Mode Toggle Button (Наши цены / Цены поставщиков) */
.btn-catalog-mode {
  transition: all 0.25s ease;
  font-weight: 600;
}

.btn-catalog-mode.btn-mode-active {
  background: rgba(229, 169, 80, 0.16) !important;
  border-color: var(--accent-gold) !important;
  color: var(--accent-gold) !important;
  box-shadow: 0 0 14px rgba(229, 169, 80, 0.3) !important;
}

.btn-catalog-mode.btn-mode-active:hover {
  background: rgba(229, 169, 80, 0.24) !important;
  box-shadow: 0 0 18px rgba(229, 169, 80, 0.45) !important;
}

/* ========================================================
   Full UI Auth Gate Screen (Strict Access Control)
   ======================================================== */
.auth-gate-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 100px);
  padding: 40px 20px 80px;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-gate-card {
  max-width: 480px;
  width: 100%;
  background: rgba(22, 19, 17, 0.95);
  border: 1px solid rgba(229, 169, 80, 0.28);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 50px rgba(229, 169, 80, 0.08);
  border-radius: var(--radius-lg);
  padding: 38px 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-gate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2AABEE, var(--accent-gold), #2AABEE);
  background-size: 200% 100%;
  animation: shimmerBorder 4s linear infinite;
}

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

.auth-gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(229, 169, 80, 0.12);
  border: 1px solid rgba(229, 169, 80, 0.35);
  color: var(--accent-gold);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}

.auth-gate-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.auth-gate-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 24px;
}

