/* ============================================
   SEARCHMONICA — Design System v2.0
   Tema: Dark Premium + Light Mode
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* === TOKENS === */
:root {
  --bg-body: #07090f;
  --bg-card: #0d1117;
  --bg-elevated: #111827;
  --bg-hover: #1a2035;

  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #1d4ed8;
  --accent-glow: rgba(59, 130, 246, 0.28);
  --accent-subtle: rgba(59, 130, 246, 0.08);

  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --border: rgba(255, 255, 255, 0.07);
  --border-accent: rgba(59, 130, 246, 0.4);
  --border-hover: rgba(255, 255, 255, 0.13);

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 0 3px var(--accent-glow);
  --transition: all 0.2s ease;
}

/* === RESET === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* === HEADER === */
.app-header {
  background: linear-gradient(160deg, #0f172a 0%, #0b1120 60%, #0f172a 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.2rem 0 2.8rem;
  position: relative;
  overflow: hidden;
}

.app-header::before {
  content: '';
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.13) 0%, transparent 70%);
  pointer-events: none;
}

.header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.app-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.app-logo-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: white;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.45);
}

.app-title {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.app-title span {
  background: linear-gradient(135deg, var(--accent-light), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-subtitle {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-top: 0.3rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--success-bg);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--success);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 1rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.65);
  }
}

/* === LAYOUT === */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* === SEARCH CARD === */
.search-section {
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.search-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.search-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.search-input-wrap {
  display: flex;
  gap: 0.5rem;
}

.search-input-container {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.88rem;
}

.search-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.88rem 1rem 0.88rem 2.8rem;
  font-family: inherit;
  font-size: 0.97rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.btn-search {
  background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.88rem 1.6rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.btn-search:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn-search:active {
  transform: translateY(0);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

.filter-label-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

/* Toggle switch */
.toggle-input {
  display: none;
}

.toggle-track {
  width: 42px;
  height: 24px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-input:checked+.toggle-track {
  background: var(--accent-subtle);
  border-color: var(--accent);
}

.toggle-input:checked+.toggle-track::after {
  background: var(--accent);
  transform: translateX(18px);
}

.hint-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* === LOADING === */
.loading-state {
  display: none;
  padding: 3.5rem 0;
  text-align: center;
}

.loading-state.active {
  display: block;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.loading-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  animation: dot-bounce 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dot-bounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.35;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* === EMPTY STATE === */
.empty-state {
  padding: 5rem 0;
  text-align: center;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.1;
  display: block;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.empty-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* === RESULTS === */
#results {
  animation: fadeSlideUp 0.4s ease;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results-meta {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.result-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-subtle);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--accent-light);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* === TABLE === */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.prod-table {
  width: 100%;
  border-collapse: collapse;
}

.prod-table thead {
  background: var(--bg-elevated);
}

.prod-table thead th {
  padding: 0.9rem 1.1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.prod-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.prod-table tbody tr:last-child {
  border-bottom: none;
}

.prod-table tbody tr:hover {
  background: var(--bg-hover);
}

.prod-table td {
  padding: 0.85rem 1.1rem;
  vertical-align: middle;
  font-size: 0.875rem;
}

.col-id {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.code-badge {
  display: inline-block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--accent-light);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.code-badge:hover {
  background: var(--accent-subtle);
  border-color: var(--border-accent);
  color: var(--accent-light);
  transform: scale(1.04);
}

.code-badge:active {
  transform: scale(0.97);
}

.col-name {
  font-weight: 500;
  color: var(--text-primary);
  min-width: 200px;
}

.col-comment {
  color: var(--text-secondary);
  font-size: 0.82rem;
  min-width: 180px;
  max-width: 260px;
}

.col-cost {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Stock badges */
.stock-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.stock-ok {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.stock-low {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.stock-zero {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Image */
.prod-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 4px;
  display: block;
}

/* Print button */
.btn-print {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-print:hover {
  background: var(--accent-subtle);
  border-color: var(--border-accent);
  color: var(--accent-light);
}

/* === NO RESULTS === */
.no-results {
  padding: 3rem;
  text-align: center;
  color: var(--text-secondary);
}

.no-results i {
  font-size: 2.5rem;
  opacity: 0.15;
  margin-bottom: 1rem;
  display: block;
}

/* === ERROR === */
.error-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--danger);
  font-size: 0.875rem;
}

/* === MODAL === */
.modal-content {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7) !important;
}

.modal-header {
  background: var(--bg-elevated) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 1.25rem 1.5rem !important;
}

.modal-title {
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  font-size: 0.97rem !important;
}

.modal-body {
  padding: 1.5rem !important;
}

.modal-footer {
  border-top: 1px solid var(--border) !important;
  background: var(--bg-elevated) !important;
  padding: 1rem 1.5rem !important;
}

.btn-close {
  filter: invert(1) opacity(0.5) !important;
}

#labelFrame {
  width: 100%;
  height: 380px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
}

.btn-modal-close {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-modal-print {
  background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
  border: none;
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
}

.btn-modal-print:hover {
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

/* === TOAST NOTIFICATION === */
.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  white-space: nowrap;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.copy-toast-icon {
  color: var(--success);
  font-size: 1rem;
}

/* Real-time search pulse dot */
.search-live-dot {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.search-live-dot.active {
  opacity: 1;
  animation: dot-bounce 1s ease-in-out infinite;
}

/* === SEARCH HISTORY === */
.search-history {
  display: none;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.history-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
}

.history-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.35rem 0.22rem 0.65rem;
  transition: var(--transition);
  user-select: none;
}

.history-chip:hover {
  background: var(--accent-subtle);
  border-color: var(--border-accent);
}

.history-chip-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s;
}

.history-chip:hover .history-chip-text {
  color: var(--accent-light);
}

.history-chip-del {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: var(--transition);
  flex-shrink: 0;
}

.history-chip-del:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.history-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.history-clear:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* === SEARCH TERM HIGHLIGHT === */
mark.search-highlight {
  background: rgba(245, 195, 40, 0.28);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
  font-weight: 600;
  font-style: normal;
}

/* === SORTABLE COLUMNS === */
.prod-table thead th.sortable {
  cursor: pointer;
  position: relative;
  padding-right: 1.65rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.prod-table thead th.sortable:hover {
  color: var(--accent-light);
  background: var(--bg-hover);
}

.prod-table thead th.sortable::after {
  content: '⇅';
  position: absolute;
  right: 0.55rem;
  opacity: 0.3;
  font-size: 0.7rem;
}

.prod-table thead th.sorted-asc::after {
  content: '▲';
  opacity: 1;
  color: var(--accent-light);
}

.prod-table thead th.sorted-desc::after {
  content: '▼';
  opacity: 1;
  color: var(--accent-light);
}

/* === LIGHTBOX === */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 88vw;
  max-height: 88vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: var(--radius-lg);
  object-fit: contain;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: lb-zoom-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lb-zoom-in {
  from {
    transform: scale(0.82);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-name {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  max-width: 400px;
}

.lightbox-close {
  position: absolute;
  top: -1rem;
  right: -1rem;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: white;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.12) rotate(90deg);
}

/* Clickable image */
.prod-img.clickable {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prod-img.clickable:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

/* === LOW STOCK ALERT === */
.row-low-stock {
  border-left: 3px solid var(--warning) !important;
}

.stock-warn-icon {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--warning);
  font-size: 0.68rem;
  vertical-align: middle;
  animation: pulse-dot 1.6s ease-in-out infinite;
}

/* === LIGHT THEME === */
[data-theme="light"] {
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --bg-elevated: #f8fafc;
  --bg-hover: #e8eef6;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border: rgba(0, 0, 0, 0.09);
  --border-hover: rgba(0, 0, 0, 0.16);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.07);
  --shadow-glow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

[data-theme="light"] .app-header {
  background: linear-gradient(160deg, #dbeafe 0%, #eff6ff 60%, #dbeafe 100%);
}

[data-theme="light"] .app-header::before {
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.09) 0%, transparent 70%);
}

[data-theme="light"] .app-title {
  color: #0f172a;
}

[data-theme="light"] .app-title span {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .app-subtitle {
  color: #475569;
}

[data-theme="light"] .modal-content {
  background: #ffffff !important;
}

[data-theme="light"] .modal-header {
  background: #f8fafc !important;
}

[data-theme="light"] .modal-footer {
  background: #f8fafc !important;
}

[data-theme="light"] .btn-close {
  filter: none !important;
}

/* === THEME TOGGLE BUTTON === */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-card);
}

.theme-toggle:hover {
  background: var(--accent-subtle);
  border-color: var(--border-accent);
  color: var(--accent);
  transform: rotate(22deg) scale(1.07);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .app-title {
    font-size: 1.6rem;
  }

  .main-content {
    padding: 1.5rem 1rem;
  }

  .search-card {
    padding: 1.5rem;
  }

  .search-input-wrap {
    flex-direction: column;
  }

  .btn-search {
    justify-content: center;
  }

  .prod-table td,
  .prod-table th {
    padding: 0.7rem 0.6rem;
  }

  .col-comment {
    display: none;
  }

  .prod-img {
    width: 44px;
    height: 44px;
  }

  .filter-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .col-id {
    display: none;
  }

  .app-title {
    font-size: 1.35rem;
  }
}