/* Reset dasar */



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}
body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: #e0f7fa;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Login form */
.login-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.login-box {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 320px;
}
.login-box h2 {
  margin-bottom: 1rem;
  color: #00796b;
  text-align: center;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 500;
}
.form-group input {
  width: 100%;
  padding: .6rem;
  border: 1px solid #b2dfdb;
  border-radius: 4px;
}
.captcha-text {
  margin: .5rem 0;
  font-size: 1.2rem;
  letter-spacing: 4px;
  text-align: center;
  background: #fbf3c3;
  padding: .5rem;
  border-radius: 4px;
  user-select: none;
}
.btn-submit {
  width: 100%;
  padding: .75rem;
  border: none;
  background: #00796b;
  color: #fff;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
}
.btn-submit:disabled {
  background: #80cbc4;
  cursor: not-allowed;
}

/* Header & Nav */
.site-header {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
  position: relative; /* untuk dropdown menu */
}
.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: #00796b;
  margin-right: auto;
}
.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}
.nav-menu a {
  padding: .5rem 1rem;
  border-radius: 4px;
}
.nav-menu a.active,
.nav-menu a:hover {
  background: #00796b;
  color: #fff;
}

/* Toggle-hamburger default hide */
.nav-toggle {
  display: none;
}

/* Content area */
.content {
  flex: 1;
  padding: 1rem;
  background: #fff;
  margin: 1rem;
  border-radius: 8px;
  overflow: visible;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: .5rem;
  background: #fff;
}

/* Responsif umum */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-menu ul {
    flex-wrap: wrap;
  }
}

/* ================================================================= */
/* PRODUK.PHP STYLES (scoped hanya di dalam .content)               */
/* ================================================================= */
.content .container {
  display: flex;
  min-height: 100vh;
  position: relative;
}
.content .toggle-form {
  display: none;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: #4a90e2;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
}
.content .left-side {
  flex: 0 0 40%;
  padding: 1rem;
  background: #f7faff;
  border-right: 1px solid #ddd;
}
.content .left-side h2 {
  margin-bottom: 1rem;
  color: #4a90e2;
}
.content .item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.content .thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 0.75rem;
}
.content .info h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.content .info p {
  font-size: 0.9rem;
  color: #555;
}
.content .right-side {
  flex: 0 0 60%;
  padding: 1rem;
  background: #ffffff;
  transition: transform 0.3s ease;
}
.content .right-side h2 {
  margin-bottom: 1rem;
  color: #4a90e2;
}
.content .right-side form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.content .right-side label {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
}
.content .right-side input[type="text"],
.content .right-side input[type="number"],
.content .right-side input[type="file"] {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.content .file-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.content .camera-btn {
  padding: 0.5rem;
  border: none;
  background: #4a90e2;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.content .submit-btn {
  padding: 0.75rem;
  border: none;
  background: #4a90e2;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.content .error {
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #ffe5e5;
  color: #b00;
  border-radius: 4px;
}
@media (max-width: 768px) {
  .content .container {
    flex-direction: column;
    min-height: auto;
  }
  .content .toggle-form {
    display: block;
    bottom: 4rem;
  }
  .content .left-side {
    order: 1;
  }
  .content .right-side {
    order: 2;
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: #ffffff;
    transform: translateX(100%);
    z-index: 9;
    overflow-y: auto;
  }
  .content .right-side.show {
    transform: translateX(0);
  }
}

/* ================================================================= */
/* Hamburger menu untuk main.php (mobile)                            */
/* ================================================================= */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #00796b;
    cursor: pointer;
    z-index: 100;
  }
  .site-header .nav-menu ul {
    display: none;
  }
  .site-header .nav-menu ul.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 90;
  }
  .site-header .nav-menu ul.show li {
    border-bottom: 1px solid #eee;
    margin: 0;
  }
}

/* Scanner Container (QuaggaJS) */
#scanner-container {
  display: none;
  width: 100%;
  height: 100px;
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid #ccc;
  border-radius: 4px;
}
#scanner-container video,
#scanner-container canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* ================================================================= */
/* KASIR.PHP STYLES                                                  */
/* ================================================================= */
/* box-sizing untuk semua elemen di kasir */
.kasir-container, .kasir-container * {
  box-sizing: border-box;
}
/* Layout utama */
.kasir-container {
  display: flex;
  min-height: calc(100vh - 120px); /* sisakan header/footer */
}
/* Sidebar (Left Side) */
.kasir-sidebar {
  flex: 0 0 40%;
  background: #f7faff;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

/* SEARCH BAR DI KASIR.PHP */
.kasir-search {
  padding: 0.5rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid #ddd;
}
.kasir-search input#prod-search {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  outline: none;
}
.kasir-search input#prod-search:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
}


.kasir-sidebar h2 {
  margin-bottom: 1rem;
  color: #4a90e2;
  font-size: 1.25rem;
}
.kasir-list {
  flex: 1;
  overflow-y: auto;
}
.kasir-item {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}
.kasir-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 0.75rem;
}
.kasir-info strong {
  display: block;
  margin-bottom: 0.25rem;
}
.kasir-info span {
  color: #555;
  font-size: 0.9rem;
}
.kasir-variants {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  z-index: 5;
  max-height: 200px;
  overflow-y: auto;
}
.kasir-variant {
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
}
.kasir-variant:last-child {
  border-bottom: none;
}
#checkout-btn {
  margin-top: 1rem;
  padding: 0.75rem;
  border: none;
  background: #4a90e2;
  color: #fff;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}
#checkout-btn:disabled {
  background: #aacbe8;
  cursor: not-allowed;
}
/* Main (Right Side) */
.kasir-main {
  flex: 1;
  padding: 1rem;
  background: #fff;
  display: none; /* tersembunyi di mobile default */
}
/* Toggle button for mobile */
.kasir-toggle {
  display: none;
}
/* Responsif Mobile */
@media (max-width: 768px) {
  .kasir-container {
    flex-direction: column;
  }
  .kasir-sidebar {
    width: 100%;
  }
  .kasir-main {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 9;
    overflow-y: auto;
  }
  .kasir-main.show {
    transform: translateX(0);
  }
  .kasir-toggle {
    display: block;
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 50%;
    background: #4a90e2;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
  }
}


/* Modal overlay */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  width: 90%;
  max-width: 400px;
}
.modal h3 {
  margin-bottom: .5rem;
}
.modal ul {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: .5rem;
}
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: .5rem;
}
.modal-buttons button {
  padding: .5rem 1rem;
  border: none;
  background: #4a90e2;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.modal-buttons button:last-child {
  background: #aaa;
}






