body {
  background:#e9eaed;
}

.wrapper {
  width:600px;
  height:670px;
  border-radius:10px;
  position:relative;
  z-index:90;
  margin:50px auto;
  background:#FFF;
}

.ribbon-wrapper {
  width:130px;
  height:105px;
  overflow:hidden;
  position:absolute;
  top:0px;
  right:0px;
}

.ribbon {
  font:bold 15px Sans-Serif;
  text-align:center;
  position:relative;
  left:-0px;
  top:0px;
  width:130px;
  color:#000;
  padding:4px 0;
}

.ribbon:before,.ribbon:after {
  position:absolute;
  bottom:-3px;
  left:0;
  right:0;
}

.ribbon-not-available {
  background:rgb(204, 0, 0);
}

.ribbon-void-trader {
  background: #FBFFFC;
}

.ribbon-event {
  background:rgb(204, 0, 0);
}

.ribbon-prime-vault {
  background: #737374;
}

.ribbon-prime-access {
  background: #C99037;
}

​ .back-to-top {
  position:fixed;
  bottom:0;
  right:0;
  width:70px;
  height:70px;
  z-index:100;
  display:none;
  text-decoration:none;
  color:#fff;
  margin:0;
  background:#ff9000;
}
/* Table Styling */
.table-row-hover {
  border-bottom: 1px solid #ecf0f1;
  transition: all 0.3s ease;
}

.table-row-hover:hover {
  background-color: #f8f9fa;
}

.table-cell-index {
  vertical-align: middle;
  font-weight: 600;
  color: #2c3e50;
}

.table-cell-image {
  vertical-align: middle;
}

.item-image {
  width: 60px;
  height: 80px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 0.25rem;
}

.table-cell-image {
  width: 70px;
  min-width: 70px;
}

.item-details-image {
  width: 100%;
  max-width: 350px;
  height: 450px;
  object-fit: contain;
}

.table-cell-name {
  vertical-align: middle;
  color: #2c3e50;
}

.table-cell-author,
.table-cell-year {
  vertical-align: middle;
  color: #7f8c8d;
}

.table-cell-isbn {
  vertical-align: middle;
  font-family: monospace;
  color: #34495e;
  background-color: #ecf0f1;
  padding: 8px 12px;
  border-radius: 5px;
}

.table-cell-status {
  vertical-align: middle;
}

.status-badge {
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

.table-cell-sold {
  vertical-align: middle;
  font-weight: 600;
  color: #27ae60;
  font-size: 1.1rem;
}

.table-cell-profit {
  vertical-align: middle;
  font-weight: 600;
  color: #2980b9;
}

.table-cell-action {
  vertical-align: middle;
}

.btn-view {
  background-color: #3498db;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  color: white;
}

.btn-view:hover {
  background-color: #2980b9;
  color: white;
  transform: translateY(-2px);
}

.table-cell-empty {
  padding: 40px;
  color: #7f8c8d;
  font-size: 1.1rem;
}

/* Items Page Styling */
#PW-tab .nav-link {
  background-color: white !important;
  color: #2c3e50 !important;
  border: 2px solid #bdc3c7 !important;
}

#PW-tab .nav-link.active {
  background-color: #3498db !important;
  color: white !important;
  border-color: #3498db !important;
}

#PW-tab .nav-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

input.form-control:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.table tbody tr {
  transition: all 0.3s ease;
}

/* Dashboard Styling */
.stat-card {
  border-left: 4px solid #007bff;
}

.stat-card.success {
  border-left-color: #28a745;
}

.stat-card.warning {
  border-left-color: #ffc107;
}

.stat-card.danger {
  border-left-color: #dc3545;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  margin: 10px 0;
}

.stat-label {
  color: #666;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-subtitle {
  color: #999;
  font-size: 0.85rem;
  margin-top: 5px;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 350px;
  margin-top: 20px;
}

.dashboard-header {
  margin-bottom: 30px;
}

.dashboard-header h1 {
  color: #333;
  margin-bottom: 10px;
}

.profit-positive {
  color: #28a745;
}

.profit-negative {
  color: #dc3545;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-label {
  font-weight: 500;
  color: #666;
}

.breakdown-value {
  font-weight: 700;
  color: #333;
}

/* Items Page Specific Styles */
.items-page-container {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
  min-height: 100vh;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Compact Page Header */
.items-page-header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  padding: 16px 24px;
  margin-bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon-wrapper {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.header-icon-wrapper i {
  font-size: 1.2rem;
  color: #fff;
}

.header-text h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ecf0f1;
  margin: 0;
  letter-spacing: 0.3px;
}

.items-page-subheader {
  color: #95a5a6;
  font-size: 0.85rem;
  margin: 0;
}

.items-page-subheader i {
  margin-right: 6px;
  color: #3498db;
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-header-action {
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 8px;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-add-item {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.25);
}

.btn-add-item:hover {
  background: linear-gradient(135deg, #219a52 0%, #27ae60 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35);
}

.btn-scan {
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(155, 89, 182, 0.25);
}

.btn-scan:hover {
  background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.35);
}

/* Search Section */
.search-section {
  background: #fff;
  padding: 12px 24px;
  border-bottom: 1px solid #e1e5eb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 700px;
  margin: 0 auto;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border: 2px solid #e1e5eb;
  border-radius: 10px;
  padding: 0 14px;
  transition: all 0.2s ease;
  flex: 1;
}

.search-input-wrapper:focus-within {
  border-color: #3498db;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-icon {
  color: #95a5a6;
  font-size: 1rem;
  margin-right: 10px;
}

.search-input-wrapper:focus-within .search-icon {
  color: #3498db;
}

.search-input-wrapper .form-control {
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 0.95rem;
  flex: 1;
}

.search-input-wrapper .form-control:focus {
  box-shadow: none;
  outline: none;
}

.search-input-wrapper .form-control::placeholder {
  color: #adb5bd;
}

.search-shortcut {
  display: flex;
  gap: 4px;
  color: #adb5bd;
  font-size: 0.7rem;
}

.search-shortcut kbd {
  background: #e9ecef;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 0.65rem;
  color: #6c757d;
}

.btn-scan-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 10px;
  border: 2px solid #9b59b6;
  background: #fff;
  color: #9b59b6;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-scan-inline:hover {
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  color: #fff;
  border-color: #8e44ad;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.25);
}

.btn-scan-inline i {
  font-size: 1rem;
}

/* Tab styling */
#PW-tab {
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 24px 0;
  background: transparent;
}

.tab-button {
  padding: 10px 18px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 2px solid #dee2e6;
  transition: all 0.2s ease;
  background-color: #fff;
  color: #2c3e50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-button i {
  font-size: 0.8rem;
  opacity: 0.7;
}

.tab-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(52, 152, 219, 0.2);
  border-color: #3498db;
}

.tab-button.active {
  background-color: #3498db;
  color: white;
  border-color: #3498db;
}

.tab-button.active i {
  opacity: 1;
}

.tab-content {
  padding: 16px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tab-content .tab-pane {
  flex: 1;
  display: none;
  flex-direction: column;
}

.tab-content .tab-pane.show.active {
  display: flex;
}

.tab-content .items-list {
  flex: 1;
  overflow-y: auto;
}

.loading-spinner {
  padding: 40px 20px;
}

.no-results-row {
  padding: 30px;
  color: #7f8c8d;
}

.qr-scanner-btn:hover {
  background-color: #8e44ad;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

.qr-reader-card {
  background-color: #ecf0f1;
  border: 2px solid #95a5a6;
  border-radius: 8px;
}

.qr-reader-container {
  max-width: 500px;
  margin: 0 auto;
}

.items-table {
  background-color: white;
  border-collapse: collapse;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-radius: 10px;
  overflow: hidden;
}

.items-table thead tr {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.items-table th {
  padding: 16px;
  font-weight: 700;
  text-align: left;
}

/* Responsive Design */
@media (max-width: 768px) {
  .items-page-header {
    padding: 12px 16px;
    gap: 10px;
  }
  
  .header-content {
    gap: 10px;
  }
  
  .header-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
  
  .header-icon-wrapper i {
    font-size: 1rem;
  }
  
  .header-text h1 {
    font-size: 1.2rem;
  }
  
  .search-section {
    padding: 10px 16px;
  }
  
  .search-row {
    gap: 8px;
  }
  
  .search-shortcut {
    display: none;
  }
  
  .btn-scan-inline {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  #PW-tab {
    padding: 12px 16px 0;
    gap: 6px;
  }
  
  .tab-button {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
  
  .tab-content {
    padding: 12px 16px 20px;
  }
  
  .items-table {
    font-size: 0.9rem;
  }
  
  .items-table th {
    padding: 12px 8px;
  }
  
  .items-table td {
    padding: 12px 8px;
  }
}

@media (max-width: 576px) {
  .items-page-header {
    padding: 10px 12px;
  }
  
  .header-content {
    justify-content: center;
  }
  
  .header-text h1 {
    font-size: 1.1rem;
  }
  
  .search-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-input-wrapper {
    width: 100%;
  }
  
  .btn-scan-inline {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }
  
  .tab-button {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
  
  .tab-button i {
    display: none;
  }
  
  .items-table {
    font-size: 0.8rem;
  }
}

/* ============================================
   AUDIT PAGE STYLES
   ============================================ */

/* Audit Stats */
.audit-stat {
  padding: 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.audit-stat:hover {
  background-color: #f8f9fa;
}

.audit-stat.active {
  background-color: #e3f2fd;
  border: 2px solid #2196f3;
}

/* Audit Item Cards */
.audit-item {
  transition: all 0.3s ease;
  border-left: 4px solid transparent !important;
}

.audit-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.audit-item-active {
  border-left-color: #3498db !important;
  background-color: #f8f9fa !important;
  box-shadow: 0 4px 20px rgba(52, 152, 219, 0.2) !important;
}

.audit-item[data-audit-status="confirmed"] {
  border-left-color: #28a745 !important;
}

.audit-item[data-audit-status="missing"] {
  border-left-color: #dc3545 !important;
}

/* Audit Item Image */
.audit-item-image {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.audit-item-image-placeholder {
  width: 60px;
  height: 80px;
  background-color: #e9ecef;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 1.5rem;
}

/* Audit Action Buttons */
.audit-actions {
  display: flex;
  gap: 8px;
}

.audit-actions .btn {
  min-width: 100px;
}

.audit-btn-confirm {
  background-color: #28a745;
  border-color: #28a745;
}

.audit-btn-confirm:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

.audit-btn-missing {
  background-color: #dc3545;
  border-color: #dc3545;
}

.audit-btn-missing:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.audit-btn-skip {
  background-color: #6c757d;
  border-color: #6c757d;
}

.audit-btn-skip:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

/* Keyboard shortcut badges */
kbd {
  background-color: #2c3e50;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: monospace;
}

/* Responsive Audit */
@media (max-width: 768px) {
  .audit-actions {
    flex-direction: column;
    margin-top: 15px;
  }
  
  .audit-actions .btn {
    min-width: auto;
  }
  
  .audit-item .row {
    flex-direction: column;
    text-align: center;
  }
  
  .audit-item-image,
  .audit-item-image-placeholder {
    margin: 0 auto 15px;
  }
}

/* ============================================
   ITEM CARDS (Items Page - Audit Style)
   ============================================ */

/* Item Cards */
.item-card {
  transition: all 0.3s ease;
  border-left: 4px solid transparent !important;
}

.item-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
  border-left-color: #3498db !important;
}

/* Item Card Image */
.item-card-image {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.item-card-image-placeholder {
  width: 60px;
  height: 80px;
  background-color: #e9ecef;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 1.5rem;
}

/* Item Card Status Colors */
.item-card[data-status="listed"] {
  border-left-color: #28a745 !important;
}

.item-card[data-status="not-listed"] {
  border-left-color: #ffc107 !important;
}

.item-card[data-status="sold"] {
  border-left-color: #17a2b8 !important;
}

.item-card[data-status="sold-unpaid"] {
  border-left-color: #fd7e14 !important;
}

/* Items List Container */
.items-list {
  max-height: calc(100vh - 350px);
  overflow-y: auto;
  padding-right: 5px;
}

/* Responsive Item Cards */
@media (max-width: 768px) {
  .item-card .row {
    flex-direction: column;
    text-align: center;
  }
  
  .item-card-image,
  .item-card-image-placeholder {
    margin: 0 auto 15px;
  }
  
  .item-card .col-auto {
    margin-top: 10px;
  }
  
  .item-card .col-auto.text-end {
    text-align: center !important;
  }
}