* {
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  margin: 0;
  background: #f4f6f9;
  color: #111827;
}

/* Navbar */
.navbar {
  background: linear-gradient(90deg, #f97316, #ea580c);
  padding: 12px 30px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  font-size: 20px;
  font-weight: bold;
  color: white;
}

/* Links */
.nav-links {
  display: flex;
  gap: 25px;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: 0.3s;
}

.nav-links a:hover {
  opacity: 0.8;
}

.logout-btn {
  background: rgba(255,255,255,0.2);
  padding: 6px 12px;
  border-radius: 6px;
}

/* Hamburger (hidden on desktop) */
.hamburger {
  display: none;
  font-size: 26px;
  color: white;
  cursor: pointer;
}


/* Topbar */
.topbar {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: white;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 20px;
  font-weight: 700;
}

.topbar nav a {
  color: #dbeafe;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
}

.topbar nav a.active,
.topbar nav a:hover {
  color: #ffffff;
}

.logout {
  background: rgba(255,255,255,0.15);
  padding: 8px 14px;
  border-radius: 6px;
}

/* Layout */
.container {
  padding: 30px 40px;
}

/* Page title */
.page-title h1 {
  margin-bottom: 5px;
}

.page-title p {
  color: #6b7280;
}

/* KPI cards */
.kpi-grid {
  margin-top: 25px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.kpi-card {
  background: white;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.kpi-card h3 {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 10px;
}

.kpi-card span {
  font-size: 28px;
  font-weight: 700;
  color: #2563eb;
}

.kpi-card .danger {
  color: #dc2626;
}
.kpi-card .green {
  color: #16a34a;
}
.kpi-card .orange {
  color: #f97316;
}
.kpi-card .purple {
  color: #a855f7;
}

/* Panels */
.panel-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.panel {
  background: white;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.panel h2 {
  margin-bottom: 5px;
}

.panel p {
  color: #6b7280;
  font-size: 14px;
}

/* Placeholder chart */
.chart-placeholder {
  height: 240px;
  margin-top: 15px;
  background: #e5e7eb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* Activity list */
.activity-list {
  list-style: none;
  padding: 0;
  margin-top: 15px;
}

.activity-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

/* Footer */
footer {
  margin-top: 40px;
  padding: 15px;
  text-align: center;
  color: #6b7280;
}

/* Responsive */
@media (max-width: 900px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }
  .table-section.grid-2 {
    grid-template-columns: 1fr;
  }
  .table-section.grid-2-1 {
    grid-template-columns: 1fr;
  }
}

/* Table Section */
.table-section {
  margin-top: 30px;
}
.table-section.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.table-section.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.table-section.grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.table-card {
  background: white;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.table-header h2 {
  margin: 0;
}

.view-all {
  text-decoration: none;
  font-size: 14px;
  color: #2563eb;
  font-weight: 600;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: #f1f5f9;
}

th, td {
  padding: 12px 14px;
  text-align: left;
}

th {
  font-weight: 600;
  color: #374151;
}

tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

tbody tr:hover {
  background: #f9fafb;
}
.input-controlled-td {
  padding: 4px 12px;
  text-align: left;
}


/* Status Badges */
.badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge.success {
  background: #dcfce7;
  color: #166534;
}

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

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

.input-control {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.order-form-card {
  display: none;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.form-grid-3-1 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.table-row {
  background-color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Selected row */
.table-row.active {
  background-color: #e0f2fe; /* light blue */
}

@media (max-width: 992px) {

  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background: #ea580c;
    flex-direction: column;
    width: 220px;
    padding: 20px;
    display: none;
    border-radius: 0 0 0 10px;
  }

  .nav-links a {
    padding: 10px 0;
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }
}