@font-face {
    font-family: 'Gotham';
    src: url('../fonts/gotham/gotham-book.woff2') format('woff2');
    font-weight: 400; /* Book */
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/gotham/gotham-medium.woff2') format('woff2');
    font-weight: 500; /* Medium */
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/gotham/gotham-bold.woff2') format('woff2');
    font-weight: 700; /* Bold */
    font-style: normal;
    font-display: swap;
}

/* Table body default: Gotham Book */
.table__body {
    font-family: 'Gotham', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
}

/* Table headers: Gotham Medium */
.table__body th {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Strong text inside table: Gotham Bold */
.table__body td strong {
    font-weight: 700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Gotham';
}

@media print {
 .table, .table__body {
  overflow: visible;
  height: auto !important;
  width: auto !important;
 }
}

/*@page {
    size: landscape;
    margin: 0; 
}*/

body {
    min-height: 100vh;
    background: url(../images/photos/dashboard/bg.jpg) center / cover;
    /* background-color: white; */
    display: flex;
    justify-content: center;
    align-items: center;
}

main.table {
    width: 95vw;
    height: auto;
    background-color: #fff5;

    backdrop-filter: blur(7px);
    box-shadow: 0 .4rem .8rem #0005;
    border-radius: .8rem;

    overflow: hidden;
}

.table__header {
    width: 100%;
    height: 10%;
    max-height: 68px;
    background-color: #284b63;
    padding: .8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table__header label {
    width: 120px;
    padding: .6rem;
    margin: .3rem;
    background-color: #f2f2f2;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: .2s ease-in-out;
    border-radius: .5rem;
}

.table__header label a {
    color: inherit; 
    text-decoration: none;
    font-family: 'Gotham';
}

.table__header label:hover{
    transform: scale(1.05);
    background-color: #fff;
    cursor: pointer;
}

.table__header a.export-btn {
  width: 100px;
  padding: .6rem;
  margin: .3rem;
  background-color: #f2f2f2;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: .2s ease-in-out;
  border-radius: .5rem;
  text-decoration: none;
  color: inherit;
}

.table__header a.export-btn:hover {
  transform: scale(1.05);
  background-color: #fff;
  cursor: pointer;
}

.table__header img{
    width: 10rem;
    height: auto;
    padding: 0 0.6rem 0 0;
}

.table__header .button-wrapper {
    display: flex;
}

.table__header .button-wrapper img{
    width: 2rem;
    height: auto;
    padding: 0 0.6rem 0 0;
}

.table__filter {
    width: 100%;
    height: 10%;
    max-height: 68px;
    background-color: #e9ecef;
    padding: .8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table__filter .input-group {
    width: auto;
    height: 45px;
    background-color: white;
    padding: 0 .8rem;
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: .2s;
}

.table__filter .input-group img {
    width: 1.2rem;
    height: 1.2rem;
}

.table__filter .input-group input {
    width: 100%;
    padding: 0 .5rem 0 .3rem;
    background-color: transparent;
    border: none;
    outline: none;
}

.search {
    border: none;
    background: none;
    transition: .2s ease-in-out;
}

.search:hover { 
    transform: scale(1.15);
    cursor: pointer;
}

.dots {
    padding: 0.5rem 1rem;
    background-color: #f2f2f2;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.table__body {
    width: 100%;
    max-height: calc(90vh - 204px - 1.6rem);
    overflow: overlay;
    padding: 0 0 0 .5rem;
}


.table__body::-webkit-scrollbar{
    width: 0.5rem;
    height: 0.5rem;
}

.table__body::-webkit-scrollbar-thumb{
    border-radius: .5rem;
    background-color: #0004;
    visibility: hidden;
}

.table__body:hover::-webkit-scrollbar-thumb{ 
    visibility: visible;
}

.table__body {
    overflow-x: auto;
    width: 100%;
}

/* Ensure table does not stretch too wide on desktop */
.table__body table {
    min-width: 600px; /* Adjust based on your content, e.g. 600–900px */
    max-width: 100%;
    border-collapse: collapse;
    margin: 0 auto; /* Center the table */
}

/* Optional: tighter spacing for cells */
.table__body th {
    padding: 10px 16px;
    white-space: nowrap; /* Prevent breaking words */
    text-align: left;
    color: white;
}

.table__body td {
    padding: 15px 16px;
    white-space: nowrap; /* Prevent breaking words */
    text-align: center;
    color: white;
}

.table__pagination {
    width: 100%;
    height: 10%;
    background-color: #fff;
    padding: .8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pagination a {
    padding: 0.5rem 1rem;
    background-color: #f2f2f2;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a.active {
    background-color: #ffc400;
    font-weight: bold;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
}

.pagination-link {
    display: inline-block;
    padding: 8px 14px;
    background-color: #f0f0f0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: background-color 0.2s ease;
    user-select: none;
}

.pagination-link:hover {
    background-color: #ddd;
}

.pagination-link.active {
    background-color: #ffcc00;
    color: #000;
}

.pagination-link.disabled {
    pointer-events: none;
    background-color: #eee;
    color: #aaa;
    cursor: default;
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background-color: #f2f2f2;
}

.pagination-link.active {
    background-color: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.pagination-link.disabled {
    pointer-events: none;
    opacity: 0.4;
}

.pagination-dot {
    padding: 0 6px;
    font-size: 18px;
    color: #999;
    user-select: none;
}

.pagination-info {
    font-size: 14px;
    color: #444;
    margin-top: 6px;
}

table {
    width: 100%;
}

td img {
    width: 36px;
    height: 36px;
    margin-right: .5rem;
    border-radius: 50%;

    vertical-align: middle;
}

table, th, td {
    border-collapse: collapse;
    /* padding: 1rem; */
    text-align: left;
}

thead th {
    position: sticky;
    top: 0;
    left: 0;
    /* background-color: #d5d1defe; */
    cursor: pointer;
    text-transform: capitalize;
    text-align: center;
}

tbody tr:nth-child(even) {
    background-color: #0000000b;
}

tbody tr {
    --delay: .1s;
    transition: .5s ease-in-out var(--delay), background-color 0s;
}

tbody tr.hide {
    opacity: 0;
    transform: translateX(100%);
}

tbody tr:hover {
    background-color: #fff6 !important;
}

tbody tr td,
tbody tr td p,
tbody tr td img {
    transition: .2s ease-in-out;
}

tbody tr.hide td,
tbody tr.hide td p {
    padding: 0;
    font: 0 / 0 sans-serif;
    transition: .2s ease-in-out .5s;
}

tbody tr.hide td img {
    width: 0;
    height: 0;
    transition: .2s ease-in-out .5s;
}

@media (max-width: 1000px) {
    td:not(:first-of-type) {
        min-width: 12.1rem;
    }
}

thead th span.icon-arrow {
    display: inline-block;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    border: 1.4px solid transparent;
    
    text-align: center;
    font-size: 1rem;
    
    margin-left: .5rem;
    transition: .2s ease-in-out;
}

/* thead th:hover span.icon-arrow{
    border: 1.4px solid #6c00bd;
}

thead th:hover {
    color: #6c00bd;
} */

thead th.active span.icon-arrow{
    background-color: #6c00bd;
    color: #fff;
}

thead th.asc span.icon-arrow{
    transform: rotate(180deg);
}

thead th.active,tbody td.active {
    color: #6c00bd;
}

button.edit-button,
button.edit-brand-button {
    background-color: #ffc107;
    border: 1px solid #ccc;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
    color: white;
}

button.edit-brand-button:hover,
button.edit-button:hover {
    background-color: #ffca2c;
    border-color: #999;
}

.modal {
  display: none; /* default: hidden */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.modal.visible {
  display: flex; /* shown when needed */
}

.modal-content {
  background: #fff;
  padding: 24px;
  width: 320px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  font-family: sans-serif;
}

.modal-content h3 {
  margin-bottom: 16px;
  font-size: 18px;
  text-align: center;
}

.switch{position:relative;display:inline-block;width:44px;height:24px}
.switch input{display:none}
.switch .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#bbb;transition:.2s;border-radius:24px}
.switch .slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;top:3px;background:white;transition:.2s;border-radius:50%}
.switch input:checked + .slider{background:#2ecc71}
.switch input:checked + .slider:before{transform:translateX(20px)}

.switch{position:relative;display:inline-block;width:44px;height:24px}
.switch input{display:none}
.switch .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#bbb;transition:.2s;border-radius:24px}
.switch .slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;top:3px;background:#fff;transition:.2s;border-radius:50%}
.switch input:checked + .slider{background:#2ecc71}
.switch input:checked + .slider:before{transform:translateX(20px)}
.add-button-wrapper{margin-right:12px}
.add-button{background:#2ecc71;border:0;color:#fff;padding:8px 12px;border-radius:8px;cursor:pointer;font-weight:600}
.add-button:hover{opacity:.95}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.form-row label {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
}

.form-row input {
  padding: 8px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}

.btn-save, .btn-cancel {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-save {
  background-color: #0066cc;
  color: white;
}

.btn-cancel {
  background-color: #ccc;
  color: #333;
}

.flash-success {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
}

.table__filter.with-add-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-inline: 1.5rem;
    gap: 10px;
}

.add-button-wrapper {
    display: flex;
    align-items: center;
}

.add-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    font-weight: bold;
    font-size: 14px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.add-button:hover {
    background-color: #0069d9;
}

.add-button img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-search-input {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.custom-options {
  position: absolute;
  width: 100%;
  max-height: 150px; /* approx 5 items */
  overflow-y: auto;
  border: 1px solid #ccc;
  border-top: none;
  background: white;
  z-index: 999;
  display: none;
}

.custom-option {
  padding: 8px;
  cursor: pointer;
}

.custom-option:hover {
  background-color: #f2f2f2;
}

button.toggle-status-button-stock,
button.toggle-status-button {
  border: 1px solid #ccc;
  padding: 5px 10px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
  margin-left: 6px;
}

button.toggle-status-button-stock.btn-activate,
button.toggle-status-button.btn-activate {
    background: #28a745;
    color: white;
}
button.toggle-status-button-stock.btn-deactivate,
button.toggle-status-button.btn-deactivate {
    background: #dc3545;
    color: white;
}

.status-label {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    width: 140px;
    text-align: center;
}

.status-active {
    background-color: #d4edda; /* light green background */
    color: #155724;           /* dark green text */
    border: 1px solid #c3e6cb;
}

.status-inactive {
    background-color: #f8d7da; /* light red/pink background */
    color: #721c24;            /* dark red text */
    border: 1px solid #f5c6cb;
}

.btn-deactivate {
    background-color: #dc3545; /* Bootstrap danger red */
    color: #fff;
}

.btn-activate {
    background-color: #28a745; /* Bootstrap green */
    color: #fff;
}

.btn-deactivate:hover,
.btn-activate:hover {
    opacity: 0.85;
}










/* Make the scroll area a stacking context */
.table__body{
  position: relative;
  overflow: auto; /* keep scrolling */
}

/* Sticky headers behave better with separate borders */
.table__body table{
  border-collapse: separate !important;
  border-spacing: 0;
}

/* Pin thead and keep it above rows */
.table__body thead{
  position: sticky;
  top: 0;
  z-index: 5;
}

/* Give TH cells their own blurred, semi-opaque background */
.table__body thead th{
  position: sticky;      /* helps across browsers */
  top: 0;
  z-index: 6;            /* above tbody content */
  background: rgba(40, 75, 99, 0.55); /* match your header tone, semi-opaque */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background-clip: padding-box;
  box-shadow: 0 1px 0 rgba(0,0,0,0.18);  /* subtle divider under header */
  text-align: center;
}

/* Ensure body cells don’t paint over the header edge on hover */
.table__body tbody tr:hover td{
  position: relative;
}

.table__body button {
    aspect-ratio: 1;
}

.table__body button svg {
    display: flex;
    align-items: center;
    vertical-align: middle;
}



/* ===== Modal polish ===== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.55);          /* softer overlay */
  backdrop-filter: blur(2px);
  z-index: 1000;
}
.modal.visible { display: flex; }

.modal .modal-content {
  width: min(560px, 92vw);
  background: #fff;
  border-radius: 16px;
  box-shadow:
    0 30px 60px -15px rgba(0,0,0,.25),
    0 10px 20px -10px rgba(0,0,0,.2);
  padding: 22px 22px 16px;
  animation: modal-pop .18s ease-out;
}
@keyframes modal-pop {
  from { transform: translateY(6px) scale(.98); opacity: 0; }
  to   { transform: translateY(0)   scale(1);    opacity: 1; }
}

.modal .modal-content h3 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .2px;
  color: #111827;
}

/* ===== Form layout ===== */
.form-row { margin-bottom: 12px; }
.form-row:last-child { margin-bottom: 0; }

.form-row label {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 6px;
}

.form-row input[type="text"],
.form-row input[type="date"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .95rem;
  line-height: 1.35;
  outline: none;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s;
}

.form-row textarea { min-height: 84px; resize: vertical; }

/* Focus states */
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}

/* Disabled text inputs (read-only display fields) */
.form-row input[disabled] {
  background: #f8fafc;
  color: #6b7280;
}

/* Validation helper (use by adding .is-invalid to the input) */
.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .12) !important;
}

/* ===== Actions row ===== */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid #f1f5f9;
}

.btn-save,
.btn-cancel {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .03s ease, box-shadow .15s ease, background .15s;
}

.btn-save {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 6px 12px -6px rgba(37, 99, 235, .45);
}
.btn-save:hover   { background: #1e4fdc; }
.btn-save:active  { transform: translateY(1px); }

.btn-cancel {
  background: #f3f4f6;
  color: #111827;
}
.btn-cancel:hover { background: #e5e7eb; }
.btn-cancel:active { transform: translateY(1px); }

/* ===== Custom select (your searchable list) ===== */
.custom-select-wrapper {
  position: relative;
}
.custom-select-wrapper input[type="text"] {
  /* let it share the same look as inputs */
}

.custom-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,.18);
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  display: none;                   /* JS toggles this */
  z-index: 1100;                   /* above modal content */
}

.custom-option {
  padding: 10px 10px;
  border-radius: 8px;
  font-size: .95rem;
  cursor: pointer;
  color: #111827;
}
.custom-option + .custom-option { margin-top: 4px; }
.custom-option:hover {
  background: #f3f6ff;            /* subtle hover */
}
.custom-option.disabled {
  color: #9ca3af;
  cursor: default;
  background: transparent;
}

/* ===== Toggle switch (status) ===== */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  vertical-align: middle;
}
.switch input { display: none; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: #e5e7eb;
  border-radius: 100px;
  transition: background .15s ease;
}
.switch .slider::before {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.switch input:checked + .slider { background: #10b981; }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ===== Small screens ===== */
@media (max-width: 480px) {
  .modal .modal-content { width: 96vw; padding: 18px; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .btn-save, .btn-cancel { width: 100%; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .modal .modal-content { animation: none; }
  .btn-save, .btn-cancel { transition: none; }
}