/*
 * UnlimitedPOS app theme. Loads after vendor.css and app.css and restyles AdminLTE 2 /
 * Bootstrap 3 without touching the markup. Selectors prefixed with body[class*="skin-"]
 * outrank every AdminLTE skin, so the look holds whichever theme colour a business picked.
 */

/* ---------- base ---------- */
body,
.main-header .logo,
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6,
.btn, .form-control, .select2-container, .popover, .tooltip, .modal, .dropdown-menu {
  font-family: var(--font-ui);
}
body {
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: #2f5d8a; }
a:hover, a:focus { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.content-wrapper,
.right-side,
body[class*="skin-"] .content-wrapper { background: var(--counter); }

/* ---------- top bar ---------- */
body[class*="skin-"] .main-header .navbar {
  background: var(--receipt);
  border-bottom: 1px solid var(--rule);
}
/* the POS button is the one bold accent inside the app: the price tag */
.main-header a.btn[href*="/pos/create"],
.main-header a.btn[href*="/pos/create"]:focus {
  background: var(--tag);
  border-color: var(--tag);
  color: var(--ink);
}
.main-header a.btn[href*="/pos/create"]:hover { background: var(--tag-deep); border-color: var(--tag-deep); color: var(--ink); }

body[class*="skin-"] .main-header .logo,
body[class*="skin-"] .main-header .logo:hover {
  background: var(--ink);
  color: var(--receipt);
  font-weight: 750;
  border-right: 0;
}
body[class*="skin-"] .main-header .navbar .sidebar-toggle,
body[class*="skin-"] .main-header .navbar .nav > li > a {
  color: var(--ink);
}
body[class*="skin-"] .main-header .navbar .sidebar-toggle:hover,
body[class*="skin-"] .main-header .navbar .nav > li > a:hover,
body[class*="skin-"] .main-header .navbar .nav .open > a {
  background: var(--counter);
  color: var(--ink);
}
.main-header .navbar-custom-menu .btn { box-shadow: none; }
/* the header prints today's date in inline white; on the light bar it needs ink */
.main-header .navbar-custom-menu > div[style*="#fff"] { color: var(--slate) !important; }

/* ---------- sidebar ---------- */
/* the light skins force a white sidebar with !important, so this has to match it */
body[class*="skin-"] .main-sidebar,
body[class*="skin-"] .left-side,
body[class*="skin-"] .wrapper {
  background: var(--ink) !important;
}
body[class*="skin-"] .main-sidebar { border-right: 0; }
/* the business name already sits in the header logo; the sidebar copy repeats it */
body[class*="skin-"] .main-sidebar .sidebar > .logo { display: none; }
body[class*="skin-"] .main-sidebar .logo,
body[class*="skin-"] .sidebar > .logo {
  display: block;
  background: var(--ink);
  padding: 18px 18px 14px;
  color: var(--receipt);
  font-weight: 750;
  font-size: 16.8px;
  letter-spacing: -0.01em;
}
body[class*="skin-"] .sidebar-menu > li.header {
  background: transparent;
  color: rgba(252, 252, 250, 0.45);
}
body[class*="skin-"] .sidebar-menu > li > a {
  margin: 1px 10px;
  padding: 10px 12px;
  border-left: 0;
  border-radius: 8px;
  color: rgba(252, 252, 250, 0.74);
  font-weight: 550;
}
body[class*="skin-"] .sidebar-menu > li > a > .fa,
body[class*="skin-"] .sidebar-menu > li > a > .fas {
  width: 22px;
  color: rgba(252, 252, 250, 0.5);
}
/* the light skins set these states with !important too */
body[class*="skin-"] .sidebar-menu > li:hover > a,
body[class*="skin-"] .sidebar-menu > li.menu-open > a {
  background: rgba(252, 252, 250, 0.06) !important;
  color: var(--receipt) !important;
}
body[class*="skin-"] .sidebar-menu > li.active > a {
  background: rgba(255, 207, 51, 0.12) !important;
  color: var(--receipt) !important;
  box-shadow: inset 3px 0 0 var(--tag);
}
body[class*="skin-"] .sidebar-menu > li.active > a > .fa,
body[class*="skin-"] .sidebar-menu > li.active > a > .fas { color: var(--tag); }
body[class*="skin-"] .sidebar-menu > li > .treeview-menu {
  margin: 2px 10px 6px;
  padding: 4px 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22) !important;
}
body[class*="skin-"] .treeview-menu > li > a {
  padding: 7px 12px 7px 34px;
  color: rgba(252, 252, 250, 0.62) !important;
  font-weight: 450;
}
body[class*="skin-"] .treeview-menu > li > a:hover,
body[class*="skin-"] .treeview-menu > li.active > a {
  color: var(--receipt) !important;
  background: transparent !important;
}
body[class*="skin-"] .treeview-menu > li.active > a { font-weight: 650; }
body[class*="skin-"].sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right),
body[class*="skin-"].sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
  background: var(--ink);
}

/* ---------- page header ---------- */
.content-header > h1 {
  color: var(--ink);
  font-size: 27.2px;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
}
.content-header > h1 > small { color: var(--slate); font-weight: 450; font-stretch: 100%; font-variation-settings: normal; }

/* dashboard welcome band: solid ink instead of the blue gradient */
body[class*="skin-"] .content-wrapper .content-header-custom,
.content-header-custom {
  background: var(--ink);
  background-image: none;
  padding: 26px 15px 190px;
}
body[class*="skin-"] .content-wrapper .content-header-custom h1 {
  font-size: 32px;
  color: var(--receipt) !important;
}

/* ---------- boxes ---------- */
.box,
.nav-tabs-custom {
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: none;
  background: var(--receipt);
}
.box.box-solid { border: 1px solid var(--rule); }
/* coloured box variants (box-primary, box-info...) keep the plain card edge */
.box.box { border-top-color: var(--rule); }
.box.box-solid[class*="box-"] > .box-header { background: transparent; color: var(--ink); }
.box.box-solid[class*="box-"] > .box-header .box-title,
.box.box-solid[class*="box-"] > .box-header .btn { color: inherit; }
.box > .box-header { padding: 14px 18px; border-radius: 12px 12px 0 0; }
.box > .box-header.with-border { border-bottom: 1px solid var(--rule); }
.box .box-header > .box-title,
.box .box-header > .fa + .box-title { font-size: 17.6px; font-weight: 700; }
.box > .box-body { padding: 16px 18px; }
.box > .box-footer { border-top: 1px solid var(--rule); background: transparent; border-radius: 0 0 12px 12px; }

/* dashboard figures: flat tiles with a tinted icon chip, no tilting */
.info-box,
.info-box-new-style {
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: none !important;
  background: var(--receipt);
  transform: none !important;
  transition: none !important;
  min-height: 92px;
}
.info-box-new-style:hover { transform: none !important; }
.info-box-new-style .info-box-icon {
  border-radius: 12px;
  width: 58px;
  height: 58px;
  box-shadow: none !important;
}
.info-box-new-style .info-box-content { margin-left: 58px; padding-left: 14px; }
.info-box-text { color: var(--slate); text-transform: none; font-weight: 550; font-size: 14.4px; }
.info-box-number { font-size: 23.2px; font-weight: 800; letter-spacing: -0.01em; }
.info-box-icon.bg-aqua, .info-box-icon.bg-light-blue, .info-box-icon.bg-blue { background: #e4ecf4 !important; color: #2f5d8a !important; }
.info-box-icon.bg-green, .info-box-icon.bg-olive { background: var(--till-soft) !important; color: var(--till) !important; }
.info-box-icon.bg-yellow, .info-box-icon.bg-orange { background: #fff3c4 !important; color: #8a6400 !important; }
.info-box-icon.bg-red, .info-box-icon.bg-maroon { background: var(--void-soft) !important; color: var(--void) !important; }

.small-box { border-radius: 12px; box-shadow: none; }

/* ---------- buttons ---------- */
.btn {
  border-radius: 8px;
  font-weight: 600;
  border-width: 1.5px;
  box-shadow: none;
}
.btn.btn-flat { border-radius: 8px; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: var(--focus); }
.btn-primary, .btn-primary:focus { background: var(--ink); border-color: var(--ink); color: var(--receipt); }
.btn-primary:hover, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { background: var(--ink-soft); border-color: var(--ink-soft); color: var(--receipt); }
.btn-success, .btn-success:focus { background: var(--till); border-color: var(--till); color: #fff; }
.btn-success:hover, .btn-success:active, .open > .dropdown-toggle.btn-success { background: #176a4c; border-color: #176a4c; color: #fff; }
.btn-danger, .btn-danger:focus { background: var(--void); border-color: var(--void); color: #fff; }
.btn-danger:hover, .btn-danger:active { background: #a83526; border-color: #a83526; color: #fff; }
.btn-warning, .btn-warning:focus { background: var(--tag); border-color: var(--tag); color: var(--ink); }
.btn-warning:hover, .btn-warning:active { background: var(--tag-deep); border-color: var(--tag-deep); color: var(--ink); }
.btn-info, .btn-info:focus { background: #2f5d8a; border-color: #2f5d8a; color: #fff; }
.btn-info:hover, .btn-info:active { background: #264d73; border-color: #264d73; color: #fff; }
.btn-default { background: var(--receipt); border-color: var(--rule); color: var(--ink); }
.btn-default:hover, .btn-default:active, .open > .dropdown-toggle.btn-default { background: var(--counter); border-color: #c4cbbf; color: var(--ink); }

/* ---------- forms ---------- */
.form-control,
.input-group .form-control {
  height: 38px;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  box-shadow: none;
  color: var(--ink);
}
textarea.form-control { height: auto; }
.form-control.input-sm { height: 32px; border-radius: 7px; }
.form-control:focus { border-color: var(--ink); box-shadow: var(--focus); }
.input-group .form-control:not(:first-child):not(:last-child),
.input-group-addon:not(:first-child):not(:last-child) { border-radius: 0; }
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn { border-radius: 8px 0 0 8px; }
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn { border-radius: 0 8px 8px 0; }
.input-group-addon { background: var(--counter); border: 1.5px solid var(--rule); color: var(--slate); }
label { font-weight: 600; color: var(--ink-soft); }
.has-error .form-control { border-color: var(--void); }
.has-error .help-block, .has-error .control-label, label.error { color: var(--void); }

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  min-height: 38px;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 35px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 35px; }
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single { border-color: var(--ink); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--ink); color: var(--receipt); }
.select2-dropdown { border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; }

/* ---------- tables ---------- */
.table > thead > tr > th,
table.dataTable thead th {
  background: #f4f6f2;
  border-bottom: 1px solid var(--rule) !important;
  color: var(--ink-soft);
  font-weight: 650;
  font-size: 13.8px;
}
.table > tbody > tr > td { border-top: 1px solid #e7ebe4; }
.table-striped > tbody > tr:nth-of-type(odd) { background: #fafbf8; }
.table-hover > tbody > tr:hover { background: #f1f4ee; }
.table-bordered, .table-bordered > thead > tr > th, .table-bordered > tbody > tr > td { border-color: #e2e7df; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 5px 10px;
}
.pagination > li > a, .pagination > li > span { color: var(--ink); border-color: var(--rule); }
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > span { background: var(--ink); border-color: var(--ink); color: var(--receipt); }
.pagination > li:first-child > a { border-radius: 8px 0 0 8px; }
.pagination > li:last-child > a { border-radius: 0 8px 8px 0; }
.dt-buttons .btn { margin-right: 4px; }

/* ---------- tabs, dropdowns, modals, labels ---------- */
.nav-tabs-custom > .nav-tabs { border-bottom: 1px solid var(--rule); }
.nav-tabs-custom > .nav-tabs > li { border-top: 0; margin-bottom: -1px; }
.nav-tabs-custom > .nav-tabs > li > a { color: var(--slate); font-weight: 600; }
.nav-tabs-custom > .nav-tabs > li.active { border-top: 0; }
.nav-tabs-custom > .nav-tabs > li.active > a { color: var(--ink); box-shadow: inset 0 -3px 0 var(--tag); }
.dropdown-menu {
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 12px 30px -12px rgba(28, 27, 41, 0.35);
  padding: 6px;
}
.dropdown-menu > li > a { border-radius: 6px; padding: 7px 12px; }
.dropdown-menu > li > a:hover { background: var(--counter); color: var(--ink); }
.modal-content { border: 0; border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(28, 27, 41, 0.5); }
.modal-header { border-bottom: 1px solid var(--rule); padding: 16px 20px; }
.modal-title { font-weight: 750; }
.modal-footer { border-top: 1px solid var(--rule); }
.label, .badge { border-radius: 999px; font-weight: 650; padding: 0.3em 0.7em; }
.label-success, .bg-green { background-color: var(--till) !important; }
.label-danger, .bg-red { background-color: var(--void) !important; }
.label-warning, .bg-yellow { background-color: var(--tag) !important; color: var(--ink) !important; }
.label-primary { background-color: var(--ink) !important; }
.callout { border-radius: 10px; }
.bg-gray, .footer-total { background-color: var(--counter-deep) !important; color: var(--ink) !important; }

/* the date filter sits on the dark welcome band */
#dashboard_date_filter {
  background: rgba(252, 252, 250, 0.08);
  border-color: rgba(252, 252, 250, 0.35);
  color: var(--receipt);
}
#dashboard_date_filter:hover { background: rgba(252, 252, 250, 0.16); }
.alert { border-radius: 10px; }

/* ================= sign-in, registration and password pages ================= */
body.auth-shell { margin: 0; background: var(--receipt); }
.auth-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  min-height: 100vh;
}
.auth-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 40px 48px;
  overflow: hidden;
  background: var(--ink);
  color: var(--receipt);
}
.auth-panel__home { text-decoration: none; }
.auth-panel__logo { max-width: 160px; height: auto; }
.auth-panel__line { margin: 24px 0 0; max-width: 13ch; font-size: clamp(32px, 3.2vw, 44.8px); font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; }
.auth-panel__receipt { width: 300px; max-width: 100%; transform: rotate(-3deg); transform-origin: top left; }
.auth-panel__receipt .receipt__paper { box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.6); }
.auth-panel__note { margin-top: auto; color: rgba(252, 252, 250, 0.6); }

.auth-main { display: flex; flex-direction: column; min-width: 0; }
.auth-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  padding: 18px 40px;
  border-bottom: 1px solid var(--rule);
}
.auth-topbar__brand { display: none; text-decoration: none; }
.auth-topbar__lang { width: auto; min-width: 150px; }
.auth-topbar__switch { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--slate); }
.auth-topbar__switch a { font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.auth-body { flex: 1; padding: 48px 40px 64px; }

.auth-card { max-width: 420px; }
.auth-title { color: var(--ink); margin: 0 0 28px; font-size: 35.2px; font-weight: 800; letter-spacing: -0.01em; }
.auth-label { display: block; margin-bottom: 6px; }
.auth-shell .form-control { height: 44px; font-size: 16px; }
.auth-shell .form-group { margin-bottom: 18px; }
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 26px; }
.auth-actions .btn-login { padding: 11px 28px; font-size: 16px; background: var(--tag); border-color: var(--tag); color: var(--ink); }
.auth-actions .btn-login:hover { background: var(--tag-deep); border-color: var(--tag-deep); color: var(--ink); }
.auth-link { font-weight: 600; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.auth-demo { margin-top: 36px; }

/* older auth markup (password pages, registration) inside the new shell */
.auth-shell .login-form { float: none; width: 100%; max-width: 780px; padding: 0; }
.auth-shell .form-header,
.auth-shell .text-white { color: var(--ink) !important; }
.auth-shell .form-header { margin: 0 0 24px; font-size: 28.8px; font-weight: 800; line-height: 1.15; font-stretch: 112%; font-variation-settings: "wdth" 112; }
.auth-shell .right-col-content-register .form-header { font-size: 25.6px; }

/* registration steps (jQuery Steps): a real sequence, so the numbers stay.
   app.css pins the steps to 33% and the content to slate with !important. */
.auth-shell .wizard > .steps > ul { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-shell .wizard > .steps > ul > li { float: none; width: auto !important; flex: 1 1 150px; margin: 0; }
.auth-shell .wizard > .steps a { height: 100%; }
.auth-shell .wizard > .steps a,
.auth-shell .wizard > .steps a:hover,
.auth-shell .wizard > .steps a:active {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 650;
}
.auth-shell .wizard > .steps .current a,
.auth-shell .wizard > .steps .current a:hover { background: var(--ink); color: var(--receipt); }
.auth-shell .wizard > .steps .done a,
.auth-shell .wizard > .steps .done a:hover { background: var(--till-soft); color: var(--till); }
.auth-shell .wizard > .steps .disabled a { background: var(--counter); color: var(--slate); }
.auth-shell .wizard > .content {
  margin: 18px 0;
  min-height: 0;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--receipt) !important;
}
.auth-shell .wizard > .content > .body { position: relative; width: 100%; height: auto; padding: 22px; }
.auth-shell .wizard legend { margin-bottom: 18px; padding: 0 15px 10px; border-bottom: 1px solid var(--rule); color: var(--ink); font-size: 19.2px; font-weight: 750; }
.auth-shell .wizard > .actions a,
.auth-shell .wizard > .actions a:hover,
.auth-shell .wizard > .actions a:active {
  padding: 10px 22px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--receipt);
  font-weight: 650;
}
.auth-shell .wizard > .actions .disabled a { background: var(--counter); color: var(--slate); }
.auth-shell .wizard > .actions li:last-child a[href="#finish"] { background: var(--tag); color: var(--ink); }

@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
  .auth-topbar { padding: 14px 20px; }
  .auth-topbar__brand { display: inline-flex; margin-right: auto; }
  .auth-topbar__switch { margin-left: 0; width: 100%; }
  .auth-body { padding: 32px 20px 48px; }
  .auth-shell .wizard > .content > .body { padding: 16px 0; }
  .auth-shell .wizard legend { padding: 0 15px 10px; }
}

/* ================= POS sale screen (body.lockscreen) ================= */
body.lockscreen { background: var(--counter); }
.text-info { color: #2f5d8a !important; }

/* top bar: one quiet button style; close register keeps the void colour */
.pos-header .btn,
.pos-header .btn:focus {
  background: var(--receipt) !important;
  border: 1px solid var(--rule) !important;
  border-radius: 8px;
  color: var(--ink) !important;
}
.pos-header .btn:hover { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--receipt) !important; }
.pos-header #close_register { color: var(--void) !important; }
.pos-header #close_register:hover { background: var(--void) !important; border-color: var(--void) !important; color: #fff !important; }

/* product tiles */
.product_box {
  padding: 8px 6px 6px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--receipt);
  font-weight: 600;
  transition: border-color 0.12s ease;
}
.product_box:hover { border-color: var(--ink); }
.product_box .image-container { height: 64px; border-radius: 6px; }
.product_box .text { color: var(--ink); }

/* the cart */
#pos_table a, #pos_table .text-link { color: var(--ink) !important; font-weight: 600; }

/* action bar: the money buttons carry colour, everything else stays quiet */
.pos-form-actions {
  background: var(--receipt);
  border-top: 1px solid var(--rule);
  box-shadow: 0 -8px 20px -16px rgba(28, 27, 41, 0.45);
}
.pos-form-actions .btn {
  margin: 0 4px 6px 0;
  padding: 9px 14px;
  border: 1px solid var(--rule) !important;
  border-radius: 8px;
  background: var(--receipt) !important;
  color: var(--ink) !important;
  font-weight: 650;
}
.pos-form-actions .btn:hover { border-color: var(--ink) !important; }
.pos-form-actions [data-pay_method="card"],
.pos-form-actions #pos-finalize { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--receipt) !important; }
.pos-form-actions [data-pay_method="card"]:hover,
.pos-form-actions #pos-finalize:hover { background: var(--ink-soft) !important; }
.pos-form-actions [data-pay_method="cash"] { background: var(--till) !important; border-color: var(--till) !important; color: #fff !important; }
.pos-form-actions [data-pay_method="cash"]:hover { background: #17664a !important; }
.pos-form-actions #pos-cancel,
.pos-form-actions #pos-delete { color: var(--void) !important; }
.pos-form-actions #pos-cancel:hover,
.pos-form-actions #pos-delete:hover { background: var(--void-soft) !important; border-color: var(--void) !important; }

/* the total reads like the bottom line of a receipt */
.pos-total.bg-navy {
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--ink) !important;
  vertical-align: top;
}
.pos-total span.text { width: auto; margin-right: 10px; font-size: 12.8px; line-height: 1.2; color: rgba(252, 252, 250, 0.75); }
.pos-total span.number { font-family: var(--font-receipt); font-size: 28px; font-weight: 700; color: var(--tag); }
