/* LogisticaPro Design System — Warehouse Inventory Manager */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0");

:root {
  --lp-primary-900: #0f172a;
  --lp-primary-800: #1e293b;
  --lp-primary-700: #1e3a5f;
  --lp-primary-600: #2563eb;
  --lp-primary-500: #3b82f6;
  --lp-primary-100: #dbeafe;

  --lp-accent-cyan: #0891b2;
  --lp-accent-violet: #7c3aed;
  --lp-accent-orange: #ea580c;
  --lp-accent-green: #16a34a;
  --lp-accent-red: #dc2626;
  --lp-accent-amber: #d97706;

  --lp-surface: #ffffff;
  --lp-surface-muted: #f8fafc;
  --lp-border: #e2e8f0;
  --lp-text: #0f172a;
  --lp-text-muted: #64748b;
  --lp-text-inverse: #f8fafc;

  --lp-radius-sm: 6px;
  --lp-radius-md: 10px;
  --lp-radius-lg: 16px;
  --lp-radius-xl: 24px;

  --lp-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --lp-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --lp-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);

  --lp-font: "Inter", system-ui, sans-serif;
  --lp-sidebar-width: 260px;
  --lp-header-height: 64px;
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--lp-font);
  color: var(--lp-text);
  background: var(--lp-surface-muted);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
  user-select: none;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--lp-radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

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

.btn-primary {
  background: var(--lp-primary-600);
  color: white;
  box-shadow: var(--lp-shadow-sm);
}

.btn-primary:hover {
  background: var(--lp-primary-500);
}

.btn-secondary {
  background: var(--lp-surface);
  color: var(--lp-text);
  border: 1px solid var(--lp-border);
}

.btn-secondary:hover {
  background: var(--lp-surface-muted);
}

.btn-danger {
  background: #fef2f2;
  color: var(--lp-accent-red);
  border: 1px solid #fecaca;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--lp-radius-sm);
  background: transparent;
  border: none;
  color: var(--lp-text-muted);
  cursor: pointer;
}

.btn-icon:hover {
  background: var(--lp-surface-muted);
  color: var(--lp-text);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--lp-text-muted);
}

.input-field {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-md);
  font-family: inherit;
  font-size: 0.9375rem;
  background: var(--lp-surface);
  color: var(--lp-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-field:focus {
  outline: none;
  border-color: var(--lp-primary-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-ok {
  background: #dcfce7;
  color: #166534;
}

.badge-basso {
  background: #fef3c7;
  color: #92400e;
}

.badge-esaurito {
  background: #fee2e2;
  color: #991b1b;
}

.badge-cat {
  background: var(--lp-primary-100);
  color: var(--lp-primary-700);
}

.stat-card {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  color: var(--lp-text-muted);
  font-weight: 500;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--lp-text);
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--lp-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: var(--lp-radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--lp-shadow-lg);
  z-index: 1000;
  animation: slideIn 0.25s ease;
}

.toast-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.toast-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

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

.modal-overlay .modal {
  position: relative;
  z-index: 1;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

.modal {
  background: var(--lp-surface);
  border-radius: var(--lp-radius-lg);
  box-shadow: var(--lp-shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--lp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--lp-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.hidden {
  display: none !important;
}
