/* --- GLOBAL STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Times New Roman', Times, serif;
}


body {
  font-family: 'Times New Roman', Times, serif;
  background: #f0f2f5;
  color: #333;
  line-height: 1.6;
}

h1 {
  color: black;
}

label {
  color: white;
}
h2{
  color: black;
}

h3 {
  color: #fbfbfb;
}

/* ---------- LAYOUT ---------- */
.app-container {
  display: flex;
  min-height: 100vh;
  background: #090909;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  width: 240px;
  background: black;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px;
  box-shadow: 2px 0 10px rgba(41, 40, 40, 0.15);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
}

.logo-section {
  text-align: center;
  margin-bottom: 30px;
}

.sidebar-logo {
  width: 200px;
  height: 100px;
  border-radius: 100%;
  background: transparent;
  object-fit: contain;
  margin-bottom: 10px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.sidebar-nav .tab-btn {
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  padding: 12px 15px;
  border-radius: 8px;
  text-align: left;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.sidebar-nav .tab-btn:hover {
  background: rgba(231, 215, 215, 0.788);
}

.sidebar-nav .tab-btn.active {
  background: white;
  color: #0d6efd;
  font-weight: 600;
}

/* ---------- SIDEBAR FOOTER (BOTTOM LEFT) ---------- */
.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 15px;
  border-top: 1px solid rgba(255,255,255,0.2);
  justify-content: flex-start;
}

.footer-logo {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: transparent;
  object-fit: contain;
  box-shadow: 0 0 8px rgba(108, 104, 104, 0.3);
}

.powered-text {
  font-size: 0.35rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.2;
  font-family: 'Poppins', sans-serif;
  text-align: left;
}

.powered-text span {
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.4px;
}


/* ---------- MAIN CONTENT ---------- */
.main-content {
  margin-left: 260px;
  padding: 20px;
  flex: 1;
}

.top-header {
  background: black;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.top-header h1 {
  margin: 0;
  color: rgb(148, 147, 147);
  font-size: 1.6em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar {
    width: 70px;
  }

  .sidebar-nav .tab-btn {
    font-size: 0;
    justify-content: center;
  }

  .sidebar-nav .tab-btn::before {
    font-size: 1.4rem;
    margin: 0;
  }

  .main-content {
    margin-left: 80px;
    padding: 15px;
  }

  .logo-section h2 {
    display: none;
  }

  .sidebar-logo {
    width: 40px;
    height: 40px;
  }
}



/* --- HEADER & NAV --- */

header {
  background: #1f2937;
  color: #fff;
  padding: 20px 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

header h1 {
  margin-bottom: 10px;
  font-size: 1.8rem;
  color: white;
}


nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

nav button {
  background: #374151;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

nav button:hover {
  background: #2563eb;
}

nav button.active {
  background: #2563eb;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}


/* --- PRODUCT PAGE TABLE HEADERS --- */
.chip-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background: #829efa; /* light blue header */
  font-weight: 600;
  border-radius: 8px;
  margin-bottom: 5px;
}

.chip-header span {
  flex: 1;
  text-align: left;
}

/* Adjust action column width */
.chip-header .header-action {
  flex: 0 0 80px;
}

/* Adjust chip list items to match header layout */
#chipList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#chipList li span {
  flex: 1;
}

#chipList li button {
  flex: 0 0 80px;
}


/* --- MAIN SECTION --- */
main {
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 10px;
}

/* --- TABS --- */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

/* --- CARD STYLE --- */
section {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

/* --- FORM --- */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

form input, form select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  flex: 1 1 200px;
  font-size: 1rem;
}

form button {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

form button:hover {
  background: #1d4ed8;
}

/* --- BUTTONS --- */
button {
  transition: all 0.2s ease;
}

button:hover {
  opacity: 0.9;
}

/* --- LISTS --- */
ul {
  list-style: none;
  padding: 0;
}

li {
  background:  #f6f9fb;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

li button {
  background: #ef4444;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

li button:hover {
  background: #b91c1c;
}

/* --- DASHBOARD SUMMARY --- */
#summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

#summary p {
  flex: 1 1 200px;
  background:  #829efa;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
}

.breakdown-table {
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #d1d5db;
}

.breakdown-header, .breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background: #829efa;
  font-weight: 600;
}

.breakdown-row {
  background: #c9e4f7;
  font-weight: 500;
}

.breakdown-row:nth-child(even) {
  background: #f9fbfe;
}

#breakdown p {
  margin-bottom: 8px;
  background: #e7fdee;
  padding: 10px;
  border-radius: 8px;
}


/* --- SALES INPUTS --- */
#chipsContainer div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eff7ff;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 8px;
}

#chipsContainer input {
  width: 80px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

/*Inventory table*/

#inventoryList li {
  text-align: center;
}

#inventoryList li span {
  flex: 1;
}

#inventoryList li button {
  flex: 0 0 80px;
}



/* --- PRINT BUTTON & SELECT --- */
#reportRange, #printReportBtn, #resetDashboardBtn {
  margin-top: 10px;
  margin-bottom: 10px;
}

#reportRange {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  nav {
    flex-direction: column;
  }

  form {
    flex-direction: column;
  }

  #summary {
    flex-direction: column;
  }

  #chipsContainer div {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* --- SETTINGS PAGE --- */
.settings-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.settings-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(5, 5, 5, 0.1);
  flex: 1 1 250px;
}

.settings-card h3 {
  margin-bottom: 10px;
  color: #0a1e48;
}

.settings-card p {
  margin-bottom: 15px;
  color: #555;
}

.settings-card button {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

#resetDailyBtn {
  background: #fbbf24; /* yellow */
  color: #111;
}

#resetDailyBtn:hover {
  background: #f59e0b;
}

#resetProgramBtn {
  background: #ef4444; /* red */
  color: white;
}

#resetProgramBtn:hover {
  background: #b91c1c;
}

/* --- TOGGLE SWITCH --- */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2563eb;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Info Bot Container */
#infoBotContainer {
  background: transparent;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

/* Toggle Button */
#infoBotToggle {
  background: black;
  color: rgb(249, 249, 249);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(61, 61, 61, 0.2);
}

/* Bot Panel */
.info-bot {
  width: 250px;
  max-height: 350px;
  background: #2563eb;
  color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(63, 63, 63, 0.2);
  padding: 15px;
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  overflow-y: auto;
}

/* Hidden by default */
.hidden {
  display: none;
}

#botMessages p {
  background: rgb(248, 248, 248);
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

#botInput {
  padding: 6px;
  border-radius: 6px;
  border: none;
  margin-bottom: 5px;
}

#botSend {
  background: #fbbf24;
  color: #111;
  border: none;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #infoBotContainer { right: 5%; bottom: 10px; }
  .info-bot { width: 90%; }
}
