/* ============================================================================
 * Azurex Admin Master Style & POS Layout (assets/css/master_style.css)
 * ============================================================================ */
body.hold-transition { overflow-x: hidden; }
.wrapper { display: flex; min-height: 100vh; width: 100%; position: relative; }

/* Sidebar Navigation */
.main-sidebar {
  width: 255px;
  background: #0f172a;
  color: #cbd5e1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  z-index: 1030;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
}
.sidebar-brand {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  background: #090e1a;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.sidebar-brand .brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: #fff;
  font-size: 1.05rem;
}
.user-panel {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.user-panel .avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #3b82f6;
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.sidebar-menu {
  list-style: none;
  padding: 0.75rem 0.65rem;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}
.sidebar-menu li.header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
  padding: 0.85rem 0.75rem 0.35rem;
}
.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.85rem;
  color: #cbd5e1;
  border-radius: 0.45rem;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all 0.15s ease;
}
.sidebar-menu li a:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}
.sidebar-menu li.active > a {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}
.sidebar-menu li a .menu-badge {
  margin-left: auto;
}

/* Main Content Wrapper */
.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #f1f5f9;
}
.main-header {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.content-header {
  padding: 1.25rem 1.5rem 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.content-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}
.content {
  padding: 1rem 1.5rem 2rem;
  flex: 1;
}
.main-footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 0.85rem 1.5rem;
  font-size: 0.82rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* KPI Stat Cards */
.kpi-card {
  background: #fff;
  border-radius: 0.65rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}
.kpi-card .kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.kpi-card .kpi-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.kpi-card .kpi-sub {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 0.25rem;
}
.kpi-card .kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.kpi-blue { background: #eff6ff; color: #2563eb; }
.kpi-green { background: #ecfdf5; color: #059669; }
.kpi-amber { background: #fffbeb; color: #d97706; }
.kpi-purple { background: #f5f3ff; color: #7c3aed; }
.kpi-red { background: #fef2f2; color: #dc2626; }

/* POS Terminal Grid & Product Cards */
.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 0.85rem;
  max-height: 68vh;
  overflow-y: auto;
  padding-right: 4px;
}
.pos-product-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.pos-product-card:hover {
  border-color: #2563eb;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}
.pos-product-card.out-of-stock {
  opacity: 0.55;
}
.pos-product-card .prod-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #0f172a;
  margin: 0.35rem 0;
  line-height: 1.3;
}
.pos-product-card .prod-price {
  font-weight: 700;
  font-size: 0.98rem;
  color: #2563eb;
}
.pos-cart-wrapper {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Thermal Receipt Styling */
.thermal-receipt {
  max-width: 360px;
  margin: 0 auto;
  background: #fff;
  padding: 20px 18px;
  border: 1px dashed #cbd5e1;
  font-family: "Courier New", Courier, monospace;
  color: #000;
  font-size: 13px;
}
.thermal-receipt .receipt-divider {
  border-top: 1px dashed #000;
  margin: 10px 0;
}

/* Responsive Sidebar Collapse */
body.sidebar-collapse .main-sidebar {
  margin-left: -255px;
}
@media (max-width: 991px) {
  .main-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    margin-left: -255px;
  }
  body.sidebar-open .main-sidebar {
    margin-left: 0;
  }
}

@media print {
  .main-sidebar, .main-header, .main-footer, .no-print, .content-header {
    display: none !important;
  }
  .content-wrapper, .content {
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }
}
