/* =============================================================================
   dn_benapole UI  -  shadcn/ui look, plain CSS (no React, no Tailwind, no build)
   1. Design tokens        5. Login page
   2. Base                 6. Module chooser / landing
   3. Components           7. Legacy bridge (restyles old Bootstrap/Material/OpenERP pages)
   4. App shell            8. Responsive + print
   All colours come from the tokens below; change them here to re-theme the app.
   ============================================================================= */

/* ---------------------------------------------------------------- 1. TOKENS */
:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 87%;
  /* Brand colours, taken from the Bangladesh Customs emblem (assets/ui/brand/) */
  --brand-blue: 218 67% 37%;     /* #1F4E9D  emblem ring */
  --brand-navy: 220 62% 15%;     /* deep version of the ring, for dark panels */
  --brand-red: 1 83% 43%;        /* #C9130F  banner strip */
  --brand-gold: 31 85% 57%;      /* #EF9534  emblem leaves */
  --brand-ribbon: linear-gradient(90deg, hsl(var(--brand-blue)) 0 40%, hsl(var(--brand-gold)) 40% 60%, hsl(var(--brand-red)) 60% 100%);
  --primary: 218 67% 37%;
  --primary-foreground: 210 40% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --destructive: 0 72% 51%;
  --destructive-foreground: 0 0% 98%;
  --success: 142 71% 36%;
  --warning: 32 95% 44%;
  --info: 199 89% 40%;
  --ring: 218 67% 50%;
  --radius: 0.5rem;
  --sidebar: 0 0% 98.4%;
  --sidebar-width: 264px;
  --header-height: 60px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               "Noto Sans", "Noto Sans Bengali", "Nirmala UI", "Bangla Sangam MN", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 10px 30px -10px rgb(0 0 0 / 0.18);
}

/* ------------------------------------------------------------------ 2. BASE */
html { -webkit-text-size-adjust: 100%; }
body.ui {
  margin: 0;
  font-family: var(--font-sans) !important;
  font-size: 14px;
  line-height: 1.5;
  color: hsl(var(--foreground));
  background: hsl(var(--muted) / 0.5) !important;
  -webkit-font-smoothing: antialiased;
}
body.ui *, body.ui *::before, body.ui *::after { box-sizing: border-box; }
/* Thin blue / gold / red ribbon along the top of every page, from the emblem colours */
body.ui::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1050; background: var(--brand-ribbon); /* above header (1030) and sidebar (1040), below menus (1100) */ pointer-events: none; }
body.ui h1, body.ui h2, body.ui h3, body.ui h4, body.ui h5, body.ui h6 {
  font-family: var(--font-sans) !important;
  color: hsl(var(--foreground));
  letter-spacing: -0.01em;
}
body.ui a { color: hsl(var(--primary)); }
body.ui ::selection { background: hsl(var(--primary) / 0.15); }
body.ui :focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

/* ------------------------------------------------------------ 3. COMPONENTS */
.ui-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 36px; padding: 0 16px; border-radius: var(--radius);
  font: 500 14px/1 var(--font-sans); white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; text-decoration: none !important;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground)) !important;
  box-shadow: var(--shadow-sm); transition: background .15s, box-shadow .15s, opacity .15s;
}
.ui-btn:hover { background: hsl(var(--primary) / 0.9); }
.ui-btn-outline { background: hsl(var(--background)); color: hsl(var(--foreground)) !important; border-color: hsl(var(--input)); }
.ui-btn-outline:hover { background: hsl(var(--accent)); }
.ui-btn-ghost { background: transparent; box-shadow: none; color: hsl(var(--foreground)) !important; }
.ui-btn-ghost:hover { background: hsl(var(--accent)); }
.ui-btn-icon { width: 36px; padding: 0; }
.ui-btn-lg { height: 42px; padding: 0 20px; font-size: 15px; }
.ui-btn-block { width: 100%; }

.ui-input {
  display: block; width: 100%; height: 38px; padding: 0 12px;
  font: 400 14px var(--font-sans); color: hsl(var(--foreground));
  background: hsl(var(--background)); border: 1px solid hsl(var(--input));
  border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.ui-input:focus { outline: none; border-color: hsl(var(--ring)); box-shadow: 0 0 0 3px hsl(var(--ring) / 0.2); }
.ui-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: hsl(var(--foreground)); }

.ui-card {
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow-sm);
}
.ui-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
}
.ui-alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid hsl(var(--border)); background: hsl(var(--background)); font-size: 14px;
}
.ui-alert-destructive { border-color: hsl(var(--destructive) / 0.4); color: hsl(var(--destructive)); background: hsl(var(--destructive) / 0.05); }
.ui-muted { color: hsl(var(--muted-foreground)); }
.ui-kbd { font: 500 11px var(--font-mono); padding: 1px 6px; border: 1px solid hsl(var(--border)); border-radius: 4px; background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.ui-icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ui-avatar {
  width: 34px; height: 34px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--primary) / 0.12); color: hsl(var(--primary)); font-weight: 600; font-size: 13px; overflow: hidden; flex: none;
}
.ui-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* dropdown menu built on <details> (no JS needed) */
.ui-dropdown { position: relative; }
.ui-dropdown > summary { list-style: none; cursor: pointer; }
.ui-dropdown > summary::-webkit-details-marker { display: none; }
.ui-dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 1100; min-width: 240px; max-height: 70vh; overflow: auto;
  background: hsl(var(--popover, var(--card))); border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 4px;
}
.ui-dropdown-label { padding: 8px 10px 6px; font-size: 12px; font-weight: 600; color: hsl(var(--muted-foreground)); }
.ui-dropdown-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: calc(var(--radius) - 2px);
  font-size: 14px; color: hsl(var(--foreground)) !important; text-decoration: none !important;
}
.ui-dropdown-item:hover { background: hsl(var(--accent)); }
.ui-dropdown-sep { height: 1px; margin: 4px -4px; background: hsl(var(--border)); }

/* ------------------------------------------------------------- 4. APP SHELL */
body.ui .app { display: flex; min-height: 100vh; }

/* sidebar */
body.ui .app-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 1040; width: var(--sidebar-width);
  display: flex; flex-direction: column; background: hsl(var(--sidebar));
  border-right: 1px solid hsl(var(--border)); transition: transform .2s ease;
}
body.ui .ui-sidebar-brand {
  display: flex; align-items: center; gap: 10px; height: var(--header-height); padding: 0 14px;
  border-bottom: 1px solid hsl(var(--border)); text-decoration: none !important;
}
body.ui .ui-sidebar-brand img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid hsl(var(--border)); }
body.ui .ui-sidebar-brand-text { min-width: 0; line-height: 1.2; }
body.ui .ui-sidebar-brand-title { display: block; font-size: 14px; font-weight: 600; color: hsl(var(--foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui .ui-sidebar-brand-sub { display: block; font-size: 12px; color: hsl(var(--muted-foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui .ui-sidebar-search { padding: 12px 12px 8px; position: relative; }
body.ui .ui-sidebar-search .ui-icon { position: absolute; left: 22px; top: 22px; width: 16px; height: 16px; color: hsl(var(--muted-foreground)); }
body.ui .ui-sidebar-search input { padding-left: 32px; height: 34px; font-size: 13px; background: hsl(var(--background)); }
body.ui .ui-sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
body.ui .ui-sidebar-nav::-webkit-scrollbar { width: 6px; }
body.ui .ui-sidebar-nav::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 3px; }
body.ui .ui-sidebar-footer { padding: 10px 12px; border-top: 1px solid hsl(var(--border)); font-size: 12px; color: hsl(var(--muted-foreground)); }

/* menu produced by load_menu() (engine/tools/inc.log.php) */
body.ui .ui-sidebar-nav .menu_bg { background: transparent !important; }
body.ui .ui-sidebar-nav .silverheader {
  margin: 2px 0 0 !important; padding: 0 !important; height: auto !important; min-height: 0 !important; line-height: normal !important;
  width: auto !important; background: transparent !important; border: 0 !important; box-shadow: none !important;
}
body.ui .ui-sidebar-nav .silverheader a span:empty { display: none; }
body.ui .ui-sidebar-nav .submenu li a span { white-space: normal; }
body.ui .ui-sidebar-nav .silverheader a {
  display: flex !important; align-items: center; gap: 10px; padding: 8px 10px !important; margin: 0 !important;
  border-radius: calc(var(--radius) - 2px); background: transparent !important; border: 0 !important;
  color: hsl(var(--foreground)) !important; font: 500 13.5px/1.3 var(--font-sans) !important;
  text-transform: none !important; text-decoration: none !important; text-shadow: none !important; box-shadow: none !important;
}
body.ui .ui-sidebar-nav .silverheader a i { width: 18px; text-align: center; font-size: 14px; color: hsl(var(--muted-foreground)); margin: 0 !important; }
body.ui .ui-sidebar-nav .silverheader a::after {
  content: ""; margin-left: auto; width: 7px; height: 7px; flex: none;
  border-right: 1.5px solid hsl(var(--muted-foreground)); border-bottom: 1.5px solid hsl(var(--muted-foreground));
  transform: rotate(-45deg); transition: transform .15s;
}
body.ui .ui-sidebar-nav .silverheader.selected a::after { transform: rotate(45deg); }
body.ui .ui-sidebar-nav .silverheader a:hover { background: hsl(var(--accent)) !important; }
body.ui .ui-sidebar-nav .silverheader.selected a { color: hsl(var(--foreground)) !important; }
body.ui .ui-sidebar-nav .silverheader.selected a i { color: hsl(var(--primary)); }
body.ui .ui-sidebar-nav .submenu { list-style: none; margin: 2px 0 6px 19px !important; padding: 0 0 0 10px !important; border-left: 1px solid hsl(var(--border)); background: transparent !important; }
body.ui .ui-sidebar-nav .submenu li { margin: 0; padding: 0; border: 0 !important; background: transparent !important; }
body.ui .ui-sidebar-nav .submenu li a {
  display: flex !important; align-items: center; justify-content: space-between; padding: 6px 10px !important;
  border-radius: calc(var(--radius) - 2px); border: 0 !important; background: transparent !important;
  color: hsl(var(--muted-foreground)) !important; font: 400 13px/1.35 var(--font-sans) !important;
  text-decoration: none !important; box-shadow: none !important;
}
body.ui .ui-sidebar-nav .submenu li a:hover { background: hsl(var(--accent)) !important; color: hsl(var(--foreground)) !important; }
body.ui .ui-sidebar-nav .submenu li a.is-active { background: hsl(var(--primary) / 0.1) !important; color: hsl(var(--primary)) !important; font-weight: 500 !important; }
body.ui .ui-sidebar-nav .badge { border-radius: 999px !important; font-size: 11px !important; padding: 2px 7px !important; background: hsl(var(--destructive)) !important; }
body.ui .ui-sidebar-nav .is-filtered-out { display: none !important; }
body.ui .ui-sidebar-nav .ui-sidebar-empty { display: none; padding: 16px 10px; font-size: 13px; color: hsl(var(--muted-foreground)); }

/* main column */
body.ui .app-main { flex: 1; min-width: 0; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
body.ui .app-header {
  position: sticky; top: 0; z-index: 1030; height: var(--header-height);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: hsl(var(--background) / 0.92); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}
body.ui .app-header .ui-sidebar-toggle { display: none; }
body.ui .ui-breadcrumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; color: hsl(var(--muted-foreground)); }
body.ui .ui-breadcrumbs a { color: hsl(var(--muted-foreground)) !important; text-decoration: none !important; }
body.ui .ui-breadcrumbs a:hover { color: hsl(var(--foreground)) !important; }
body.ui .ui-breadcrumbs .ui-icon { width: 14px; height: 14px; opacity: .55; }
body.ui .ui-header-date .ui-icon { width: 15px; height: 15px; vertical-align: -2px; }
body.ui .ui-breadcrumbs .current { color: hsl(var(--foreground)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui .ui-header-spacer { flex: 1; }
body.ui .ui-header-date { font-size: 13px; color: hsl(var(--muted-foreground)); white-space: nowrap; }
body.ui .ui-user-trigger { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 999px; }
body.ui .ui-user-trigger:hover { background: hsl(var(--accent)); }
body.ui .ui-user-meta { line-height: 1.2; text-align: left; }
body.ui .ui-user-meta b { display: block; font-size: 13px; font-weight: 600; color: hsl(var(--foreground)); }
body.ui .ui-user-meta span { display: block; font-size: 12px; color: hsl(var(--muted-foreground)); }

body.ui .app-content { flex: 1; padding: 24px; }
body.ui .ui-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 18px; flex-wrap: wrap; }
body.ui .ui-page-title { margin: 0 !important; font-size: 22px !important; font-weight: 600 !important; line-height: 1.25; }
body.ui .ui-page-subtitle { margin: 4px 0 0; font-size: 14px; color: hsl(var(--muted-foreground)); }
body.ui .ui-page-actions { display: flex; gap: 8px; }
body.ui .ui-page-body {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm); padding: 20px; overflow-x: auto;
}
body.ui .ui-page-body.is-plain { background: transparent; border: 0; box-shadow: none; padding: 0; }
body.ui .ui-app-footer { padding: 14px 24px 20px; font-size: 12px; color: hsl(var(--muted-foreground)); }
body.ui .ui-sidebar-backdrop { display: none; }

/* --------------------------------------------------------------- 5. LOGIN */
body.ui-login { min-height: 100vh; margin: 0; display: grid; grid-template-columns: 1.05fr 1fr; background: hsl(var(--background)) !important; }
.login-aside {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 36px 44px; color: #fff;
  background:
    radial-gradient(1100px 520px at -10% -10%, hsl(var(--brand-blue) / .75), transparent 60%),
    radial-gradient(700px 420px at 115% 112%, hsl(var(--brand-red) / .45), transparent 60%),
    radial-gradient(500px 300px at 100% 0%, hsl(var(--brand-gold) / .16), transparent 60%),
    linear-gradient(160deg, hsl(var(--brand-navy)), hsl(220 65% 9%));
}
.login-logo { position: relative; z-index: 1; display: inline-block; background: #fff; border-radius: 12px; padding: 4px 8px; box-shadow: 0 8px 24px -12px rgb(0 0 0 / .5); }
.login-logo img { display: block; height: 52px; width: auto; }
.login-banner { position: relative; z-index: 1; margin: 0 0 26px; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 40px -18px rgb(0 0 0 / .7); border: 1px solid hsl(0 0% 100% / .14); }
.login-banner img { display: block; width: 100%; height: auto; }
.login-mobile-logo { display: none; margin: 0 0 22px; }
.login-mobile-logo img { display: block; width: 100%; max-width: 320px; height: auto; }
.login-aside::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08;
  background-image: linear-gradient(hsl(0 0% 100%) 1px, transparent 1px), linear-gradient(90deg, hsl(0 0% 100%) 1px, transparent 1px);
  background-size: 32px 32px;
}
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.login-brand img { width: 46px; height: 46px; border-radius: 12px; background: #fff; padding: 3px; object-fit: contain; }
.login-brand b { display: block; font-size: 16px; }
.login-brand span { display: block; font-size: 13px; opacity: .7; }
.login-hero { position: relative; z-index: 1; max-width: 460px; }
.login-hero h1 { margin: 0 0 12px; font-size: 36px; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; color: #fff !important; }
.login-hero p { margin: 0; font-size: 15px; line-height: 1.6; opacity: .75; }
.login-points { position: relative; z-index: 1; display: flex; gap: 22px; font-size: 13px; opacity: .8; flex-wrap: wrap; }
.login-points span { display: inline-flex; align-items: center; gap: 8px; }
.login-main { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { margin: 0 0 6px; font-size: 24px; font-weight: 600; }
.login-card .ui-muted { margin: 0 0 24px; font-size: 14px; }
.login-field { margin-bottom: 16px; }
.login-password { position: relative; }
.login-password .ui-input { padding-right: 42px; }
.login-password button { position: absolute; right: 4px; top: 3px; height: 32px; width: 34px; border: 0; background: transparent; border-radius: 6px; color: hsl(var(--muted-foreground)); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.login-password button:hover { background: hsl(var(--accent)); }
.login-foot { margin-top: 22px; font-size: 13px; text-align: center; }
.login-foot a { color: hsl(var(--muted-foreground)) !important; text-decoration: none; }
.login-foot a:hover { color: hsl(var(--foreground)) !important; }

/* ------------------------------------------------------- 6. MODULE CHOOSER */
body.ui-plain { background: hsl(var(--muted) / 0.5) !important; }
.chooser-top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: var(--header-height); padding: 0 24px;
  background: hsl(var(--background) / 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid hsl(var(--border));
}
.chooser-top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.chooser-top .brand img { width: 36px; height: 36px; object-fit: contain; }
.chooser-top .brand b { display: block; font-size: 14px; color: hsl(var(--foreground)); }
.chooser-top .brand span { display: block; font-size: 12px; color: hsl(var(--muted-foreground)); }
.chooser-wrap { max-width: 1160px; margin: 0 auto; padding: 32px 24px 48px; }
.chooser-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.chooser-hero h1 { margin: 0 0 6px; font-size: 26px; font-weight: 600; }
.chooser-hero p { margin: 0; color: hsl(var(--muted-foreground)); }
.chooser-search { position: relative; width: 300px; max-width: 100%; }
.chooser-search .ui-icon { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: hsl(var(--muted-foreground)); }
.chooser-search .ui-input { padding-left: 34px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.module-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; text-decoration: none !important; color: inherit !important;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.module-card:hover { border-color: hsl(var(--primary) / 0.45); box-shadow: var(--shadow); transform: translateY(-1px); }
.module-icon { width: 44px; height: 44px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; background: hsl(var(--muted)); overflow: hidden; }
.module-icon img { width: 30px; height: 30px; object-fit: contain; }
.module-card b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; color: hsl(var(--foreground)); }
.module-card span { display: block; font-size: 13px; line-height: 1.45; color: hsl(var(--muted-foreground)); }
.module-card .arrow { margin-left: auto; color: hsl(var(--muted-foreground)); opacity: 0; transition: opacity .15s, transform .15s; }
.module-card:hover .arrow { opacity: 1; transform: translateX(2px); }
.chooser-section { margin: 26px 0 12px; font-size: 13px; font-weight: 600; color: hsl(var(--muted-foreground)); text-transform: uppercase; letter-spacing: .04em; }
.chooser-empty { display: none; padding: 40px; text-align: center; color: hsl(var(--muted-foreground)); }
.chooser-foot { margin-top: 36px; font-size: 12px; color: hsl(var(--muted-foreground)); text-align: center; }

/* Brand header + banner (start page and module list): logo left, government seal right,
   banner photo underneath, like the office's existing portal. Images: assets/ui/brand/ */
.site-top { background: hsl(var(--background)); border-bottom: 1px solid hsl(var(--border)); }
.site-top-inner { max-width: 1160px; margin: 0 auto; padding: 14px 24px 12px; display: flex; align-items: center; gap: 16px; }
.site-logo { display: block; flex: 0 1 auto; min-width: 0; text-decoration: none !important; }
.site-logo img { display: block; height: 72px; width: auto; max-width: 100%; object-fit: contain; }
.site-seal { height: 72px; width: 72px; flex: none; object-fit: contain; }
.site-top .ui-dropdown { flex: none; }
.site-banner { max-width: 1160px; margin: 22px auto 0; padding: 0 24px; }
.site-banner figure { margin: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 44px -26px hsl(var(--brand-navy) / .55), var(--shadow-sm); background: hsl(var(--brand-navy)); }
.site-banner img { display: block; width: 100%; height: auto; aspect-ratio: 1240 / 300; object-fit: cover; object-position: left center; }
.dept-head { display: flex; align-items: center; gap: 18px; margin: 34px 0 8px; }
.dept-head::before, .dept-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, hsl(var(--border)) 30%, hsl(var(--border))); }
.dept-head::after { background: linear-gradient(270deg, transparent, hsl(var(--border)) 30%, hsl(var(--border))); }
.dept-head h1 { margin: 0; font-size: 26px; font-weight: 600; text-align: center; }
.dept-sub { margin: 0 0 18px; text-align: center; color: hsl(var(--muted-foreground)); }
.dept-tools { display: flex; justify-content: center; margin-bottom: 22px; }
.dept-tools .chooser-search { width: 380px; }

/* Module cards in brand colours: blue-tinted icon tile, ribbon accent on hover */
.module-card { position: relative; overflow: hidden; }
.module-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--brand-ribbon); opacity: 0; transition: opacity .15s; }
.module-card:hover::before, .module-card:focus-visible::before { opacity: 1; }
.module-card:hover { border-color: hsl(var(--brand-blue) / .35); box-shadow: 0 12px 28px -18px hsl(var(--brand-blue) / .55); }
.module-card .module-icon { display: flex; align-items: center; justify-content: center; --tone: var(--brand-blue); background: hsl(var(--tone) / .09); color: hsl(var(--tone)); box-shadow: inset 0 0 0 1px hsl(var(--tone) / .14); transition: background .15s, color .15s, box-shadow .15s; }
.module-card .module-icon .ui-icon { display: block; width: 22px; height: 22px; stroke-width: 1.75; }
.module-card .module-icon.tone-blue { --tone: var(--brand-blue); }
.module-card .module-icon.tone-red  { --tone: var(--brand-red); }
.module-card .module-icon.tone-gold { --tone: 28 85% 44%; }   /* gold, darkened so the line is readable */
.module-card .module-icon.tone-navy { --tone: var(--brand-navy); }
.module-card:hover .module-icon { background: hsl(var(--tone)); color: #fff; box-shadow: none; }
.module-card:hover b { color: hsl(var(--brand-blue)); }
.module-card .arrow { color: hsl(var(--brand-blue)); }
.site-foot { margin-top: 40px; background: hsl(var(--brand-navy)); color: hsl(0 0% 100% / .75); }
.site-foot-inner { max-width: 1160px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.site-foot b { color: #fff; font-weight: 600; }
.site-foot::before { content: ""; display: block; height: 3px; background: var(--brand-ribbon); }

/* ------------------------------------------------------- 7. LEGACY BRIDGE */
/* Old pages are inside .ui-page-body. These rules restyle the classes they use most
   (Bootstrap 4, Material Dashboard, OpenERP "oe_*", and the app's own) to the new look. */

/* typography inside pages */
body.ui .ui-page-body, body.ui .ui-page-body td, body.ui .ui-page-body th, body.ui .ui-page-body label, body.ui .ui-page-body p,
body.ui .ui-page-body div, body.ui .ui-page-body span, body.ui .ui-page-body li {
  font-family: var(--font-sans) !important;
}
body.ui .ui-page-body .card-title, body.ui .ui-page-body h3, body.ui .ui-page-body h4 { font-weight: 600; }

/* text inputs, selects, textareas */
body.ui .ui-page-body input[type=text], body.ui .ui-page-body input[type=number], body.ui .ui-page-body input[type=date],
body.ui .ui-page-body input[type=email], body.ui .ui-page-body input[type=password], body.ui .ui-page-body input[type=search],
body.ui .ui-page-body input[type=tel], body.ui .ui-page-body input:not([type]), body.ui .ui-page-body select, body.ui .ui-page-body textarea,
body.ui .ui-page-body .form-control, body.ui .ui-page-body .formcntrl, body.ui .ui-page-body .input1, body.ui .ui-page-body .input3 {
  min-height: 36px; padding: 6px 12px !important; font: 400 14px/1.4 var(--font-sans) !important;
  color: hsl(var(--foreground)) !important; background-color: hsl(var(--background)) !important; background-image: none !important;
  border: 1px solid hsl(var(--input)) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow-sm) !important;
  transition: border-color .15s, box-shadow .15s; max-width: 100%;
}
body.ui .ui-page-body textarea { min-height: 80px; height: auto; }
body.ui .ui-page-body select { padding-right: 32px !important; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 10px center !important; }
body.ui .ui-page-body select[multiple] { background-image: none !important; padding-right: 12px !important; }
body.ui .ui-page-body input:focus, body.ui .ui-page-body select:focus, body.ui .ui-page-body textarea:focus, body.ui .ui-page-body .form-control:focus {
  outline: none !important; border-color: hsl(var(--ring)) !important; box-shadow: 0 0 0 3px hsl(var(--ring) / 0.18) !important;
}
body.ui .ui-page-body input[readonly], body.ui .ui-page-body input:disabled, body.ui .ui-page-body select:disabled {
  background-color: hsl(var(--muted)) !important; color: hsl(var(--muted-foreground)) !important;
}
body.ui .ui-page-body ::placeholder { color: hsl(var(--muted-foreground) / 0.8) !important; opacity: 1; }
body.ui .ui-page-body input[type=radio], body.ui .ui-page-body input[type=checkbox] { accent-color: hsl(var(--primary)); width: 16px; height: 16px; vertical-align: middle; }
body.ui .ui-page-body input[type=file] { font-size: 13px; }
body.ui .ui-page-body .bmd-form-group .bmd-label-floating, body.ui .ui-page-body .bmd-form-group .bmd-label-static { color: hsl(var(--muted-foreground)) !important; font-size: 13px !important; }
body.ui .ui-page-body label { font-weight: 500; color: hsl(var(--foreground)); }

/* buttons */
body.ui .ui-page-body :where(.btn, button:not(.ui-btn):not(.close):not(.dt-button):not(.ui-datepicker-trigger), input[type=submit],
  input[type=button], input[type=reset], .btn1, .oe_button, .oe_form_button_save) {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; height: auto !important; width: auto; padding: 0 16px !important; margin: 2px;
  font: 500 14px/1 var(--font-sans) !important; letter-spacing: 0 !important; text-transform: none !important;
  color: hsl(var(--primary-foreground)) !important; background: hsl(var(--primary)) !important; background-image: none !important;
  border: 1px solid transparent !important; border-radius: var(--radius) !important; box-shadow: var(--shadow-sm) !important;
  cursor: pointer; text-shadow: none !important; transition: background .15s, opacity .15s;
}
body.ui .ui-page-body :where(.btn, button, input[type=submit], input[type=button]):hover { opacity: .9; }
body.ui .ui-page-body .btn-danger, body.ui .ui-page-body .btn-outline-danger, body.ui .ui-page-body [name=delete], body.ui .ui-page-body .oe_list_record_delete button {
  background: hsl(var(--destructive)) !important; color: hsl(var(--destructive-foreground)) !important;
}
body.ui .ui-page-body .btn-success { background: hsl(var(--success)) !important; }
body.ui .ui-page-body .btn-warning { background: hsl(var(--warning)) !important; }
body.ui .ui-page-body .btn-info, body.ui .ui-page-body [name=clear], body.ui .ui-page-body [name=reset], body.ui .ui-page-body .btn-secondary,
body.ui .ui-page-body .btn-default, body.ui .ui-page-body input[type=reset] {
  background: hsl(var(--background)) !important; color: hsl(var(--foreground)) !important; border-color: hsl(var(--input)) !important;
}
body.ui .ui-page-body .btn-link {
  background: transparent !important; color: hsl(var(--primary)) !important; box-shadow: none !important; border-color: transparent !important; padding: 0 8px !important;
}
body.ui .ui-page-body .btn-sm, body.ui .ui-page-body .btn-xs { min-height: 30px; padding: 0 10px !important; font-size: 13px !important; }
body.ui .ui-page-body input[type=image] { border: 0 !important; box-shadow: none !important; width: auto; }

/* tables */
body.ui .ui-page-body table { border-collapse: collapse; }
body.ui .ui-page-body .table, body.ui .ui-page-body .tabledesign, body.ui .ui-page-body .oe_list_content, body.ui .ui-page-body table.dataTable,
body.ui .ui-page-body table[border="1"], body.ui .ui-page-body #grp, body.ui .ui-page-body .table-bordered {
  width: 100%; margin-bottom: 12px; background: hsl(var(--background)) !important;
  border: 1px solid hsl(var(--border)) !important; border-radius: var(--radius); font-size: 13.5px;
}
body.ui .ui-page-body .table th, body.ui .ui-page-body .table td, body.ui .ui-page-body .tabledesign th, body.ui .ui-page-body .tabledesign td,
body.ui .ui-page-body .oe_list_content th, body.ui .ui-page-body .oe_list_content td, body.ui .ui-page-body table.dataTable th,
body.ui .ui-page-body table.dataTable td, body.ui .ui-page-body table[border="1"] th, body.ui .ui-page-body table[border="1"] td,
body.ui .ui-page-body #grp th, body.ui .ui-page-body #grp td, body.ui .ui-page-body .table-bordered th, body.ui .ui-page-body .table-bordered td {
  padding: 9px 12px !important; border: 0 !important; border-bottom: 1px solid hsl(var(--border)) !important;
  vertical-align: middle; color: hsl(var(--foreground)); background-color: transparent;
}
body.ui .ui-page-body .table thead th, body.ui .ui-page-body .tabledesign th, body.ui .ui-page-body .oe_list_content th,
body.ui .ui-page-body table.dataTable thead th, body.ui .ui-page-body table[border="1"] th, body.ui .ui-page-body #grp th,
body.ui .ui-page-body .table-bordered th, body.ui .ui-page-body .oe_list_header_columns th, body.ui .ui-page-body .oe_list_header_columns td {
  background: hsl(var(--muted) / 0.6) !important; color: hsl(var(--muted-foreground)) !important;
  font-weight: 500 !important; font-size: 12.5px !important; text-align: left; white-space: nowrap;
}
body.ui .ui-page-body .table tbody tr:hover td, body.ui .ui-page-body .tabledesign tr:hover td, body.ui .ui-page-body .oe_list_content tr:hover td,
body.ui .ui-page-body table.dataTable tbody tr:hover td, body.ui .ui-page-body #grp tr:hover td { background: hsl(var(--muted) / 0.5) !important; }
body.ui .ui-page-body .table-striped tbody tr:nth-of-type(odd), body.ui .ui-page-body tr.alt td { background: hsl(var(--muted) / 0.3) !important; }
body.ui .ui-page-body .dataTables_wrapper { font-size: 13.5px; }
body.ui .ui-page-body .dataTables_wrapper .dataTables_filter input { margin-left: 8px; }
body.ui .ui-page-body .dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--radius) !important; border: 1px solid hsl(var(--border)) !important; background: hsl(var(--background)) !important; margin-left: 4px; padding: 4px 10px !important;
}
body.ui .ui-page-body .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: hsl(var(--primary)) !important; color: hsl(var(--primary-foreground)) !important; border-color: hsl(var(--primary)) !important;
}

/* Material Dashboard cards -> shadcn cards */
body.ui .ui-page-body .card {
  background: hsl(var(--card)) !important; border: 1px solid hsl(var(--border)) !important;
  border-radius: calc(var(--radius) + 4px) !important; box-shadow: var(--shadow-sm) !important; margin: 10px 0 18px;
}
body.ui .ui-page-body .card .card-header { background: transparent !important; box-shadow: none !important; border: 0 !important; }
body.ui .ui-page-body .card [class*=card-header-] { color: hsl(var(--foreground)) !important; }
body.ui .ui-page-body .card .card-header .card-icon {
  float: left; margin: 0 14px 0 0 !important; padding: 0 !important; width: 44px; height: 44px; border-radius: 10px !important;
  display: flex; align-items: center; justify-content: center; box-shadow: none !important;
  background: hsl(var(--primary) / 0.1) !important; color: hsl(var(--primary)) !important;
}
body.ui .ui-page-body .card .card-header .card-icon i { font-size: 20px !important; line-height: 1 !important; width: auto !important; height: auto !important; margin: 0 !important; color: inherit !important; }
body.ui .ui-page-body .card .card-header-success .card-icon, body.ui .ui-page-body .card-header-success.card-header .card-icon { background: hsl(var(--success) / 0.12) !important; color: hsl(var(--success)) !important; }
body.ui .ui-page-body .card .card-header-danger .card-icon, body.ui .ui-page-body .card-header-danger.card-header .card-icon { background: hsl(var(--brand-red) / 0.10) !important; color: hsl(var(--brand-red)) !important; }
body.ui .ui-page-body .card .card-header-warning .card-icon, body.ui .ui-page-body .card-header-warning.card-header .card-icon { background: hsl(var(--brand-gold) / 0.16) !important; color: hsl(31 85% 40%) !important; }
body.ui .ui-page-body .card .card-header-info .card-icon, body.ui .ui-page-body .card-header-info.card-header .card-icon { background: hsl(var(--brand-blue) / 0.10) !important; color: hsl(var(--brand-blue)) !important; }
body.ui .ui-page-body .card .card-header-rose .card-icon, body.ui .ui-page-body .card-header-rose.card-header .card-icon,
body.ui .ui-page-body .card .card-header-primary .card-icon, body.ui .ui-page-body .card-header-primary.card-header .card-icon { background: hsl(var(--brand-navy) / 0.08) !important; color: hsl(var(--brand-navy)) !important; }
/* coloured full-width card headers (e.g. "Todays Import Entry" boxes) */
body.ui .ui-page-body .card .card-header[class*=card-header-]:not(.card-header-icon) {
  background: transparent !important; padding: 18px 18px 6px !important; margin: 0 !important; border-radius: 0 !important;
}
body.ui .ui-page-body .card .card-header[class*=card-header-]:not(.card-header-icon) * { color: hsl(var(--foreground)) !important; }
body.ui .ui-page-body .card .card-category, body.ui .ui-page-body .card .card-header p {
  color: hsl(var(--muted-foreground)) !important; font-size: 13px !important; font-weight: 500 !important; margin: 2px 0 0 !important; text-transform: none !important;
}
body.ui .ui-page-body .card .card-title { color: hsl(var(--foreground)) !important; font-size: 24px !important; font-weight: 600 !important; margin: 4px 0 0 !important; letter-spacing: -0.01em; }
body.ui .ui-page-body .card .card-footer { border-top: 1px solid hsl(var(--border)) !important; margin: 12px 0 0 !important; padding: 10px 18px !important; }
body.ui .ui-page-body .card .card-footer, body.ui .ui-page-body .card .card-footer .stats, body.ui .ui-page-body .card .card-footer .stats * {
  color: hsl(var(--muted-foreground)) !important; font-size: 12.5px !important;
}
body.ui .ui-page-body .card-chart .card-header { padding: 14px !important; }
body.ui .ui-page-body .card-chart .card-header[class*=card-header-] { background: hsl(var(--muted) / 0.5) !important; border-radius: var(--radius) !important; margin: 12px !important; }

/* OpenERP-style forms and sheets */
body.ui .ui-page-body .oe_form_sheetbg, body.ui .ui-page-body .oe_view_manager_body { background: transparent !important; }
body.ui .ui-page-body .oe_form_sheet {
  background: hsl(var(--card)) !important; border: 1px solid hsl(var(--border)) !important; border-radius: calc(var(--radius) + 4px) !important;
  box-shadow: none !important; padding: 18px !important; max-width: 100% !important; min-height: 0 !important;
}
body.ui .ui-page-body .oe_form_group_cell_label, body.ui .ui-page-body .oe_form_group_cell_label label { color: hsl(var(--foreground)) !important; font-weight: 500; }
body.ui .ui-page-body .oe_form_group_cell, body.ui .ui-page-body .oe_form_group_cell_label { padding: 6px 8px !important; }
body.ui .ui-page-body .oe_view_manager_header { background: transparent !important; border: 0 !important; }
body.ui .ui-page-body .oe_view_manager_header h2, body.ui .ui-page-body .oe_view_title { font-size: 18px !important; font-weight: 600 !important; }
body.ui .ui-page-body .oe_form_required input, body.ui .ui-page-body .required { border-left: 3px solid hsl(var(--primary) / 0.6) !important; }

/* coloured section bars used as form titles (e.g. Import Entry, Employee Information) */
body.ui .ui-page-body [style*="background-color: #337ab7"], body.ui .ui-page-body [style*="background:#337ab7"],
body.ui .ui-page-body [style*="background-color:#337ab7"], body.ui .ui-page-body .box_title, body.ui .ui-page-body .panel-heading,
body.ui .ui-page-body .title1 {
  background: hsl(var(--muted) / 0.7) !important; color: hsl(var(--foreground)) !important; border-radius: var(--radius) !important;
  border: 1px solid hsl(var(--border)) !important; font-weight: 600 !important; text-shadow: none !important;
}
body.ui .ui-page-body .panel { border: 1px solid hsl(var(--border)) !important; border-radius: calc(var(--radius) + 4px) !important; box-shadow: none !important; }

/* misc legacy bits */
body.ui .ui-page-body hr { border: 0; border-top: 1px solid hsl(var(--border)); }
body.ui .ui-page-body .alert { border-radius: var(--radius) !important; border: 1px solid hsl(var(--border)) !important; box-shadow: none !important; }
body.ui .ui-page-body .alert-success { background: hsl(var(--success) / 0.08) !important; color: hsl(var(--success)) !important; border-color: hsl(var(--success) / 0.3) !important; }
body.ui .ui-page-body .alert-danger { background: hsl(var(--destructive) / 0.06) !important; color: hsl(var(--destructive)) !important; border-color: hsl(var(--destructive) / 0.3) !important; }
body.ui .ui-page-body .nav-tabs { border-bottom: 1px solid hsl(var(--border)) !important; }
body.ui .ui-page-body .nav-tabs .nav-link { border-radius: var(--radius) var(--radius) 0 0 !important; color: hsl(var(--muted-foreground)) !important; }
body.ui .ui-page-body .nav-tabs .nav-link.active { color: hsl(var(--foreground)) !important; border-color: hsl(var(--border)) hsl(var(--border)) hsl(var(--background)) !important; }
body.ui .ui-datepicker { font-family: var(--font-sans) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow-lg) !important; border: 1px solid hsl(var(--border)) !important; padding: 6px !important; }
body.ui .ui-datepicker .ui-datepicker-header { background: transparent !important; border: 0 !important; }
body.ui .ui-datepicker td a { border-radius: 6px !important; text-align: center !important; }
body.ui .ui-state-active, body.ui .ui-datepicker td a.ui-state-active { background: hsl(var(--primary)) !important; color: #fff !important; border-color: transparent !important; }
body.ui .ui-autocomplete { border-radius: var(--radius) !important; box-shadow: var(--shadow-lg) !important; border: 1px solid hsl(var(--border)) !important; font-family: var(--font-sans) !important; }

/* forms laid out as Bootstrap rows of label/field columns (Import Entry and many others) */
body.ui .ui-page-body [style*="background-color:lavender"], body.ui .ui-page-body [style*="background-color: lavender"],
body.ui .ui-page-body [style*="background:lavender"], body.ui .ui-page-body [style*="background-color:#E6E6FA"] { background: transparent !important; }
body.ui .ui-page-body form .container, body.ui .ui-page-body .form-container_large .container { max-width: 100% !important; padding-left: 0; padding-right: 0; }
body.ui .ui-page-body form .row > [class*="col-sm-"] { display: flex; align-items: center; min-height: 52px; }
body.ui .ui-page-body form .row > [class*="col-sm-"] > .form-group { width: 100%; margin: 0 !important; }
body.ui .ui-page-body form .row > [class*="col-sm-"] label { margin: 0 !important; font-weight: 500 !important; color: hsl(var(--foreground)) !important; }
body.ui .ui-page-body form .row > [class*="col-sm-"] .formcntrl,
body.ui .ui-page-body form .row > [class*="col-sm-"] select { width: 100% !important; }
body.ui .ui-page-body form .row > [class*="col-sm-"] .form-group:has(> input[type=radio]),
body.ui .ui-page-body form .row > [class*="col-sm-"] .form-group:has(> label > input[type=radio]) { display: flex; align-items: center; gap: 8px; }
body.ui .ui-page-body #message:empty { display: none; }
body.ui .ui-page-body #message:not(:empty) {
  margin-bottom: 14px; padding: 10px 14px !important; border-radius: var(--radius); font-size: 14px !important; text-align: left !important;
  background: hsl(var(--success) / 0.08) !important; color: hsl(var(--success)) !important; border: 1px solid hsl(var(--success) / 0.3);
}
body.ui .ui-page-body .ui-dup-title { display: none !important; }

/* hide the old shell pieces if a page still prints them */
body.ui .main_content > .navbar.navbar-transparent, body.ui #clock, body.ui .fixed-plugin { display: none !important; }

/* ----------------------------------------------------- 8. RESPONSIVE + PRINT */
@media (max-width: 1023px) {
  body.ui .app-sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.ui.sidebar-open .app-sidebar { transform: none; }
  body.ui.sidebar-open .ui-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1035; background: rgb(0 0 0 / 0.35); }
  body.ui .app-main { margin-left: 0; }
  body.ui .app-header .ui-sidebar-toggle { display: inline-flex; }
  body.ui .ui-header-date, body.ui .ui-user-meta, body.ui .hide-sm { display: none; }
  body.ui .app-content { padding: 16px; }
  body.ui .ui-page-body { padding: 14px; }
}
@media (max-width: 640px) {
  body.ui .ui-page-title { font-size: 19px !important; }
  body.ui .ui-page-body td, body.ui .ui-page-body th { white-space: normal; }
  body.ui .ui-page-body input, body.ui .ui-page-body select, body.ui .ui-page-body textarea { width: 100% !important; }
  body.ui .ui-page-body input[type=radio], body.ui .ui-page-body input[type=checkbox], body.ui .ui-page-body input[type=image] { width: 16px !important; }
  body.ui .ui-page-body input[type=submit], body.ui .ui-page-body input[type=button], body.ui .ui-page-body button { width: auto !important; }
  body.ui-login { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-mobile-logo { display: block; }
  .chooser-wrap { padding: 22px 16px 40px; }
  .chooser-top { padding: 0 16px; }
  .site-top-inner { padding: 10px 16px; gap: 10px; }
  .site-logo img { height: 40px; }
  .site-seal { height: 40px; width: 40px; }
  .site-banner { padding: 0 16px; margin-top: 14px; }
  .site-banner figure { border-radius: 12px; }
  .site-banner img { aspect-ratio: auto; height: 120px; }   /* crop the photo from the right, keep the red title strip */
  .dept-head { margin-top: 24px; gap: 12px; }
  .dept-head h1 { font-size: 21px; }
  .dept-tools .chooser-search { width: 100%; }
  .site-foot-inner { padding: 16px; justify-content: center; text-align: center; }
}
@media (min-width: 641px) and (max-width: 900px) {
  body.ui-login { grid-template-columns: 1fr 1fr; }
  .login-aside { padding: 28px; }
  .login-hero h1 { font-size: 28px; }
}
@media print {
  body.ui { background: #fff !important; }
  body.ui .app-sidebar, body.ui .app-header, body.ui .ui-page-actions, body.ui .ui-app-footer, body.ui .ui-sidebar-backdrop { display: none !important; }
  body.ui .app-main { margin: 0 !important; }
  body.ui .app-content { padding: 0 !important; }
  body.ui .ui-page-body { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
}

/* ---- polish (round 2) ---- */
body.ui .ui-breadcrumbs .sep { opacity: .45; padding: 0 2px; }
.module-card span { overflow-wrap: anywhere; }
body.ui .ui-page-body .ui-hidden-empty { display: none !important; }
body.ui .ui-page-body form .row > [class*="col-sm-"] input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]) { width: 100% !important; }
@media (max-width: 575px) {
  body.ui .ui-page-body form .row > [class*="col-sm-"] { min-height: 0; justify-content: flex-start; text-align: left; }
  body.ui .ui-page-body form .row > [class*="col-sm-"] .form-group { text-align: left !important; margin-bottom: 6px !important; }
  body.ui .ui-page-body form .row > [class*="col-sm-"] label { width: auto !important; text-align: left !important; float: none !important; }
  body.ui .ui-page-body form .row > [class*="col-sm-"]:has(label):not(:has(input)) { padding-top: 10px; }
  body.ui .ui-breadcrumbs > a, body.ui .ui-breadcrumbs > span:not(.current), body.ui .ui-breadcrumbs .sep { display: none; }
  body.ui .ui-app-header { gap: 8px; padding: 0 12px; }
}
/* date picker days: flat, like the shadcn calendar */
body.ui .ui-datepicker td a.ui-state-default { border: 0 !important; background: transparent !important; color: hsl(var(--foreground)) !important; padding: 6px 0 !important; font-weight: 400; }
body.ui .ui-datepicker td a.ui-state-default:hover { background: hsl(var(--accent)) !important; }
body.ui .ui-datepicker td a.ui-state-highlight { background: hsl(var(--accent)) !important; font-weight: 600; }
body.ui .ui-datepicker td a.ui-state-active { background: hsl(var(--primary)) !important; color: hsl(var(--primary-foreground)) !important; }
body.ui .ui-datepicker select { border: 1px solid hsl(var(--input)) !important; border-radius: 6px !important; padding: 2px 4px !important; font: 13px var(--font-sans) !important; }
body.ui .ui-datepicker th { color: hsl(var(--muted-foreground)) !important; font-weight: 500 !important; font-size: 12px !important; }

/* "Switch office" button in the start page header (links to the office portal, dn_portal) */
.site-switch { flex: none; gap: 6px; }
.site-switch .ui-icon { width: 16px; height: 16px; }
@media (max-width: 640px) { .site-switch span { display: none; } .site-switch { padding: 0 10px; } }
