/* ===== GLOBAL STYLES ===== */
body {
  font-family: sans-serif;
  background-image: url('abstract-flat-background-img.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  padding-top: 60px; /* prevent header overlap */
  text-align: center;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== STATIC CENTERED LOGO (Watermark) ===== */
body::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 250px;
  height: 250px;
  background-image: url('circle logo ss tea.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 45%;
  transform: translate(-50%, -50%);
  z-index: 0;
}

/* ===== FIXED HEADER STYLES ===== */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  padding: 0 25px;
  z-index: 1000;
  gap: 20px; /* gives spacing between logo, links, and profile */
}

/* ===== PROFILE BUTTON ===== */
.profile-btn {
  background: none;
  border: none;
  cursor: pointer;
  height: 40px;
  width: 40px;
  padding: 0;
  margin: 0px 40px; 
}

.profile-btn img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

/* ===== NAVIGATION LINKS ===== */
.header-nav {
  flex-grow: 1;
  text-align: right;
}

.header-nav a {
  margin: 0 10px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.header-nav a:hover {
  color: #007bff;
}

/* ===== LOGO ON RIGHT ===== */
.logo-container {
  height: 45px;
  width: 45px;
}

.logo-container .logo-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ===== CONTAINER STYLES ===== */
.section, .dashboard, .card {
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 15px;
  margin-top: 15px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}

/* ===== HEADER STYLES ===== */
h1, h2 {
  margin-bottom: 10px;
  color: #333;
}

/* ===== DASHBOARD FLEX LAYOUT ===== */
.dashboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 20px;
}

.card {
  flex: 1 1 200px;
  max-width: 220px;
  background-color: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 15px;
  margin: 10px;
  font-size: 1.1em;
  font-weight: bold;
  color: #222;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
  text-align: center;
}

/* ===== BUTTON STYLES ===== */

button {
  cursor: pointer;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-size: 1rem;
  background-color: #eee;
  transition: background 0.2s ease;
}

button:hover {
  background-color: #ccc;
}

/* ===== INPUT & SELECT STYLES ===== */
input, select {
  padding: 10px;
  margin: 5px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 200px;
  max-width: 80%;
  height: 40px;
  box-sizing: border-box;
}

/* ===== LIST STYLES ===== */
ul {
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9f9f9;
  margin: 5px auto;
  padding: 10px;
  border-radius: 6px;
  width: 90%;
  max-width: 400px;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===== SUBHEADINGS FOR POS COLUMNS ===== */
.subheading-row {
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 10px;
}

.subheading-row h3:last-child {
  text-align: left;
  width: 100%;
  padding-left: 10px;
}

/* ===== POS MODULE LAYOUT ===== */
.pos-layout {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.cart-section {
  flex: 0 0 72%;
}

.customer-section {
  flex: 0 0 25%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  justify-content: flex-start;
}

/* ===== SUBHEADINGs ===== */

.cart-section h3 {
  text-align: left;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 5px;
}

.customer-section h3 {
  font-size: 18px;
  margin-bottom: 5px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

/* ===== POS INPUT ROW ===== */
.cart-inputs {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  margin: 15px 0px;
}

.cart-inputs select,
.cart-inputs input,
.cart-inputs button {
  height: 40px;
  font-size: 1rem;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px;
  margin: 5px 0;
}

/* ===== CUSTOMER SECTION INPUTS UNIFORMITY ===== */
.customer-section input,
.customer-section button,
.customer-section select {
  width: 100% !important;
  height: 40px;
  padding: 10px;
  margin: 5px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  max-width: 100%;
}

/* ===== DISTINCT BUTTON COLORS ===== */
.cart-inputs button {
  background-color: #f97316; /* orangish coral */
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  height: 40px;
  padding: 10px;
  box-sizing: border-box;
  transition: background 0.2s ease;
  }
  .cart-inputs button:hover {
    background-color: #ea580c;
  }


.customer-section button.fetch-btn {
  background-color: #0d9488;  /* Dark Teal */
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.customer-section button.fetch-btn:hover {
  background-color: #0f766e; /* Slightly darker teal for hover */
}

.complete-sale-btn {
  background-color: #28a745;
  color: white;
  font-weight: bold;
  height: 45px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.2s ease;
}

.complete-sale-btn:hover {
  background-color: #1e7e34;
}

.orange-btn {
  background-color: #f97316; /* Orange (like Add to Cart) */
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  height: 40px;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.orange-btn:hover {
  background-color: #ea580c; /* Darker orange on hover */
}

/* ===== CART TABLE STYLES ===== */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.cart-table th, .cart-table td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.cart-table th {
  background-color: #007bff;
  color: white;
}

.cart-table td:first-child {
  text-align: left;
}
.cart-table td:not(:first-child) {
  text-align: center;
}

/* ===== CART TOTAL STYLES ===== */

.cart-total-wrapper {
  display: flex;
  justify-content: flex-end;
  padding-right: 30px;
  margin-top: 5px;
}

.cart-total {
  font-weight: bold;
  font-size: 1.2rem;
  text-align: right;
  opacity: 0.85;
  margin: 10px 0;
}

/* ===== TABLE STYLES (Customers & Sales) ===== */

.data-table {
  border-collapse: collapse;
  width: 90%;
  margin: 20px auto;
  font-size: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  text-align: center;
}

.data-table th {
  background-color: #007bff;
  color: white;
  font-weight: bold;
}

.data-table tr:hover {
  background-color: #f1f7ff;
}

.data-table td button {
  padding: 5px;
  font-size: 0.9rem;
  border-radius: 5px;
  background-color: #eee;
  cursor: pointer;
  border: none;
}

.data-table td button:hover {
  background-color: #ccc;
}

/* ===== MEDIA QUERIES FOR MOBILE ===== */

@media (max-width: 768px) {
  .header-nav {
    display: none; /* hide links on smaller screens for now */
  }

  .fixed-header {
    justify-content: space-between;
  }
}

@media (max-width: 600px) {
  .dashboard {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 90%;
    margin-bottom: 10px;
  }

  input, select {
    width: 90%;
  }

  ul li {
    width: 100%;
  }

  .pos-layout {
    flex-direction: column;
  }

  .cart-section,
  .customer-section {
    flex: 100%;
  }

  .cart-total {
    text-align: right;
  }

  .complete-sale-btn {
    width: 100%;
  }

  .subheading-row {
    flex-direction: column;
    align-items: center;
  }

  .subheading-row h3 {
    text-align: center !important;
  }
}