/* ============================================================================
   APILOX PRO -- PIPEDRIVE-STYLE THEME   (with js/pd-nav.js)
   ----------------------------------------------------------------------------
   Loaded LAST on every page, just before </head>; remove the two lines
   (this stylesheet + js/pd-nav.js) to get the old look back.

   The values are Pipedrive's own design tokens ("Convention UI", as served
   by app.pipedrive.com): Inter 14/21, text #21232c, greens #2d8647/#077838,
   link blue #2d8647, 4px corners, 32px buttons/inputs/rows, their dividers,
   fills and elevation shadows. Only the navigation rail keeps Apilox's own
   dark green instead of Pipedrive's indigo (--pd-rail; set it to #211c52 for
   Pipedrive's). Icons are Phosphor Regular (MIT), the closest open set to
   Pipedrive's outlined icons; Pipedrive's own icons/logo are not used.

   Sections: tokens · base · navigation (desktop rail + panel, phone drawer)
   · top bar · surfaces · buttons · tabs & filters · tables · forms · menus,
   modals, tooltips, toasts · tags · pages.
   ============================================================================ */

@font-face{
  font-family: "Inter";
  font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../vendor/inter/inter-latin-wght-normal.woff2) format("woff2-variations"), url(../vendor/inter/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family: "Inter";
  font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../vendor/inter/inter-latin-ext-wght-normal.woff2) format("woff2-variations"), url(../vendor/inter/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ── TOKENS ─────────────────────────────────────────────────────────────── */
:root{
  /* Pipedrive Convention UI (light theme) */
  --pd-text: #21232c;
  --pd-text-2: #65686f;
  --pd-text-3: #93949a;
  --pd-icon: #21232c;
  --pd-icon-2: #65686f;
  --pd-icon-3: #93949a;
  --pd-divider: rgba(33,35,44,.12);
  --pd-divider-light: rgba(33,35,44,.08);
  --pd-divider-strong: rgba(33,35,44,.24);
  --pd-fill-xl: rgba(33,35,44,.05);
  --pd-fill-l: rgba(33,35,44,.08);
  --pd-fill-ml: rgba(33,35,44,.12);
  --pd-fill-m: rgba(33,35,44,.16);
  --pd-fill-solid: #ececed;
  --pd-fill-solid-m: #d7d7d9;
  --pd-bg: #f5f5f6;
  --pd-surface: #ffffff;
  --pd-surface-2: #f6f7f8;
  /* 2026-10-22 (the user's choice): buttons are BLACK (green tried and reverted the same day), blue links/text are green #2d8647, real light-blue fills are #e9fbe7 (grey selections/active containers stay grey), focused fields ring in #2d8647;
     real success colours stay in --pd-ok* (paid, done, money in) */
  --pd-green: #17181c;
  --pd-green-strong: #000000;
  --pd-green-xstrong: #000000;
  --pd-green-muted: #9fa3ab;
  --pd-green-bg: #e9eaec;
  --pd-green-bg-l: #f4f5f7;
  --pd-ok: #2d8647;
  --pd-ok-strong: #077838;
  --pd-ok-bg: #e9fbe7;
  --pd-blue: #2d8647;
  --pd-blue-strong: #2d8647;
  --pd-blue-xstrong: #24703a;
  /* "light blue" selections are grey in this theme (the user's choice, 2026-10-21): selected = grey + black text */
  --pd-blue-bg: #e9eaec;
  --pd-blue-bg-l: #f2f3f4;
  --pd-blue-bg-s: #d7d8db;
  --pd-sel-text: #21232c;
  --pd-red: #d83c38;
  --pd-red-strong: #c82627;
  --pd-red-bg: #fde7e4;
  --pd-red-bg-l: #fef2f0;
  --pd-warn: #a76800;
  --pd-warn-icon: #e69b00;
  --pd-warn-bg: #ffedac;
  --pd-warn-bg-l: #fff6d6;
  --pd-purple: #6962f2;
  --pd-purple-bg: #eeeafb;
  --pd-backdrop: rgba(33,35,44,.48);
  --pd-r-xs: 2px;
  --pd-r-s: 4px;
  --pd-r-l: 8px;
  --pd-e-button: 0 1px 2px rgba(42,54,71,.05);
  --pd-e-topbar: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.06), 0 0 1px rgba(0,0,0,.05);
  --pd-e-raised: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.06), 0 0 1px rgba(0,0,0,.05);
  --pd-e-raised-hover: 0 0 4px rgba(0,0,0,.12), 0 3px 5px rgba(0,0,0,.08);
  --pd-e-floating: 0 1px 8px rgba(0,0,0,.1), 0 3px 3px rgba(0,0,0,.06), 0 3px 4px rgba(0,0,0,.05), 0 0 2px rgba(0,0,0,.16);
  --pd-e-overlay: 0 8px 10px rgba(0,0,0,.1), 0 6px 30px rgba(0,0,0,.06), 0 16px 24px rgba(0,0,0,.05), 0 0 2px rgba(0,0,0,.24);
  --pd-ease-in: cubic-bezier(0,0,.2,1);
  --pd-ease: cubic-bezier(.5,0,.2,1);
  --pd-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* navigation: black, the active item green (Pipedrive's rail is #211c52) */
  --pd-rail: #0d0e10;
  --pd-rail-hover: rgba(255,255,255,.09);
  --pd-rail-active: #2d8647;
  --pd-rail-icon: rgba(255,255,255,.82);
  --pd-rail-w: 56px;
  --pd-panel-w: 232px;

  /* the page tokens every PRO page already uses, re-pointed */
  --bg: var(--pd-bg);
  --card-bg: var(--pd-surface);
  --sidebar-bg: var(--pd-rail);
  --sidebar-active: var(--pd-rail-active);
  --border: var(--pd-divider);
  --placebo: #e3e3e5;
  --text-dark: var(--pd-text);
  --text-mid: var(--pd-text-2);
  --text-light: var(--pd-text-3);
  --tropical-forest: var(--pd-green);
  --forest-dark: var(--pd-green-xstrong);
  --forest-mid: var(--pd-green-strong);
  --sweet-mint-pesto: var(--pd-green-bg);
  --mint-soft: var(--pd-green-bg-l);
  --cumulus: var(--pd-green-bg-l);
  --blue: var(--pd-green);
  --blue-light: var(--pd-green-bg-l);
  --green: var(--pd-ok-strong);
  --green-bg: var(--pd-ok-bg);
  --red: var(--pd-red);
  --strawberry: var(--pd-red);
  --red-bg: var(--pd-red-bg-l);
  --amber: var(--pd-warn-icon);
  --amber-bg: var(--pd-warn-bg-l);
  --skyblue: var(--pd-blue);
  --skyblue-bg: var(--pd-blue-bg-l);
  --radius-lg: var(--pd-r-l);
  --radius-md: var(--pd-r-s);
  --radius-sm: var(--pd-r-s);
  --font-body: var(--pd-font);
}

/* ── BASE ───────────────────────────────────────────────────────────────── */
html, body{ font-size: 14px; }
body{
  font-family: var(--pd-font) !important; font-weight: 400; line-height: 1.5;
  background: var(--pd-bg) !important; color: var(--pd-text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea{ font-family: var(--pd-font) !important; }
b, strong{ font-weight: 600; }
h1, h2, h3, h4{ letter-spacing: 0 !important; color: var(--pd-text); }
::selection{ background: var(--pd-blue-bg-s); }
:focus-visible{ outline: 2px solid var(--pd-blue); outline-offset: 1px; }
*::-webkit-scrollbar{ width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb{ background: rgba(33,35,44,.2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover{ background-color: rgba(33,35,44,.36); }
*::-webkit-scrollbar-track{ background: transparent; }

/* ── NAVIGATION ─────────────────────────────────────────────────────────── */
/* the same PNG icons as the Apilox Flutter app drawer (apps/apilox/assets/pro), painted in the text colour */
.sidebar .nav-icon{
  background: none !important; width: 24px !important; height: 24px !important;
  display: inline-flex !important; align-items: center; justify-content: center; opacity: 1 !important;
}
.sidebar .nav-icon::before{ font-family: "Phosphor" !important; font-size: 22px; line-height: 1; color: currentColor; font-weight: normal; }
.sidebar .nav-icon-dashboard{ -webkit-mask: url("../images/dashboard.png") center / 22px 22px no-repeat !important; mask: url("../images/dashboard.png") center / 22px 22px no-repeat !important; background: currentColor !important; }
.sidebar .nav-icon-business{ -webkit-mask: url("../images/business.png") center / 22px 22px no-repeat !important; mask: url("../images/business.png") center / 22px 22px no-repeat !important; background: currentColor !important; }
.sidebar .nav-icon-stock{ -webkit-mask: url("../images/stock.png") center / 22px 22px no-repeat !important; mask: url("../images/stock.png") center / 22px 22px no-repeat !important; background: currentColor !important; }
.sidebar .nav-icon-rx-review{ -webkit-mask: url("../images/Rx Review.png") center / 22px 22px no-repeat !important; mask: url("../images/Rx Review.png") center / 22px 22px no-repeat !important; background: currentColor !important; }
.sidebar .nav-icon-finance{ -webkit-mask: url("../images/finance.png") center / 22px 22px no-repeat !important; mask: url("../images/finance.png") center / 22px 22px no-repeat !important; background: currentColor !important; }
.sidebar .nav-icon-management{ -webkit-mask: url("../images/management.png") center / 22px 22px no-repeat !important; mask: url("../images/management.png") center / 22px 22px no-repeat !important; background: currentColor !important; }
.sidebar .nav-icon-messages{ -webkit-mask: url("../images/messages.png") center / 22px 22px no-repeat !important; mask: url("../images/messages.png") center / 22px 22px no-repeat !important; background: currentColor !important; }
.sidebar .nav-icon-notifications{ -webkit-mask: url("../images/notification.png") center / 22px 22px no-repeat !important; mask: url("../images/notification.png") center / 22px 22px no-repeat !important; background: currentColor !important; }
.sidebar .nav-icon-settings{ -webkit-mask: url("../images/setting.png") center / 22px 22px no-repeat !important; mask: url("../images/setting.png") center / 22px 22px no-repeat !important; background: currentColor !important; }

/* desktop: the sidebar (expanded with names, or collapsed to an icon rail) + the section panel */
.nav-icon-activities::before{ content: "\e712"; }       /* calendar-check */
.nav-icon-register::before{ content: "\e320"; }         /* medal -- community catalogue (Register) */
@media (min-width: 1025px){
  :root{ --pd-nav-w: 216px; }
  html.pd-collapsed{ --pd-nav-w: var(--pd-rail-w); }
  .sidebar{
    width: var(--pd-nav-w) !important; min-width: var(--pd-nav-w) !important; flex: none !important;
    padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
    background: var(--pd-rail) !important; position: relative !important; overflow: visible !important;
    display: flex !important; flex-direction: column !important; align-items: stretch;
    height: 100vh !important; top: 0; align-self: stretch !important; transition: width .28s var(--pd-ease), min-width .28s var(--pd-ease);
  }
  .sidebar.pd-has-panel{
    width: calc(var(--pd-nav-w) + var(--pd-panel-w)) !important; min-width: calc(var(--pd-nav-w) + var(--pd-panel-w)) !important;
    background: linear-gradient(90deg, var(--pd-rail) var(--pd-nav-w), var(--pd-surface-2) var(--pd-nav-w)) !important;
    box-shadow: inset -1px 0 0 var(--pd-divider) !important;
  }
  .sidebar .fold-btn, .sidebar .sidebar-close, .sidebar .promo{ display: none !important; }
  .sidebar .logo{
    width: var(--pd-nav-w) !important; height: auto !important; min-height: 0 !important; padding: 18px 16px 14px !important; margin: 0 0 6px !important;
    display: flex !important; align-items: center; justify-content: center;
  }
  /* the Apilox logo with its tagline ("Your neighborhood local"), as wide as the menu */
  .sidebar .logo img{ content: url(../images/logo-tagline-white.png); width: 100% !important; max-width: 184px; height: auto !important; object-fit: contain; }
  html.pd-collapsed .sidebar .logo{ padding: 0 !important; height: 56px !important; justify-content: center; }
  /* collapsed rail: Brad, the Apilox cat, instead of the wordmark */
  html.pd-collapsed .sidebar .logo img{ content: url(../images/brad-96.png); width: 40px !important; height: 40px !important; border-radius: 50%; background: #fff3e0; object-fit: contain; margin: 0 !important; transform: none !important; position: static !important; }
  html.pd-collapsed .sidebar .logo{ display: flex !important; align-items: center !important; justify-content: center !important; height: 64px !important; min-height: 64px !important; overflow: visible !important; }

  .sidebar .nav{
    width: var(--pd-nav-w) !important; padding: 0 8px !important; margin: 0 !important;
    display: flex !important; flex-direction: column; gap: 2px !important; overflow: visible !important;
  }
  .sidebar .nav > li{ position: static !important; margin: 0 !important; padding: 0 !important; background: none !important; border-radius: 0 !important; display: block !important; }
  .sidebar .nav > li > a,
  .sidebar .nav > li > .nav-group-toggle{
    width: 100% !important; height: 40px !important; min-height: 0 !important; padding: 0 10px !important; margin: 0 !important;
    display: flex !important; align-items: center !important; justify-content: flex-start !important; gap: 12px; position: relative;
    border-radius: var(--pd-r-l) !important; border: 0 !important; box-shadow: none !important; background: transparent !important;
    color: var(--pd-rail-icon) !important; cursor: pointer; font-size: 14px !important; font-weight: 500 !important; text-decoration: none !important;
    white-space: nowrap; overflow: hidden;
  }
  .sidebar .nav > li > a .icon-label,
  .sidebar .nav > li > .nav-group-toggle .icon-label{ gap: 12px !important; display: flex; align-items: center; flex: 1; min-width: 0; }
  .sidebar .nav > li .label{ display: inline !important; color: inherit !important; overflow: hidden; text-overflow: ellipsis; }
  .sidebar .nav > li .nav-group-chevron{ display: none !important; }
  .sidebar .nav > li > a:hover,
  .sidebar .nav > li > .nav-group-toggle:hover,
  .sidebar .nav > li.pd-fly > .nav-group-toggle{ background: var(--pd-rail-hover) !important; color: #fff !important; }
  .sidebar .nav > li.active > a,
  .sidebar .nav > li.pd-current > .nav-group-toggle{ background: var(--pd-rail-active) !important; color: #fff !important; font-weight: 600 !important; }
  .sidebar .nav > li > a::before{ display: none !important; }
  /* counts: on the right of the row; a bubble on the icon when collapsed */
  .sidebar .nav > li > a .apilox-orders-badge, .sidebar .nav > li > a [class*="badge"], .sidebar .nav > li > a .count,
  .sidebar .nav > li > .nav-group-toggle [class*="badge"], .sidebar .nav > li > .nav-group-toggle .count{
    position: static !important; margin: 0 0 0 auto !important; flex: none;
    min-width: 18px; height: 18px; padding: 0 5px !important; border-radius: 9px !important;
    font-size: 11px !important; line-height: 18px !important; font-weight: 600 !important; text-align: center;
    background: var(--pd-blue) !important; color: #fff !important; box-shadow: none !important;
  }
  html.pd-collapsed .sidebar .nav > li > a,
  html.pd-collapsed .sidebar .nav > li > .nav-group-toggle{ width: 40px !important; padding: 0 !important; justify-content: center !important; }
  html.pd-collapsed .sidebar .nav > li > a .icon-label,
  html.pd-collapsed .sidebar .nav > li > .nav-group-toggle .icon-label{ flex: none; justify-content: center; }
  html.pd-collapsed .sidebar .nav > li .label{ display: none !important; }
  html.pd-collapsed .sidebar .nav > li > a .apilox-orders-badge, html.pd-collapsed .sidebar .nav > li > a [class*="badge"], html.pd-collapsed .sidebar .nav > li > a .count{
    position: absolute !important; top: 2px !important; right: 0 !important; min-width: 16px; height: 16px; line-height: 16px !important; font-size: 10px !important;
    padding: 0 4px !important; box-shadow: 0 0 0 2px var(--pd-rail) !important; background: var(--pd-red) !important;
  }

  /* the current section's pages, in the panel next to the sidebar */
  .sidebar .nav-group-children{ display: none !important; }
  .sidebar .nav > li.pd-current > .nav-group-children{
    display: flex !important; flex-direction: column; gap: 2px;
    position: absolute !important; left: var(--pd-nav-w); top: 0; bottom: 0; width: var(--pd-panel-w);
    margin: 0 !important; padding: 64px 8px 12px !important; border: 0 !important; background: transparent !important;
    max-height: none !important; overflow-y: auto; opacity: 1 !important; visibility: visible !important; transform: none !important;
    transition: left .28s var(--pd-ease);
  }
  .sidebar .nav > li.pd-current > .nav-group-children::before{
    content: attr(data-pd-title); position: absolute; left: 20px; top: 18px;
    font-size: 16px; line-height: 24px; font-weight: 600; color: var(--pd-text);
  }
  /* another section's pages, floating next to the sidebar while hovered */
  .sidebar .nav > li.pd-fly > .nav-group-children{
    display: flex !important; flex-direction: column; gap: 2px;
    position: fixed !important; z-index: 2000; width: 224px;
    margin: 0 !important; padding: 8px !important; border: 0 !important; border-radius: var(--pd-r-l) !important;
    background: var(--pd-surface) !important; box-shadow: var(--pd-e-floating) !important;
    max-height: none !important; opacity: 1 !important; visibility: visible !important; transform: none !important;
    animation: pdFly .16s var(--pd-ease-in);
  }
  @keyframes pdFly{ from{ opacity: 0; transform: translateX(-4px); } to{ opacity: 1; transform: none; } }
  .sidebar .nav > li.pd-fly > .nav-group-children::before{
    content: attr(data-pd-title); display: block; padding: 6px 12px 8px;
    font-size: 12px; line-height: 18px; font-weight: 600; color: var(--pd-text-3); text-transform: uppercase; letter-spacing: .02em;
  }
  .sidebar .nav-group-children > li{ margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; display: block !important; }
  .sidebar .nav-group-children > li::before, .sidebar .nav-group-children > li > a::before{ display: none !important; }
  .sidebar .nav-group-children > li > a{
    display: flex !important; align-items: center; gap: 10px; height: 36px; padding: 0 10px !important; margin: 0 !important; width: auto !important;
    border-radius: var(--pd-r-l) !important; border: 0 !important; box-shadow: none !important; background: transparent !important;
    color: var(--pd-text) !important; font-size: 14px !important; font-weight: 450 !important; text-decoration: none !important;
  }
  .sidebar .nav-group-children .pd-kid-ico{ font-size: 18px; color: var(--pd-icon-2); flex: none; }
  .sidebar .nav-group-children > li > a:hover{ background: var(--pd-fill-l) !important; }
  .sidebar .nav-group-children > li.pd-active > a,
  .sidebar .nav-group-children > li > a.pd-active{ background: var(--pd-blue-bg) !important; color: var(--pd-sel-text) !important; font-weight: 600 !important; }
  .sidebar .nav-group-children > li.pd-active .pd-kid-ico{ color: var(--pd-sel-text); }
  .sidebar .nav-group-children [class*="badge"]{ position: static !important; margin-left: auto !important; box-shadow: none !important; }

  /* the pharmacy switcher at the bottom */
  .sidebar .pharmacy-switcher{
    width: var(--pd-nav-w) !important; margin: auto 0 0 !important; padding: 8px !important;
    border: 0 !important; border-top: 1px solid rgba(255,255,255,.1) !important; background: transparent !important; position: relative;
  }
  .sidebar .ps-current{
    width: 100% !important; height: 48px !important; padding: 0 8px !important; margin: 0 !important; border: 0 !important;
    display: flex !important; align-items: center; gap: 10px; border-radius: var(--pd-r-l) !important;
    background: transparent !important; box-shadow: none !important; text-align: left;
  }
  .sidebar .ps-current:hover{ background: var(--pd-rail-hover) !important; }
  .sidebar .ps-info{ display: block !important; min-width: 0; flex: 1; }
  .sidebar .ps-name{ color: #fff !important; font-size: 13px !important; font-weight: 600 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar .ps-sub{ color: rgba(255,255,255,.55) !important; font-size: 12px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar .ps-chev{ color: rgba(255,255,255,.55) !important; }
  html.pd-collapsed .sidebar .ps-info, html.pd-collapsed .sidebar .ps-chev{ display: none !important; }
  html.pd-collapsed .sidebar .ps-current{ width: 40px !important; height: 40px !important; padding: 0 !important; justify-content: center; }
  .sidebar .ps-logo{
    width: 32px !important; height: 32px !important; flex: none; border-radius: 50% !important; font-size: 12px !important; font-weight: 600 !important;
    background: #4fbd6c !important; color: #0b2a16 !important; box-shadow: 0 0 0 2px rgba(255,255,255,.18);
  }
  .sidebar .ps-dropdown{
    position: fixed !important; left: calc(var(--pd-nav-w) + 8px) !important; bottom: 12px !important; top: auto !important; right: auto !important;
    width: 280px !important; z-index: 2000;
  }
}

/* the rail tooltip (js/pd-nav.js) */
.pd-tip{
  position: fixed; z-index: 3000; pointer-events: none; transform: translateY(-50%);
  background: var(--pd-text); color: #fff; font: 450 12px/18px var(--pd-font); padding: 4px 8px; border-radius: var(--pd-r-s);
  white-space: nowrap; opacity: 0; transition: opacity .12s;
}
.pd-tip.is-on{ opacity: 1; }

/* phones and tablets: the slide-in drawer, Pipedrive colours */
@media (max-width: 1024px){
  .sidebar{ background: var(--pd-rail) !important; border: 0 !important; }
  .sidebar .logo img{ content: url(../images/logo-tagline-white.png); height: auto !important; width: 180px !important; max-width: 70%; }
  .sidebar .sidebar-close{ background: rgba(255,255,255,.1) !important; border-radius: 50% !important; }
  .sidebar .sidebar-close svg{ stroke: #fff !important; }
  .sidebar .fold-btn{ display: none !important; }
  .sidebar .nav{ padding: 4px 8px !important; gap: 2px !important; }
  .sidebar .nav > li{ margin: 0 !important; padding: 0 !important; background: none !important; border-radius: 0 !important; }
  .sidebar .nav > li > a, .sidebar .nav > li > .nav-group-toggle{
    width: 100% !important; margin: 0 !important; min-height: 40px; padding: 8px 12px !important; border-radius: var(--pd-r-s) !important;
    color: rgba(255,255,255,.86) !important; background: transparent !important; font-size: 14px !important; font-weight: 450 !important; border: 0 !important;
  }
  .sidebar .nav > li.active > a, .sidebar .nav > li.pd-current > .nav-group-toggle{ background: var(--pd-rail-active) !important; color: #fff !important; font-weight: 600 !important; }
  .sidebar .nav-group-children{ padding: 2px 0 6px 36px !important; border: 0 !important; background: none !important; }
  .sidebar .nav-group-children > li{ border: 0 !important; }
  .sidebar .nav-group-children > li::before{ display: none !important; }
  .sidebar .nav-group-children > li > a{ color: rgba(255,255,255,.7) !important; padding: 7px 12px !important; border-radius: var(--pd-r-s) !important; background: none !important; border: 0 !important; font-weight: 450 !important; }
  .sidebar .nav-group-children > li.pd-active > a{ color: #fff !important; background: rgba(255,255,255,.12) !important; font-weight: 600 !important; }
  .sidebar .nav-group-chevron{ color: rgba(255,255,255,.6) !important; }
  .sidebar .pharmacy-switcher{ background: transparent !important; border-top: 1px solid rgba(255,255,255,.12) !important; }
  .sidebar .ps-current{ background: transparent !important; color: #fff !important; }
  .sidebar .ps-name{ color: #fff !important; }
  .sidebar .ps-sub{ color: rgba(255,255,255,.6) !important; }
}

/* ── TOP BAR ────────────────────────────────────────────────────────────── */
.main{ background: var(--pd-bg) !important; padding: 0 !important; min-width: 0; }
.topbar{
  position: sticky; top: 0; z-index: 60;
  min-height: 56px !important; margin: 0 0 16px !important; padding: 8px 16px 8px 24px !important;
  background: var(--pd-surface) !important; border: 0 !important; border-radius: 0 !important; box-shadow: var(--pd-e-topbar) !important;
}
.topbar h1{ font-size: 16px !important; line-height: 24px !important; font-weight: 600 !important; color: var(--pd-text) !important; }
.topbar h1 .pd-crumb{ font-weight: 450; color: var(--pd-text-2); }
.topbar .sub, .topbar p{ font-size: 12px !important; line-height: 18px !important; color: var(--pd-text-2) !important; }
.topbar .icon-btn, .topbar .back-btn, .topbar .menu-btn{
  width: 32px !important; height: 32px !important; border-radius: 50% !important;
  background: transparent !important; border: 0 !important; box-shadow: none !important; color: var(--pd-icon-2);
}
.topbar .icon-btn svg, .topbar .back-btn svg, .topbar .menu-btn svg{ stroke: var(--pd-icon-2) !important; }
.topbar .icon-btn:hover, .topbar .back-btn:hover, .topbar .menu-btn:hover{ background: var(--pd-fill-l) !important; }
.topbar .avatar{ width: 32px !important; height: 32px !important; border-radius: 50% !important; background: var(--pd-purple) !important; color: #fff !important; font-size: 12px !important; font-weight: 600 !important; }
/* one row, always: the title shrinks (…), the search pill shrinks, the buttons never wrap */
.topbar{ display: flex !important; align-items: center !important; flex-wrap: nowrap !important; gap: 8px; }
.topbar .left{ flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap !important; }
.topbar .left > div{ min-width: 0; }
.topbar h1, .topbar .sub{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .right{ flex: none; display: flex; align-items: center; gap: 4px; flex-wrap: nowrap !important; }
/* "≡<" collapse, the centre search pill and "+" quick add, the "?" help button (js/pd-nav.js) */
.topbar .left{ min-width: 0; }
.pd-collapse{ width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--pd-icon-2); font-size: 20px; display: none; align-items: center; justify-content: center; margin-right: 4px; flex: none; }
.pd-collapse:hover{ background: var(--pd-fill-l); color: var(--pd-icon); }
@media (min-width: 1025px){ .pd-collapse{ display: inline-flex; } .topbar .menu-btn{ display: none !important; } }
.pd-top-center{ display: flex; align-items: center; gap: 8px; flex: 0 1 420px; min-width: 88px; margin: 0 8px; }
.pd-find{ flex: 1; min-width: 0; height: 40px; border: 1px solid var(--pd-divider-strong); border-radius: 20px; background: var(--pd-surface);
  display: flex; align-items: center; gap: 8px; padding: 0 12px 0 14px; color: var(--pd-text-3); font-size: 14px; cursor: text; text-align: left; }
.pd-find:hover{ border-color: rgba(33,35,44,.4); }
.pd-find i{ font-size: 20px; color: var(--pd-icon-2); }
.pd-find span{ flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-find kbd, .pd-quick-menu kbd, .pd-finder kbd, .pd-help-keys kbd{ font: 600 11px/16px var(--pd-font); color: var(--pd-text-2); background: #f0f0f1; border: 1px solid var(--pd-divider); border-radius: 4px; padding: 0 5px; }
.pd-quick{ position: relative; flex: none; }
.pd-plus{ width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--pd-divider-strong); background: var(--pd-surface); color: var(--pd-icon); font-size: 20px; display: inline-flex; align-items: center; justify-content: center; }
.pd-plus:hover{ background: #f5f5f6; }
.pd-plus.is-open{ border-color: #8e9197; box-shadow: none; }
.pd-plus.is-open i{ transform: rotate(45deg); }
.pd-plus i{ transition: transform .28s var(--pd-spring, cubic-bezier(.34,1.56,.64,1)); }
.pd-quick-menu{ position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: 248px; padding: 6px; z-index: 500;
  background: var(--pd-surface); border-radius: var(--pd-r-l); box-shadow: var(--pd-e-floating); display: none; }
.pd-quick.is-open .pd-quick-menu{ display: block; animation: pdDrop .16s var(--pd-ease-in); }
@keyframes pdDrop{ from{ opacity: 0; transform: translate(-50%, -4px); } to{ opacity: 1; transform: translate(-50%, 0); } }
.pd-quick-menu a{ display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 10px; border-radius: var(--pd-r-s); color: var(--pd-text); text-decoration: none; font-size: 14px; }
.pd-quick-menu a:hover{ background: var(--pd-fill-xl); }
.pd-quick-menu a i{ font-size: 18px; color: var(--pd-icon-2); }
.pd-quick-menu a span{ flex: 1; }
.pd-help-btn i{ font-size: 20px; color: var(--pd-icon-2); }
@media (max-width: 1024px){ .pd-find span, .pd-find kbd{ display: none; } .pd-find{ flex: none; width: 40px; padding: 0; justify-content: center; } .pd-top-center{ flex: none; margin: 0 4px; } }
@media (max-width: 600px){ .pd-top-center{ display: none; } }

/* the finder ("Search Apilox", or "/") */
.pd-finder-back{ position: fixed; inset: 0; z-index: 2500; background: rgba(33,35,44,.32); display: none; align-items: flex-start; justify-content: center; padding: 72px 16px; }
.pd-finder-back.is-open{ display: flex; }
.pd-finder{ width: 100%; max-width: 600px; background: var(--pd-surface); border-radius: var(--pd-r-l); box-shadow: var(--pd-e-overlay); overflow: hidden; animation: pdModalIn .22s var(--pd-ease-in); }
@keyframes pdModalIn{ from{ opacity: 0; transform: translateY(-8px) scale(.98); } to{ opacity: 1; transform: none; } }
.pd-finder-in{ display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--pd-divider); }
.pd-finder-in i{ font-size: 20px; color: var(--pd-icon-2); }
.pd-finder-in input{ flex: 1; border: 0 !important; box-shadow: none !important; height: 52px; font-size: 16px !important; background: transparent; }
.pd-finder-list{ max-height: 56vh; overflow: auto; padding: 6px; }
.pd-finder-list a{ display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px; border-radius: var(--pd-r-s); color: var(--pd-text); text-decoration: none; }
.pd-finder-list a i{ font-size: 18px; color: var(--pd-icon-2); }
.pd-finder-list a span{ flex: 1; }
.pd-finder-list a em{ font-style: normal; font-size: 12px; color: var(--pd-text-3); }
.pd-finder-list a.is-on, .pd-finder-list a:hover{ background: var(--pd-blue-bg-l); }
.pd-finder-list a.is-on i{ color: var(--pd-sel-text); }
.pd-finder-empty{ padding: 24px; text-align: center; color: var(--pd-text-3); }

/* the help drawer */
.pd-drawer{ position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 100vw; z-index: 2200; background: var(--pd-surface);
  box-shadow: var(--pd-e-overlay); transform: translateX(104%); transition: transform .3s var(--pd-ease); display: flex; flex-direction: column; }
.pd-drawer.is-open{ transform: none; }
.pd-drawer-head{ display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 12px 0 24px; border-bottom: 1px solid var(--pd-divider); }
.pd-drawer-head h3{ font-size: 16px; font-weight: 600; }
.pd-drawer-x{ width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.pd-drawer-x:hover{ background: var(--pd-fill-l); }
.pd-drawer-body{ padding: 16px 24px; overflow: auto; display: flex; flex-direction: column; }
.pd-help-card{ border: 1px solid var(--pd-divider); border-radius: var(--pd-r-l); padding: 16px; margin-bottom: 16px; }
.pd-help-card b{ font-size: 14px; } .pd-help-card p{ color: var(--pd-text-2); margin: 4px 0 12px; }
.pd-help-actions{ display: flex; gap: 8px; }
.pd-help-green, .pd-help-white{ height: 32px; padding: 0 12px; border-radius: var(--pd-r-s); display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; font-size: 14px; }
.pd-help-green{ background: var(--pd-green); color: #fff; } .pd-help-green:hover{ background: var(--pd-green-strong); }
.pd-help-white{ border: 1px solid var(--pd-divider-strong); color: var(--pd-text); } .pd-help-white:hover{ background: #f5f5f6; }
.pd-help-sec{ font-size: 12px; font-weight: 600; color: var(--pd-text-2); letter-spacing: .02em; margin: 16px 0 4px; }
.pd-help-link{ padding: 12px 0; border-bottom: 1px solid var(--pd-divider-light); color: var(--pd-text); text-decoration: none; }
.pd-help-link:hover{ color: var(--pd-blue-strong); }
.pd-help-keys{ display: flex; flex-direction: column; gap: 10px; color: var(--pd-text-2); font-size: 13px; padding-top: 6px; }

/* the main action ("New Sale" and its kin): Pipedrive's green "+ Deal" button */
.topbar .buy-sell, .topbar .new-sale{
  display: inline-flex !important; align-items: center; gap: 4px; text-decoration: none !important;
  height: 32px !important; padding: 0 12px 0 8px !important; border-radius: var(--pd-r-s) !important; border: 0 !important;
  background: var(--pd-green) !important; color: #fff !important; font-size: 14px !important; font-weight: 600 !important;
  box-shadow: var(--pd-e-button) !important; transition: background .15s;
}
.topbar .buy-sell::before, .topbar .new-sale::before{ content: "\e3d4"; font-family: "Phosphor"; font-size: 16px; font-weight: normal; }
.topbar .buy-sell:hover, .topbar .new-sale:hover{ background: var(--pd-green-strong) !important; }
.topbar .buy-sell:active, .topbar .new-sale:active{ background: var(--pd-green-xstrong) !important; }

/* ── SURFACES ───────────────────────────────────────────────────────────── */
.main > *:not(.topbar){ margin-left: 24px; margin-right: 24px; }
.dashboard-card, .card, .panel, .table-card, .list-card, .section-card, .kpi-row-outer, .stats-row, .summary-card{
  background: var(--pd-surface) !important; border: 0 !important; border-radius: var(--pd-r-l) !important; box-shadow: var(--pd-e-raised) !important;
}
.kpi-label{ color: var(--pd-text-2) !important; font-size: 12px !important; line-height: 18px !important; font-weight: 600 !important; text-transform: uppercase; letter-spacing: .02em !important; }
.kpi-value{ font-size: 25px !important; line-height: 38px !important; font-weight: 600 !important; letter-spacing: -.01em !important; color: var(--pd-text) !important; }
.kpi-sub{ color: var(--pd-text-2) !important; font-size: 12px !important; line-height: 18px !important; }
.kpi-delta{ border-radius: var(--pd-r-s) !important; font-weight: 600 !important; }
.panel-title, .section-title, .card-title{ font-size: 16px !important; line-height: 24px !important; font-weight: 600 !important; color: var(--pd-text) !important; }
.vline, .hline{ background: var(--pd-divider-light) !important; }

/* ── BUTTONS ────────────────────────────────────────────────────────────── */
/* primary: green */
.btn-primary, .primary-btn, .btn.primary, button.primary, a.primary, .apply-btn, .cash-report-btn, .new-ticket-btn, .edit-save-btn, .save-btn, .submit-btn, .confirm-btn,
.qm-add-btn, .receipt-done-btn, .reject-submit-btn, .msg-send-btn, .rxm-btn-approve, .draft-resume-btn, .btn-verify, .btn.btn-green{
  min-height: 32px; padding: 6px 12px !important; border-radius: var(--pd-r-s) !important; border: 0 !important;
  background: var(--pd-green) !important; color: #fff !important; font-size: 14px !important; line-height: 20px !important; font-weight: 600 !important;
  box-shadow: var(--pd-e-button) !important; transition: background .15s; text-decoration: none;
}
.btn-primary:hover, .primary-btn:hover, button.primary:hover, a.primary:hover, .apply-btn:hover, .edit-save-btn:hover, .save-btn:hover,
.submit-btn:hover, .confirm-btn:hover, .qm-add-btn:hover, .receipt-done-btn:hover, .reject-submit-btn:hover, .msg-send-btn:hover,
.rxm-btn-approve:hover, .draft-resume-btn:hover, .btn-verify:hover{ background: var(--pd-green-strong) !important; opacity: 1 !important; }
.btn-primary:active, .primary-btn:active, button.primary:active, .apply-btn:active{ background: var(--pd-green-xstrong) !important; }
/* secondary: white with a grey border */
.btn-outline, .ghost-btn, .btn.secondary, button.secondary, .secondary-btn, .see-details-btn, .edit-cancel-btn, .cancel-btn, .qm-cancel-btn, .od-cancel-btn,
.reject-cancel-btn, .draft-discard-btn, .ap-back-btn, .report-btn, .add-row-btn, .act-btn, .contact-btn, .btn:not(.primary):not(.btn-primary):not(.btn-green){
  min-height: 32px; padding: 6px 12px !important; border-radius: var(--pd-r-s) !important;
  background: var(--pd-surface) !important; color: var(--pd-text) !important; border: 1px solid var(--pd-divider-strong) !important;
  font-size: 14px !important; line-height: 18px !important; font-weight: 600 !important; box-shadow: var(--pd-e-button) !important; text-decoration: none;
}
.btn-outline:hover, .ghost-btn:hover, .btn.secondary:hover, .see-details-btn:hover, .edit-cancel-btn:hover, .cancel-btn:hover, .qm-cancel-btn:hover, .od-cancel-btn:hover,
.reject-cancel-btn:hover, .draft-discard-btn:hover, .ap-back-btn:hover, .report-btn:hover, .add-row-btn:hover, .act-btn:hover, .contact-btn:hover,
.btn:not(.primary):not(.btn-primary):not(.btn-green):hover{ background: #f5f5f6 !important; opacity: 1 !important; }
/* danger */
.btn.danger, button.btn-danger, .btn-danger, .danger-btn, .delete-btn, .rxm-btn-reject{ border-radius: var(--pd-r-s) !important; background: var(--pd-red) !important; color: #fff !important; border: 0 !important; font-weight: 600 !important; }
.btn.danger:hover, .btn-danger:hover, .danger-btn:hover, .delete-btn:hover{ background: var(--pd-red-strong) !important; }
button:disabled, .btn:disabled, [aria-disabled="true"]{ opacity: .48 !important; cursor: not-allowed !important; }
/* icon buttons on pages (export, print, row menus...): Pipedrive's square secondary buttons */
.export-btn, .print-btn, .row-menu-btn, .report-btn{
  width: auto !important; height: 32px !important; min-width: 32px; padding: 0 8px !important; gap: 6px; font-size: 14px !important; font-weight: 600 !important; border-radius: var(--pd-r-s) !important;
  display: inline-flex !important; align-items: center; justify-content: center;
  background: var(--pd-surface) !important; color: var(--pd-icon-2) !important; border: 1px solid var(--pd-divider-strong) !important; box-shadow: var(--pd-e-button) !important;
}
.export-btn svg, .print-btn svg, .row-menu-btn svg{ stroke: currentColor !important; }
.export-btn:hover, .print-btn:hover, .report-btn:hover{ background: #f5f5f6 !important; color: var(--pd-icon) !important; }
.row-menu-btn{ border-color: transparent !important; box-shadow: none !important; background: transparent !important; }
.row-menu-btn:hover{ background: var(--pd-fill-l) !important; }
/* selects / date pickers that are buttons */
.select-btn, .edit-select-btn, .date-btn, .date-display-btn, .cal-trigger-btn, .mdp-source-btn, .range-pill, .dropdown-btn, .rolesel-btn, .sel-btn{
  min-height: 32px; padding: 6px 10px !important; border-radius: var(--pd-r-s) !important;
  background: var(--pd-surface) !important; color: var(--pd-text) !important; border: 1px solid var(--pd-divider-strong) !important;
  font-size: 14px !important; font-weight: 450 !important; box-shadow: none !important;
}
.select-btn:hover, .edit-select-btn:hover, .date-btn:hover, .date-display-btn:hover, .cal-trigger-btn:hover, .range-pill:hover, .dropdown-btn:hover, .rolesel-btn:hover, .sel-btn:hover{ background: #f5f5f6 !important; }

/* ── TABS & FILTERS ─────────────────────────────────────────────────────── */
/* segmented filters (All / Retail / Wholesale ...): a bordered button group, the chosen one blue */
.tabs, .view-toggle, .seg, .segmented, .filter-tabs, .view-pills, .step-tabs, .mode-tabs, .ps-seg{
  display: inline-flex !important; gap: 0 !important; padding: 0 !important; background: var(--pd-surface) !important;
  border: 1px solid var(--pd-divider-strong) !important; border-radius: var(--pd-r-s) !important; box-shadow: var(--pd-e-button) !important; overflow: hidden;
}
.tabs .tab, .view-toggle > *, .view-pill, .range-tab, .mode-tab, .tf-mode-btn, .step-tab, .ps-seg > *{
  height: 30px; padding: 0 12px !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  background: transparent !important; color: var(--pd-text) !important; font-size: 14px !important; font-weight: 450 !important;
  display: inline-flex !important; align-items: center; gap: 6px;
}
.tabs .tab + .tab, .view-toggle > * + *, .view-pills > * + *, .step-tabs > * + *, .mode-tabs > * + *, .ps-seg > * + *{ border-left: 1px solid var(--pd-divider) !important; }
.tabs .tab:hover, .view-toggle > *:hover, .view-pill:hover, .mode-tab:hover, .step-tab:hover{ background: var(--pd-fill-xl) !important; }
.tabs .tab.active, .tabs .tab.is-active, .tabs .tab[aria-selected="true"], .view-pill.active, .view-pill.is-active,
.range-tab.active, .mode-tab.active, .view-toggle > .active, .view-toggle > .is-active, .tf-mode-btn.active, .step-tab.active, .ps-seg > .active{
  background: var(--pd-blue-bg) !important; color: var(--pd-sel-text) !important; font-weight: 600 !important;
}
/* page tabs (profile, steps): Pipedrive's underline tabs */
.profile-tab{
  border: 0 !important; border-radius: 0 !important; background: transparent !important; color: var(--pd-text-2) !important;
  font-weight: 600 !important; box-shadow: inset 0 -2px 0 transparent !important; padding: 8px 12px !important;
}
.profile-tab.active, .profile-tab.is-active{
  color: var(--pd-sel-text) !important; background: var(--pd-blue-bg-l) !important; box-shadow: inset 0 -2px 0 var(--pd-sel-text) !important;
}
/* filter chips */
.chip, .deal-filter-pill, .filter-chip, .msg-filter-chip{
  border-radius: 999px !important; border: 1px solid var(--pd-divider-strong) !important; background: var(--pd-surface) !important;
  color: var(--pd-text) !important; font-size: 13px !important; font-weight: 450 !important; box-shadow: none !important;
}
.chip.active, .deal-filter-pill.active, .filter-chip.active, .chip.is-active, .msg-filter-chip.active{
  background: var(--pd-blue-bg) !important; border-color: var(--pd-blue-bg-s) !important; color: var(--pd-sel-text) !important; font-weight: 600 !important;
}

/* ── TABLES ─────────────────────────────────────────────────────────────── */
table{ border-collapse: collapse !important; border-spacing: 0 !important; background: var(--pd-surface); }
table thead th, table th{
  height: 32px; padding: 6px 8px !important; background: var(--pd-surface) !important; color: var(--pd-text) !important;
  font-size: 14px !important; line-height: 20px !important; font-weight: 600 !important; text-transform: none !important; letter-spacing: 0 !important;
  border: 0 !important; border-bottom: 1px solid var(--pd-divider) !important; box-shadow: inset -1px 0 0 var(--pd-divider-light);
  white-space: nowrap;
}
table td{
  padding: 6px 8px !important; height: 32px; font-size: 14px !important; line-height: 21px; color: var(--pd-text);
  border: 0 !important; border-bottom: 1px solid var(--pd-divider-light) !important; box-shadow: inset -1px 0 0 var(--pd-divider-light);
}
table th:last-child, table td:last-child{ box-shadow: none; }
table tbody tr{ transition: background .1s; background: transparent; }
table tbody tr:hover > td{ background: var(--pd-fill-xl) !important; }
table tbody tr.selected > td, table tbody tr.is-selected > td, table tbody tr[aria-selected="true"] > td{ background: var(--pd-blue-bg-l) !important; }
table td a, table td .link, a.link, .link-blue{ color: var(--pd-blue-strong) !important; font-weight: 600; text-decoration: none; }
table td a:hover, a.link:hover{ text-decoration: underline; }

/* ── FORMS ──────────────────────────────────────────────────────────────── */
input[type="text"], input[type="search"], input[type="number"], input[type="tel"], input[type="email"], input[type="password"],
input[type="date"], input[type="time"], input[type="url"], input:not([type]), select, textarea{
  min-height: 32px; border: 1px solid var(--pd-divider-strong) !important; border-radius: var(--pd-r-s) !important;
  background-color: var(--pd-surface); color: var(--pd-text); font-size: 14px !important; font-weight: 450;
  box-shadow: none; transition: border-color .12s, box-shadow .12s;
}
input::placeholder, textarea::placeholder{ color: var(--pd-text-3) !important; opacity: 1; }
input:hover:not(:focus):not(:disabled), select:hover:not(:focus), textarea:hover:not(:focus){ border-color: rgba(33,35,44,.4) !important; }
input:focus, select:focus, textarea:focus{
  outline: none !important; border-color: #8e9197 !important; box-shadow: none !important;
}
select{
  -webkit-appearance: none; appearance: none; padding-right: 28px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%2365686f'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 10px center !important; background-size: 10px 6px !important;
}
input[type="checkbox"]:not([class*="toggle"]):not([role="switch"]), input[type="radio"]{ accent-color: var(--pd-blue); width: 16px; height: 16px; }
.field label, .form-group label, .form-label, label.lbl{ font-size: 13px !important; font-weight: 600 !important; color: var(--pd-text) !important; }

/* ── MENUS, MODALS, TOOLTIPS, TOASTS ────────────────────────────────────── */
.dropdown, .dropdown-menu, .menu-pop, .popover, .row-menu, .ctx-menu, .signout-popover, .ps-dropdown, [role="menu"], [role="listbox"]{
  background: var(--pd-surface) !important; border: 0 !important; border-radius: var(--pd-r-l) !important; box-shadow: var(--pd-e-floating) !important;
}
[role="menuitem"], [role="option"], .dropdown-item, .menu-item{ min-height: 32px; border-radius: var(--pd-r-s); font-size: 14px; }
[role="menuitem"]:hover, [role="option"]:hover, .dropdown-item:hover, .menu-item:hover{ background: var(--pd-fill-xl) !important; }
[role="option"][aria-selected="true"]{ background: var(--pd-blue-bg) !important; color: var(--pd-sel-text) !important; }
.modal-overlay, .modal-backdrop, .backdrop{ background: var(--pd-backdrop) !important; backdrop-filter: none !important; }
.modal, .modal-card, .modal-box, .modal-content, .modal-dialog, .dialog{
  border-radius: var(--pd-r-l) !important; box-shadow: var(--pd-e-overlay) !important; border: 0 !important;
}
.modal-head, .modal-header{ border-bottom: 1px solid var(--pd-divider) !important; }
.modal-head h2, .modal-head h3, .modal-header h2, .modal-header h3, .modal-title{ font-size: 16px !important; line-height: 24px !important; font-weight: 600 !important; }
.modal-foot, .modal-footer, .modal-actions{ border-top: 1px solid var(--pd-divider) !important; gap: 8px; }
.toast{ border-radius: var(--pd-r-s) !important; box-shadow: var(--pd-e-floating) !important; font-size: 14px !important; }
.signout-popover .so-btn{ border-radius: var(--pd-r-s) !important; background: var(--pd-red) !important; }

/* ── TAGS ───────────────────────────────────────────────────────────────── */
.status-pill, .status-badge, .badge-status, .tag, .label-tag{
  border-radius: var(--pd-r-s) !important; font-size: 12px !important; line-height: 18px !important; font-weight: 600 !important;
  padding: 1px 6px !important; letter-spacing: 0 !important; text-transform: none !important;
}

/* ── SOFT TOUCH ─────────────────────────────────────────────────────────── */
/* everything you can click eases into its hover colour, sinks a little when pressed (97%, a softer shadow)
   and springs back -- no hard jumps. Only clickable controls are scaled, never menus or panels. */
:root{ --pd-soft: cubic-bezier(.25,.8,.25,1); --pd-spring: cubic-bezier(.34,1.56,.64,1); }
button, [role="button"], a[class*="btn"], a.new-sale, a.buy-sell, .tab, .view-pill, .chip, .pill, .deal-filter-pill, .filter-chip,
.range-tab, .mode-tab, .profile-tab, .step-tab, .icon-btn, .back-btn, .menu-btn, .avatar, .ps-current,
.sidebar .nav > li > a, .sidebar .nav-group-toggle, .sidebar .nav-group-children a, select, label.switch, .toggle,
[role="menuitem"], [role="option"], .dropdown-item, .menu-item{
  transition: background-color .22s var(--pd-soft), color .22s var(--pd-soft), border-color .22s var(--pd-soft),
              box-shadow .28s var(--pd-soft), opacity .22s var(--pd-soft), transform .32s var(--pd-spring) !important;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
button:active:not(:disabled), [role="button"]:active, a[class*="btn"]:active, a.new-sale:active, a.buy-sell:active,
.tab:active, .view-pill:active, .chip:active, .pill:active, .deal-filter-pill:active, .filter-chip:active, .range-tab:active,
.mode-tab:active, .profile-tab:active, .step-tab:active, .icon-btn:active, .back-btn:active, .menu-btn:active, .ps-current:active,
.sidebar .nav > li > a:active, .sidebar .nav-group-toggle:active, .sidebar .nav-group-children a:active,
[role="menuitem"]:active, [role="option"]:active, .dropdown-item:active, .menu-item:active{
  transform: scale(.97) !important;
  transition: background-color .12s var(--pd-soft), color .12s var(--pd-soft), box-shadow .12s var(--pd-soft), transform .12s var(--pd-soft) !important;
}
.btn-primary:active, .primary-btn:active, button.primary:active, .apply-btn:active, a.new-sale:active, a.buy-sell:active,
.btn-outline:active, .ghost-btn:active, .btn:active{ box-shadow: inset 0 1px 2px rgba(0,0,0,.12) !important; }
/* rows and cards that open something: a soft hover wash */
table tbody tr{ transition: background-color .2s var(--pd-soft); }
input, textarea, select{ transition: border-color .2s var(--pd-soft), box-shadow .25s var(--pd-soft), background-color .2s var(--pd-soft) !important; }
input:focus, select:focus, textarea:focus{ box-shadow: none !important; }
:focus-visible{ outline: none !important; box-shadow: 0 0 0 2px rgba(33,35,44,.18) !important; }
input[type="checkbox"], input[type="radio"]{ transition: transform .2s var(--pd-spring); }
input[type="checkbox"]:active, input[type="radio"]:active{ transform: scale(.9); }
@media (prefers-reduced-motion: reduce){
  *{ transition-duration: .01s !important; }
  *:active{ transform: none !important; }
}


/* ── TOP SHEETS: Pipedrive's add / edit forms drop down from the top edge of the window ──
   (as "+ Organization" does): the page dims, a white sheet slides down from above (square top corners,
   rounded bottom ones), and slides back up when it closes. Used for every add / new / create / edit /
   payment form; viewers, receipts and detail panels keep their own behaviour. */
:root{ --pd-sheet-in: cubic-bezier(0,0,.2,1); }
.modal-backdrop:is([id*="new" i],[id*="draft" i],[id*="add" i],[id*="create" i],[id*="edit" i],[id*="payment" i],[id*="followUp" i],[id*="limit" i]):not([id*="Proof" i]){
  align-items: flex-start !important; justify-content: center !important; padding: 0 16px !important; background: rgba(33,35,44,.48) !important;
}
.modal-backdrop:is([id*="new" i],[id*="draft" i],[id*="add" i],[id*="create" i],[id*="edit" i],[id*="payment" i],[id*="followUp" i],[id*="limit" i]):not([id*="Proof" i]) > .modal{
  margin: 0 !important; height: auto !important; max-height: calc(100vh - 24px) !important; overflow-y: auto;
  width: min(480px, 100%) !important; max-width: 480px !important;
  border-radius: 0 0 8px 8px !important; box-shadow: 0 18px 28px rgba(0,0,0,.16), 0 0 1px rgba(0,0,0,.32) !important;
  transform: translateY(-104%) !important; opacity: 1 !important;
  transition: transform .3s var(--pd-sheet-in) !important;
}
.modal-backdrop.show:is([id*="new" i],[id*="draft" i],[id*="add" i],[id*="create" i],[id*="edit" i],[id*="payment" i],[id*="followUp" i],[id*="limit" i]):not([id*="Proof" i]) > .modal{
  transform: translateY(0) !important;
}
#addCustBackdrop, #editCustBackdrop, #newPfBackdrop, #createInvBackdrop{ background: rgba(33,35,44,.48) !important; }
:is(#addCustBackdrop, #editCustBackdrop, #newPfBackdrop, #createInvBackdrop) > .med-detail-panel{
  top: 0 !important; bottom: auto !important; right: auto !important; left: 50% !important;
  width: min(1040px, calc(100vw - 32px)) !important; height: min(880px, calc(100vh - 24px)) !important;
  border-radius: 0 0 8px 8px !important; overflow: hidden;
  box-shadow: 0 18px 28px rgba(0,0,0,.16), 0 0 1px rgba(0,0,0,.32) !important;
  transform: translate(-50%, -104%) !important; transition: transform .32s var(--pd-sheet-in) !important;
}
:is(#addCustBackdrop, #editCustBackdrop, #newPfBackdrop, #createInvBackdrop).show > .med-detail-panel{ transform: translate(-50%, 0) !important; }
@media (prefers-reduced-motion: reduce){ .modal, .med-detail-panel{ transition: none !important; } }

/* ── PHONES ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px){
  .topbar{ padding: 8px 12px !important; margin-bottom: 12px !important; }
  .main > *:not(.topbar){ margin-left: 12px; margin-right: 12px; }
}

/* ── PAGES ──────────────────────────────────────────────────────────────── */

/* counts inside tabs (Customers 4, Invoices 1 …): Pipedrive's grey count, blue on the chosen tab */
.view-pill .count, .mode-tab-badge, .tab .count, .tab-badge{
  min-width: 18px; height: 18px; padding: 0 5px !important; border-radius: 9px !important; margin-left: 2px;
  background: var(--pd-fill-solid) !important; color: var(--pd-text-2) !important; font-size: 11px !important; font-weight: 600 !important; line-height: 18px !important;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: none !important;
}
.view-pill.active .count, .mode-tab.active .mode-tab-badge, .tab.active .count, .tab.active .tab-badge{ background: #fff !important; color: var(--pd-sel-text) !important; }
.view-pills, .mode-tabs, .step-tabs{ width: fit-content; flex-wrap: nowrap !important; }

/* status labels in tables (Active, Approved, Good standing …): Pipedrive tags, square-ish, colours kept */
.pill, .status-pill, .kpi-pill, .kpi-chip{ border-radius: var(--pd-r-s) !important; font-size: 12px !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; padding: 1px 6px !important; border: 0 !important; }

/* row "⋯" menus (Staff and others) */
.card-menu, .row-menu, .rowmenu, .kebab-menu, .action-menu{
  background: var(--pd-surface) !important; border: 0 !important; border-radius: var(--pd-r-l) !important; box-shadow: var(--pd-e-floating) !important; padding: 6px !important; min-width: 220px;
}
.card-menu button, .row-menu button, .action-menu button{
  min-height: 32px; padding: 6px 10px !important; border-radius: var(--pd-r-s) !important; border: 0 !important; background: transparent !important;
  color: var(--pd-text) !important; font-size: 14px !important; font-weight: 450 !important; gap: 10px; box-shadow: none !important;
}
.card-menu button:hover, .row-menu button:hover, .action-menu button:hover{ background: var(--pd-fill-xl) !important; }
.card-menu button svg, .card-menu button i{ color: var(--pd-icon-2); opacity: 1 !important; width: 16px; height: 16px; font-size: 16px; }
.card-menu button.danger, .card-menu button.danger svg{ color: var(--pd-red) !important; background: transparent !important; }
.card-menu hr{ border: 0; border-top: 1px solid var(--pd-divider); margin: 4px 0; }
.row-actions{ gap: 4px !important; }
.see-details-btn{ min-height: 28px !important; padding: 2px 10px !important; font-size: 13px !important; }

/* Staff: the "Invitation" and "Export" buttons beside "Add staff" */
.export-btn span, .report-btn span{ white-space: nowrap; }

/* Transactions: "All Dates ▾", "All transactions ▾", print, Cash Report */
.range-pill, .dropdown-btn{ border-radius: var(--pd-r-s) !important; height: 32px; display: inline-flex !important; align-items: center; gap: 6px; }
.report-btn{ color: var(--pd-icon-2) !important; }
.report-btn svg{ stroke: currentColor !important; }
.cash-report-btn{ display: inline-flex !important; align-items: center; gap: 6px; height: 32px; }
.range-dropdown, .channel-dropdown, .dropdown-menu, .range-dd .dd-menu, .range-dd [class*="menu"]{ border-radius: var(--pd-r-l) !important; box-shadow: var(--pd-e-floating) !important; border: 0 !important; }
.dropdown-item{ border-radius: var(--pd-r-s) !important; font-size: 14px !important; }
.dropdown-item.active, .dropdown-item.selected, .dropdown-item[aria-selected="true"]{ background: var(--pd-blue-bg) !important; color: var(--pd-sel-text) !important; }

/* Add wholesale / credit customer: section labels as Pipedrive field labels, not shouting capitals */
.step-tab{ height: 32px !important; justify-content: center; flex: 1; }
.step-tabs{ width: 100% !important; }
.field-label, .form-label, .f-label, .field > label, .form-row label, .modal label{ text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; font-weight: 600 !important; color: var(--pd-text) !important; }

/* Prescriptions: each customer is a clean Pipedrive card (photo peek kept), not a coloured folder */
.rx-folders{ gap: 12px !important; }
.rx-folder{ background: var(--pd-surface); border-radius: var(--pd-r-l) !important; box-shadow: var(--pd-e-raised); padding: 16px 12px 14px !important; }
.rx-folder:hover{ background: var(--pd-surface) !important; box-shadow: var(--pd-e-raised-hover); transform: translateY(-1px) !important; }
.rx-folder-icon{ height: 76px !important; max-width: 104px !important; margin-bottom: 10px !important; }
.rx-folder-back{ display: none !important; }
.rx-folder-front{ top: 24px !important; border-radius: var(--pd-r-l) !important; background: var(--pd-blue-bg-l) !important; border: 1px solid var(--pd-blue-bg-s); box-shadow: none !important; }
.rx-folder-front::after{ content: "\e7a2"; font-family: "Phosphor"; position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-size: 26px; color: var(--pd-blue-strong); }
.rx-folder-badge{ background: var(--pd-red) !important; border-radius: 9px !important; font-weight: 600 !important; box-shadow: 0 0 0 2px #fff !important; }
.rx-folder-name{ font-size: 14px !important; font-weight: 600 !important; }
.rx-folder-meta{ font-size: 12px !important; color: var(--pd-text-2) !important; }
.rx-card{ border-radius: var(--pd-r-l) !important; box-shadow: var(--pd-e-raised) !important; border: 0 !important; }

/* Messages: Pipedrive's Sales Inbox -- one bordered surface, light list, blue selection, flat bubbles */
.mode-tabs{ margin-bottom: 12px !important; }
.msg-col-list{ background: var(--pd-surface-2) !important; border-right: 1px solid var(--pd-divider) !important; }
.msg-list-head{ padding: 12px !important; }
.msg-item{ padding: 10px 12px !important; border-left: 0 !important; border-bottom: 1px solid var(--pd-divider-light); border-radius: 0; }
.msg-item:hover{ background: var(--pd-fill-xl) !important; }
.msg-item.active{ background: var(--pd-blue-bg) !important; box-shadow: inset 3px 0 0 var(--pd-blue); }
.msg-item-name{ font-size: 14px !important; font-weight: 600 !important; }
.msg-item-preview{ font-size: 13px !important; }
.msg-unread-badge{ background: var(--pd-blue) !important; font-weight: 600 !important; }
.msg-col-thread{ background: var(--pd-surface) !important; }
.msg-thread-head{ padding: 12px 20px !important; min-height: 56px; }
.msg-thread-name{ font-size: 16px !important; font-weight: 600 !important; }
.msg-bubble{ border-radius: var(--pd-r-l) !important; font-size: 14px !important; }
.msg-bubble.them{ background: var(--pd-surface-2) !important; border: 1px solid var(--pd-divider-light) !important; }
.msg-bubble.me{ background: var(--pd-blue-bg) !important; color: var(--pd-text) !important; border: 1px solid var(--pd-blue-bg-s) !important; }
.msg-tool-btn{ width: 32px; height: 32px; border-radius: var(--pd-r-s) !important; background: transparent !important; color: var(--pd-icon-2) !important; border: 0 !important; }
.msg-tool-btn:hover{ background: var(--pd-fill-l) !important; }
.msg-details-tab{ border-radius: 0 !important; font-weight: 600 !important; }
.msg-details-tab.active{ color: var(--pd-blue-strong) !important; box-shadow: inset 0 -2px 0 var(--pd-blue-strong) !important; border-color: transparent !important; }

/* Settings: a short, calm cover band instead of a full-height green banner */
.hero-cover{ height: 136px !important; background: linear-gradient(120deg, #f4f5f7, #e1eeff) !important; border-radius: var(--pd-r-l) var(--pd-r-l) 0 0; }
.hero-cover:has(img[src]:not([src=""])){ height: 180px !important; }
.hero-avatar{ width: 80px !important; height: 80px !important; }
.hero-name{ font-size: 21px !important; font-weight: 600 !important; }
.toggle, .ps-toggle{ accent-color: var(--pd-green); }

/* Notifications: "All types ▾", "Mark all read" */
.sel-btn{ height: 32px; display: inline-flex !important; align-items: center; gap: 6px; }

/* ── "Add customer": Pipedrive's Add organization sheet (credit.html, wholesale.html) ── */
#addCustBackdrop > .pd-sheet{
  width: min(380px, calc(100vw - 24px)) !important; height: auto !important; max-height: calc(100vh - 24px) !important;
  display: flex !important; flex-direction: column; background: #fff;
  border-radius: 0 0 8px 8px !important; box-shadow: 0 12px 40px rgba(21,22,26,.22), 0 2px 6px rgba(21,22,26,.08) !important; overflow: hidden;
}
/* Pipedrive "Add person": compact, soft fields */
.ac-sheet .pd-sheet-head{ height: 52px; padding: 0 10px 0 20px; }
.ac-sheet .pd-sheet-body{ padding: 14px 20px 10px; display: flex; flex-direction: column; gap: 12px; }
.ac-sheet .mdp-source-panel.active{ gap: 12px; }
.ac-sheet .pd-f{ gap: 4px; }
.ac-sheet .pd-f > span{ font-size: 14px; font-weight: 450; color: var(--pd-text); }
.ac-sheet .pd-f input, .ac-sheet .pd-f select, .ac-sheet .pd-f textarea, .ac-lab-field{
  min-height: 32px !important; height: 32px; padding: 5px 10px !important; font-size: 14px !important; border: 1px solid #c6c8cc !important;
  border-radius: 6px !important; background: #fff !important; box-shadow: none !important; transition: border-color .15s, box-shadow .15s; }
.ac-sheet .pd-f textarea{ height: auto; min-height: 64px !important; }
.ac-sheet .pd-f input:hover, .ac-sheet .pd-f select:hover, .ac-sheet .pd-f textarea:hover, .ac-lab-field:hover{ border-color: #a6a9ae !important; }
.ac-sheet .pd-f input:focus, .ac-sheet .pd-f select:focus, .ac-sheet .pd-f textarea:focus, .ac-lab-field.is-open, .ac-lab-search input:focus{
  outline: 0 !important; border-color:#8e9197 !important; box-shadow:none !important; }
.ac-sheet .pd-f-search input{ padding-left: 32px !important; }
.ac-sheet .pd-sheet-foot{ padding: 12px 20px !important; }
.ac-sheet .pd-sheet-foot .pd-primary{ background: var(--pd-green); } .ac-sheet .pd-sheet-foot .pd-primary:hover:not(:disabled){ background: var(--pd-green-strong); }
.ac-switch{ display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: #f4f5f6; cursor: pointer; }
.ac-switch-txt{ flex: 1; min-width: 0; } .ac-switch-txt b{ display: block; font-size: 14px; font-weight: 600; } .ac-switch-txt small{ display: block; font-size: 12px; color: var(--pd-text-2, #65686f); line-height: 16px; }
.ac-switch input{ position: absolute; opacity: 0; pointer-events: none; }
.ac-switch-ui{ position: relative; width: 34px; height: 20px; border-radius: 99px; background: #c6c8cc; flex: none; transition: background .18s; }
.ac-switch-ui::after{ content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .18s var(--pd-ease, ease); }
.ac-switch input:checked + .ac-switch-ui{ background: #217a42; } .ac-switch input:checked + .ac-switch-ui::after{ transform: translateX(14px); }
.ac-switch input:focus-visible + .ac-switch-ui{ box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8e9197; }
.ac-sheet [hidden]{ display: none !important; }
.ac-row2{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ac-credit{ display: flex; flex-direction: column; gap: 12px; }
.ac-adds{ display: flex; gap: 16px; flex-wrap: wrap; }
.ac-add{ border: 0; background: none; padding: 0; color: #2d8647; font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-family: inherit; }
.ac-add:hover{ text-decoration: underline; } .ac-add i{ font-size: 13px; }
/* labels picker (Pipedrive) */
.ac-lab{ position: relative; }
.ac-lab-field{ width: 100%; height: auto !important; min-height: 32px !important; display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 3px 8px 3px 6px !important; color: var(--pd-text); }
.ac-lab-vals{ flex: 1; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; padding-left: 4px; }
.ac-lab-ic{ display: inline-flex; align-items: center; gap: 6px; flex: none; }
.ac-lab-ic i{ font-size: 13px; color: var(--pd-text); } .ac-lab-ic .ph-x{ font-size: 14px; padding: 2px; border-radius: 4px; } .ac-lab-ic .ph-x:hover{ background: #f0f1f3; }
.ac-lab-field.is-open .ph-caret-down{ transform: rotate(180deg); }
.ac-ph{ color: var(--pd-text); font-size: 14px; }
.ac-lab-pop{ position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border-radius: 8px; box-shadow: 0 8px 28px rgba(21,22,26,.2), 0 0 1px rgba(21,22,26,.3); z-index: 20; overflow: hidden; }
.ac-lab-search{ position: relative; padding: 8px; border-bottom: 1px solid var(--pd-divider, #e0e1e4); }
.ac-lab-search i{ position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--pd-text); font-size: 15px; }
#addCustBackdrop .ac-lab-search input{ width: 100%; height: 32px !important; border: 1px solid #c6c8cc !important; border-radius: 6px !important; padding: 0 10px 0 32px !important; font: inherit; font-size: 14px; }
.ac-lab-list{ max-height: 196px; overflow-y: auto; padding: 4px 0; }
.ac-lab-opt{ display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 12px; cursor: pointer; min-height: 34px; }
.ac-lab-opt:hover, .ac-lab-opt:focus-visible{ background: #f0f1f3; outline: 0; }
.ac-lab-opt:hover .ac-lab-act i, .ac-lab-opt:focus-visible .ac-lab-act i{ color: #21232c; }
.ac-lab-act{ display: inline-flex; align-items: center; gap: 6px; } .ac-lab-act > i{ color: #2d8647; font-size: 16px; }
.ac-lab-edit{ border: 0; background: none; padding: 3px; border-radius: 4px; cursor: pointer; visibility: hidden; display: inline-flex; }
.ac-lab-edit i{ font-size: 15px; color: #21232c; }
.ac-lab-opt:hover .ac-lab-edit, .ac-lab-opt:focus-visible .ac-lab-edit{ visibility: visible; } .ac-lab-edit:hover{ background: rgba(33,35,44,.08); }
.ac-lab-none{ padding: 10px 12px; font-size: 13px; color: var(--pd-text-2, #65686f); }
.ac-lab-new{ width: 100%; border: 0; border-top: 1px solid var(--pd-divider, #e0e1e4); background: #fff; color: #2d8647; font: inherit; font-weight: 600; font-size: 14px; padding: 11px 14px; text-align: left; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.ac-lab-new:hover{ background: #f4f5f6; }
.ac-lab-form-head{ font-size: 16px; font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--pd-divider, #e0e1e4); }
.ac-lab-form-body{ padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.ac-lab-form-foot{ display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--pd-divider, #e0e1e4); }
.ac-sws{ display: flex; flex-wrap: wrap; gap: 6px; }
.ac-sw{ width: 23px; height: 23px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; font-size: 13px; color: #21232c; }
.ac-sw.is-on{ box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor; } .ac-sw.blue.is-on, .ac-sw.red.is-on, .ac-sw.purple.is-on, .ac-sw.brown.is-on, .ac-sw.dark.is-on{ color: #fff; }
.ac-sw.is-on{ box-shadow: 0 0 0 3px rgba(33,35,44,.18); }
.ac-pill{ display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase !important; padding: 2px 8px; border-radius: 4px; line-height: 16px; white-space: nowrap; }
.ac-pill .ph-x{ font-size: 11px; cursor: pointer; }
.ac-pill.blue, .ac-sw.blue{ background: #3c5bd1; color: #fff; } .ac-pill.green, .ac-sw.green{ background: #73d9b0; color: #0f3d2c; }
.ac-pill.yellow, .ac-sw.yellow{ background: #fde047; color: #3d3200; } .ac-pill.red, .ac-sw.red{ background: #d7262f; color: #fff; }
.ac-pill.purple, .ac-sw.purple{ background: #93368f; color: #fff; } .ac-pill.grey, .ac-sw.grey{ background: #e0e1e3; color: #2a2c31; }
.ac-pill.brown, .ac-sw.brown{ background: #8b4a1f; color: #fff; } .ac-pill.orange, .ac-sw.orange{ background: #ffa552; color: #4a2400; }
.ac-pill.dark, .ac-sw.dark{ background: #5f6368; color: #fff; } .ac-pill.pink, .ac-sw.pink{ background: #f48cb6; color: #4d1029; }
@media (max-width: 480px){ .ac-row2{ grid-template-columns: 1fr; } }
.pd-sheet-head{ display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 12px 0 24px; border-bottom: 1px solid var(--pd-divider); flex: none; }
.pd-sheet-head h3{ font-size: 16px; line-height: 24px; font-weight: 600; color: var(--pd-text); margin: 0; }
.pd-sheet-x{ width: 32px !important; height: 32px !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: var(--pd-text) !important;
  display: inline-flex !important; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; position: static !important; box-shadow: none !important; }
.pd-sheet-x:hover{ background: var(--pd-fill-l) !important; }
.pd-sheet-body{ flex: 1; overflow-y: auto; padding: 16px 24px 8px; }
.pd-sheet .mdp-source-panel{ display: none; }
.pd-sheet .mdp-source-panel.active{ display: flex; flex-direction: column; gap: 14px; animation: pdSheetFade .2s ease; }
@keyframes pdSheetFade{ from{ opacity: 0; } to{ opacity: 1; } }
.pd-f{ display: flex; flex-direction: column; gap: 4px; margin: 0; }
.pd-f > span{ font-size: 14px; line-height: 20px; font-weight: 450; color: var(--pd-text); }
.pd-f input, .pd-f select, .pd-f textarea{ width: 100%; min-height: 36px !important; padding: 7px 10px !important; font-size: 14px !important; border-radius: var(--pd-r-s) !important; background-color: #fff; }
.pd-f textarea{ min-height: 72px !important; resize: vertical; }
.pd-f small{ font-size: 12px; color: var(--pd-text-2); line-height: 16px; }
.pd-f-warn{ font-style: normal; font-size: 12px; color: var(--pd-red); font-weight: 600; line-height: 16px; }
.pd-f-search{ position: relative; display: flex; align-items: center; }
.pd-f-search i{ position: absolute; left: 10px; color: var(--pd-icon-3); font-size: 16px; pointer-events: none; }
.pd-f-search input{ padding-left: 32px !important; }
.pd-sheet-back-link, .pd-sheet-import{ border: 0; background: transparent; color: var(--pd-blue-strong); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 0; align-self: flex-start; }
.pd-sheet-back-link:hover, .pd-sheet-import:hover{ text-decoration: underline; }
.pd-sheet-import{ color: var(--pd-text); font-weight: 450; }
.pd-sheet-import i{ font-size: 16px; color: var(--pd-icon-2); }
.pd-sheet-foot{ display: flex !important; align-items: center; gap: 8px; padding: 12px 24px !important; border-top: 1px solid var(--pd-divider); background: #fff !important; flex: none; margin: 0 !important; position: static !important; box-shadow: none !important; }
.pd-sheet-foot .pd-grow{ flex: 1; }
.pd-sheet #acNetworkResults .network-card{ border-radius: var(--pd-r-s) !important; border: 1px solid var(--pd-divider) !important; box-shadow: none !important; margin-bottom: 6px; }
.pd-sheet #acNetworkResults .network-card.selected{ background: var(--pd-blue-bg) !important; border-color: var(--pd-text) !important; }
/* Pipedrive buttons available on every page */
.pd-primary{ border:0; height:32px; padding:0 14px; border-radius:4px; background:var(--pd-green); color:#fff !important; font-weight:600; font-size:14px; display:inline-flex; align-items:center; gap:6px; cursor:pointer; text-decoration:none; box-shadow:var(--pd-e-button); }
.pd-primary:hover:not(:disabled){ background:var(--pd-green-strong); }
.pd-sbtn{ height:32px; padding:0 12px; border-radius:4px; border:1px solid var(--pd-divider-strong); background:#fff; color:var(--pd-text); font-weight:600; font-size:14px; display:inline-flex; align-items:center; gap:6px; cursor:pointer; text-decoration:none; box-shadow:var(--pd-e-button); }
.pd-sbtn:hover{ background:#f5f5f6; }

/* ── SEARCH BOXES: no border, no shadow, roomy padding, NO grey fill (the user's choice, 2026-10-21; grey removed the same day) ── */
.search-box, .topbar-search, .search-wrap, .msg-search, .customer-search, .cc-search-bar, .grn-search, .tf-search, .stp-search, .select-search{
  border: 0 !important; box-shadow: none !important; outline: 0 !important; background: transparent !important; border-radius: 8px !important;
}
.search-box, .topbar-search, .search-wrap, .cc-search-bar{ padding-left: 12px !important; padding-right: 12px !important; min-height: 40px; }
input[type="search"], .topbar-search-input, .item-search-input, .search-box input, .topbar-search input, .search-wrap input, .msg-search input,
.customer-search input, .cc-search-bar input, .grn-search input, .tf-search input, .stp-search input, .select-search input, .pd-search input,
.pd-f-search input, .pd-finder-in input, input[placeholder^="Search" i], input[placeholder*="search" i]{
  border: 0 !important; box-shadow: none !important; outline: 0 !important; background-color: transparent !important;
  border-radius: 8px !important; min-height: 40px; padding-top: 9px !important; padding-bottom: 9px !important; padding-right: 14px !important;
}
input[type="search"]:not(.pd-search input):not(.pd-f-search input), .topbar-search-input, .item-search-input, input[placeholder^="Search" i]{ padding-left: 14px !important; }
.search-box input, .topbar-search input, .search-wrap input, .msg-search input, .cc-search-bar input{ background: transparent !important; padding-left: 8px !important; min-height: 0; }
.pd-search input, .pd-f-search input{ padding-left: 36px !important; }
input[type="search"]:focus, .topbar-search-input:focus, .item-search-input:focus, input[placeholder^="Search" i]:focus, input[placeholder*="search" i]:focus,
.search-box:focus-within, .topbar-search:focus-within, .search-wrap:focus-within, .msg-search:focus-within, .cc-search-bar:focus-within{
  background-color: transparent !important; box-shadow: none !important; border: 0 !important;
}
.search-box input:focus, .topbar-search input:focus, .search-wrap input:focus, .msg-search input:focus, .cc-search-bar input:focus{ background: transparent !important; }
.pd-find{ border: 0 !important; background: #f0f1f3 !important; box-shadow: none !important; padding: 0 14px 0 16px !important; border-radius: 20px; }
.pd-find:hover{ background: #e8e9ec !important; }
.pd-finder-in input{ background: transparent !important; }

/* ── NOTIFICATIONS: Pipedrive's right-hand drawer (the bell, js/api.js mountNotificationBell) ── */
.apx-notif-panel{
  position: fixed !important; top: 0 !important; right: 0 !important; bottom: 0 !important; left: auto !important;
  width: 400px !important; max-width: 100vw; max-height: none !important; border-radius: 0 !important;
  background: #fff !important; box-shadow: var(--pd-e-overlay) !important; border: 0 !important; z-index: 2400 !important;
  display: flex !important; flex-direction: column; padding: 0 !important;
  transform: translateX(104%); opacity: 1 !important; visibility: visible !important; pointer-events: none;
  transition: transform .3s var(--pd-ease) !important;
}
.apx-notif-panel.is-open{ transform: none; pointer-events: auto; }
.apx-notif-panel .apx-nh{ display: flex !important; align-items: center; gap: 8px; height: 56px; padding: 0 12px 0 24px !important; border-bottom: 1px solid var(--pd-divider) !important; margin: 0 !important; }
.apx-notif-panel .apx-nh > span{ flex: 1; font-size: 16px !important; font-weight: 600 !important; color: var(--pd-text) !important; }
.apx-notif-panel .apx-nh [data-all]{ border: 0 !important; background: transparent !important; color: var(--pd-blue-strong) !important; font-weight: 600 !important; font-size: 13px !important; padding: 4px 8px !important; border-radius: 4px !important; }
.apx-notif-panel .apx-nh [data-all]:hover:not(:disabled){ background: var(--pd-blue-bg-l) !important; }
.apx-notif-panel .apx-nh [data-all]:disabled{ color: var(--pd-text-3) !important; opacity: 1 !important; }
.apx-nx-close{ width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; color: var(--pd-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.apx-nx-close:hover{ background: var(--pd-fill-l); }
.apx-ntabs{ display: flex; gap: 4px; padding: 10px 20px; border-bottom: 1px solid var(--pd-divider-light); }
.apx-ntabs button{ height: 28px; padding: 0 10px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--pd-text); font-weight: 600; font-size: 13px; cursor: pointer; }
.apx-ntabs button:hover{ background: var(--pd-fill-xl); }
.apx-ntabs button.on{ background: var(--pd-blue-bg); border-color: transparent; color: var(--pd-sel-text); }
.apx-notif-panel .apx-nl{ flex: 1; overflow-y: auto; max-height: none !important; padding: 6px 8px !important; }
.apx-notif-panel .apx-ni{ display: flex !important; gap: 12px; padding: 12px !important; border-radius: 8px !important; border: 0 !important; margin: 0 0 2px !important; background: transparent !important; cursor: pointer; }
.apx-notif-panel .apx-ni:hover{ background: var(--pd-fill-xl) !important; }
.apx-notif-panel .apx-ni.unread{ background: var(--pd-blue-bg-l) !important; }
.apx-notif-panel .apx-nic{ width: 36px !important; height: 36px !important; border-radius: 50% !important; flex: none; background: #fff !important; color: var(--pd-icon) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 1px rgba(0,0,0,.12) !important; display: flex !important; align-items: center; justify-content: center; font-size: 17px; }
.apx-notif-panel .apx-nt{ font-size: 14px !important; font-weight: 600 !important; color: var(--pd-text) !important; display: flex; align-items: center; gap: 6px; }
.apx-notif-panel .apx-nt .d{ width: 8px !important; height: 8px !important; border-radius: 50%; background: var(--pd-blue) !important; margin-left: auto; flex: none; }
.apx-notif-panel .apx-nx{ font-size: 13px !important; color: var(--pd-text-2) !important; line-height: 18px; }
.apx-notif-panel .apx-nm{ font-size: 12px !important; color: var(--pd-text-3) !important; margin-top: 2px; }
.apx-notif-panel .apx-ne{ display: flex !important; flex-direction: column; align-items: center; gap: 6px; padding: 56px 24px !important; text-align: center; color: var(--pd-text-2) !important; font-size: 13px; }
.apx-notif-panel .apx-ne i{ font-size: 44px; color: var(--pd-icon-3); } .apx-notif-panel .apx-ne b{ color: var(--pd-text); font-size: 15px; }
.apx-notif-panel .apx-nall{ display: flex !important; align-items: center; justify-content: center; gap: 6px; height: 52px; border-top: 1px solid var(--pd-divider) !important;
  color: var(--pd-blue-strong) !important; font-weight: 600 !important; font-size: 14px !important; text-decoration: none; margin: 0 !important; padding: 0 !important; background: #fff !important; }
.apx-notif-panel .apx-nall:hover{ background: var(--pd-fill-xl) !important; }
/* notifications.html: category tags as Pipedrive's small grey labels; rows as a calm list */
.n-tag{ background: var(--pd-fill-solid) !important; color: var(--pd-text-2) !important; text-transform: none !important; letter-spacing: 0 !important;
  font-size: 12px !important; font-weight: 600 !important; border-radius: 4px !important; padding: 1px 6px !important; border: 0 !important; }

/* ── ORDERS PIPELINE (js/pd-pipeline-orders.js): Pipedrive's deals board ── */
.pdo-views{ display:inline-flex; border:1px solid var(--pd-divider-strong); border-radius:4px; overflow:hidden; background:#fff; margin-right:8px; }
.pdo-views button{ width:34px; height:30px; border:0; background:transparent; color:var(--pd-icon-2); font-size:17px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.pdo-views button + button{ border-left:1px solid var(--pd-divider); }
.pdo-views button.is-on{ background:var(--pd-blue-bg); color:var(--pd-text); }
.pdo-sum{ font-size:14px; font-weight:600; color:var(--pd-text); white-space:nowrap; margin-right:6px; }
.pdo-sum[hidden], .pdo-board[hidden]{ display:none !important; }
.pdo-board{ display:grid; grid-template-columns:repeat(4, minmax(230px, 1fr)); gap:8px; align-items:start; overflow-x:auto; padding-bottom:16px; min-height:calc(100vh - 210px); }
.pdo-col{ background:#f2f3f4; border-radius:6px; display:flex; flex-direction:column; min-height:calc(100vh - 220px); transition:background .15s; }
.pdo-col.is-over{ background:#e3e5e8; box-shadow:inset 0 0 0 2px var(--pd-text); }
.pdo-head{ position:relative; background:#fff; padding:8px 22px 8px 12px; margin:0 0 6px; border-radius:6px 6px 0 0; display:flex; flex-direction:column; gap:1px;
  clip-path:polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); box-shadow:inset 0 -1px 0 var(--pd-divider); }
.pdo-head.last{ clip-path:none; padding-right:12px; }
.pdo-head b{ font-size:15px; font-weight:600; color:var(--pd-text); }
.pdo-head span{ font-size:12px; color:var(--pd-text-2); }
.pdo-cards{ display:flex; flex-direction:column; gap:6px; padding:0 6px 8px; }
.pdo-empty{ font-size:12px; color:var(--pd-text-3); text-align:center; padding:18px 6px; border:1px dashed var(--pd-divider-strong); border-radius:6px; }
.pdo-card{ background:#fff; border-radius:4px; padding:9px 10px 8px; box-shadow:var(--pd-e-raised); cursor:pointer; display:flex; flex-direction:column; gap:3px;
  transition:box-shadow .2s var(--pd-soft, ease), transform .3s var(--pd-spring, ease); outline:0; }
.pdo-card:hover{ box-shadow:var(--pd-e-raised-hover); }
.pdo-card:active{ transform:scale(.98); }
.pdo-card:focus-visible{ box-shadow:0 0 0 2px var(--pd-text); }
.pdo-card.is-dragging{ opacity:.45; transform:rotate(2deg); }
/* cards are tinted by their pipeline stage (the user's colours, 2026-10-22) */
.pdo-col[data-stage="new"] .pdo-card{ background:#fef2f0; }
.pdo-col[data-stage="new"] .pdo-card.is-stale{ background:#fde2dd; }   /* waiting more than 2 hours */
.pdo-col[data-stage="preparing"] .pdo-card{ background:#fff8db; }
.pdo-col[data-stage="ready"] .pdo-card{ background:#eaf3ff; }
.pdo-col[data-stage="delivered"] .pdo-card{ background:#e9fbe7; }
.pdo-card .t{ font-size:14px; font-weight:600; color:var(--pd-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pdo-card .s{ font-size:12px; color:var(--pd-text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pdo-card .f{ display:flex; align-items:center; gap:8px; margin-top:4px; }
.pdo-card .av{ width:20px; height:20px; border-radius:50%; background:#e9eaec; color:var(--pd-text); font-size:9px; font-weight:600; display:inline-flex; align-items:center; justify-content:center; }
.pdo-card .av{ overflow:hidden; flex:none; } .pdo-card .av img{ width:100%; height:100%; object-fit:cover; display:block; }
.pdo-card .f b{ font-size:12px; font-weight:600; color:var(--pd-text); }
.pdo-card .age{ margin-left:auto; font-size:11px; color:var(--pd-text-3); }
.pdo-card .flag{ margin-left:auto; width:20px; height:20px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:13px; }
.pdo-card .flag.red{ background:#f14b3e; color:#fff; } .pdo-card .flag.yellow{ background:#fddc48; color:#21232c; }
@media (max-width: 760px){ .pdo-board{ grid-template-columns:repeat(4, 240px); } }
.pdo-card.is-busy{ opacity:.55; pointer-events:none; background-image:linear-gradient(90deg, transparent, rgba(33,35,44,.06), transparent); background-size:200% 100%; animation:pdoBusy 1s linear infinite; }
@keyframes pdoBusy{ from{ background-position:200% 0; } to{ background-position:-200% 0; } }


/* ── TYPE WEIGHTS, Pipedrive style: 400 for text, 600 for titles, labels, buttons and emphasis -- never heavy 700/800 ── */
b, strong, th, h1, h2, h3, h4, h5, h6, optgroup{ font-weight: 600; }
/* Pipedrive writes labels in sentence case -- no SHOUTY small caps with letter-spacing.
   Printed receipts (.rcpt-*) and A4 documents (.doc-*) keep their own typography. */
body *:not([class*="rcpt"]):not(.rcpt-slip *):not([class*="doc-"]):not(.ph):not([class*="ph-"]):not(.ac-pill):not(.pd-up){ text-transform: none !important; }
body *:not([class*="rcpt"]):not(.rcpt-slip *):not([class*="doc-"]):not(.ph):not([class*="ph-"]):not(.logo):not(.logo *):not(.ac-pill){ letter-spacing: normal !important; }

/* Green (primary) buttons: bold white text, like Pipedrive's "+ Organization" (the user's choice, 2026-10-22) */
.btn-primary, .primary-btn, .btn.primary, button.primary, a.primary, .apply-btn, .cash-report-btn, .new-ticket-btn, .edit-save-btn, .save-btn, .submit-btn, .confirm-btn,
.qm-add-btn, .receipt-done-btn, .reject-submit-btn, .msg-send-btn, .rxm-btn-approve, .draft-resume-btn, .btn-verify, .btn.btn-green,
.pd-primary, .topbar .buy-sell, .topbar .new-sale, a.buy-sell, a.new-sale, .rg-save, .pdp-split > button{ font-weight: 700 !important; letter-spacing: .1px; }

/* ── Top sheets ("Record expense", "New credit customer", "Add …", payments …): Pipedrive "Add person" look (2026-10-22) ──
   narrow, light backdrop, smooth slide, header with a divider, compact 32px fields, grey focus, Save right-aligned. */
.modal-backdrop:is([id*="new" i],[id*="draft" i],[id*="add" i],[id*="create" i],[id*="edit" i],[id*="payment" i],[id*="followUp" i],[id*="limit" i]):not([id*="Proof" i]){ background: rgba(33,35,44,.32) !important; }
.modal-backdrop:is([id*="new" i],[id*="draft" i],[id*="add" i],[id*="create" i],[id*="edit" i],[id*="payment" i],[id*="followUp" i],[id*="limit" i]):not([id*="Proof" i]) > .modal{
  width: min(400px, 100%) !important; max-width: 400px !important; padding: 0 20px 16px !important;
  box-shadow: 0 12px 40px rgba(21,22,26,.22), 0 2px 6px rgba(21,22,26,.08) !important;
  transition: transform .28s cubic-bezier(.2,.9,.3,1) !important;
}
.modal-backdrop.show:is([id*="new" i],[id*="draft" i],[id*="add" i],[id*="create" i],[id*="edit" i],[id*="payment" i],[id*="followUp" i],[id*="limit" i]):not([id*="Proof" i]) .modal .field-group{ animation: none !important; }
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal-head{
  position: sticky; top: 0; z-index: 2; background: #fff; display: flex; align-items: center; justify-content: space-between;
  margin: 0 -20px 14px !important; padding: 0 10px 0 20px !important; height: 52px; border-bottom: 1px solid rgba(33,35,44,.12);
}
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal-title{ font-size: 16px !important; font-weight: 600 !important; line-height: 24px; }
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal-sub{ display: none !important; }
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal-close{
  width: 32px !important; height: 32px !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: #21232c !important;
  font-size: 16px !important; display: grid !important; place-items: center; box-shadow: none !important; cursor: pointer;
}
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal-close:hover{ background: #f0f1f3 !important; }
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal .field-group{ margin-bottom: 12px !important; }
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal .field-label{
  font-size: 14px !important; font-weight: 450 !important; color: #21232c !important; margin-bottom: 4px !important; text-transform: none !important; letter-spacing: 0 !important;
}
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal :is(.field-input,.field-select,.date-btn,.cal-trigger-btn,select,input[type="text"],input[type="number"],input[type="tel"],input[type="email"]){
  height: 32px !important; min-height: 32px !important; padding: 0 10px !important; font-size: 14px !important; border: 1px solid #c6c8cc !important;
  border-radius: 4px !important; background-color: #fff !important; box-shadow: none !important;
}
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal :is(textarea,.field-textarea){
  min-height: 72px !important; padding: 6px 10px !important; font-size: 14px !important; border: 1px solid #c6c8cc !important; border-radius: 4px !important; box-shadow: none !important;
}
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal :is(input,select,textarea,.date-btn,.cal-trigger-btn):hover{ border-color: #a6a9ae !important; }
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal :is(input,select,textarea):focus{ border-color: #8e9197 !important; box-shadow: none !important; outline: 0 !important; }
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal-submit{
  display: flex !important; margin: 16px 0 0 auto !important; width: auto !important; height: 32px !important; padding: 0 16px !important; align-items: center; justify-content: center;
  border-radius: 4px !important; background: var(--pd-green) !important; color: #fff !important; font-size: 14px !important; font-weight: 700 !important; box-shadow: var(--pd-e-button) !important;
}
:is(.modal-backdrop[id*="new" i],.modal-backdrop[id*="draft" i],.modal-backdrop[id*="add" i],.modal-backdrop[id*="create" i],.modal-backdrop[id*="edit" i],.modal-backdrop[id*="payment" i]) .modal-submit:hover{ background: var(--pd-green-strong) !important; }

/* Items without a photo: the Atlas app's empty-folder picture, everywhere (2026-10-22) */
img.apx-noimg{ width:72% !important; height:auto !important; max-height:80% !important; object-fit:contain !important; opacity:.9; display:block; margin:auto; padding:0 !important; border-radius:0 !important; background:none !important; }

/* ── Medicine icon: everywhere PRO shows a medicine (ph-pill / ph-pills) it draws the Register
   medicine icon (images/reg-medicines.png, from the Flutter app), tinted with the text colour (2026-10-22) ── */
i.ph.ph-pill::before, i.ph.ph-pills::before{
  content:''; display:inline-block; width:1em; height:1em; vertical-align:-0.125em;
  background:currentColor;
  -webkit-mask:url(../images/reg-medicines.png) center / contain no-repeat;
  mask:url(../images/reg-medicines.png) center / contain no-repeat;
}

/* ── account menu on the avatar (js/pd-nav.js accountMenu), Pipedrive style (2026-10-22) ── */
.signout-popover.pd-acct{ width:268px !important; padding:6px 0 !important; text-align:left !important; display:none; flex-direction:column; align-items:stretch !important; gap:0 !important; }
.signout-popover.pd-acct.open{ display:flex !important; }
.pd-acct > a, .pd-acct > button{ display:flex; align-items:center; gap:10px; padding:8px 16px; font-size:14px; color:#21232c !important; text-decoration:none; background:none; border:0; font-family:inherit; cursor:pointer; text-align:left; width:100%; }
.pd-acct > a:hover, .pd-acct > button:hover{ background:#f4f5f6; }
.pd-acct > a i, .pd-acct > button i{ font-size:18px; color:#65686f; }
.pd-acct .pd-acct-me{ padding:10px 16px; gap:12px; }
.pd-acct-av{ width:40px; height:40px; border-radius:50%; background:#e9eaec; display:flex; align-items:center; justify-content:center; overflow:hidden; font-weight:700; color:#3d4049; flex:none; }
.pd-acct-av img{ width:100%; height:100%; object-fit:cover; }
.pd-acct-me b{ display:block; font-size:14.5px; font-weight:600; color:#21232c; } .pd-acct-me small{ display:block; font-size:12.5px; color:#65686f; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pd-acct-sep{ height:1px; background:#e6e7e9; margin:6px 0; }
.pd-acct .pd-acct-out{ color:#c0262d !important; } .pd-acct .pd-acct-out i{ color:#c0262d; }

/* ── COLOUR TRIAL (2026-10-22): black navigation + black buttons -> rgb(31,72,66) #1f4842.
   Delete this block to go back to black. ── */
:root{
  --pd-green: #1f4842;          /* buttons */
  --pd-green-strong: #173832;   /* button hover */
  --pd-green-xstrong: #112a26;
  --pd-rail: #1f4842;           /* navigation */
}

/* Saved drafts (Wholesale): the same top sheet, a little wider for the Resume buttons */
#draftsModalBackdrop > .modal{ width: min(520px, 100%) !important; max-width: 520px !important; }

/* Dashboard Week / Orders pills: grey fill */
.range-pill{ background:#eef0f2 !important; border-color:transparent !important; }
.range-pill:hover, .range-pill.open{ background:#e3e5e8 !important; }

/* Thin divider between the Apilox logo and the nav items */
.sidebar .logo{ border-bottom:1px solid rgba(255,255,255,.14) !important; margin-bottom:8px !important; }

/* ── RESPONSIVE: phones, tablets, iPads ─────────────────────────────────────
   The content column must shrink to the screen; wide things (tables, boards)
   scroll sideways inside their own card instead of widening the page. */
@media (max-width: 1024px){
  html, body{ max-width: 100%; overflow-x: hidden; }
  body{ padding: 0 !important; }
  .app{ width: 100% !important; max-width: 100vw; min-width: 0 !important; }
  .main{ flex: 1 1 auto !important; min-width: 0 !important; max-width: 100% !important; width: 100% !important; align-self: stretch !important; }
  .main img, .main video, .main canvas{ max-width: 100%; }
}

/* bolder Business, Stock and Finance icons: the PNG is drawn on ::before and thickened with a drop-shadow outline on the icon */
.sidebar .nav-icon-business, .sidebar .nav-icon-stock, .sidebar .nav-icon-finance{
  -webkit-mask: none !important; mask: none !important; background: none !important;
  filter: drop-shadow(.35px 0 0 currentColor) drop-shadow(0 .35px 0 currentColor);
}
.sidebar .nav-icon-business::before, .sidebar .nav-icon-stock::before, .sidebar .nav-icon-finance::before{
  content: "" !important; width: 22px; height: 22px; background: currentColor;
}
.sidebar .nav-icon-business::before{ -webkit-mask: url("../images/business.png") center / contain no-repeat; mask: url("../images/business.png") center / contain no-repeat; }
.sidebar .nav-icon-stock::before{ -webkit-mask: url("../images/stock.png") center / contain no-repeat; mask: url("../images/stock.png") center / contain no-repeat; }
.sidebar .nav-icon-finance::before{ -webkit-mask: url("../images/finance.png") center / contain no-repeat; mask: url("../images/finance.png") center / contain no-repeat; }

/* Register: the memo (page + pencil) icon */
.sidebar .nav-icon-register::before{ content: "" !important; width: 22px; height: 22px; background: currentColor; -webkit-mask: url("../images/memo.png") center / contain no-repeat; mask: url("../images/memo.png") center / contain no-repeat; }

/* ── PHONES (≤600px) ─────────────────────────────────────────────────────── */
@media (max-width: 600px){
  /* top bar: keep the title readable; drop the icons that also live elsewhere */
  .topbar .left{ min-width: 110px !important; }
  .topbar .right .pd-help-btn, .topbar .right .apx-refresh, .topbar .right #messagesBtn{ display: none !important; }
  /* page buttons in the top bar become round icon buttons */
  .topbar.topbar.topbar .right > .btn, .topbar.topbar.topbar .right > a.btn, .topbar.topbar.topbar .right > .buy-sell, .topbar.topbar.topbar .right > button.btn-primary, .topbar.topbar.topbar .right > .primary-btn{
    font-size: 0 !important; width: 36px !important; min-width: 36px !important; height: 36px !important; padding: 0 !important;
    justify-content: center !important; gap: 0 !important; border-radius: 50% !important; flex: none;
  }
  .topbar.topbar.topbar .right > .btn i, .topbar.topbar.topbar .right > .buy-sell i, .topbar.topbar.topbar .right > .primary-btn i, .topbar.topbar.topbar .right > .btn-primary i{ font-size: 18px !important; margin: 0 !important; }
  .topbar.topbar.topbar .right > .btn svg, .topbar.topbar.topbar .right > .buy-sell svg, .topbar.topbar.topbar .right > .primary-btn svg, .topbar.topbar.topbar .right > .btn-primary svg{ width: 18px !important; height: 18px !important; margin: 0 !important; }
  .topbar.topbar.topbar .right > .btn span, .topbar.topbar.topbar .right > .buy-sell span, .topbar.topbar.topbar .right > .primary-btn span{ display: none !important; }

  /* stat cards: two per row instead of one tall column */
  .kpi-row-outer{ display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0 !important; }
  .kpi-row-outer > .vline, .kpi-row-outer > .kpi-vline, .kpi-row-outer > .hline{ display: none !important; }
  .kpi-row-outer > *{ min-width: 0 !important; width: auto !important; max-width: none !important; border: 0 !important; padding: 14px 14px !important; }
  .kpi-row-outer > *:not(.vline):not(.kpi-vline){ border-bottom: 1px solid var(--pd-divider-light) !important; }
  .kpi-row-outer [class*="kpi-value"], .kpi-row-outer .value, .kpi-row-outer .big{ font-size: 18px !important; line-height: 24px !important; overflow-wrap: anywhere; }
  .kpi-row-outer [class*="kpi-sub"], .kpi-row-outer [class*="kpi-label"]{ white-space: normal !important; }

  /* Ask Brad: just Brad's face, so it covers less */
  .apx-fab span{ display: none !important; }
  .apx-fab{ padding: 0 !important; width: 48px !important; justify-content: center; }
  .apx-fab .apx-brad{ margin: 0 !important; }

  /* side sheets and modals use the full width */
  .modal, .modal-box, .modal-card{ max-width: 100vw !important; }
  .main table{ font-size: 13px; }
}

/* top bar sync (offline queue) button: the sync.png cloud-with-arrows icon */
.apx-queue i.ph-cloud-arrow-up::before{ content: "" !important; display: inline-block; width: 18px; height: 18px; background: currentColor; vertical-align: middle;
  -webkit-mask: url("../images/sync.png") center / contain no-repeat; mask: url("../images/sync.png") center / contain no-repeat; }

/* top bar notifications button: the notification-bell.png icon */
.apx-notif i.ph-bell::before{ content: "" !important; display: inline-block; width: 18px; height: 18px; background: currentColor; vertical-align: middle;
  -webkit-mask: url("../images/notification-bell.png") center / contain no-repeat; mask: url("../images/notification-bell.png") center / contain no-repeat; }

/* top bar refresh button: the refresh.png icon */
.apx-refresh i.ph-arrow-clockwise::before{ content: "" !important; display: inline-block; width: 20px; height: 20px; vertical-align: middle;
  background: url("../images/refresh.png") center / contain no-repeat; }

@media (max-width: 600px){
  .topbar.topbar.topbar .right > .new-sale, .topbar.topbar.topbar .right > .btn-outline{ font-size: 0 !important; width: 36px !important; min-width: 36px !important; height: 36px !important; padding: 0 !important; justify-content: center !important; gap: 0 !important; border-radius: 50% !important; flex: none; }
  .topbar.topbar.topbar .right > .new-sale i, .topbar.topbar.topbar .right > .btn-outline i{ font-size: 18px !important; margin: 0 !important; }
  .topbar.topbar.topbar .right > .new-sale svg, .topbar.topbar.topbar .right > .btn-outline svg{ width: 18px !important; height: 18px !important; margin: 0 !important; }
  .topbar.topbar.topbar .right > .new-sale span, .topbar.topbar.topbar .right > .btn-outline span:not([class*="badge"]){ display: none !important; }
  .topbar.topbar.topbar .right > .grn-badge, .topbar.topbar.topbar .right > .updated-text{ display: none !important; }
  .topbar > .search-wrap{ flex: 0 1 120px; min-width: 0; }
  .topbar > .search-wrap input{ width: 100% !important; min-width: 0 !important; }
  .topbar.topbar.topbar .right > .period-dd{ max-width: 120px; }
}
.apx-notif .icon-btn:has(> svg) > svg{ display: none !important; }
.apx-notif .icon-btn:has(> svg)::before{ content: ""; display: inline-block; width: 18px; height: 18px; background: var(--pd-icon-2, #4d5059);
  -webkit-mask: url("../images/notification-bell.png") center / contain no-repeat; mask: url("../images/notification-bell.png") center / contain no-repeat; }

/* every delete icon uses the same trash.png (images/trash.png, also behind .aicon-trash) */
i.ph-trash::before, i.ph-trash-simple::before{ content: "" !important; display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; background: currentColor;
  -webkit-mask: url("../images/trash.png") center / contain no-repeat; mask: url("../images/trash.png") center / contain no-repeat; }

/* Offline: no banner - the top-bar sync icon turns yellow while Apilox can't
   be reached and goes back to its normal colour when the connection returns
   (js/api.js toggles html.apx-offline). */
html.apx-offline .apx-queue .icon-btn, html.apx-offline .apx-queue .icon-btn i{ color: #e5a000 !important; }
html.apx-offline .apx-queue .icon-btn{ background: #fff6dc !important; }

/* Page search: a plain box on the left under the KPI row (transactions, credit, expenses, wholesale,
   suppliers, CubCart) -- same look as inventory's "Search medicines". Replaces the search
   icon that used to sit in the top bar. .pd-search-end parks it at the right end of a list
   toolbar instead (GRN, Transfer, Stock take, Rx review). */
.pd-search-row{ display:flex; align-items:center; gap:12px; margin:0 0 16px; }
.pd-search{ display:inline-flex; align-items:center; gap:8px; height:36px; width:300px; max-width:100%; padding:0 12px;
  background:#fff; border:1px solid rgba(33,35,44,.14); border-radius:8px; color:#65686f; cursor:text; }
.pd-search i{ font-size:17px; flex:none; }
.pd-search input{ flex:1; min-width:0; border:0 !important; background:transparent !important; outline:none; box-shadow:none !important;
  font:inherit; font-size:14px; color:#21232c; padding:0 !important; height:100%; width:auto !important; }
.pd-search:focus-within{ box-shadow:0 0 0 2px rgba(17,17,17,.12); }
.pd-search input{ min-height:0 !important; }
.pd-search-end{ margin-left:auto; width:320px; }
@media (max-width:600px){ .pd-search{ width:100%; } }

/* Waiting for registration approval (js/api.js showPendingApprovalScreen): replaces the whole app until
   Apilox approves a newly registered pharmacy. */
html.apx-pending-on, html.apx-pending-on body{ overflow:hidden !important; }
.apx-pending{ position:fixed; inset:0; z-index:99990; overflow:auto; background:var(--pd-bg, #f5f5f6); display:flex; justify-content:center;
  align-items:flex-start; padding:48px 16px; font-family:Inter,-apple-system,"Segoe UI",sans-serif; color:#21232c; font-size:14px; line-height:1.5; }
.apx-pd-card{ width:100%; max-width:620px; background:#fff; border-radius:8px; box-shadow:0 1px 2px rgba(33,35,44,.12), 0 8px 24px rgba(33,35,44,.08); padding:28px 28px 24px; }
.apx-pd-head{ display:flex; gap:16px; align-items:flex-start; }
.apx-pd-ic{ width:48px; height:48px; border-radius:10px; flex:none; display:flex; align-items:center; justify-content:center; font-size:26px; background:#fff4dc; color:#a86b00; }
.apx-pd-ic.bad{ background:#fdeceb; color:#c0262d; }
.apx-pd-kicker{ font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:#65686f; }
.apx-pd-head h1{ margin:2px 0 6px; font-size:22px; font-weight:700; letter-spacing:-.01em; color:#21232c; }
.apx-pd-head p{ margin:0; color:#3d4049; }
.apx-pd-why{ margin:18px 0 0; padding:12px 14px; border-radius:8px; background:#fdeceb; color:#8c1d22; }
.apx-pd-why b{ display:block; margin-bottom:2px; }
.apx-pd-sec{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:24px 0 10px; font-size:11.5px; font-weight:700;
  letter-spacing:.04em; text-transform:uppercase; color:#3d4049; }
.apx-pd-sec span{ text-transform:none; letter-spacing:0; font-weight:500; font-size:12.5px; color:#65686f; }
.apx-pd-steps{ list-style:none; margin:0; padding:0; }
.apx-pd-step{ display:flex; gap:12px; padding:0 0 14px; position:relative; }
.apx-pd-step:not(:last-child)::before{ content:""; position:absolute; left:11px; top:24px; bottom:2px; width:2px; background:#e6e7e9; }
.apx-pd-dot{ width:24px; height:24px; border-radius:50%; flex:none; display:flex; align-items:center; justify-content:center; font-size:13px;
  border:2px solid #c6c8cc; background:#fff; color:#fff; position:relative; z-index:1; }
.apx-pd-step.done .apx-pd-dot{ background:#1f9254; border-color:#1f9254; }
.apx-pd-step.now .apx-pd-dot{ border-color:#e5a000; box-shadow:inset 0 0 0 4px #fff, inset 0 0 0 12px #f8cf3f; }
.apx-pd-step.bad .apx-pd-dot{ border-color:#c0262d; box-shadow:inset 0 0 0 4px #fff, inset 0 0 0 12px #c0262d; }
.apx-pd-step b{ display:block; font-size:14px; font-weight:600; }
.apx-pd-step small{ display:block; font-size:12.5px; color:#65686f; }
.apx-pd-step.later b{ color:#65686f; }
.apx-pd-docs{ border:1px solid #e6e7e9; border-radius:8px; overflow:hidden; }
.apx-pd-doc{ display:flex; align-items:center; gap:12px; padding:10px 14px; border-top:1px solid #eef0f2; }
.apx-pd-doc:first-child{ border-top:0; }
.apx-pd-doc > i{ font-size:20px; color:#9ea1a8; flex:none; }
.apx-pd-doc.ok > i{ color:#1f9254; }
.apx-pd-doc span{ flex:1; min-width:0; font-weight:600; }
.apx-pd-btn{ height:32px; padding:0 12px; border:1px solid #c6c8cc; border-radius:6px; background:#fff; font:inherit; font-size:13px; font-weight:700;
  color:#21232c; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:6px; white-space:nowrap; }
.apx-pd-btn:hover{ background:#f5f5f6; }
.apx-pd-btn.lg, .apx-pd-primary{ height:36px; padding:0 16px; }
.apx-pd-primary{ border:0; border-radius:6px; background:#17181c; color:#fff; font:inherit; font-size:13px; font-weight:700; cursor:pointer;
  display:inline-flex; align-items:center; gap:6px; }
.apx-pd-primary:hover{ background:#000; }
.apx-pd-actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }
.apx-pd-msg{ min-height:0; margin-top:12px; font-size:13px; color:#1f7a3d; }
.apx-pd-msg:empty{ display:none; }
.apx-pd-msg.bad{ color:#c0262d; }
.apx-pd-note{ margin:16px 0 0; color:#65686f; }
.apx-pd-switch{ margin-top:16px; padding-top:14px; border-top:1px solid #eef0f2; font-size:13px; color:#65686f; }
.apx-pd-link{ border:0; background:none; padding:0 4px; font:inherit; font-weight:700; color:#2d8647; cursor:pointer; }
@media (max-width:600px){
  .apx-pending{ padding:16px; }
  .apx-pd-card{ padding:20px 16px; }
  .apx-pd-head{ flex-direction:column; gap:10px; }
  .apx-pd-actions > *{ flex:1 1 100%; justify-content:center; }
}
