/* StockSmart - Inventory Tracker Styles */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-700: #374151;
  --gray-900: #111827;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

site-header {
  background: var(--primary);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

site-header h1 { margin: 0 0 0.5rem; font-size: 2.5rem; }

site-header .tagline { margin: 0; opacity: 0.9; font-size: 1.1rem; }

main { padding: 2rem 0; }

section { background: white; border-radius: 8px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

section h2 { margin-top: 0; color: var(--primary); border-bottom: 2px solid var(--gray-100); padding-bottom: 0.5rem; }

.form-row { margin-bottom: 1rem; }

.form-row label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-row input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 1rem;
}

.form-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 500;
}

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

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 0.5rem;
}

.btn-secondary:hover { background: var(--gray-200); }

.presets {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.preset-btn {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.preset-btn:hover { background: var(--gray-100); }

.table-container { overflow-x: auto; }

.inventory-table {
  width: 100%;
  border-collapse: collapse;
}

.inventory-table th, .inventory-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.inventory-table th { background: var(--gray-50); font-weight: 600; }

.status-ok { color: var(--success); font-weight: 500; }
.status-low { color: var(--warning); font-weight: 500; }
.status-critical { color: var(--danger); font-weight: 500; }

.actions-bar { margin-top: 1rem; }

.alerts-container {
  max-height: 200px;
  overflow-y: auto;
}

.alert-item {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  background: var(--gray-50);
  border-left: 4px solid var(--warning);
}

.alert-critical { border-left-color: var(--danger); background: #fef2f2; }

.supporting-content h3 { color: var(--gray-700); margin-top: 1.5rem; }

.supporting-content ul { margin: 0.5rem 0; padding-left: 1.5rem; }

.supporting-content li { margin-bottom: 0.5rem; }

site-footer {
  background: var(--gray-900);
  color: white;
  padding: 1.5rem 0;
  text-align: center;
  margin-top: 2rem;
}

site-footer nav a {
  color: #cbd5e1;
  margin: 0 1rem;
  text-decoration: none;
}

site-footer nav a:hover { color: white; }

@media (max-width: 768px) {
  site-header h1 { font-size: 1.75rem; }
  main { padding: 1rem 0; }
  section { padding: 1rem; margin-bottom: 1rem; }
  .form-row { margin-bottom: 0.75rem; }
  .btn-primary, .btn-secondary { width: 100%; margin: 0.25rem 0; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
