:root {
    --primary: #1F2937;
    --accent: #455a64;
    --dark: #1F2937;
    --muted: #64748B;
    --bg: #f2f6fa;
    --radius: 12px
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

a{
    text-decoration: none;
    color: var(--accent)
}
a:hover{
    color: var(--primary);
}

body {
    margin: 0;
    background: var(--bg);
    font-family: Inter, system-ui, Arial, sans-serif;
    color: var(--dark)
}






    .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
      flex-wrap: wrap;
      gap: 12px;
    }

    .header h2 {
      font-weight: 700;
      color: var(--primary);
      margin: 0;
    }

    .btn-back {
      background: var(--accent);
      color: #fff;
      padding: 8px 18px;
      border-radius: var(--radius);
      text-decoration: none;
      transition: background 0.3s;
    }
    .btn-back:hover {
      background: #2f3e46;
      color: #fff;
    }
.btn-container {
    display: flex;
    gap: 10px; /* adjust space between buttons */
    justify-content: center; /* center them */
    margin-top: 20px;
}
.btn-print {
    background: #d32f2f; /* red */
}

.btn-print:hover {
    background: #b71c1c; /* darker red */
}
    /* Card */
    .card {
      background: #fff;
      border-radius: var(--radius);
      box-shadow: 0 2px 6px rgba(0,0,0,0.08);
      padding: 20px;
      margin-bottom: 20px;
    }

    /* Summary */
    .summary {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 20px;
    }

    .summary p {
      margin: 6px 0;
      color: var(--dark);
    }

    .invoice-total {
      font-size: 1.1rem;
      font-weight: 600;
      color: var(--accent);
    }
    .invoice-total strong {
      font-size: 1.3rem;
      color: var(--primary);
    }

    .table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
    }
    .table th {
      background: var(--accent);
      color: #fff;
      padding: 12px;
      text-align: left;
    }
    .table td {
      padding: 12px;
      text-align: start;
      border-bottom: 1px solid #e5e7eb;
    }
    .table tbody tr:hover {
      background: #f9fafb;
    }
    .table tfoot  {
border: 0px;
    }

    .creditnoteQty{
        width: 80px;
        text-align: center;
    }

    .text-center { text-align: center; }
    .text-end { text-align: end !important; }
    .fw-bold { font-weight: 700; }
    .fw-semibold { font-weight: 600; }
    .text-success { color: #16a34a; }

  

    .table-responsive{
        overflow-x: auto;
    }





.layout {
    display: flex;
    min-height: 100vh
}

.sidebar {
    width: 280px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 6px 14px rgba(2, 132, 199, .15)
}

.brand-title {
    font-weight: 800
}

.brand-sub {
    color: var(--muted);
    font-size: 12px
}

.menu {
    list-style: none;
    padding: 0;
    margin: 24px 0
}
.menu-item {
    margin-bottom: 8px
}

.menu-item a {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--muted);
    font-weight: 600
}



.menu-item.active a,
.menu-item a:hover {
    background: #e1ebf4;
    color: var(--accent)
}

.userbox {
    margin-top: auto
}

.user-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(100, 116, 139, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--muted)
}




.custom-modal {
  display: flex;
  position: fixed;
  z-index: 1050;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.01);
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: background 0.3s, opacity 0.3s;
}
.custom-modal.show {
  background: rgba(0,0,0,0.5); 
  opacity: 1;
  pointer-events: auto;
}

.flex-end{
    display: flex;
    justify-content: flex-end;
}

.custom-modal-content {
    width: 100%;
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  min-width: 360px;
  max-width: 500px;
  position: relative;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(-40px) scale(0.96);
  transition: opacity 0.3s cubic-bezier(.4,2,.6,1), transform 0.3s cubic-bezier(.4,2,.6,1);
}
.custom-modal-content1 {
  width: max-content !important;
  max-width: 80vw;
  overflow: auto;
}
.custom-modal.show .custom-modal-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.custom-modal-close {
  position: absolute;
  top: 8px; right: 12px;
  font-size: 2rem;
  color: var(--muted);
  cursor: pointer;
}

.modal-title {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark);
}

.order-summary {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
  color: var(--dark);
}
.summary-row.total {
  font-weight: bold;
  font-size: 1.1rem;
}

.payment-section p {
  margin-bottom: 0.5rem;
  color: var(--dark);
}
.input-group {
  margin-bottom: 1rem;
}
.input-group label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
}
.input-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
}

.option-btn {
  padding: 0.75rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: 0.2s;
}
.option-btn:hover {
  border-color: var(--accent);
  background: var(--bg);
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}
.btn {
  /* flex: 1; */
  padding: 0.75rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  margin: 0 0.25rem;
}
.cancel-btn {
  background: var(--bg);
  color: var(--dark);
}
.confirm-btn {
  background: var(--primary);
  color: #fff;
}
.confirm-btn:hover {
  background: var(--accent);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  cursor: pointer;
  transition: 0.2s;
}
.radio-group input {
  accent-color: var(--primary);
}
.radio-group label:hover {
  border-color: var(--accent);
}
.radio-group input:checked + span,
.radio-group input:checked ~ * {
  font-weight: 600;
  color: var(--primary);
}

/* Highlight "Proceed Without Payment" when selected */
.no-payment {
  border: 2px solid transparent;
}
.no-payment input:checked + span,
.no-payment input:checked ~ * {
  border-color: var(--accent);
  background: var(--bg);
  font-weight: bold;
  color: var(--dark);
}

.input-group {
  margin-bottom: 1rem;
}
.input-group label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
}
.input-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
}

.hidden {
  display: none;
}
.btn-disabled{
    /* background: #ccc !important; */
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.avatar.small {
    width: 32px;
    height: 32px;
    border-radius: 10px
}


.leftList {
    /* overflow-y: auto; */
    /* height: 80vh; */
    margin-bottom: 12px;
}

.content {
    flex: 1;
    height: 100vh;
    overflow: auto;
    padding: 24px
}

.container {
    max-width: 1100px;
    margin: 0 auto
}

.btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 700
}

.btn-primary {
    background: var(--primary);
    color: #fff
}

.btn-accent {
    background: var(--accent);
    color: #fff
}

.btn-outline {
    background: #fff;
    color: var(--accent);
    border-color: var(--accent)
}

.btn-subtle {
    background: #fff;
    color: var(--dark);
    border: 1px solid #e5e7eb
}

.btn-outline.danger {
    color: #b91c1c;
    border-color: #fecaca
}

.w-100 {
    width: 100%
}

.mt-8 {
    margin-top: 8px
}

.mt-12 {
    margin-top: 12px
}

.mt-16 {
    margin-top: 16px
}

.mb-16 {
    margin-bottom: 16px
}

.flex-1 {
    flex: 1
}

.input,
.select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, .3)
}

.input.qty {
    max-width: 90px;
    text-align: center
}

.card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .04)
}

.card-center {
    max-width: 420px;
    margin: 6vh auto
}

.dateTime{
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
}
.card-title {
    font-weight: 800;
    margin-bottom: 12px
}




.product-image-container {
  width: 100%;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  background-color: #f9f9f9;
  border-radius: 4px;        
  overflow: hidden;
}

.product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}


.tile {
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 14px;
    border-radius: var(--radius)
}

.tile:hover {
    border-color: var(--accent);
    background: rgba(6, 182, 212, .05)
}

.tile-title {
    font-weight: 700
}
.mb-3{
    margin-bottom: 10px;
}
.flex-row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.price {
    font-weight: 800;
    color: var(--accent)
}

.badge {
    display: inline-block;
    background: rgba(6, 182, 212, .1);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px
}
.badge-red {
    display: inline-block;
    background: rgba(255, 38, 0, 0.342);
    color: #fff;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px
}

.badge.soft {
    background: rgba(15, 23, 42, .05);
    color: var(--dark)
}

.kpi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 18px
}

.kpi-title {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700
}

.kpi-value {
    font-size: 28px;
    font-weight: 800
}

.kpi-value.accent {
    color: var(--accent)
}

.list {
    display: flex;
    flex-direction: column;
    gap: 14px
}

.list-item {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 14px
}

.list-left {
    display: flex;
    gap: 10px;
    align-items: center
}

.list-right {
    margin-left: auto;
    text-align: right
}

.strong {
    font-weight: 700
}

.total {
    font-weight: 800
}

.tiny {
    font-size: 12px
}

.scanner {
    border: 2px dashed #e5e7eb;
    border-radius: var(--radius);
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff
}

.scanner-inner {
    display: flex;
    gap: 8px;
    align-items: center
}

.scanner-icon {
    font-size: 20px
}

.scanner-text {
    color: var(--accent);
    font-weight: 700
}

.row {
    display: flex;
    align-items: center
}

.row.between {
    justify-content: space-between
}

.gap-8 {
    gap: 8px
}

.grid {
    display: grid;
     grid-template-columns: 2fr 1fr;
    gap: 16px
}

.grid-3 {
    grid-template-columns: 2fr 1fr;
    gap: 16px
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr)
}

.grid-span-2 {
    grid-column: span 1
}

@media (max-width:1024px) {
    .grid-3 {
        grid-template-columns: 1fr
    }

      .grid {
    grid-template-columns: 1fr;
  }
  .leftList{
    height: auto;
  }

  .cardss {
    order: 1;
  }

  .grid-span-2 {
    order: 2;
  }


    .card{
        order: 2;
    }
    .grid-span-2 {
        grid-column: 1
    }
}

/* @media (max-width:900px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr)
    }
} */

@media (max-width:520px) {
   .products-page .grid-4 {
        grid-template-columns: 1fr
    }
}
@media (min-width:521px) and (max-width:1023px) {
   .products-page .grid-4 {
        grid-template-columns: repeat(2, 1fr)
    }
}
@media (min-width:1025px) and (max-width:1199px) {
   .products-page .grid-4 {
        grid-template-columns: repeat(3, 1fr)
    }
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.cart-item {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 12px
}

.cart-main {
    display: flex;
    flex-direction: column
}

.cart-name {
    font-weight: 700
}

.cart-money {
    text-align: right;
    margin-top: 6px
}

.divider {
    height: 1px;
    background: #e5e7eb;
    margin: 12px 0
}

.totals .row {
    display: flex;
    justify-content: space-between;
    margin: 6px 0
}

.totals .row.total {
    font-size: 18px
}

.alert {
    padding: 10px 12px;
    border-radius: 12px;
    margin: 10px 0;
    border: 1px solid #e5e7eb
}

.alert-success {
    background: #ecfeff;
    color: #155e75;
    border-color: #a5f3fc
}

.alert-error {
    background: #fef2f2;
    color: #7f1d1d;
    border-color: #fecaca
}

.alert-info {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #e2e8f0
}

.h2 {
    font-size: 28px;
    margin: 0
}

.h3 {
    font-size: 22px;
    margin: 0
}

.h5 {
    font-weight: 800
}

.page-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px
}

.page-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px
}

.icon-tile {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    margin: 0 auto 12px
}

.empty {
    border: 1px dashed #e5e7eb;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    background: #fff
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 8px
}

.muted {
    color: var(--muted)
}

.form-row {
    margin-bottom: 12px
}