/* Oregano ERP design system — Bootstrap 5 theme layer.
   Tokens lifted verbatim from the Figma file (Oregano ERP - Formis). */

:root {
  --oregano-maroon: rgb(118, 6, 25);
  --oregano-maroon-dark: rgb(94, 5, 20);
  --oregano-red: rgb(169, 0, 0);
  --oregano-olive: rgb(134, 137, 32);
  --oregano-olive-soft: rgba(134, 137, 32, 0.4);
  --oregano-olive-ink: rgb(46, 66, 1);
  --oregano-cream: rgb(250, 248, 241);
  --oregano-surface: rgb(251, 253, 255);
  --oregano-ink: rgb(0, 0, 0);
  --oregano-ink-80: rgba(0, 0, 0, 0.8);
  --oregano-ink-60: rgba(0, 0, 0, 0.6);
  --oregano-border: rgba(0, 0, 0, 0.2);
  --oregano-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  --oregano-sidebar-w: 280px;
  --oregano-topbar-h: 80px;

  --bs-primary: var(--oregano-maroon);
  --bs-primary-rgb: 118, 6, 25;
  --bs-body-font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--oregano-ink);
  --bs-link-color: var(--oregano-maroon);
  --bs-link-hover-color: var(--oregano-maroon-dark);
}

body {
  color: var(--oregano-ink);
}

a { color: var(--bs-link-color); }
a:hover { color: var(--bs-link-hover-color); }

.font-display {
  font-family: "Forum", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif;
  letter-spacing: -0.3px;
}

.font-ui {
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---- App shell: topbar + sidebar + content ---- */

.app-topbar {
  height: var(--oregano-topbar-h);
  background: #fff;
  box-shadow: var(--oregano-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-topbar__brand { display: flex; flex-direction: column; align-items: center; gap: 0; text-decoration: none; justify-content: center; }
.app-topbar__brand img { height: 65px; width: auto; margin-bottom: 0; }

.app-topbar__user { display: flex; align-items: center; gap: 14px; }
.app-topbar__avatar {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: var(--oregano-maroon);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Raleway", sans-serif;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.app-topbar__name { font-size: 14px; line-height: 1.2; }
.app-topbar__role { font-size: 12px; color: var(--oregano-ink-60); line-height: 1.2; }

.app-body { display: flex; align-items: flex-start; min-height: calc(100vh - var(--oregano-topbar-h)); }

.app-sidebar {
  width: var(--oregano-sidebar-w);
  flex-shrink: 0;
  background: var(--oregano-maroon);
  box-shadow: 4px 0 4px rgba(0, 0, 0, 0.25);
  height: calc(100vh - var(--oregano-topbar-h));
  overflow-y: auto;
  padding: 24px;
  position: sticky;
  top: var(--oregano-topbar-h);
}

.app-sidebar::-webkit-scrollbar {
  width: 4px;
}

.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.app-sidebar__group + .app-sidebar__group { margin-top: 28px; }
.app-sidebar__group-label {
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 10px;
  padding: 0 12px;
}

.app-sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  font-family: "Forum", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif;
  letter-spacing: 0.5px;
  text-decoration: none;
  margin-bottom: 4px;
  transition: background-color 0.15s ease;
}
.app-sidebar__link i {
  font-size: 18px;
  width: 24px;
  text-align: center;
  display: inline-block;
  color: rgba(255, 255, 255, 0.85);
}
.app-sidebar__link:hover { background: #5F4619; color: #fff; }
.app-sidebar__link:hover i { color: #fff; }
.app-sidebar__link.is-active { background: #5F4619; color: #fff; font-weight: 600; border-left: 4px solid #868920; }
.app-sidebar__link.is-active i { color: #fff; }

/* Expand/collapse chevron at the top of the sidebar — hidden on desktop
   where the sidebar is always fully shown (Figma tablet design,
   frame 1107-27529). */
.app-sidebar__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 auto 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease;
}
.app-sidebar__toggle:hover { background: #5F4619; }
.app-sidebar__toggle i { font-size: 14px; line-height: 1; }

.app-crumb {
  background: var(--oregano-maroon);
  box-shadow: var(--oregano-shadow);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Raleway", sans-serif;
  font-size: 12px;
  text-transform: capitalize;
  gap: 8px;
  position: sticky;
  top: var(--oregano-topbar-h);
  z-index: 40;
}
.app-crumb a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.app-crumb a:hover { color: #fff; }
.app-crumb__current { color: #fff; font-weight: 700; }

.app-main { flex: 1; min-width: 0; min-height: calc(100vh - var(--oregano-topbar-h)); display: flex; flex-direction: column; }
.app-content {
  background: var(--oregano-surface);
  padding: 48px 40px;
  margin: 0;
  flex: 1;
  min-height: 0;
}

/* ---- Page header ---- */

.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.page-header__title { font-size: 32px; margin: 0; line-height: 1.1; }
.page-header__subtitle { font-size: 13px; color: var(--oregano-ink-60); margin: 4px 0 0; }

/* ---- Cards ---- */

.card-oregano {
  background: #fff;
  box-shadow: inset 0 0 0 0.2px var(--oregano-border), var(--oregano-shadow);
  border: none;
  border-radius: 0;
  padding: 24px;
}
.card-oregano__title { font-size: 26px; font-weight: 500; margin: 0 0 16px; }

/* ---- Tables ---- */

.table > thead {
  background-color: #868920 !important;
  color: #fff !important;
}
.table > thead > tr > th {
  background-color: #868920 !important;
  color: #fff !important;
  border: none !important;
  border-bottom: 2px solid rgba(0, 0, 0, 0.15) !important;
  font-family: "Forum", Georgia, serif;
  font-weight: 400;
  font-size: 18px;
  text-transform: capitalize;
  vertical-align: middle;
  padding: 18px 20px;
}
.table > tbody > tr > td {
  padding: 14px 20px;
  vertical-align: middle;
  font-size: 14px;
  border-bottom: 1px solid var(--oregano-border);
}
.table > tbody > tr:last-child > td { border-bottom: none; }
.table { box-shadow: var(--oregano-shadow); border: 1px solid var(--oregano-border); }

/* ---- Pagination (Figma "Frame 329") ---- */

/* Olive-outlined page boxes; the active page fills solid olive. */
.oregano-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.oregano-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--oregano-olive);
  font-family: "Raleway", sans-serif;
  font-size: 13px;
  color: var(--oregano-ink);
  text-decoration: none;
}
.oregano-page-nav i { color: var(--oregano-maroon); }
.oregano-page-nav:hover { background: rgba(134, 137, 32, 0.12); color: var(--oregano-ink); }
.oregano-page-boxes {
  display: inline-flex;
  gap: 8px;
}
.oregano-page-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--oregano-olive);
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--oregano-ink);
  text-decoration: none;
}
a.oregano-page-box:hover { background: rgba(134, 137, 32, 0.12); color: var(--oregano-ink); }
.oregano-page-box.is-current {
  background: var(--oregano-olive);
  color: #fff;
}
.oregano-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--oregano-olive);
  color: var(--oregano-ink-60);
}

/* Mobile: one row no matter how many pages — never wraps; swipes
   horizontally when the bar is wider than the screen. */
@media (max-width: 768px) {
  .oregano-pagination {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    max-width: 100%;
    padding-bottom: 4px;
  }
  .oregano-page-nav {
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }
  .oregano-page-nav span { display: none; }
  .oregano-page-box,
  .oregano-page-ellipsis {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    font-size: 11px;
  }
}

/* ---- Badges ---- */

/* LPO status pills (Figma badge variants 358:5292/96/98/300): each
   status is a pill of its own hue — solid color text on a 40% tint of
   the same color, 2px corners. Shared shape via the [class*=] rule. */
[class*="lpo-badge-"] {
  display: inline-block;
  min-width: 120px;
  text-align: center;
  font-family: "Raleway", sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 2px;
  padding: 3px 10px;
}
.lpo-badge-pending { background: rgba(206, 69, 0, 0.4); color: #ce4500; }
.lpo-badge-partial { background: rgba(95, 70, 25, 0.4); color: #5f4619; }
.lpo-badge-completed { background: rgba(46, 66, 1, 0.4); color: #2e4201; }
.lpo-badge-cancelled { background: rgba(169, 0, 0, 0.4); color: #a90000; }

.badge-status-active {
  background: var(--oregano-olive-soft);
  color: var(--oregano-olive-ink);
  font-weight: 400;
  font-size: 13px;
  text-transform: capitalize;
  border-radius: 0;
  padding: 5px 12px;
}
.badge-status-inactive {
  background: rgba(0, 0, 0, 0.08);
  color: var(--oregano-ink-60);
  font-weight: 400;
  font-size: 13px;
  text-transform: capitalize;
  border-radius: 0;
  padding: 5px 12px;
}

/* ---- Buttons ---- */

.btn-primary { background-color: var(--oregano-maroon); border-color: var(--oregano-maroon); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--oregano-maroon-dark) !important;
  border-color: var(--oregano-maroon-dark) !important;
}
.btn-outline-primary { background-color: #877555; border: none; color: #fff; border-radius: 0 !important; }
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
  background-color: #6d5e44 !important;
  border: none !important;
  color: #fff !important;
}
.btn-outline-secondary { background: transparent; border: 1px solid #877555; color: #877555; border-radius: 0 !important; }
.btn-outline-secondary:hover, .btn-outline-secondary:focus, .btn-outline-secondary:active {
  background-color: #6d5e44 !important;
  border-color: #6d5e44 !important;
  color: #fff !important;
}
.btn-secondary { background: transparent; border: 1px solid #877555; color: #877555; border-radius: 0 !important; }
.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
  background-color: #6d5e44 !important;
  border-color: #6d5e44 !important;
  color: #fff !important;
}
.btn { border-radius: 4px; font-family: "Forum", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif !important; letter-spacing: 1px; }

/* ---- Brown Add Button ---- */

.btn-add { background-color: #877555; border-color: #877555; color: #fff; border-radius: 0 !important; }
.btn-outline-success { border-radius: 0 !important; }
.btn-add:hover, .btn-add:focus, .btn-add:active {
  background-color: #6d5e44 !important;
  border-color: #6d5e44 !important;
  color: #fff !important;
}
.btn-add i {
  font-size: 1.3em;
  vertical-align: -0.15em;
  display: inline-block;
  line-height: 1;
}

/* ---- Navbar Logout Button ---- */

#nav-logout-btn { border-radius: 4px !important; }
.page-header .btn {
  align-items: center;
  display: inline-flex;
  height: 38px;
}

/* ---- Stat / placeholder chart cards (Home dashboard) ---- */

.stat-card {
  background: #fff;
  box-shadow: inset 0 0 0 0.2px var(--oregano-border), var(--oregano-shadow);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.stat-card__label { font-size: 12px; color: var(--oregano-ink-60); }
.stat-card__value { font-size: 24px; font-weight: 700; font-family: "Forum", serif; }
.stat-card__delta { font-size: 12px; }
.stat-card__delta.is-up { color: rgb(0, 99, 38); }
.stat-card__delta.is-down { color: rgb(116, 0, 0); }

.chart-placeholder {
  height: 177px;
  border: 1px dashed var(--oregano-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--oregano-ink-60);
  font-size: 12px;
  text-align: center;
  background: repeating-linear-gradient(135deg, rgba(0,0,0,0.03) 0 10px, transparent 10px 20px);
}

/* ---- Detail page field rows (Outlet Details) ---- */

.field-row { margin-bottom: 20px; }
.field-row__label {
  font-size: 12px;
  color: var(--oregano-ink-60);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 4px;
}
.field-row__value { font-size: 16px; margin: 0; }
.field-row__value.is-placeholder { color: var(--oregano-ink-60); font-style: italic; font-size: 14px; }

/* ---- Auth screen ---- */

.auth-shell {
  min-height: calc(100vh - var(--oregano-topbar-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--oregano-cream);
  padding: 40px 16px;
  gap: 24px;
}
.auth-card {
  background: #fff;
  box-shadow: inset 0 0 0 0.2px var(--oregano-border), var(--oregano-shadow);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

/* ---- Search inputs ---- */

.app-search {
  position: relative;
  width: 300px;
}
.app-search input {
  padding-left: 42px;
  width: 100%;
}
.app-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--oregano-ink-60);
  font-size: 16px;
  pointer-events: none;
}

/* ---- Form inputs Forum font ---- */

.form-control, .form-select {
  font-family: "Forum", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif !important;
  border-radius: 0 !important;
}

.form-control::placeholder {
  font-family: "Forum", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif;
  opacity: 1;
  color: #a5a5a5;
}

/* Form input focus with green highlight */
.form-control:focus {
  border-color: #868920 !important;
  box-shadow: 0 0 0 0.25rem rgba(134, 137, 32, 0.25) !important;
}

.form-select {
  border-radius: 0 !important;
}

.form-select:focus {
  border-color: #868920 !important;
  box-shadow: 0 0 0 0.25rem rgba(134, 137, 32, 0.25) !important;
}

.form-check-input {
  border-radius: 0;
}

.form-check-input:focus {
  border-color: #868920;
  box-shadow: 0 0 0 0.25rem rgba(134, 137, 32, 0.25);
}

/* Checkbox checked state with green tick */
.form-check-input:checked {
  background-color: #868920;
  border-color: #868920;
}

/* Switch toggle (inhouse prepared item) — clean pill toggle with white knob */
.form-switch {
  padding-left: 0;
  display: inline-flex;
  align-items: center;
}

.form-switch .form-check-input {
  width: 46px;
  height: 24px;
  margin-top: 0;
  margin-left: 0;
  border-radius: 24px;
  border: 1px solid #5a5a5a;
  background-color: #5a5a5a;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: contain;
  transition: background-position 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
  cursor: pointer;
  box-shadow: none;
  flex-shrink: 0;
}

.form-switch .form-check-input:checked {
  background-color: var(--oregano-olive);
  border-color: var(--oregano-olive);
  background-position: right center;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:focus {
  border-color: #868920;
  box-shadow: 0 0 0 0.2rem rgba(134, 137, 32, 0.25);
}

.cursor-pointer {
  cursor: pointer;
}

/* ---- Tom Select (searchable dropdowns) — match the app's input look ----
   The widget's control is .ts-control, not .form-select, so the overrides
   above don't reach it: square corners, Forum font, olive hover/focus. */

.ts-wrapper .ts-control {
  font-family: "Forum", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif !important;
  border-radius: 0 !important;
}

/* Placeholder in the search input: same look as .form-control::placeholder. */
.ts-wrapper .ts-control > input::placeholder {
  font-family: "Forum", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif;
  opacity: 1;
  color: #a5a5a5;
}

/* Hover: the same olive border as .form-select:focus above (no glow until
   the widget actually has focus). */
.ts-wrapper:hover .ts-control,
.ts-wrapper.focus .ts-control {
  border-color: #868920 !important;
}

.ts-wrapper.focus .ts-control {
  box-shadow: 0 0 0 0.25rem rgba(134, 137, 32, 0.25) !important;
}

.ts-dropdown {
  font-family: "Forum", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif !important;
  border-radius: 0 !important;
}

/* Hovered/active option: the app's olive-soft highlight (same pairing as
   the olive badges) instead of the theme's flat gray. */
.ts-dropdown .active {
  background-color: var(--oregano-olive-soft) !important;
  color: var(--oregano-olive-ink) !important;
}

/* The wizard tables are .table-responsive (overflow: auto), which clips the
   dropdown and hangs scrollbars on the table while it's open — let it
   escape on desktop; phones keep the table's own horizontal scroll. */
@media (min-width: 768px) {
  #line-formset-container .table-responsive {
    overflow: visible;
  }
}

/* Open the item dropdown ABOVE the control (the theme's default is below,
   where it covers the rows underneath). Flipped edge: restore the top
   border the theme removes for below-placement, and mirror the shadow. */
.line-form-row .ts-dropdown {
  top: auto !important;
  bottom: 100% !important;
  margin: 0 0 0.25rem !important;
  border: 1px solid var(--bs-border-color) !important;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1) !important;
}


/* ---- HTMX loading indicators ---- */

.htmx-indicator {
  display: none;
  font-size: 14px;
  color: var(--oregano-ink-60);
  margin-left: 8px;
}
.htmx-request .htmx-indicator {
  display: inline;
}
.htmx-request .htmx-requesting {
  opacity: 0.6;
  pointer-events: none;
}

/* Circular loading spinner inside search box */
.loading-spinner {
  display: none;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--oregano-ink-60);
}

/* Responsive for mobile — per the Figma tablet design: the sidebar
   docks as a narrow icon rail; the chevron expands it into the full
   menu as an overlay. */
@media (max-width: 991.98px) {
  /* Compact topbar on small screens: the desktop row (65px logo +
     avatar + name + email + logout) overflows narrow viewports, which
     caused a horizontal scrollbar and a gap under the rail (the rail's
     height is keyed to --oregano-topbar-h, so the var follows). */
  :root { --oregano-topbar-h: 60px; }

  body { overflow-x: hidden; }

  .app-topbar { padding: 8px 12px; }
  .app-topbar__brand img { height: 40px; }
  .app-topbar__user { gap: 6px; min-width: 0; justify-content: flex-end; }
  .app-topbar__user div { min-width: 0; }
  .app-topbar__user .btn { flex-shrink: 0; white-space: nowrap; }
  .app-topbar__avatar { width: 28px; height: 28px; font-size: 10px; }
  .app-topbar__name { font-size: 12px; }
  .app-topbar__role { font-size: 10px; }
  .app-topbar__name,
  .app-topbar__role {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-content { padding: 32px 20px; }

  .app-body { min-height: calc(100vh - var(--oregano-topbar-h)); min-height: calc(100dvh - var(--oregano-topbar-h)); }

  .app-sidebar {
    width: 56px;
    padding: 12px 8px;
    height: calc(100vh - var(--oregano-topbar-h));
    height: calc(100dvh - var(--oregano-topbar-h));
  }

  .app-sidebar__toggle { display: inline-flex; }

  /* Icon rail: labels and group headings hide, links center on icons.
     The group heading becomes an olive 3x3 round-dot grid — the
     design's group marker for the collapsed rail (Figma tablet frame). */
  .app-sidebar__link { justify-content: center; padding: 10px 0; }
  .app-sidebar__link span { display: none; }
  .app-sidebar__group-label {
    display: flex;
    justify-content: center;
    padding: 0;
    color: transparent;
    font-size: 0; /* keep the accessible text, drop its layout width */
  }
  .app-sidebar__group-label::before {
    content: "";
    display: block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    /* 3x3 round dots, per the design's "apps" vector: ~3.6px dots on a
       ~5.3px pitch */
    background-image: radial-gradient(circle, var(--oregano-olive) 1.8px, transparent 2.1px);
    background-size: 5.33px 5.33px;
  }

  /* Expanded: full menu overlays the content — plain text headings, no dots */
  .app-sidebar.is-expanded {
    position: fixed;
    left: 0;
    top: var(--oregano-topbar-h);
    width: var(--oregano-sidebar-w);
    height: calc(100vh - var(--oregano-topbar-h));
    height: calc(100dvh - var(--oregano-topbar-h));
    z-index: 1050;
    box-shadow: 8px 0 16px rgba(0, 0, 0, 0.3);
  }
  .app-sidebar.is-expanded .app-sidebar__toggle { margin-left: 12px; }
  .app-sidebar.is-expanded .app-sidebar__link { justify-content: flex-start; padding: 10px 12px; }
  .app-sidebar.is-expanded .app-sidebar__link span { display: inline; }
  .app-sidebar.is-expanded .app-sidebar__group-label {
    display: block;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
  }
  .app-sidebar.is-expanded .app-sidebar__group-label::before { display: none; }
}

/* ---- Purchase invoice wizard ---- */

.page-title { font-size: 28px; }

/* Document context strip — reusable: horizontal label/value pairs under
   the page title. Label/value styling follows the dashboard design's
   chips: 12px muted label over a 15px semibold value. Markup contract
   (as in invoice_detail / invoice_form / kitchen_sheet_detail): each
   pair is <div><div>Label</div><div>Value</div></div>, separators are
   bare <i> icons between pairs. */
.doc-context {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.doc-context > div > div:first-child {
  font-size: 12px;
  color: var(--oregano-ink-60);
}

.doc-context > div > div:last-child {
  font-size: 15px;
  font-weight: 600;
}

/* Colored section bars  */
.section-bar {
  font-size: 1.4rem;
  letter-spacing: 0.05em;
}
.section-bar--olive { background-color: var(--oregano-olive); }
.section-bar--red { background-color: #a90000; }

.section-title { font-size: 24px; }

/* Invoice wizard step indicator — the two-half progress bar between the
   header fields and the received-items table. Static per step section
   (each step section carries its own pre-rendered state), so Proceed
   just swaps sections and no JS state needs flipping. */
.invoice-step-bar {
  display: flex;
  border: 1px solid var(--oregano-olive-soft);
  background-color: rgba(134, 137, 32, 0.1);
}

.invoice-step {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: var(--oregano-ink-60);
}

.invoice-step__badge {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--oregano-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
}

.invoice-step__label { display: block; font-size: 0.85rem; }
.invoice-step__title {
  display: block;
  margin-top: 0.35rem;
  font-family: "Forum", Georgia, serif;
  font-size: 1.25rem;
}

/* Active step: filled olive badge, dark text. Done step: the same filled
   badge with a checkmark instead of the number. */
.invoice-step.is-active,
.invoice-step.is-done {
  color: var(--oregano-ink);
}
.invoice-step.is-active .invoice-step__badge,
.invoice-step.is-done .invoice-step__badge {
  background-color: var(--oregano-olive);
  border-color: var(--oregano-olive);
  color: #fff;
}

/* A done step is also an exit back to its section (step 2's bar only) —
   hover affordance matches the bar's own tint, one notch stronger. */
.invoice-step--link { cursor: pointer; }
.invoice-step--link:hover { background-color: rgba(134, 137, 32, 0.18); }

/* The "Step N of 2" pill beside the Received items heading. */
.invoice-step-count {
  background-color: var(--oregano-olive-soft);
  color: var(--oregano-olive-ink);
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 2px;
  white-space: nowrap;
}

/* Field label + field box — the shared label-over-value pattern: a
   font-display label above either a bordered value box (.field-box) or a
   form input. Shared by the LPO / petty-cash / invoice wizards' header
   recaps, the invoice wizard's mismatch amount rows, and its form field
   labels (replaces the inline font-size/border-color styles previously
   copy-pasted per template). */
.field-label {
  color: #212529;
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
  font-family: "Forum", Georgia, serif;
}

/* Crispy-rendered forms label their fields with Bootstrap's .form-label —
   give those the same face and size as .field-label so every form's
   labels match. */
.form-label {
  font-family: "Forum", Georgia, serif;
  font-size: 1.2rem;
}

.field-box {
  border: 1px solid var(--oregano-border);
  padding: 0.5rem;
  color: #212529;
  white-space: pre-wrap;
  /* anywhere (not break-word) also shrinks min-content sizing, so a long
     unbroken value (LPO number, TRN) wraps instead of forcing its column
     wider than its grid share. */
  overflow-wrap: anywhere;
}

/* Any input contradicting its source — invoice price vs PO price,
   received qty vs pending quantity — wears the mismatch red border.
   !important mirrors .form-control:focus's own olive glow above; the
   focus ring is the same red at 25%. */
.mismatch-input,
.mismatch-input:focus {
  border-color: var(--oregano-red);
}
.mismatch-input:focus {
  border-color: var(--oregano-red) !important;
  box-shadow: 0 0 0 0.2rem rgba(169, 0, 0, 0.25) !important;
}

/* Optional stronger variant: paint the whole field, not just the border
   (step 2's mismatching price cell). */
.mismatch-input-filled,
.mismatch-input-filled:focus {
  background-color: var(--oregano-red);
  color: #fff;
}

/* Wizard decision buttons: flat squares (no border radius), each with
   its own hover shade. Post's hover = --oregano-olive-ink token. */
.btn-invoice-post,
.btn-invoice-hold,
.btn-invoice-reject {
  color: #fff;
  border-radius: 0;
}
.btn-invoice-post {
  background-color: #6c6d43;
  border-color: #6c6d43;
}
.btn-invoice-post:hover,
.btn-invoice-post:focus {
  background-color: var(--oregano-olive-ink);
  border-color: var(--oregano-olive-ink);
  color: #fff;
}
.btn-invoice-hold {
  background-color: #877555;
  border-color: #877555;
}
.btn-invoice-hold:hover,
.btn-invoice-hold:focus {
  background-color: #5c5240;
  border-color: #5c5240;
  color: #fff;
}
.btn-invoice-reject {
  background-color: #7a3636;
  border-color: #7a3636;
}
.btn-invoice-reject:hover,
.btn-invoice-reject:focus {
  background-color: #a90000;
  border-color: #a90000;
  color: #fff;
}
.btn-invoice-post:disabled,
.btn-invoice-hold:disabled,
.btn-invoice-reject:disabled {
  /* Disabled = clearly present but greyed out: solid neutral grey, no
     Bootstrap opacity fade (which read as "button missing"). */
  background-color: #999999;
  border-color: #999999;
  color: #fff;
  opacity: 1;
  cursor: not-allowed;
}

/* Invoice wizard table column widths. */
#invoice-line-table th:nth-child(1) { width: 28%; }
#invoice-line-table th:nth-child(2) { width: 12%; }
#invoice-line-table th:nth-child(3) { width: 12%; }
#invoice-line-table th:nth-child(4) { width: 14%; }
#invoice-line-table th:nth-child(5) { width: 12%; }
#invoice-line-table th:nth-child(6) { width: 14%; }

#invoice-review-table th:nth-child(1) { width: 18%; }
#invoice-review-table th:nth-child(2) { width: 9%; }
#invoice-review-table th:nth-child(3) { width: 9%; }
#invoice-review-table th:nth-child(4) { width: 9%; }
#invoice-review-table th:nth-child(5) { width: 8%; }
#invoice-review-table th:nth-child(6) { width: 8%; }
#invoice-review-table th:nth-child(7) { width: 9%; }
#invoice-review-table th:nth-child(8) { width: 13%; }
#invoice-review-table th:nth-child(9) { width: 11%; }

/* Numeric entry in the line-item tables: the invoice price keeps a
   usable width on small windows — the .table-responsive wrapper scrolls
   horizontally instead of squeezing it into a sliver. */
#invoice-line-table input[name$="invoice_price"],
#invoice-review-table input[name$="invoice_price"] {
  min-width: 7.5rem;
}

/* LPO + petty cash wizard table column widths (the two wizards share the
   #line-items-table id, so scope by their form ids). */
#lpo-create-form #line-items-table th:nth-child(1) { width: 35%; }
#lpo-create-form #line-items-table th:nth-child(2) { width: 12%; }
#lpo-create-form #line-items-table th:nth-child(3) { width: 12%; }
#lpo-create-form #line-items-table th:nth-child(4) { width: 12%; }
#lpo-create-form #line-items-table th:nth-child(5) { width: 17%; }

#petty-cash-form #line-items-table th:nth-child(1) { width: 32%; }
#petty-cash-form #line-items-table th:nth-child(2) { width: 12%; }
#petty-cash-form #line-items-table th:nth-child(3) { width: 13%; }
#petty-cash-form #line-items-table th:nth-child(4) { width: 20%; }
#petty-cash-form #line-items-table th:nth-child(5) { width: 23%; }

/* Wizard totals tables: label/value halves, rule above the total row. */
#lpo-totals-table td,
#petty-cash-totals-table td { width: 50%; }
#lpo-totals-table tr.fw-bold td,
#petty-cash-totals-table tr.fw-bold td { border-top: 1px solid #dee2e6; }

/* Calendar filtering styles — the LPO list's date/month filters are native
   date inputs, which ignore the placeholder attribute: the hint ("Month",
   "From date", "To date") is overlaid via data-hint while the field is
   empty and hides on focus or once a value is picked. The right inset
   leaves the native calendar-picker icon visible. The .has-value toggling
   script lives in the lpo_list template. */
.date-hint { position: relative; }
.date-hint:not(:focus):not(.has-value)::before {
  content: attr(data-hint);
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 2.25rem;
  padding: 0.375rem 0 0 0.75rem;
  color: #212529;
  background: #fff;
  pointer-events: none;
}

/* Tom Select scrolls inside .ts-dropdown-content — the theme caps THAT at
   200px (overflow: hidden auto), so these caps go on it directly. The
   outer .ts-dropdown just wraps it and never grows past the inner cap,
   and no extra overflow rules are needed (the theme's default scrolls). */

/* Inside the Add supplier & price modal: cap the dropdown so it stays
   within the modal (modal-content clips overflowing children). */
#addSupplierModal .ts-dropdown-content {
  max-height: 240px;
}

/* Mapping form: the item dropdown spans every item, so cap the list and
   let it scroll (otherwise it can run past the viewport). */
#supplieritem-form .ts-dropdown-content {
  max-height: 320px;
}

/* Add / Edit Outlet Form — segmented toggle groups (Brand, Status).
   Banners, buttons, title, labels and inputs reuse the shared classes
   (.section-bar--olive, .btn-add, .btn-outline-secondary, .field-label,
   .form-control) — only the toggles have no existing equivalent. */
.toggle-group {
  display: flex;
  gap: 16px;
  width: 100%;
}

.toggle-btn {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 8px 16px;
  background-color: #ffffff;
  border: 1px solid var(--oregano-border);
  border-radius: 0px;
  font-family: "Forum", Georgia, serif;
  font-size: 16px;
  color: #777777;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease-in-out;
  text-align: center;
  text-decoration: none;
}

.toggle-btn:hover {
  background-color: #f7f7f7;
  border-color: #555555;
  color: #333333;
}

.toggle-btn.is-selected {
  background-color: var(--oregano-olive);
  border-color: var(--oregano-olive);
  color: #ffffff;
  font-weight: 500;
}

.toggle-btn input[type="checkbox"] {
  display: none;
}

/* ---- Outlet Detail Screen ---- */

/* Overview tab bar (Figma "Outlets Details"): only Overview exists today.
   Tabs split the full row evenly; the last one lands on the right edge. */
.outlet-detail-tabs {
  display: flex;
  margin-bottom: 24px;
}
.outlet-detail-tabs span {
  flex: 1;
  text-align: center;
  padding: 8px 16px;
  font-family: "Forum", Georgia, serif;
  font-size: 16px;
  color: var(--oregano-ink);
  border-bottom: 2px solid transparent;
}
.outlet-detail-tabs span.is-active {
  color: var(--oregano-maroon);
  border-bottom-color: var(--oregano-maroon);
}

/* Info Grid Item */
.outlet-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.outlet-info-icon {
  flex-shrink: 0;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.outlet-info-icon i {
  font-size: 22px;
  color: #760619;
  line-height: 1;
}

.outlet-info-label {
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #1a1a1a;
  line-height: 1.2;
  margin-bottom: 12px;
}

.outlet-info-value {
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #212529;
  line-height: 1.4;
}

.outlet-info-value.is-placeholder {
  color: var(--oregano-ink-60);
  font-style: italic;
}

/* ------------------------------------------------------------------ */
/* Item packings picker (§4.5 card design)                             */
/* ------------------------------------------------------------------ */

.packings-count-badge {
  background-color: var(--oregano-olive-soft);
  color: var(--oregano-olive-ink);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  white-space: nowrap;
}

.packing-assigned-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: #f4f6ea;
  border: 1px solid var(--oregano-olive);
  border-radius: 0;
  padding: 14px 16px;
  height: 100%;
}

.packing-card-title {
  font-family: "Forum", Georgia, serif;
  font-size: 17px;
  color: #222222;
}

.packing-card-figure {
  font-size: 13px;
  color: #6b7280;
}

.packing-remove-btn {
  background: none;
  border: none;
  color: var(--oregano-maroon);
  font-size: 14px;
  padding: 0;
  cursor: pointer;
}

.packing-remove-btn:hover {
  color: var(--oregano-red);
}

.packing-select-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--oregano-border);
  border-radius: 0;
  background-color: #ffffff;
  padding: 14px 16px;
  height: 100%;
  cursor: pointer;
  transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.packing-select-card:hover {
  border-color: var(--oregano-olive);
}

.packing-select-card.is-selected {
  border-color: var(--oregano-olive);
  background-color: #f4f6ea;
}

.packing-card-checkbox {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  margin-top: 0;
}

.packings-search-wrap {
  position: relative;
  width: min(420px, 100%);
}

.packings-search-wrap .bi {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 13px;
}

.packings-search-wrap .form-control {
  padding-left: 30px;
}

/* ---- Prepared Price Uploads (Figma Redesign) ---- */
.upload-section-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  margin-bottom: 0.85rem;
}

.upload-dropzone {
  background-color: #fafbfd;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
}

.upload-dropzone.is-dragover {
  border-color: var(--oregano-maroon, #760619);
  background-color: #fdf2f4;
}

.upload-dropzone.has-file {
  border-color: #198754;
  background-color: #f6fbf8;
}

.upload-dropzone__input {
  cursor: pointer;
}

.upload-rules-card {
  background-color: #fdfbf3;
  border: 1px solid #ebdcb9;
  border-radius: 8px;
  padding: 18px 20px;
}

.upload-rules-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #855b18;
  margin-bottom: 10px;
}

.upload-rules-card__list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  font-size: 0.85rem;
  line-height: 1.75;
  color: #6e6456;
}

.upload-history-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px 20px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.upload-history-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.upload-history-card__title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
}

.upload-history-card__title:hover {
  color: #0f172a;
  text-decoration: underline;
}

.upload-history-card__meta {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 4px;
}

.upload-history-card__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.82rem;
}

.badge-status-pill-success {
  background-color: #e8f7ee;
  color: #1e7e34;
  border: 1px solid #c3e6cb;
  border-radius: 50rem;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status-pill-warning {
  background-color: #fef3d6;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: 50rem;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status-pill-danger {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 50rem;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status-pill-info {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 50rem;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
}


/* ---- Home dashboard (Figma "Dashboard" frames) ---- */

.kpi-card {
  background: #fff;
  box-shadow: inset 0 0 0 0.2px var(--oregano-border), var(--oregano-shadow);
  padding: 16px 18px;
  flex: 1 1 150px;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-card__head { display: flex; align-items: flex-start; gap: 10px; }

.kpi-card__icon {
  color: var(--oregano-ink);
  font-size: 18px;
  line-height: 1.2;
}

.kpi-card__label { font-size: 13px; font-weight: 600; line-height: 1.25; }

/* Design: KPI values are Raleway 700 @24 — the only big figures NOT
   in the Forum display face. */
.kpi-card__value { font-size: 24px; font-weight: 700; line-height: 1.1; margin: 0; }

.kpi-card__delta { font-size: 12px; margin: 0; }

.report-filter {
  background: #fff;
  box-shadow: inset 0 0 0 0.2px var(--oregano-border), var(--oregano-shadow);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.report-filter__title { font-size: 26px; }

.report-filter .form-select,
.report-filter .form-control { min-width: 220px; width: auto; }

/* Olive period badge on the dashboard's Business Overview cards
   ("September 2026"). */
.period-badge {
  background: var(--oregano-olive-soft);
  color: var(--oregano-olive-ink);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.home-search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--oregano-ink-60);
  pointer-events: none;
}

/* Design: "Search Item" placeholder is Forum 14. */
#home-item-search::placeholder {
  font-family: "Forum", serif;
  font-size: 14px;
  color: var(--oregano-ink-60);
}


/* ---- Recent Activities timeline (home dashboard) ---- */

.activity-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* The vertical connector running through the chips. */
.activity-timeline::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 17px;
  width: 2px;
  background: #eceef2;
}

.activity-timeline__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  padding: 0 0 22px;
}

.activity-timeline__item:last-child { padding-bottom: 0; }

.activity-chip {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.activity-chip--green { background: #e4f3e8; color: #2e7d43; }
.activity-chip--blue { background: #e7eefc; color: #3565c4; }
.activity-chip--amber { background: #fdf1dd; color: #b0761a; }
.activity-chip--red { background: #fce8e8; color: #c0392b; }
.activity-chip--olive { background: #f1f2e2; color: #75781c; }
.activity-chip--grey { background: #eef0f2; color: #5f6b76; }

.activity-timeline__body { min-width: 0; padding-top: 7px; }

.activity-timeline__text {
  font-family: "Raleway", sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #1c1c1c;
  overflow-wrap: anywhere;
}

.activity-timeline__when {
  font-family: "Raleway", sans-serif;
  font-size: 13px;
  color: #9aa1a9;
  margin-top: 3px;
}

/* ---- Pending Approval card (Executive Chef's home view) — stock
   updates awaiting the final approval. Plain text rows per the Figma
   card ("Sarah Johnson / Leave Request · 5 days"), with an eye icon
   instead of the mock's tick/cross — the icon is the path to the
   detail page where the real Approve button lives. ---- */

.pending-approval-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pending-approval-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
}

.pending-approval-item + .pending-approval-item { border-top: 1px solid #eef0f2; }

.pending-approval-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pending-approval-text {
  font-family: "Raleway", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #1c1c1c;
}

.pending-approval-when {
  font-family: "Raleway", sans-serif;
  font-size: 12px;
  color: #9aa1a9;
  margin-top: 2px;
}

.pending-approval-days {
  margin-left: auto;
  flex: 0 0 auto;
  font-family: "Raleway", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1c1c1c;
  white-space: nowrap;
}

.pending-approval-view {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
  color: var(--oregano-olive-ink);
  background: var(--oregano-olive-soft);
}

.pending-approval-view:hover {
  color: #fff;
  background: var(--oregano-olive-ink);
}

/* Round remove-line button (minus), shared with stock update's
   .stock-remove-circle-btn — kept visually identical so a line's
   remove affordance reads the same in both flows. */
.lpo-remove-line-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50% !important;
  background-color: #8c051a;
  color: #ffffff !important;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(140, 5, 26, 0.3);
  padding: 0;
  flex-shrink: 0;
  text-decoration: none;
}

.lpo-remove-line-btn i,
.lpo-remove-line-btn svg {
  font-size: 18px;
  line-height: 1;
  display: block;
}

.lpo-remove-line-btn:hover {
  background-color: #6d0313;
  transform: scale(1.06);
  box-shadow: 0 4px 8px rgba(140, 5, 26, 0.4);
}

.lpo-remove-line-btn:active {
  transform: scale(0.95);
}


/* ---- Kitchen inventory sheet (detail) — Figma frame 1151-25249 ---- */

.ks-tabs {
  display: flex;
  gap: 8px;
  border: 1px solid var(--oregano-border);
  border-radius: 0;
  padding: 6px;
  background: #fff;
  margin-bottom: 24px;
}
.ks-tabs a {
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: var(--oregano-ink-60);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ks-tabs a:hover { color: var(--oregano-ink); background: var(--oregano-cream); }
.ks-tabs a.is-active { background: var(--oregano-maroon); color: #fff; }

.ks-kpi-card {
  flex: 1 1 0;
  min-width: 200px;
  padding: 16px 18px;
}
.ks-kpi-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ks-kpi-card__title {
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--oregano-ink-80);
}
.ks-kpi-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--oregano-maroon);
  flex-shrink: 0;
}
.ks-kpi-card__dot.is-pos { background: rgb(0, 99, 38); }
.ks-kpi-card__dot.is-neg { background: rgb(116, 0, 0); }
.ks-kpi-card__value {
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  font-size: 30px;
  color: #111;
  margin-top: 10px;
}
.ks-kpi-card__value small { font-size: 10px; font-weight: 400; color: var(--oregano-ink-60); margin-left: 4px; }
.ks-kpi-card__caption { font-size: 10px; color: var(--oregano-ink-60); margin-top: 8px; }

.ks-section-title {
  font-family: "Forum", Georgia, serif;
  font-size: 28px;
  color: #111;
  margin: 40px 0 2px;
}
.ks-section-subtitle { font-size: 12px; color: var(--oregano-ink-60); margin-bottom: 16px; }

.ks-panel {
  padding: 20px;
}
.ks-panel__label {
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--oregano-olive);
  margin-bottom: 14px;
}
.ks-panel__heading { font-family: "Raleway", sans-serif; font-weight: 600; font-size: 13px; color: #111; }
.ks-panel__note { font-size: 11px; color: var(--oregano-ink-60); border-top: 1px solid var(--oregano-border); padding-top: 10px; margin-top: 14px; }

.ks-summary-card {
  padding: 18px 20px;
  height: 100%;
}
.ks-summary-card__title {
  font-family: "Forum", Georgia, serif;
  font-size: 20px;
  color: #111;
  border-top: 3px solid var(--oregano-olive);
  padding-top: 10px;
  margin-bottom: 6px;
}
.ks-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
}
.ks-summary-row:last-child { border-bottom: none; }
.ks-summary-row__label { color: var(--oregano-ink-60); }
.ks-summary-row__value { font-weight: 600; color: #111; }

.ks-activity-card {
  /* Figma "Card": white fill, 1px #deddd8 stroke, 24px padding, ~500px wide. */
  background: #fff;
  border: 1px solid var(--oregano-border);
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.ks-activity-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ks-activity-card__month {
  font-family: "Raleway", sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--oregano-maroon);
}
.ks-activity-card__title {
  font-family: "Forum", Georgia, serif;
  font-size: 29px;
  color: #111;
  margin-bottom: 12px;
}
.ks-activity-card__count {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--oregano-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Forum", Georgia, serif;
  font-size: 20px;
  color: #111;
  margin: 18px auto;
}
.ks-activity-card__empty { text-align: center; font-size: 12px; color: var(--oregano-ink-60); margin-bottom: auto; }
.ks-activity-card__rows { margin: 6px 0 12px; }
.ks-activity-card__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 11px;
}
.ks-activity-card__row__label,
.ks-activity-card__row__value { min-width: 0; }
.ks-activity-card__row__label { color: var(--oregano-ink-60); }
.ks-activity-card__row__value { font-size: 13px; font-weight: 600; color: #111; }
.ks-activity-card__totals {
  margin-top: auto;
  border-top: 1px solid var(--oregano-border);
  padding-top: 8px;
}
.ks-activity-card__totals .ks-activity-card__row { border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.ks-activity-card__totals .ks-activity-card__row:last-child { border-bottom: none; }
.ks-activity-card__totals .ks-activity-card__row__label { color: #111; }
#kitchen-sheet-detail-petty-cash .ks-activity-card__row__label { color: #111; }
.ks-activity-card__grid {
  display: grid;
  /* minmax(0, 1fr): without it a long unbreakable value (e.g. a transfer
     number) widens the track past the card and scrolls the page sideways. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 24px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.ks-activity-card__grid:last-child { border-bottom: none; }
.ks-activity-card__cell__label {
  font-family: "Raleway", sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  color: #66645f;
}
.ks-activity-card__cell__value { font-size: 14px; font-weight: 500; color: #171717; margin-top: 6px; overflow-wrap: anywhere; }

#ks-stock-lines, #ks-summary, #ks-activity, #ks-overview { scroll-margin-top: calc(var(--oregano-topbar-h) + 12px); }

/* Kitchen sheet page: square corners everywhere, including badges. */
#kitchen-sheet-detail-lines-table .badge,
.ks-activity-card .badge { border-radius: 0; }

/* Shared expander row (dashboard item-wise + kitchen sheet stock lines):
   sits between the data rows and the totals row. */
.table-toggle-cell { text-align: center; border-top: 1px dashed var(--oregano-border); padding: 10px; }
.table-toggle-cell .stock-table-toggle { border-top: none; width: auto; padding: 4px 14px; }

/* Transfer badges (In / Out) match the design: oregano-olive tint behind,
   dark success-green text. */
#kitchen-sheet-detail-transfers .badge {
  background: rgba(134, 137, 32, 0.13);
  color: #4E6D0A;
  border-color: transparent;
  font-family: "Raleway", sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
}
