/* === Global Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: #f4f6f8;
  color: #2b2e3d;
  display: flex;
}

/* === Sidebar Navigation === */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 240px;
  height: 100vh;
  background: #f8f9fc;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  padding-top: 20px;
}

.sidebar .logo {
  font-size: 22px;
  font-weight: 700;
  color: #2b2e3d;
  text-align: center;
  margin-bottom: 20px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  padding: 14px 20px;
  color: #555;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar ul li:hover,
.sidebar ul li.active {
  background: #e6f2e8;
  color: #2c7a4b;
  border-left: 4px solid #2c7a4b;
}

.sidebar ul li i {
  font-size: 16px;
}

/* === Main Content === */
.main {
  margin-left: 240px;
  padding: 20px;
  width: calc(100% - 240px);
  min-height: 100vh;
}

/* === Top Info Cards === */
.top-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  text-align: center;
}

.card h3 {
  font-size: 14px;
  color: #666;
}

.card p {
  font-size: 20px;
  font-weight: 700;
  color: #2b2e3d;
  margin-top: 8px;
}

/* === Dashboard Layout === */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

/* === Chart Cards === */
.chart-card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.chart-card h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

/* === Transaction (Sales Entry) Card === */
.transaction-card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.transaction-card label {
  display: block;
  font-size: 13px;
  margin-top: 10px;
}

.transaction-card input,
.transaction-card select {
  width: 100%;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-top: 4px;
  font-size: 14px;
}

.transaction-card button {
  width: 100%;
  margin-top: 15px;
  background: #2c7a4b;
  color: white;
  border: none;
  padding: 10px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.transaction-card button:hover {
  background: #25633d;
}

/* === Alerts === */
.alert-card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-top: 20px;
}

.alert-card h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #b44b00;
  margin-top: 5px;
}

.alert-item::before {
  content: "⚠️";
}

/* === Tables (Inventory / Reports / Suppliers) === */
.table-card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-top: 20px;
}

.table-card h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card th,
.table-card td {
  padding: 10px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #e5e7eb;
}

.table-card th {
  background: #f8f9fc;
}

/* === Settings Page === */
.settings-card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-top: 20px;
  max-width: 600px;
}

.settings-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.settings-card label {
  display: block;
  font-size: 13px;
  margin-top: 10px;
}

.settings-card input {
  width: 100%;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-top: 4px;
}

.settings-card button {
  margin-top: 15px;
  background: #2c7a4b;
  color: white;
  border: none;
  padding: 10px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

.settings-card button:hover {
  background: #25633d;
}

/* === Responsive Sidebar === */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -100%;
    transition: left 0.3s ease;
    z-index: 1000;
  }

  .sidebar.open {
    left: 0;
  }

  .main {
    margin-left: 0;
    width: 100%;
  }
}
