/* =========================================================
   Pixels Admin — POS look
   Same design as pos.pixelsultra.com: plum #4C2746 sidebar, white page,
   lilac #D8B3D7 highlights, logo-red #E61C38 "key-cap" primary buttons,
   Montserrat text with DM Serif Display page titles.
   Loaded after the app's own CSS. Remove the <link> in
   resources/views/app.blade.php to switch back instantly.
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=DM+Serif+Display&display=swap');

:root {
  --bg: #ffffff;
  --panel: #faf6fa;
  --card: #ffffff;
  --line: #ebdeea;
  --ink: #2a1426;
  --mute: #76607a;
  --band: #4c2746;
  --bandink: #ffffff;
  --or: #e61c38;
  --lilac: #d8b3d7;
  --magenta: #a7226b;
  --key: #3b1c32;
  --focus: #a7226b;
  --ok: #0e8a5f;
  --bad: #c8102e;
  --warn: #9a5600;
  --low-bg: #fff6e8;
  --sel-bg: #f6e9f5;
  --on-bg: #4c2746;
  --on-fg: #ffffff;
  --toastify-color-dark: #2a1426;
}

/* ---------- Base ---------- */
html, body, #app {
  font-family: Montserrat, system-ui, sans-serif !important;
  color: var(--ink);
  background: var(--bg) !important;
}
body .bg-gray-50, body .bg-gray-100:not(.rounded-full):not(input) { background-color: var(--bg) !important; }
::selection { background: var(--sel-bg); color: var(--ink); }
.text-gray-900, .text-gray-800 { color: var(--ink) !important; }
.text-gray-700, .text-gray-600, .text-gray-500, .text-gray-400 { color: var(--mute) !important; }
.border-gray-100, .border-gray-200, .border-gray-50, .border-gray-300 { border-color: var(--line) !important; }
:focus-visible { outline: 3px solid var(--focus) !important; outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* Page titles: DM Serif Display, like the POS screens */
main h1.text-2xl, main h2.text-2xl, main h3.text-2xl,
main h3.text-xl, main h2.text-xl, main h1.text-xl {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  font-size: 32px !important;
  line-height: 1.1;
  letter-spacing: 0 !important;
  color: var(--ink) !important;
  white-space: nowrap;
}
/* numbers on the dashboard cards stay in Montserrat */
main .stat-card h3.text-2xl { font-family: Montserrat, system-ui, sans-serif !important; white-space: normal; }
main h3.text-lg, main h2.text-lg { font-weight: 700 !important; font-size: 17px !important; color: var(--ink) !important; letter-spacing: -.015em; }

/* ---------- Sidebar (plum band) ---------- */
aside.fixed { background: var(--band) !important; border-right: 0 !important; }
.sidebar-container, .bg-sidebar-bg {
  background: var(--band) !important;
  color: var(--bandink) !important;
  border-right: 0 !important;
}
.sidebar-container .border-sidebar-border, .border-sidebar-border { border-color: #ffffff1f !important; }
.sidebar-container .text-sidebar-muted { color: #ffffffd9 !important; }
.sidebar-container .text-\[10px\] { color: #ffffffa6 !important; font-size: 12px !important; font-weight: 500 !important; letter-spacing: 0 !important; text-transform: none !important; }
.sidebar-container a, .sidebar-container button { border-radius: 10px !important; }
.sidebar-container .hover\:bg-sidebar-hover:hover, .sidebar-container a:hover { background: #ffffff1f !important; color: #fff !important; }
.sidebar-container .hover\:text-white:hover { color: #fff !important; }
/* active item: white key with a red pixel, as in the POS */
.sidebar-container .bg-sidebar-hover,
.sidebar-container .bg-sidebar-hover\/50 {
  background: var(--bg) !important;
  color: var(--ink) !important;
  font-weight: 700 !important;
  position: relative;
  box-shadow: none !important;
}
.sidebar-container .bg-sidebar-hover *, .sidebar-container .bg-sidebar-hover\/50 *,
.sidebar-container .bg-sidebar-hover.text-boxcolor, .sidebar-container .bg-sidebar-hover\/50.text-boxcolor { color: var(--ink) !important; }
.sidebar-container .bg-sidebar-hover\/50::before {
  content: ""; position: absolute; left: 6px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  background: var(--or); box-shadow: 0 0 0 1.5px var(--key);
}
.sidebar-container .bg-sidebar-hover\/50 { padding-left: 20px !important; }
.sidebar-container .text-boxcolor { color: var(--lilac) !important; }
.sidebar-container .bg-boxcolor { background: var(--or) !important; color: #fff !important; box-shadow: 2px 2px 0 var(--key); }
.px-brand { display: flex; flex-direction: column; gap: 6px; padding: 2px 4px; }
.px-brand img { width: 100%; max-width: 180px; height: auto; display: block; background: #fff; border-radius: 12px; padding: 8px 12px; box-shadow: 3px 3px 0 var(--or); }
.px-brand .sub { font-size: 12px; opacity: .75; padding-left: 2px; color: #fff; }

/* collapse button next to the sidebar */
button.fixed.top-16.rounded-full { background: var(--card) !important; border: 1.5px solid var(--line) !important; box-shadow: none !important; }

/* ---------- Top bar ---------- */
header.sticky.top-0.h-16 {
  background: var(--bg) !important;
  backdrop-filter: none;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: none !important;
}
header.sticky.top-0.h-16 .rounded-xl { background: var(--card) !important; border: 1.5px solid var(--line) !important; border-radius: 10px !important; min-height: 40px; }
header.sticky.top-0.h-16 input { font-size: 14px !important; }

/* ---------- Cards & panels ---------- */
.bg-primary.rounded-lg, .shadow-lg.rounded-lg, .rounded-2xl.shadow-sm, .bg-white.rounded-lg, .bg-white.rounded-xl, .bg-white.rounded-2xl,
section.rounded-2xl.bg-white {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}
.shadow-lg.rounded-lg.p-4 { padding: 22px !important; }

/* Dashboard number cards (KPIs) */
.rounded-2xl.shadow-sm .text-2xl.font-bold {
  font-family: Montserrat, system-ui, sans-serif !important;
  font-size: clamp(22px, 2.4vw, 30px) !important;
  font-weight: 800 !important;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.rounded-2xl.shadow-sm .text-sm.font-medium.text-gray-500 { font-size: 13px !important; color: var(--mute) !important; }
/* "hero" card = plum, "lilac" card = lilac, like the POS sales summary */
.stat-card.stat-hero { background: var(--band) !important; border-color: var(--band) !important; }
.stat-card.stat-hero, .stat-card.stat-hero * { color: #fff !important; }
.stat-card.stat-lilac { background: var(--lilac) !important; border-color: var(--lilac) !important; }
.stat-card.stat-lilac, .stat-card.stat-lilac * { color: var(--key) !important; }
.stat-card .rounded-xl, .stat-card .rounded-lg { border-radius: 10px !important; }
.text-emerald-500, .text-emerald-600, .text-green-600 { color: var(--ok) !important; }
.text-rose-500, .text-red-500, .text-red-600 { color: var(--bad) !important; }

/* ---------- Tables ---------- */
table { border-collapse: collapse !important; font-size: 15px; }
thead, thead tr, thead.bg-common, thead .bg-common, .uppercase.bg-common.text-white {
  background: var(--panel) !important;
  color: var(--mute) !important;
}
thead th, thead td {
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--mute) !important;
  padding: 8px 10px !important;
  border-bottom: 1px solid var(--line) !important;
  white-space: nowrap;
  background: var(--panel) !important;
}
tbody tr { background: var(--card); }
tbody tr td, tbody tr th { border-bottom: 1px solid var(--line) !important; color: var(--ink); padding-top: 9px; padding-bottom: 9px; vertical-align: middle; }
tbody tr:hover { background: var(--sel-bg) !important; }
td img, th img { border-radius: 8px; }
tbody th.flex, tbody td.flex { display: table-cell !important; vertical-align: middle; }
td.p-2, td.px-2.py-1:not(:has(p)) { white-space: nowrap; }
td.p-2.font-bold { font-variant-numeric: tabular-nums; }

/* Status pills: white with coloured text, like the POS tags */
.bg-green-500.rounded-full, .bg-yellow-500.rounded-full, .bg-red-500.rounded-full, .bg-blue-500.rounded-full, .bg-green-100.rounded-full,
span.rounded-full.border[class*="bg-"][class*="/20"],
span.rounded-full[class*="bg-amber-500"], span.rounded-full[class*="bg-yellow-500/"],
span.rounded-full[class*="bg-green-500/"], span.rounded-full[class*="bg-emerald-500/"],
span.rounded-full[class*="bg-red-500/"], span.rounded-full[class*="bg-rose-500/"],
span.rounded-full[class*="bg-blue-500/"], span.rounded-full[class*="bg-sky-500/"], span.rounded-full[class*="bg-indigo-500/"],
span.rounded-full[class*="bg-gray-500/"],
[class*="rounded-xl"][class*="bg-green-100"], [class*="rounded-xl"][class*="bg-red-100"], [class*="rounded-xl"][class*="bg-yellow-100"] {
  display: inline-block;
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: 99px !important;
  padding: 2px 9px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap;
  color: var(--ink) !important;
}
.bg-green-500.rounded-full, .bg-green-100.rounded-full, span.rounded-full[class*="bg-green-500/"], span.rounded-full[class*="bg-emerald-500/"], [class*="rounded-xl"][class*="bg-green-100"] { color: var(--ok) !important; }
.bg-yellow-500.rounded-full, span.rounded-full[class*="bg-amber-500"], span.rounded-full[class*="bg-yellow-500/"], [class*="rounded-xl"][class*="bg-yellow-100"] { color: var(--warn) !important; }
.bg-red-500.rounded-full, span.rounded-full[class*="bg-red-500/"], span.rounded-full[class*="bg-rose-500/"], [class*="rounded-xl"][class*="bg-red-100"] { color: var(--bad) !important; }
.bg-blue-500.rounded-full, span.rounded-full[class*="bg-blue-500/"], span.rounded-full[class*="bg-sky-500/"], span.rounded-full[class*="bg-indigo-500/"] { color: var(--magenta) !important; }
span.rounded-full[class*="bg-gray-500/"] { color: var(--mute) !important; }
/* the small red notification dot keeps its colour */
header .bg-red-500.rounded-full { background: var(--or) !important; border: 2px solid #fff !important; padding: 0 !important; }

/* Row action buttons (edit / delete / view) */
.w-8.h-8.rounded-md {
  background: var(--card) !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 10px !important;
  color: var(--ink) !important;
}
.w-8.h-8.rounded-md:hover { border-color: var(--ink) !important; }
.w-8.h-8.rounded-md[class*="bg-red"] { color: var(--bad) !important; }
.w-8.h-8.rounded-md[class*="bg-green"], .w-8.h-8.rounded-md[class*="bg-emerald"] { color: var(--ok) !important; }
.w-8.h-8.rounded-md[class*="bg-yellow"] { color: var(--warn) !important; }
.w-8.h-8.rounded-md[class*="bg-blue"], .w-8.h-8.rounded-md[class*="bg-indigo"], .w-8.h-8.rounded-md[class*="bg-sky"], .w-8.h-8.rounded-md[class*="bg-cyan"], .w-8.h-8.rounded-md[class*="bg-purple"] { color: var(--magenta) !important; }
.w-8.h-8.rounded-md svg, .w-8.h-8.rounded-md * { color: inherit !important; }

/* Toggle switches */
.peer:checked ~ .peer-checked\:bg-common { background: var(--band) !important; }
input[type="checkbox"] { accent-color: var(--band); }
input[type="checkbox"].rounded { border-radius: 5px !important; border-color: var(--line) !important; color: var(--band) !important; }

/* ---------- Buttons ---------- */
/* Primary: the POS red key-cap */
button.bg-common, a.bg-common, .bg-common.text-white.rounded-lg, .bg-common.text-white.py-3,
button.bg-secondary, a.bg-secondary {
  background: var(--or) !important;
  color: #fff !important;
  border: 2px solid var(--key) !important;
  border-radius: 10px !important;
  box-shadow: 3px 3px 0 var(--key) !important;
  font-weight: 600 !important;
  white-space: nowrap;
  transition: transform .06s, box-shadow .06s !important;
}
button.bg-common:hover, a.bg-common:hover, .hover\:bg-secondary:hover { background: var(--or) !important; }
button.bg-common:active, a.bg-common:active, button.bg-secondary:active {
  transform: translate(2px, 2px) !important;
  box-shadow: 1px 1px 0 var(--key) !important;
}
.bg-common:not(button):not(a):not(thead):not(tr) { background-color: var(--band) !important; }
.text-common { color: var(--band) !important; }
.border-common { border-color: var(--line) !important; }
/* Small toolbar buttons: plain white keys */
button.bg-common.text-xs, .bg-common.text-xs.border {
  background: var(--card) !important;
  color: var(--ink) !important;
  border: 1.5px solid var(--line) !important;
  box-shadow: none !important;
}
button.bg-common.text-xs:hover { border-color: var(--ink) !important; }
/* Green "export / send" buttons become plain keys with green text */
button[class*="bg-green-6"], a[class*="bg-green-6"], button[class*="bg-emerald-6"] {
  background: var(--card) !important;
  color: var(--ok) !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-weight: 600;
}
button[class*="bg-green-6"]:hover, a[class*="bg-green-6"]:hover { border-color: var(--ink) !important; }

/* ---------- Forms ---------- */
label, .text-sm.block { color: var(--mute) !important; font-weight: 500 !important; font-size: 13px !important; }
input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="search"]:not(.border-none), input[type="date"], input[type="url"], input[type="tel"], select, textarea {
  background: var(--card) !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: var(--ink) !important;
  padding: 9px 12px !important;
  min-height: 44px;
  font-size: 15px !important;
}
textarea { min-height: 60px; }
header.sticky.top-0.h-16 input, input.border-none { padding: 4px 0 !important; border: 0 !important; background: transparent !important; min-height: 0; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--magenta) !important;
  outline-offset: 1px;
  border-color: var(--line) !important;
  box-shadow: none !important;
}
header.sticky.top-0.h-16 input:focus, input.border-none:focus { outline: none !important; }
input::placeholder, textarea::placeholder { color: #a996a6 !important; }
.border-dashed.border-common { border: 1.5px dashed var(--mute) !important; background: var(--card) !important; border-radius: 12px !important; }
.border-dashed.border-common:hover { border-color: var(--ink) !important; background: var(--panel) !important; }
/* vue-select */
.vs__dropdown-toggle { border: 1.5px solid var(--line) !important; border-radius: 10px !important; min-height: 44px; background: var(--card); }
.vs__search, .vs__search:focus, .vs__dropdown-toggle input { border: 0 !important; padding: 0 6px !important; margin: 4px 0 0 !important; box-shadow: none !important; outline: none !important; background: transparent !important; min-height: 0 !important; }
.vs--open .vs__dropdown-toggle, .vs__dropdown-toggle:focus-within { outline: 2px solid var(--magenta); outline-offset: 1px; }
.vs__dropdown-menu { border: 1px solid var(--line) !important; border-radius: 12px !important; box-shadow: 0 12px 30px #0003 !important; }
.vs__dropdown-option--highlight { background: var(--panel) !important; color: var(--ink) !important; }
.vs__selected { background: var(--sel-bg) !important; border: 1px solid var(--line) !important; color: var(--ink) !important; border-radius: 99px !important; padding: 2px 10px !important; }
/* Summernote editor */
.note-editor.note-frame { border: 1.5px solid var(--line) !important; border-radius: 10px !important; overflow: hidden; }
.note-toolbar { background: var(--panel) !important; border-bottom: 1px solid var(--line) !important; }
.note-btn { border-color: var(--line) !important; background: var(--card) !important; border-radius: 8px !important; }

/* ---------- Pagination (POS pager) ---------- */
.pagination__right__list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.pagination__right__list__item__link {
  display: inline-flex; min-width: 44px; min-height: 44px; padding: 0 10px;
  align-items: center; justify-content: center;
  border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pagination__right__list__item__link:hover { border-color: var(--ink); }
.pagination__right__list__item--active .pagination__right__list__item__link {
  background: var(--on-bg); border-color: var(--on-bg); color: var(--on-fg);
}

/* ---------- Dialogs, dropdowns, toasts ---------- */
.shadow-xl.rounded-2xl, [role="dialog"] .bg-white, .modal-content {
  border-radius: 18px !important; border: 0 !important; background: var(--bg) !important; box-shadow: 0 20px 60px #0006 !important;
}
.Toastify__toast { border-radius: 12px !important; font-family: inherit !important; font-weight: 600; background: var(--ink) !important; color: var(--bg) !important; }
.Toastify__toast--success { border-left: 4px solid #3ee08a; }
.Toastify__toast--error { border-left: 4px solid var(--or); }
.Toastify__close-button { color: var(--bg) !important; opacity: .7; }

/* ---------- Small screens: same as the POS (sidebar slides in) ---------- */
@media (max-width: 767px) {
  main h1.text-2xl, main h2.text-2xl, main h3.text-2xl, main h3.text-xl { font-size: 26px !important; white-space: normal; }
}

/* Sidebar: an open group (e.g. Products) is only tinted; the page you are on is the white key */
.sidebar-container div.cursor-pointer.bg-sidebar-hover { background: #ffffff1f !important; color: #fff !important; }
.sidebar-container div.cursor-pointer.bg-sidebar-hover * { color: #fff !important; }
.sidebar-container a.bg-sidebar-hover { position: relative; }
.sidebar-container a.bg-sidebar-hover.gap-3 { padding-left: 24px !important; }
.sidebar-container a.bg-sidebar-hover.gap-3::before {
  content: ""; position: absolute; left: 9px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  background: var(--or); box-shadow: 0 0 0 1.5px var(--key);
}
.sidebar-container .text-sm.font-medium { font-size: 15px !important; }
.sidebar-container a.text-xs { font-size: 14px !important; }

/* ---------- Sign-in page (as on the POS) ---------- */
.px-login { background: var(--band) !important; }
.px-login-card {
  background: #fff; color: var(--ink);
  border: 2px solid var(--key); border-radius: 22px;
  box-shadow: 10px 10px 0 var(--or);
  padding: 32px 34px 34px;
}
.px-login-logo { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto 22px; }
.px-login-title { font: 400 34px/1.1 "DM Serif Display", Georgia, serif !important; color: var(--ink) !important; margin: 0 0 6px; }
.px-login-sub { color: var(--mute); font-size: 17px; line-height: 1.5; margin: 0 0 20px; }
.px-login-label { display: block; font-size: 15px !important; font-weight: 600 !important; color: var(--mute) !important; margin-bottom: 6px; }
.px-login-input { width: 100%; min-height: 48px; font-size: 16px !important; }
.px-login-btn {
  width: 100%; min-height: 52px; font-size: 18px; font-weight: 700; cursor: pointer;
  background: var(--or); color: #fff; border: 2px solid var(--key); border-radius: 12px;
  box-shadow: 3px 3px 0 var(--key); transition: transform .06s, box-shadow .06s;
}
.px-login-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--key); }
.px-login-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Dashboard cards: big numbers stay on one line */
.stat-card h3.text-2xl { white-space: nowrap !important; font-size: clamp(20px, 1.8vw, 28px) !important; }
.stat-card .text-sm.font-medium.text-gray-500 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tick boxes: plum instead of the default blue */
[type='checkbox']:checked, [type='radio']:checked { background-color: var(--band) !important; border-color: var(--band) !important; }
[type='checkbox']:focus, [type='radio']:focus { --tw-ring-color: #a7226b55 !important; }
