﻿/* Lendra ERP ? global theme (login palette) */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");
@import url("fin-dashboard-tokens.css");

:root {
  --o-paper: #fffaf6; --o-paper-rgb: 255, 250, 246;
  --o-font: "Poppins", "Segoe UI", sans-serif;
  --o-brand: #25424c;
  --o-brand-dark: #1e353d;
  --o-accent: #fb770d;
  --o-accent-dark: #e56a0c;
  --o-peach: #ffa45b;
  --o-beige: #ffebdb;
  --o-bg: #fff6ef;
  /* Brand literals as tokens (static/css/theme.css redefines these per colour scheme). */
  --o-accent-rgb: 251, 119, 13;
  --o-accent-deep: #e56a0c;
  --o-peach-rgb: 255, 164, 91;
  --o-beige-rgb: 255, 235, 219;
  --o-tint: #fff4ea;
  --o-tint-2: #fff8f2;
  --o-tint-3: #fff6ef;
  --o-tint-4: #fffaf5;
  --o-tint-5: #ffe8d4;
  --o-tint-6: #fff7ef;
  --o-th-text: #8a5a2b;
  --o-panel: #fff;
  --o-border: rgba(255, 164, 91, 0.32);
  --o-text: #25424c;
  --o-muted: #5a6f76;
  --o-input-border: rgba(255, 164, 91, 0.45);
  --o-hover: rgba(255, 235, 219, 0.9);
  --o-sidebar: #fff;
  --o-sidebar-width: 260px;
  --o-topbar-height: 56px;
  --o-topbar-icon-size: 38px;
  --o-topbar-icon-radius: 10px;
  --bp-xs: 480px;
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1100px;
  --o-touch-min: 44px;
}

* { box-sizing: border-box; }

/* Hide native number-input steppers everywhere (Chrome/Edge/Safari/Firefox). */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

html {
  font-family: var(--o-font);
}

body {
  margin: 0;
  font-family: var(--o-font);
  background: var(--o-bg);
  color: var(--o-text);
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

a {
  color: var(--o-brand);
  text-decoration: none;
}
a:hover {
  color: var(--o-brand-dark);
}

code {
  background: #f8f9fa;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.85em;
  color: var(--o-brand);
}

.muted { color: var(--o-muted); }
.small { font-size: 0.82rem; }
.text-right { text-align: right; }

/* Top header */
.o_topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--o-topbar-height);
  background: linear-gradient(90deg, var(--o-brand) 0%, var(--o-brand-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 14px rgba(37, 66, 76, 0.2);
  overflow: visible;
}

.o_topbar-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  width: 100%;
  height: 100%;
  padding: 0 1.5rem;
  overflow: visible;
}

.o_topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex-shrink: 0;
}

/* Uniform square topbar controls */
.o_topbar-menu-toggle,
.o_topbar-logo,
.o_topbar-back,
.o_topbar-search-trigger,
.o_user-menu-trigger {
  display: grid;
  place-items: center;
  width: var(--o-topbar-icon-size);
  height: var(--o-topbar-icon-size);
  min-width: var(--o-topbar-icon-size);
  min-height: var(--o-topbar-icon-size);
  max-width: var(--o-topbar-icon-size);
  max-height: var(--o-topbar-icon-size);
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}

.o_topbar-menu-toggle svg,
.o_topbar-back svg,
.o_topbar-search-trigger svg,
.o_user-menu-trigger svg,
.o_user-menu-icon {
  width: 18px;
  height: 18px;
}

.o_topbar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--o-topbar-icon-radius);
  background: transparent;
  text-decoration: none;
  border: none;
  overflow: hidden;
}

.o_topbar-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.o_topbar-logo:hover {
  opacity: 0.95;
  text-decoration: none;
}

.o_topbar-brand-text {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.o_topbar-title {
  font-weight: 700;
  font-size: 1.02rem;
  color: #fff;
  white-space: nowrap;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.o_topbar-title:hover {
  color: #fff;
  opacity: 0.92;
  text-decoration: none;
}

.o_topbar-crumb {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.o_topbar-company {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
  min-width: 0;
  margin-left: 0.15rem;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  padding-left: 0.75rem;
}

.o_topbar-company-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.5rem;
}

.o_topbar-company-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(360px, 32vw);
}

.o_topbar-company-fy {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.o_topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 0;
  overflow: visible;
}

.o_topbar-icon-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  padding: 0.12rem;
  border-radius: calc(var(--o-topbar-icon-radius) + 2px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.o_topbar-icon-group .o_topbar-back,
.o_topbar-icon-group .o_topbar-search-trigger {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.o_topbar-icon-group .o_topbar-back + .o_topbar-search-trigger {
  margin-left: 0.12rem;
}

.o_topbar-icon-group .o_topbar-back:hover,
.o_topbar-icon-group .o_topbar-search-trigger:hover {
  background: rgba(255, 255, 255, 0.2);
}

.o_topbar-back {
  gap: 0;
  border-radius: var(--o-topbar-icon-radius);
  font-size: 0;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.o_topbar-back:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(var(--o-peach-rgb), 0.55);
  color: #fff;
  text-decoration: none;
}

/* User menu (hover dropdown) */
.o_user-menu {
  position: relative;
  z-index: 2;
}

.o_user-menu-trigger {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--o-topbar-icon-radius);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.o_user-menu-trigger:hover,
.o_user-menu:focus-within .o_user-menu-trigger {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(var(--o-peach-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.18);
}

.o_user-menu-panel {
  position: absolute;
  right: 0;
  top: 100%;
  padding-top: 0.45rem;
  min-width: 210px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
}

.o_user-menu-dropdown {
  padding: 0.4rem;
  /* Never taller than the screen: scroll inside the menu on short displays. */
  max-height: calc(100vh - var(--o-topbar-height) - 1rem);
  max-height: calc(100dvh - var(--o-topbar-height) - 1rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(var(--o-peach-rgb), 0.35);
  box-shadow: 0 14px 32px rgba(37, 66, 76, 0.2);
}

.o_user-menu:hover .o_user-menu-panel,
.o_user-menu:focus-within .o_user-menu-panel,
.o_user-menu.is-open .o_user-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.o_user-menu-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(37, 66, 76, 0.08);
  margin-bottom: 0.2rem;
}

.o_user-menu-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(var(--o-accent-rgb), 0.12);
  color: var(--o-accent);
  flex-shrink: 0;
}

.o_user-menu-head strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--o-brand);
  line-height: 1.25;
}

.o_user-menu-role {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--o-muted);
  margin-top: 0.1rem;
}

.o_user-menu-section {
  padding: 0.2rem 0.4rem 0.3rem;
  border-top: 1px solid rgba(37, 66, 76, 0.08);
  margin-top: 0.1rem;
}

.o_user-menu-section-label {
  display: block;
  padding: 0.2rem 0.2rem 0.2rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--o-muted);
}

.o_user-menu-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.6rem;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--o-brand);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.o_user-menu-link:hover {
  background: rgba(var(--o-accent-rgb), 0.1);
  color: var(--o-accent-dark);
  text-decoration: none;
}

.o_user-menu-link svg {
  color: var(--o-accent);
  flex-shrink: 0;
}

.o_user-menu-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.6rem;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--o-brand);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.o_user-menu-logout:hover {
  background: rgba(var(--o-accent-rgb), 0.1);
  color: var(--o-accent-dark);
  text-decoration: none;
}

.o_user-menu-logout svg {
  color: var(--o-accent);
  flex-shrink: 0;
}

/* Legacy alias (older templates) */
.o_navbar { display: none; }

@media (max-width: 768px) {
  .o_topbar-company-name {
    max-width: 140px;
    font-size: 0.72rem;
  }

  .o_topbar-company-fy {
    display: none;
  }

  .o_topbar-crumb {
    display: none;
  }

  .o_home {
    padding: 1.25rem 1rem 2rem;
  }

  .o_home_header {
    flex-direction: column;
    align-items: stretch;
  }

  .o_home_header--glass {
    padding: 1.15rem 1.2rem;
  }

  .o_home_count {
    align-self: flex-start;
  }

  .module-tiles {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn-odoo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 0.65rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.2;
  font-family: inherit;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.btn-odoo-primary {
  background: var(--o-accent);
  border-color: var(--o-accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(var(--o-accent-rgb), 0.28);
}
.btn-odoo-primary:hover {
  background: var(--o-accent-dark);
  border-color: var(--o-accent-dark);
  box-shadow: 0 4px 14px rgba(var(--o-accent-rgb), 0.32);
  transform: translateY(-1px);
}
.btn-odoo-secondary {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(var(--o-peach-rgb), 0.35);
  color: var(--o-brand);
  box-shadow: 0 1px 3px rgba(37, 66, 76, 0.06);
}
.btn-odoo-secondary:hover {
  background: #fff;
  border-color: rgba(var(--o-accent-rgb), 0.45);
  box-shadow: 0 2px 8px rgba(37, 66, 76, 0.08);
  transform: translateY(-1px);
}
.btn-odoo-danger {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(220, 53, 69, 0.45);
  color: #dc3545;
  box-shadow: 0 1px 3px rgba(37, 66, 76, 0.06);
}
.btn-odoo-danger:hover {
  background: #dc3545;
  color: #fff;
  box-shadow: 0 2px 10px rgba(220, 53, 69, 0.28);
  transform: translateY(-1px);
}
.btn-odoo-link {
  background: transparent;
  border-color: transparent;
  color: var(--o-accent);
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  border-radius: 0.5rem;
  box-shadow: none;
}
.btn-odoo-link:hover {
  background: rgba(var(--o-beige-rgb), 0.85);
  transform: none;
}

/* Alerts */
.alert {
  border-radius: 4px;
  padding: 0.65rem 0.9rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}
.alert-error {
  background: #f8d7da;
  border-color: #f5c2c7;
  color: #842029;
}
.alert-info {
  background: #cff4fc;
  border-color: #b6effb;
  color: #055160;
}
.alert-warning {
  background: #fff3cd;
  border-color: #ffecb5;
  color: #664d03;
}

/* Login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #5a3c52 0%, #714b67 40%, #f0f0f0 40%);
}
.login-card {
  width: min(420px, 100%);
  background: var(--o-panel);
  border: 1px solid var(--o-border);
  border-radius: 6px;
  padding: 1.75rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.login-card .brand h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--o-brand);
}
.login-card .brand p {
  margin: 0 0 1.25rem;
  color: var(--o-muted);
  font-size: 0.875rem;
}
.login-form label {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  color: #495057;
}
.login-form input,
.login-form select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: 3px;
  border: 1px solid var(--o-input-border);
  background: #fff;
  color: var(--o-text);
  font: inherit;
  font-size: 0.875rem;
}
.login-form input:focus,
.login-form select:focus {
  outline: none;
  border-color: var(--o-brand);
  box-shadow: 0 0 0 2px rgba(113, 75, 103, 0.15);
}
.login-form .btn-odoo-primary {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.55rem;
}

/* App shell / workspace */
.o_web_client {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
.o_action {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: calc(100vh - var(--o-topbar-height));
}
.o_workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.o_sidebar {
  width: var(--o-sidebar-width);
  flex-shrink: 0;
  background: var(--o-sidebar);
  border-right: 1px solid var(--o-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  max-height: 100%;
}
.o_sidebar_head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--o-border);
  background: #fafafa;
}
.o_sidebar_head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--o-brand);
}
.o_sidebar_body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.25rem 0 0.65rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.o_sidebar_body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.o_main {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, var(--o-paper) 0%, var(--o-beige) 100%);
}

/* Module home ? full-bleed desert photo background */
body:has(.o_home),
body:has(.o_module_dash:not(.fin-overview)) {
  background: #5c4a3a;
}

body:has(.o_home)::before,
body:has(.o_module_dash:not(.fin-overview))::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("/static/images/module-bg.jpg") center center / cover no-repeat;
  pointer-events: none;
}

body:has(.o_home)::after,
body:has(.o_module_dash:not(.fin-overview))::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(165deg, rgba(26, 38, 58, 0.42) 0%, rgba(37, 66, 76, 0.36) 45%, rgba(var(--o-accent-rgb), 0.1) 100%),
    radial-gradient(ellipse 85% 65% at 12% 12%, rgba(59, 130, 246, 0.22), transparent 58%),
    radial-gradient(ellipse 75% 55% at 90% 78%, rgba(37, 99, 235, 0.16), transparent 52%);
  pointer-events: none;
}

.o_main:has(.o_home) {
  position: relative;
  background: transparent;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.o_main:has(.o_home) > * {
  position: relative;
  z-index: 1;
}

.o_workspace-full .o_main {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.o_workspace-full .o_main:has(.o_home) {
  max-width: none;
  margin: 0;
  width: 100%;
  padding: 0;
  min-height: calc(100vh - var(--o-topbar-height));
}

.o_workspace-full .o_main.o_main-form {
  max-width: none;
  margin: 0;
  width: 100%;
}

/* Module home ? premium SaaS app switcher */
@keyframes oHomeReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.o_home {
  --home-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --home-hover-ease: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  --home-hover-duration: 0.22s;
  --home-hover-glow-duration: 0.25s;
  --home-glass: rgba(255, 248, 242, 0.78);
  --home-glass-border: rgba(255, 255, 255, 0.88);
  --home-shadow: 0 14px 44px rgba(18, 28, 40, 0.18), 0 2px 10px rgba(18, 28, 40, 0.08);
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: calc(100vh - var(--o-topbar-height));
  padding: 1.15rem clamp(1rem, 3vw, 2rem) 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
}

.o_home::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(147, 197, 253, 0.14) 1px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
}

.o_home-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.o_home_header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.o_home_header--glass {
  position: relative;
  padding: 0.95rem 1.25rem 0.9rem;
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 252, 248, 0.9) 0%, rgba(255, 244, 232, 0.72) 48%, rgba(255, 255, 255, 0.62) 100%),
    var(--home-glass);
  backdrop-filter: blur(16px) saturate(1.55);
  -webkit-backdrop-filter: blur(16px) saturate(1.55);
  border: 1px solid var(--home-glass-border);
  box-shadow:
    var(--home-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(var(--o-accent-rgb), 0.08);
  overflow: hidden;
  animation: oHomeReveal 0.5s var(--home-ease) both;
}

.o_home_header--glass::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--o-accent-rgb), 0.55) 20%,
    rgba(var(--o-peach-rgb), 0.45) 50%,
    transparent 80%
  );
  pointer-events: none;
}

.o_home_header--glass::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 38%,
    transparent 62%
  );
  pointer-events: none;
}

.o_home_header--glass > * {
  position: relative;
  z-index: 1;
}

.o_home_eyebrow {
  display: inline-block;
  margin-bottom: 0.2rem;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--o-accent);
}

.o_home_header-text h1 {
  margin: 0 0 0.2rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--o-brand);
}

.o_home_header-sub {
  margin: 0;
  max-width: none;
  font-size: 0.84rem;
  font-weight: 400;
  color: rgba(37, 66, 76, 0.62);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.o_home_context {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  margin: 0.35rem 0 0;
  font-size: 0.74rem;
  font-weight: 550;
  color: rgba(37, 66, 76, 0.7);
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.o_home_context-co {
  color: var(--o-brand);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.o_home_context-fy {
  color: rgba(37, 66, 76, 0.62);
  flex-shrink: 0;
}

.o_home_context-sep {
  opacity: 0.45;
  flex-shrink: 0;
}

.o_home_header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-top: 0.55rem;
}

.o_home_continue {
  --tile-accent: var(--o-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0;
  padding: 0.32rem 0.7rem 0.32rem 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--tile-accent);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--tile-accent) 14%, #fff),
    color-mix(in srgb, var(--tile-accent) 22%, #fff)
  );
  border: 1px solid color-mix(in srgb, var(--tile-accent) 30%, transparent);
  box-shadow:
    0 2px 10px color-mix(in srgb, var(--tile-accent) 16%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.o_home_cmd_hint {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 66, 76, 0.12);
  background: rgba(255, 255, 255, 0.55);
  color: rgba(37, 66, 76, 0.68);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.o_home_cmd_hint:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(var(--o-accent-rgb), 0.35);
  color: var(--o-brand);
}

.o_home_cmd_hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(37, 66, 76, 0.16);
  background: rgba(255, 255, 255, 0.92);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--o-brand);
  box-shadow: 0 1px 0 rgba(37, 66, 76, 0.08);
}

.o_home_cmd_hint-alt {
  margin-left: 0.15rem;
  font-size: 0.7rem;
  font-weight: 450;
  color: rgba(37, 66, 76, 0.45);
}
.o_home_continue:hover {
  text-decoration: none;
  color: var(--tile-accent);
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px color-mix(in srgb, var(--tile-accent) 24%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.o_home_continue-label {
  font-weight: 500;
  color: rgba(37, 66, 76, 0.55);
  text-transform: none;
  letter-spacing: 0;
}
.o_home_continue-name {
  color: var(--tile-accent);
}
.o_home_continue-arrow {
  margin-left: 0.15rem;
  font-weight: 700;
  opacity: 0.85;
}

.o_home_count {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(37, 66, 76, 0.72);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(37, 66, 76, 0.1);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  margin-top: 0.15rem;
}

.o_home_count-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--o-accent);
  box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.18);
}

.module-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
  flex: 1;
  align-content: start;
  padding-bottom: 0;
}

@media (min-width: 1024px) {
  .module-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.module-tile {
  --tile-accent: var(--o-accent);
  --tile-accent-2: var(--o-peach);
  --tile-accent-soft: rgba(251, 119, 13, 0.14);
  --tile-accent-mid: rgba(251, 119, 13, 0.22);
  --tile-accent-glow: rgba(251, 119, 13, 0.3);
  --tile-surface: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(255, 255, 255, 0.9) 46%,
    color-mix(in srgb, var(--tile-accent) 10%, rgba(255, 255, 255, 0.82)) 100%
  );
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 188px;
  padding: 0;
  border-radius: 1.125rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: var(--tile-surface);
  color: var(--o-text);
  overflow: hidden;
  transform: none;
  box-shadow:
    0 2px 4px rgba(18, 28, 40, 0.08),
    0 12px 36px rgba(18, 28, 40, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  transition:
    border-color var(--home-hover-duration) var(--home-hover-ease),
    background var(--home-hover-duration) var(--home-hover-ease),
    box-shadow var(--home-hover-glow-duration) var(--home-hover-ease),
    transform var(--home-hover-duration) var(--home-hover-ease);
  animation: oHomeReveal 0.5s var(--home-ease) both;
  animation-delay: calc(0.04s + min(var(--tile-index, 0), 4) * 0.04s);
}

.module-tile-hit {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0;
  min-height: 0;
  padding: 1.1rem 1.15rem 0.65rem;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.module-tile-hit:hover,
.module-tile-hit:focus {
  color: inherit;
  text-decoration: none;
}

.module-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.1) 42%,
    transparent 68%
  );
  opacity: 0.9;
  pointer-events: none;
  transition: opacity var(--home-hover-duration) var(--home-hover-ease);
}

.module-tile-orb {
  position: absolute;
  right: -18%;
  bottom: -28%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 40%,
    color-mix(in srgb, var(--tile-accent) 28%, transparent) 0%,
    color-mix(in srgb, var(--tile-accent-2) 12%, transparent) 42%,
    transparent 72%
  );
  opacity: 0.78;
  pointer-events: none;
  z-index: 0;
  transition:
    opacity var(--home-hover-glow-duration) var(--home-hover-ease),
    transform var(--home-hover-glow-duration) var(--home-hover-ease);
}

.module-tile--accounts {
  --tile-accent: #1a6b7a;
  --tile-accent-2: #3d9aab;
  --tile-accent-soft: rgba(26, 107, 122, 0.16);
  --tile-accent-mid: rgba(26, 107, 122, 0.24);
  --tile-accent-glow: rgba(26, 107, 122, 0.32);
}
.module-tile--crm {
  --tile-accent: #fb770d;
  --tile-accent-2: #ffb06a;
  --tile-accent-soft: rgba(251, 119, 13, 0.18);
  --tile-accent-mid: rgba(251, 119, 13, 0.26);
  --tile-accent-glow: rgba(251, 119, 13, 0.34);
}
.module-tile--costing {
  --tile-accent: #fb770d;
  --tile-accent-2: #ffa45b;
  --tile-accent-soft: rgba(251, 119, 13, 0.16);
  --tile-accent-mid: rgba(251, 119, 13, 0.22);
  --tile-accent-glow: rgba(251, 119, 13, 0.3);
}
.module-tile--inventory {
  --tile-accent: #0d8a6a;
  --tile-accent-2: #3ecf9a;
  --tile-accent-soft: rgba(13, 138, 106, 0.16);
  --tile-accent-mid: rgba(13, 138, 106, 0.24);
  --tile-accent-glow: rgba(13, 138, 106, 0.32);
}
.module-tile--machine {
  --tile-accent: #3d5a64;
  --tile-accent-2: #5a7d8a;
  --tile-accent-soft: rgba(61, 90, 100, 0.14);
  --tile-accent-mid: rgba(61, 90, 100, 0.2);
  --tile-accent-glow: rgba(61, 90, 100, 0.28);
}
.module-tile--production {
  --tile-accent: #c45f10;
  --tile-accent-2: #fb770d;
  --tile-accent-soft: rgba(196, 95, 16, 0.16);
  --tile-accent-mid: rgba(196, 95, 16, 0.22);
  --tile-accent-glow: rgba(196, 95, 16, 0.3);
}
.module-tile--stax {
  --tile-accent: #d45f08;
  --tile-accent-2: #ff8c38;
  --tile-accent-soft: rgba(212, 95, 8, 0.16);
  --tile-accent-mid: rgba(212, 95, 8, 0.22);
  --tile-accent-glow: rgba(212, 95, 8, 0.3);
}
.module-tile--transport {
  --tile-accent: #0d6e6e;
  --tile-accent-2: #14b8a6;
  --tile-accent-soft: rgba(13, 110, 110, 0.16);
  --tile-accent-mid: rgba(13, 110, 110, 0.24);
  --tile-accent-glow: rgba(13, 110, 110, 0.32);
}

.module-tile::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(
    circle at 18% 12%,
    var(--tile-accent-mid) 0%,
    transparent 52%
  );
  opacity: 0;
  transform: scale(0.88);
  transition:
    opacity var(--home-hover-glow-duration) var(--home-hover-ease),
    transform var(--home-hover-glow-duration) var(--home-hover-ease);
  pointer-events: none;
  z-index: 0;
}

.module-tile-accent {
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--tile-accent) 22%,
    color-mix(in srgb, var(--tile-accent) 55%, #fff) 55%,
    var(--tile-accent-2) 78%,
    transparent
  );
  opacity: 0.85;
  transform: scaleX(0.42);
  transform-origin: left center;
  transition:
    transform 0.22s var(--home-hover-ease),
    opacity 0.22s var(--home-hover-ease);
}

.module-tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.module-tile-icon-wrap {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 0.95rem;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--tile-accent) 18%, #fff) 0%,
    color-mix(in srgb, var(--tile-accent) 32%, #fff) 100%
  );
  border: 1px solid color-mix(in srgb, var(--tile-accent) 28%, rgba(255, 255, 255, 0.9));
  color: var(--tile-accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 6px 18px color-mix(in srgb, var(--tile-accent) 22%, transparent);
  transform: translate3d(0, 0, 0);
  transition:
    transform var(--home-hover-duration) var(--home-hover-ease),
    box-shadow var(--home-hover-glow-duration) var(--home-hover-ease),
    border-color var(--home-hover-duration) var(--home-hover-ease),
    color var(--home-hover-duration) var(--home-hover-ease);
}

.module-tile-icon-wrap::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--tile-accent), var(--tile-accent-2));
  opacity: 0.28;
  z-index: -1;
}

.module-tile-svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.8));
}

.module-tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  position: relative;
  z-index: 1;
  transform: translate3d(0, 0, 0);
  transition: transform var(--home-hover-duration) var(--home-hover-ease);
}

.module-tile-foot {
  display: flex;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(37, 66, 76, 0.07);
  position: relative;
  z-index: 1;
  transition:
    border-color var(--home-hover-duration) var(--home-hover-ease),
    transform var(--home-hover-duration) var(--home-hover-ease);
  transform: translate3d(0, 0, 0);
}

.module-tile-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 0.65rem;
  color: var(--tile-accent);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(37, 66, 76, 0.08);
  opacity: 0.55;
  transform: translate3d(-8px, 0, 0);
  transition:
    transform var(--home-hover-duration) var(--home-hover-ease),
    opacity var(--home-hover-duration) var(--home-hover-ease),
    background var(--home-hover-duration) var(--home-hover-ease),
    border-color var(--home-hover-duration) var(--home-hover-ease),
    color var(--home-hover-duration) var(--home-hover-ease);
}

.module-tile-arrow svg {
  width: 15px;
  height: 15px;
}

@media (hover: hover) and (pointer: fine) {
.module-tile:hover {
  border-color: color-mix(in srgb, var(--tile-accent) 28%, rgba(255, 255, 255, 0.95));
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.9) 48%,
    color-mix(in srgb, var(--tile-accent) 14%, rgba(255, 255, 255, 0.82)) 100%
  );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--tile-accent) 20%, transparent),
    0 16px 48px var(--tile-accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  text-decoration: none;
  color: var(--o-text);
  transform: translateY(-3px);
}

.module-tile:hover::after {
  opacity: 1;
}

.module-tile:hover::before {
  opacity: 0.85;
  transform: scale(1.08);
}

.module-tile:hover .module-tile-orb {
  opacity: 0.95;
  transform: scale(1.06);
}

.module-tile:hover .module-tile-accent {
  opacity: 1;
  transform: scaleX(1);
}

.module-tile:hover .module-tile-icon-wrap {
  transform: translate3d(0, -3px, 0);
  border-color: color-mix(in srgb, var(--tile-accent) 28%, rgba(255, 255, 255, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 8px 22px color-mix(in srgb, var(--tile-accent) 28%, transparent);
}

.module-tile:hover .module-tile-body,
.module-tile:hover .module-tile-foot {
  transform: translate3d(4px, 0, 0);
}

.module-tile:hover .module-tile-foot {
  border-top-color: color-mix(in srgb, var(--tile-accent) 18%, rgba(37, 66, 76, 0.07));
}

.module-tile:hover .module-tile-arrow {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  background: var(--tile-accent);
  border-color: transparent;
  color: #fff;
}
}

.module-tile:focus-visible,
.module-tile-hit:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(var(--o-accent-rgb), 0.28),
    0 16px 40px var(--tile-accent-glow);
}

.module-tile-hit:focus-visible {
  border-radius: inherit;
}

.module-code {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--tile-accent);
  padding: 0.28rem 0.55rem;
  border-radius: 0.45rem;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--tile-accent) 18%, #fff),
    color-mix(in srgb, var(--tile-accent) 28%, #fff)
  );
  border: 1px solid color-mix(in srgb, var(--tile-accent) 32%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 2px 8px color-mix(in srgb, var(--tile-accent) 12%, transparent);
}

.module-name {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.38;
  color: var(--o-brand);
  max-width: 92%;
}

.module-blurb {
  margin: 0.15rem 0 0;
  max-width: 95%;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(37, 66, 76, 0.58);
}

.module-tile-pins {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  margin-top: auto;
  padding: 0.4rem 1rem 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--tile-accent) 12%, rgba(37, 66, 76, 0.06));
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, var(--tile-accent) 5%, rgba(255, 255, 255, 0.55)) 100%
  );
}

.module-tile-pin {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.22rem 0.5rem;
  border-radius: 0.4rem;
  font-size: 0.72rem;
  font-weight: 550;
  line-height: 1.25;
  color: rgba(37, 66, 76, 0.72);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 66, 76, 0.08);
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.module-tile-pin:hover,
.module-tile-pin:focus-visible {
  color: var(--tile-accent);
  text-decoration: none;
  background: color-mix(in srgb, var(--tile-accent) 12%, #fff);
  border-color: color-mix(in srgb, var(--tile-accent) 28%, transparent);
  outline: none;
}

.module-menu-file {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(37, 66, 76, 0.55);
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.55rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(37, 66, 76, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.module-menu-file-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.65;
}

@media (prefers-reduced-motion: reduce) {
  .o_home_header--glass,
  .module-tile {
    animation: none;
  }
}

/* Control panel */
.o_control_panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1rem;
  background: var(--o-panel);
  border-bottom: 1px solid var(--o-border);
}
.o_cp_left { min-width: 0; }
.o_breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--o-muted);
  margin-bottom: 0.15rem;
}
.o_breadcrumb .active {
  color: var(--o-text);
  font-weight: 500;
}
.o_cp_title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
}
.o_cp_right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

/* Defensive aliases if any leftover templates still use JV/BV/BP chrome class names */
.o_jv_left, .o_bv_left, .o_bp_left { min-width: 0; }
.o_jv_title, .o_bv_title, .o_bp_title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
}
.o_jv_right, .o_bv_right, .o_bp_right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.o_content {
  flex: 1;
  padding: 1rem;
  overflow: auto;
}

/* Info cards */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.info-grid div {
  background: var(--o-panel);
  border: 1px solid var(--o-border);
  border-radius: 4px;
  padding: 0.85rem;
}
.info-grid span {
  display: block;
  color: var(--o-muted);
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.info-grid strong {
  font-size: 0.95rem;
}

/* Accounts module dashboard */
.acc-dashboard {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.acc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.acc-kpi-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--o-border);
  background: var(--o-panel);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  min-height: 118px;
}
.acc-kpi-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kpi-accent);
  background: color-mix(in srgb, var(--kpi-accent) 12%, #fff);
}
.acc-kpi-icon svg {
  width: 22px;
  height: 22px;
}
.acc-kpi-body {
  min-width: 0;
  flex: 1;
}
.acc-kpi-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--o-muted);
  margin-bottom: 0.15rem;
}
.acc-kpi-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.acc-kpi-sub {
  display: block;
  font-size: 0.78rem;
  margin-top: 0.2rem;
}
.acc-kpi-bars {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.acc-kpi-bar-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.72rem;
  color: var(--o-muted);
}
.acc-kpi-bar-track {
  height: 6px;
  border-radius: 999px;
  background: #eef1f4;
  overflow: hidden;
}
.acc-kpi-bar-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
  transition: width 0.4s ease;
}
.acc-charts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.85rem;
}
.acc-chart-card {
  border: 1px solid var(--o-border);
  border-radius: 10px;
  background: var(--o-panel);
  padding: 1rem 1rem 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.acc-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.acc-chart-head h2 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}
.acc-bar-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  color: var(--o-muted);
}
.acc-bar-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.acc-bar-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.acc-bar-chart-plot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 190px;
  padding: 0.35rem 0.25rem 0.35rem;
  border-bottom: 1px solid rgba(37, 66, 76, 0.1);
}

.acc-bar-group {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.acc-bar-stack {
  width: 100%;
  max-width: 72px;
  height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}
.acc-bar {
  flex: 1 1 0;
  max-width: 11px;
  height: var(--bar-h, 0%);
  min-height: 0;
  border-radius: 999px 999px 4px 4px;
  transform-origin: bottom center;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.acc-bar--empty {
  opacity: 0.12;
  min-height: 3px;
}

.acc-bar-group:hover .acc-bar:not(.acc-bar--empty) {
  transform: scaleX(1.06);
}

.acc-bar--anim {
  transform: scaleY(0);
  animation: accChartBarGrow 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.35s + var(--bar-i, 0) * 0.05s);
}

@keyframes accChartBarGrow {
  from {
    transform: scaleY(0);
    opacity: 0.35;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.acc-bar-label {
  font-size: 0.68rem;
  color: var(--o-muted);
  text-align: center;
  white-space: nowrap;
}
.acc-donut-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.25rem;
}
.acc-donut {
  flex-shrink: 0;
  width: 148px;
  height: 148px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-donut-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.acc-donut-track {
  fill: none;
  stroke: rgba(37, 66, 76, 0.08);
  stroke-width: 16;
}

.acc-donut-segment {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
}

.acc-donut-hole {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
}
.acc-donut-hole strong {
  font-size: 0.95rem;
  line-height: 1.1;
}
.acc-donut-hole span {
  font-size: 0.65rem;
  color: var(--o-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.acc-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.acc-donut-legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.78rem;
}
.acc-donut-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}
.acc-donut-legend-val em {
  font-style: normal;
  color: var(--o-muted);
  font-size: 0.72rem;
}
.acc-sp-card {
  margin-bottom: 0.25rem;
}
.acc-sp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.acc-sp-tile {
  border-radius: 8px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--o-border);
}
.acc-sp-tile--sales {
  --tile-accent: #ea580c;
  --tile-accent-2: #fb923c;
  --tile-accent-glow: rgba(234, 88, 12, 0.22);
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.08), rgba(234, 88, 12, 0.02));
  border-color: rgba(234, 88, 12, 0.2);
}
.acc-sp-tile--purchase {
  --tile-accent: #d97706;
  --tile-accent-2: #f59e0b;
  --tile-accent-glow: rgba(217, 119, 6, 0.22);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.08), rgba(217, 119, 6, 0.02));
  border-color: rgba(217, 119, 6, 0.2);
}
.acc-sp-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--o-muted);
  margin-bottom: 0.2rem;
}
.acc-sp-tile strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
@media (max-width: 1100px) {
  .acc-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .acc-charts-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .acc-kpi-grid,
  .acc-sp-grid {
    grid-template-columns: 1fr;
  }
  .acc-donut-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Tree menu — compact SaaS nav */
.o_menu_tree {
  list-style: none;
  margin: 0;
  padding: 0 0.3rem 0.35rem;
}

.o_menu_tree--compact .o_tree_row {
  min-height: 1.55rem;
  margin: 0.02rem 0.35rem;
  padding: 0.16rem 0.5rem;
  gap: 0.35rem;
  font-size: 0.72rem;
  border-radius: 0.45rem;
}

.o_menu_tree--compact .o_tree_section_head {
  padding: 0.38rem 0.55rem 0.2rem;
  font-size: 0.58rem;
  letter-spacing: 0.07em;
}

.o_menu_tree--compact .o_tree_section {
  margin: 0.22rem 0.22rem;
  padding-bottom: 0.18rem;
}

.o_menu_tree--compact .o_tree_section > .o_tree_root {
  padding: 0 0.1rem 0.1rem;
}

.o_menu_tree--compact .o_tree_folder > .o_tree_row {
  font-size: 0.72rem;
  margin: 0.02rem 0.35rem;
  width: calc(100% - 0.7rem);
}

.o_menu_tree--compact .o_tree_children {
  margin-left: 0.95rem;
}

.o_menu_tree--compact .o_tree_sep {
  margin: 0.22rem 0.55rem;
}

.o_menu_tree--compact .o_tree_icon,
.o_menu_tree--compact .o_tree_icon svg {
  width: 13px;
  height: 13px;
}

.o_tree_section {
  border-bottom: none;
  margin: 0.28rem 0.3rem;
  padding: 0.12rem 0 0.22rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(37, 66, 76, 0.07);
  box-shadow: 0 1px 2px rgba(37, 66, 76, 0.03);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.o_tree_section.open {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(var(--o-accent-rgb), 0.16);
  box-shadow: 0 2px 8px rgba(37, 66, 76, 0.05);
}

.o_tree_section--reports {
  background: rgba(248, 250, 252, 0.85);
}

.o_tree_section--reports.open {
  border-color: rgba(var(--o-accent-rgb), 0.18);
}

.o_tree_section--reports > .o_tree_section_head {
  color: #7c93a3;
}

.o_tree_section_head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.65rem 0.28rem;
  border: none;
  border-radius: 0.55rem;
  background: transparent;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: color 0.15s ease, background 0.15s ease;
}

.o_tree_section_head:hover {
  color: var(--o-accent, var(--o-accent));
  background: rgba(var(--o-accent-rgb), 0.06);
  border-color: transparent;
}

.o_tree_folder > .o_tree_row {
  font-weight: 500;
  color: var(--o-text);
  margin: 0.04rem 0.45rem;
  width: calc(100% - 0.9rem);
  font-size: 0.76rem;
}

.o_tree_folder > .o_tree_row:hover {
  background: rgba(var(--o-accent-rgb), 0.1);
  color: var(--o-accent, var(--o-accent));
}

.o_tree_folder > .o_tree_row:hover .o_tree_icon,
.o_tree_folder > .o_tree_row:hover .o_tree_chevron {
  color: var(--o-accent, var(--o-accent));
}

.o_tree_root,
.o_tree_children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.o_tree_children {
  padding-left: 0.15rem;
  border-left: 1px solid rgba(37, 66, 76, 0.08);
  margin-left: 1.15rem;
  margin-right: 0.15rem;
}

.o_tree_section > .o_tree_root,
.o_tree_folder > .o_tree_children {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition:
    max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease,
    transform 0.2s ease;
}

.o_tree_section.open > .o_tree_root,
.o_tree_folder.open > .o_tree_children {
  max-height: 1400px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .o_tree_section > .o_tree_root,
  .o_tree_folder > .o_tree_children,
  .o_tree_chevron,
  .o_tree_row {
    transition: none !important;
  }
}
.o_tree_node {
  margin: 0;
}
.o_tree_row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: calc(100% - 0.9rem);
  min-height: 1.85rem;
  margin: 0.04rem 0.45rem;
  padding: 0.28rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--o-text);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.o_tree_row:focus,
.o_tree_row:focus-visible,
.o_tree_section_head:focus,
.o_tree_section_head:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 66, 76, 0.12);
}

.o_tree_icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  border: none;
}

.o_tree_icon svg {
  width: 15px;
  height: 15px;
}

.o_tree_icon--section,
.o_tree_icon--folder {
  background: transparent;
  color: #64748b;
  border: none;
}

.o_tree_link {
  color: var(--o-text);
  border-left: none;
}

.o_tree_link:hover {
  background: rgba(var(--o-accent-rgb), 0.1);
  color: var(--o-accent, var(--o-accent));
  text-decoration: none;
}

.o_tree_link:hover .o_tree_icon {
  color: var(--o-accent, var(--o-accent));
}

.o_tree_link.active {
  background: rgba(var(--o-accent-rgb), 0.12);
  color: var(--o-accent, var(--o-accent));
  font-weight: 600;
  box-shadow: none;
  border-left: 3px solid var(--o-accent, var(--o-accent));
  border-radius: 0.45rem;
  padding-left: calc(0.5rem - 1px);
}

.o_tree_link.active .o_tree_icon {
  color: var(--o-accent, var(--o-accent));
}

.o_menu_tree--compact .o_tree_link.active {
  padding-left: calc(0.5rem - 1px);
}

.o_tree_chevron {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), color 0.15s ease;
}

.o_tree_chevron::before {
  content: "";
  border: 3px solid transparent;
  border-left-color: currentColor;
  border-right: 0;
  margin-left: 1px;
}
.o_tree_folder.open > .o_tree_row .o_tree_chevron,
.o_tree_section.open > .o_tree_section_head .o_tree_chevron {
  transform: rotate(90deg);
}
.o_tree_spacer {
  visibility: hidden;
}
.o_tree_label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.o_tree_badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--o-muted);
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  flex-shrink: 0;
}

.o_tree_sep {
  height: 1px;
  margin: 0.35rem 0.75rem;
  background: #e9ecef;
  list-style: none;
}

.o_modules_tree {
  padding: 0.25rem 0;
}
.o_module_link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.85rem;
  color: var(--o-text);
  border-left: 3px solid transparent;
}
.o_module_link:hover {
  background: var(--o-hover);
  text-decoration: none;
  color: var(--o-brand);
}
.o_module_link.active {
  background: var(--o-hover);
  border-left-color: var(--o-brand);
}
.o_module_code {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--o-brand);
}
.o_module_name {
  font-size: 0.84rem;
}

.cp-readonly .cp-fields input:not([readonly]),
.cp-readonly #lines-table input,
.cp-readonly #lines-table button,
.cp-readonly #add-line,
.cr-readonly .cr-fields input:not([readonly]),
.cr-readonly #lines-table input,
.cr-readonly #lines-table button,
.cr-readonly #add-line,
.bv-readonly .bv-fields input:not([readonly]),
.bv-readonly #lines-table input,
.bv-readonly #lines-table button,
.bv-readonly #add-line,
.bp-readonly .bp-fields input:not([readonly]),
.bp-readonly #lines-table input,
.bp-readonly #lines-table button,
.bp-readonly #add-line,
.br-readonly .br-fields input:not([readonly]),
.br-readonly #lines-table input,
.br-readonly #lines-table button,
.br-readonly #add-line,
.jv-readonly .jv-fields input:not([readonly]),
.jv-readonly #lines-table input,
.jv-readonly #lines-table button,
.jv-readonly #add-line {
  pointer-events: none;
  background: #f8f9fa;
  color: #6c757d;
}
.cp-readonly .o_control_panel .btn-odoo,
.cr-readonly .o_control_panel .btn-odoo,
.bv-readonly .o_control_panel .btn-odoo,
.bp-readonly .o_control_panel .btn-odoo,
.br-readonly .o_control_panel .btn-odoo,
.jv-readonly .o_control_panel .btn-odoo {
  pointer-events: auto;
}
.btn-odoo-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.cp-readonly .remove-line,
.cr-readonly .remove-line,
.bv-readonly .remove-line,
.bp-readonly .remove-line,
.br-readonly .remove-line,
.jv-readonly .remove-line {
  visibility: hidden;
}

/* Form views */
.o_form_view {
  max-width: 1140px;
  margin: 0 auto;
}
.o_form_sheet_bg,
.o_list_sheet {
  background: var(--o-panel);
  border: 1px solid var(--o-border);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 1rem 1.25rem 1.25rem;
}
.o_list_search {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--o-border);
}
.o_list_search .o_group {
  margin-bottom: 0.75rem;
}
.o_list_search_actions {
  display: flex;
  gap: 0.5rem;
}

/* Standard list table pane (benchmark: pinfo list) */
.o-list-pane,
.pinfo-list-pane,
.chartopen-list-pane,
.dept-list-pane,
.unit-list-pane {
  max-height: calc(100vh - 15rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.o-list-pane .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.o-list-actions-col,
.pinfo-actions-col {
  width: 5.5rem;
  min-width: 5.5rem;
  text-align: center;
  white-space: nowrap;
}

.o-list-actions-col--wide {
  width: 11rem;
  min-width: 11rem;
}
.o-list-actions-col--xl {
  width: 16.5rem;
  min-width: 16.5rem;
}

.o-list-actions,
.pinfo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
  text-align: center;
  white-space: nowrap;
}

.o-list-actions--inline {
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.o-list-actions .btn-odoo,
.pinfo-actions .btn-odoo {
  padding: 0.28rem 0.65rem;
  font-size: 0.8rem;
}

.o-list-actions .btn-odoo-link {
  padding: 0.28rem 0.45rem;
  font-size: 0.8rem;
}

.coa-update-sheet {
  max-width: 42rem;
}

.coa-update-section {
  margin-bottom: 0.25rem;
}

.coa-update-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--o-brand);
  letter-spacing: 0.02em;
}

.coa-update-sheet .coa-update-fields .chartopen-field {
  grid-template-columns: 9.5rem minmax(0, 1fr);
}

.coa-update-hint {
  margin-top: 1rem;
}

.coa-update-hint code {
  font-size: 0.85em;
}

.chartopen-hint {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  background: rgba(var(--o-paper-rgb), 0.9);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

.chqrcvd-hint {
  margin: 0.75rem 1rem 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  background: rgba(var(--o-paper-rgb), 0.9);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

.chqdeposit-hint {
  margin: 0.75rem 1rem 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  background: rgba(var(--o-paper-rgb), 0.9);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

.chqclear-hint,
.chqreturn-hint,
.chqissue-hint,
.chqissuestatus-hint {
  margin: 0.75rem 1rem 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  background: rgba(var(--o-paper-rgb), 0.9);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

.chqrcvd-fields select,
.chqrcvd-amount,
.chqdeposit-fields select,
.chqdeposit-amount,
.chqclear-fields select,
.chqclear-amount,
.chqreturn-fields select,
.chqreturn-amount,
.chqissue-fields select,
.chqissue-amount,
.chqissuestatus-fields select,
.chqissuestatus-amount {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.875rem;
}

.chqrcvd-amount,
.chqdeposit-amount,
.chqclear-amount,
.chqreturn-amount,
.chqissue-amount,
.chqissuestatus-amount {
  text-align: right;
  min-width: 11ch;
}

#chqrcvd-list td.text-right,
#chqdeposit-list td.text-right,
#chqclear-list td.text-right,
#chqreturn-list td.text-right,
#chqissue-list td.text-right,
#chqissuestatus-list td.text-right {
  font-variant-numeric: tabular-nums;
}

#open-table {
  table-layout: fixed;
  width: 100%;
  min-width: 42rem;
}

#open-table col.open-col-code {
  width: 9.35rem;
}

#open-table col.open-col-name {
  width: auto;
}

#open-table col.open-col-dr,
#open-table col.open-col-cr {
  width: 7.35rem;
}

#open-table th,
#open-table td {
  padding-left: 0.28rem;
  padding-right: 0.28rem;
  overflow: hidden;
}

#open-table th:nth-child(1),
#open-table td:nth-child(1) {
  width: 9.35rem;
}

#open-table th:nth-child(2),
#open-table td:nth-child(2) {
  min-width: 8rem;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

#open-table th:nth-child(3),
#open-table td:nth-child(3),
#open-table th:nth-child(4),
#open-table td:nth-child(4) {
  width: 7.35rem;
}

#open-table th.text-right,
#open-table td.text-right {
  text-align: right;
}

.chartopen-split .data-table .code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--o-brand);
  letter-spacing: 0;
  white-space: nowrap;
  min-width: 11ch;
}

#open-table td.text-right {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
}

.chartopen-form-sheet {
  padding: 0.75rem 1rem 1.25rem;
}
.chartopen-statusbar {
  margin-bottom: 0.75rem;
}
.chartopen-list-pane {
  margin: 0 1rem 1rem;
}
.chartopen-form-sheet .chartopen-hint {
  margin: 0.35rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  background: rgba(var(--o-paper-rgb), 0.9);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
  font-size: 0.82rem;
  color: #495057;
}
.chartopen-form-sheet .chartopen-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.chartopen-form-pane .chartopen-fields,
.chartopen-form-sheet .chartopen-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.chartopen-form-pane .chartopen-field,
.chartopen-form-sheet .chartopen-field {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
}

.chartopen-form-pane .chartopen-field label,
.chartopen-form-sheet .chartopen-field label {
  font-size: 0.82rem;
  color: #495057;
  margin: 0;
  line-height: 1.25;
}

.chartopen-form-sheet .chartopen-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: start;
}
.chartopen-form-sheet .chartopen-field-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.chartopen-form-sheet .chartopen-field-row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.chartopen-form-sheet .chartopen-field-row .chartopen-field {
  grid-template-columns: 6.5rem minmax(0, 1fr);
}
.chartopen-form-sheet .chartopen-field-row .chartopen-code-wrap {
  max-width: none;
}
.chartopen-form-sheet .chartopen-field-desc input[readonly] {
  background: #f8f9fa;
  color: #495057;
}
.chartopen-form-sheet .chartopen-field-lookup {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.05rem;
  grid-template-columns: unset;
  min-width: 0;
}
.chartopen-form-sheet .chartopen-field-lookup > label {
  font-size: 0.75rem;
  line-height: 1.1;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}
.chartopen-form-sheet .chartopen-field-lookup .fleet-fk-lookup {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.28rem;
}
.chartopen-form-sheet .chartopen-field-lookup .fleet-fk-lookup .pinfo-code-wrap {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  flex: 0 0 auto;
  width: calc(10rem + 2.25rem);
  max-width: calc(10rem + 2.25rem);
}
.chartopen-form-sheet .chartopen-field-lookup .fleet-fk-lookup .fk-code {
  width: 10rem;
  min-width: 10rem;
  max-width: 10rem;
  flex: 0 0 10rem;
}
.chartopen-form-sheet .chartopen-field-lookup .fleet-fk-lookup .fk-desc,
.chartopen-form-sheet .chartopen-field-lookup .fk-desc[readonly] {
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  color: #495057;
}

.chartopen-form-pane .chartopen-field-full,
.chartopen-form-sheet .chartopen-field-full {
  align-items: stretch;
}
.chartopen-form-sheet .chartopen-field-lookup.chartopen-field-full {
  align-items: stretch;
}

.chartopen-form-pane .chartopen-field-amount,
.chartopen-form-sheet .chartopen-field-amount {
  grid-template-columns: 6.5rem auto;
  justify-content: start;
}

.chartopen-form-pane .chartopen-field-amount label,
.chartopen-form-sheet .chartopen-field-amount label {
  white-space: nowrap;
}

.chartopen-form-pane .chartopen-code-wrap,
.chartopen-form-sheet .chartopen-code-wrap {
  width: 100%;
  max-width: 9.35rem;
  gap: 0.12rem;
}

.chartopen-form-pane .chartopen-chcode,
.chartopen-form-sheet .chartopen-chcode {
  width: 14ch;
  min-width: 14ch;
  max-width: 14ch;
  flex: 0 0 14ch;
  padding: 0.28rem 0.32rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  letter-spacing: 0;
}
.chartopen-form-sheet .code-input-wrap {
  width: calc(14ch + 2rem);
  max-width: calc(14ch + 2rem);
  flex: 0 0 auto;
}

.chartopen-form-pane .chartopen-code-wrap .lov-btn,
.chartopen-form-sheet .chartopen-code-wrap .lov-btn {
  flex-shrink: 0;
  padding: 0.2rem 0.28rem;
  min-width: 1.45rem;
  font-size: 0.72rem;
}

.chartopen-form-pane .chartopen-amount,
.chartopen-form-sheet .chartopen-amount {
  width: 7.35rem;
  min-width: 11ch;
  max-width: 100%;
  padding: 0.28rem 0.32rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  letter-spacing: 0;
  box-sizing: border-box;
}

.pinfo-list-toolbar {
  padding: 0.75rem 1rem 0;
}
.pinfo-list-pane {
  margin: 0;
}
.pinfo-entry-dialog {
  width: min(920px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.pinfo-entry-body {
  overflow: auto;
  padding: 0 1rem 0.5rem;
  flex: 1;
}
.pinfo-entry-statusbar {
  margin: 0.5rem 0 0.75rem;
}
.pinfo-entry-footer {
  flex-shrink: 0;
}
.pinfo-modal-tab.hidden {
  display: none;
}
.pinfo-entry-notebook .o_group.cp-fields {
  padding-bottom: 0.5rem;
}
.pinfo-identity-header {
  margin: 0 0 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--o-border, #dee2e6);
}
.pinfo-chcode-input {
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 600;
}
.pinfo-code-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}
.pinfo-code-name-wrap .pinfo-code-wrap {
  flex: 0 0 auto;
  width: calc(14ch + 2.25rem);
  max-width: calc(14ch + 2.25rem);
}
.pinfo-code-name-wrap .pinfo-chcode-input {
  width: 14ch;
  min-width: 14ch;
  max-width: 14ch;
  flex: 0 0 14ch;
}
.pinfo-code-name-wrap .inv-name-input {
  flex: 1 1 auto;
  min-width: 0;
}

.pinfo-form-pane {
  max-height: calc(100vh - 14rem);
  overflow: auto;
}

.pinfo-section {
  margin-bottom: 1rem;
}

.pinfo-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--o-gray-700, #374151);
}

.pinfo-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.85rem;
}

.pinfo-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.pinfo-field label {
  font-size: 0.78rem;
  color: var(--o-gray-600, #4b5563);
}

.pinfo-field-full {
  grid-column: 1 / -1;
}

.pinfo-field input,
.pinfo-field select {
  width: 100%;
  box-sizing: border-box;
}

.pinfo-code-wrap {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.pinfo-chcode {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

.pinfo-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Item Level: app date width matches item-code control */
#itemlevel-form .itemlevel-appdate-field {
  grid-column: span 2;
}
#itemlevel-form .itemlevel-appdate-input {
  width: calc(14ch + 2.25rem);
  max-width: 100%;
  box-sizing: border-box;
}

/* Item Opening: qty / rate / value on one row */
#itemopening-form .itemopening-amounts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 0.7rem;
  min-width: 0;
}
#itemopening-form .itemopening-amounts .o_field {
  min-width: 0;
}
#itemopening-form .itemopening-amount-input {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  #itemopening-form .itemopening-amounts {
    grid-template-columns: 1fr;
  }
}

/* Item Rate form: app date = item-code width; rate + currency equal halves */
#itemrate-form .itemrate-appdate-field {
  grid-column: span 2;
}
#itemrate-form .itemrate-appdate-input {
  width: calc(14ch + 2.25rem);
  max-width: 100%;
  box-sizing: border-box;
}
#itemrate-form .itemrate-rate-field,
#itemrate-form .itemrate-curr-field {
  min-width: 0;
}
#itemrate-form .itemrate-rate-input,
#itemrate-form .itemrate-curr-input,
#itemrate-form .itemrate-curr-field .klaro-select,
#itemrate-form .itemrate-curr-field .klaro-select-trigger {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
#itemrate-form .itemrate-rate-input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pinfo-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

.pinfo-hint {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  background: rgba(var(--o-paper-rgb), 0.9);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

#pinfo-list tr.selected td {
  background: rgba(var(--o-accent-rgb), 0.12);
}

#pinfo-list td.code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.82rem;
}

@media (max-width: 960px) {
  .pinfo-fields {
    grid-template-columns: 1fr;
  }
}

/* Day book interactive grid */
.daybook-results {
  margin-top: 1rem;
}

.daybook-results-head {
  margin-bottom: 0.75rem;
}

.daybook-grid-toolbar {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border: 1px solid var(--o-border);
  border-radius: 8px;
}

.daybook-grid-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.daybook-grid-search-wrap {
  flex: 1 1 220px;
  min-width: 200px;
}

.daybook-grid-search-wrap input {
  width: 100%;
  max-width: 420px;
}

.daybook-grid-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  font-size: 0.88rem;
}

.daybook-columns-dialog {
  width: min(360px, 100%);
}

.daybook-columns-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 1rem 1rem;
  font-size: 0.9rem;
}

.daybook-column-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}

.daybook-column-option:hover {
  background: var(--o-hover);
}

.o_export_menu {
  position: relative;
  display: inline-flex;
}

.o_export_dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 168px;
  padding: 0.35rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--o-border);
  box-shadow: 0 10px 28px rgba(37, 66, 76, 0.16);
  z-index: 30;
}

.o_export_dropdown[hidden] {
  display: none;
}

.o_export_dropdown .export-format {
  display: block;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--o-text);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.o_export_dropdown .export-format:hover {
  background: var(--o-hover);
}

.daybook-grid-wrap {
  max-height: 62vh;
  overflow: auto;
}

.daybook-grid-wrap.is-compact .daybook-grid-table th,
.daybook-grid-wrap.is-compact .daybook-grid-table td {
  padding: 0.25rem 0.4rem;
  font-size: 0.78rem;
}

.daybook-grid-table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.daybook-grid-table th.sortable:hover {
  background: #eef1f5;
}

.daybook-grid-table th.is-sorted {
  color: var(--o-brand);
}

.daybook-foot-page td {
  background: #f8f9fa;
}

.daybook-foot-grand td {
  background: #eef1f5;
  border-top: 2px solid var(--o-border);
}

.daybook-subtotals-wrap {
  margin-bottom: 1rem;
}

.daybook-subtotals-title {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  color: var(--o-brand);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.plnotes-split.chartnew-split {
  min-height: 26rem;
}

.plnotes-form-pane {
  max-height: calc(100vh - 14rem);
  overflow: auto;
}

.plnotes-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.85rem;
}

.plnotes-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.plnotes-field label {
  font-size: 0.78rem;
  color: var(--o-gray-600, #4b5563);
}

.plnotes-field-full {
  grid-column: 1 / -1;
}

.plnotes-field input,
.plnotes-field select {
  width: 100%;
  box-sizing: border-box;
}

.plnotes-code-wrap {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.plnotes-hint {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  background: rgba(var(--o-paper-rgb), 0.9);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

#plnotes-list tr.selected td {
  background: rgba(var(--o-accent-rgb), 0.12);
}

#plnotes-list td.code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.82rem;
}

@media (max-width: 960px) {
  .plnotes-fields {
    grid-template-columns: 1fr;
  }
}

.placct-split.chartnew-split {
  min-height: 26rem;
}

.placct-form-pane {
  max-height: calc(100vh - 14rem);
  overflow: auto;
}

.placct-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.85rem;
}

.placct-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.placct-field label {
  font-size: 0.78rem;
  color: var(--o-gray-600, #4b5563);
}

.placct-field-full {
  grid-column: 1 / -1;
}

.placct-field input,
.placct-field select {
  width: 100%;
  box-sizing: border-box;
}

.placct-code-wrap {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.placct-hint {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  background: rgba(var(--o-paper-rgb), 0.9);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

#placct-list tr.selected td {
  background: rgba(var(--o-accent-rgb), 0.12);
}

#placct-list td.code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.82rem;
}

@media (max-width: 960px) {
  .placct-fields {
    grid-template-columns: 1fr;
  }
}

.bank-split.chartnew-split {
  min-height: 24rem;
}

.bank-form-pane {
  max-height: calc(100vh - 14rem);
  overflow: auto;
}

.bank-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.85rem;
}

.bank-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.bank-field label {
  font-size: 0.78rem;
  color: var(--o-gray-600, #4b5563);
}

.bank-field-full {
  grid-column: 1 / -1;
}

.bank-field input {
  width: 100%;
  box-sizing: border-box;
}

.bank-hint {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  background: rgba(var(--o-paper-rgb), 0.9);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

#bank-list tr.selected td {
  background: rgba(var(--o-accent-rgb), 0.12);
}

@media (max-width: 960px) {
  .bank-fields {
    grid-template-columns: 1fr;
  }
}

.vsearch-sheet .vsearch-criteria {
  grid-template-columns: minmax(16rem, 2fr) minmax(12rem, 1fr);
  gap: 0.75rem 1rem;
}

.vsearch-field-ms input,
.vsearch-field-sin select {
  width: 100%;
}

.vsearch-alert {
  margin: 0.75rem 1rem 0;
}

.vsearch-hint {
  margin: 1rem;
}

.vsearch-results td:nth-child(8) {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .vsearch-sheet .vsearch-criteria {
    grid-template-columns: 1fr;
  }
}

.stconspost-split.chartnew-split {
  min-height: 28rem;
}

.stconspost-form-pane {
  padding: 1rem 1.25rem;
}

.stconspost-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.stconspost-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stconspost-field-full {
  grid-column: 1 / -1;
}

.stconspost-field label {
  font-size: 0.82rem;
  font-weight: 600;
}

.stconspost-field input {
  width: 100%;
}

.stconspost-hint {
  margin: 1rem 0 0;
}

.avp-search-pane {
  padding: 0 0 1rem;
}

.avp-hint {
  margin: 0 1rem 0.75rem;
}

.avp-col-action {
  width: 5.5rem;
  min-width: 5.5rem;
  text-align: center;
  white-space: nowrap;
}

.avp-edit-dialog {
  width: min(920px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.avp-edit-body {
  overflow: auto;
  padding: 1rem 1.25rem 1.25rem;
}

.avp-lines-wrap {
  margin-top: 1rem;
}

.avp-add-line {
  margin-top: 0.5rem;
}

#avp-list tr:hover td {
  background: rgba(var(--o-beige-rgb), 0.35);
}

#lines-table .btn-line-del {
  padding: 0.2rem 0.45rem;
  background: #fff;
  border: 1px solid #dc3545;
  color: #dc3545;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

#lines-table .btn-line-del:hover {
  background: #dc3545;
  color: #fff;
}

.btn-odoo-sm {
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
}

#stconspost-list tr.selected td {
  background: rgba(var(--o-accent-rgb), 0.12);
}

@media (max-width: 960px) {
  .stconspost-fields {
    grid-template-columns: 1fr;
  }
}

.ledger-params-sheet {
  padding: 1rem 1.25rem 1.5rem;
}

.ledger-params-intro {
  margin: 0 0 1rem;
}

.ledger-params-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.ledger-field-account {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
  gap: 0.55rem 0.75rem;
  align-items: end;
}

.ledger-account-code-block,
.ledger-account-desc-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.ledger-account-code-block label,
.ledger-account-desc-block label {
  font-size: 0.78rem;
  color: #495057;
  margin: 0;
}

.ledger-field-account input {
  width: 100%;
  padding: 0.28rem 0.45rem;
  border: 1px solid var(--o-input-border);
  border-radius: 3px;
  background: #fff;
  color: var(--o-text);
  font: inherit;
  font-size: 0.84rem;
}

.ledger-field-account input[readonly] {
  background: #f8f9fa;
  color: var(--o-muted);
}

.ledger-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem;
}

.ledger-lov {
  margin-top: 1rem;
  border: 1px solid rgba(113, 75, 103, 0.18);
  border-radius: 0.65rem;
  padding: 0.85rem;
  background: rgba(var(--o-paper-rgb), 0.85);
}

.ledger-lov-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

#lov-search {
  width: 100%;
  margin-bottom: 0.65rem;
}

#lov-table tbody tr {
  cursor: pointer;
}

@media (max-width: 960px) {
  .ledger-params-grid {
    grid-template-columns: 1fr;
  }
}

.data-table tr.chart-row.is-selected td {
  background: rgba(var(--o-accent-rgb), 0.12);
}

.o_list_pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--o-border);
}

.o_list_pager_summary {
  margin: 0;
  font-size: 0.8rem;
  color: var(--o-muted);
}

.o_list_pager_links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.o_list_pager_btn,
.o_list_pager_num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  border-radius: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--o-text);
  border: 1px solid var(--o-border);
  background: #fff;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.o_list_pager_num {
  min-width: 2rem;
  padding: 0.25rem 0.45rem;
}

.o_list_pager_btn:hover,
.o_list_pager_num:hover {
  background: var(--o-hover);
  border-color: rgba(var(--o-accent-rgb), 0.35);
  color: var(--o-brand);
  text-decoration: none;
}

.o_list_pager_num.is-active {
  background: var(--o-brand);
  border-color: var(--o-brand);
  color: #fff;
}

.o_list_pager_btn.is-disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.o_statusbar {
  display: flex;
  justify-content: flex-end;
  margin: -1rem -1.25rem 1rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--o-border);
  background: #f8f9fa;
}
.o_status {
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--o-muted);
  border-left: 1px solid var(--o-border);
}
.o_status.active {
  background: #28a745;
  color: #fff;
  border-left-color: #28a745;
}
.o_status.active.draft {
  background: #6c757d;
  border-left-color: #6c757d;
}
.o_group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}
.o_field {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem;
  align-items: center;
  min-height: 2rem;
}
.o_field.span-2 { grid-column: span 2; }
.o_field label {
  font-size: 0.82rem;
  color: #495057;
  margin: 0;
}
.o_field input,
.o_field textarea {
  width: 100%;
  padding: 0.38rem 0.55rem;
  border: 1px solid var(--o-input-border);
  border-radius: 3px;
  background: #fff;
  color: var(--o-text);
  font: inherit;
  font-size: 0.875rem;
}
.o_field input:focus,
.o_field textarea:focus,
.data-table input:focus {
  outline: none;
  border-color: var(--o-brand);
  box-shadow: 0 0 0 2px rgba(113, 75, 103, 0.15);
}
.o_field input[readonly] {
  background: #f8f9fa;
  color: var(--o-muted);
}
.o_notebook { margin-top: 0.5rem; }
.o_notebook_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 2px solid var(--o-brand);
}
.o_tab {
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--o-brand);
  border-bottom: 2px solid var(--o-brand);
  margin-bottom: -2px;
}

.o_tab-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.o_help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.o_help-trigger {
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  border: 1px solid rgba(var(--o-peach-rgb), 0.45);
  border-radius: 50%;
  background: rgba(var(--o-paper-rgb), 0.95);
  color: var(--o-muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.o_help-trigger:hover,
.o_help-trigger:focus-visible,
.o_help-wrap.is-open .o_help-trigger {
  border-color: var(--o-accent);
  color: var(--o-accent);
  background: rgba(var(--o-beige-rgb), 0.92);
  outline: none;
}

.o_help-tooltip {
  position: absolute;
  z-index: 30;
  left: 50%;
  top: calc(100% + 0.5rem);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(320px, 85vw);
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  background: var(--o-brand);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 8px 24px rgba(37, 66, 76, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.o_help-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--o-brand);
}

.o_help-tooltip strong {
  font-weight: 600;
  color: var(--o-peach);
}

.o_help-wrap:hover .o_help-tooltip,
.o_help-wrap:focus-within .o_help-tooltip,
.o_help-wrap.is-open .o_help-tooltip {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 1100px) {
  .o_help-wrap--lines {
    display: none;
  }
}
.chartnew-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.o_tab_btn {
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6c757d;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
}
.o_tab_btn:hover { color: var(--o-brand); }
.o_tab_btn.active {
  color: var(--o-brand);
  border-bottom-color: var(--o-brand);
}
.chartnew-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.85fr);
  gap: 1rem;
  padding: 0 1rem 1rem;
}
.chartopen-split.chartnew-split {
  grid-template-columns: minmax(0, 1.35fr) minmax(22rem, 0.65fr);
}

.chartopen-form-pane {
  min-width: 22rem;
}
.chartnew-list-wrap {
  padding: 0 1rem 1rem;
}
.chartnew-filters-row {
  align-items: end;
}
.chartnew-search-field {
  flex: 1 1 12rem;
  min-width: 10rem;
}
.chartnew-new-field {
  flex: 0 0 auto;
  align-self: end;
}
.chartnew-actions-col {
  width: 5.5rem;
  text-align: right;
  white-space: nowrap;
}
.chartnew-actions {
  text-align: right;
  white-space: nowrap;
}
.chartnew-actions .btn-chart-edit {
  padding: 0.28rem 0.65rem;
  font-size: 0.8rem;
}
.pinfo-form-sheet {
  padding: 0.75rem 1rem 1.25rem;
}
.chartnew-entry-dialog {
  width: min(480px, 100%);
  max-height: calc(100vh - 2rem);
}
.chartnew-entry-alert {
  margin: 0.65rem 1rem 0;
  flex-shrink: 0;
}
.chartnew-entry-alert[hidden] {
  display: none !important;
}
#chartnew-entry-modal.lov-modal {
  align-items: flex-start;
  padding-top: max(1rem, 2vh);
  padding-bottom: max(1rem, 2vh);
  overflow-y: auto;
}
.chartnew-entry-body {
  padding: 0.75rem 1rem 0.25rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.chartnew-entry-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--o-border);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.96);
}
.chartnew-entry-panel.hidden {
  display: none;
}
.chartnew-single-entry {
  padding: 0.25rem 0 0.5rem;
}
.chartnew-entry-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.chartnew-entry-row label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--o-text);
}
.chartnew-entry-row input,
.chartnew-entry-row select {
  width: 100%;
  box-sizing: border-box;
}
.chartnew-entry-row:not(.chartnew-entry-row-wide) input,
.chartnew-entry-row:not(.chartnew-entry-row-wide) select {
  max-width: 8rem;
}
.chartnew-entry-row-wide input {
  max-width: none;
}
.chartnew-entry-row-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.chartnew-dual-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.chartnew-dual-field label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--o-text);
}
.chartnew-dual-field select {
  width: 100%;
  box-sizing: border-box;
}
.chartnew-refcode-input {
  font-family: var(--font-mono, ui-monospace, monospace);
  letter-spacing: 0.02em;
}
.chartnew-entry-code-wrap {
  width: 100%;
}
.itemcoding-acct-wrap .itemcoding-acct-code {
  flex: 0 0 9.5rem;
  max-width: 9.5rem;
}
.itemcoding-acct-wrap .itemcoding-acct-desc {
  flex: 1 1 auto;
  min-width: 0;
  background: #f8f9fa;
  color: #495057;
}
.chartnew-refcode-field .code-input-wrap {
  max-width: 14rem;
}
.chartnew-list-pane {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--o-border);
  border-radius: 4px;
}
.chartnew-form-pane {
  border: 1px solid var(--o-border);
  border-radius: 4px;
  padding: 0.75rem;
  background: #fafbfc;
}
.chartnew-filters { padding: 0.75rem 1rem 0; }
.chartnew-control-table th.col-chart-seg,
.chartnew-control-table td:nth-child(1) {
  min-width: 5.5rem;
  width: 6.5rem;
  white-space: nowrap;
}
.chartnew-control-table th.col-chart-code,
.chartnew-control-table td:nth-child(2) {
  min-width: 8.5rem;
  width: 9.5rem;
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 600;
  white-space: nowrap;
}
.chartnew-control-table th.col-chart-type,
.chartnew-control-table td:nth-child(3) {
  min-width: 5.5rem;
  width: 6rem;
  white-space: nowrap;
}
.chartnew-fullcode-field {
  margin-bottom: 0.25rem;
}
.chartnew-readonly-code {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: #eef1f5 !important;
  color: var(--o-text);
  cursor: default;
}
.chart-tab.hidden { display: none; }
.data-table tr.chart-row { cursor: pointer; }
.data-table tr.chart-row:hover { background: #f0f4ff; }
@media (max-width: 900px) {
  .chartnew-split { grid-template-columns: 1fr; }
}
.o_notebook_content { padding-top: 0.75rem; }
.o_form_help {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--o-muted);
}

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--o-panel);
}
.data-table th {
  background: #f8f9fa;
  color: #495057;
  font-weight: 500;
  border-bottom: 2px solid var(--o-border);
  padding: 0.5rem 0.65rem;
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  border-bottom: 1px solid #e9ecef;
  padding: 0.45rem 0.65rem;
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background: #fafafa;
}
.data-table tfoot td {
  background: #f8f9fa;
  font-weight: 600;
}
.data-table input {
  width: 100%;
  min-width: 70px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--o-input-border);
  border-radius: 3px;
  background: #fff;
  font: inherit;
  font-size: 0.875rem;
}
.data-table input[readonly] {
  background: #f8f9fa;
  border-color: #e9ecef;
}
.data-table a {
  font-weight: 500;
}

.code-input-wrap {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.time-apm-wrap {
  display: inline-flex;
  gap: 0.2rem;
  align-items: center;
  flex-wrap: wrap;
}

.time-apm-wrap select {
  min-width: 3.25rem;
}

#shifts-table .time-input {
  width: 7.25rem;
  min-width: 7.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

#shifts-table .time-input.time-input-invalid,
.route-header-fields .time-input.time-input-invalid,
.time-input.time-input-invalid {
  border-color: #dc3545;
  background: #fff5f5;
}

.route-header-fields .time-input {
  width: 7.25rem;
  min-width: 7.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.time-input-masked::placeholder {
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.client-lookup-field {
  position: relative;
  overflow: visible;
}

.client-lookup-wrap {
  position: relative;
  width: 100%;
  overflow: visible;
}

.client-lookup-wrap .pinfo-code-name-wrap .pinfo-code-wrap {
  width: calc(10rem + 2.25rem);
  max-width: calc(10rem + 2.25rem);
}

.client-lookup-wrap .pinfo-code-name-wrap .pinfo-chcode-input {
  width: 10rem;
  min-width: 10rem;
  max-width: 10rem;
  flex: 0 0 10rem;
}

.client-suggest-panel {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(var(--o-peach-rgb), 0.38);
  border-radius: 0.55rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.client-suggest-panel[hidden] {
  display: none !important;
}

.client-suggest-scroll {
  max-height: 12.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  outline: none;
}

.client-suggest-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin: 0;
}

.client-suggest-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.4rem 0.55rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--o-gray-600, #6b7280);
  background: var(--o-paper);
  border-bottom: 1px solid rgba(var(--o-peach-rgb), 0.28);
}

.client-suggest-table td {
  padding: 0.42rem 0.55rem;
  border-bottom: 1px solid rgba(var(--o-peach-rgb), 0.12);
  vertical-align: top;
}

.client-suggest-table td.code {
  width: 10rem;
  white-space: nowrap;
}

.client-suggest-table tr.client-suggest-row {
  cursor: pointer;
}

.client-suggest-table tr.client-suggest-row:hover,
.client-suggest-table tr.client-suggest-row.selected {
  background: var(--o-hover, #fff3e8);
}

.client-suggest-table code {
  color: var(--o-brand, var(--o-accent));
  background: #f8f9fa;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
}

.client-suggest-status {
  margin: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  color: var(--o-gray-600, #6b7280);
  background: var(--o-paper);
  border-top: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

.contract-lines-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.contract-lines-wrap .contract-lines-table,
.contract-lines-wrap .data-table.contract-lines-table {
  table-layout: auto;
  width: max-content;
  min-width: 1100px;
  border-collapse: collapse;
}

.contract-lines-wrap .contract-lines-table th,
.contract-lines-wrap .contract-lines-table td {
  padding: 0.35rem 0.4rem;
  vertical-align: middle;
  white-space: nowrap;
}

.contract-lines-wrap .contract-lines-table th.col-route-code,
.contract-lines-wrap .contract-lines-table td:nth-child(1),
.contract-lines-wrap .contract-lines-table th.col-bus-code,
.contract-lines-wrap .contract-lines-table td:nth-child(3) {
  min-width: 8.5rem;
  width: 8.5rem;
}

.contract-lines-wrap .contract-lines-table th.col-route-name,
.contract-lines-wrap .contract-lines-table td:nth-child(2),
.contract-lines-wrap .contract-lines-table th.col-bus-name,
.contract-lines-wrap .contract-lines-table td:nth-child(4) {
  min-width: 12rem;
  width: 14rem;
}

.contract-lines-wrap .contract-lines-table th.col-turns,
.contract-lines-wrap .contract-lines-table td:nth-child(5),
.contract-lines-wrap .contract-lines-table th.col-rental,
.contract-lines-wrap .contract-lines-table td:nth-child(6),
.contract-lines-wrap .contract-lines-table th.col-diesel,
.contract-lines-wrap .contract-lines-table td:nth-child(7),
.contract-lines-wrap .contract-lines-table th.col-taxpct,
.contract-lines-wrap .contract-lines-table td:nth-child(8),
.contract-lines-wrap .contract-lines-table th.col-taxamt,
.contract-lines-wrap .contract-lines-table td:nth-child(9),
.contract-lines-wrap .contract-lines-table th.col-mtag,
.contract-lines-wrap .contract-lines-table td:nth-child(10) {
  min-width: 6.5rem;
  width: 6.5rem;
}

.contract-lines-wrap .contract-lines-table th.col-eff,
.contract-lines-wrap .contract-lines-table td:nth-child(11),
.contract-lines-wrap .contract-lines-table td:nth-child(12) {
  min-width: 8.5rem;
  width: 8.5rem;
}

.contract-lines-wrap .contract-lines-table th.col-del,
.contract-lines-wrap .contract-lines-table td:nth-child(13) {
  width: 3.5rem;
  min-width: 3.5rem;
  text-align: center;
}

.contract-lines-wrap .grid-lookup-wrap {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}

.contract-lines-wrap .route-code,
.contract-lines-wrap .bus-code {
  width: 100%;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
}

.contract-lines-wrap .route-name,
.contract-lines-wrap .bus-name {
  width: 100%;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
}

.contract-lines-wrap input.no-turns,
.contract-lines-wrap input.monthly-rental,
.contract-lines-wrap input.diesel-avg,
.contract-lines-wrap input.tax-pct,
.contract-lines-wrap input.tax-amt,
.contract-lines-wrap input.mtag-rate {
  width: 100%;
  min-width: 5.5rem;
  box-sizing: border-box;
}

.contract-grid-lookup {
  position: fixed;
  z-index: 1400;
  margin: 0;
  width: min(28rem, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  max-height: min(20rem, calc(100vh - 1rem));
  top: 0;
  left: 0;
  right: auto;
  display: flex;
  flex-direction: column;
}
.contract-grid-lookup .client-suggest-scroll {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
}

.contract-grid-lookup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  background: var(--o-paper);
  border-bottom: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

.grid-lookup-search {
  margin: 0.45rem 0.65rem 0;
  width: calc(100% - 1.3rem);
}

.o_help-text.muted {
  margin-left: 0.75rem;
  font-size: 0.78rem;
  color: var(--o-gray-600, #6b7280);
}

/* Inventory voucher forms (SPO, SIGP, GRN, GRN_R) */
.inv-voucher-form .inv-voucher-fields {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.inv-voucher-form .inv-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem 1.25rem;
  align-items: start;
}

.inv-voucher-form .inv-field-row--full {
  grid-template-columns: minmax(0, 1fr);
}

.inv-voucher-form .inv-voucher-fields .o_field {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  min-height: 2rem;
}

.inv-voucher-form .inv-voucher-fields .o_field > label {
  white-space: nowrap;
  font-size: 0.82rem;
  color: #495057;
  margin: 0;
}

.inv-voucher-form .inv-field-block {
  align-items: start;
}

.inv-voucher-form .inv-field-block textarea {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
}

.inv-voucher-form .inv-code-name-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  gap: 0;
}

.inv-voucher-form .inv-code-wrap {
  flex: 0 0 auto;
  gap: 0;
}

.inv-voucher-form .inv-code-wrap input {
  width: 9ch;
  min-width: 9ch;
  max-width: 9ch;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 0;
}

.inv-voucher-form .inv-code-wrap .lov-btn {
  border-radius: 0;
}

.inv-voucher-form .inv-name-input {
  flex: 1 1 auto;
  min-width: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.inv-voucher-form .inv-lines-table {
  min-width: 880px;
}

/* itemcode/pono, code-input-wrap, itemdesc, stvalue/ivalue/value, and the
   :not(--sigp) nth-child(1-3) / --spo / --grn / --sigp(1-3) column rules
   were duplicated here; they now live once under the higher-specificity
   #lines-table.inv-lines-table selector below ("Inventory voucher grids"
   block) since that selector always wins anyway. */

.inv-voucher-form .inv-lines-table--sigp th:nth-child(4),
.inv-voucher-form .inv-lines-table--sigp td:nth-child(4) {
  width: 6rem;
  max-width: 6rem;
}

@media (max-width: 900px) {
  .inv-voucher-form .inv-field-row {
    grid-template-columns: 1fr;
  }
}
.lov-btn {
  padding: 0.3rem 0.45rem;
  min-width: 1.8rem;
  background: #fff;
  border: 1px solid var(--o-input-border);
  color: #495057;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 700;
}
.lov-btn:hover {
  background: var(--o-hover);
  border-color: var(--o-brand);
  color: var(--o-brand);
}
.remove-line {
  padding: 0.25rem 0.5rem;
  background: #fff;
  border: 1px solid #dc3545;
  color: #dc3545;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
}
.remove-line:hover {
  background: #dc3545;
  color: #fff;
}

/* LOV modal */
.lov-modal {
  position: fixed;
  inset: 0;
  background: rgba(37, 66, 76, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1400;
  padding: 1rem;
}
.lov-modal[hidden] { display: none; }

/* While Party LOV is open, keep confirm dialogs underneath */
.confirm-modal.is-behind-lov {
  z-index: 1200;
  pointer-events: none;
}

/* Print preview modal */
.print-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 31, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1.25rem;
}
.print-modal[hidden] { display: none; }
.print-dialog {
  width: min(960px, 100%);
  height: min(94vh, 920px);
  background: #eef1f5;
  border: 1px solid #d5dbe3;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.print-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--o-border);
  background: linear-gradient(180deg, #fff 0%, #f8f9fb 100%);
}
.print-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.print-header-icon {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f3eaf1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--o-brand);
  flex-shrink: 0;
}
.print-header h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--o-text);
}
.print-header-sub {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: var(--o-muted);
}
.print-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.print-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #eef1f5;
}
.print-dialog-wide {
  width: min(1100px, 100%);
}

/* Embedded master form dialog (e.g. Item Coding from Item Opening) */
.form-embed-modal {
  z-index: 1500;
}
.form-embed-dialog {
  width: min(1100px, 100%);
  height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.form-embed-dialog .lov-header {
  flex-shrink: 0;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #d5dbe3;
}
.form-embed-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
  min-height: 0;
}
body.o_embed_dialog .o_web_client.o_embed_dialog,
.o_web_client.o_embed_dialog {
  min-height: 100vh;
}
.o_web_client.o_embed_dialog .o_workspace-full,
.o_web_client.o_embed_dialog .o_main {
  margin: 0;
  padding: 0;
}

/* Confirm dialog */
.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(37, 66, 76, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 1rem;
}
.confirm-modal[hidden] { display: none; }
.confirm-dialog {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(var(--o-peach-rgb), 0.28);
  border-radius: 1rem;
  padding: 1.35rem 1.5rem 1.15rem;
  box-shadow:
    0 12px 40px rgba(37, 66, 76, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  text-align: center;
}
.confirm-dialog p {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  color: var(--o-text);
}
.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.lov-dialog {
  width: min(720px, 100%);
  max-height: 80vh;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(var(--o-peach-rgb), 0.28);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 12px 40px rgba(37, 66, 76, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  overflow: hidden;
}
.lov-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--o-border);
}
.lov-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}
.lov-search { padding: 0.75rem 1rem 0; }
.lov-search input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 3px;
  border: 1px solid var(--o-input-border);
  background: #fff;
  font: inherit;
}

/* SQUOT service description paragraph editor */
.desc-edit-dialog {
  width: min(560px, 100%);
}
.desc-edit-body {
  padding: 0.85rem 1rem 0.25rem;
}
.desc-edit-body textarea {
  width: 100%;
  min-height: 10rem;
  resize: vertical;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--o-input-border);
  border-radius: 3px;
  background: #fff;
  font: inherit;
  line-height: 1.45;
  box-sizing: border-box;
}
.desc-edit-body textarea:focus {
  border-color: var(--o-accent);
  box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.18);
  outline: none;
}
.desc-edit-body textarea[readonly] {
  background-color: #f8f9fa;
  color: #495057;
}
.desc-edit-actions {
  padding: 0.85rem 1rem 1rem;
  justify-content: flex-end;
}
#squot-form .ln-desc-wrap,
#quot-form .ln-desc-wrap,
#demand-form .ln-desc-wrap,
#po-form .ln-desc-wrap,
#grn-form .ln-desc-wrap,
#dc-form .ln-desc-wrap,
#ssale-form .ln-desc-wrap,
#sale-form .ln-desc-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  width: 100%;
  min-width: 12rem;
}
#squot-form .ln-desc-wrap .ln-desc-preview,
#quot-form .ln-desc-wrap .ln-desc-preview,
#demand-form .ln-desc-wrap .ln-desc-preview,
#po-form .ln-desc-wrap .ln-desc-preview,
#grn-form .ln-desc-wrap .ln-desc-preview,
#dc-form .ln-desc-wrap .ln-desc-preview,
#ssale-form .ln-desc-wrap .ln-desc-preview,
#sale-form .ln-desc-wrap .ln-desc-preview {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
#squot-form .ln-desc-wrap .ln-desc[hidden],
#quot-form .ln-desc-wrap .ln-desc[hidden],
#demand-form .ln-desc-wrap .ln-desc[hidden],
#po-form .ln-desc-wrap .ln-desc[hidden],
#grn-form .ln-desc-wrap .ln-desc[hidden],
#dc-form .ln-desc-wrap .ln-desc[hidden],
#ssale-form .ln-desc-wrap .ln-desc[hidden],
#sale-form .ln-desc-wrap .ln-desc[hidden] {
  display: none !important;
}
#squot-form .ln-desc-expand,
#quot-form .ln-desc-expand,
#demand-form .ln-desc-expand,
#po-form .ln-desc-expand,
#grn-form .ln-desc-expand,
#dc-form .ln-desc-expand,
#ssale-form .ln-desc-expand,
#sale-form .ln-desc-expand {
  flex: 0 0 auto;
  padding: 0.15rem 0.45rem;
  min-width: 1.75rem;
  line-height: 1.2;
  font-size: 0.85rem;
}
.lov-table-wrap {
  overflow: auto;
  max-height: 52vh;
  margin: 0.75rem 1rem 0;
}
.lov-table tbody tr { cursor: pointer; }
.lov-table tbody tr:hover,
.lov-table tbody tr.selected {
  background: var(--o-hover);
}
.lov-table code {
  color: var(--o-brand);
  background: #f8f9fa;
}

.o_main-form {
  padding: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, var(--o-paper) 0%, var(--o-beige) 48%, var(--o-tint-3) 100%);
}

.o_main-form .o_action {
  min-height: calc(100vh - var(--o-topbar-height));
  display: flex;
  flex-direction: column;
  flex: 1;
}

.o_main-form .o_form_view {
  max-width: none;
  width: 100%;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.o_main-form .o_control_panel {
  flex-shrink: 0;
  margin: 0;
  padding: 1.15rem clamp(1.25rem, 2.5vw, 2rem);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.45);
  -webkit-backdrop-filter: blur(20px) saturate(1.45);
  border-bottom: 1px solid rgba(var(--o-peach-rgb), 0.22);
  box-shadow: 0 4px 24px rgba(37, 66, 76, 0.06);
}

.o_main-form .o_breadcrumb a {
  color: var(--o-accent);
  font-weight: 500;
}

.o_main-form .o_breadcrumb a:hover {
  color: var(--o-accent-dark);
}

.o_main-form .o_cp_title {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--o-brand);
}

.o_main-form .o_cp_right {
  gap: 0.5rem;
}

.o_main-form .o_content {
  flex: 1;
  width: 100%;
  max-width: none;
  padding: 1.15rem clamp(1.25rem, 2.5vw, 2rem) 1.75rem;
  overflow: auto;
}

.o_main-form .o_form_sheet_bg,
.o_main-form .o_list_sheet {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 1.125rem;
  box-shadow:
    0 8px 32px rgba(37, 66, 76, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  padding: 1.35rem 1.5rem 1.5rem;
}

.o_main-form .o_statusbar {
  margin: -1.35rem -1.5rem 1.25rem;
  padding: 0.75rem 1.5rem;
  border-radius: 1.125rem 1.125rem 0 0;
  background: rgba(var(--o-paper-rgb), 0.88);
  border-bottom: 1px solid rgba(37, 66, 76, 0.08);
}

.o_main-form .o_status {
  border-left: none;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-left: 0.35rem;
}

.o_main-form .o_status.active {
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.25);
}

.o_main-form .o_status.active.draft {
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.o_main-form .o_field input,
.o_main-form .o_field textarea,
.o_main-form .o_field select:not(.klaro-select-native),
.o_main-form .data-table input,
.o_main-form .data-table select:not(.klaro-select-native),
.o_main-form .o_list_search input:not(.o_list_search-input) {
  border-radius: 0.55rem;
  border-color: rgba(var(--o-peach-rgb), 0.38);
  padding: 0.45rem 0.65rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.o_main-form .o_field input:focus,
.o_main-form .o_field textarea:focus,
.o_main-form .o_field select:not(.klaro-select-native):focus,
.o_main-form .data-table input:focus,
.o_main-form .data-table select:not(.klaro-select-native):focus {
  border-color: var(--o-accent);
  box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.18);
  outline: none;
}

.o_main-form .o_notebook_header {
  border-bottom-color: rgba(var(--o-accent-rgb), 0.35);
}

.o_main-form .o_tab {
  border-radius: 0.55rem 0.55rem 0 0;
  color: var(--o-accent);
  border-bottom-color: var(--o-accent);
}

.o_main-form .table-wrap {
  border-radius: 0.75rem;
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  background: rgba(255, 255, 255, 0.65);
}

#lines-table {
  table-layout: fixed;
  width: 100%;
  min-width: 760px;
}

#lines-table th,
#lines-table td {
  padding-left: 0.28rem;
  padding-right: 0.28rem;
}

#lines-table th:nth-child(1),
#lines-table td:nth-child(1) {
  width: 10rem;
}

#lines-table th:nth-child(2),
#lines-table td:nth-child(2) {
  width: 22rem;
}

/* Narration (5-col CP/CR/BP/BR and 6-col JV/BV) */
#lines-table th:nth-child(3),
#lines-table td:nth-child(3) {
  width: 20rem;
}

/* Amount column: DR (6-col) or single amount (5-col) */
#lines-table th:nth-child(4),
#lines-table td:nth-child(4) {
  width: 8rem;
}

/* 5-column tables (CP/CR/BP/BR): last column is remove */
#lines-table:not(:has(thead th:nth-child(6))) th:last-child,
#lines-table:not(:has(thead th:nth-child(6))) td:last-child {
  width: 2.25rem;
  min-width: 2.25rem;
  padding-left: 0.15rem;
  padding-right: 0.15rem;
  text-align: center;
  vertical-align: middle;
}

/* 6-column tables (JV/BV): CR then remove */
#lines-table:has(thead th:nth-child(6)) th:nth-child(5),
#lines-table:has(thead th:nth-child(6)) td:nth-child(5) {
  width: 7.35rem;
}

#lines-table:has(thead th:nth-child(6)) th:last-child,
#lines-table:has(thead th:nth-child(6)) td:last-child {
  width: 2.25rem;
  min-width: 2.25rem;
  padding-left: 0.15rem;
  padding-right: 0.15rem;
  text-align: center;
  vertical-align: middle;
}

#lines-table input {
  min-width: 0;
  box-sizing: border-box;
  padding: 0.28rem 0.32rem;
}

#lines-table .code-input-wrap {
  max-width: none;
  width: 100%;
  gap: 0.12rem;
}

#lines-table .chcode {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  letter-spacing: 0;
}

#lines-table .lov-btn {
  flex-shrink: 0;
  padding: 0.2rem 0.28rem;
  min-width: 1.45rem;
  font-size: 0.72rem;
}

#lines-table .chdesc {
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  min-height: 2rem;
}

#lines-table .narration {
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  min-height: 2rem;
}

#lines-table.fv-lines-table {
  table-layout: fixed;
  width: 100%;
  min-width: 90.5rem;
}

#lines-table.fv-lines-table thead th {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
  font-size: 0.78rem;
  vertical-align: bottom;
  padding: 0.35rem 0.3rem;
}

#lines-table.fv-lines-table .fv-col-code {
  width: 8.5rem;
}

#lines-table.fv-lines-table .fv-col-name {
  width: 22rem;
}

#lines-table.fv-lines-table .fv-col-narr {
  width: 20rem;
}

#lines-table.fv-lines-table .fv-col-rate {
  width: 7.5rem;
}

#lines-table.fv-lines-table .fv-col-fcdr {
  width: 7rem;
}

#lines-table.fv-lines-table .fv-col-dr {
  width: 7rem;
}

#lines-table.fv-lines-table .fv-col-fccr {
  width: 7rem;
}

#lines-table.fv-lines-table .fv-col-cr {
  width: 7rem;
}

#lines-table.fv-lines-table .fv-col-del {
  width: 2.25rem;
}

#lines-table.fv-lines-table th:nth-child(2),
#lines-table.fv-lines-table td:nth-child(2) {
  width: 8.5rem;
}

#lines-table.fv-lines-table th:nth-child(3),
#lines-table.fv-lines-table td:nth-child(3) {
  width: 22rem;
}

#lines-table.fv-lines-table th:nth-child(4),
#lines-table.fv-lines-table td:nth-child(4) {
  width: 20rem;
}

#lines-table.fv-lines-table th:nth-child(5),
#lines-table.fv-lines-table td:nth-child(5) {
  width: 7.5rem;
  min-width: 7.5rem;
}

#lines-table.fv-lines-table th:nth-child(6),
#lines-table.fv-lines-table td:nth-child(6) {
  width: 7rem;
  min-width: 7rem;
}

#lines-table.fv-lines-table th:nth-child(7),
#lines-table.fv-lines-table td:nth-child(7),
#lines-table.fv-lines-table th:nth-child(8),
#lines-table.fv-lines-table td:nth-child(8),
#lines-table.fv-lines-table th:nth-child(9),
#lines-table.fv-lines-table td:nth-child(9) {
  width: 7rem;
  min-width: 7rem;
}

#lines-table.fv-lines-table th:last-child,
#lines-table.fv-lines-table td:last-child {
  width: 2.25rem;
  min-width: 2.25rem;
  padding-left: 0.15rem;
  padding-right: 0.15rem;
  text-align: center;
  vertical-align: middle;
}

#lines-table.fv-lines-table .chcode {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

#lines-table.fv-lines-table .narration {
  min-width: 0;
}

#lines-table.fv-lines-table .fcdr,
#lines-table.fv-lines-table .fccr,
#lines-table.fv-lines-table .dexchgrate,
#lines-table.fv-lines-table .dr,
#lines-table.fv-lines-table .cr {
  width: 100%;
  min-width: 0;
  text-align: right;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

#lines-table.fv-lines-table td:nth-child(5),
#lines-table.fv-lines-table td:nth-child(6),
#lines-table.fv-lines-table td:nth-child(7),
#lines-table.fv-lines-table td:nth-child(8),
#lines-table.fv-lines-table td:nth-child(9) {
  text-align: right;
}

#lines-table.fv-lines-table .fv-voucher-balance {
  text-align: right;
  font-size: 0.82rem;
  padding-top: 0.35rem;
}

#lines-table.fv-lines-table .fv-balance-ok {
  color: #1f7a3f;
  font-weight: 600;
}

#lines-table.fv-lines-table .fv-balance-error {
  color: #b42318;
  font-weight: 600;
}

#lines-table .fcdr,
#lines-table .fccr,
#lines-table .dexchgrate,
#lines-table .dr,
#lines-table .cr {
  width: 100%;
  min-width: 9ch;
  text-align: right;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

#lines-table .dr,
#lines-table .cr {
  width: 100%;
  min-width: 11ch;
  text-align: right;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

#lines-table td:nth-child(5),
#lines-table:has(thead th:nth-child(7)) td:nth-child(6) {
  text-align: right;
}

#lines-table td:last-child .remove-line {
  display: inline-block;
  min-width: 1.65rem;
  padding: 0.2rem 0.35rem;
  line-height: 1;
}

/* Inventory voucher grids ? override generic #lines-table (JV/BV column layout) */
.inv-voucher-form #lines-table.inv-lines-table {
  min-width: 1080px;
}

.inv-voucher-form #lines-table.inv-lines-table th,
.inv-voucher-form #lines-table.inv-lines-table td {
  padding-left: 0.28rem;
  padding-right: 0.28rem;
}

.inv-voucher-form #lines-table.inv-lines-table .itemcode,
.inv-voucher-form #lines-table.inv-lines-table .pono {
  width: 9ch;
  min-width: 9ch;
  max-width: 9ch;
  flex: 0 0 9ch;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
}

.inv-voucher-form #lines-table.inv-lines-table .code-input-wrap {
  width: auto;
  max-width: calc(9ch + 1.85rem);
  gap: 0.1rem;
}

.inv-voucher-form #lines-table.inv-lines-table .itemdesc {
  white-space: normal;
  word-break: break-word;
}

.inv-voucher-form #lines-table.inv-lines-table .stvalue,
.inv-voucher-form #lines-table.inv-lines-table .ivalue,
.inv-voucher-form #lines-table.inv-lines-table .value {
  background: #f8f9fa;
  color: #495057;
}

.inv-voucher-form #lines-table.inv-lines-table:not(.inv-lines-table--sigp) th:nth-child(1),
.inv-voucher-form #lines-table.inv-lines-table:not(.inv-lines-table--sigp) td:nth-child(1) {
  width: calc(9ch + 2.1rem);
  max-width: calc(9ch + 2.1rem);
  padding-right: 0.85rem;
}

.inv-voucher-form #lines-table.inv-lines-table:not(.inv-lines-table--sigp) th:nth-child(2),
.inv-voucher-form #lines-table.inv-lines-table:not(.inv-lines-table--sigp) td:nth-child(2) {
  width: auto;
  min-width: 18rem;
  padding-left: 0.45rem;
}

.inv-voucher-form #lines-table.inv-lines-table:not(.inv-lines-table--sigp) th:nth-child(3),
.inv-voucher-form #lines-table.inv-lines-table:not(.inv-lines-table--sigp) td:nth-child(3) {
  width: 6rem;
  max-width: 6rem;
}

.inv-voucher-form #lines-table.inv-lines-table--spo th:nth-child(5),
.inv-voucher-form #lines-table.inv-lines-table--spo td:nth-child(5) {
  width: 3.5rem;
  max-width: 3.5rem;
}

.inv-voucher-form #lines-table.inv-lines-table--grn th:nth-child(6),
.inv-voucher-form #lines-table.inv-lines-table--grn td:nth-child(6) {
  width: 3.5rem;
  max-width: 3.5rem;
}

.inv-voucher-form #lines-table.inv-lines-table--sigp th:nth-child(1),
.inv-voucher-form #lines-table.inv-lines-table--sigp td:nth-child(1) {
  width: calc(9ch + 2.1rem);
  max-width: calc(9ch + 2.1rem);
  padding-right: 0.55rem;
}

.inv-voucher-form #lines-table.inv-lines-table--sigp th:nth-child(2),
.inv-voucher-form #lines-table.inv-lines-table--sigp td:nth-child(2) {
  width: calc(9ch + 2.1rem);
  max-width: calc(9ch + 2.1rem);
  padding-right: 0.85rem;
}

.inv-voucher-form #lines-table.inv-lines-table--sigp th:nth-child(3),
.inv-voucher-form #lines-table.inv-lines-table--sigp td:nth-child(3) {
  width: auto;
  min-width: 16rem;
  padding-left: 0.45rem;
}

.inv-voucher-form #lines-table.inv-lines-table--sigp th:nth-child(4),
.inv-voucher-form #lines-table.inv-lines-table--sigp td:nth-child(4),
.inv-voucher-form #lines-table.inv-lines-table--sigp th:nth-child(5),
.inv-voucher-form #lines-table.inv-lines-table--sigp td:nth-child(5),
.inv-voucher-form #lines-table.inv-lines-table--sigp th:nth-child(6),
.inv-voucher-form #lines-table.inv-lines-table--sigp td:nth-child(6) {
  width: 5.5rem;
  max-width: 5.5rem;
}

.inv-voucher-form #lines-table.inv-lines-table--sigp th:nth-child(7),
.inv-voucher-form #lines-table.inv-lines-table--sigp td:nth-child(7) {
  width: 6rem;
  max-width: 6rem;
}

.inv-voucher-form #lines-table.inv-lines-table--sigp th:nth-child(8),
.inv-voucher-form #lines-table.inv-lines-table--sigp td:nth-child(8) {
  width: auto;
  min-width: 8rem;
}

.inv-voucher-form .inv-lines-table .oqty,
.inv-voucher-form .inv-lines-table .rqty,
.inv-voucher-form .inv-lines-table .bqty {
  background: #f8f9fa;
  color: #495057;
}

.inv-voucher-form #lines-table.inv-lines-table--sigp td.code-cell {
  overflow: hidden;
  position: relative;
}

.inv-voucher-form #lines-table.inv-lines-table--sigp .po-lov,
.inv-voucher-form #lines-table.inv-lines-table--sigp .item-lov {
  position: relative;
  z-index: 1;
}

.inv-voucher-form #lines-table.inv-lines-table th:last-child,
.inv-voucher-form #lines-table.inv-lines-table td:last-child {
  width: 2.25rem;
  min-width: 2.25rem;
  padding-left: 0.15rem;
  padding-right: 0.15rem;
  text-align: center;
  vertical-align: middle;
}

.o_main-form .data-table th {
  background: rgba(var(--o-paper-rgb), 0.95);
  color: var(--o-brand);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom-color: rgba(var(--o-peach-rgb), 0.25);
}

.o_main-form .data-table tbody tr:hover {
  background: rgba(var(--o-beige-rgb), 0.45);
}

.o_main-form .data-table tfoot td {
  background: rgba(var(--o-paper-rgb), 0.95);
  color: var(--o-brand);
}

.o_main-form .alert {
  margin: 0.85rem clamp(1.25rem, 2.5vw, 2rem) 0;
  border-radius: 0.75rem;
}

.o_main-form .o_list_search {
  border-bottom-color: rgba(var(--o-peach-rgb), 0.2);
}

.btn-odoo-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
}

.btn-odoo-with-icon svg {
  flex-shrink: 0;
}

.o_main-form .o_list_search--toolbar {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
}

.o_list_search-toolbar {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.o_list_search-field-wrap {
  position: relative;
  flex: 1 1 20rem;
  min-width: min(100%, 20rem);
}

.o_list_search-field-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--o-muted);
  pointer-events: none;
  z-index: 1;
}

.o_list_search-input {
  width: 100%;
  min-height: var(--o-touch-min);
  padding: 0.55rem 0.85rem 0.55rem 3rem;
  border: 1px solid var(--o-input-border);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  color: var(--o-text);
  -webkit-appearance: none;
  appearance: none;
}

.o_list_search-input::-webkit-search-decoration,
.o_list_search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.o_main-form .o_list_search--toolbar .o_list_search-input {
  padding: 0.55rem 0.85rem 0.55rem 3rem;
}

.o_list_search-input:focus {
  outline: none;
  border-color: var(--o-accent);
  box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.15);
}

.o_list_search--toolbar .o_list_search_actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.forms-catalog-list .o_list_sheet {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.forms-catalog-list .table-wrap {
  flex: 1;
  min-height: 0;
}

.forms-catalog-list .data-table {
  width: 100%;
}

/* Forms Catalog entry ï¿½ compact 3-col sheet */
.forms-catalog-entry .forms-catalog-sheet {
  padding: 0.75rem 1rem 1.1rem;
  max-width: 56rem;
}
.forms-catalog-entry .forms-catalog-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 0.75rem;
  row-gap: 0.55rem;
  align-items: end;
  margin-bottom: 0.65rem;
}
.forms-catalog-entry .forms-catalog-fields > .o_field.span-3 {
  grid-column: 1 / -1;
}
.forms-catalog-entry .forms-catalog-fields .o_field input,
.forms-catalog-entry .forms-catalog-fields .o_field select {
  width: 100%;
  max-width: none;
  min-height: 1.9rem;
  height: 1.9rem;
  box-sizing: border-box;
}
.forms-catalog-entry .forms-code-input {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.forms-catalog-entry .forms-lov-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  max-width: none;
}
.forms-catalog-entry .forms-lov-wrap input {
  flex: 1 1 auto;
  min-width: 0;
}
.forms-catalog-entry .forms-lov-wrap .lov-btn {
  flex: 0 0 auto;
}
.forms-catalog-entry .forms-catalog-hint {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 0.45rem;
  background: rgba(var(--o-paper-rgb), 0.9);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
  font-size: 0.82rem;
  color: #495057;
}
@media (max-width: 720px) {
  .forms-catalog-entry .forms-catalog-fields {
    grid-template-columns: 1fr;
  }
  .forms-catalog-entry .forms-catalog-fields > .o_field.span-3 {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .o_list_search-toolbar {
    flex-direction: column;
  }

  .o_list_search--toolbar .o_list_search_actions {
    width: 100%;
  }

  .o_list_search--toolbar .o_list_search_actions .btn-odoo {
    flex: 1;
  }
}

.rights {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  color: var(--o-muted);
  font-size: 0.875rem;
}

/* ============================================================
   Responsive layout ? all screen sizes
   ============================================================ */

.o_topbar-menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--o-topbar-icon-radius);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.o_topbar-menu-toggle:hover,
.o_topbar-menu-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(var(--o-peach-rgb), 0.55);
  outline: none;
}

.o_sidebar_backdrop {
  display: none;
}

@media (max-width: 1024px) {
  .o_topbar-menu-toggle {
    display: grid;
  }

  .o_sidebar_backdrop {
    display: block;
    position: fixed;
    inset: 0;
    top: var(--o-topbar-height);
    z-index: 250;
    background: rgba(37, 66, 76, 0.48);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s;
  }

  body.o_sidebar-open .o_sidebar_backdrop {
    opacity: 1;
    visibility: visible;
  }

  body.o_sidebar-open {
    overflow: hidden;
  }

  .o_workspace {
    flex-direction: column;
  }

  .o_sidebar {
    position: fixed;
    top: var(--o-topbar-height);
    left: 0;
    bottom: 0;
    width: min(var(--o-sidebar-width), min(88vw, 320px));
    max-height: none;
    z-index: 260;
    transform: translateX(-105%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 8px 0 32px rgba(37, 66, 76, 0.18);
    border-right: 1px solid var(--o-border);
    border-bottom: none;
  }

  body.o_sidebar-open .o_sidebar {
    transform: translateX(0);
  }

  .o_main {
    width: 100%;
    min-height: 0;
  }

  .o_group {
    grid-template-columns: 1fr;
  }

  .o_field {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.35rem;
  }

  .o_field.span-2 {
    grid-column: span 1;
  }

  .o_control_panel {
    flex-direction: column;
    align-items: stretch;
  }

  .o_cp_right {
    justify-content: flex-start;
    width: 100%;
  }

  .chartnew-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .o_topbar-row {
    padding: 0 0.75rem;
    gap: 0.45rem;
  }

  .o_topbar-actions {
    gap: 0.35rem;
  }

  .o_topbar-company-name {
    max-width: 110px;
    font-size: 0.68rem;
  }

  .o_topbar-company-fy {
    display: none;
  }

  .o_topbar-crumb {
    display: none;
  }

  .o_topbar-title {
    font-size: 0.92rem;
  }

  .o_main:has(.o_home) {
    padding: 0;
  }

  .o_main {
    padding: 0.75rem 0.65rem 1rem;
  }

  .o_workspace-full .o_main {
    max-width: none;
    margin: 0;
  }

  .o_action {
    min-height: auto;
  }

  .o_main-form .o_control_panel,
  .o_main-form .o_content {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .o_main-form .o_form_sheet_bg,
  .o_main-form .o_list_sheet {
    padding: 1rem 0.85rem 1.1rem;
    border-radius: 0.85rem;
  }

  .o_main-form .o_statusbar {
    margin: -1rem -0.85rem 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.85rem 0.85rem 0 0;
  }

  .o_cp_title {
    font-size: 1.05rem;
  }

  .o_cp_right {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
    max-width: 100%;
  }

  .o_cp_right::-webkit-scrollbar {
    display: none;
  }

  .o_cp_right .btn-odoo {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: var(--o-touch-min);
  }

  .o_list_search_actions {
    flex-direction: column;
    align-items: stretch;
  }

  .o_list_search_actions .btn-odoo {
    width: 100%;
    min-height: var(--o-touch-min);
  }

  .o_tree_row,
  .o_tree_section_head {
    min-height: var(--o-touch-min);
  }

  .module-tiles {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .o_home {
    padding: 1.15rem 0.85rem 1.75rem;
  }

  .o_home_header {
    flex-direction: column;
    align-items: stretch;
  }

  .o_home_header--glass {
    padding: 1.05rem 1.1rem 1.1rem;
  }

  .o_home_header-text h1 {
    font-size: 1.4rem;
  }

  .o_home_header-sub {
    font-size: 0.8rem;
    white-space: normal;
  }

  .o_home_context {
    font-size: 0.72rem;
    white-space: normal;
    flex-wrap: wrap;
  }

  .o_home_header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .o_home_continue,
  .o_home_cmd_hint {
    justify-content: center;
    width: 100%;
    min-height: var(--o-touch-min, 2.5rem);
  }

  .o_home_cmd_hint-alt {
    display: none;
  }

  .o_home_count {
    align-self: flex-start;
  }

  .module-tile {
    min-height: 0;
  }

  .module-tile-hit {
    padding: 1.15rem 1.1rem 0.7rem;
  }

  .module-tile-icon-wrap {
    width: 48px;
    height: 48px;
  }

  .module-tile-svg {
    width: 24px;
    height: 24px;
  }

  .module-code {
    font-size: 0.62rem;
    padding: 0.26rem 0.5rem;
  }

  .module-name {
    font-size: 1rem;
    max-width: 100%;
  }

  .module-blurb {
    font-size: 0.78rem;
    max-width: 100%;
  }

  .module-tile-pins {
    padding: 0.5rem 0.95rem 0.9rem;
    gap: 0.4rem;
  }

  .module-tile-pin {
    font-size: 0.74rem;
    padding: 0.35rem 0.6rem;
    min-height: 2rem;
  }

  .table-wrap {
    margin: 0 -0.15rem;
    border-radius: 0.65rem;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }

  #lines-table {
    min-width: 640px;
  }

  .lov-modal,
  .confirm-modal,
  .print-modal {
    padding: 0;
    align-items: stretch;
  }

  .lov-dialog,
  .confirm-dialog {
    width: 100%;
    max-width: none;
    max-height: 100vh;
    border-radius: 0;
    min-height: 100vh;
  }

  .print-dialog {
    width: 100%;
    max-width: none;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  .lov-header,
  .print-header {
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .btn-odoo {
    min-height: var(--o-touch-min);
  }
}

@media (max-width: 480px) {
  .o_topbar-brand-text .o_topbar-title {
    display: none;
  }

  .o_topbar-company {
    display: none;
  }

  .o_cp_left .o_breadcrumb {
    font-size: 0.75rem;
  }

  .o_form_sheet_bg,
  .o_list_sheet {
    padding: 0.85rem 0.65rem 1rem;
  }

  .o_notebook_header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .module-tile {
    min-height: auto;
  }

  .acc-kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   Module dashboard + premium sidebar + page transitions
   ============================================================ */

@keyframes oViewEnter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes accBarGrow {
  from { width: 0; }
  to { width: var(--bar-pct, 100%); }
}

@keyframes accChartBarGrow {
  from {
    transform: scaleY(0);
    opacity: 0.35;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes accDonutIn {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.o_main.o_view--enter {
  animation: oViewEnter 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.o_main.o_view--exit {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Module dashboard workspace background ? match module tiles page */
.o_main-module-home,
.o_main:has(.o_module_dash) {
  position: relative;
  background: transparent;
  padding: 0;
  max-width: none;
  overflow-y: auto;
  overflow-x: hidden;
}

.o_module_dash {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 1.25rem clamp(1rem, 2.5vw, 2rem) 1.25rem;
}

.o_module_dash_inner {
  max-width: 1320px;
  margin: 0 auto;
}

.o_module_dash_anim {
  animation: oViewEnter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.04s + min(var(--dash-i, 0), 6) * 0.05s);
}

.o_module_dash_header--glass {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.35rem;
  margin-bottom: 1rem;
  border-radius: 1.125rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.o_module_dash_eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--o-accent);
  margin-bottom: 0.35rem;
}

.o_module_dash_header h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--o-brand);
}

.o_module_dash_sub {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--o-muted);
  max-width: 36rem;
}

.o_module_dash_header--glass .o_module_dash_sub {
  display: none;
}

.o_module_dash_meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.o_module_dash_chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--o-brand);
  background: rgba(var(--o-beige-rgb), 0.75);
  border: 1px solid rgba(var(--o-peach-rgb), 0.35);
}

.o_module_dash_chip--fy {
  background: rgba(37, 66, 76, 0.08);
  border-color: rgba(37, 66, 76, 0.12);
}

.acc-dashboard--premium {
  margin-top: 0;
  gap: 0.85rem;
}

.acc-dashboard--premium .acc-kpi-value {
  font-size: 1.35rem;
}

.acc-dashboard--premium .acc-kpi-sub {
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.acc-dashboard--premium .acc-donut-hole strong {
  font-size: 0.82rem;
}

.acc-dashboard--premium .acc-donut-hole span {
  font-size: 0.6rem;
}

.acc-dashboard--premium .acc-donut-legend li {
  font-size: 0.72rem;
}

.acc-dashboard--premium .acc-donut-legend-val strong {
  font-size: 0.74rem;
  font-weight: 700;
}

.acc-dashboard--premium .acc-sp-tile strong {
  font-size: 1.05rem;
}

.acc-dashboard--premium .acc-sp-label {
  font-size: 0.68rem;
}

.acc-dashboard--premium .acc-sp-tile .muted {
  font-size: 0.72rem;
  margin-top: 0.1rem;
}

.acc-kpi-card--glass,
.acc-chart-card--glass {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 1.125rem;
  box-shadow:
    0 8px 28px rgba(37, 66, 76, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.acc-chart-card--glass.acc-dash-tile {
  --home-hover-ease: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  --home-hover-duration: 0.22s;
  --home-hover-glow-duration: 0.25s;
}

/* Dashboard tiles ? same hover language as module picker */
.acc-dash-tile {
  --home-hover-ease: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  --home-hover-duration: 0.22s;
  --home-hover-glow-duration: 0.25s;
  --tile-accent-2: color-mix(in srgb, var(--tile-accent, var(--kpi-accent, var(--o-accent))) 65%, #fff);
  --tile-accent-glow: color-mix(in srgb, var(--tile-accent, var(--kpi-accent, var(--o-accent))) 22%, transparent);
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--home-hover-duration) var(--home-hover-ease),
    background var(--home-hover-duration) var(--home-hover-ease),
    box-shadow var(--home-hover-glow-duration) var(--home-hover-ease),
    transform var(--home-hover-duration) var(--home-hover-ease);
}

.acc-dash-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.1) 42%,
    transparent 68%
  );
  opacity: 0.85;
  pointer-events: none;
  transition: opacity var(--home-hover-duration) var(--home-hover-ease);
}

.acc-dash-tile::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(
    circle at 18% 12%,
    color-mix(in srgb, var(--tile-accent, var(--kpi-accent, var(--o-accent))) 16%, transparent) 0%,
    transparent 52%
  );
  opacity: 0;
  transform: scale(0.88);
  transition:
    opacity var(--home-hover-glow-duration) var(--home-hover-ease),
    transform var(--home-hover-glow-duration) var(--home-hover-ease);
  pointer-events: none;
  z-index: 0;
}

.acc-dash-tile-accent {
  position: absolute;
  top: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--tile-accent, var(--kpi-accent, var(--o-accent))) 30%,
    color-mix(in srgb, var(--tile-accent, var(--kpi-accent, var(--o-accent))) 70%, #fff) 70%,
    transparent
  );
  opacity: 0.55;
  transform: scaleX(0.28);
  transform-origin: left center;
  transition:
    transform 0.22s var(--home-hover-ease),
    opacity 0.22s var(--home-hover-ease);
  pointer-events: none;
  z-index: 1;
}

.acc-dash-tile-orb {
  position: absolute;
  right: -18%;
  bottom: -28%;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 40%,
    color-mix(in srgb, var(--tile-accent, var(--kpi-accent, var(--o-accent))) 28%, transparent) 0%,
    color-mix(in srgb, var(--tile-accent-2, var(--tile-accent, var(--o-accent))) 12%, transparent) 42%,
    transparent 72%
  );
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--home-hover-glow-duration) var(--home-hover-ease);
}

.acc-dash-tile .acc-kpi-icon,
.acc-dash-tile .acc-kpi-body,
.acc-dash-tile .acc-sp-label,
.acc-dash-tile strong,
.acc-dash-tile .muted {
  position: relative;
  z-index: 1;
  transition: transform var(--home-hover-duration) var(--home-hover-ease);
}

@media (hover: hover) and (pointer: fine) {
.acc-dash-tile:hover {
  border-color: color-mix(in srgb, var(--tile-accent, var(--kpi-accent, var(--o-accent))) 24%, rgba(255, 255, 255, 0.95));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--tile-accent, var(--kpi-accent, var(--o-accent))) 16%, transparent),
    0 14px 44px var(--tile-accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.acc-dash-tile:hover::after {
  opacity: 1;
}

.acc-dash-tile:hover::before {
  opacity: 0.72;
  transform: scale(1.05);
}

.acc-dash-tile:hover .acc-dash-tile-orb {
  opacity: 0.72;
}

.acc-dash-tile:hover .acc-dash-tile-accent {
  opacity: 1;
  transform: scaleX(1);
}

.acc-dash-tile:hover .acc-kpi-body,
.acc-dash-tile:hover .acc-sp-label,
.acc-dash-tile:hover strong,
.acc-dash-tile:hover .muted {
  transform: translate3d(4px, 0, 0);
}

.acc-dash-tile:hover .acc-kpi-icon {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--kpi-accent, var(--tile-accent)) 24%, transparent);
}
}

.acc-kpi-card--glass {
  min-height: 112px;
  border-color: rgba(var(--o-peach-rgb), 0.22);
}

.acc-sp-tile.acc-tip {
  cursor: help;
}

.acc-tip {
  cursor: help;
}

.acc-tooltip-float {
  position: fixed;
  z-index: 10050;
  max-width: min(300px, calc(100vw - 16px));
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  background: rgba(37, 66, 76, 0.97);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.acc-tooltip-float.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.acc-tooltip-float.is-below {
  transform: translateY(-4px);
}

.acc-tooltip-float.is-visible.is-below {
  transform: translateY(0);
}

.acc-sp-tile--glass {
  border-radius: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.acc-donut--anim.acc-tip:hover {
  transform: scale(1.03);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.acc-kpi-bar-fill--anim {
  width: 0;
  animation: accBarGrow 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.4s + var(--dash-i, 0) * 0.05s);
}

.acc-donut--anim {
  animation: accDonutIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

.info-grid--glass div {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  border-radius: 0.75rem;
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

.o_module_dash_fallback {
  margin-top: 0.5rem;
}

/* Premium sidebar */
.o_sidebar {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-right: 1px solid rgba(37, 66, 76, 0.08);
  box-shadow: none;
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1), transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  min-height: 0;
  max-height: 100%;
}

.o_sidebar_head {
  padding: 0.75rem 0.85rem 0.65rem;
  border-bottom: 1px solid rgba(37, 66, 76, 0.08);
  background: transparent;
}

.o_sidebar_head_top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.o_tree_folder > .o_tree_row:hover .o_tree_icon {
  color: var(--o-accent, var(--o-accent));
}

.o_sidebar_head h2 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--o-brand);
}

.o_sidebar--compact-head .o_sidebar_head {
  padding: 0.5rem 0.75rem;
}

.o_sidebar--compact-head .o_sidebar_search {
  margin-top: 0.35rem;
}

.o_sidebar--compact-head .o_sidebar_head h2 {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.o_sidebar_search {
  position: relative;
  margin: 0.4rem 0 0;
}

.o_sidebar_search_icon {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: #94a3b8;
  pointer-events: none;
  z-index: 1;
}

.o_sidebar_search:focus-within .o_sidebar_search_icon {
  color: var(--o-accent, var(--o-accent));
}

.o_sidebar_search_input {
  width: 100%;
  box-sizing: border-box;
  height: 1.85rem;
  padding: 0.25rem 0.55rem 0.25rem 1.9rem;
  border: 1px solid rgba(37, 66, 76, 0.14);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--o-brand, #25424c);
  font-size: 0.78rem;
  line-height: 1.2;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.o_sidebar_search_input::placeholder {
  color: #94a3b8;
}

.o_sidebar_search_input:focus {
  border-color: rgba(var(--o-accent-rgb), 0.55);
  box-shadow: 0 0 0 2px rgba(var(--o-accent-rgb), 0.12);
  background: #fff;
}

.o_menu_tree .o_tree_leaf.o_tree_filter_hit > .o_tree_link {
  background: rgba(var(--o-accent-rgb), 0.08);
}

.o_sidebar_collapse {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(37, 66, 76, 0.12);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.7);
  color: #94a3b8;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.o_sidebar_collapse:hover {
  color: var(--o-brand);
  border-color: rgba(37, 66, 76, 0.2);
  background: #fff;
}

.o_sidebar_dash {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.15rem 0.45rem 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--o-text);
  text-decoration: none;
  background: transparent;
  border: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.o_sidebar_dash:hover {
  text-decoration: none;
  color: var(--o-accent, var(--o-accent));
  background: rgba(var(--o-accent-rgb), 0.1);
}

.o_sidebar_dash.active {
  color: var(--o-accent, var(--o-accent));
  background: rgba(var(--o-accent-rgb), 0.12);
  box-shadow: none;
  border-left: 3px solid var(--o-accent, var(--o-accent));
  border-radius: 0.45rem;
  font-weight: 600;
  padding-left: calc(0.6rem - 1px);
}

.o_sidebar_dash_icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  flex-shrink: 0;
}

.o_sidebar_dash.active .o_sidebar_dash_icon,
.o_sidebar_dash:hover .o_sidebar_dash_icon {
  color: inherit;
}

.o_sidebar_expand-fab {
  display: none;
  place-items: center;
  position: fixed;
  top: calc(var(--o-topbar-height) + 0.75rem);
  left: 0.65rem;
  z-index: 1200;
  width: var(--o-topbar-icon-size);
  height: var(--o-topbar-icon-size);
  padding: 0;
  border: 1px solid rgba(var(--o-peach-rgb), 0.4);
  border-radius: var(--o-topbar-icon-radius);
  background: rgba(255, 255, 255, 0.92);
  color: var(--o-brand);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 6px 20px rgba(37, 66, 76, 0.12);
  transition: background 0.15s, transform 0.15s;
}

.o_sidebar_expand-fab:hover {
  background: rgba(var(--o-beige-rgb), 0.95);
  color: var(--o-accent);
}

.o_tree_section_head .o_tree_chevron,
.o_tree_folder > .o_tree_row .o_tree_chevron {
  margin-left: auto;
}

.o_sidebar_body {
  padding: 0.15rem 0 0.55rem;
}

.o_tree_sep {
  height: 1px;
  margin: 0.35rem 0.65rem;
  background: rgba(37, 66, 76, 0.08);
  list-style: none;
}

@media (min-width: 1025px) {
  body.o_sidebar-collapsed .o_sidebar_expand-fab {
    display: grid;
    pointer-events: auto;
  }

  body.o_sidebar-collapsed .o_sidebar {
    width: 0;
    min-width: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
    border-right-width: 0;
  }
}

@media (max-width: 1024px) {
  .o_sidebar_collapse,
  .o_sidebar_expand-fab {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .o_main.o_view--enter,
  .o_module_dash_anim,
  .acc-kpi-bar-fill--anim,
  .acc-bar--anim,
  .acc-donut--anim,
  .inv-insight__mark,
  .acc-overview.is-vibrant .stat-card__spark-line.is-draw,
  .fleet-overview.is-vibrant .stat-card__spark-line.is-draw {
    animation: none !important;
  }

  .acc-overview.is-vibrant .stat-card__spark-line.is-draw,
  .fleet-overview.is-vibrant .stat-card__spark-line.is-draw {
    stroke-dashoffset: 0 !important;
  }

  .acc-kpi-bar-fill--anim {
    width: var(--bar-pct, 100%);
  }

  .acc-bar--anim {
    transform: scaleY(1);
    opacity: 1;
  }

  .o_sidebar,
  .o_sidebar_backdrop {
    transition: none !important;
  }

  .klaro-loader-arc,
  .klaro-loader-ring--spin .klaro-loader-arc {
    animation: none !important;
  }
}

/* Shared loader + inline spinner */
.klaro-loader {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  font-family: var(--o-font);
  background: rgba(37, 66, 76, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.klaro-loader[hidden] {
  display: none !important;
}

.klaro-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  min-width: 260px;
  padding: 1.85rem 2.15rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 48px rgba(37, 66, 76, 0.22);
  text-align: center;
}

.klaro-loader-ring {
  position: relative;
  width: 136px;
  height: 136px;
}

.klaro-loader-svg {
  width: 136px;
  height: 136px;
  transform: rotate(-90deg);
}

.klaro-loader-track {
  fill: none;
  stroke: rgba(var(--o-peach-rgb), 0.22);
  stroke-width: 12;
}

.klaro-loader-progress {
  fill: none;
  stroke: var(--o-accent);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.08s linear;
}

.klaro-loader-arc {
  fill: none;
  stroke: var(--o-accent);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 90 274;
}

.klaro-loader-ring--spin .klaro-loader-svg {
  animation: klaroSpin 0.85s linear infinite;
}

.klaro-loader-pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--o-brand);
  letter-spacing: -0.02em;
}

.klaro-loader-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--o-text);
}

.klaro-loader-status {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--o-muted);
  min-height: 1.2em;
}

.klaro-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(37, 66, 76, 0.18);
  border-top-color: var(--o-accent);
  border-radius: 50%;
  animation: klaroSpin 0.65s linear infinite;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.has-klaro-spinner {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

@keyframes klaroSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Financial overview dashboard (Accounts module) */
body:has(.fin-overview) {
  background: var(--fin-bg-page);
}

.o_main:has(.fin-overview) {
  background: var(--fin-bg-page);
  padding: 20px 24px 32px;
  box-sizing: border-box;
}

.o_main:has(.fin-overview)::before,
.o_main:has(.fin-overview)::after {
  display: none;
}

.fin-overview {
  color: var(--fin-text-primary);
}

.fin-overview.o_module_dash {
  padding: 0;
}

.fin-dash-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.fin-dash-container > .fin-kpi-grid,
.fin-dash-container > .fin-sales-strip,
.fin-dash-container > #fin-charts-root,
.fin-dash-container > .fin-card,
.fin-dash-container > .inv-ops-grid,
.fin-dash-container > .inv-compare-grid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.fin-overview .o_module_dash_inner.fin-dash-container {
  max-width: 1440px;
}

.fin-overview .muted {
  color: var(--fin-text-muted);
}

.fin-sticky-bar {
  position: relative;
  z-index: 1;
  background: var(--fin-bg-card);
  border: var(--fin-border-width) solid var(--fin-border);
  margin: 0 0 var(--fin-space-4);
  padding: var(--fin-space-3) var(--fin-space-3);
  box-shadow: var(--fin-shadow-card);
  border-radius: var(--fin-radius-card);
}

.fin-sticky-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fin-space-3);
}

.fin-sticky-bar__title {
  flex: 1 1 220px;
  min-width: 0;
}

.fin-sticky-bar h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fin-text-primary);
}

.fin-sticky-bar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fin-space-2);
  margin-top: 6px;
}

.fin-sticky-bar__sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--fin-text-secondary);
}

.fin-sticky-bar__updated {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--fin-space-2);
  border-radius: var(--fin-radius-pill);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fin-text-muted);
  background: var(--fin-bg-subtle);
  border: var(--fin-border-width) solid var(--fin-border);
}

.fin-sticky-bar__filters {
  flex: 1 1 420px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--fin-space-1);
  max-width: 100%;
}

.filter-pill--search {
  flex: 1 1 200px;
  max-width: 280px;
  min-width: 180px;
}

/* FilterPill component */
.filter-pill {
  position: relative;
}

.filter-pill__btn,
.filter-pill__search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 var(--fin-space-2);
  border-radius: var(--fin-radius-control);
  border: var(--fin-border-width) solid var(--fin-border);
  background: var(--fin-bg-card);
  color: var(--fin-text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: var(--fin-shadow-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-pill__btn {
  cursor: pointer;
  font-family: inherit;
}

.filter-pill__btn:hover,
.filter-pill__search:focus-within {
  border-color: #d5dbe5;
}

.filter-pill.is-open .filter-pill__btn {
  border-color: var(--fin-accent);
  box-shadow: 0 0 0 3px var(--fin-accent-soft);
}

.filter-pill__icon {
  display: grid;
  place-items: center;
  color: var(--fin-text-muted);
  flex-shrink: 0;
}

.filter-pill__value {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fin-text-primary);
}

.filter-pill__chevron {
  display: grid;
  place-items: center;
  color: var(--fin-text-muted);
  margin-left: 2px;
}

.filter-pill__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 220px;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border-radius: var(--fin-radius-control);
  border: var(--fin-border-width) solid var(--fin-border);
  background: var(--fin-bg-card);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

.filter-pill__option {
  display: block;
  width: 100%;
  padding: 8px var(--fin-space-2);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fin-text-secondary);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.filter-pill__option:hover,
.filter-pill__option.is-selected {
  background: var(--fin-bg-subtle);
  color: var(--fin-text-primary);
}

.filter-pill__option--action {
  font-weight: 600;
  color: var(--fin-accent);
}

.filter-pill__check {
  display: flex;
  align-items: center;
  gap: var(--fin-space-2);
  padding: 8px var(--fin-space-2);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--fin-text-secondary);
  cursor: pointer;
}

.filter-pill__check:hover {
  background: var(--fin-bg-subtle);
}

.filter-pill__search {
  width: 100%;
  padding-right: var(--fin-space-2);
}

.filter-pill__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--fin-text-primary);
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
}

.filter-pill__input::placeholder {
  color: var(--fin-text-muted);
}

.fin-txn-empty td {
  padding: var(--fin-space-4) var(--fin-space-2);
  border-bottom: none;
}

.fin-txn-empty__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--fin-space-2) 0;
}

.fin-txn-empty__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fin-text-secondary);
}

.fin-txn-empty__hint {
  font-size: 0.78rem;
  color: var(--fin-text-muted);
}

.fin-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px var(--fin-space-2);
  border-radius: var(--fin-radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--fin-bg-card);
  border: var(--fin-border-width) solid var(--fin-border);
  color: var(--fin-text-secondary);
  box-shadow: var(--fin-shadow-card);
}

.fin-chip--muted {
  color: var(--fin-text-muted);
  font-weight: 500;
  background: var(--fin-bg-subtle);
}

.fin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--fin-space-3);
  margin-bottom: var(--fin-space-3);
}

/* StatCard component */
.stat-card {
  display: flex;
  flex-direction: column;
  gap: var(--fin-space-2);
  background: var(--fin-bg-card);
  border: var(--fin-border-width) solid var(--fin-border);
  border-radius: var(--fin-radius-card);
  box-shadow: var(--fin-shadow-card);
  padding: var(--fin-space-3);
  min-height: 100%;
}

.stat-card__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fin-text-muted);
}

.stat-card__value {
  display: flex;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 1px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--fin-text-primary);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.stat-card__prefix {
  font-size: 0.72em;
  font-weight: 600;
  color: var(--fin-text-secondary);
  margin-right: 1px;
  align-self: flex-end;
  padding-bottom: 0.12em;
}

.stat-card__amount {
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.03em;
}

.stat-card__suffix {
  font-size: 0.46em;
  font-weight: 700;
  color: var(--fin-text-secondary);
  line-height: 1;
  margin-left: 2px;
  align-self: flex-start;
  margin-top: 0.35em;
}

.stat-card__delta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  align-self: flex-start;
  margin-top: 2px;
  padding: 4px 8px;
  border-radius: var(--fin-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-card__delta-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.stat-card__delta-text {
  font-variant-numeric: tabular-nums;
}

.stat-card__delta-caption {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.85;
}

.stat-card__delta--success {
  color: var(--fin-success);
  background: var(--fin-success-soft);
}

.stat-card__delta--danger {
  color: var(--fin-danger);
  background: var(--fin-danger-soft);
}

.stat-card__delta--warning {
  color: var(--fin-warning);
  background: var(--fin-warning-soft);
}

.stat-card__delta--neutral {
  color: var(--fin-text-secondary);
  background: var(--fin-bg-subtle);
  border: var(--fin-border-width) solid var(--fin-border);
}

.fin-card,
.fin-sales-strip {
  background: var(--fin-bg-card);
  border: var(--fin-border-width) solid var(--fin-border);
  border-radius: var(--fin-radius-card);
  box-shadow: var(--fin-shadow-card);
}

.fin-kpi-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fin-text-secondary);
  margin-bottom: 6px;
}

.fin-kpi-delta {
  display: inline-flex;
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px var(--fin-space-1);
  border-radius: var(--fin-radius-pill);
}

.fin-kpi-delta--up {
  color: var(--fin-success);
  background: var(--fin-success-soft);
}

.fin-kpi-delta--down {
  color: var(--fin-danger);
  background: var(--fin-danger-soft);
}

.fin-sales-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fin-space-3);
  flex-wrap: wrap;
  padding: var(--fin-space-2) var(--fin-space-3);
  margin-bottom: var(--fin-space-3);
}

.fin-sales-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fin-accent);
  margin-top: 4px;
}

.fin-sales-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fin-space-2);
  align-items: center;
  font-size: 0.82rem;
  color: var(--fin-text-secondary);
}

.fin-charts-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--fin-space-3);
  margin-bottom: var(--fin-space-3);
}

.fin-card {
  padding: var(--fin-space-3);
}

.fin-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fin-space-2);
  margin-bottom: var(--fin-space-3);
}

.fin-card-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fin-text-primary);
}

.fin-card-head .small {
  font-size: 0.78rem;
  color: var(--fin-text-muted);
}

.fin-line-chart {
  position: relative;
}

.fin-line-chart-svg {
  width: 100%;
  height: auto;
  min-height: 200px;
  display: block;
  overflow: visible;
}

.fin-chart-grid {
  stroke: var(--fin-chart-grid);
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.fin-chart-y-label {
  font-size: 10px;
  fill: var(--fin-text-muted);
  font-family: var(--o-font);
  text-anchor: end;
}

.fin-area {
  stroke: none;
}

.fin-area--rev {
  fill: url(#fin-rev-area-grad);
}

.fin-area--exp {
  fill: url(#fin-exp-area-grad);
}

.fin-line {
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.fin-line--rev {
  stroke: var(--fin-chart-revenue);
}

.fin-line--exp {
  stroke: var(--fin-chart-expense);
}

.fin-line-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
  padding: 0 4px 0 2.75rem;
  font-size: 0.68rem;
  color: var(--fin-text-muted);
  text-align: center;
}

.fin-line-legend {
  display: flex;
  gap: var(--fin-space-4);
  margin-top: var(--fin-space-2);
  padding-left: 2.75rem;
  font-size: 0.78rem;
  color: var(--fin-text-secondary);
}

.fin-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.fin-dot--rev {
  background: var(--fin-chart-revenue);
}

.fin-dot--exp {
  background: var(--fin-chart-expense);
}

.fin-charts-row .fin-card {
  display: flex;
  flex-direction: column;
}

.fin-charts-row .fin-line-chart,
.fin-charts-row .fin-donut-chart {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 248px;
}

.fin-donut-chart {
  position: relative;
}

.fin-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 6px 0 var(--fin-space-1);
}

.fin-donut {
  position: relative;
  width: min(168px, 42vw);
  height: min(168px, 42vw);
  flex-shrink: 0;
}

.fin-donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.fin-donut-track {
  fill: none;
  stroke: var(--fin-chart-track);
  stroke-width: 14;
}

.fin-donut-seg {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
}

.fin-donut-hole {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.fin-donut-hole strong {
  font-size: clamp(0.72rem, 2.2vw, 0.95rem);
  color: var(--fin-text-primary);
  line-height: 1.2;
  max-width: 88%;
  word-break: break-word;
}

.fin-donut-hole span {
  font-size: 0.68rem;
  color: var(--fin-text-muted);
  margin-top: 4px;
}

.fin-donut-legend {
  list-style: none;
  margin: var(--fin-space-2) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px var(--fin-space-4);
}

.fin-donut-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--fin-text-secondary);
}

.fin-donut-legend .fin-dot {
  margin-right: 0;
}

.fin-donut-legend strong {
  margin-left: 4px;
  color: var(--fin-text-primary);
  font-weight: 600;
}

.fin-qbar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: var(--fin-space-2);
  min-height: 160px;
  padding-top: var(--fin-space-1);
}

.fin-qbar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--fin-space-1);
  flex: 1;
  font-size: 0.75rem;
  color: var(--fin-text-secondary);
}

.fin-qbar-stack {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 130px;
}

.fin-qbar {
  width: 18px;
  height: var(--bar-h, 0%);
  min-height: 2px;
  border-radius: var(--fin-radius-control) var(--fin-radius-control) 0 0;
  transition: height 0.6s ease;
}

.fin-qbar--rev {
  background: var(--fin-chart-revenue);
}

.fin-qbar--exp {
  background: rgba(22, 163, 74, 0.55);
}

.fin-progress-list {
  display: flex;
  flex-direction: column;
  gap: var(--fin-space-3);
}

.fin-progress-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--fin-text-secondary);
}

.fin-progress-head strong {
  color: var(--fin-text-primary);
}

.fin-progress-track {
  height: 8px;
  background: var(--fin-chart-track);
  border-radius: var(--fin-radius-pill);
  overflow: hidden;
}

.fin-progress-fill {
  height: 100%;
  width: var(--pct, 0%);
  border-radius: var(--fin-radius-pill);
  transition: width 0.7s ease;
}

.fin-progress-fill--green {
  background: var(--fin-success);
}

.fin-progress-fill--blue {
  background: var(--fin-accent);
}

.fin-progress-fill--orange {
  background: var(--fin-warning);
}

/* Recharts financial dashboard */
#fin-charts-root {
  display: block;
  width: 100%;
  min-height: 0;
}

#fin-charts-root.fin-charts-root--mounted {
  min-height: 0;
}

#fin-charts-root:not(.fin-charts-root--mounted):empty::before {
  content: "Loading charts?";
  display: block;
  padding: var(--fin-space-4);
  text-align: center;
  color: var(--fin-text-muted);
  font-size: 0.84rem;
}

#fin-charts-root .fin-charts-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--fin-space-3);
  margin-bottom: var(--fin-space-3);
}

.chart-card {
  display: flex;
  flex-direction: column;
}

.chart-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fin-chart-box {
  height: 300px;
  width: 100%;
  min-height: 300px;
  flex-shrink: 0;
}

.fin-recharts {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.fin-recharts .recharts-wrapper {
  font-family: var(--o-font);
}

.fin-recharts .recharts-surface {
  overflow: visible;
}

.fin-recharts--donut .fin-donut-wrap {
  position: relative;
  width: 100%;
}

.fin-donut-hole--overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}

.fin-donut-hole--overlay strong {
  font-size: clamp(0.72rem, 2.2vw, 0.95rem);
  color: var(--fin-text-primary);
  line-height: 1.2;
  max-width: 88%;
  word-break: break-word;
}

.fin-donut-hole--overlay span {
  font-size: 0.68rem;
  color: var(--fin-text-muted);
  margin-top: 4px;
}

.fin-chart-tooltip {
  background: var(--fin-text-primary);
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.18);
  font-size: 0.78rem;
  min-width: 148px;
}

.fin-chart-tooltip__title {
  font-weight: 600;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.92);
}

.fin-chart-tooltip__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.fin-chart-tooltip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fin-chart-tooltip__label {
  flex: 1;
  color: rgba(255, 255, 255, 0.78);
}

.fin-chart-tooltip__value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #fff;
}

.fin-recharts--area .fin-line-legend,
.fin-recharts--bar .fin-line-legend {
  padding-left: 0;
  margin-top: var(--fin-space-1);
}

.fin-charts-error {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--fin-space-3);
  border-radius: var(--fin-radius-control);
  background: var(--fin-danger-soft);
  color: var(--fin-danger);
  font-size: 0.84rem;
}

.fin-card--table {
  margin-bottom: var(--fin-space-1);
  padding: var(--fin-space-3);
}

.fin-table--txns {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  background: transparent;
  table-layout: auto;
}

.fin-table--txns thead th {
  text-align: left;
  padding: 0 var(--fin-space-1) var(--fin-space-2);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fin-text-muted);
  background: transparent;
  border-bottom: var(--fin-border-width) solid var(--fin-border);
  white-space: nowrap;
}

.fin-table--txns .fin-table-col--amt {
  text-align: right;
}

.fin-table--txns tbody td {
  padding: var(--fin-space-2) var(--fin-space-1);
  border-bottom: var(--fin-border-width) solid var(--fin-border);
  color: var(--fin-text-secondary);
  vertical-align: middle;
  line-height: 1.45;
}

.fin-table--txns tbody tr[data-fin-txn] {
  transition: background-color 0.12s ease;
}

.fin-table--txns tbody tr[data-fin-txn]:hover td {
  background: var(--fin-bg-subtle);
}

.fin-table--txns tbody tr:last-child td {
  border-bottom: none;
}

.fin-table-col--date {
  width: 5.5rem;
}

.fin-table-col--cat {
  width: 8.5rem;
}

.fin-table-col--amt {
  width: 6.5rem;
}

.fin-table-col--desc {
  width: auto;
  min-width: 12rem;
}

.fin-table-wrap--borderless {
  overflow-x: auto;
  border: none;
  border-radius: 0;
  width: 100%;
}

.fin-table-date {
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--fin-text-secondary);
  white-space: nowrap;
}

.fin-table-desc {
  color: var(--fin-text-primary);
  font-weight: 500;
  padding-right: var(--fin-space-2);
  word-break: break-word;
}

.fin-table-amt {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fin-table--txns .fin-table-amt.fin-amt--in {
  color: var(--fin-success);
}

.fin-table--txns .fin-table-amt.fin-amt--out {
  color: var(--fin-danger);
}

.fin-amt--in {
  color: var(--fin-success);
}

.fin-amt--out {
  color: var(--fin-danger);
}

.fin-cat {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--fin-radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.fin-cat--journal {
  background: var(--fin-cat-journal-bg);
  color: var(--fin-cat-journal-text);
}

.fin-cat--sales {
  background: var(--fin-cat-sales-bg);
  color: var(--fin-cat-sales-text);
}

.fin-cat--cash-receipt,
.fin-cat--bank-receipt {
  background: var(--fin-cat-receipt-bg);
  color: var(--fin-cat-receipt-text);
}

.fin-cat--bank-payment,
.fin-cat--bank-payable {
  background: var(--fin-cat-bank-bg);
  color: var(--fin-cat-bank-text);
}

.fin-cat--cash-payment {
  background: var(--fin-cat-cash-bg);
  color: var(--fin-cat-cash-text);
}

.fin-cat--purchase {
  background: var(--fin-cat-purchase-bg);
  color: var(--fin-cat-purchase-text);
}

.fin-cat--quot {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

.fin-cat--sale {
  background: var(--fin-cat-sales-bg);
  color: var(--fin-cat-sales-text);
}

.fin-cat--neutral {
  background: var(--fin-cat-neutral-bg);
  color: var(--fin-cat-neutral-text);
}

/* Legacy table styles (non-accounts dashboards) */
.fin-table-wrap {
  overflow-x: auto;
  border-radius: var(--fin-radius-control);
  border: var(--fin-border-width) solid var(--fin-border);
}

.fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  background: var(--fin-bg-card);
}

.fin-table th {
  text-align: left;
  padding: var(--fin-space-2) var(--fin-space-2);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fin-text-muted);
  background: var(--fin-bg-subtle);
  border-bottom: var(--fin-border-width) solid var(--fin-border);
}

.fin-table td {
  padding: var(--fin-space-2);
  border-bottom: var(--fin-border-width) solid var(--fin-border);
  color: var(--fin-text-secondary);
}

.fin-table tbody tr:last-child td {
  border-bottom: none;
}

.fin-tag {
  display: inline-block;
  padding: 2px var(--fin-space-1);
  border-radius: var(--fin-radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--fin-bg-subtle);
  border: var(--fin-border-width) solid var(--fin-border);
  color: var(--fin-text-secondary);
}

@media (max-width: 1100px) {
  .o_main:has(.fin-overview) {
    padding: 16px 16px 24px;
  }

  .fin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fin-charts-row {
    grid-template-columns: 1fr;
  }

  .fin-sticky-bar__filters {
    flex-basis: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .fin-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ?? Inventory module home dashboard ?? */

.inv-overview .fin-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inv-ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--fin-space-3);
  margin: 0 0 var(--fin-space-4);
}

.inv-ops-tile {
  background: var(--fin-bg-card);
  border: var(--fin-border-width) solid var(--fin-border);
  border-radius: var(--fin-radius-card);
  box-shadow: var(--fin-shadow-card);
  padding: var(--fin-space-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.inv-ops-tile__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inv-ops-tile__value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fin-text-primary);
  line-height: 1.2;
}

.inv-ops-tile__meta {
  font-size: 0.78rem;
  color: var(--fin-text-secondary);
}

.inv-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fin-space-3);
  margin: 0 0 var(--fin-space-4);
}

.inv-compare-table .inv-count {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fin-text-muted);
}

.inv-compare-table .inv-count::before {
  content: "\00D7\0020";
}

.inv-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 0 var(--fin-space-3) var(--fin-space-2);
}

.inv-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--fin-text-secondary);
}

.inv-legend::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: currentColor;
}

.inv-legend--purchases { color: #dc2626; }
.inv-legend--quot-g { color: #4f46e5; }
.inv-legend--quot-s { color: #7c3aed; }
.inv-legend--sale-g { color: #16a34a; }
.inv-legend--sale-s { color: #0d9488; }

.inv-trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 180px;
  padding: var(--fin-space-2) var(--fin-space-3) var(--fin-space-3);
  overflow-x: auto;
}

.inv-trend-col {
  flex: 1 1 0;
  min-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.inv-trend-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 140px;
}

.inv-bar {
  display: block;
  width: 6px;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: currentColor;
}

.inv-bar--purchases { color: #dc2626; background: #dc2626; }
.inv-bar--quot-g { color: #4f46e5; background: #4f46e5; }
.inv-bar--quot-s { color: #7c3aed; background: #7c3aed; }
.inv-bar--sale-g { color: #16a34a; background: #16a34a; }
.inv-bar--sale-s { color: #0d9488; background: #0d9488; }

.inv-trend-label {
  font-size: 0.7rem;
  color: var(--fin-text-muted);
}

@media (max-width: 1100px) {
  .inv-overview .fin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inv-ops-grid,
  .inv-compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .inv-overview .fin-kpi-grid,
  .inv-ops-grid,
  .inv-compare-grid {
    grid-template-columns: 1fr;
  }
}

/* Application Rights admin ? RIGHTS.FMB */

/* Glass dropdowns (shared with login ? app context) */
.klaro-select {
  position: relative;
  width: 100%;
}

.o_field .klaro-select,
.rights-scope-field .klaro-select {
  margin-top: 0;
}

.klaro-select.is-open {
  z-index: 40;
}

.klaro-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.klaro-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.58rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(var(--o-peach-rgb), 0.38);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(var(--o-paper-rgb), 0.88) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--o-text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 2px 8px rgba(37, 66, 76, 0.05);
}

.klaro-select-trigger:hover:not(:disabled) {
  border-color: rgba(var(--o-peach-rgb), 0.55);
  background: linear-gradient(180deg, #fff 0%, rgba(var(--o-paper-rgb), 0.95) 100%);
}

.klaro-select-trigger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.klaro-select.is-open .klaro-select-trigger,
.klaro-select-trigger:focus-visible {
  outline: none;
  border-color: rgba(var(--o-accent-rgb), 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 3px rgba(var(--o-accent-rgb), 0.16);
}

.klaro-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.klaro-select-value.is-placeholder {
  color: var(--o-muted);
  font-weight: 400;
}

.klaro-select-chevron {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: rgba(37, 66, 76, 0.06);
  color: var(--o-brand);
  flex-shrink: 0;
  transition: transform 0.22s ease, background 0.2s, color 0.2s;
}

.klaro-select.is-open .klaro-select-chevron {
  transform: rotate(180deg);
  background: rgba(var(--o-accent-rgb), 0.12);
  color: var(--o-accent);
}

.klaro-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  border-radius: 0.85rem;
  border: 1px solid rgba(var(--o-peach-rgb), 0.28);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 16px 40px rgba(37, 66, 76, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  max-height: 240px;
  overflow: auto;
  overscroll-behavior: contain;
  animation: klaroSelectIn 0.18s ease;
}

.klaro-select-search {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: -0.1rem -0.1rem 0.35rem;
  padding: 0.2rem;
  background: rgba(255, 255, 255, 0.98);
}

.klaro-select-search-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(var(--o-peach-rgb), 0.38);
  border-radius: 0.55rem;
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.84rem;
  background: #fff;
  color: var(--o-text);
}

.klaro-select-search-input:focus {
  outline: none;
  border-color: rgba(var(--o-accent-rgb), 0.7);
  box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.14);
}

.klaro-select-option.is-filtered-out {
  display: none !important;
}

.klaro-select-empty {
  list-style: none;
  padding: 0.65rem 0.75rem;
  color: var(--o-gray-600, #6b7280);
  font-size: 0.84rem;
}

/* LOV typeahead: reuse existing modal as a field-anchored dropdown */
.lov-modal.is-typeahead {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

.lov-modal.is-typeahead .lov-dialog,
.lov-modal.is-typeahead .ledger-lov-dialog {
  pointer-events: auto;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.lov-modal.is-typeahead .lov-header h3 {
  font-size: 0.9rem;
}

.lov-modal.is-typeahead .lov-table-wrap {
  flex: 1 1 auto;
  max-height: none;
  overflow: auto;
}

.lov-modal.is-typeahead .lov-header-actions #lov-new-btn,
.lov-modal.is-typeahead .lov-header-actions [id$="-lov-new-btn"] {
  display: none;
}

.klaro-select-menu.is-portaled {
  position: fixed;
  right: auto;
  top: auto;
  animation: klaroSelectInFixed 0.18s ease;
}

.klaro-select-menu[hidden] {
  display: none !important;
}

.klaro-select-menu:not([hidden]) {
  display: block;
}

@keyframes klaroSelectIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes klaroSelectInFixed {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.klaro-select-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.58rem 0.7rem;
  border-radius: 0.55rem;
  font-size: 0.86rem;
  color: var(--o-text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
}

.klaro-select-option::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
}

.klaro-select-option:hover,
.klaro-select-option.is-highlighted {
  background: rgba(var(--o-peach-rgb), 0.16);
  padding-left: 0.85rem;
}

.klaro-select-option.is-selected {
  background: linear-gradient(90deg, rgba(var(--o-accent-rgb), 0.14) 0%, rgba(var(--o-peach-rgb), 0.1) 100%);
  color: var(--o-brand);
  font-weight: 600;
}

.klaro-select-option.is-selected::before {
  background: var(--o-accent);
}

.rights-sheet {
  padding: 0;
}

.rights-split {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 11rem);
}

.rights-app .o_form_view {
  max-width: none;
  width: 100%;
}

.rights-user-pane {
  border-right: 1px solid rgba(37, 66, 76, 0.1);
  padding: 0.85rem 0.75rem 1rem;
  background: rgba(248, 250, 252, 0.65);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
}

.rights-pane-head {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--o-muted);
}

.rights-search-wrap {
  position: relative;
}

.rights-search-wrap .o_list_search-field-icon {
  left: 0.75rem;
}

.rights-search {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem 0.5rem 2.65rem;
  border: 1px solid rgba(var(--o-peach-rgb), 0.35);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.875rem;
}

.rights-search:focus {
  outline: none;
  border-color: var(--o-accent);
  box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.15);
}

.rights-user-list-wrap {
  flex: 1 1 auto;
  min-height: 12rem;
  max-height: calc(100vh - 18rem);
  overflow: auto;
}

#user-list tr {
  cursor: pointer;
}

#user-list tr.selected td {
  background: rgba(var(--o-accent-rgb), 0.12);
}

.rights-editor-pane {
  padding: 0.85rem 1.15rem 1.35rem;
  min-width: 0;
  overflow: auto;
}

.rights-notebook .o_notebook_header {
  border-bottom: none;
  margin-bottom: 0.85rem;
  padding: 0;
}

.rights-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
}

.rights-notebook .o_tab_btn {
  margin-bottom: 0;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  padding: 0.52rem 0.95rem;
  color: var(--o-muted);
  font-weight: 500;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.rights-notebook .o_tab_btn:hover {
  color: var(--o-brand);
  background: rgba(var(--o-beige-rgb), 0.55);
}

.rights-notebook .o_tab_btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--o-accent) 0%, var(--o-peach) 100%);
  border-color: rgba(var(--o-accent-rgb), 0.35);
  box-shadow: 0 4px 14px rgba(var(--o-accent-rgb), 0.22);
  border-bottom: 1px solid transparent;
}

.rights-notebook .o_tab_btn:focus-visible {
  outline: 2px solid var(--o-accent);
  outline-offset: 2px;
}

.rights-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.rights-pane-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--o-brand);
}

.rights-statusbar {
  margin: 0;
  margin-left: auto;
}

.rights-notebook .o_notebook_content {
  padding-top: 0.5rem;
}

.rights-tab-panel[hidden] {
  display: none !important;
}

.rights-section-title {
  margin: 0 0 0.85rem;
  padding-bottom: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--o-muted);
  border-bottom: 1px solid rgba(var(--o-peach-rgb), 0.2);
}

.rights-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.rights-section-head .rights-section-title {
  margin: 0;
  padding: 0;
  border: none;
  flex: 1 1 auto;
  min-width: 12rem;
}

.rights-section-head--scope {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(var(--o-paper-rgb), 0.75);
  border: 1px solid rgba(var(--o-peach-rgb), 0.2);
}

.rights-section-head--actions-only {
  justify-content: flex-end;
  padding: 0;
  margin-bottom: 0.75rem;
}

.rights-scope-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1.25rem;
  flex: 1 1 16rem;
  min-width: 0;
}

.rights-scope-inline .rights-scope-field {
  flex: 1 1 12rem;
  min-width: min(100%, 12rem);
  max-width: 20rem;
}

.rights-section-head .btn-odoo {
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  min-height: 2.15rem;
}

.rights-table-wrap {
  border: 1px solid rgba(var(--o-peach-rgb), 0.32);
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
}

.rights-table-wrap .rights-grid {
  margin: 0;
  border: none;
}

.rights-table-wrap .rights-grid thead th {
  background: rgba(var(--o-paper-rgb), 0.95);
  border-bottom: 1px solid rgba(var(--o-peach-rgb), 0.28);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--o-muted);
}

.rights-table-wrap .rights-grid tbody td {
  border-bottom: 1px solid rgba(var(--o-peach-rgb), 0.14);
}

.rights-table-wrap .rights-grid tbody tr:last-child td {
  border-bottom: none;
}

.rights-col-actions {
  width: 8.5rem;
  text-align: right;
  white-space: nowrap;
}

.rights-grid th.rights-col-actions {
  text-align: right;
}

.rights-btn-remove {
  margin-left: auto;
}

.rights-grid td.rights-col-menu {
  min-width: 10rem;
  max-width: 14rem;
}

.rights-editor-head .rights-statusbar {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  justify-content: flex-end;
}

.rights-user-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: none;
  border: 1px solid rgba(var(--o-peach-rgb), 0.38);
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.rights-user-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  border-bottom: 1px solid rgba(var(--o-peach-rgb), 0.28);
}

.rights-user-row:last-child {
  border-bottom: none;
}

.rights-user-fields .o_field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: stretch;
  margin: 0;
  min-width: 0;
  grid-template-columns: unset;
  padding: 0.8rem 1rem;
  border-right: 1px solid rgba(var(--o-peach-rgb), 0.28);
  background: rgba(var(--o-paper-rgb), 0.45);
}

.rights-user-row .o_field:last-child {
  border-right: none;
}

.rights-user-row:nth-child(even) .o_field {
  background: rgba(255, 255, 255, 0.62);
}

.rights-user-fields .o_field label {
  margin: 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(var(--o-peach-rgb), 0.16);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--o-muted);
}

.rights-user-fields .o_field input,
.rights-user-fields .o_field select:not(.klaro-select-native),
.rights-user-fields .o_field .klaro-select {
  width: 100%;
  min-height: 2.5rem;
  box-sizing: border-box;
}

.rights-user-fields .o_field .klaro-select-trigger {
  min-height: 2.5rem;
  background: #fff;
}

.rights-grid-toolbar {
  margin-bottom: 0.55rem;
}

.rights-scope-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
  margin-bottom: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: rgba(var(--o-paper-rgb), 0.75);
  border: 1px solid rgba(var(--o-peach-rgb), 0.18);
}

.rights-scope-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.rights-scope-field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--o-muted);
}

.rights-scope-bar .o_field {
  min-width: 0;
}

.rights-grid th,
.rights-grid td {
  vertical-align: middle;
}

.rights-grid input[type="text"],
.rights-grid input[type="number"],
.rights-grid select {
  width: 100%;
  min-width: 4rem;
  box-sizing: border-box;
}

.rights-grid .klaro-select {
  min-width: 6rem;
}

.rights-grid input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.rights-menu-input {
  width: 100%;
  box-sizing: border-box;
}

.rights-lov-field {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
}

.rights-lov-field input {
  flex: 1;
  min-width: 0;
}

.rights-lov-field .btn-lov {
  flex-shrink: 0;
  min-width: 2.5rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

@media (max-width: 960px) {
  .rights-split {
    grid-template-columns: 1fr;
  }

  .rights-user-pane {
    border-right: none;
    border-bottom: 1px solid rgba(37, 66, 76, 0.1);
    max-height: 16rem;
  }

  .rights-user-list-wrap {
    max-height: 10rem;
  }

  .rights-user-row {
    grid-template-columns: 1fr;
  }

  .rights-user-row .o_field {
    border-right: none;
    border-bottom: 1px solid rgba(var(--o-peach-rgb), 0.22);
  }

  .rights-user-row .o_field:last-child {
    border-bottom: none;
  }

  .rights-user-row:last-child .o_field:last-child {
    border-bottom: none;
  }
}

.dept-list-pane {
  margin-top: 0.5rem;
}

#dept-table col.open-col-code {
  width: 8rem;
}

/* ===== ITEM Coding ? CP field style; attachment field order/sizes ===== */
.item-coding-sheet {
  max-width: 46rem;
}
.item-coding-sheet .item-coding-fields {
  grid-template-columns: 1fr 1fr;
  max-width: 42rem;
}
.item-coding-sheet .o_field {
  align-items: start;
}
.item-coding-sheet .o_field > label {
  padding-top: 0.35rem;
}
.item-coding-sheet .o_field select:not(.klaro-select-native),
.item-coding-sheet .o_field input,
.item-coding-sheet .o_field textarea,
.item-coding-sheet .item-coding-lov-inputs input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 0.55rem;
  border: 1px solid rgba(var(--o-peach-rgb), 0.38);
  padding: 0.45rem 0.65rem;
  background: #fff;
  color: var(--o-text);
  font: inherit;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}
.item-coding-sheet .o_field select:not(.klaro-select-native) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236c757d' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  padding-right: 1.8rem;
}
.item-coding-sheet .o_field input:focus,
.item-coding-sheet .o_field textarea:focus,
.item-coding-sheet .o_field select:focus,
.item-coding-sheet .item-coding-lov-inputs input:focus {
  outline: none;
  border-color: var(--o-accent);
  box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.18);
}
.item-coding-sheet .o_field input[readonly],
.item-coding-sheet .item-coding-lov-inputs input[readonly] {
  background: #f8f9fa;
  color: var(--o-muted);
}
.item-coding-sheet .item-coding-area textarea {
  min-height: 5.25rem;
  resize: vertical;
  line-height: 1.35;
}
.item-coding-lov-wrap {
  position: relative;
  width: 100%;
}
.item-coding-lov-wrap .item-suggest-panel {
  left: 0;
  right: auto;
  min-width: min(100%, 22rem);
  width: max(100%, 18rem);
  z-index: 130;
}
.item-coding-lov-inputs {
  display: grid;
  grid-template-columns: minmax(7.5rem, 9rem) minmax(0, 1fr);
  gap: 0.35rem;
  width: 100%;
  align-items: center;
}
.item-coding-lov-inputs .code-input-wrap {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  min-width: 0;
}
.item-coding-lov-inputs .code-input-wrap input {
  flex: 1;
  min-width: 0;
}
.item-coding-sheet .item-coding-lov-inputs .lov-btn {
  flex-shrink: 0;
  border-radius: 0.55rem;
  border: 1px solid rgba(var(--o-peach-rgb), 0.38);
  padding: 0.35rem 0.45rem;
  background: #fff;
}
.item-coding-racks {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--o-border);
}
.item-coding-racks summary {
  cursor: pointer;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}
.item-coding-racks .data-table input,
.item-coding-racks .data-table select {
  border-radius: 0.55rem;
  border: 1px solid rgba(var(--o-peach-rgb), 0.38);
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.875rem;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
}
.item-coding-racks .data-table select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236c757d' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  padding-right: 1.8rem;
}
@media (max-width: 720px) {
  .item-coding-sheet .item-coding-fields {
    grid-template-columns: 1fr;
  }
}

/* QUOT master ? 3-col row layout */
.quot-master {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.75rem;
}
.quot-master .o_field.span-2 {
  grid-column: span 2;
}
.quot-master .o_field.span-3 {
  grid-column: 1 / -1;
}
.quot-master .quot-row-spacer {
  visibility: hidden;
  min-height: 0;
  pointer-events: none;
}
.quot-master .quot-check-field input[type="checkbox"] {
  width: auto;
  margin: 0;
  justify-self: start;
}
.quot-master .inv-code-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}
.quot-master .quot-code-w10 {
  flex: 0 0 auto;
  width: calc(10ch + 2rem);
  max-width: calc(10ch + 2rem);
}
.quot-master .quot-code-w10 input {
  width: 10ch;
  max-width: 10ch;
  flex: 0 0 10ch;
}
.quot-master .quot-code-w85 {
  flex: 0 0 auto;
  width: calc(8.5rem + 2rem);
  max-width: calc(8.5rem + 2rem);
}
.quot-master .quot-code-w85 input {
  width: 8.5rem;
  max-width: 8.5rem;
  flex: 0 0 8.5rem;
}
.quot-master .quot-date-w85,
#po-form .quot-master #trndate.quot-date-w85,
#quot-form .quot-master #trndate.quot-date-w85,
#quot-form .quot-master #quotno.quot-date-w85,
#quot-form .quot-master #vdate.quot-date-w85,
#quot-form .quot-master #currancy.quot-date-w85,
#dc-form .quot-master #trndate.quot-date-w85,
#dc-form .quot-master #challanno.quot-date-w85,
#dc-form .quot-master #ppodate.quot-date-w85,
#dc-form .quot-master #ppono.quot-date-w85,
#dc-form .quot-master #currancy.quot-date-w85,
#sale-form .quot-master #trndate.quot-date-w85,
#sale-form .quot-master #saleno.quot-date-w85,
#sale-form .quot-master #invoiceno.quot-date-w85,
#sale-form .quot-master #duedate.quot-date-w85,
#sale-form .quot-master #ppodate.quot-date-w85,
#sale-form .quot-master #ppono.quot-date-w85,
#sale-form .quot-master #currancy.quot-date-w85,
#sale-form .quot-master #exchgrate.quot-date-w85,
#sale-form .quot-master #invreq.quot-date-w85,
#squot-form .quot-master #trndate.quot-date-w85,
#squot-form .quot-master #quotno.quot-date-w85,
#squot-form .quot-master #vdate.quot-date-w85,
#squot-form .quot-master #currancy.quot-date-w85,
#squot-form .quot-master #scsdate.quot-date-w85,
#squot-form .quot-master #scedate.quot-date-w85,
#squot-form .quot-master #scvisits.quot-date-w85,
#ssale-form .quot-master #trndate.quot-date-w85,
#ssale-form .quot-master #saleno.quot-date-w85,
#ssale-form .quot-master #invoiceno.quot-date-w85,
#ssale-form .quot-master #duedate.quot-date-w85,
#ssale-form .quot-master #ppodate.quot-date-w85,
#ssale-form .quot-master #ppono.quot-date-w85,
#ssale-form .quot-master #currancy.quot-date-w85,
#ssale-form .quot-master #exchgrate.quot-date-w85,
#ssale-form .quot-master #invreq.quot-date-w85 {
  width: 8.5rem;
  max-width: 8.5rem;
  box-sizing: border-box;
}

/* DC / Quotation Currency: Klaro wrapper must match code/date field width */
#dc-form .quot-master .o_field:has(#currancy) .klaro-select,
#dc-form .quot-master .o_field:has(#currancy) .klaro-select-trigger,
#quot-form .quot-master .o_field:has(#currancy) .klaro-select,
#quot-form .quot-master .o_field:has(#currancy) .klaro-select-trigger {
  width: 8.5rem;
  max-width: 8.5rem;
  box-sizing: border-box;
}

/* SQUOT: Currency = Valid Date width; Quotation Type = Date width */
#squot-form .squot-master-top .o_field:has(#currancy) .klaro-select,
#squot-form .squot-master-top .o_field:has(#currancy) .klaro-select-trigger,
#squot-form .squot-master-top .o_field:has(#sqtype) .klaro-select,
#squot-form .squot-master-top .o_field:has(#sqtype) .klaro-select-trigger,
#squot-form .squot-master-top #currancy.quot-date-w85,
#squot-form .squot-master-top #sqtype.squot-sqtype-w {
  width: 8.5rem !important;
  max-width: 8.5rem !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

/* SQUOT top master ï¿½ 4 aligned columns across Date / Valid Date / Quotation # / Print Company */
#squot-form .squot-master-top {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  column-gap: 1.25rem;
  row-gap: 0.5rem;
  align-items: end;
  width: 100%;
  max-width: 100%;
}
#squot-form .squot-master-top .o_field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin: 0;
  min-width: 0;
  width: 100%;
}
#squot-form .squot-master-top .o_field > label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#squot-form .squot-master-top .o_field > input,
#squot-form .squot-master-top .o_field > select {
  width: 8.5rem !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}
#squot-form .squot-master-top .code-input-wrap.quot-code-w85 {
  width: 8.5rem;
  max-width: 100%;
}
#squot-form .squot-master-top .quot-check-field {
  width: auto;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 0.35rem;
  justify-self: end;
}
#squot-form .squot-master-top .quot-check-field input[type="checkbox"] {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}
#squot-form .squot-master-top .quot-check-field label {
  margin: 0;
  white-space: nowrap;
}
#squot-form .squot-master-top .squot-top-spacer {
  visibility: hidden;
  pointer-events: none;
  min-height: 0;
}
@media (max-width: 900px) {
  #squot-form .squot-master-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #squot-form .squot-master-top .quot-check-field {
    justify-self: start;
  }
  #squot-form .squot-master-top .squot-top-spacer {
    display: none;
  }
}

/* DC: Print Company + Challan Cancel on one cell */
#dc-form .dc-check-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  padding-top: 1.15rem;
}
#dc-form .dc-check-pair .quot-check-field {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}
#dc-form .dc-check-pair .quot-check-field label {
  margin: 0;
}

/* DC: Contact Person | Party PO # | Party PO Date on one row */
#dc-form .dc-contact-po-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) max-content max-content;
  column-gap: 0.85rem;
  align-items: end;
  width: 100%;
}
#dc-form .dc-contact-po-row .o_field {
  margin: 0;
  min-width: 0;
}
#dc-form .dc-contact-po-row .dc-cperson-field {
  min-width: 0;
}
/* DC: Location under Print Company (3rd master column) */
#dc-form .dc-loc-field #godown {
  min-width: 12rem;
  width: 100%;
  max-width: 22rem;
  box-sizing: border-box;
}
/* Sale: Location select (same list style as DC) */
#sale-form .sale-loc-field #godown {
  min-width: 12rem;
  width: 100%;
  max-width: 22rem;
  box-sizing: border-box;
}

/* Sale charges ï¿½ A/C Code | Name | Value | Charges Description */
#sale-form .sale-charges-block {
  margin: 0.75rem 0 0.25rem;
  overflow-x: auto;
}
#sale-form .sale-charges-table {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}
#sale-form .sale-charges-table thead th {
  font-size: 0.72rem;
  white-space: nowrap;
}
#sale-form .sale-charges-table .code-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}
#sale-form .sale-charges-table .code-input-wrap input {
  width: 7.5rem;
  max-width: 100%;
}
@media (max-width: 900px) {
  #dc-form .dc-contact-po-row {
    grid-template-columns: 1fr;
  }
}

/* PO: Date | PO # | Print ; Demand # | Required Date (aligned under PO #) */
#po-form .po-head-identity {
  grid-column: 1 / -1;
}
#po-form .po-head-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}
#po-form .po-head-row {
  display: grid;
  grid-template-columns: calc(8.5rem + 2rem) 8.5rem auto;
  column-gap: 0.85rem;
  align-items: end;
  width: max-content;
  max-width: 100%;
}
#po-form .po-head-date,
#po-form .po-head-pono,
#po-form .po-head-demand,
#po-form .po-head-reqdate {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
#po-form .po-head-date label,
#po-form .po-head-pono label,
#po-form .po-head-demand label,
#po-form .po-head-reqdate label {
  margin: 0;
}
#po-form .po-head-date input,
#po-form .po-head-pono input,
#po-form .po-head-reqdate input,
#po-form .po-head-demand .quot-code-w85 input {
  width: 8.5rem;
  max-width: 8.5rem;
  box-sizing: border-box;
}
#po-form .po-head-demand .quot-code-w85 {
  width: calc(8.5rem + 2rem);
  max-width: calc(8.5rem + 2rem);
}
#po-form .po-head-print {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  align-self: end;
  min-height: 1.9rem;
  margin-bottom: 0.15rem;
}
.quot-master .quot-cperson-full {
  width: 100%;
}
.quot-master .quot-disp-blue {
  color: #1a56a8;
  background: #f5f8fc;
}
.quot-master .inv-name-input {
  flex: 1 1 auto;
  min-width: 0;
}
@media (max-width: 900px) {
  .quot-master {
    grid-template-columns: 1fr;
  }
  .quot-master .o_field.span-2,
  .quot-master .o_field.span-3 {
    grid-column: auto;
  }
  .quot-master .quot-row-spacer {
    display: none;
  }
}

/* QUOT / form views: keep toolbar fixed; scroll only the form body */
.o_main.o_main-form {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.o_main-form .o_action {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}
.o_main-form .o_form_view {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.o_main-form .o_content,
.o_form_view:has(.quot-sheet) .o_content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
/* QUOT footer totals / charges (after detail lines) */
.quot-footer {
  margin: 0.75rem 0 0.25rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--o-border, #dee2e6);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.quot-footer-row {
  display: grid;
  gap: 0.45rem 0.85rem;
  align-items: end;
}
.quot-footer-row-totals {
  grid-template-columns: repeat(5, minmax(8.5rem, 1fr));
}
.quot-footer-row-freight,
.quot-footer-row-other,
.quot-footer-row-grand {
  grid-template-columns: minmax(8rem, 1fr) minmax(8rem, 1fr) minmax(14rem, 2.2fr) minmax(8rem, 1fr);
}
.quot-footer-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.quot-footer-field label {
  font-size: 0.82rem;
  color: #495057;
  margin: 0;
  white-space: nowrap;
}
.quot-footer-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(var(--o-peach-rgb), 0.38);
  border-radius: 0.55rem;
  background: #fff;
  color: var(--o-text, #212529);
  font: inherit;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.quot-footer-field input:focus {
  outline: none;
  border-color: var(--o-accent, var(--o-accent));
  box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.18);
}
.quot-footer-field input[readonly] {
  background: #f8f9fa;
}
.quot-footer-charge {
  /* freight/other remarks sit in column 3 */
}
.quot-footer-value {
  /* values sit in column 4 */
}
.quot-footer-indent {
  grid-column: 2;
}
.quot-footer-spacer {
  visibility: hidden;
  pointer-events: none;
}
.quot-disp-red {
  color: #c0392b !important;
  font-weight: 600;
}
.quot-disp-blue {
  color: #1a5276 !important;
  font-weight: 700;
}
/* QUOT/DC/SALE lines ? override shared JV #lines-table column widths */
.quot-sheet .quot-lines-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.quot-sheet #lines-table.quot-lines-table {
  table-layout: auto;
  width: max-content;
  min-width: 0;
}
.quot-sheet #lines-table.quot-lines-table th,
.quot-sheet #lines-table.quot-lines-table td {
  width: auto !important;
  max-width: none;
  min-width: 0;
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.12rem 0.18rem;
}
.quot-sheet #lines-table.quot-lines-table thead th {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-size: 0.72rem;
  line-height: 1.15;
  padding: 0.28rem 0.18rem;
}
.quot-sheet #lines-table.quot-lines-table .quot-col-item {
  /* Shrink-wrap to code + LOV ï¿½ do not absorb leftover table width */
  width: 1% !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: nowrap;
}
.quot-sheet #lines-table.quot-lines-table .quot-col-name {
  min-width: 14rem;
}
.quot-sheet #lines-table.quot-lines-table .quot-col-type {
  min-width: 6.5rem;
}
.quot-sheet #lines-table.quot-lines-table .quot-col-desc {
  min-width: 14rem;
}
.quot-sheet #lines-table.quot-lines-table .quot-col-num {
  width: 1% !important;
  min-width: 0 !important;
  max-width: none !important;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
}
.quot-sheet #lines-table.quot-lines-table .quot-col-num input {
  display: block;
  margin: 0;
  padding: 0.35rem 0.4rem;
}
.quot-sheet #lines-table.quot-lines-table .quot-col-del {
  width: 2.5rem !important;
  min-width: 2.5rem;
  text-align: center;
}
.quot-sheet #lines-table.quot-lines-table .code-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  width: max-content;
  max-width: max-content;
  min-width: 0;
}
.quot-sheet #lines-table.quot-lines-table .ln-item {
  width: 9rem;
  min-width: 9rem;
  max-width: 9rem;
  flex: 0 0 9rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}
.quot-sheet #lines-table.quot-lines-table .ln-item-lov {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.quot-sheet #lines-table.quot-lines-table .ln-name {
  width: 100%;
  min-width: 12rem;
  color: #1a5276;
  font-weight: 600;
  background: #f8f9fa;
}
.quot-sheet #lines-table.quot-lines-table .ln-type {
  width: 100%;
  min-width: 7rem;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid rgba(var(--o-peach-rgb), 0.38);
  border-radius: 0.55rem;
  padding: 0.45rem 1.85rem 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.25;
  color: inherit;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236c757d' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.quot-sheet #lines-table.quot-lines-table .ln-type:focus {
  border-color: var(--o-accent);
  box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.18);
  outline: none;
}
.quot-sheet #lines-table.quot-lines-table .ln-type:disabled {
  background-color: #f8f9fa;
  border-color: #e9ecef;
  color: #6c757d;
  cursor: default;
}
.quot-sheet #lines-table.quot-lines-table .ln-desc,
.quot-sheet #lines-table.quot-lines-table .ln-dremarks {
  width: 100%;
  min-width: 12rem;
}
.quot-sheet #lines-table.quot-lines-table input[type="number"],
.quot-sheet #lines-table.quot-lines-table input.ln-stock,
.quot-sheet #lines-table.quot-lines-table input.ln-evalue,
.quot-sheet #lines-table.quot-lines-table input.ln-ivalue,
.quot-sheet #lines-table.quot-lines-table input.ln-stvalue,
.quot-sheet #lines-table.quot-lines-table input.ln-discount,
.quot-sheet #lines-table.quot-lines-table input.ln-mdiscount,
.quot-sheet #lines-table.quot-lines-table input.ln-disc-amt,
.quot-sheet #lines-table.quot-lines-table input.ln-stval,
.quot-sheet #lines-table.quot-lines-table input.ln-val-ex,
.quot-sheet #lines-table.quot-lines-table input.ln-val-inc,
.quot-sheet #lines-table.quot-lines-table input.ln-margin,
.quot-sheet #lines-table.quot-lines-table input.ln-fur-amt,
.quot-sheet #lines-table.quot-lines-table input.ln-tdisc,
.quot-sheet #lines-table.quot-lines-table input.ln-qty,
.quot-sheet #lines-table.quot-lines-table input.ln-rate,
.quot-sheet #lines-table.quot-lines-table input.ln-disc,
.quot-sheet #lines-table.quot-lines-table input.ln-stax,
.quot-sheet #lines-table.quot-lines-table input.ln-cost,
.quot-sheet #lines-table.quot-lines-table input.ln-sqrate,
.quot-sheet #lines-table.quot-lines-table input.ln-grate,
.quot-sheet #lines-table.quot-lines-table input.ln-fur,
.quot-sheet #lines-table.quot-lines-table input.ln-comm,
.quot-sheet #lines-table.quot-lines-table input.ln-pmargin,
.quot-sheet #lines-table.quot-lines-table input.ln-ccost,
.quot-sheet #lines-table.quot-lines-table input.ln-rcvdqty,
.quot-sheet #lines-table.quot-lines-table input.ln-rejqty,
.quot-sheet #lines-table.quot-lines-table input.ln-ochrgs,
.quot-sheet #lines-table.quot-lines-table input.ln-frate,
.quot-sheet #lines-table.quot-lines-table input.ln-prate,
.quot-sheet #lines-table.quot-lines-table input.ln-purch,
.quot-sheet #lines-table.quot-lines-table input.ln-hscode,
.quot-sheet #lines-table.quot-lines-table input.ln-netrate,
.quot-sheet #lines-table.quot-lines-table input.ln-discrate {
  width: 5.5rem;
  min-width: 5.5rem;
  max-width: 5.5rem;
  box-sizing: border-box;
}
.quot-sheet #lines-table.quot-lines-table input.ln-disc-amt,
.quot-sheet #lines-table.quot-lines-table input.ln-stval,
.quot-sheet #lines-table.quot-lines-table input.ln-val-ex,
.quot-sheet #lines-table.quot-lines-table input.ln-val-inc,
.quot-sheet #lines-table.quot-lines-table input.ln-margin,
.quot-sheet #lines-table.quot-lines-table input.ln-fur-amt,
.quot-sheet #lines-table.quot-lines-table input.ln-tdisc,
.quot-sheet #lines-table.quot-lines-table input.ln-name,
.quot-sheet #lines-table.quot-lines-table input.ln-stock {
  border: 1px solid rgba(var(--o-peach-rgb), 0.55);
  background: linear-gradient(180deg, #fffdfb 0%, var(--o-tint) 100%);
  color: #1a56a8;
  font-weight: 600;
  cursor: default;
  box-shadow: 0 1px 2px rgba(var(--o-accent-rgb), 0.05);
}
/* GRN header: Date / GRN# / IGP / PO / Demand / Due Date = Party code width (8.5rem) */
#grn-form .quot-master #trndate.quot-date-w85,
#grn-form .quot-master #grnno.quot-date-w85,
#grn-form .quot-master #igpno.quot-date-w85,
#grn-form .quot-master #duedate.quot-date-w85 {
  width: 8.5rem;
  max-width: 8.5rem;
  box-sizing: border-box;
}
#grn-form .quot-master .quot-code-w85 {
  flex: 0 0 auto;
  width: calc(8.5rem + 2rem);
  max-width: calc(8.5rem + 2rem);
}
#grn-form .quot-master .quot-code-w85 input {
  width: 8.5rem;
  max-width: 8.5rem;
  flex: 0 0 8.5rem;
}

/* GRN charges block ï¿½ below line totals */
#grn-form .grn-charges-block {
  margin: 0.75rem 0 0.25rem;
  overflow-x: auto;
}
#grn-form .grn-charges-table {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}
#grn-form .grn-charges-table thead th {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #5c4a3a;
  background: linear-gradient(180deg, var(--o-tint-6) 0%, var(--o-tint-5) 100%);
  border-bottom: 1px solid rgba(var(--o-peach-rgb), 0.45);
  padding: 0.35rem 0.4rem;
  white-space: nowrap;
}
#grn-form .grn-charges-table td {
  padding: 0.28rem 0.35rem;
  vertical-align: middle;
  border-bottom: 1px solid #eee;
}
#grn-form .grn-charges-table input[type="text"],
#grn-form .grn-charges-table input[type="number"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 1.85rem;
  height: 1.85rem;
  font-size: 0.82rem;
  padding: 0.25rem 0.4rem;
}
#grn-form .grn-charges-table .code-input-wrap {
  width: 100%;
  max-width: none;
  display: flex;
  gap: 0.2rem;
  align-items: center;
}
#grn-form .grn-charges-table .code-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
}
#grn-form .grn-charges-table #pchname,
#grn-form .grn-charges-table #ochname,
#grn-form .grn-charges-table #ochname2,
#grn-form .grn-charges-table #ochname3 {
  border: 1px solid rgba(var(--o-peach-rgb), 0.55);
  background: linear-gradient(180deg, #fffdfb 0%, var(--o-tint) 100%);
  color: #1a56a8;
  font-weight: 600;
  cursor: default;
}

/* Quotation detail widths (Item / Name / Type / Description).
   Demand uses the same Item / Name / Description / Qty widths as QUOT. */
#demand-form #lines-table.quot-lines-table .quot-col-item,
#quot-form #lines-table.quot-lines-table .quot-col-item,
#po-form #lines-table.quot-lines-table .quot-col-item,
#grn-form #lines-table.quot-lines-table .quot-col-item,
#grn_r-form #lines-table.quot-lines-table .quot-col-item,
#dc-form #lines-table.quot-lines-table .quot-col-item,
#sale-form #lines-table.quot-lines-table .quot-col-item {
  width: 1% !important;
  min-width: 0 !important;
  max-width: none !important;
}
#demand-form #lines-table.quot-lines-table .quot-col-name,
#quot-form #lines-table.quot-lines-table .quot-col-name,
#po-form #lines-table.quot-lines-table .quot-col-name,
#grn-form #lines-table.quot-lines-table .quot-col-name,
#grn_r-form #lines-table.quot-lines-table .quot-col-name,
#dc-form #lines-table.quot-lines-table .quot-col-name,
#sale-form #lines-table.quot-lines-table .quot-col-name {
  width: 22rem !important;
  min-width: 22rem;
  max-width: 22rem;
}
#quot-form #lines-table.quot-lines-table .quot-col-type,
#squot-form #lines-table.quot-lines-table .quot-col-type,
#demand-form #lines-table.quot-lines-table .quot-col-type,
#po-form #lines-table.quot-lines-table .quot-col-type,
#grn-form #lines-table.quot-lines-table .quot-col-type,
#grn_r-form #lines-table.quot-lines-table .quot-col-type,
#dc-form #lines-table.quot-lines-table .quot-col-type,
#ssale-form #lines-table.quot-lines-table .quot-col-type,
#sale-form #lines-table.quot-lines-table .quot-col-type {
  width: 15rem !important;
  min-width: 15rem;
  max-width: 15rem;
}
#demand-form #lines-table.quot-lines-table .quot-col-desc,
#quot-form #lines-table.quot-lines-table .quot-col-desc,
#squot-form #lines-table.quot-lines-table .quot-col-desc,
#po-form #lines-table.quot-lines-table .quot-col-desc,
#grn-form #lines-table.quot-lines-table .quot-col-desc,
#grn_r-form #lines-table.quot-lines-table .quot-col-desc,
#dc-form #lines-table.quot-lines-table .quot-col-desc,
#ssale-form #lines-table.quot-lines-table .quot-col-desc,
#sale-form #lines-table.quot-lines-table .quot-col-desc {
  width: 27rem !important;
  min-width: 27rem;
  max-width: 27rem;
}
#squot-form #lines-table.quot-lines-table .quot-col-remarks,
#ssale-form #lines-table.quot-lines-table .quot-col-remarks {
  width: 12rem !important;
  min-width: 12rem;
  max-width: 12rem;
}
#demand-form #lines-table.quot-lines-table .quot-col-num {
  width: 1% !important;
  min-width: 0 !important;
}
#demand-form #lines-table.quot-lines-table .code-input-wrap,
#quot-form #lines-table.quot-lines-table .code-input-wrap,
#po-form #lines-table.quot-lines-table .code-input-wrap,
#grn-form #lines-table.quot-lines-table .code-input-wrap,
#grn_r-form #lines-table.quot-lines-table .code-input-wrap,
#dc-form #lines-table.quot-lines-table .code-input-wrap,
#sale-form #lines-table.quot-lines-table .code-input-wrap {
  width: max-content;
  max-width: max-content;
  min-width: 0;
}
#demand-form #lines-table.quot-lines-table .ln-item,
#quot-form #lines-table.quot-lines-table .ln-item,
#po-form #lines-table.quot-lines-table .ln-item,
#grn-form #lines-table.quot-lines-table .ln-item,
#grn_r-form #lines-table.quot-lines-table .ln-item,
#dc-form #lines-table.quot-lines-table .ln-item,
#sale-form #lines-table.quot-lines-table .ln-item {
  width: 9rem;
  min-width: 9rem;
  max-width: 9rem;
  flex: 0 0 9rem;
}
#demand-form #lines-table.quot-lines-table .ln-name,
#demand-form #lines-table.quot-lines-table .ln-desc,
#demand-form #lines-table.quot-lines-table .ln-desc-preview,
#demand-form #lines-table.quot-lines-table .ln-type,
#quot-form #lines-table.quot-lines-table .ln-name,
#quot-form #lines-table.quot-lines-table .ln-type,
#quot-form #lines-table.quot-lines-table .ln-desc,
#quot-form #lines-table.quot-lines-table .ln-desc-preview,
#squot-form #lines-table.quot-lines-table .ln-type,
#squot-form #lines-table.quot-lines-table .ln-desc-preview,
#squot-form #lines-table.quot-lines-table .ln-remarks,
#ssale-form #lines-table.quot-lines-table .ln-type,
#ssale-form #lines-table.quot-lines-table .ln-desc-preview,
#ssale-form #lines-table.quot-lines-table .ln-remarks,
#po-form #lines-table.quot-lines-table .ln-name,
#po-form #lines-table.quot-lines-table .ln-desc,
#po-form #lines-table.quot-lines-table .ln-desc-preview,
#po-form #lines-table.quot-lines-table .ln-type,
#grn-form #lines-table.quot-lines-table .ln-name,
#grn-form #lines-table.quot-lines-table .ln-desc,
#grn-form #lines-table.quot-lines-table .ln-desc-preview,
#grn-form #lines-table.quot-lines-table .ln-type,
#grn_r-form #lines-table.quot-lines-table .ln-name,
#grn_r-form #lines-table.quot-lines-table .ln-desc,
#grn_r-form #lines-table.quot-lines-table .ln-type,
#dc-form #lines-table.quot-lines-table .ln-name,
#dc-form #lines-table.quot-lines-table .ln-desc,
#dc-form #lines-table.quot-lines-table .ln-desc-preview,
#dc-form #lines-table.quot-lines-table .ln-type,
#sale-form #lines-table.quot-lines-table .ln-name,
#sale-form #lines-table.quot-lines-table .ln-desc,
#sale-form #lines-table.quot-lines-table .ln-desc-preview,
#sale-form #lines-table.quot-lines-table .ln-type {
  width: 100%;
  min-width: 0;
}

/* DC / Sale detail block column widths */
#dc-form #lines-table.quot-lines-table .quot-col-type,
#sale-form #lines-table.quot-lines-table .quot-col-type {
  width: 15rem !important;
  min-width: 15rem;
  max-width: 15rem;
}
#dc-form #lines-table.quot-lines-table .quot-col-item,
#sale-form #lines-table.quot-lines-table .quot-col-item {
  width: 1% !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: nowrap;
}
#dc-form #lines-table.quot-lines-table .quot-col-name,
#sale-form #lines-table.quot-lines-table .quot-col-name {
  width: 22rem !important;
  min-width: 22rem;
  max-width: 22rem;
}
#dc-form #lines-table.quot-lines-table .quot-col-desc,
#sale-form #lines-table.quot-lines-table .quot-col-desc {
  width: 27rem !important;
  min-width: 27rem;
  max-width: 27rem;
}
#dc-form #lines-table.quot-lines-table .quot-col-num,
#sale-form #lines-table.quot-lines-table .quot-col-num {
  width: 1% !important;
  min-width: 0 !important;
  max-width: none !important;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
  white-space: nowrap;
}
#dc-form #lines-table.quot-lines-table .quot-col-num input,
#dc-form #lines-table.quot-lines-table .quot-col-num input[type="number"],
#dc-form #lines-table.quot-lines-table .quot-col-num input[type="text"],
#sale-form #lines-table.quot-lines-table .quot-col-num input,
#sale-form #lines-table.quot-lines-table .quot-col-num input[type="number"],
#sale-form #lines-table.quot-lines-table .quot-col-num input[type="text"] {
  width: 5.5rem;
  min-width: 5.5rem;
  max-width: 5.5rem;
  box-sizing: border-box;
  display: block;
  margin: 0;
}
#dc-form #lines-table.quot-lines-table .quot-col-del,
#sale-form #lines-table.quot-lines-table .quot-col-del {
  width: 2.5rem !important;
  min-width: 2.5rem;
  max-width: 2.5rem;
  text-align: center;
}
#dc-form #lines-table.quot-lines-table .code-input-wrap,
#sale-form #lines-table.quot-lines-table .code-input-wrap {
  width: max-content;
  max-width: max-content;
  min-width: 0;
}
#dc-form #lines-table.quot-lines-table .ln-item,
#sale-form #lines-table.quot-lines-table .ln-item {
  width: 9rem;
  min-width: 9rem;
  max-width: 9rem;
  flex: 0 0 9rem;
}
#quot-form #lines-table.quot-lines-table .ln-stock,
#quot-form #lines-table.quot-lines-table .ln-rate,
#quot-form #lines-table.quot-lines-table .ln-fur-amt,
#quot-form #lines-table.quot-lines-table .ln-disc-amt,
#quot-form #lines-table.quot-lines-table .ln-tdisc,
#quot-form #lines-table.quot-lines-table .ln-stval,
#quot-form #lines-table.quot-lines-table .ln-val-ex,
#quot-form #lines-table.quot-lines-table .ln-val-inc {
  border: 1px solid rgba(var(--o-peach-rgb), 0.55);
  border-radius: 0.45rem;
  background: linear-gradient(180deg, #fffdfb 0%, var(--o-tint) 100%);
  color: #1a56a8;
  font-weight: 600;
  cursor: default;
}
@media (max-width: 1100px) {
  .quot-footer-row-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quot-footer-row-freight,
  .quot-footer-row-other,
  .quot-footer-row-grand {
    grid-template-columns: 1fr 1fr;
  }
  .quot-footer-spacer {
    display: none;
  }
}
/* ?? CRM kanban / opportunity ??????????????????????????????????????? */
.crm-dash {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.75rem 1rem 0;
}
.crm-tile {
  background: #fff;
  border: 1px solid var(--o-border, #dee2e6);
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.crm-tile span { font-size: 0.78rem; color: #667; }
.crm-tile strong { font-size: 1.15rem; color: #25424c; }
.crm-kanban {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem 1.25rem;
  overflow-x: auto;
  align-items: flex-start;
  min-height: 420px;
}
.crm-col {
  flex: 0 0 260px;
  background: #f4f6f7;
  border: 1px solid var(--o-border, #dee2e6);
  border-radius: 6px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
}
.crm-col.folded { flex-basis: 42px; min-height: 200px; }
.crm-col.folded .crm-col-body,
.crm-col.folded .crm-col-title span,
.crm-col.folded .crm-col-add { display: none; }
.crm-col.drag-over { outline: 2px dashed var(--o-accent); }
.crm-col-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--o-border, #dee2e6);
  background: #fff;
  border-radius: 6px 6px 0 0;
}
.crm-col-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.crm-col-title strong { color: #25424c; font-size: 0.9rem; }
.crm-fold-btn, .crm-col-add {
  border: 0; background: transparent; cursor: pointer;
  color: #25424c; font-size: 1rem; line-height: 1;
}
.crm-col-body { padding: 0.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.crm-card {
  background: #fff;
  border: 1px solid var(--o-border, #dee2e6);
  border-radius: 4px;
  padding: 0.55rem 0.6rem 0.45rem;
  position: relative;
  cursor: grab;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.crm-card.dragging { opacity: 0.55; }
.crm-card-strip {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: 4px 0 0 4px; background: #25424c;
}
.crm-card-title {
  display: block; font-weight: 600; color: #25424c;
  text-decoration: none; margin-left: 0.35rem; font-size: 0.9rem;
}
.crm-card-rev { margin: 0.25rem 0 0.15rem 0.35rem; font-weight: 700; color: var(--o-accent); }
.crm-card-meta { margin-left: 0.35rem; font-size: 0.78rem; }
.crm-card-foot {
  display: flex; align-items: center; gap: 0.35rem;
  margin-top: 0.4rem; margin-left: 0.35rem;
}
.crm-avatar {
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: #25424c; color: #fff; font-size: 0.65rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.crm-stars { display: inline-flex; gap: 0.05rem; }
.crm-star {
  border: 0; background: transparent; cursor: pointer;
  color: #ccc; padding: 0; font-size: 0.95rem;
}
.crm-star.on { color: var(--o-accent); }
.crm-clock { font-size: 0.85rem; }
.crm-clock-future { filter: grayscale(0); color: #1e8449; }
.crm-clock-today { color: var(--o-accent); }
.crm-clock-overdue { color: #c0392b; }
.crm-clock-none { opacity: 0.35; }
.crm-search {
  min-width: 12rem; padding: 0.35rem 0.5rem;
  border: 1px solid var(--o-border, #dee2e6); border-radius: 3px;
}
.crm-toast {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 50;
  background: #1e8449; color: #fff; padding: 0.65rem 1rem;
  border-radius: 4px; font-weight: 600;
}
.crm-lost-ribbon {
  background: #c0392b; color: #fff; text-align: center;
  padding: 0.35rem; font-weight: 700; letter-spacing: 0.04em;
}
.crm-statusbar {
  display: flex; flex-wrap: wrap; gap: 0.25rem;
  padding: 0.65rem 1rem 0;
}
.crm-statusbar .o_arrow_button {
  border: 1px solid var(--o-border, #dee2e6);
  background: #fff; color: #25424c;
  padding: 0.35rem 0.75rem; cursor: pointer; border-radius: 3px;
}
.crm-statusbar .o_arrow_button.btn-primary {
  background: #25424c; color: #fff; border-color: #25424c;
}
.crm-opp-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 1rem;
}
@media (max-width: 1000px) {
  .crm-opp-sheet { grid-template-columns: 1fr; }
  .crm-dash { grid-template-columns: 1fr 1fr; }
}
.crm-chain h3, .crm-chatter h3 { color: #25424c; margin: 0.5rem 0; }
.crm-chain h4 { margin: 0.75rem 0 0.35rem; font-size: 0.85rem; color: #667; }
.crm-chatter {
  background: #f8f9fa; border: 1px solid var(--o-border, #dee2e6);
  border-radius: 4px; padding: 0.75rem;
}
.crm-chatter-compose { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem; }
.crm-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.crm-timeline-item {
  background: #fff; border: 1px solid var(--o-border, #dee2e6);
  border-radius: 3px; padding: 0.5rem 0.6rem;
}
.crm-timeline-head { display: flex; gap: 0.35rem; align-items: baseline; flex-wrap: wrap; }
.crm-timeline-note { margin-top: 0.25rem; white-space: pre-wrap; font-size: 0.9rem; }
.crm-overdue td { color: #c0392b; }
.quot-opp-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: #eef3f4; color: #25424c; border: 1px solid #c5d2d6;
  border-radius: 3px; padding: 0.25rem 0.55rem; font-size: 0.82rem;
  text-decoration: none; margin: 0.5rem 1rem 0;
}
.quot-opp-chip:hover { background: #e3ecee; }

.crm-report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 900px) {
  .crm-report-grid { grid-template-columns: 1fr; }
}
.crm-report-h {
  margin: 0 0 0.5rem;
  color: #25424c;
  font-size: 0.95rem;
}
.crm-dup-box {
  margin: 0.75rem 0;
  padding: 0.55rem 0.65rem;
  background: #fff8f0;
  border: 1px solid #f0d2a8;
  border-radius: 4px;
}
.crm-dup-title { margin: 0 0 0.35rem; font-weight: 600; color: #25424c; }
.crm-dup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.crm-dup-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* CRM P3 polish ? filters, popover, home tiles */
.crm-cp-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.crm-filter-pills, .crm-view-toggle { display: inline-flex; gap: 0.2rem; }
.crm-pill {
  border: 1px solid var(--o-border, #dee2e6);
  background: #fff;
  color: #25424c;
  padding: 0.28rem 0.55rem;
  border-radius: 3px;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
}
.crm-pill.active, .crm-pill:hover {
  background: #25424c;
  color: #fff;
  border-color: #25424c;
}
.crm-popover {
  position: absolute;
  z-index: 40;
  width: 260px;
}
.crm-popover-card {
  background: #fff;
  border: 1px solid var(--o-border, #dee2e6);
  border-radius: 4px;
  padding: 0.75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.crm-popover-card h4 { margin: 0 0 0.25rem; color: #25424c; }
.crm-popover-actions { display: flex; gap: 0.35rem; margin-top: 0.25rem; }
.crm-clock { border: 0; background: transparent; cursor: pointer; padding: 0; }
.crm-dash--home { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 1rem 0 1.5rem; }
.crm-dash a.crm-tile { text-decoration: none; color: inherit; }
.crm-dash a.crm-tile:hover { border-color: var(--o-accent); }

.fleet-dash--home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fleet-tile--warn strong { color: #c2410c; }
.fleet-tile--danger strong { color: #b91c1c; }
.fleet-dash-panel { margin-top: 0.5rem; }
.fleet-dash-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}
.fleet-period-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.35rem;
}
.fleet-period-form label {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 0;
}
.fleet-period-form input[type="number"] {
  width: 4.5rem;
  padding: 0.28rem 0.4rem;
}
.fleet-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0.85rem 0 0.25rem;
}
.fleet-chart-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fleet-report-sheet .fleet-chart-grid {
  margin: 1rem 0 0.75rem;
}
.fleet-chart-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(var(--o-peach-rgb), 0.22);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem 0.65rem;
  min-height: 16rem;
  display: flex;
  flex-direction: column;
}
.fleet-chart-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.fleet-chart-card__head h2 {
  margin: 0;
  font-size: 0.95rem;
}
.fleet-chart-card__head a {
  font-size: 0.8rem;
}
.fleet-chart-card__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 12rem;
}
/* Dashboard: Invoices tile + Parts purchased by date chart on one line */
.fleet-inv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.85rem;
  margin-bottom: var(--fin-space-3);
}
.fleet-inv-row > .fin-sales-strip {
  margin-bottom: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.fleet-inv-row > .fleet-chart-card {
  min-height: 13rem;
}
.fleet-inv-row .fleet-chart-card__body {
  min-height: 9rem;
}
@media (max-width: 900px) {
  .fleet-inv-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
.fleet-chart-empty {
  margin: 2rem 0.5rem;
  text-align: center;
}
.fleet-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.35rem;
}
.fleet-num-good { color: #15803d; font-weight: 600; }
.fleet-num-bad { color: #b91c1c; font-weight: 600; }
.fleet-empty-msg { padding: 0.85rem 0.25rem; margin: 0; }
.fleet-report-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.35rem 0.25rem 0.5rem;
  font-size: 0.82rem;
  color: #6b7280;
}
.fleet-report-note {
  flex: 1 1 12rem;
  text-align: left;
  max-width: 42rem;
}
.fleet-report-table tfoot th {
  background: #fff7ed;
  border-top: 1px solid rgba(var(--o-peach-rgb), 0.35);
}
.fleet-report-empty {
  text-align: center;
  padding: 1.25rem 0.75rem !important;
}
.parts-coding-help {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(var(--o-peach-rgb), 0.28);
  background: rgba(255, 247, 237, 0.72);
  color: #4b5563;
  font-size: 0.86rem;
  line-height: 1.45;
}
.parts-coding-help strong {
  color: var(--o-brand);
  font-weight: 600;
}
.parts-row-category td {
  font-weight: 600;
  background: rgba(255, 247, 237, 0.65);
}

/* Parts coding — match CHARTNEW workbench density */
.parts-coding-view .parts-coding-sheet {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--o-topbar-height) - 7.5rem);
}
.parts-notebook {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 0.25rem;
}
.parts-notebook .o_notebook_content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-top: 0.85rem;
}
.parts-tab:not(.hidden) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.parts-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: end;
  padding: 0 0 0.85rem;
  margin: 0;
}
.parts-toolbar .o_field {
  margin: 0;
}
.parts-filter-cat {
  flex: 0 1 16rem;
  min-width: 12rem;
}
.parts-list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.parts-list-pane {
  flex: 1 1 auto;
  max-height: none;
  min-height: 22rem;
  height: min(62vh, 640px);
  overflow: auto;
  border: 1px solid rgba(var(--o-peach-rgb), 0.28);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.parts-table {
  margin: 0;
}
.parts-table th.col-part-code,
.parts-table td.col-part-code,
.parts-table td:first-child code {
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 600;
  white-space: nowrap;
}
.parts-table .col-part-code {
  width: 7.5rem;
}
.parts-table .col-part-uom {
  width: 5.5rem;
}
.parts-table .col-part-status {
  width: 6.5rem;
}
.parts-table tbody tr td.muted,
.parts-table tbody .muted {
  text-align: center;
  padding: 2.25rem 1rem;
  color: #6b7280;
  font-size: 0.92rem;
}
.parts-table tbody tr:hover td {
  background: rgba(255, 247, 237, 0.55);
}
#parts-entry-modal.lov-modal {
  align-items: flex-start;
  padding-top: max(1rem, 2vh);
  padding-bottom: max(1rem, 2vh);
  overflow-y: auto;
}
.parts-entry-dialog {
  width: min(440px, 96vw);
  max-width: 96vw;
  overflow-x: hidden;
}
.parts-entry-dialog .chartnew-entry-body {
  overflow-x: hidden;
}
.parts-entry-dialog .chartnew-entry-row input.chartnew-readonly-code,
.parts-entry-dialog .chartnew-entry-row select {
  max-width: none;
  width: 100%;
}
.parts-entry-dialog .chartnew-entry-footer {
  flex-wrap: wrap;
}
/* Oil-change flag: undo the generic entry-row input/label styling for the checkbox */
.parts-entry-dialog .chartnew-entry-row label.parts-oil-flag {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  cursor: pointer;
}
.parts-entry-dialog .chartnew-entry-row .parts-oil-flag input[type="checkbox"] {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  margin: 0.1rem 0 0;
  flex: 0 0 auto;
  border: 0;
  box-shadow: none;
}

@media (max-width: 1100px) {
  .fleet-chart-grid,
  .fleet-chart-grid--2 { grid-template-columns: 1fr; }
  .fleet-rank-grid { grid-template-columns: 1fr; }
  .fleet-dash--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parts-list-pane { height: min(55vh, 480px); min-height: 16rem; }
}

.fleet-critical-panel {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
  box-shadow: 0 1px 3px rgba(185, 28, 28, 0.08);
}
.fleet-critical-panel--ok {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
  color: #166534;
}
.fleet-critical-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.fleet-critical-panel__head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #991b1b;
}
.fleet-critical-panel__sub {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #7f1d1d;
}
.fleet-critical-table .fleet-severity-expired {
  background: #fef2f2;
}
.fleet-critical-table .fleet-severity-critical {
  background: #fff7ed;
}
.fleet-severity-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.fleet-severity-badge--expired {
  background: #fee2e2;
  color: #991b1b;
}
.fleet-severity-badge--critical {
  background: #ffedd5;
  color: #c2410c;
}
.fleet-severity-badge--warning {
  background: #fef9c3;
  color: #854d0e;
}
.fleet-severity-badge--ok {
  background: #dcfce7;
  color: #166534;
}
.confirm-dialog-wide {
  max-width: 36rem;
  width: min(96vw, 36rem);
}
.parts-lov-dialog {
  width: min(640px, 100%);
  max-height: min(88vh, 40rem);
  display: flex;
  flex-direction: column;
}
.parts-lov-dialog .lov-table-wrap {
  max-height: min(50vh, 22rem);
}
.parts-lov-dialog .parts-lov-create {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
.parts-lov-dialog .parts-lov-create[hidden] {
  display: none !important;
}
.parts-lov-dialog #parts-lov-list-panel[hidden] {
  display: none !important;
}
.parts-lov-dialog .parts-lov-create .chartnew-entry-body {
  padding: 0.75rem 1rem 0.25rem;
  overflow: auto;
}
.parts-lov-dialog .parts-lov-create-actions {
  justify-content: flex-end;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--o-border, #e4e7ec);
  margin-top: 0.35rem;
}
.daily-turns-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}
.daily-turns-filters .o_field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  min-width: 0;
  width: auto;
  max-width: none;
  min-height: 0;
  flex: 0 0 auto;
  grid-template-columns: unset;
}
.daily-turns-filters .o_field label {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  margin: 0;
}
.daily-turns-filters .o_field input[type="date"] {
  width: 11.5rem;
  min-width: 11.5rem;
  max-width: 11.5rem;
  flex: 0 0 11.5rem;
  box-sizing: border-box;
}
.daily-turns-filters .o_list_search_actions {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  align-items: center;
  align-self: center;
}
.daily-turns-filters .o_list_search_actions .btn-odoo {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}
.fleet-duty-dialog {
  max-width: 58rem;
  width: min(96vw, 58rem);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0.85rem 1rem 0.75rem;
  overflow: hidden;
}
.fleet-duty-dialog .duty-modal-head {
  flex: 0 0 auto;
}
.fleet-duty-dialog .chartopen-statusbar {
  margin: 0 0 0.45rem;
}
.fleet-duty-dialog .duty-modal-context {
  margin: 0 0 0.55rem;
  text-align: left;
  font-size: 0.86rem;
  line-height: 1.35;
}
.fleet-duty-dialog .duty-modal-head .chartopen-fields {
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}
.fleet-duty-dialog .duty-modal-head .chartopen-field input[readonly] {
  background: #f8fafc;
  color: var(--o-text, #1f2937);
}
.fleet-duty-dialog .duty-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--qc-border, #e4e7ec);
  border-radius: 8px;
  background: #fff;
}
.fleet-duty-dialog #duty-modal-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.fleet-duty-dialog #duty-modal-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #fed7aa;
  white-space: nowrap;
}
.fleet-duty-dialog #duty-modal-table tbody td {
  padding: 0.32rem 0.4rem;
  vertical-align: middle;
  border-bottom: 1px solid #f0f2f5;
  font-size: 0.84rem;
}
.fleet-duty-dialog #duty-modal-table tbody tr:last-child td {
  border-bottom: none;
}
.fleet-duty-dialog #duty-modal-table th:nth-child(1),
.fleet-duty-dialog #duty-modal-table td:nth-child(1) {
  width: 28%;
  min-width: 9.5rem;
}
.fleet-duty-dialog #duty-modal-table th:nth-child(2),
.fleet-duty-dialog #duty-modal-table td:nth-child(2),
.fleet-duty-dialog #duty-modal-table th:nth-child(3),
.fleet-duty-dialog #duty-modal-table td:nth-child(3) {
  width: 14%;
  min-width: 5.5rem;
}
.fleet-duty-dialog #duty-modal-table th:nth-child(4),
.fleet-duty-dialog #duty-modal-table td:nth-child(4) {
  width: 18%;
  min-width: 7.5rem;
}
.fleet-duty-dialog #duty-modal-table th:nth-child(5),
.fleet-duty-dialog #duty-modal-table td:nth-child(5) {
  width: 26%;
  min-width: 8rem;
}
.fleet-duty-dialog #duty-modal-table input,
.fleet-duty-dialog #duty-modal-table select {
  width: 100%;
  min-height: 1.85rem;
  height: 1.85rem;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
  font: inherit;
  font-size: 0.84rem;
  box-sizing: border-box;
  background: #fff;
}
.fleet-duty-dialog #duty-modal-table input:focus,
.fleet-duty-dialog #duty-modal-table select:focus {
  outline: none;
  border-color: #c45c26;
  box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.15);
}
.fleet-duty-dialog .duty-modal-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-top: 0.7rem;
  padding-top: 0.15rem;
}
.fleet-exc-dialog {
  text-align: left;
  max-width: 40rem;
  width: min(96vw, 40rem);
}
.confirm-dialog.fleet-duty-dialog {
  max-width: 58rem;
  width: min(96vw, 58rem);
}
.fleet-exc-dialog .chartopen-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.fleet-exc-dialog .chartopen-field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.fleet-exc-dialog .chartopen-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
}
.fleet-exc-dialog .chartopen-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--o-text-muted, #5f6b7a);
  text-align: left;
}
.fleet-exc-dialog .chartopen-field input,
.fleet-exc-dialog .chartopen-field select {
  width: 100%;
  min-height: 2.15rem;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  font: inherit;
  background: #fff;
}
.fleet-exc-dialog .chartopen-field input:focus,
.fleet-exc-dialog .chartopen-field select:focus {
  outline: none;
  border-color: #c45c26;
  box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.15);
}
.fleet-exc-dialog .chartopen-field[hidden] {
  display: none !important;
}
.fleet-exc-dialog .chartopen-field-full {
  width: 100%;
}
.fleet-exc-dialog .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
#route-duty-app .chartopen-fields {
  padding: 0.85rem 1rem 1rem;
}
#route-duty-app .duty-route-lookup {
  position: relative;
  width: 100%;
}
#route-duty-app .chartopen-field-lookup .fleet-fk-lookup {
  display: flex;
  gap: 0.4rem;
  align-items: stretch;
  width: 100%;
}
#route-duty-app .chartopen-field-lookup .pinfo-code-wrap {
  flex: 0 0 8.5rem;
  display: flex;
  gap: 0.25rem;
}
#route-duty-app .chartopen-field-lookup .fk-desc,
#route-duty-app .chartopen-field-lookup .inv-name-input {
  flex: 1 1 auto;
  min-width: 0;
}
#route-duty-app .duty-route-lookup .client-suggest-panel {
  left: 0;
  right: 0;
  z-index: 40;
}
#route-duty-app #turns-table input,
#route-duty-app #turns-table select {
  width: 100%;
  min-height: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--qc-border-strong, #d0d5dd);
  border-radius: var(--qc-radius, 6px);
  padding: 0.26rem 0.42rem;
  font: inherit;
  background: #fff;
  box-sizing: border-box;
}
#route-duty-app #turns-table input:focus,
#route-duty-app #turns-table select:focus {
  outline: none;
  border-color: #c45c26;
  box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.15);
}
/* Exception dialog: Type / turns / Extra KM / End time on one line (hidden fields take no column) */
.fleet-exc-dialog .exc-main-row {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}
@media (max-width: 640px) {
  .fleet-exc-dialog .chartopen-field-row {
    grid-template-columns: 1fr;
  }
  .fleet-exc-dialog .exc-main-row {
    grid-auto-flow: row;
  }
}
.btn-odoo-sm {
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
}
.crm-lost-tag, .crm-done-tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  font-weight: 700;
}
.crm-lost-tag { background: #fdecea; color: #c0392b; }
.crm-done-tag { background: #e8f8ef; color: #1e8449; }
.crm-lost-reason { color: #c0392b; font-size: 0.78rem; margin-left: 0.35rem; }
.crm-list-search { display: inline-flex; gap: 0.35rem; align-items: center; }
@media (max-width: 900px) {
  .crm-dash--home { grid-template-columns: 1fr 1fr; }
}

/* CRM P4 */
.crm-colors { display: inline-flex; gap: 0.15rem; margin-left: auto; }
.crm-color-dot {
  width: 0.7rem; height: 0.7rem; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.2); padding: 0; cursor: pointer;
}
.crm-color-dot.on { outline: 2px solid #25424c; outline-offset: 1px; }
.crm-restore-btn { font-size: 0.72rem; padding: 0.15rem 0.4rem; margin-left: auto; }
.crm-due-panel {
  margin: 0.5rem 0 1.5rem;
  background: #fff;
  border: 1px solid var(--o-border, #dee2e6);
  border-radius: 4px;
  padding: 0.75rem 1rem;
}
.crm-due-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 0.5rem;
}
.crm-due-head h2 { margin: 0; font-size: 1rem; color: #25424c; }
.crm-check { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }

/* Item Coding list ï¿½ description column */
#item-table .item-col-desc {
  width: 30rem;
  min-width: 30rem;
  max-width: 30rem;
}

/* SALE_RET ï¿½ mirrors the #sale-form detail-grid rules (same goods line layout) */
#sale-ret-form .ln-desc-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  width: 100%;
  min-width: 12rem;
}
#sale-ret-form .ln-desc-wrap .ln-desc-preview {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
#sale-ret-form .ln-desc-wrap .ln-desc[hidden] {
  display: none !important;
}
#sale-ret-form .ln-desc-expand {
  flex: 0 0 auto;
  padding: 0.15rem 0.45rem;
  min-width: 1.75rem;
  line-height: 1.2;
  font-size: 0.85rem;
}
#sale-ret-form .quot-master #trndate.quot-date-w85,
#sale-ret-form .quot-master #retno.quot-date-w85,
#sale-ret-form .quot-master #challanno.quot-date-w85,
#sale-ret-form .quot-master #qno.quot-date-w85,
#sale-ret-form .quot-master #invoiceno.quot-date-w85,
#sale-ret-form .quot-master #duedate.quot-date-w85,
#sale-ret-form .quot-master #ppodate.quot-date-w85,
#sale-ret-form .quot-master #ppono.quot-date-w85,
#sale-ret-form .quot-master #currancy.quot-date-w85,
#sale-ret-form .quot-master #exchgrate.quot-date-w85,
#sale-ret-form .quot-master #invreq.quot-date-w85 {
  width: 8.5rem;
  max-width: 8.5rem;
  box-sizing: border-box;
}
#sale-ret-form .sale-loc-field #godown {
  min-width: 12rem;
  width: 100%;
  max-width: 22rem;
  box-sizing: border-box;
}
#sale-ret-form #lines-table.quot-lines-table .quot-col-type {
  width: 15rem !important;
  min-width: 15rem;
  max-width: 15rem;
}
#sale-ret-form #lines-table.quot-lines-table .quot-col-item {
  width: 1% !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: nowrap;
}
#sale-ret-form #lines-table.quot-lines-table .quot-col-name {
  width: 22rem !important;
  min-width: 22rem;
  max-width: 22rem;
}
#sale-ret-form #lines-table.quot-lines-table .quot-col-desc {
  width: 27rem !important;
  min-width: 27rem;
  max-width: 27rem;
}
#sale-ret-form #lines-table.quot-lines-table .quot-col-num {
  width: 1% !important;
  min-width: 0 !important;
  max-width: none !important;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
  white-space: nowrap;
}
#sale-ret-form #lines-table.quot-lines-table .quot-col-num input,
#sale-ret-form #lines-table.quot-lines-table .quot-col-num input[type="number"],
#sale-ret-form #lines-table.quot-lines-table .quot-col-num input[type="text"] {
  width: 5.5rem;
  min-width: 5.5rem;
  max-width: 5.5rem;
  box-sizing: border-box;
  display: block;
  margin: 0;
}
#sale-ret-form #lines-table.quot-lines-table .quot-col-del {
  width: 2.5rem !important;
  min-width: 2.5rem;
  max-width: 2.5rem;
  text-align: center;
}
#sale-ret-form #lines-table.quot-lines-table .code-input-wrap {
  width: max-content;
  max-width: max-content;
  min-width: 0;
}
#sale-ret-form #lines-table.quot-lines-table .ln-item {
  width: 9rem;
  min-width: 9rem;
  max-width: 9rem;
  flex: 0 0 9rem;
}
#sale-ret-form #lines-table.quot-lines-table .ln-name,
#sale-ret-form #lines-table.quot-lines-table .ln-desc,
#sale-ret-form #lines-table.quot-lines-table .ln-desc-preview,
#sale-ret-form #lines-table.quot-lines-table .ln-type {
  width: 100%;
  min-width: 0;
}

/* Stock Transfer (STKTRANS) detail block ï¿½ Sr / Item / Name / Stock / Qty /
   Rate / Value / Remarks, quot-style widths. */
#stktrans-form #lines-table.quot-lines-table .stk-col-sr {
  width: 2.5rem !important;
  min-width: 2.5rem;
  max-width: 2.5rem;
  text-align: center;
  color: #6b7280;
}
#stktrans-form #lines-table.quot-lines-table .quot-col-item {
  width: 1% !important;
  min-width: 0 !important;
  max-width: none !important;
}
#stktrans-form #lines-table.quot-lines-table .quot-col-name {
  min-width: 16rem;
  max-width: 24rem;
}
#stktrans-form #lines-table.quot-lines-table .quot-col-num {
  width: 1% !important;
  min-width: 0 !important;
  max-width: none !important;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
  white-space: nowrap;
}
#stktrans-form #lines-table.quot-lines-table .quot-col-num input {
  width: 6rem;
  min-width: 6rem;
  max-width: 6rem;
  box-sizing: border-box;
  display: block;
  margin: 0;
}
#stktrans-form #lines-table.quot-lines-table .quot-col-desc {
  width: 14rem !important;
  min-width: 14rem;
  max-width: 14rem;
}
#stktrans-form #lines-table.quot-lines-table .quot-col-del {
  width: 2.5rem !important;
  min-width: 2.5rem;
  max-width: 2.5rem;
  text-align: center;
}
#stktrans-form #lines-table.quot-lines-table .code-input-wrap {
  width: max-content;
  max-width: max-content;
  min-width: 0;
}
#stktrans-form #lines-table.quot-lines-table .ln-item {
  width: 9rem;
  min-width: 9rem;
  max-width: 9rem;
  flex: 0 0 9rem;
}
#stktrans-form #lines-table.quot-lines-table .ln-name,
#stktrans-form #lines-table.quot-lines-table .ln-remarks {
  width: 100%;
  min-width: 0;
}
/* Over-stock quantity (STKTRANS.FMB "CAN NOT TRANSFER QUANTITY GREATER THEN STOCK") */
#stktrans-form #lines-table.quot-lines-table .ln-qty.input-error {
  border-color: #c0392b;
  background: #fdecea;
  color: #c0392b;
}

/* Accounts module home — PTS parity (acc-overview, insight, sparklines) */
.acc-overview.is-vibrant .fin-kpi-grid {
  gap: 0.75rem;
}

.acc-overview .stat-card--accent-revenue {
  --card-accent: #2563eb;
  border-left: 3px solid var(--card-accent);
  background: linear-gradient(155deg, #eff6ff 0%, #ffffff 46%, #f0f9ff 100%);
  border-color: color-mix(in srgb, var(--card-accent) 22%, #e2e8f0);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(37, 99, 235, 0.12);
}

.acc-overview .stat-card--accent-expense {
  --card-accent: #d97706;
  border-left: 3px solid var(--card-accent);
  background: linear-gradient(155deg, #fffbeb 0%, #ffffff 46%, #fff7ed 100%);
  border-color: color-mix(in srgb, var(--card-accent) 24%, #e2e8f0);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(217, 119, 6, 0.12);
}

.acc-overview .stat-card--accent-profit {
  --card-accent: #16a34a;
  border-left: 3px solid var(--card-accent);
  background: linear-gradient(155deg, #f0fdf4 0%, #ffffff 46%, #ecfdf5 100%);
  border-color: color-mix(in srgb, var(--card-accent) 22%, #e2e8f0);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(22, 163, 74, 0.12);
}

.acc-overview .stat-card--accent-loss {
  --card-accent: #dc2626;
  border-left: 3px solid var(--card-accent);
  background: linear-gradient(155deg, #fef2f2 0%, #ffffff 46%, #fff1f2 100%);
  border-color: color-mix(in srgb, var(--card-accent) 22%, #e2e8f0);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(220, 38, 38, 0.12);
}

.acc-overview .stat-card--accent-cash {
  --card-accent: #0d9488;
  border-left: 3px solid var(--card-accent);
  background: linear-gradient(155deg, #f0fdfa 0%, #ffffff 46%, #ecfdf5 100%);
  border-color: color-mix(in srgb, var(--card-accent) 22%, #e2e8f0);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(13, 148, 136, 0.12);
}

.acc-overview .stat-card {
  position: relative;
  overflow: hidden;
  padding: 0.7rem 0.8rem 0.75rem;
  gap: 0.35rem;
}

.acc-overview .stat-card::before {
  content: "";
  position: absolute;
  right: -12%;
  top: -30%;
  width: 48%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--card-accent, transparent) 18%, transparent) 0%,
    transparent 70%
  );
  pointer-events: none;
  opacity: 0.85;
}

a.stat-card.stat-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.acc-overview .stat-card--link:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.06),
    0 14px 32px color-mix(in srgb, var(--card-accent, #64748b) 24%, transparent);
}

.acc-overview .stat-card--accent-revenue .stat-card__label,
.acc-overview .stat-card--accent-expense .stat-card__label,
.acc-overview .stat-card--accent-profit .stat-card__label,
.acc-overview .stat-card--accent-loss .stat-card__label,
.acc-overview .stat-card--accent-cash .stat-card__label {
  color: color-mix(in srgb, var(--card-accent) 70%, #64748b);
}

.acc-overview .stat-card--accent-revenue .stat-card__spark { color: #2563eb; }
.acc-overview .stat-card--accent-expense .stat-card__spark { color: #d97706; }
.acc-overview .stat-card--accent-profit .stat-card__spark { color: #16a34a; }
.acc-overview .stat-card--accent-loss .stat-card__spark { color: #dc2626; }
.acc-overview .stat-card--accent-cash .stat-card__spark { color: #0d9488; }

.acc-overview.is-vibrant .stat-card__spark-line.is-draw {
  stroke-dasharray: var(--spark-len, 200);
  stroke-dashoffset: var(--spark-len, 200);
  animation: invSparkDraw 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.12s + min(var(--dash-i, 0), 5) * 0.05s);
}

.acc-overview a.fin-sales-strip--link {
  text-decoration: none;
  color: inherit;
  background: linear-gradient(120deg, #fff7ed 0%, #ffffff 45%, #eff6ff 100%);
  border: 1px solid rgba(var(--o-accent-rgb), 0.22);
  border-radius: var(--fin-radius-card, 0.65rem);
  border-left: 3px solid var(--o-accent);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 20px rgba(var(--o-accent-rgb), 0.1);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.acc-overview a.fin-sales-strip--link:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-2px);
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.06),
    0 14px 28px rgba(var(--o-accent-rgb), 0.18);
}

.fin-sales-empty {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fin-text-muted);
}

.acc-insight {
  /* reuses .inv-insight visuals */
}

.inv-insight {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.95rem;
  border-radius: var(--fin-radius-card, 0.65rem);
  border: 1px solid rgba(var(--o-accent-rgb), 0.28);
  background: linear-gradient(
    115deg,
    rgba(255, 244, 232, 0.98) 0%,
    rgba(255, 252, 248, 0.94) 42%,
    rgba(236, 253, 245, 0.55) 100%
  );
  box-shadow:
    0 2px 10px rgba(var(--o-accent-rgb), 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--fin-text-primary, #1e293b);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}

.inv-insight::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--o-accent), #f59e0b 55%, #0d9488);
}

.inv-insight__mark {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--o-accent, var(--o-accent));
  box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.2);
  animation: invInsightPulse 1.1s ease-out 1;
}

.inv-insight__text {
  min-width: 0;
}

@keyframes invInsightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--o-accent-rgb), 0.45);
    transform: scale(0.85);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(var(--o-accent-rgb), 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(var(--o-accent-rgb), 0.2);
    transform: scale(1);
  }
}

.stat-card__spark {
  height: 28px;
  margin-top: 2px;
  color: currentColor;
  opacity: 0.7;
}

.stat-card__spark.is-empty {
  opacity: 0.22;
}

.stat-card__spark svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.stat-card__spark-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes invSparkDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.stat-card__empty-hint {
  margin-top: 2px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--fin-text-muted);
  line-height: 1.35;
}

.stat-card--empty .stat-card__value {
  opacity: 0.72;
}

.stat-card__count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fin-text-muted);
  margin-top: -2px;
}


/* Fleet overview — Accounts-style surfaces */
.fleet-overview.is-vibrant .fin-kpi-grid {
  gap: 0.75rem;
}

.fleet-overview .stat-card--accent-revenue {
  --card-accent: #2563eb;
  border-left: 3px solid var(--card-accent);
  background: linear-gradient(155deg, #eff6ff 0%, #ffffff 46%, #f0f9ff 100%);
  border-color: color-mix(in srgb, var(--card-accent) 22%, #e2e8f0);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(37, 99, 235, 0.12);
}

.fleet-overview .stat-card--accent-expense {
  --card-accent: #d97706;
  border-left: 3px solid var(--card-accent);
  background: linear-gradient(155deg, #fffbeb 0%, #ffffff 46%, #fff7ed 100%);
  border-color: color-mix(in srgb, var(--card-accent) 24%, #e2e8f0);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(217, 119, 6, 0.12);
}

.fleet-overview .stat-card--accent-profit {
  --card-accent: #16a34a;
  border-left: 3px solid var(--card-accent);
  background: linear-gradient(155deg, #f0fdf4 0%, #ffffff 46%, #ecfdf5 100%);
  border-color: color-mix(in srgb, var(--card-accent) 22%, #e2e8f0);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(22, 163, 74, 0.12);
}

.fleet-overview .stat-card--accent-loss {
  --card-accent: #dc2626;
  border-left: 3px solid var(--card-accent);
  background: linear-gradient(155deg, #fef2f2 0%, #ffffff 46%, #fff1f2 100%);
  border-color: color-mix(in srgb, var(--card-accent) 22%, #e2e8f0);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(220, 38, 38, 0.12);
}

.fleet-overview .stat-card--accent-cash {
  --card-accent: #0d9488;
  border-left: 3px solid var(--card-accent);
  background: linear-gradient(155deg, #f0fdfa 0%, #ffffff 46%, #ecfdf5 100%);
  border-color: color-mix(in srgb, var(--card-accent) 22%, #e2e8f0);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(13, 148, 136, 0.12);
}

.fleet-overview .stat-card {
  position: relative;
  overflow: hidden;
  padding: 0.7rem 0.8rem 0.75rem;
  gap: 0.35rem;
}

.fleet-overview .stat-card::before {
  content: "";
  position: absolute;
  right: -12%;
  top: -30%;
  width: 48%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--card-accent, transparent) 18%, transparent) 0%,
    transparent 70%
  );
  pointer-events: none;
  opacity: 0.85;
}

.fleet-overview .stat-card--link:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.06),
    0 14px 32px color-mix(in srgb, var(--card-accent, #64748b) 24%, transparent);
}

.fleet-overview .stat-card--accent-revenue .stat-card__spark { color: #2563eb; }
.fleet-overview .stat-card--accent-expense .stat-card__spark { color: #d97706; }
.fleet-overview .stat-card--accent-profit .stat-card__spark { color: #16a34a; }
.fleet-overview .stat-card--accent-loss .stat-card__spark { color: #dc2626; }
.fleet-overview .stat-card--accent-cash .stat-card__spark { color: #0d9488; }

.fleet-overview.is-vibrant .stat-card__spark-line.is-draw {
  stroke-dasharray: var(--spark-len, 200);
  stroke-dashoffset: var(--spark-len, 200);
  animation: invSparkDraw 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.12s + min(var(--dash-i, 0), 5) * 0.05s);
}

.fleet-overview a.fin-sales-strip--link {
  text-decoration: none;
  color: inherit;
  background: linear-gradient(120deg, #eff6ff 0%, #ffffff 45%, #f0fdfa 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--fin-radius-card, 0.65rem);
  border-left: 3px solid #2563eb;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 20px rgba(37, 99, 235, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fleet-overview a.fin-sales-strip--link:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-2px);
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.06),
    0 14px 28px rgba(37, 99, 235, 0.16);
}

.fleet-insight {
  /* reuses .inv-insight visuals */
}

.fleet-ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 0.85rem;
}

.fleet-ops-tile {
  --ops-accent: #0d6e6e;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--fin-radius-card, 0.65rem);
  text-decoration: none;
  color: inherit;
  background: linear-gradient(155deg, #f0fdfa 0%, #ffffff 55%, #ecfeff 100%);
  border: 1px solid color-mix(in srgb, var(--ops-accent) 18%, #e2e8f0);
  border-left: 3px solid var(--ops-accent);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 16px rgba(13, 110, 110, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fleet-ops-tile:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06), 0 12px 24px rgba(13, 110, 110, 0.14);
}

.fleet-ops-tile__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ops-accent) 65%, #64748b);
}

.fleet-ops-tile__value {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fin-text-primary, #1e293b);
}

.fleet-overview .fin-sticky-bar__filters {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.fleet-overview .fleet-dash-panel {
  margin-top: 0;
}

@media (max-width: 900px) {
  .fleet-ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fleet-ops-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* Item Ledger / Item Stock studio (Filter Bar + Preview) */
.inv-report-studio .o_cp_title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.inv-value-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7a4a00;
  background: linear-gradient(180deg, #ffe8b8 0%, #ffd27a 100%);
  border: 1px solid #e0b45a;
}

.inv-studio-content {
  display: block;
  padding: 0 0.55rem 0.55rem;
}

.inv-filter-bar {
  margin: 0;
  padding: 0.55rem 0.75rem 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.inv-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.45rem 0.65rem;
  align-items: end;
}

/* ITEMSTOCK studio: one compact filter strip (dates + LOVs) */
.inv-report-studio .inv-report-params-sheet.inv-filter-bar {
  max-width: none;
  padding: 0.35rem 0.55rem 0.4rem;
  border-radius: 6px;
}
.inv-report-studio .o_form_view .o_group.cp-fields.quot-master.inv-filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.3rem 0.55rem;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  grid-template-columns: none;
}
.inv-report-studio .inv-filter-grid > .o_field {
  grid-column: auto !important;
  flex: 0 0 auto;
  min-width: 0;
  gap: 0.05rem;
}
.inv-report-studio .inv-filter-grid > .o_field:not(.span-3) {
  width: 8.5rem;
  max-width: 8.5rem;
}
.inv-report-studio .inv-filter-grid > .o_field.span-3 {
  flex: 1 1 11rem;
  min-width: 11rem;
  max-width: 18rem;
}
.inv-report-studio .inv-filter-grid > .o_field label {
  font-size: 0.68rem;
  line-height: 1.1;
  margin: 0;
}
.inv-report-studio .inv-filter-bar .o_field input,
.inv-report-studio .inv-filter-bar .o_field select,
.inv-report-studio .inv-filter-bar .inv-name-input {
  padding: 0.18rem 0.35rem;
  font-size: 0.78rem;
  min-height: 1.65rem;
  height: 1.65rem;
}
.inv-report-params-sheet .inv-params-name-lov {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.inv-report-params-sheet .inv-params-name-lov input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
}
.inv-report-studio .inv-filter-bar .inv-params-name-lov {
  width: 100%;
  max-width: 100%;
}
.inv-report-studio .inv-filter-bar .inv-params-name-lov input {
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
}
.inv-report-studio .inv-filter-bar .lov-btn {
  width: 1.65rem;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  font-size: 0.72rem;
}
.inv-report-studio .inv-filter-bar .inv-code-name-wrap {
  gap: 0.25rem;
}
.inv-report-studio .inv-studio-content {
  padding: 0 0.55rem 0.45rem;
}
.inv-report-studio .inv-preview-panel {
  margin-top: 0.4rem;
  min-height: 18rem;
  border-radius: 6px;
}
.inv-report-studio .inv-preview-empty {
  padding: 1.25rem 0.75rem;
  font-size: 0.82rem;
}
.inv-report-studio .inv-preview-frame {
  min-height: 22rem;
  height: calc(100vh - 12.5rem);
}

.inv-filter-bar .ledger-field-account {
  grid-column: span 2;
}

/* Ledger studio: account code+name grows in the flex filter strip (PTS) */
.inv-report-studio .inv-filter-grid > .ledger-field-account {
  flex: 1 1 22rem;
  min-width: 18rem;
  max-width: 40rem;
  display: grid;
  grid-template-columns: minmax(9rem, 11rem) minmax(10rem, 1fr);
  gap: 0.35rem 0.55rem;
  align-items: end;
}
.inv-report-studio .inv-filter-grid > .ledger-field-account .ledger-account-row {
  display: flex;
  gap: 0.3rem;
  align-items: stretch;
}
.inv-report-studio .inv-filter-grid > .ledger-field-account .ledger-account-row input {
  flex: 1 1 auto;
  min-width: 0;
}
.inv-report-studio .inv-filter-grid > .ledger-field-account .ledger-account-row .lov-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 2.6rem;
  padding: 0 0.45rem;
}

.inv-filter-bar .o_field label,
.inv-filter-bar .ledger-account-code-block label,
.inv-filter-bar .ledger-account-desc-block label {
  font-size: 0.75rem;
  line-height: 1.2;
}

.inv-filter-bar .o_field input,
.inv-filter-bar .o_field select,
.inv-filter-bar .ledger-field-account input {
  padding: 0.25rem 0.4rem;
  font-size: 0.82rem;
  min-height: 1.85rem;
}

.inv-filter-bar .btn-odoo {
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  min-height: 1.85rem;
}

.inv-preview-panel {
  display: none;
}

.inv-preview-empty {
  display: none;
}

.inv-preview-frame {
  display: none;
}

.inv-report-studio .inv-preview-panel {
  display: flex;
  flex-direction: column;
  margin-top: 0.65rem;
  min-height: 22rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #eef1f5;
  overflow: hidden;
}

.inv-report-studio .inv-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  color: #64748b;
  font-size: 0.9rem;
  text-align: center;
}

.inv-report-studio .inv-preview-empty[hidden] {
  display: none !important;
}

.inv-report-studio .inv-preview-frame {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 28rem;
  height: calc(100vh - 16rem);
  border: 0;
  background: #fff;
}

.inv-report-studio .inv-preview-frame[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .inv-filter-bar .ledger-field-account {
    grid-column: 1 / -1;
  }
  .inv-report-studio .inv-preview-frame {
    height: 70vh;
    min-height: 18rem;
  }
}
