/* =========================
RESET
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    Segoe UI,
    Arial,
    sans-serif;
  background: #ecfdf5;
  color: #064e3b;
  line-height: 1.5;
  padding-bottom: 60px;
}

/* =========================
HEADER
========================= */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: #059669;
  color: white;
}

.header-brand {
  font-weight: bold;
  font-size: 18px;
}

.nav a {
  color: white;
  text-decoration: none;
  margin-left: 15px;
  font-size: 14px;
}

.nav a:hover {
  text-decoration: underline;
}

/* =========================
SIDEBAR (DASHBOARD)
========================= */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 240px;
  height: 100%;
  background: #059669;
  color: white;
  padding: 20px;
}

.sidebar h2 {
  margin-bottom: 20px;
}

.sidebar a {
  display: block;
  padding: 10px;
  margin-bottom: 6px;
  color: white;
  text-decoration: none;
  border-radius: 6px;
}

.sidebar a:hover {
  background: #047857;
}

/* =========================
CONTAINER
========================= */

.container {
  padding: 30px;
  max-width: 1200px;
  margin: auto;
}

.with-sidebar {
  margin-left: 260px;
}

/* =========================
CARD
========================= */

.card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

/* =========================
DASHBOARD CARDS
========================= */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.card p {
  font-size: 20px;
  font-weight: bold;
  color: #047857;
}

/* =========================
CHART
========================= */

.chart-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  margin-top: 20px;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 350px;
  max-width: 100%;
  overflow: hidden;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* =========================
FORM
========================= */

.form-box {
  margin-top: 15px;
}

label {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

input {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

button {
  background: #059669;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background: #047857;
}

/* =========================
TABLE
========================= */

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
  font-size: 14px;
}

.table th {
  background: #f0fdf4;
}

/* =========================
BUTTON SMALL
========================= */

.btn-small {
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 4px;
}

.btn-edit {
  background: #2563eb;
}

.btn-danger {
  background: #dc2626;
}

/* =========================
UTILITY
========================= */

.text-right {
  text-align: right;
}

.alert {
  background: #d1fae5;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
}

/* =========================
RESPONSIVE
========================= */

@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }

  .with-sidebar {
    margin-left: 0;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    margin-top: 10px;
  }
}
@media (max-width: 768px) {
  .chart-container {
    height: 260px;
  }
}

.form-box {
  max-width: 500px;
}

@media (max-width: 600px) {
  .form-box {
    max-width: 100%;
  }

  .form-box input {
    width: 100%;
  }
}
/* =========================
TABLE RESPONSIVE
========================= */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 750px;
}

table th,
table td {
  padding: 8px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 14px;
}

table th {
  background: #d1fae5;
}

/* FORM DALAM TABLE */

table input {
  width: 90px;
  padding: 4px;
  font-size: 12px;
}

table button {
  padding: 4px 8px;
  font-size: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 750px;
}

table th,
table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

table th {
  background: #d1fae5;
  font-weight: 600;
}

table input {
  width: 100px;
  padding: 5px;
  font-size: 13px;
}

table input[name="nama"] {
  width: 140px;
}

table input[name="harga"] {
  width: 110px;
}

table input[name="stok"] {
  width: 70px;
}
@media (max-width: 600px) {
  table th,
  table td {
    font-size: 12px;
    padding: 8px;
  }

  table input {
    width: 80px;
    font-size: 12px;
  }
}
/* =========================
MENU TABLE FIX
========================= */

.table-wrapper {
  overflow-x: auto;
  margin-top: 15px;
}

.table {
  width: 100%;
  min-width: 750px;
  border-collapse: collapse;
}

.table th {
  background: #d1fae5;
  font-weight: 600;
}

.table td {
  vertical-align: middle;
}

.table form {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

.table input {
  padding: 4px 6px;
  font-size: 13px;
}
/* =========================
AKSI TABLE
========================= */

.aksi-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.aksi-group form {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* MOBILE FIX */
@media (max-width: 768px) {
  .aksi-group {
    flex-wrap: nowrap;
  }

  .aksi-group button {
    white-space: nowrap;
  }
}
/* =========================
AKSI TABLE
========================= */

.aksi-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* DESKTOP */

@media (min-width: 769px) {
  .aksi-group {
    flex-direction: row;
  }
}

/* MOBILE */

@media (max-width: 768px) {
  .aksi-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .aksi-group button {
    width: 100%;
  }
}
.table td {
  vertical-align: middle;
}
/* =========================
AKSI TABLE MOBILE
========================= */

@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }
  .chart-container {
    position: relative;
    width: 100%;
    height: auto;
  }
  .aksi-group {
    flex-direction: column;
    width: 100%;
    gap: 6px;
  }

  .aksi-group form {
    width: 100%;
  }

  .aksi-group button {
    width: 100%;
    display: block;
  }
}
.table-wrapper {
  overflow-x: auto;
}

.table {
  min-width: 700px;
}
/* =========================
TABLET FIX (769px - 1024px)
========================= */

@media (min-width: 769px) and (max-width: 1024px) {
  .aksi-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .aksi-group form {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
  }

  .aksi-group button {
    white-space: nowrap;
  }
}
/* =========================
FILTER LAPORAN
========================= */

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
  align-items: flex-end;
}

.filter div {
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .filter {
    flex-direction: column;
    align-items: stretch;
  }

  .filter button,
  .filter a {
    width: 100%;
  }
}
/* BUTTON RESET */

.btn-reset {
  background: #dc2626;
}

.btn-reset:hover {
  background: #b91c1c;
}
/* =========================
KASIR RESPONSIVE FINAL
========================= */

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.menu-item {
  background: #f0fdf4;
  border: 1px solid #d1fae5;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}

.menu-item:hover {
  background: #dcfce7;
}

.cart {
  width: 100%;
  overflow-x: auto;
}

.cart table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
}

.cart th,
.cart td {
  padding: 8px;
  text-align: center;
  white-space: nowrap;
}

.cart button.btn-small {
  min-width: 34px;
  padding: 5px 8px;
}

.total {
  margin-top: 12px;
  font-weight: bold;
  font-size: 16px;
  text-align: right;
}

/* STRUK */
.struk {
  margin-top: 20px;
  overflow-x: auto;
}

.struk-table {
  width: 100%;
  min-width: 300px;
}

/* =========================
TABLET
========================= */

@media (min-width: 769px) and (max-width: 1024px) {
  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================
MOBILE
========================= */

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .card {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
  }

  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .menu-item {
    font-size: 13px;
    padding: 10px;
  }

  .cart table {
    min-width: 450px;
  }

  .cart th,
  .cart td {
    font-size: 12px;
    padding: 6px;
  }

  .cart button.btn-small {
    width: 30px;
    height: 30px;
    padding: 0;
  }

  .total {
    font-size: 14px;
  }

  .struk {
    font-size: 12px;
  }

  .struk-table td {
    font-size: 12px;
    padding: 4px;
  }

  .struk-total {
    font-size: 14px;
  }
}

/* =========================
HP KECIL
========================= */

@media (max-width: 480px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .menu-item {
    font-size: 14px;
  }

  .cart table {
    min-width: 400px;
  }
}
/* =========================
BUTTON GLOBAL
========================= */

.btn {
  display: inline-block;
  background: #059669;
  color: white !important;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none !important;
  font-size: 14px;
  transition: 0.2s;
}

.btn:hover {
  background: #047857;
}
.btn-excel {
  background: #16a34a;
}

.btn-excel:hover {
  background: #15803d;
}
a.btn {
  color: white !important;
  text-decoration: none !important;
}
/* =========================
FOOTER FIX FINAL
========================= */

.footer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;

  background: #059669 !important;
  color: white !important;

  text-align: center !important;
  padding: 12px !important;

  font-size: 13px !important;
  z-index: 9999 !important;
}