/* Breakdown Type Tabs */
.breakdown-type-tabs {
  display: flex;
  gap: 0.7em;
  margin-bottom: 0.5em;
}
.breakdown-type-btn {
  background: #f5f7fa;
  color: #007bff;
  border: 1px solid #cce0ff;
  border-radius: 6px;
  padding: 0.5em 1.3em;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.breakdown-type-btn.active, .breakdown-type-btn:focus {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}
.breakdown-type-btn:hover:not(.active) {
  background: #e6f0ff;
  color: #0056b3;
}

/* Per Kilo Breakdown Table */
.breakdown-kilo-table .breakdown-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.95em;
}
.breakdown-kilo-table thead {
  background: linear-gradient(135deg,#007bff 0%, #0056b3 100%);
  color: white;
}
.breakdown-kilo-table th, .breakdown-kilo-table td {
  padding: 0.7em 0.8em;
  border-bottom: 1px solid #eee;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breakdown-kilo-table th {
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: 0.01em;
}
.breakdown-kilo-table tr:hover td {
  background: #f5f7fa;
}
.breakdown-kilo-table .no-data {
  text-align: center;
  color: #888;
  font-style: italic;
}
/* Make all .form-input fields (input, select) visually consistent */
.form-input, .form-input.search-input, select.form-input {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.6em 1em;
  font-size: 1em;
  background: #fff;
  transition: border-color 0.2s;
  box-sizing: border-box;
  outline: none;
  height: 44px;
  appearance: none;
}
.form-input:focus, select.form-input:focus {
  border-color: #007bff;
}
.form-input::-webkit-input-placeholder {
  color: #888;
  opacity: 1;
}
.form-input:-ms-input-placeholder {
  color: #888;
  opacity: 1;
}
.form-input::placeholder {
  color: #888;
  opacity: 1;
}
select.form-input {
  background: #fff url('data:image/svg+xml;utf8,<svg fill="%23666" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 0.8em center/1.2em 1.2em;
  padding-right: 2.5em;
}
/* ============ Global Styles ============ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(180deg, #fefcf6 0%, #f4f6f8 100%);
  color: #333;
  font-family: quicksand, sans-serif;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}
 main{
    flex: 1;
 }

 /* --- Catalog Page Specific Styles --- */
 body.catalog-page {
  background: url('../images/bgWeb.jpg') no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
}

body.catalog-page main {
  background-color: rgba(255, 165, 0, 0.6);
  backdrop-filter: blur(4px);            /* soft blur effect */
  padding: 2em;
  border-radius: 10px;
}

/* --- Header --- */
header {
  background: whitesmoke;
  color: #fff;
  padding: 1em 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .nav-link {
  position: relative;
  font-size: 1.3em;
  display: inline-block;
  padding: 0.6em 1.2em;
  color: black;
  text-decoration: none;
  border-radius: 6px;
  overflow: hidden;
  z-index: 1;
}

header .nav-link::before {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: orange;
  transition: top 0.3s ease;
  z-index: -1;
}

header nav {
  padding-right: 3.5em; /* reduce right spacing */
  padding-left: 2em;    /* add left spacing */
}

header .nav-link:hover {
  color: black;
}

header .nav-link:hover::before {
  top: 0;
}

/* --- Logo --- */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 1.5em;
  font-weight: bold;
  color: #fff;
}

.logo img {
  height: 60px;
  width: auto;
  border-radius: 6px;
  transition: transform 0.3s ease; /* smoother in and out */
}

.logo img:hover {
  transform: scale(1.05); /* zooms slightly */
}

/* --- Footer --- */
footer {
  background: whitesmoke;
  color: black;
  padding: 2em;
  font-size: 0.95em;
  text-align: center;
}

footer .footer-contact h3 {
  margin-bottom: 1em;
  font-weight: 500;
}

footer .contact-grid {
  font-weight: bold;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8em;
  margin-bottom: 1.5em;
  justify-items: center;
}

footer .contact-grid div {
  padding: 0.5em 1em;
  border-radius: 8px;
}

footer .contact-grid div span {
  color: orange; /* orange highlight */
  font-weight: 600;
}

footer .footer-copy {
  border-top: 1px solid #444;
  padding-top: 1em;
  font-size: 0.85em;
}

.admin-corner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #ff6600;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  text-decoration: none;
}

.admin-corner:hover {
  background-color: #e65c00;
  transform: translateY(-2px);
}

/* Responsive tweak */
@media (max-width: 480px) {
  .admin-corner {
    width: 44px;
    height: 44px;
    font-size: 20px;
    bottom: 16px;
    right: 16px;
  }
}

/* --- Hero Banner --- */
.hero-banner {
  background-image: url('../images/bgWeb.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 6em 2em;
  text-align: center;
  border-radius: 0;
  margin: 0;
  max-width: none;
  width: 100%;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

/* Overlay for readability */
.hero-banner .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4); /* darkens image */
  z-index: 1;
}

/* Content sits above overlay */
.hero-banner .hero-content {
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

/* Simple fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  filter: blur(6px);                 /* blur the background */
  z-index: 0;
}

.hero-banner::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.3); /* white tint overlay */
  z-index: 0;
}

.hero-title {
  font-size: 3em;
  color: #fff;
  display: flex;              /* puts text + logo inline */
  align-items: center;        /* vertically centers them */
  gap: 0.4em;                 /* spacing between text and logo */
  justify-content: center;    /* centers whole heading */
}

.hero-title img {
  height: 80px;               /* adjust logo size */
  width: auto;
  vertical-align: middle;
}

.hero-banner h2 {
  font-size: 3em;
  margin-bottom: 0.5em;
}

.hero-banner p {
  font-size: 1.4em;
  margin-bottom: 2em;
  color: #f0f0f0;
}

.hero-banner .btn {
  padding: 1em 2.5em;
  font-size: 1.1em;
}

.hero-banner .btn:hover {
  background-color: #e65c00;
  transform: translateY(-3px);
}

#most-viewed h2 {
  text-align: center;
  font-size: 2.5em;
  margin-bottom: 1em;
  color: #333;
}

#most-viewed .book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5em;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 1em 2.5em;
  font-size: 1.1em;
  background-color: #ff6600; /* orange accent */
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease;
}

.btn:hover {
  background-color: #e65c00; /* darker orange on hover */
  transform: translateY(-3px);
}

/* --- About Us Section --- */
#about {
  padding: 4em 2em;
  background-color: rgba(255, 165, 0, 0.6);
    backdrop-filter: blur(4px);
  color: #333;
  text-align: center;
}

#about h2 {
  font-size: 2.2em;
  margin-bottom: 0.8em;
  color: white; /* matches header gradient */
}

#about p {
  font-size: 1.1em;
  margin-bottom: 1em;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

#about p strong {
  color: white; /* highlight location label */
}

/* --- Map Container --- */
.map-container {
  width: 100%;
  max-width: 900px;
  height: 400px;
  margin: 2em auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .hero-banner h2 {
    font-size: 2em;
  }

  .hero-banner p {
    font-size: 1em;
  }
}

/* catalog page */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5em;
  padding: 1em;
}

.book-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  padding-bottom: 1em;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.book-card img {
  display: block;
  margin: 0 auto;
  width: 200px; /* or your preferred size */
  height: auto;
  object-fit: cover;
  border-radius: 6px;
}

.book-card h3 {
  font-size: 1.2em;
  margin: 0.5em 1em 0;
  color: black;
}

.book-card p {
  margin: 0.3em 1em 0.3em;
  color: #555;
  font-size: 0.95em;
}

/* Price styling */
.book-card .price {
  font-weight: 600;
  color: #ff6600;
  margin: 0.5em 1em;
  font-size: 1em;
}

/* Subcategory styling */
.book-card .subcategory {
  font-size: 0.85em;
  color: #888;
  margin: 0 1em 0.3em;
}

/* Description styling */
.book-card .description {
  font-size: 0.9em;
  color: #666;
  margin: 0.5em 1em;
  line-height: 1.3em;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* show max 4 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-title {
  color: white;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  font-size: 2.5em;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1em;
  position: relative;
  z-index: 2;
}

#modal-img {
  width: 200px;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
}

.catalog-title::after {
  content: "";
  display: block;
  width: 3.8em;
  height: 4px;
  background-color: black;
  margin: 0.5em auto 0;
  border-radius: 2px;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .book-card img {
    height: 180px;
  }
}

/* --- Modal Styles --- */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  overflow: auto;
}

.modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  max-width: 800px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.modal-body {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.modal-body img {
  width: 200px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.details p {
  margin: 0;
  font-size: 15px;
}

.close-btn {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

/* --- Admin Login Page Specific Styles --- */
body.admin-login-page {
  background: url('../images/bgWeb.jpg') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 100vh;
}

body.admin-login-page::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4); /* dark semi-transparent overlay */
  backdrop-filter: blur(2px);      /* optional soft blur */
  z-index: 0;
}

body.admin-login-page main {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

body.admin-login-page form#admin-login-form {
  width: 100%;
  max-width: 420px;
  background: #fff;
  padding: 40px 32px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  text-align: center;
}

body.admin-login-page form#admin-login-form h2 {
  font-size: 28px;
  margin-bottom: 24px;
  color: #222;
}

body.admin-login-page form#admin-login-form input[type="text"],
body.admin-login-page form#admin-login-form input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}

body.admin-login-page form#admin-login-form button[type="submit"] {
  width: 100%;
  padding: 14px;
  font-size: 18px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

body.admin-login-page form#admin-login-form button[type="submit"]:hover {
  background-color: #0056b3;
}

body.admin-login-page form#admin-login-form a {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  color: #007bff;
  text-decoration: none;
}

body.admin-login-page form#admin-login-form a:hover {
  text-decoration: underline;
}

/* --- Responsive Adjustments --- */
@media (max-width: 480px) {
  body.admin-login-page form#admin-login-form {
    padding: 24px 20px;   /* smaller padding */
    max-width: 90%;       /* shrink form width */
  }

  body.admin-login-page form#admin-login-form h2 {
    font-size: 22px;      /* smaller heading */
    margin-bottom: 16px;
  }

  body.admin-login-page form#admin-login-form input[type="text"],
  body.admin-login-page form#admin-login-form input[type="password"] {
    font-size: 14px;      /* smaller input text */
    padding: 12px;
  }

  body.admin-login-page form#admin-login-form button[type="submit"] {
    font-size: 16px;      /* smaller button text */
    padding: 12px;
  }
}

/* Admin Dashboard Layout */

body.dashboard {
  margin: 0;
  height: 100vh;
  background: #f5f7fa;
}

.layout {
  display: flex;
  width: 100%;
  height: 100vh;
}

.sidebar {
  width: 220px;
  background: linear-gradient(to right, orange ,#FF8C00 );
  padding: 20px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  transform: translateX(0);
  transition: transform 0.3s ease;
  z-index: 100;
}

.sidebar.hidden {
  transform: translateX(-220px);
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin: 8px 0;
}

.sidebar a {
  color: white;
  font-weight: bold;
  text-decoration: none;
}

.sidebar a:hover {
  text-decoration: underline;
}

.sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.sidebar-footer .btn.logout-btn {
  width: 100%;
  text-align: center;
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar.collapsed a {
  font-size: 0;
}

.sidebar.collapsed a::before {
  content: "•";
  font-size: 1.2em;
}

.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  margin-left: 220px;
  transition: margin-left 0.3s ease;
}

.sidebar.hidden ~ .main-content {
  margin-left: 0;
}

.dashboard-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.dashboard-header h2 {
  text-align: center;
  margin: 0;
  font-size: 1.5em;
  color: #2c3e50;
}

.admin-menu-btn {
  background: orange;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2em;
  line-height: 1;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-menu-btn:hover {
  background: #e65c00;
}

.btn {
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.btn.blue {
  background: #3498db;
  color: #fff;
}

.btn.logout-btn {
  background: #e74c3c;
  color: #fff;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 24px;
}

.card {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.actions {
  margin: 20px 0;
  display: flex;
  gap: 10px;
}

.alert-box {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 10px 15px;
  margin-bottom: 15px;
  border-radius: 6px;
  font-size: 14px;
}

/* Purchase order alerts */
.purchase-orders-alerts .section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:0.5em; }
.purchase-orders-alerts .section-header h3 { margin:0; font-size:1.05em; }
.purchase-orders-alerts .section-header .btn { padding:0.3em 0.6em; font-size:0.9em; }
.po-alert {
  background: linear-gradient(90deg, #fff7e6, #fff);
  border-left: 4px solid #ffc107;
  padding: 0.6em 0.9em;
  margin-bottom: 0.5em;
  border-radius: 6px;
  color: #333;
  font-weight: 600;
}
.po-alert .link {
  margin-left: 0.5em;
  color: #0d6efd;
  text-decoration: none;
}
.po-list-small ul { margin: 0.4em 0 0 1.1em; padding: 0; }
.po-list-small li { margin-bottom: 0.45em; color:#444; }
.no-alerts { color: #6c757d; font-style: italic; }

/* Stock Counter Styles */

.stock-counter {
  margin: 30px 0;
}

.stock-counter h3 {
  margin-bottom: 20px;
  font-size: 1.3em;
}

.stock-counter-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 20px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stock-counter-grid .card {
  flex: 1;
  text-align: center;
  padding: 15px 10px;
  border-right: 1px solid #ddd;
  box-shadow: none;
  background: transparent;
  font-size: 0.95em;
}

.stock-counter-grid .card:last-child {
  border-right: none;
}

.stock-counter-grid .card strong {
  font-size: 2em;
  display: block;
  margin-top: 5px;
}

/* Restock Modal Styles */
.restock-hidden {
  display: none;
}

.restock-modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  text-align: center;
}

#restockModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: none; /* default hidden */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#restockModal.show {
  display: flex; /* only when visible */
}

#restockTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  font-size: 0.95em;
}

#restockTable th,
#restockTable td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

#restockTable th {
  background-color: #f5f5f5;
  font-weight: 600;
  color: #333;
}

#restockTable tr:nth-child(even) {
  background-color: #fafafa;
}

#restockTable tr:hover {
  background-color: #f0f0f0;
}

/* Error Logs Styles */

.errors {
  margin-top: 30px;
}

.errors ul {
  list-style: none;
  padding: 0;
}

.error-container {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.errors li {
  background: #fff;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#loadMoreLogs {
  margin-top: 10px;
  display: block;
  width: 100%;
  text-align: center;
}

/* Header and Sidebar Responsive */

@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  header nav a {
    margin: 0.5em;
  }

  .hero-banner h2 {
    font-size: 2em;
  }

  .hero-banner p {
    font-size: 1.1em;
  }

  .book-card img {
    height: 200px;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    transform: translateX(-220px);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

/* Inventory page layout */

.inventory-main-content {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
  background-color: #fdfdfd;
}

/* Header */
.inventory-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.inventory-title {
  flex: 1;
  text-align: center;
  font-size: 28px;
  margin: 0;
  color: #333;
}

.inventory-spacer {
  flex: 1;
}

/* Back link */
li a {
  display: inline-block;
  margin: 10px 20px;
  font-size: 16px;
  color: #0077cc;
  text-decoration: none;
}
li a:hover {
  text-decoration: underline;
}

/* Filter controls */
.inventory-controls {
  flex: 1;
  text-align: left;
}

.inventory-controls label {
  font-weight: 600;
  margin-right: 10px;
}

#categoryFilter {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* Table styling */

.inventory-list {
  width: 100%;
  max-width: 1000px;
  margin: auto;
  min-height: 400px; /* ensures consistent height even before data loads */
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  padding: 10px;
}

.inventory-list table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}

.inventory-list th,
.inventory-list td {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  text-align: left;
  word-wrap: break-word;
}

.inventory-list th {
  background-color: #f5f5f5;
  font-weight: 600;
  color: #333;
}

.inventory-list tr:hover {
  background-color: #f9f9f9;
}

.action-buttons {
  display: flex;
  gap: 8px; /* controls space between buttons */
  flex-wrap: wrap;
  justify-content: center;
}

.edit-btn,
.delete-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease;
}

.edit-btn {
  background-color: #FFA500;
  color: white;
}

.delete-btn {
  background-color: #FF4C4C;
  color: white;
}

.edit-btn:hover {
  background-color: #e69500;
}

.delete-btn:hover {
  background-color: #cc3333;
}

/* Quick Edit Modal */

.quick-edit-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000; /* ensures it floats above everything */
}

.quick-edit-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  width: 400px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.quick-edit-content form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-edit-content label {
  font-weight: 600;
  margin-bottom: 4px;
}

.quick-edit-content input {
  padding: 8px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.quick-edit-content h3 {
  margin-bottom: 16px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
  text-align: center;
}

.quick-edit-content select {
  width: 100%;
  padding: 8px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  appearance: none; /* removes default browser arrow */
  cursor: pointer;
}

.quick-edit-content select:focus {
  border-color: #4CAF50;
  outline: none;
  box-shadow: 0 0 4px rgba(76, 175, 80, 0.5);
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.7rem;
  color: #666;
}

.quick-edit-content .save-btn,
.quick-edit-content .close-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.quick-edit-content .save-btn {
  background-color: #4CAF50;
  color: white;
}

.quick-edit-content .close-btn {
  background-color: #ccc;
  color: #333;
}

.quick-edit-content .modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Tooltip for full author name */
.inventory-list td[title] {
  cursor: help;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .inventory-header {
    flex-direction: column;
    gap: 10px;
  }

  .inventory-spacer {
    display: none;
  }

  .inventory-controls {
    order: 2;
    width: 100%;
  }

  .inventory-title {
    order: 1;
  }
}

/* --- Manage Employees Page Styles --- */
.employees-layout {
  display: flex;
  min-height: 100vh;
}

.employees-main-content {
  flex: 1;
  padding: 2em;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.employees-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2em;
  flex-wrap: wrap;
  gap: 1em;
}

.employees-header h2 {
  font-size: 2.2em;
  color: #333;
}

.add-employee-btn {
  padding: 0.8em 1.5em;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-employee-btn:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

/* Employee Cards Grid */
.employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5em;
  margin-bottom: 2em;
}

.employee-card {
  background: white;
  border-radius: 12px;
  padding: 1.5em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  position: relative;
}

.employee-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.employee-card-header {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 1em;
}

.employee-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5em;
  font-weight: bold;
}

.employee-info h3 {
  font-size: 1.3em;
  color: #333;
  margin-bottom: 0.2em;
}

.employee-role {
  color: #666;
  font-size: 0.95em;
}

.employee-id {
  color: #007bff;
  font-size: 0.85em;
  font-weight: 600;
  margin-top: 0.2em;
}

.employee-details {
  margin: 1em 0;
  padding: 1em 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.employee-detail-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5em;
  font-size: 0.95em;
}

.employee-detail-item strong {
  color: #555;
}

.employee-actions {
  display: flex;
  gap: 0.8em;
  margin-top: 1em;
  flex-wrap: wrap;
}

.edit-btn, .delete-btn, .reset-password-btn {
  flex: 1;
  min-width: 120px;
  padding: 0.6em 1em;
  border: none;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.edit-btn {
  background-color: #007bff;
  color: white;
}

.edit-btn:hover {
  background-color: #0056b3;
}

.reset-password-btn {
  background-color: #ff9800;
  color: white;
}

.reset-password-btn:hover {
  background-color: #f57c00;
}

.delete-btn {
  background-color: #dc3545;
  color: white;
}

.delete-btn:hover {
  background-color: #c82333;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
  overflow-y: auto;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 2em;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5em;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 1em;
}

.modal-header h3 {
  font-size: 1.8em;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1em;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0.3em 0.5em;
  width: auto;
  height: auto;
}

.close-btn:hover {
  color: #333;
}

/* Scoped: make the employee modal close button a small square */
#employeeModal .close-btn,
#closeModal {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 6px;
  background-color: #6c757d;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  border: none;
}

#employeeModal .close-btn:hover,
#closeModal:hover {
  background-color: #5a6268;
  transform: none;
  box-shadow: none;
}

.form-group {
  margin-bottom: 1.2em;
}

.form-group label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.8em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #007bff;
}

.form-actions {
  display: flex;
  gap: 1em;
  margin-top: 2em;
}

.submit-btn, .cancel-btn {
  flex: 1;
  padding: 0.9em 1.5em;
  border: none;
  border-radius: 8px;
  font-size: 1.05em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn {
  background-color: #28a745;
  color: white;
}

.submit-btn:hover {
  background-color: #218838;
}

.cancel-btn {
  background-color: #6c757d;
  color: white;
}

.cancel-btn:hover {
  background-color: #5a6268;
}

/* Search and Filter */
.employees-controls {
  display: flex;
  gap: 1em;
  margin-bottom: 2em;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
}

.search-box input {
  width: 100%;
  padding: 0.8em 1em;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
}

.filter-box {
  min-width: 200px;
}

.filter-box select {
  width: 100%;
  padding: 0.8em 1em;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  background-color: white;
}

.no-employees {
  text-align: center;
  padding: 3em;
  color: #666;
  font-size: 1.2em;
}

.back-link {
  display: inline-block;
  padding: 0.6em 1.2em;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 1em;
  transition: all 0.3s ease;
}

.back-link:hover {
  transform: translateX(-3px);
}

.status-badge {
  display: inline-block;
  padding: 0.3em 0.8em;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
}

.status-active {
  background-color: #d4edda;
  color: #155724;
}

.status-inactive {
  background-color: #f8d7da;
  color: #721c24;
}

/* --- Reset Password Page Styles --- */
.reset-password-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2em;
}

.reset-password-card {
  background: white;
  border-radius: 16px;
  padding: 3em;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reset-password-card h2 {
  font-size: 2em;
  color: #333;
  margin-bottom: 0.5em;
  text-align: center;
}

.reset-password-card p {
  color: #666;
  text-align: center;
  margin-bottom: 2em;
  line-height: 1.6;
}

.reset-password-card .form-group {
  margin-bottom: 1.5em;
}

.reset-password-card .form-group label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: #333;
}

.reset-password-card .form-group input {
  width: 100%;
  padding: 0.9em;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  transition: all 0.3s ease;
}

.reset-password-card .form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.reset-password-card .form-group input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.password-requirements {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.5em;
}

.password-requirements ul {
  margin: 0.5em 0 0 1.5em;
  padding: 0;
}

.password-requirements li {
  margin-bottom: 0.3em;
}

.reset-password-card .reset-btn {
  width: 100%;
  padding: 1em;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1em;
}

.reset-password-card .reset-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.reset-password-card .reset-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.back-to-login {
  text-align: center;
  margin-top: 2em;
}

.back-to-login a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.back-to-login a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.reset-password-card .message {
  padding: 1em;
  border-radius: 8px;
  margin-bottom: 1.5em;
  text-align: center;
  font-weight: 500;
}

.reset-password-card .message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.reset-password-card .message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.reset-password-card .message.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.logo-header {
  text-align: center;
  margin-bottom: 2em;
}

.logo-header img {
  width: 80px;
  height: auto;
  margin-bottom: 1em;
}

.password-match-indicator {
  font-size: 0.85em;
  margin-top: 0.5em;
  padding: 0.5em;
  border-radius: 4px;
}

.password-match-indicator.match {
  color: #155724;
  background-color: #d4edda;
}

.password-match-indicator.no-match {
  color: #721c24;
  background-color: #f8d7da;
}

/* --- Delivery Page Styles --- */
.delivery-layout {
  display: flex;
  min-height: 100vh;
}

.delivery-main-content {
  flex: 1;
  padding: 2em;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.delivery-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5em;
}

.btn-add-delivery {
  background: #28a745;
  color: white;
  border: none;
  padding: 0.8em 1.5em;
  font-size: 1em;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(40, 167, 69, 0.2);
}

.btn-add-delivery:hover {
  background: #218838;
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  transform: translateY(-2px);
}

.back-link {
  display: inline-block;
  font-size: 1em;
  color: #0077cc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #005fa3;
  text-decoration: underline;
}

/* Step Indicator */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5em;
  padding: 1.5em;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  position: relative;
}

.step-number {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1em;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background-color: #007bff;
  color: white;
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
}

.step.completed .step-number {
  background-color: #28a745;
  color: white;
}

.step.completed .step-number::after {
  content: "✓";
  font-size: 1.2em;
}

.step-label {
  font-size: 0.9em;
  color: #6c757d;
  font-weight: 500;
  text-align: center;
}

.step.active .step-label {
  color: #007bff;
  font-weight: 600;
}

.step.completed .step-label {
  color: #28a745;
}

.step-divider {
  width: 100px;
  height: 2px;
  background-color: #e9ecef;
  margin: 0 1em;
  margin-bottom: 1.5em;
}

.step.completed ~ .step-divider {
  background-color: #28a745;
}

/* Step Sections */
.step-section {
  display: none;
}

.step-section.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delivery-header,
.stock-header {
  margin-bottom: 1.5em;
}

.delivery-header h2,
.stock-header h2 {
  font-size: 2.2em;
  color: #333;
  margin: 0;
}

.delivery-section,
.detailed-stock-section {
  background: white;
  border-radius: 12px;
  padding: 2em;
  margin-bottom: 2em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.delivery-form,
.stock-form {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5em;
}

.delivery-section .form-group,
.detailed-stock-section .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.delivery-section .form-group label,
.detailed-stock-section .form-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.95em;
}

.delivery-section .form-input,
.detailed-stock-section .form-input {
  padding: 0.75em 1em;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  background-color: white;
  transition: all 0.3s ease;
}

.delivery-section .form-input:focus,
.detailed-stock-section .form-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.delivery-section .form-input[readonly],
.detailed-stock-section .form-input[readonly] {
  background-color: #f8f9fa;
  cursor: not-allowed;
  color: #666;
}

.form-actions {
  display: flex;
  gap: 1em;
  margin-top: 1.5em;
}

.btn-confirm {
  padding: 0.8em 2em;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-confirm:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-cancel {
  padding: 0.8em 2em;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Stock Section Styles */
.stock-input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5em;
}

.btn-insert {
  padding: 0.8em 2em;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
  margin-top: 1em;
}

.btn-insert:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.stock-table-wrapper {
  margin-top: 2em;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.stock-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.stock-table thead {
  background-color: #f5f5f5;
}

.stock-table th {
  padding: 1em;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
}

.stock-table td {
  padding: 1em;
  border-bottom: 1px solid #eee;
  color: #333;
}

.stock-table tbody tr:hover {
  background-color: #f9f9f9;
}

.btn-edit-stock,
.btn-delete-stock {
  padding: 0.5em 1em;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-edit-stock:hover,
.btn-delete-stock:hover {
  background-color: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.stock-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5em;
  gap: 1em;
}

.btn-back {
  padding: 0.8em 2em;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-confirm-stock {
  padding: 0.8em 2em;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-confirm-stock:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Delivery Records Panel */
.delivery-records-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.delivery-records-overlay.active {
  display: block;
  opacity: 1;
}

.delivery-records-panel {
  position: fixed;
  top: 0;
  right: -550px;
  width: 550px;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.delivery-records-panel.active {
  right: 0;
}

.delivery-records-header {
  background: linear-gradient(135deg, #2c5aa0 0%, #1e3a6f 100%);
  color: white;
  padding: 1.5em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.delivery-records-header h2 {
  margin: 0;
  font-size: 1.5em;
}

.delivery-records-filters {
  padding: 1em;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  gap: 0.8em;
  flex-shrink: 0;
}

.delivery-records-filters .search-input {
  flex: 1;
  padding: 0.6em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95em;
}

.delivery-records-filters .filter-date {
  padding: 0.6em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95em;
  width: 150px;
}

.delivery-records-content {
  flex: 1;
  overflow-y: auto;
  padding: 1em;
}

.delivery-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.2em;
  margin-bottom: 1em;
  transition: all 0.3s ease;
  cursor: pointer;
}

.delivery-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: #2c5aa0;
}

.delivery-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
  padding-bottom: 0.8em;
  border-bottom: 2px solid #f0f0f0;
}

.delivery-code {
  font-size: 1.2em;
  font-weight: 700;
  color: #2c5aa0;
}

.delivery-date {
  font-size: 0.9em;
  color: #666;
}

.delivery-card-body p {
  margin: 0.4em 0;
  color: #555;
  font-size: 0.95em;
}

.delivery-card-footer {
  margin-top: 1em;
  padding-top: 0.8em;
  border-top: 1px solid #f0f0f0;
  text-align: right;
}

.btn-view-delivery {
  background: #2c5aa0;
  color: white;
  border: none;
  padding: 0.6em 1.2em;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-view-delivery:hover {
  background: #1e3a6f;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(44, 90, 160, 0.3);
}

.loading-text,
.no-data-text,
.error-text {
  text-align: center;
  padding: 2em;
  color: #666;
  font-style: italic;
}

.error-text {
  color: #dc3545;
}

/* Delivery Details Modal */
.delivery-details-modal {
  max-width: 700px;
  width: 95%;
}

.delivery-details-section {
  margin-bottom: 1.5em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid #e0e0e0;
}

.delivery-details-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.delivery-details-section h4 {
  font-size: 1.3em;
  color: #2c5aa0;
  margin-bottom: 0.8em;
  font-weight: 600;
}

.delivery-details-section p {
  margin: 0.5em 0;
  color: #555;
  line-height: 1.6;
}

.delivery-details-header-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
  background: #f8f9fa;
  padding: 1em;
  border-radius: 8px;
}

.delivery-details-header-info > div {
  flex: 1;
  min-width: 200px;
}

.delivery-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}

.delivery-details-table thead {
  background: #2c5aa0;
  color: white;
}

.delivery-details-table th,
.delivery-details-table td {
  padding: 0.8em;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.delivery-details-table tfoot {
  background: #f8f9fa;
  font-weight: 600;
}

.delivery-details-table tbody tr:hover {
  background: #f8f9fa;
}

.delivery-meta-info {
  font-size: 0.9em;
  color: #777;
  font-style: italic;
}

/* Responsive Design for Delivery Page */
@media (max-width: 768px) {
  .delivery-records-panel {
    width: 100%;
    right: -100%;
  }
  
  .delivery-records-filters {
    flex-direction: column;
  }
  
  .delivery-records-filters .filter-date {
    width: 100%;
  }
  
  .delivery-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }
  
  .delivery-details-modal {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .delivery-main-content {
    padding: 1em;
  }
  
  .delivery-header h2,
  .stock-header h2 {
    font-size: 1.6em;
  }
  
  .form-row,
  .stock-input-group {
    grid-template-columns: 1fr;
    gap: 1em;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn-confirm,
  .btn-cancel,
  .btn-insert,
  .btn-confirm-stock {
    width: 100%;
  }
  
  .delivery-section,
  .detailed-stock-section {
    padding: 1.5em;
  }
  
  .stock-table-wrapper {
    overflow-x: auto;
  }
  
  .stock-table th,
  .stock-table td {
    padding: 0.75em 0.5em;
    font-size: 0.9em;
  }
}

/* --- Purchase Order Page Styles --- */
.purchase-order-layout {
  display: flex;
  min-height: 100vh;
}

.purchase-order-main-content {
  flex: 1;
  padding: 2em;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.po-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5em;
}

.btn-po-list {
  padding: 0.7em 1.5em;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-po-list:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* PO List Panel */
.po-list-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.po-list-overlay.active {
  opacity: 1;
  visibility: visible;
}

.po-list-panel {
  position: fixed;
  top: 0;
  right: -500px;
  width: 500px;
  height: 100%;
  background: white;
  z-index: 1000;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.po-list-panel.active {
  right: 0;
}

.po-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5em;
  background-color: #007bff;
  color: white;
}

.po-list-header h2 {
  margin: 0;
  font-size: 1.5em;
}

.btn-close-panel {
  background: none;
  border: none;
  color: white;
  font-size: 2em;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.btn-close-panel:hover {
  transform: scale(1.2);
}

.po-list-filters {
  padding: 1em 1.5em;
  background-color: #f8f9fa;
  border-bottom: 1px solid #ddd;
  display: flex;
  gap: 0.5em;
}

.filter-select,
.search-input {
  padding: 0.6em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9em;
}

.filter-select {
  flex: 0 0 120px;
}

.search-input {
  flex: 1;
}

.po-list-content {
  flex: 1;
  overflow-y: auto;
  padding: 1em;
}

.po-cards {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.po-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1em;
  transition: all 0.3s ease;
}

.po-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.po-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75em;
  padding-bottom: 0.75em;
  border-bottom: 1px solid #eee;
}

.po-card-header h3 {
  margin: 0;
  font-size: 1.1em;
  color: #333;
}

.po-status {
  padding: 0.3em 0.8em;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
}

.status-draft {
  background-color: #6c757d;
  color: white;
}

.status-pending {
  background-color: #ffc107;
  color: #333;
}

.status-approved {
  background-color: #28a745;
  color: white;
}

.status-delivered {
  background-color: #17a2b8;
  color: white;
}

.po-card-body {
  margin-bottom: 1em;
}

.po-card-body p {
  margin: 0.4em 0;
  font-size: 0.9em;
  color: #666;
}

.po-card-body strong {
  color: #333;
}

.po-card-actions {
  display: flex;
  gap: 0.5em;
}

.btn-view-po,
.btn-approve-po {
  padding: 0.5em 1em;
  border: none;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-view-po {
  background-color: #007bff;
  color: white;
}

.btn-view-po:hover {
  background-color: #0056b3;
}

.btn-approve-po {
  background-color: #28a745;
  color: white;
}

.btn-approve-po:hover {
  background-color: #218838;
}

.btn-cancel-po {
  background-color: #dc3545;
  color: white;
}

.btn-cancel-po:hover {
  background-color: #c82333;
}

.loading-text,
.no-data,
.error-text {
  text-align: center;
  padding: 2em;
  color: #666;
}

@media (max-width: 600px) {
  .po-list-panel {
    width: 100%;
    right: -100%;
  }
}

/* PO Header */
.purchase-order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2em;
  padding: 2em;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.po-title-section h1 {
  font-size: 2.5em;
  color: #333;
  margin-bottom: 1em;
}

.po-number-date {
  display: flex;
  gap: 2em;
}

.po-number-date .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.po-number-date label {
  font-weight: 600;
  color: #333;
  font-size: 0.9em;
}

.po-number-date .form-input {
  padding: 0.6em;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #f8f9fa;
  min-width: 200px;
}

.logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.po-logo {
  max-width: 180px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Info Section */
.info-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
  margin-bottom: 2em;
}

.info-box {
  background: white;
  border-radius: 12px;
  padding: 1.5em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.info-box h3 {
  font-size: 1.3em;
  color: #333;
  margin-bottom: 1.5em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid #e0e0e0;
}

.info-box .form-group {
  margin-bottom: 1em;
}

.info-box label {
  display: block;
  font-weight: 600;
  color: #333;
  font-size: 0.9em;
  margin-bottom: 0.5em;
}

.info-box .form-input {
  width: 100%;
  padding: 0.75em;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.info-box .form-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.info-box textarea.form-input {
  resize: vertical;
  min-height: 60px;
}

/* Order Details Section */
.order-details-section {
  background: white;
  border-radius: 12px;
  padding: 2em;
  margin-bottom: 2em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.order-details-section h3 {
  font-size: 1.5em;
  color: #333;
  margin-bottom: 1.5em;
}

/* Add Item Form */
.add-item-form {
  background: #f8f9fa;
  padding: 1.5em;
  border-radius: 8px;
  margin-bottom: 2em;
}

.item-inputs {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 1em;
  margin-bottom: 1em;
}

.item-inputs .form-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.85em;
  margin-bottom: 0.3em;
  display: block;
}

.item-inputs .form-input {
  width: 100%;
  padding: 0.7em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95em;
}

.btn-add-item {
  padding: 0.8em 2em;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-add-item:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Order Table */
.order-table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5em;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.order-table {
  width: 100%;
  border-collapse: collapse;
}

.order-table thead {
  background-color: #2c3e50;
  color: white;
}

.order-table th {
  padding: 1em;
  text-align: left;
  font-weight: 600;
}

.order-table td {
  padding: 1em;
  border-bottom: 1px solid #eee;
}

.order-table tbody tr:hover {
  background-color: #f8f9fa;
}

.btn-delete-item {
  padding: 0.5em 1em;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-delete-item:hover {
  background-color: #c82333;
  transform: translateY(-1px);
}

/* Totals Section */
.totals-section {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5em;
}

.totals-grid {
  min-width: 350px;
  background: #f8f9fa;
  padding: 1.5em;
  border-radius: 8px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75em 0;
  border-bottom: 1px solid #ddd;
}

.total-label {
  font-weight: 600;
  color: #333;
}

.total-value {
  font-weight: 600;
  color: #333;
}

.grand-total-row {
  border-top: 2px solid #333;
  border-bottom: none;
  margin-top: 0.5em;
  padding-top: 1em;
}

.grand-total-row .total-label,
.grand-total-row .total-value {
  font-size: 1.2em;
  font-weight: bold;
  color: #007bff;
}

.tax-input-row {
  align-items: center;
}

.tax-rate-input {
  width: 80px;
  padding: 0.5em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95em;
  text-align: right;
  font-weight: 600;
  transition: border-color 0.3s ease;
}

.tax-rate-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Terms Section */
.terms-section {
  background: white;
  border-radius: 12px;
  padding: 2em;
  margin-bottom: 2em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.terms-section .form-group {
  margin-bottom: 1.5em;
}

.terms-section label {
  display: block;
  font-weight: 600;
  color: #333;
  font-size: 0.95em;
  margin-bottom: 0.5em;
}

.terms-section .form-input {
  width: 100%;
  padding: 0.75em;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1em;
  resize: vertical;
}

.terms-section .form-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Action Buttons */
.po-actions {
  display: flex;
  gap: 1em;
  justify-content: flex-end;
  margin-bottom: 2em;
}

.btn-save-draft {
  padding: 0.9em 2em;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-save-draft:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-submit-po {
  padding: 0.9em 2em;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-submit-po:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Responsive Design for Purchase Order */
@media (max-width: 968px) {
  .po-nav-header {
    flex-direction: column;
    gap: 1em;
    align-items: flex-start;
  }
  
  .btn-po-list {
    width: 100%;
    text-align: center;
  }
  
  .purchase-order-header {
    flex-direction: column;
    gap: 2em;
  }

  .info-section {
    grid-template-columns: 1fr;
  }

  .item-inputs {
    grid-template-columns: 1fr;
  }

  .po-actions {
    flex-direction: column;
  }

  .btn-save-draft,
  .btn-submit-po,
  .po-actions .btn-cancel {
    width: 100%;
  }

  .totals-grid {
    min-width: 100%;
  }
}

/* PO Details Modal Styles */
.po-details-modal {
  max-width: 800px;
  width: 95%;
}

.po-details-section {
  margin-bottom: 1.5em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid #e0e0e0;
}

.po-details-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.po-details-section h4 {
  font-size: 1.3em;
  color: #2c5aa0;
  margin-bottom: 0.8em;
  font-weight: 600;
}

.po-details-section p {
  margin: 0.5em 0;
  color: #555;
  line-height: 1.6;
}

.po-details-header-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
  background: #f8f9fa;
  padding: 1em;
  border-radius: 8px;
}

.po-details-header-info > div {
  flex: 1;
  min-width: 150px;
}

.po-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}

.po-details-table thead {
  background: #2c5aa0;
  color: white;
}

.po-details-table th,
.po-details-table td {
  padding: 0.8em;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.po-details-table tbody tr:hover {
  background: #f8f9fa;
}

.po-details-totals {
  background: #f8f9fa;
  padding: 1.2em;
  border-radius: 8px;
}

.po-details-totals .total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5em 0;
  font-size: 1.05em;
}

.po-details-totals .grand-total {
  border-top: 2px solid #2c5aa0;
  margin-top: 0.5em;
  padding-top: 0.8em;
  font-size: 1.2em;
  color: #2c5aa0;
}

.po-meta-info {
  font-size: 0.9em;
  color: #777;
  font-style: italic;
}

/* Close modal when clicking outside */
.modal {
  cursor: pointer;
}

.modal-content {
  cursor: default;
}

/* Responsive modal */
@media (max-width: 768px) {
  .po-details-modal {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .po-details-header-info {
    flex-direction: column;
  }
  
  .po-details-table {
    font-size: 0.85em;
  }
  
  .po-details-table th,
  .po-details-table td {
    padding: 0.5em 0.3em;
  }
}

/* ============ Sortment Records Styles ============ */
.sortment-layout {
  display: flex;
  min-height: 100vh;
}

.sortment-main-content {
  flex: 1;
  padding: 2em;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.sortment-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5em;
}

.sortment-header {
  margin-bottom: 2em;
}

.sortment-header h2 {
  font-size: 2.2em;
  color: #333;
  margin: 0;
  font-weight: 600;
}

/* Filter Section */
.sortment-filter-section {
  background: white;
  border-radius: 12px;
  padding: 1.5em 2em;
  margin-bottom: 2em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sortment-filter-section .filter-controls {
  display: flex;
  gap: 1em;
  align-items: center;
}

.sortment-filter-section .filter-controls .form-input {
  flex: 1;
  padding: 0.75em 1em;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  background-color: white;
  transition: all 0.3s ease;
}

.sortment-filter-section .filter-controls .form-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-refresh {
  padding: 0.75em 1.5em;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-refresh:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Table Section */
.sortment-table-section {
  background: white;
  border-radius: 12px;
  padding: 2em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sortment-table-section h3 {
  font-size: 1.5em;
  color: #333;
  margin-bottom: 1.5em;
  font-weight: 600;
}

.sortment-table-section .table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

#palettesTable {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

#palettesTable thead {
  background-color: #f5f5f5;
}

#palettesTable th {
  padding: 1em;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
  white-space: nowrap;
}

#palettesTable td {
  padding: 1em;
  border-bottom: 1px solid #eee;
  color: #333;
}

#palettesTable tbody tr:hover {
  background-color: #f9f9f9;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sortment-main-content {
    padding: 1em;
  }

  .sortment-filter-section .filter-controls {
    flex-direction: column;
  }

  .sortment-filter-section .filter-controls .form-input,
  .btn-refresh {
    width: 100%;
  }

  #palettesTable {
    font-size: 0.85em;
  }

  #palettesTable th,
  #palettesTable td {
    padding: 0.6em 0.4em;
  }
}

/* ============ Back Order Styles ============ */
.back-order-layout {
  display: flex;
  min-height: 100vh;
}

.back-order-main-content {
  flex: 1;
  padding: 2em;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.back-order-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5em;
}

.btn-request-back-order {
  background: #28a745;
  color: white;
  border: none;
  padding: 0.8em 1.5em;
  font-size: 1em;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(40, 167, 69, 0.2);
}

.btn-request-back-order:hover {
  background: #218838;
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  transform: translateY(-2px);
}

.back-order-header {
  margin-bottom: 2em;
}

.back-order-header h2 {
  font-size: 2.2em;
  color: #333;
  margin: 0;
  font-weight: 600;
}

/* Back Order Content Row */
.back-order-content-row {
  display: flex;
  gap: 1.5em;
  align-items: flex-start;
}

.back-order-left-section {
  flex: 1;
  min-width: 0;
}

.back-order-right-section {
  width: 360px;
  flex-shrink: 0;
}

/* Restock Requests Section */
.restock-requests-section {
  background: white;
  border-radius: 8px;
  padding: 1em;
  margin-bottom: 2em;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.restock-requests-section h3 {
  font-size: 0.95em;
  color: #333;
  margin-bottom: 0.4em;
  font-weight: 600;
}

.restock-requests-section p {
  font-size: 0.7em;
  margin-bottom: 0.6em;
}

.restock-cards-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5em;
}

.restock-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.4em;
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  transition: all 0.3s ease;
}

.restock-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.restock-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.3em;
}

.restock-card-top h4 {
  font-size: 0.6em;
  color: #333;
  margin: 0;
  font-weight: 600;
  text-transform: uppercase;
}

.restock-card-top .status-badge {
  font-size: 0.75em;
}

.restock-card-center {
  text-align: center;
  padding: 0.6em 0.4em;
}

.restock-card-center .quantity-large {
  font-size: 1.5em;
  font-weight: 700;
  color: #007bff;
  line-height: 1;
}

.restock-card-center .quantity-label {
  font-size: 0.6em;
  color: #6c757d;
  margin-top: 0.2em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.btn-restock-single {
  width: 100%;
  padding: 0.4em;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.7em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-restock-single:hover {
  background-color: #0056b3;
  box-shadow: 0 3px 8px rgba(0, 123, 255, 0.3);
}

.priority-badge {
  display: inline-block;
  padding: 0.3em 0.8em;
  border-radius: 15px;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-high {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.priority-normal {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.priority-low {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.restock-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

.restock-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-label {
  font-weight: 500;
  color: #6c757d;
  font-size: 0.9em;
}

.info-value {
  font-weight: 600;
  color: #333;
  font-size: 0.95em;
}

.restock-notes {
  margin-top: 0.5em;
  padding: 0.8em;
  background: white;
  border-radius: 6px;
  font-size: 0.9em;
  color: #495057;
  border-left: 3px solid #007bff;
}

.items-section {
  margin-top: 1em;
  padding-top: 1em;
  border-top: 1px solid #dee2e6;
}

.items-section strong {
  display: block;
  margin-bottom: 0.8em;
  color: #333;
  font-size: 0.95em;
}

.restock-items {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6em 0.8em;
  background: white;
  border-radius: 6px;
  border-left: 3px solid #28a745;
}

.item-category {
  font-weight: 500;
  color: #333;
  font-size: 0.9em;
}

.item-quantity {
  font-weight: 600;
  color: #28a745;
  font-size: 0.95em;
}

/* Filter Section */
.back-order-filter-section {
  background: white;
  border-radius: 12px;
  padding: 1.5em 2em;
  margin-bottom: 2em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.back-order-filter-section .filter-controls {
  display: flex;
  gap: 1em;
  align-items: center;
}

.back-order-filter-section .filter-controls .form-input {
  flex: 1;
  padding: 0.75em 1em;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  background-color: white;
  transition: all 0.3s ease;
}

.back-order-filter-section .filter-controls .form-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.back-order-filter-section .filter-controls select.form-input {
  flex: 0 0 200px;
  cursor: pointer;
}

/* Table Section */
.back-order-table-section {
  background: white;
  border-radius: 12px;
  padding: 2em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.back-order-table-section h3 {
  font-size: 1.5em;
  color: #333;
  margin-bottom: 1.5em;
  font-weight: 600;
}

.back-order-table-section .table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

#backOrdersTable {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

#backOrdersTable thead {
  background-color: #f5f5f5;
}

#backOrdersTable th {
  padding: 1em;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
  white-space: nowrap;
}

#backOrdersTable td {
  padding: 1em;
  border-bottom: 1px solid #eee;
  color: #333;
}

#backOrdersTable tbody tr:hover {
  background-color: #f9f9f9;
}

/* Status Badge Styles */
.status-badge {
  display: inline-block;
  padding: 0.25em 0.6em;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.status-in-progress {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.status-fulfilled {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Request Modal */
.request-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.request-modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 2.5em;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.request-modal-content h3 {
  font-size: 1.8em;
  color: #333;
  margin-bottom: 1.5em;
  font-weight: 600;
}

.request-modal-content .form-group {
  margin-bottom: 1.5em;
}

.request-modal-content .form-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5em;
  font-size: 0.95em;
}

.request-modal-content .form-input {
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  background-color: white;
  transition: all 0.3s ease;
}

.request-modal-content .form-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.request-modal-content select.form-input {
  cursor: pointer;
}

.request-modal-content textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.stock-info {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.form-hint {
  font-size: 0.85em;
  color: #6c757d;
  font-style: italic;
}

.add-item-container {
  display: flex;
  gap: 0.8em;
  align-items: center;
}

.add-item-container select,
.add-item-container input {
  flex: 1;
}

.btn-add-item {
  padding: 0.75em 1.2em;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-add-item:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3);
}

.requested-items-list {
  min-height: 60px;
  padding: 1em;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.empty-message {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  margin: 0;
}

.items-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
}

.item-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0.8em;
  background: white;
  border: 1px solid #007bff;
  border-radius: 20px;
  color: #007bff;
  font-size: 0.9em;
  font-weight: 500;
}

.chip-text {
  line-height: 1;
}

.chip-remove {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 1.3em;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.chip-remove:hover {
  background-color: #dc3545;
  color: white;
}

.status-critical {
  background-color: #dc3545 !important;
  color: white !important;
}

.status-low {
  background-color: #ffc107 !important;
  color: #000 !important;
}

.status-healthy {
  background-color: #28a745 !important;
  color: white !important;
}

.modal-buttons {
  display: flex;
  gap: 1em;
  margin-top: 2em;
}

.save-btn {
  flex: 1;
  padding: 0.8em 1.5em;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.save-btn:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.close-btn {
  flex: 1;
  padding: 0.8em 1.5em;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Stronger override for employee modal close button (more specific / later) */
#employeeModal .close-btn,
#employeeModal #closeModal {
  flex: 0.1 !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background-color: #6c757d !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

#employeeModal .close-btn:hover,
#employeeModal #closeModal:hover {
  background-color: #5a6268 !important;
  transform: none !important;
  box-shadow: none !important;
}
/* Responsive Design */
@media (max-width: 768px) {
  .back-order-main-content {
    padding: 1em;
  }

  .back-order-content-row {
    flex-direction: column;
  }
  
  .back-order-right-section {
    width: 100%;
  }

  .restock-cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8em;
  }

  .back-order-filter-section .filter-controls {
    flex-direction: column;
  }

  .back-order-filter-section .filter-controls .form-input,
  .back-order-filter-section .filter-controls select.form-input,
  .btn-refresh {
    width: 100%;
    flex: 1;
  }

  #backOrdersTable {
    font-size: 0.85em;
  }

  #backOrdersTable th,
  #backOrdersTable td {
    padding: 0.6em 0.4em;
  }

  .request-modal-content {
    width: 95%;
    padding: 1.5em;
    margin: 10% auto;
  }

  .add-item-container {
    flex-direction: column;
  }

  .add-item-container select,
  .add-item-container input,
  .btn-add-item {
    width: 100%;
  }

  .modal-buttons {
    flex-direction: column;
  }
}


/* --- End of Styles --- */

/* === Cashier Stock Out Styles === */

.cashier-layout {
  min-height: 100vh;
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  padding: 2em;
}

.cashier-main-content {
  max-width: 1200px;
  margin: 0 auto;
}

.cashier-nav-header {
  margin-bottom: 1.5em;
}

.cashier-header {
  background: white;
  padding: 1.2em 1.5em;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}

.cashier-header h2 {
  font-size: 1.8em;
  color: #333;
  margin: 0;
  font-weight: 600;
}

.module-tag {
  font-size: 0.7em;
  color: #6c757d;
  font-weight: 400;
}

.transaction-info-section {
  background: white;
  padding: 1.5em 2em;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 2em;
}

.transaction-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
}

.transaction-field {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.transaction-field label {
  font-weight: 600;
  color: #333;
  font-size: 0.95em;
}

.transaction-field span {
  font-size: 1.1em;
  color: #007bff;
  font-weight: 600;
}

.search-book-section {
  background: white;
  padding: 1.5em 2em;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 2em;
}

.search-book-section h3 {
  font-size: 1.3em;
  color: #333;
  margin-bottom: 1em;
  font-weight: 600;
}

.search-controls {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.search-method {
  display: flex;
  gap: 2em;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5em;
  cursor: pointer;
  font-weight: 500;
  color: #333;
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.search-input-group {
  display: flex;
  gap: 1em;
}

.search-input {
  flex: 1;
}

.btn-scan {
  padding: 0.8em 2em;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-scan:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.items-release-section {
  background: white;
  padding: 1em;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.2em;
  box-sizing: border-box;
} 

.items-release-section h3 {
  font-size: 1.3em;
  color: #333;
  margin-bottom: 1em;
  font-weight: 600;
}

#itemsTable {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

#itemsTable thead {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
}

#itemsTable th {
  padding: 1em;
  text-align: left;
  font-weight: 600;
  font-size: 0.95em;
}

#itemsTable td {
  padding: 1em;
  border-bottom: 1px solid #eee;
  color: #333;
}

#itemsTable tbody tr:hover {
  background-color: #f9f9f9;
}

.qty-input {
  width: 80px;
  padding: 0.5em;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 0.95em;
  text-align: center;
}

.btn-remove {
  padding: 0.5em 1.2em;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove:hover {
  background-color: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.action-buttons-section {
  display: flex;
  gap: 1em;
  margin-bottom: 2em;
}

.btn-confirm {
  flex: 1;
  padding: 1em 2em;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-confirm:hover:not(:disabled) {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-confirm:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-clear {
  flex: 1;
  padding: 1em 2em;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-clear:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 1.2em 2em;
  border-radius: 8px;
  border-left: 4px solid #28a745;
  font-weight: 600;
  font-size: 1.05em;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .cashier-layout {
    padding: 1em;
  }
  
  .transaction-row {
    grid-template-columns: 1fr;
    gap: 1em;
  }
  
  .search-input-group {
    flex-direction: column;
  }
  
  .action-buttons-section {
    flex-direction: column;
  }
  
  #itemsTable {
    font-size: 0.9em;
  }
  
  #itemsTable th,
  #itemsTable td {
    padding: 0.7em;
  }
}

/* Sales Report Page Styles */
.sales-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  margin-bottom: 1.5em;
}

.export-dropdown {
  position: relative;
}

.export-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 0.6em 1em;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.export-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: white;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  border-radius: 8px;
  display: none;
  min-width: 200px;
  z-index: 50;
}

.export-menu.show {
  display: block;
}

.export-option {
  display: block;
  width: 100%;
  padding: 0.8em 1em;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.export-option:hover { background: #f5f7ff; }

.sales-controls {
  display: flex;
  gap: 1em;
  align-items: center;
  margin-bottom: 0.8em;
  flex-wrap: wrap;
}

.sales-controls .date-filter label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.4em;
}

.sales-controls .form-group { min-width: 120px; flex: 0 1 220px; }
.sales-controls .form-input { width: 100%; max-width: 260px; padding: 0.5em 0.75em; border-radius: 8px; border:1px solid #e6e6e6; box-sizing: border-box; }

.apply-btn, .reset-btn {
  padding: 0.55em 0.9em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.apply-btn { background: #007bff; color: #fff; font-weight: 600; }
.reset-btn { background: #f5f5f5; color: #333; }

/* smaller widths on narrow screens */
@media (max-width: 640px) {
  .sales-controls { gap: 0.6em; }
  .sales-controls .form-group { min-width: 120px; flex: 1 1 140px; }
  .sales-controls .form-input { max-width: none; width: 100%; }
  .form-actions { width: 100%; display:flex; gap:0.6em; justify-content:flex-start; }
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1em;
  margin-bottom: 1.4em;
}

.summary-card {
  background: white;
  padding: 1.2em 1.4em;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  display: flex;
  gap: 1em;
  align-items: center;
}

.summary-card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #f0f8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3em;
}

.summary-card .card-content h3 { margin-bottom: 0.2em; font-size: 0.95em; }
.summary-card .card-value { font-size: 1.25em; font-weight: 700; color: #007bff; }

.charts-section { margin-bottom: 1.4em; }
.chart-container { background: white; padding: 1.2em; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,0.06); box-sizing: border-box; }

/* Full-width chart container: canvas stretches to the card edges */
.chart-container.fixed-chart { width: 100%; padding: 1em; max-width: none; }
.chart-container.fixed-chart canvas { width: calc(100% + 2em) !important; height: 320px !important; margin-left: -1em; display: block; border-radius: 8px; }

@media (max-width: 780px) {
  .chart-container.fixed-chart { width: 100%; padding: 0.8em; }
  .chart-container.fixed-chart canvas { width: 100% !important; margin-left: 0; height: 240px !important; }
}

.breakdown-section { margin-bottom: 1.4em; }
.breakdown-filters { display:flex; gap:0.6em; flex-wrap:wrap; margin-bottom:1em; }
.subCategory-filter-btn { padding:0.5em 0.9em; border-radius:8px; border:1px solid #e7e7e7; background:#fff; cursor:pointer; }
.subCategory-filter-btn.active { background:#007bff; color:#fff; border-color:#007bff; }

.table-responsive { background: white; padding:1em; border-radius:12px; box-shadow: 0 6px 18px rgba(0,0,0,0.06); box-sizing: border-box; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sales-table { width:100%; max-width:100%; box-sizing:border-box; border-collapse:collapse; table-layout: fixed; font-size: 0.92em; }
.sales-table th, .sales-table td { padding:0.6em 0.6em; border-bottom:1px solid #eee; text-align:left; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sales-table thead th { font-size: 0.95em; padding:0.7em 0.6em; }
.sales-table thead { background: linear-gradient(135deg,#007bff 0%, #0056b3 100%); color: white; }

/* Allow cells to wrap on very narrow screens */
@media (max-width: 640px) {
  .sales-table th, .sales-table td { white-space: normal; font-size: 0.9em; }
  .sales-table thead th { font-size: 0.95em; }
}

.top-books-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap:1em; margin-top:1em; }
.top-book { background:white; padding:1em; border-radius:10px; box-shadow:0 6px 12px rgba(0,0,0,0.06); }
.top-book h4 { margin-bottom:0.4em; font-size:1em; }
.top-book p { color:#666; font-size:0.95em; }

/* Breakdown table styling to match site */
.breakdown-table { width:100%; border-collapse:collapse; table-layout: fixed; font-size: 0.95em; }
.breakdown-table thead { background: linear-gradient(135deg,#007bff 0%, #0056b3 100%); color: white; }
.breakdown-table th, .breakdown-table td { padding:0.7em 0.8em; border-bottom:1px solid #eee; vertical-align: middle; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.breakdown-table tbody tr:hover { background: rgba(0,0,0,0.03); }
.breakdown-table td:first-child, .breakdown-table th:first-child { max-width:140px; }
.breakdown-table td:nth-child(2) { max-width:360px; }

@media (max-width: 640px) {
  .breakdown-table th, .breakdown-table td { white-space: normal; font-size: 0.92em; }
}

.pagination { margin-top: 1em; display:flex; align-items:center; justify-content:center; gap:1em; }
.pagination-btn { padding:0.5em 0.9em; border-radius:8px; background:#fff; border:1px solid #e7e7e7; cursor:pointer; }
.pagination-btn:disabled { opacity:0.5; cursor:not-allowed; }


/* === End of Styles === */
