/* =====================================================================================
   Prime Digitizing UI kit — one look for the public site, the customer dashboard (web + app)
   and the admin panel. Every colour, size, pop-up, effect and animation comes from here.
   Use the --pd-* tokens in any new CSS instead of typing colours or sizes again.
   ===================================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* brand */
  --pd-blue: #1986E5;            /* primary action, links, focus */
  --pd-blue-600: #1474c7;        /* hover / pressed */
  --pd-blue-700: #0f5ea6;        /* text on light blue */
  --pd-blue-50: #eaf3fd;         /* selected / soft backgrounds */
  --pd-blue-100: #d4e6fa;
  /* neutrals */
  --pd-ink: #172131;             /* main text */
  --pd-ink-2: #3b4a5a;           /* secondary text */
  --pd-mute: #5d6b7c;            /* hints, labels */
  --pd-faint: #8a96a3;           /* placeholders */
  --pd-rule: #dfe5ec;            /* borders, dividers */
  --pd-rule-2: #edf1f5;          /* light dividers */
  --pd-canvas: #f2f5f9;          /* page background */
  --pd-surface: #ffffff;         /* cards, pop-ups */
  /* status */
  --pd-ok: #12805c;   --pd-ok-50: #e7f6ef;
  --pd-warn: #b7791f; --pd-warn-50: #fdf3e2;
  --pd-bad: #c0392b;  --pd-bad-50: #fdecea;
  --pd-info: var(--pd-blue); --pd-info-50: var(--pd-blue-50);
  /* type */
  --pd-font: "Open Sans", "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --pd-fs-xs: 12px; --pd-fs-sm: 13.5px; --pd-fs: 15px; --pd-fs-md: 16px; --pd-fs-lg: 18px; --pd-fs-xl: 22px; --pd-fs-2xl: 28px;
  --pd-fw: 400; --pd-fw-medium: 500; --pd-fw-strong: 600;
  /* shape */
  --pd-r-sm: 8px; --pd-r: 12px; --pd-r-lg: 16px; --pd-r-xl: 20px; --pd-r-pill: 999px;
  --pd-shadow-1: 0 1px 2px rgba(23,33,49,.08);
  --pd-shadow-2: 0 6px 18px rgba(23,33,49,.10);
  --pd-shadow-3: 0 20px 60px rgba(23,33,49,.25);
  --pd-focus: 0 0 0 3px rgba(25,134,229,.28);
  /* motion */
  --pd-ease: cubic-bezier(.2,.7,.2,1);
  --pd-t-fast: .12s; --pd-t: .2s; --pd-t-slow: .32s;
  /* layers */
  --pd-z-bar: 3000; --pd-z-viewer: 2600; --pd-z-overlay: 2500; --pd-z-toast: 2700;
}

/* ---------- 2. Everyday feel (all three areas) ---------- */
::selection { background: var(--pd-blue-100); color: var(--pd-ink); }
/* scrollbars: thin, quiet, same everywhere */
* { scrollbar-width: thin; scrollbar-color: #c3ccd6 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c3ccd6; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #9fadbb; border: 3px solid transparent; background-clip: padding-box; }
/* keyboard focus is always visible, mouse focus stays clean */
:focus-visible { outline: 3px solid rgba(25,134,229,.45); outline-offset: 2px; }
/* cursor: hand on anything you can press, zoom on pictures you can open, wait while busy */
a[href], button:not(:disabled), [role="button"], label[for], select, summary, .btn:not(.disabled):not(:disabled), input[type="checkbox"], input[type="radio"] { cursor: pointer; }
button:disabled, .btn:disabled, .btn.disabled, [aria-disabled="true"] { cursor: not-allowed; }
[data-pd-view], a[data-fancybox], a.fancybox-button, a.fancybox-img-link, a.order-image-thumbnail-carousel, a.quote-image-thumbnail-carousel, .pf-main { cursor: zoom-in; }
html.pd-wait, html.pd-wait * { cursor: progress !important; }
/* press effect: every button and button-like link sinks a little when pressed */
.btn, button, [role="button"], input[type="submit"], input[type="button"] { -webkit-tap-highlight-color: transparent; transition: background-color var(--pd-t-fast) ease, border-color var(--pd-t-fast) ease, box-shadow var(--pd-t-fast) ease, transform .08s ease, opacity var(--pd-t-fast) ease; }
.btn:active:not(:disabled):not(.disabled), button:active:not(:disabled), [role="button"]:active, input[type="submit"]:active:not(:disabled), input[type="button"]:active:not(:disabled) { transform: scale(.97); }
/* smooth page-to-page changes in browsers that support it */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }

/* ---------- 3. Loading bar (top of the screen) ---------- */
.pd-bar { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; height: 3px; z-index: var(--pd-z-bar); pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.pd-bar.is-on { opacity: 1; }
.pd-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pd-blue), #59b0f5); box-shadow: 0 0 8px rgba(25,134,229,.6); border-radius: 0 3px 3px 0; transition: width .3s var(--pd-ease); }

/* ---------- 4. Waiting: spinner, busy buttons, skeletons ---------- */
.pd-spin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(25,134,229,.25); border-top-color: var(--pd-blue); animation: pd-rot .7s linear infinite; vertical-align: -4px; }
.pd-spin.is-light { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes pd-rot { to { transform: rotate(360deg); } }
.pd-busy { position: relative; pointer-events: none !important; opacity: .85; }
.pd-busy::after { content: ""; display: inline-block; width: 16px; height: 16px; margin-left: 10px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: currentColor; animation: pd-rot .7s linear infinite; vertical-align: -3px; }
input.pd-busy::after { display: none; }
.pd-skel { position: relative; overflow: hidden; background: #e9eef3 !important; color: transparent !important; border-radius: var(--pd-r-sm); }
.pd-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: pd-shine 1.2s infinite; }
@keyframes pd-shine { to { transform: translateX(100%); } }
.pd-waiting { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px 16px; color: var(--pd-mute); font-size: var(--pd-fs); }
/* the old "Loading…" blocks use the same look */
.loading:not(.pd-skip) { color: transparent !important; font-size: 0 !important; display: flex; justify-content: center; align-items: center; padding: 26px 0; }
.loading.hide, .loading[hidden], .loading.d-none { display: none !important; }
.loading:not(.pd-skip)::before { content: ""; width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(25,134,229,.2); border-top-color: var(--pd-blue); animation: pd-rot .7s linear infinite; }

/* ---------- 5. Toasts (messages that slide in and go away) ---------- */
.pd-toasts { position: fixed; z-index: var(--pd-z-toast); left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
body.has-app-tabs .pd-toasts { bottom: calc(86px + env(safe-area-inset-bottom)); }
@media (min-width: 992px) { .pd-toasts { left: auto; right: 24px; transform: none; bottom: 24px; align-items: flex-end; } body.has-app-tabs .pd-toasts { bottom: 24px; } }
.pd-toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--pd-r); background: #172131; color: #fff; box-shadow: var(--pd-shadow-3); font: var(--pd-fw-medium) var(--pd-fs)/1.4 var(--pd-font); animation: pd-toast-in .28s var(--pd-ease); }
.pd-toast.is-out { animation: pd-toast-out .22s ease forwards; }
.pd-toast-ico { flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.12); }
.pd-toast.is-ok .pd-toast-ico { background: #1f9c6f; } .pd-toast.is-bad .pd-toast-ico { background: #d64545; } .pd-toast.is-warn .pd-toast-ico { background: #c98a22; } .pd-toast.is-info .pd-toast-ico { background: var(--pd-blue); }
.pd-toast-msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pd-toast-x { flex: none; border: 0; background: transparent; color: rgba(255,255,255,.7); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; line-height: 1; }
.pd-toast-x:hover { background: rgba(255,255,255,.12); color: #fff; }
/* download toast: the arrow drops into the tray */
.pd-toast.is-dl .pd-toast-ico svg .pd-arrow { animation: pd-drop .9s var(--pd-ease) infinite; }
@keyframes pd-drop { 0% { transform: translateY(-5px); opacity: 0; } 40% { opacity: 1; } 80%, 100% { transform: translateY(2px); opacity: 1; } }
@keyframes pd-toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pd-toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
/* the toast libraries already on the site look the same */
.noty_layout .noty_bar, #toast-container > .toast, div.jGrowl div.jGrowl-notification { border-radius: var(--pd-r) !important; box-shadow: var(--pd-shadow-3) !important; background-image: none !important; font-family: var(--pd-font) !important; font-size: var(--pd-fs) !important; opacity: 1 !important; border: 0 !important; }
.noty_layout .noty_bar .noty_body { padding: 12px 16px !important; font-weight: 500; }
.noty_layout .noty_bar.noty_type__success, #toast-container > .toast-success { background-color: var(--pd-ok) !important; color: #fff !important; }
.noty_layout .noty_bar.noty_type__error, #toast-container > .toast-error { background-color: #b9382b !important; color: #fff !important; }
.noty_layout .noty_bar.noty_type__warning, #toast-container > .toast-warning { background-color: #a86c12 !important; color: #fff !important; }
.noty_layout .noty_bar.noty_type__info, .noty_layout .noty_bar.noty_type__alert, #toast-container > .toast-info { background-color: #172131 !important; color: #fff !important; }
#toast-container > .toast { padding: 14px 16px 14px 18px !important; width: min(380px, calc(100vw - 24px)) !important; }

/* ---------- 6. Pop-ups (Bootstrap 3 + 4 modals, bootbox) ---------- */
.modal-backdrop { background: #0f1722 !important; }
.modal-backdrop.show, .modal-backdrop.in { opacity: .5 !important; }
.modal { -webkit-overflow-scrolling: touch; }
.modal-content { border: 0 !important; border-radius: var(--pd-r-lg) !important; box-shadow: var(--pd-shadow-3) !important; background: var(--pd-surface); overflow: hidden; font-family: inherit; max-width: 100%; }
.modal-dialog { background: transparent !important; box-shadow: none !important; border: 0 !important; }
.modal-header, .modal-content > .card-header, .modal-content > form > .card-header { display: flex !important; align-items: center !important; justify-content: space-between; gap: 12px; padding: 16px 16px 14px 20px !important; border-bottom: 1px solid var(--pd-rule-2) !important; background: var(--pd-surface) !important; min-height: 60px; }
.modal-header::before, .modal-header::after { display: none !important; } /* Bootstrap 3 clearfix */
.modal-title, .modal .card-title, .modal-header h4, .modal-header h5, .modal-header h3 { font-size: 17px !important; font-weight: var(--pd-fw-strong) !important; color: var(--pd-ink) !important; margin: 0 !important; line-height: 1.3 !important; flex: 1; min-width: 0; text-align: left; }
.modal-header .close, .modal .card-header .close, .modal button.close, .modal .modal-close { order: 2; position: static !important; float: none !important; flex: none; width: 40px !important; height: 40px !important; margin: 0 !important; padding: 0 !important; border-radius: 50% !important; background: var(--pd-canvas) !important; opacity: 1 !important; display: inline-flex !important; align-items: center; justify-content: center; border: 0 !important; color: var(--pd-ink) !important; text-shadow: none !important; font-size: 22px !important; line-height: 1 !important; transition: background var(--pd-t-fast) ease, transform .08s ease; }
.modal .close:hover { background: #e3e9f0 !important; }
.modal .close:active { transform: scale(.92); }
.modal .close svg path { fill: var(--pd-ink) !important; }
.modal-body { padding: 18px 20px !important; font-size: var(--pd-fs); line-height: 1.5; color: var(--pd-ink); overflow-wrap: anywhere; }
.modal-body img, .modal-body table, .modal-body iframe, .modal-body video { max-width: 100%; }
.modal-footer, .modal .footer-section { display: flex !important; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 20px 18px !important; margin: 0 !important; border-top: 1px solid var(--pd-rule-2) !important; }
.modal-footer::before, .modal-footer::after { display: none !important; }
.modal-footer .btn, .modal .footer-section .btn { min-height: 44px; margin: 0 !important; padding: 0 20px !important; border-radius: var(--pd-r) !important; font-weight: var(--pd-fw-medium) !important; }
.modal-footer .btn-primary, .modal .footer-section .btn-primary { font-weight: var(--pd-fw-strong) !important; }
.bootbox .modal-body { padding-top: 22px !important; font-size: var(--pd-fs-md); }
/* confirm pop-ups ("Are you sure?") read left to right like every other pop-up */
.modal .delete-message { text-align: left !important; }
.modal .delete-message > h4, .modal .delete-message > h5, .modal .delete-message > p { padding: 0 20px !important; text-align: left !important; }
.modal .delete-message > h4:first-child, .modal .delete-message > h5:first-child { padding-top: 18px; font-size: 16px !important; font-weight: 500 !important; color: var(--pd-ink) !important; }
.modal .delete-message > p { color: var(--pd-mute) !important; margin-bottom: 4px !important; }
.bootbox .bootbox-close-button { display: none !important; }
/* desktop and tablet: centred card that never leaves the screen */
@media (min-width: 768px) {
  /* some old pages pin pop-ups with absolute positions and transforms; the kit centres them the same way everywhere */
  .modal-dialog { position: relative !important; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important; margin-left: auto !important; margin-right: auto !important; }
  .modal.show .modal-dialog:not(.modal-xl):not(.modal-full):not(.modal-lg), .modal.in .modal-dialog:not(.modal-xl):not(.modal-full):not(.modal-lg) { display: flex; align-items: center; min-height: calc(100% - 3.5rem); margin-top: 1.75rem; margin-bottom: 1.75rem; }
  .modal-dialog > .modal-content { width: 100%; max-height: calc(100vh - 3.5rem); max-height: calc(100dvh - 3.5rem); overflow-y: auto; }
  .modal-dialog:not(.modal-lg):not(.modal-xl):not(.modal-full) { max-width: 520px; width: calc(100% - 32px); }
  .modal-dialog.modal-sm { max-width: 440px; }
  .modal.fade .modal-dialog { transition: transform .22s var(--pd-ease), opacity .22s ease !important; transform: translateY(12px) scale(.98) !important; opacity: 0; }
  .modal.show .modal-dialog, .modal.in .modal-dialog { transform: none !important; opacity: 1; }
}
/* phones: a sheet that rises from the bottom edge, never wider or taller than the screen */
@media (max-width: 767.98px) {
  .modal { padding: 0 !important; }
  .modal-dialog { margin: 0 !important; position: fixed !important; left: 0; right: 0; bottom: 0; top: auto !important; width: 100% !important; max-width: none !important; }
  .modal.fade .modal-dialog { transform: translateY(100%) !important; transition: transform .26s var(--pd-ease) !important; }
  .modal.show .modal-dialog, .modal.in .modal-dialog { transform: none !important; }
  .modal-dialog > .modal-content { border-radius: var(--pd-r-xl) var(--pd-r-xl) 0 0 !important; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overflow-x: hidden; padding-bottom: env(safe-area-inset-bottom) !important; }
  .modal-dialog > .modal-content::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: #d5dde6; margin: 8px auto -4px; flex: none; }
  .modal-footer .btn, .modal .footer-section .btn { flex: 1 1 0; }
  .modal-content table { display: block; overflow-x: auto; }
}

/* kit confirm / alert dialogs (PrimeUI.confirm, PrimeUI.alert) */
.pd-dialog { position: fixed; inset: 0; z-index: var(--pd-z-overlay); display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15,23,34,0); transition: background .2s ease; }
.pd-dialog.is-on { background: rgba(15,23,34,.5); }
.pd-dialog-card { width: min(420px, 100%); background: var(--pd-surface); border-radius: var(--pd-r-lg); box-shadow: var(--pd-shadow-3); padding: 22px 20px 18px; font-family: var(--pd-font); opacity: 0; transform: translateY(12px) scale(.98); transition: transform .22s var(--pd-ease), opacity .22s ease; }
.pd-dialog.is-on .pd-dialog-card { opacity: 1; transform: none; }
.pd-dialog-card h3 { font-size: 17px; font-weight: 600; color: var(--pd-ink); margin: 0 0 6px; }
.pd-dialog-card p { font-size: 15px; color: var(--pd-mute); line-height: 1.5; margin: 0; }
.pd-dialog-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.pd-dialog-btns button { min-height: 44px; padding: 0 18px; border-radius: var(--pd-r); border: 1px solid var(--pd-rule); background: var(--pd-surface); color: var(--pd-ink); font: 500 15px var(--pd-font); }
.pd-dialog-btns button:hover { background: var(--pd-canvas); }
.pd-dialog-btns .pd-dialog-yes { background: var(--pd-blue); border-color: var(--pd-blue); color: #fff; font-weight: 600; }
.pd-dialog-btns .pd-dialog-yes:hover { background: var(--pd-blue-600); }
.pd-dialog-btns .pd-dialog-yes.is-danger { background: var(--pd-bad); border-color: var(--pd-bad); }
@media (max-width: 767.98px) {
  .pd-dialog { align-items: flex-end; padding: 0; }
  .pd-dialog-card { width: 100%; border-radius: var(--pd-r-xl) var(--pd-r-xl) 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); }
  .pd-dialog-btns button { flex: 1 1 0; }
}

/* ---------- 7. Picture viewer (whole screen) ---------- */
.pd-viewer { position: fixed; inset: 0; z-index: var(--pd-z-viewer); background: #05080c; color: #fff; display: none; opacity: 0; transition: opacity .2s ease; touch-action: none; -webkit-user-select: none; user-select: none; overscroll-behavior: contain; }
.pd-viewer.is-on { opacity: 1; }
.pd-viewer-track { position: absolute; inset: 0; display: flex; transition: transform .3s var(--pd-ease); }
.pd-viewer-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pd-viewer-slide img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 50%; transition: transform .25s var(--pd-ease); will-change: transform; }
.pd-viewer-slide img.is-zoomed { cursor: grab; transition: none; }
.pd-viewer-slide .pd-viewer-doc { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 24px; }
.pd-viewer-slide .pd-viewer-doc a { color: #fff; background: var(--pd-blue); padding: 12px 20px; border-radius: var(--pd-r); font-weight: 600; text-decoration: none; }
.pd-viewer-ui { position: absolute; inset: 0; pointer-events: none; transition: opacity .2s ease; }
.pd-viewer.ui-off .pd-viewer-ui { opacity: 0; }
.pd-viewer-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 12px 28px 18px; background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: auto; }
.pd-viewer-cap { flex: 1; min-width: 0; font: 500 15px/1.3 var(--pd-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-viewer-n { font: 500 14px/1 var(--pd-font); opacity: .8; white-space: nowrap; }
.pd-viewer-btn { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(20,24,30,.55); color: #fff; display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: auto; transition: background var(--pd-t-fast) ease, transform .08s ease; }
.pd-viewer-btn:hover { background: rgba(60,66,76,.75); }
.pd-viewer-btn:active { transform: scale(.92); }
.pd-viewer-btn[hidden] { display: none; }
.pd-viewer-prev, .pd-viewer-next { position: absolute; top: 50%; margin-top: -22px; }
.pd-viewer-prev { left: 14px; } .pd-viewer-next { right: 14px; }
.pd-viewer-thumbs { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; justify-content: center; overflow-x: auto; padding: 28px 12px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.55)); pointer-events: auto; scrollbar-width: none; }
.pd-viewer-thumbs::-webkit-scrollbar { display: none; }
.pd-viewer-thumbs[hidden] { display: none; }
.pd-viewer-thumbs button { flex: none; width: 52px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #222; opacity: .55; transition: opacity .15s, border-color .15s; }
.pd-viewer-thumbs button.is-on { opacity: 1; border-color: #4ea3f0; }
.pd-viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-viewer-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; font: 500 15px var(--pd-font); opacity: .85; pointer-events: none; }
.pd-viewer-msg[hidden] { display: none; }
@media (max-width: 767.98px) { .pd-viewer-prev, .pd-viewer-next { display: none; } }
html.pd-lock, html.pd-lock body { overflow: hidden !important; }

/* ---------- 8. Processing overlay (payments, uploads, anything that must not be interrupted) ---------- */
.pd-overlay { position: fixed; inset: 0; z-index: var(--pd-z-overlay); display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(15,23,34,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s ease; }
.pd-overlay.is-on { display: flex; opacity: 1; }
.pd-overlay-card { width: min(360px, 100%); background: var(--pd-surface); border-radius: var(--pd-r-xl); box-shadow: var(--pd-shadow-3); padding: 28px 24px 24px; text-align: center; font-family: var(--pd-font); animation: pd-pop .26s var(--pd-ease); }
.pd-overlay-card h3 { font-size: 18px; font-weight: 600; color: var(--pd-ink); margin: 16px 0 6px; }
.pd-overlay-card p { font-size: 14.5px; color: var(--pd-mute); margin: 0; line-height: 1.5; }
.pd-ring { width: 64px; height: 64px; margin: 0 auto; position: relative; }
.pd-ring svg { width: 64px; height: 64px; }
.pd-ring .pd-ring-track { stroke: var(--pd-blue-50); }
.pd-ring .pd-ring-arc { stroke: var(--pd-blue); stroke-dasharray: 60 200; transform-origin: 32px 32px; animation: pd-rot .9s linear infinite; }
.pd-ring .pd-ring-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--pd-blue); }
.pd-overlay.is-done .pd-ring-arc { animation: none; stroke: var(--pd-ok); stroke-dasharray: 200 0; transition: stroke-dasharray .4s ease; }
.pd-overlay.is-done .pd-ring-track { stroke: var(--pd-ok-50); }
.pd-overlay.is-done .pd-ring-icon { color: var(--pd-ok); }
.pd-overlay.is-done .pd-check { stroke-dasharray: 30; stroke-dashoffset: 30; animation: pd-draw .45s .1s ease forwards; }
@keyframes pd-draw { to { stroke-dashoffset: 0; } }
@keyframes pd-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- 8b. "Get alerts on this device" card (customer app and admin) ---------- */
#prime-pwa-panel { position: fixed; z-index: 1040; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(360px, calc(100vw - 24px)); background: var(--pd-surface); border: 1px solid var(--pd-rule); border-radius: var(--pd-r-lg); box-shadow: var(--pd-shadow-3); padding: 16px 16px 14px 64px; font: var(--pd-fw) var(--pd-fs-sm)/1.45 var(--pd-font); color: var(--pd-ink); animation: pd-toast-in .3s var(--pd-ease); }
#prime-pwa-panel.is-out { animation: pd-toast-out .22s ease forwards; }
#prime-pwa-panel .ico { position: absolute; left: 16px; top: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--pd-blue-50); color: var(--pd-blue); display: flex; align-items: center; justify-content: center; }
#prime-pwa-panel b { display: block; font-size: var(--pd-fs); font-weight: var(--pd-fw-strong); margin: 2px 28px 2px 0; }
#prime-pwa-panel p { margin: 0 0 12px; color: var(--pd-mute); }
#prime-pwa-panel .row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
#prime-pwa-panel .row button { flex: 1 1 auto; min-height: 40px; border: 0; border-radius: var(--pd-r); padding: 0 14px; font: var(--pd-fw-medium) 14px var(--pd-font); }
#prime-pwa-panel .go { background: var(--pd-blue); color: #fff; font-weight: var(--pd-fw-strong) !important; }
#prime-pwa-panel .go:hover { background: var(--pd-blue-600); }
#prime-pwa-panel .ghost { background: var(--pd-canvas); color: var(--pd-ink); }
#prime-pwa-panel .ghost:hover { background: #e3e9f0; }
#prime-pwa-panel .x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--pd-mute); display: flex; align-items: center; justify-content: center; }
#prime-pwa-panel .x:hover { background: var(--pd-canvas); }
#prime-pwa-panel .msg { margin-top: 8px; color: var(--pd-blue-700); }
#prime-pwa-panel .msg:empty { display: none; }
body.has-app-tabs #prime-pwa-panel { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (max-width: 767.98px) { #prime-pwa-panel { right: 12px; left: 12px; width: auto; } }
@media (min-width: 992px) { body.has-app-tabs #prime-pwa-panel { bottom: 24px; } }

/* ---------- 9. Dropdowns, tooltips, popovers ---------- */
.dropdown-menu { border: 1px solid var(--pd-rule) !important; border-radius: var(--pd-r) !important; box-shadow: var(--pd-shadow-2) !important; padding: 6px !important; }
.dropdown-menu > li > a, .dropdown-menu .dropdown-item { border-radius: var(--pd-r-sm); transition: background var(--pd-t-fast) ease; }
.tooltip-inner { background: #172131 !important; border-radius: var(--pd-r-sm) !important; padding: 6px 10px !important; font-size: 13px !important; }
.popover { border: 0 !important; border-radius: var(--pd-r) !important; box-shadow: var(--pd-shadow-2) !important; font-family: inherit; }

/* ---------- 10. Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Pop-ups with file pickers inside (re-open order, chat) ---------- */
.modal .design-row { margin-left: 0 !important; margin-right: 0 !important; max-width: 100%; }
.modal .design-row .v_design_div { margin-left: 0 !important; flex: 0 0 100% !important; max-width: 100% !important; }
.modal .btn-file { overflow: hidden; }
.modal .modal-body { overflow-x: hidden; }
/* file picker preview pop-up (PDFs and videos; pictures open in the viewer) */
#kvFileinputModal .btn-navigate { position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(20,24,30,.55); color: #fff; display: inline-flex; align-items: center; justify-content: center; z-index: 2; }
#kvFileinputModal .btn-navigate.btn-prev { left: 8px; right: auto; }
#kvFileinputModal .btn-navigate.btn-next { right: 8px; left: auto; }
#kvFileinputModal .btn-navigate i { font-size: 18px; }
#kvFileinputModal .modal-body { position: relative; }
#kvFileinputModal .kv-zoom-actions .btn { width: 40px; height: 40px; border-radius: 50%; padding: 0; display: inline-flex; align-items: center; justify-content: center; margin-left: 4px; }
#kvFileinputModal .kv-zoom-actions .btn-toggleheader, #kvFileinputModal .kv-zoom-actions .btn-borderless { display: none; }

/* ---------- Picture peek (mouse hover on small pictures, every page) ---------- */
.pd-peek { position: fixed; z-index: calc(var(--pd-z-viewer) - 1); pointer-events: none; border-radius: var(--pd-r, 12px); background: #fff; box-shadow: 0 14px 40px rgba(16,24,40,.28), 0 0 0 1px rgba(16,24,40,.06); padding: 6px; opacity: 0; transform: scale(.45); transition: opacity .16s ease, transform .2s var(--pd-ease); }
.pd-peek.is-on { opacity: 1; transform: scale(1); }
.pd-peek img { width: 100%; height: 100%; object-fit: contain; border-radius: calc(var(--pd-r, 12px) - 4px); display: block; }
@media (prefers-reduced-motion: reduce) { .pd-peek { transition: opacity .1s linear; transform: none; } }

/* ---------- Touch targets: small icon links inside chats and lists ---------- */
@media (pointer: coarse) {
  a.attech-icon, .attech-icon { min-width: 40px; min-height: 40px; display: inline-flex !important; align-items: center; justify-content: center; }
  /* Plain text links: a taller tap area on touch screens. Vertical padding on an inline link
     grows what a finger can hit without moving the text around it. */
  :where(p, li, td, dd, small, label, span, div, h1, h2, h3, h4, h5, h6) > a:where(:not([class]), [class=""], .link, .text-link, .edit-name, .edit-email, .modal_sample_file_download, .monthly_diff_card) { padding-block: 6px; }
  a.edit-name, a.edit-email { padding-inline: 4px; }
}

/* Loading pill for touch screens (see UI.bar in prime-ui.js) */
.pd-loadpill { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 76px); z-index: 2147483000; transform: translate(-50%, -8px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 999px; background: #fff; color: var(--pd-ink, #172131); font-size: 15px; font-weight: 600;
  box-shadow: 0 8px 28px rgba(16,24,40,.18), 0 0 0 1px rgba(16,24,40,.06); transition: opacity .18s ease, transform .18s ease; }
.pd-loadpill.is-on { opacity: 1; transform: translate(-50%, 0); }
.pd-loadpill-ring { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid #d6e6f8; border-top-color: var(--pd-blue, #1986E5); animation: pd-rot .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .pd-loadpill-ring { animation-duration: 2s; } .pd-loadpill { transition: none; } }
