* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  display: flex;
  overflow-y: auto;
  background-color: #f6f9f4;
  box-sizing: border-box;
}

/* NAV */
nav {
  width: 200px;
  height: 100vh;
  background-color: #1f3a30;

  position: fixed;
  top: 0;
  left: 0;

  transition: 0.3s;
  z-index: 1000;
}

/* LOGO */
.logo {
  padding: 20px;
  display: flex;
  justify-content: center;
}

.logo img {
  width: 170px;
}

/* LINKS */
nav ul {
  list-style: none;
  padding: 20px 0;
}

nav ul a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  color: white;
  text-decoration: none;
}

nav ul a:hover {
  background-color: #2b5245;
}

/* BURGER */
.nav-toggle {
  display: none;
  background-color: #1f3a30;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;

  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 3000;
}

main {
  flex: 1;
  padding: 20px;
  width: 100%;
  margin-left: 200px;
}

article {
  width: 100%;
}

/* SECTIONS TITLE */
.sections-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sections-header p {
  margin-top: 8px;
  color: #676666;
}

/* modal */
.shift-modal {
  position: fixed;
  z-index: 99;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-box {
  background-color: white;
  padding: 20px;
  width: 320px;
  border-radius: 12px;
  z-index: 100;
}

.modal-box h3 {
  margin-bottom: 15px;
}

.modal-box label {
  display: block;
  margin-top: 10px;
  font-size: 13px;
}

.modal-box input,
.modal-box select {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 15px;
}

.close-btn {
  background-color: #eee;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.save-btn {
  background-color: #0f8b8d;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.open-modal-btn {
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background-color: #111827;
  color: white;
  cursor: pointer;
  font-size: 14px;
}

/* EDIT/DELETE BUTTONS */
.actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.edit-btn {
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  background-color: #e5e7eb;
  cursor: pointer;
  margin-right: 5px;
}

.delete-btn {
  background-color: #ef4444;
  color: white;
}

/* DASHBOARD SECTION */
.dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.card {
  padding: 1.5rem;
  border-radius: 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.icon {
  font-size: 1.8rem;
  opacity: 0.9;
}

h3 {
  font-size: 1.2rem;
  font-weight: 500;
  opacity: 0.9;
}

.number {
  font-size: 3rem;
  font-weight: 700;
  margin: 0px;
}

/* Gradient Backgrounds */
.card:nth-child(1) {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
}
.card:nth-child(2) {
  background: linear-gradient(135deg, #10b981, #22c55e);
}
.card:nth-child(3) {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}
.card:nth-child(4) {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.dashboard-tables {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
  margin-top: 30px;
  margin-bottom: 30px;
}

.dashboard-box {
  background: white;
  border-radius: 20px;
  padding: 20px;
  width: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dashboard-box h3 {
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;

  background: #f5f6fa;
}

.dashboard-item span {
  white-space: nowrap;
  font-size: 1rem;
}

.top-products-box {
  margin-top: 20px;
  width: 100%;
}

/* EVERY SECTION */
.containers {
  background-color: white;
  width: 100%;
  margin-top: 30px;
  padding: 20px;
  border-radius: 25px;

  overflow-x: auto;
}

/* PRODUCTS SECTION */
.category-title {
  font-size: 24px;
  margin: 40px 0 20px 0;
  padding-left: 12px;
  border-left: 5px solid #2b7a78;
  color: #222;
}

.category-products {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}

.empty-message {
  text-align: center;
  color: gray;
  font-size: 18px;
  margin-top: 20px;
}

.products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.product-card {
  width: 260px;
  background-color: white;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-info {
  padding: 18px;
}

.product-info h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.category {
  color: gray;
  margin-bottom: 10px;
}

.price {
  font-size: 22px;
  font-weight: bold;
  color: #2b7a78;
}

.stock {
  margin-top: 10px;
  font-size: 14px;
}

.in-stock {
  color: green;
}

.low-stock {
  color: orange;
}

.out-stock {
  color: red;
}

.product-actions {
  display: flex;
  justify-content: space-between;

  padding: 15px;
}

/* SCHEDULE SECTION */
.calendar-wrapper {
  background-color: white;
  border-radius: 20px;
  padding: 20px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.calendar-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.calendar-btn {
  background-color: transparent;
  border: 2px solid #0f8b8d;
  color: #0f8b8d;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.calendar-btn:hover {
  background-color: #0f8b8d;
  color: white;
}

.calendar-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 200px repeat(7, minmax(0, 1fr));
}

/* table headers */
.day {
  background-color: #f7f9f9;
  text-align: center;
  padding: 15px;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}

.employee-name {
  background-color: #f7f9f9;
  border-bottom: 1px solid #ddd;
}

.employee-cell,
.cell {
  min-height: 90px;
  border-bottom: 1px solid #ececec;
  border-right: 1px solid #ececec;
  display: flex;
  justify-content: center;
  align-items: center;
}

.employee-cell {
  justify-content: flex-start;
  padding-left: 20px;
}
.employee {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid #eee;
  background-color: #fff;
}

.employee img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

/* grid cells - schedule section */
.cell {
  background-color: white;
  min-height: 90px;
  border-bottom: 1px solid #eee;
  border-right: 1px solid #eee;
  position: relative;
}

/* schedule card */
.shift {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  color: white;
}

/* shift colors */
.morning {
  background-color: #2196f3;
}

.mid {
  background-color: #ffb300;
}

.afternoon {
  background-color: #8e44ad;
}

/* EMPLOYEES SECTION */
.employee-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 15px;
}

.table-head {
  display: grid;
  grid-template-columns: 2fr 2fr 1.5fr 1fr 1fr 1fr;
  padding: 15px 10px;
  border-bottom: 1px solid #eee;
  color: gray;
  font-size: 14px;
}

.employee-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1.5fr 1fr 1fr 1fr;
  align-items: center;
  padding: 18px 10px;
  border-bottom: 1px solid #f1f1f1;
}

.employee-row:hover {
  background-color: #fafafa;
}

/* employee info */
.employee-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.employee-info img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
}

.employee-info h4 {
  font-size: 15px;
  margin-bottom: 3px;
}

.employee-info p {
  font-size: 13px;
  color: gray;
}

/* status select*/
.status-select {
  width: 120px;
  padding: 10px 14px;
  margin-right: 10px;
  border: none;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}

.status-select.active {
  background-color: #dff7e2;
  color: #1f8f3e;
}

.status-select.vacation {
  background-color: #fff3cd;
  color: #b78103;
}

.status-select.off {
  background-color: #ffe0e0;
  color: #cc4444;
}

/* INVOICE SECTION */
.invoice-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.invoice-filters input,
.invoice-filters select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.invoice-table {
  background-color: white;
  border-radius: 12px;
  padding: 15px;
}

.invoice-table table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.invoice-table th,
.invoice-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.invoice-table th {
  background-color: #fafafa;
}

/* status select */
.status {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.paid {
  background-color: #dcfce7;
  color: #166534;
}

.pending {
  background-color: #fef9c3;
  color: #854d0e;
}

.overdue {
  background-color: #efa4a4;
  color: #e63030;
}

@media (max-width: 768px) {
  header {
    padding-left: 20px;
    padding-right: 20px;
  }

  .nav-toggle {
    display: block;
  }

  nav {
    left: -100%;
    width: 250px;
    transition: 0.3s ease;
  }

  nav.active {
    left: 0;
  }

  main {
    margin-left: 0;
    width: 100%;
    overflow-x: hidden;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .content {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: 160px repeat(7, minmax(90px, 1fr));
  }

  .employees-section {
    padding: 15px;
    border-radius: 18px;
  }

  .employee-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .employee-top input,
  .employee-top button {
    width: 100%;
  }

  .employee-table {
    width: 100%;
  }

  .table-head {
    display: none;
  }

  .employee-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid #f1f1f1;
    border-radius: 18px;
    margin-bottom: 15px;
  }

  .employee-info {
    width: 100%;
  }

  .employee-row p {
    font-size: 14px;
    word-break: break-word;
  }

  .status-select,
  .edit-btn {
    width: 100%;
  }

  .invoice-table table {
    min-width: 500px;
  }

  .invoice-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .invoice-filters {
    flex-direction: column;
  }
}
