:root {
  --bg-color: #f4f6f8;
  --card-bg: #ffffff;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #16a34a;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  padding-bottom: 80px; /* Esspaço para a Bottom Nav */
}

/* Header */
.app-header {
  background-color: var(--card-bg);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  color: var(--primary);
}

.status-badge {
  background: #dcfce7;
  color: var(--success);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* Container de Abas */
.content-container {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

h3 {
  font-size: 1rem;
  margin: 20px 0 10px 0;
  color: var(--text-muted);
}

/* Formulários e Cards */
.card-form {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  gap: 8px;
}

input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
}

input:focus {
  border-color: var(--primary);
}

button {
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

button:active { opacity: 0.8; }

.btn-primary { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-secondary { background: #4b5563; color: white; }

/* Busca do Estoque */
.search-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.search-box i {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.search-box input {
  border: none;
  padding: 12px 0;
}

/* Listas de Itens */
.cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-card {
  background: var(--card-bg);
  padding: 14px;
  border-radius: 10px;
  border-left: 5px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.item-card.critico { border-left-color: var(--danger); }
.item-card.atencao { border-left-color: var(--warning); }
.item-card.ok { border-left-color: var(--success); }

.item-info h4 { font-size: 1rem; color: var(--text-main); }
.item-info p { font-size: 0.85rem; color: var(--text-muted); }

/* Navegação Mobile (Bottom Navigation) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: var(--card-bg);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid var(--border-color);
  z-index: 1000;
}

.nav-item {
  background: transparent;
  color: var(--text-muted);
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.nav-item i { font-size: 1.4rem; }

.nav-item.active {
  color: var(--primary);
}