/*
 * df-tokens.css: the DigiFarmer design tokens for the web.
 *
 * Written by hand from the kit's tokens.json (plan section 3.1, item 2-K-03),
 * with the same values as the apps' KitColors, KitColorsDark, KitSpace,
 * KitText, KitRadius and KitMotion. Change tokens.json first, then this file.
 * From the kit's folder, `dart run tool/check_css_tokens.dart [file]` and
 * test/css_tokens_test.dart fail while the two differ.
 *
 * Connect copies this file to public/css/df-tokens.css and loads it before
 * theme.css (items 2-W-02 and 2-W-08). By itself it only names values: no
 * rule here styles anything.
 *
 * Names: a token's name with dashes, after --df- (primary.strong is
 * --df-primary-strong). Sizes are px, as tokens.json says for the web (the
 * apps' dp and sp). Not here, because only the apps use them: the kit's
 * component colours (color.kit), elevation, the 48 dp app tap target and the
 * app font.
 *
 * The new look (owner answers WR-18, WR-19, WR-20, WR-22 of 3 Dec 2026): the
 * leaf green stays the one main colour, five helper colours each with one
 * meaning, and dark mode. Dark mode is on when the browser asks for it and
 * the person did not choose Light (<html data-theme="light">), or when the
 * person chose Dark (<html data-theme="dark">).
 */

:root {
  /* Colours, by role. A status is always a word and a tone, never colour
     alone: dark words on a light tint of its helper colour. */
  --df-primary: #00803C;              /* buttons, selected states (leaf green) */
  --df-on-primary: #FFFFFF;           /* words on primary, primary-strong, error */
  --df-primary-strong: #00703A;       /* hover, pressed, green words and links */
  --df-primary-container: #DFF7E9;    /* selected chips and tints */
  --df-on-primary-container: #00703A; /* words on primary-container */
  --df-ink: #10231A;                  /* body text */
  --df-ink-soft: #4A5459;             /* secondary text */
  --df-ink-muted: #5E6B64;            /* hints, unselected labels */
  --df-outline: #DCE5E0;              /* dividers, card edges (not for words) */
  --df-outline-strong: #7A867F;       /* input borders */
  --df-surface: #FFFFFF;              /* cards, sheets */
  --df-background: #F5F8F6;           /* the page behind the cards */
  --df-success: #05603A;              /* done, paid, approved */
  --df-success-container: #DFF7E9;
  --df-warning: #5C3900;              /* pending, waiting */
  --df-warning-container: #FFF1CC;
  --df-error: #B3261E;                /* failed, rejected, danger buttons */
  --df-error-container: #FFE4DE;
  --df-info: #0A3F91;                 /* open, sent, disbursed */
  --df-info-container: #E1EEFF;
  --df-neutral: #4A5459;              /* other states, categories */
  --df-neutral-container: #EEF1EF;
  --df-done: #3B2496;                 /* completed, closed */
  --df-overdue: #A63A0A;
  --df-offline: #37474F;

  /* Brand: never for words or controls. */
  --df-brand-logo: #009246;           /* the logo only */
  --df-accent-blue: #0878C9;          /* the header gradient only */

  /* Helper colours (WR-19): fills for icons, number tiles, charts and counts,
     one meaning each; never words on white. */
  --df-fresh: #1FC16B;                /* growth, money in, done */
  --df-sun: #FFC533;                  /* waiting, needs a look */
  --df-sky: #2E90FA;                  /* open, sent, information */
  --df-coral: #F9705F;                /* problems, late, refused */
  --df-violet: #7A5AF8;               /* finished, closed, people */
  --df-on-helper: #10231A;            /* words on fresh, sun, sky, coral */
  --df-violet-tint: #ECE7FF;          /* behind done words */

  /* Connect's older names, pointed at the roles: one green (owner decision
     D30). theme.css sets its own until item 2-W-02 removes them. */
  --df-green: var(--df-primary);
  --df-green-2: var(--df-primary-strong);

  /* Spacing. */
  --df-space-xs: 4px;
  --df-space-s: 8px;
  --df-space-m: 12px;
  --df-space-l: 16px;
  --df-space-xl: 24px;
  --df-space-xxl: 32px;
  --df-space-xxxl: 48px;

  /* Corners: md is the default (cards, buttons, inputs), lg for dialogs. */
  --df-radius-xs: 4px;
  --df-radius-sm: 8px;
  --df-radius-md: 12px;
  --df-radius-lg: 16px;
  --df-radius-pill: 999px;

  /* How long things move; nothing moves when the browser asks for less
     motion (below). */
  --df-motion-fast: 150ms;
  --df-motion-medium: 250ms;
  --df-motion-slow: 350ms;

  /* Text: the system's own font, and nothing smaller than 12px. */
  --df-font-family: system-ui, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --df-font-size-min: 12px;
  --df-font-size-display: 28px;
  --df-line-height-display: 36px;
  --df-font-size-headline: 22px;
  --df-line-height-headline: 28px;
  --df-font-size-title: 18px;
  --df-line-height-title: 24px;
  --df-font-size-subtitle: 16px;
  --df-line-height-subtitle: 22px;
  --df-font-size-body-large: 16px;     /* body text on the web (WR-20) */
  --df-line-height-body-large: 24px;
  --df-font-size-body: 14px;           /* body text in dense admin lists */
  --df-line-height-body: 20px;
  --df-font-size-small: 12px;          /* captions */
  --df-line-height-small: 16px;

  /* Touch screens and the keyboard: the smallest tap target, and the focus
     ring (2px of --df-primary, 2px away from the control). */
  --df-tap-target: 44px;
  --df-focus-width: 2px;
  --df-focus-offset: 2px;
}

/* The browser asks for less motion: nothing moves. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --df-motion-fast: 0ms;
    --df-motion-medium: 0ms;
    --df-motion-slow: 0ms;
  }
}

/* Dark mode (WR-22): the browser is set to dark and the person did not choose
   Light. The same values as :root[data-theme="dark"] below. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --df-primary: #3DD68C;
    --df-on-primary: #04170C;
    --df-primary-strong: #6BE3A6;
    --df-primary-container: #0F3D26;
    --df-on-primary-container: #A6F0C8;
    --df-ink: #E6EEE9;
    --df-ink-soft: #BAC7C0;
    --df-ink-muted: #98A69E;
    --df-outline: #2C3A33;
    --df-outline-strong: #7D8E85;
    --df-surface: #16201B;
    --df-background: #0E1512;
    --df-success: #7EE2A8;
    --df-success-container: #0F3A24;
    --df-warning: #FFD875;
    --df-warning-container: #3D2E05;
    --df-error: #FF8A7A;
    --df-error-container: #44160F;
    --df-info: #8EC1FF;
    --df-info-container: #0D2A4F;
    --df-neutral: #C3CEC8;
    --df-neutral-container: #2A3530;
    --df-done: #C3B5FF;
    --df-overdue: #FFA27A;
    --df-offline: #B8C4CB;
    --df-accent-blue: #5AB0F0;
    --df-sky: #53A6FF;
    --df-coral: #FF8A7A;
    --df-violet: #9B85FF;
    --df-violet-tint: #2A1F5C;
  }
}

/* Dark mode chosen by the person. */
:root[data-theme="dark"] {
  --df-primary: #3DD68C;
  --df-on-primary: #04170C;
  --df-primary-strong: #6BE3A6;
  --df-primary-container: #0F3D26;
  --df-on-primary-container: #A6F0C8;
  --df-ink: #E6EEE9;
  --df-ink-soft: #BAC7C0;
  --df-ink-muted: #98A69E;
  --df-outline: #2C3A33;
  --df-outline-strong: #7D8E85;
  --df-surface: #16201B;
  --df-background: #0E1512;
  --df-success: #7EE2A8;
  --df-success-container: #0F3A24;
  --df-warning: #FFD875;
  --df-warning-container: #3D2E05;
  --df-error: #FF8A7A;
  --df-error-container: #44160F;
  --df-info: #8EC1FF;
  --df-info-container: #0D2A4F;
  --df-neutral: #C3CEC8;
  --df-neutral-container: #2A3530;
  --df-done: #C3B5FF;
  --df-overdue: #FFA27A;
  --df-offline: #B8C4CB;
  --df-accent-blue: #5AB0F0;
  --df-sky: #53A6FF;
  --df-coral: #FF8A7A;
  --df-violet: #9B85FF;
  --df-violet-tint: #2A1F5C;
}

/* =========================================================================
 * Connect only (item 2-W-02; findings SA-VIS-5, SA-VIS-6, DS-COL-3,
 * DS-WEB-25). Everything above is the kit's file, unchanged; the kit's check
 * (tool/check_css_tokens.dart) reads only that part. Below, the classes of
 * Bootstrap 3, AdminLTE 2 and daisyUI are drawn with the tokens. This file
 * loads after vendor.css and the compiled Tailwind and before theme.css, so
 * the !important here beats vendor.css's own !important colours.
 *
 * One green (D30, kept by WR-19): the leaf green #00803C (--df-primary) for
 * buttons, selected states and fills; #00703A (--df-primary-strong) for hover
 * and for green words and links; #009246 (--df-brand-logo) only for the logo.
 * Only primary and error are solid fills among the roles; a status is a word
 * on its tone's tint. The helper colours (--df-fresh, --df-sun, --df-sky,
 * --df-coral, --df-violet) are fills for icons, number tiles and counts.
 *
 * WR-18 (owner, 3 Dec 2026): the new look replaces "no redesign". WR-22: dark
 * mode now. Every rule below is written with the tokens, so it draws the light
 * and the dark look; the dark colours come from the kit's two dark blocks
 * above (the browser set to dark unless the person chose Light, or the
 * person's own Dark: <html data-theme>, App\Support\Shell\UiTheme). Connect's
 * own values that are not kit tokens are --dfui-* names (the kit's check
 * allows no other --df- name).
 * ========================================================================= */

/* Connect's own values, light, and the browser's own parts (scroll bars, date
   pickers, checkboxes) in the light or the dark look. */
:root {
  color-scheme: light;
  --dfui-error-pressed: #8C1D18;      /* a danger button pressed */
  --dfui-shadow-card: 0 1px 2px rgba(16, 35, 26, 0.05), 0 1px 3px rgba(16, 35, 26, 0.08);
  --dfui-shadow-raised: 0 12px 32px rgba(16, 35, 26, 0.16);
  --dfui-hover: rgba(16, 35, 26, 0.05); /* a row or a menu item under the mouse */
}

/* daisyUI (tw-dw-*) had its own violet primary and pale status colours.
 * It reads var(--fallback-p, oklch(var(--p))) and the like. The fallbacks are
 * always set, so they decide the colour; --p and the others are the same
 * colours in oklch, for the rules that read only them. Each status colour is
 * its tone (daisyUI also writes it as the words of an outline button, such as
 * the "Actions" button of every table), with on-primary words on it (white in
 * the light look, dark in the dark look). */
:root,
[data-theme] {
  --fallback-p: #00803C;   --p: 52.478% 0.1415 150.90;    /* primary */
  --fallback-pc: #FFFFFF;  --pc: 100% 0 0;                /* on-primary */
  --fallback-er: #B3261E;  --er: 50.128% 0.1783 28.70;    /* error */
  --fallback-erc: #FFFFFF; --erc: 100% 0 0;
  --fallback-su: #05603A;  --su: 43.150% 0.0995 157.67;   /* success */
  --fallback-suc: #FFFFFF; --suc: 100% 0 0;
  --fallback-wa: #5C3900;  --wa: 37.735% 0.0811 71.29;    /* warning */
  --fallback-wac: #FFFFFF; --wac: 100% 0 0;
  --fallback-in: #0A3F91;  --in: 38.999% 0.1457 259.92;   /* info */
  --fallback-inc: #FFFFFF; --inc: 100% 0 0;
}

/* WR-22: the same in the dark look, in the same two blocks as the kit's dark
   colours (daisyUI's own [data-theme=dark] theme comes first in the cascade). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --dfui-error-pressed: #FFB4A8;
    --dfui-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.5);
    --dfui-shadow-raised: 0 12px 32px rgba(0, 0, 0, 0.6);
    --dfui-hover: rgba(255, 255, 255, 0.06);
    --fallback-p: #3DD68C;   --p: 77.943% 0.1655 157.29;
    --fallback-pc: #04170C;  --pc: 18.396% 0.0349 156.88;
    --fallback-er: #FF8A7A;  --er: 75.820% 0.1448 29.02;
    --fallback-erc: #04170C; --erc: 18.396% 0.0349 156.88;
    --fallback-su: #7EE2A8;  --su: 83.623% 0.1258 156.83;
    --fallback-suc: #04170C; --suc: 18.396% 0.0349 156.88;
    --fallback-wa: #FFD875;  --wa: 89.567% 0.1258 88.27;
    --fallback-wac: #04170C; --wac: 18.396% 0.0349 156.88;
    --fallback-in: #8EC1FF;  --in: 79.869% 0.1037 253.79;
    --fallback-inc: #04170C; --inc: 18.396% 0.0349 156.88;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --dfui-error-pressed: #FFB4A8;
  --dfui-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.5);
  --dfui-shadow-raised: 0 12px 32px rgba(0, 0, 0, 0.6);
  --dfui-hover: rgba(255, 255, 255, 0.06);
  --fallback-p: #3DD68C;   --p: 77.943% 0.1655 157.29;
  --fallback-pc: #04170C;  --pc: 18.396% 0.0349 156.88;
  --fallback-er: #FF8A7A;  --er: 75.820% 0.1448 29.02;
  --fallback-erc: #04170C; --erc: 18.396% 0.0349 156.88;
  --fallback-su: #7EE2A8;  --su: 83.623% 0.1258 156.83;
  --fallback-suc: #04170C; --suc: 18.396% 0.0349 156.88;
  --fallback-wa: #FFD875;  --wa: 89.567% 0.1258 88.27;
  --fallback-wac: #04170C; --wac: 18.396% 0.0349 156.88;
  --fallback-in: #8EC1FF;  --in: 79.869% 0.1037 253.79;
  --fallback-inc: #04170C; --inc: 18.396% 0.0349 156.88;
}
/* A filled success, warning or info button is the word in its tone on the
   tint, with an edge in the tone (only primary and error are solid), and
   solid while hovered or pressed, as the Bootstrap ones below. */
.tw-dw-btn-success:not(.tw-dw-btn-outline) { background-color: var(--df-success-container); border-color: var(--df-success); color: var(--df-success); }
.tw-dw-btn-warning:not(.tw-dw-btn-outline) { background-color: var(--df-warning-container); border-color: var(--df-warning); color: var(--df-warning); }
.tw-dw-btn-info:not(.tw-dw-btn-outline)    { background-color: var(--df-info-container); border-color: var(--df-info); color: var(--df-info); }
.tw-dw-btn-success:not(.tw-dw-btn-outline):hover, .tw-dw-btn-success:not(.tw-dw-btn-outline):focus-visible, .tw-dw-btn-success:not(.tw-dw-btn-outline):active {
  background-color: var(--df-success); color: var(--df-on-primary);
}
.tw-dw-btn-warning:not(.tw-dw-btn-outline):hover, .tw-dw-btn-warning:not(.tw-dw-btn-outline):focus-visible, .tw-dw-btn-warning:not(.tw-dw-btn-outline):active {
  background-color: var(--df-warning); color: var(--df-on-primary);
}
.tw-dw-btn-info:not(.tw-dw-btn-outline):hover, .tw-dw-btn-info:not(.tw-dw-btn-outline):focus-visible, .tw-dw-btn-info:not(.tw-dw-btn-outline):active {
  background-color: var(--df-info); color: var(--df-on-primary);
}

/* Bootstrap buttons. Primary and danger are solid. */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
  background-color: var(--df-primary) !important;
  border-color: var(--df-primary-strong) !important;
  color: var(--df-on-primary) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: var(--df-primary-strong) !important;
}
.btn-danger,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
  background-color: var(--df-error) !important;
  border-color: var(--df-error) !important;
  color: var(--df-on-primary) !important;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active {
  background-color: var(--dfui-error-pressed) !important; /* error, pressed (#8C1D18; lighter in the dark look) */
  border-color: var(--dfui-error-pressed) !important;
}

/* Success, warning and info: the word in the tone on its tint, with an edge in
   the tone, and solid while hovered or pressed. Success is no longer the same
   green as the main button. */
.btn-success { background-color: var(--df-success-container) !important; border-color: var(--df-success) !important; color: var(--df-success) !important; }
.btn-warning { background-color: var(--df-warning-container) !important; border-color: var(--df-warning) !important; color: var(--df-warning) !important; }
.btn-info    { background-color: var(--df-info-container) !important; border-color: var(--df-info) !important; color: var(--df-info) !important; }
.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success {
  background-color: var(--df-success) !important; border-color: var(--df-success) !important; color: var(--df-on-primary) !important;
}
.btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning {
  background-color: var(--df-warning) !important; border-color: var(--df-warning) !important; color: var(--df-on-primary) !important;
}
.btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info {
  background-color: var(--df-info) !important; border-color: var(--df-info) !important; color: var(--df-on-primary) !important;
}
.btn-border-success { border-color: var(--df-success); color: var(--df-success); }
.btn-border-warning { border-color: var(--df-warning); color: var(--df-warning); }
.btn-border-danger  { border-color: var(--df-error); color: var(--df-error); }
.btn-border-info    { border-color: var(--df-info); color: var(--df-info); }

/* Status labels and badges: the word on its tint, never smaller than 12px. */
.label { font-size: max(var(--df-font-size-min), 75%); }
.badge { background-color: var(--df-neutral); } /* a plain count; was #777 (4.48:1) */
.label-primary,
.badge-primary,
.label.bg-green,
.badge.bg-green {
  background-color: var(--df-primary-container) !important;
  color: var(--df-on-primary-container) !important;
  border: 1px solid var(--df-primary-strong);
}
.label-success,
.badge-success {
  background-color: var(--df-success-container) !important;
  color: var(--df-success) !important;
  border: 1px solid var(--df-success);
}
.label-warning,
.badge-warning,
.label.bg-yellow,
.badge.bg-yellow {
  background-color: var(--df-warning-container) !important;
  color: var(--df-warning) !important;
  border: 1px solid var(--df-warning);
}
.label-danger,
.badge-danger,
.label.bg-red,
.badge.bg-red {
  background-color: var(--df-error-container) !important;
  color: var(--df-error) !important;
  border: 1px solid var(--df-error);
}
.label-info,
.badge-info,
.label.bg-aqua,
.badge.bg-aqua {
  background-color: var(--df-info-container) !important;
  color: var(--df-info) !important;
  border: 1px solid var(--df-info);
}

/* Alerts and callouts: the words in the tone on its tint. */
.alert-success,
.callout.callout-success {
  background-color: var(--df-success-container) !important;
  border-color: var(--df-success) !important;
  color: var(--df-success) !important;
}
.alert-warning,
.callout.callout-warning {
  background-color: var(--df-warning-container) !important;
  border-color: var(--df-warning) !important;
  color: var(--df-warning) !important;
}
.alert-danger,
.alert-error,
.callout.callout-danger {
  background-color: var(--df-error-container) !important;
  border-color: var(--df-error) !important;
  color: var(--df-error) !important;
}
.alert-info,
.callout.callout-info {
  background-color: var(--df-info-container) !important;
  border-color: var(--df-info) !important;
  color: var(--df-info) !important;
}
.alert-success a:not(.btn), .alert-warning a:not(.btn), .alert-danger a:not(.btn), .alert-error a:not(.btn), .alert-info a:not(.btn),
.callout.callout-success a:not(.btn), .callout.callout-warning a:not(.btn), .callout.callout-danger a:not(.btn), .callout.callout-info a:not(.btn) {
  color: inherit !important;
}

/* AdminLTE colour blocks (boxes, box icons, table head rows, dialog panels,
   progress bars) keep their white words, on fills that pass AA with them; in
   the dark look the fills are light and the words dark (--df-on-primary). */
.bg-green, .bg-yellow, .bg-red, .bg-aqua,
.modal-success .modal-body, .modal-warning .modal-body, .modal-danger .modal-body, .modal-info .modal-body {
  color: var(--df-on-primary) !important;
}
.bg-green,
.progress-bar-green {
  background-color: var(--df-primary) !important;
}
.modal-success .modal-body,
.progress-bar-success {
  background-color: var(--df-success) !important;
}
.bg-yellow,
.modal-warning .modal-body,
.progress-bar-warning,
.progress-bar-yellow {
  background-color: var(--df-warning) !important;
}
.bg-red,
.modal-danger .modal-body,
.progress-bar-danger,
.progress-bar-red {
  background-color: var(--df-error) !important;
}
.bg-aqua,
.modal-info .modal-body,
.progress-bar-aqua,
.progress-bar-info {
  background-color: var(--df-info) !important;
}

/* Status words on the page. */
.text-success { color: var(--df-success) !important; }
.text-green   { color: var(--df-primary-strong) !important; }
.text-warning,
.text-yellow  { color: var(--df-warning) !important; }
.text-danger,
.text-red     { color: var(--df-error) !important; }
.text-info,
.text-aqua    { color: var(--df-info) !important; }

/* Green words, links and muted help text. */
.text-primary { color: var(--df-primary-strong) !important; }
a { color: var(--df-primary-strong); }
/* Links darken on hover and focus; a link drawn as a button keeps its button colours. */
a:where(:not(.btn, .tw-dw-btn)):hover,
a:where(:not(.btn, .tw-dw-btn)):focus { color: var(--df-ink); }
.text-muted { color: var(--df-ink-muted) !important; }
.help-block { color: var(--df-ink-muted); }

/* Focus ring for the keyboard: 2px of the green, 2px away. */
:focus-visible {
  outline: var(--df-focus-width) solid var(--df-primary) !important;
  outline-offset: var(--df-focus-offset) !important;
}
/* On the dark header, the sidebar brand and the "signed in as" banner (the theme's
   -600 fill) the ring is white; their white menus and panels keep the green.
   The header partials are frozen (#295), so the ring is scoped on their fill. */
div.no-print:is(.tw-bg-primary-600, .tw-bg-red-600) :focus-visible,
.dfc-brand :focus-visible {
  outline-color: #fff !important;
}
div.no-print:is(.tw-bg-primary-600, .tw-bg-red-600) :is(.tw-bg-white, .dropdown-menu, .tw-dw-dropdown-content, .dfc-help-menu, .dfai-panel, .popover) :focus-visible {
  outline-color: var(--df-primary) !important;
}
/* The assistant panel's green head (--df-primary, 3-W-16) also takes the white ring. */
div.no-print:is(.tw-bg-primary-600, .tw-bg-red-600) .dfai-head :focus-visible,
.dfai-head :focus-visible {
  outline-color: #fff !important;
}
/* A dialog that takes the focus itself shows no ring round the whole box. */
.modal:focus-visible,
.modal-dialog:focus-visible,
.modal-content:focus-visible {
  outline: none !important;
}

/* 2-W-05 (SA-VIS-4): "Skip to content", out of sight until the keyboard
   reaches it. Its target, the page's scrolling area, takes the focus
   without a ring round the whole page. */
.df-skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 10000;
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid var(--df-primary);
  background: var(--df-surface);
  color: var(--df-primary-strong) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  font-weight: 600;
  text-decoration: none;
}
.df-skip-link:focus {
  top: 8px;
  text-decoration: none;
}
#scrollable-container:focus {
  outline: none !important;
}

/* 2-W-06 (plan section 3.3): the shared Blade components in
   resources/views/components. Spacing, colours and type from the tokens. */
/* 3-W-10: x-back-link (also x-page-header's "back"). */
.df-back-link {
  display: inline-block;
  margin-bottom: var(--df-space-xs);
  color: var(--df-primary-strong);
}
.df-page-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--df-space-s);
}
.df-page-header__row > h1 {
  margin: 0;
  font-size: 24px; /* as AdminLTE draws .content-header > h1 */
}
.df-page-header__row > h1 > .label { margin-left: var(--df-space-s); font-size: var(--df-font-size-body); vertical-align: middle; }
.df-page-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--df-space-s);
}
.df-page-header__subtitle {
  margin: var(--df-space-xs) 0 0;
  max-width: 72ch;
  color: var(--df-ink-muted);
  font-size: var(--df-font-size-body);
}
/* 3-W-15 (SA-VIS-24): x-tech-details, the closed "Technical details" fold for decision codes and server commands. */
.df-tech-details {
  margin: var(--df-space-s) 0;
  max-width: 72ch;
  color: var(--df-ink-muted);
  font-size: var(--df-font-size-small);
}
.df-tech-details > summary {
  display: list-item;
  cursor: pointer;
  color: var(--df-ink-muted);
}
.df-tech-details > summary:hover {
  color: var(--df-ink);
}
.df-tech-details__body {
  margin-top: var(--df-space-xs);
  padding: var(--df-space-s) var(--df-space-m);
  border-left: 3px solid var(--df-outline);
  background: var(--df-surface);
}
.df-tech-details__body > :last-child {
  margin-bottom: 0;
}
.df-field__required {
  margin-left: 2px;
  color: var(--df-error);
}
/* 4-W-01: a group of choices (radios) named like a field label, not like Bootstrap's large legend */
.df-legend {
  margin-bottom: 5px;
  border: 0;
  font-size: inherit;
  font-weight: 700;
}
/* 4-W-01: a field of a small form inside a table cell keeps a visible label */
.df-field--compact {
  margin-bottom: var(--df-space-xs);
}
.df-field--compact > label {
  margin-bottom: 2px;
  font-size: var(--df-font-size-small);
}
.df-field--compact .help-block {
  margin: 2px 0 0;
  font-size: var(--df-font-size-small);
}
.df-money,
.df-number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.df-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--df-space-s);
}
.df-row-actions__form {
  display: inline;
  margin: 0;
}
/* 5-W-01 (CS-LAYOUT-2): opposite money decisions in one cell (pay / refuse, approve / reject): each in its own block,
   16px from the next, with a small (btn-sm, not btn-xs) button, so a tap on a tablet does not land on the other one. */
.df-money-decision {
  display: block;
  margin: 0 0 var(--df-space-l);
}
.df-money-decision:last-child {
  margin-bottom: 0;
}
/* 5-W-01 (SA-VIS-9): the shared widget (components.widget) puts its content in a box that grows to the width of what is
   inside. A DataTable that folds (common.js starts DataTables Responsive and marks the table df-dtr) needs a box as wide
   as the page to know which columns to fold, so that box is a plain block there. */
.tw-inline-block.tw-min-w-full:has(table.df-dtr) {
  display: block;
}
/* The "+" that opens a folded row sits on the name cell (df-dtr-control): a tap there, or Enter on it, shows the folded
   columns under the row. */
table.dataTable.df-dtr.collapsed > tbody > tr[role=row] > td.df-dtr-control {
  position: relative;
  padding-left: 30px;
  cursor: pointer;
}
table.dataTable.df-dtr.collapsed > tbody > tr[role=row] > td.df-dtr-control::before {
  position: absolute;
  top: 9px;
  left: 4px;
  display: block;
  box-sizing: content-box;
  width: 14px;
  height: 14px;
  border: 2px solid var(--df-on-primary);
  border-radius: 14px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.45);
  background-color: var(--df-primary);
  color: var(--df-on-primary);
  font-family: 'Courier New', Courier, monospace;
  line-height: 14px;
  text-align: center;
  text-indent: 0;
  content: '+';
}
table.dataTable.df-dtr.collapsed > tbody > tr.parent > td.df-dtr-control::before {
  background-color: var(--df-error);
  content: '-';
}
/* 5-W-02 (SA-VIS-10): small buttons and boxes are at least 32px tall (Bootstrap draws btn-xs about 22px, btn-sm and
   input-sm 30px, daisyUI tw-dw-btn-xs 24px), and 44px (--df-tap-target) on a touch screen. The font stays 12px. */
.btn-xs,
.btn-sm,
.btn-group-xs > .btn,
.btn-group-sm > .btn {
  min-height: 32px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.tw-dw-btn-xs {
  height: 32px;
  min-height: 32px;
}
input.input-sm,
select.input-sm:not([multiple]),
.input-group-sm > input.form-control,
.input-group-sm > select.form-control:not([multiple]),
.input-group-sm > .input-group-addon,
.input-group-sm > .input-group-btn > .btn {
  height: 32px;
}
select.input-sm:not([multiple]),
.input-group-sm > select.form-control:not([multiple]) {
  line-height: 32px;
}
@media (pointer: coarse) {
  .btn-xs,
  .btn-sm,
  .btn-group-xs > .btn,
  .btn-group-sm > .btn {
    min-height: var(--df-tap-target);
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .tw-dw-btn-xs,
  .tw-dw-btn-sm,
  .tw-dw-input-sm,
  .tw-dw-select-sm {
    height: var(--df-tap-target);
    min-height: var(--df-tap-target);
  }
  input.input-sm,
  select.input-sm:not([multiple]),
  .input-group-sm > input.form-control,
  .input-group-sm > select.form-control:not([multiple]),
  .input-group-sm > .input-group-addon,
  .input-group-sm > .input-group-btn > .btn {
    height: var(--df-tap-target);
  }
  select.input-sm:not([multiple]),
  .input-group-sm > select.form-control:not([multiple]) {
    line-height: var(--df-tap-target);
  }
  .df-help-toggle {
    min-width: var(--df-tap-target);
    min-height: var(--df-tap-target);
  }
}
/* Row actions that DataTables controllers write as strings ("btn btn-xs ...") sit straight in the cell: 8px apart, also
   when they wrap onto a second line, so a tap does not land on the next one (x-row-actions has the same gap). */
td > :is(.btn-xs, .btn-sm, .tw-dw-btn-xs, .tw-dw-btn-sm) {
  margin-top: var(--df-space-xs);
  margin-bottom: var(--df-space-xs);
}
td > :is(.btn-xs, .btn-sm, .tw-dw-btn-xs, .tw-dw-btn-sm):not(:last-child) {
  margin-right: var(--df-space-s);
}
/* 5-W-02: help that used to open only on mouse hover. @show_tooltip draws a button that opens its note on hover, on a
   tap and on keyboard focus (public/js/app.js); Superadmin pages write the note under the field instead (help-block). */
.df-help-toggle {
  display: inline-block;
  padding: 0;
  border: 0;
  background: none;
  min-width: 24px; /* WCAG 2.5.8: at least 24px to tap */
  min-height: 24px;
  font-size: 16px; /* as .hover-q, which it also has */
  line-height: 1;
  cursor: help;
}
.df-subnav {
  margin-bottom: var(--df-space-l);
}
.df-status-chip {
  display: inline-block;
  white-space: nowrap;
}

/* 6-W-01 (SA-VIS-16, DS-WEB-19): the inline styles the Superadmin pages repeat most, as classes, so a page needs no
   style="" for them (scripts/ratchet/superadmin-ratchet.js counts what is left). Each one does what the style="" it
   replaced did, so it wins as that did (!important). A form hidden with the hidden attribute still hides. */
.df-inline { display: inline !important; }         /* was style="display:inline": a form whose button sits in a line */
.df-m-0 { margin: 0 !important; }                  /* was style="margin:0" */
.df-mt-0 { margin-top: 0 !important; }             /* was style="margin-top:0" */
.df-mb-0 { margin-bottom: 0 !important; }          /* was style="margin-bottom:0" */
.df-mt-field { margin-top: 25px !important; }      /* was style="margin-top:25px": a box or button level with the
                                                      inputs beside it, which have a label above them */
.df-pre-line { white-space: pre-line !important; } /* was style="white-space:pre-line": typed text keeps its lines */
.df-inline[hidden] { display: none !important; }

/* 6-W-03 (SA-VIS-25): small-screen polish.
   A dashboard figure's label wraps onto a second line instead of being cut ("New registr…" on a phone); a longer one
   ends in an ellipsis after two lines. */
.df-kpi-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
/* A map is at most 60% of the screen high (600px on a large one), so the page can still be scrolled past it. On a
   touch screen it moves only after a tap on .df-map-shield (the page's script), so a finger scrolling the page is not
   caught by the map. */
.df-map {
  position: relative;
  width: 100%;
  height: min(60vh, 600px);
  min-height: 280px;
  border-radius: 8px;
}
.df-map-shield {
  position: absolute;
  inset: 0;
  z-index: 1000; /* over Leaflet's panes and controls */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.12);
  color: var(--df-ink);
  font: inherit;
  cursor: pointer;
}
.df-map-shield span {
  padding: var(--df-space-xs) var(--df-space-m);
  border-radius: 999px;
  background: var(--df-surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* Less motion, when the browser asks for it: nothing slides or spins. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 4-W-04 (CS-STATE-2): the password re-check ran out (components/recheck-timer, common.js) */
.df-recheck[hidden],
form[data-df-recheck][hidden] {
    display: none;
}
.df-recheck-note {
    margin: 0 0 var(--df-space-s);
    color: var(--df-ink-muted);
}

/* 6-W-05 (DS-BRAND-24): Superadmin > Farmer app branding draws each waiting colour as a small button with white
   writing. Only the button's background (the business's own colour) stays inline on the page. */
.df-brand-colours { margin: 4px 0; }
.df-brand-colour { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.df-brand-colour-chip {
  display: inline-block;
  min-width: 64px;
  padding: 4px 8px;
  border-radius: 4px;
  color: #FFFFFF; /* on the business's own colour, in the light and the dark look */
  font-weight: 600;
  text-align: center;
}
.df-brand-reject { display: flex; gap: 6px; flex-wrap: wrap; }

/* Team & access, a person's page (owner, 24 Nov 2026): what they may do, as a bulleted list (Tailwind's reset removes
   the bullets of every <ul>). */
.df-bullets { list-style: disc; padding-left: 1.25rem; }

/* =========================================================================
 * WR-18, WR-19, WR-20, WR-22 (owner, 3 Dec 2026): the new look on the old
 * shared classes, once for every page that is not rebuilt yet. Only colours,
 * corners, borders, shadows and text size change; no markup, no layout, no
 * height of a control (so no page moves). Written with the tokens, so each
 * rule draws the light and the dark look. Colours written inside a page
 * (style="" and the pages' own <style> blocks) are not reached; those pages
 * change when they are rebuilt with the x-ui components (phases 4, 5 and 7).
 * ========================================================================= */

/* Text (WR-20): the system font, at 15px for body text (was 14px), and the
   same font for headings (AdminLTE named "Source Sans Pro", which is never
   loaded, so headings fell back to another font). */
body {
  font-size: 15px;
  line-height: 1.5;
  color: var(--df-ink);
}
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.main-header .logo,
.content-header > h1 {
  font-family: var(--df-font-family);
}
/* T4APP: headings take the ink of what they stand on (vendor.css gives every heading a dark navy, which could not be
   read in the dark look), and AdminLTE's grey blocks are grey in both looks. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 { color: inherit; }
.bg-gray {
  background-color: var(--df-neutral-container) !important;
  color: var(--df-ink);
}
hr { border-top-color: var(--df-outline); }
label { color: var(--df-ink); }

/* The page and the cards behind the Tailwind classes the shell and the newer
   pages use: the same colours in the light look (white, and the tokens' page
   grey instead of a blue grey), the dark ones in the dark look. */
.tw-bg-white { background-color: var(--df-surface); }
.tw-bg-gray-25,
.tw-bg-gray-50,
.tw-bg-gray-100 { background-color: var(--df-background); }
.tw-text-black,
.tw-text-gray-900,
.tw-text-gray-800 { color: var(--df-ink); }
.tw-text-gray-700,
.tw-text-gray-600 { color: var(--df-ink-soft); }
.tw-text-gray-400,
.tw-text-gray-500 { color: var(--df-ink-muted); }
.info-box-text { color: var(--df-ink-soft); }
.tw-bg-red-50, .tw-bg-red-100, .tw-bg-red-200 { background-color: var(--df-error-container); }
.tw-bg-yellow-50, .tw-bg-yellow-100 { background-color: var(--df-warning-container); }
.tw-bg-green-50 { background-color: var(--df-success-container); }
.tw-bg-blue-50, .tw-bg-blue-200, .tw-bg-sky-100 { background-color: var(--df-info-container); }
.tw-text-red-500, .tw-text-red-600, .tw-text-red-700 { color: var(--df-error); }
.tw-text-yellow-500, .tw-text-orange-700 { color: var(--df-warning); }
.tw-text-green-700, .tw-text-emerald-700 { color: var(--df-success); }
.tw-text-sky-500, .tw-text-blue-500, .tw-text-blue-600, .tw-text-indigo-600 { color: var(--df-info); }
.tw-ring-gray-200 { --tw-ring-color: var(--df-outline); }
.tw-border-gray-100,
.tw-border-gray-200,
.tw-border-gray-300 { border-color: var(--df-outline); }
.hover\:tw-bg-gray-100:hover,
.hover\:tw-bg-gray-50:hover { background-color: var(--dfui-hover); }
.hover\:tw-text-gray-900:hover { color: var(--df-ink); }
.content-wrapper,
.right-side,
.main-footer { background-color: var(--df-background); color: var(--df-ink); }
.main-footer { border-top-color: var(--df-outline); }

/* Cards (8 looks today): the AdminLTE box, the panel and the well become one
   white card with 16px corners, a thin edge and a soft shadow. The 3px top
   border in AdminLTE blue or grey goes. */
.box,
.nav-tabs-custom,
.panel,
.info-box,
.small-box {
  border-radius: var(--df-radius-lg);
}
.box,
.panel {
  border: 1px solid var(--df-outline);
  background: var(--df-surface);
  box-shadow: var(--dfui-shadow-card);
  color: var(--df-ink);
}
.box.box-primary, .box.box-success, .box.box-info, .box.box-warning, .box.box-danger, .box.box-default {
  border-top: 1px solid var(--df-outline);
}
.box.box-solid { border: 1px solid var(--df-outline); }
.box.box-solid > .box-header,
.box.box-solid.box-default > .box-header { background: transparent; color: var(--df-ink); }
.box.box-solid.box-default > .box-header a:not(.btn) { color: var(--df-primary-strong); }
.btn-box-tool { color: var(--df-ink-muted); }
/* T4APP: the hidden words of a wide table ("Actions") stay inside its sideways scroll, so the page does not scroll too. */
.table-responsive { position: relative; }
.box-header { color: var(--df-ink); padding: var(--df-space-m) var(--df-space-l); }
.box-header.with-border { border-bottom: 1px solid var(--df-outline); }
.box-header > .box-title,
.box-header .box-title {
  font-size: var(--df-font-size-title);
  line-height: var(--df-line-height-title);
  font-weight: 600;
}
.box-body { padding: var(--df-space-l); }
.box-footer {
  border-top: 1px solid var(--df-outline);
  border-radius: 0 0 var(--df-radius-lg) var(--df-radius-lg);
  background: var(--df-surface);
}
.panel-default > .panel-heading,
.panel-heading {
  border-color: var(--df-outline);
  border-radius: var(--df-radius-lg) var(--df-radius-lg) 0 0;
  background: var(--df-background);
  color: var(--df-ink);
}
.panel-footer { border-color: var(--df-outline); background: var(--df-background); }
.well {
  border: 1px solid var(--df-outline);
  border-radius: var(--df-radius-md);
  background: var(--df-background);
  box-shadow: none;
  color: var(--df-ink);
}
.info-box { background: var(--df-surface); color: var(--df-ink); box-shadow: var(--dfui-shadow-card); }
.callout { border-radius: var(--df-radius-md); }

/* Buttons (5 families today): 12px corners and bolder words everywhere. Main
   (btn-primary) stays the solid green, danger the solid red (above); the
   second button (btn-default) is a white button with a visible edge. */
.btn,
.tw-dw-btn {
  border-radius: var(--df-radius-md);
  font-weight: 600;
}
.btn-xs { border-radius: var(--df-radius-sm); }
.btn-group > .btn:not(:first-child):not(:last-child) { border-radius: 0; }
.btn-default,
.btn-default.btn-flat {
  border-color: var(--df-outline-strong);
  background-color: var(--df-surface);
  color: var(--df-ink);
}
.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
  border-color: var(--df-outline-strong);
  background-color: var(--df-primary-container);
  color: var(--df-on-primary-container);
}
.btn-link { color: var(--df-primary-strong); }
.btn.disabled, .btn[disabled], fieldset[disabled] .btn { opacity: 0.55; }

/* Status labels and badges (6 looks today): round pills with bold words. */
.label,
.badge {
  border-radius: var(--df-radius-pill);
  font-weight: 600;
}
.label { padding: 0.2em 0.65em 0.25em; }
.badge { color: var(--df-on-primary); }
.label-default {
  background-color: var(--df-neutral-container) !important;
  color: var(--df-neutral) !important;
  border: 1px solid var(--df-outline);
}

/* Alerts: 12px corners, the word's tone as a thin edge. */
.alert,
.callout {
  border-width: 1px;
  border-style: solid;
  border-radius: var(--df-radius-md);
}

/* Tables (4 looks today): no heavy grid, a light head row, rows that show
   under the mouse, and the token colours in the dark look too. */
.table { color: var(--df-ink); }
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
  border-color: var(--df-outline);
}
.table > thead > tr > th {
  border-bottom: 1px solid var(--df-outline);
  background-color: var(--df-background);
  color: var(--df-ink-soft);
  font-weight: 600;
}
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
  border-color: var(--df-outline);
}
.table-striped > tbody > tr:nth-of-type(odd) { background-color: var(--df-background); }
.table > tbody > tr.active > td, .table > tbody > tr.active > th, .table > tbody > tr > td.active { background-color: var(--df-neutral-container); color: var(--df-ink); }
.table-hover > tbody > tr:hover,
table.dataTable tbody tr:hover { background-color: var(--dfui-hover); }
table.dataTable tbody tr { background-color: transparent; }
.dataTables_wrapper,
.dataTables_info,
.dataTables_length,
.dataTables_filter { color: var(--df-ink-soft); }

/* Fields (3 systems today): the same box everywhere, 12px corners, a visible
   edge, green when it has the focus. Heights stay as they are. */
.form-control,
.input-group-addon,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-color: var(--df-outline-strong);
  background-color: var(--df-surface);
  color: var(--df-ink);
}
.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-radius: var(--df-radius-md);
}
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn {
  border-top-left-radius: var(--df-radius-md);
  border-bottom-left-radius: var(--df-radius-md);
}
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn {
  border-top-right-radius: var(--df-radius-md);
  border-bottom-right-radius: var(--df-radius-md);
}
.form-control:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--df-primary);
}
.form-control::placeholder { color: var(--df-ink-muted); }
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
  background-color: var(--df-background);
  color: var(--df-ink-soft);
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--df-ink); }
.select2-dropdown {
  border-color: var(--df-outline-strong);
  background-color: var(--df-surface);
  color: var(--df-ink);
}
.select2-container--default .select2-results__option[aria-selected=true] { background-color: var(--df-primary-container); color: var(--df-on-primary-container); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: var(--df-primary); color: var(--df-on-primary); }
.select2-container--default .select2-search--dropdown .select2-search__field { border-color: var(--df-outline-strong); background: var(--df-surface); color: var(--df-ink); }
.has-error .form-control { border-color: var(--df-error); }
.has-error .help-block,
.has-error .control-label { color: var(--df-error); }

/* Tabs (5 looks today): words in a row with a green line under the chosen
   one. The tab strip of AdminLTE's nav-tabs-custom box loses its blue top. */
.nav-tabs { border-bottom: 1px solid var(--df-outline); }
.nav-tabs > li > a {
  margin-right: var(--df-space-xs);
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--df-ink-soft);
  font-weight: 600;
}
.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus {
  border-color: transparent;
  border-bottom-color: var(--df-outline-strong);
  background: transparent;
  color: var(--df-ink);
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  border: 0;
  border-bottom: 3px solid var(--df-primary);
  background: transparent;
  color: var(--df-primary-strong);
}
.nav-tabs-custom { background: var(--df-surface); box-shadow: var(--dfui-shadow-card); border: 1px solid var(--df-outline); }
.nav-tabs-custom > .nav-tabs { border-bottom-color: var(--df-outline); }
.nav-tabs-custom > .nav-tabs > li { border-top: 0; margin-bottom: -1px; }
.nav-tabs-custom > .nav-tabs > li.active { border-top-color: transparent; }
.nav-tabs-custom > .nav-tabs > li > a,
.nav-tabs-custom > .nav-tabs > li.active > a { background: transparent; }
.nav-tabs-custom > .nav-tabs > li > a { color: var(--df-ink-soft); }
.nav-tabs-custom > .nav-tabs > li.active > a { border-bottom: 3px solid var(--df-primary); color: var(--df-primary-strong); }
.nav-tabs-custom > .tab-content { background: var(--df-surface); border-radius: 0 0 var(--df-radius-lg) var(--df-radius-lg); }
.nav-pills > li > a { border-radius: var(--df-radius-pill); color: var(--df-ink-soft); font-weight: 600; }
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus { border-top-color: transparent; background-color: var(--df-primary); color: var(--df-on-primary); }

/* Dialogs: 16px corners and a shadow (AdminLTE drew square ones). */
.modal-content {
  border: 1px solid var(--df-outline);
  border-radius: var(--df-radius-lg);
  background-color: var(--df-surface);
  box-shadow: var(--dfui-shadow-raised);
  color: var(--df-ink);
}
.modal-header { border-bottom-color: var(--df-outline); }
.modal-footer { border-top-color: var(--df-outline); }
.modal-title { font-size: var(--df-font-size-title); font-weight: 600; }
.modal-header .close,
.close { color: var(--df-ink); opacity: 0.6; text-shadow: none; }

/* Menus, paging and pop-overs. */
.dropdown-menu,
.popover {
  border-color: var(--df-outline);
  border-radius: var(--df-radius-md);
  background-color: var(--df-surface);
  box-shadow: var(--dfui-shadow-raised);
  color: var(--df-ink);
}
.dropdown-menu > li > a { color: var(--df-ink); }
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus { background-color: var(--dfui-hover); color: var(--df-ink); }
.dropdown-menu .divider { background-color: var(--df-outline); }
.pagination > li > a,
.pagination > li > span {
  border-color: var(--df-outline);
  background-color: var(--df-surface);
  color: var(--df-primary-strong);
}
.pagination > .disabled > a,
.pagination > .disabled > span { background-color: var(--df-surface); color: var(--df-ink-muted); }
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover {
  border-color: var(--df-primary);
  background-color: var(--df-primary);
  color: var(--df-on-primary);
}
.list-group-item { border-color: var(--df-outline); background-color: var(--df-surface); color: var(--df-ink); }
.progress { background-color: var(--df-outline); border-radius: var(--df-radius-pill); }

/* T8Z-A (WR-22): the last shared parts that drew their own white box or dark words (date pickers, pick lists, the
   settings tabs, the yes/no dialogs of sweetalert, calendars), so they can be read in the dark look too. */
code,
kbd,
pre { border-color: var(--df-outline); background-color: var(--df-neutral-container); color: var(--df-ink); box-shadow: none; }
.bg-white,
.pos-tab-container,
div.pos-tab-container,
div.pos-tab-content,
.product_box,
.img-thumbnail,
.ui-widget-content,
.daterangepicker,
.daterangepicker .calendar-table,
.datepicker-dropdown { border-color: var(--df-outline); background-color: var(--df-surface); color: var(--df-ink); }
.bg-lightgray,
.bg-light-gray { background-color: var(--df-neutral-container) !important; color: var(--df-ink); }
.option-div { border-color: var(--df-outline); background-color: var(--df-neutral-container); color: var(--df-ink); }
.ui-widget-content a { color: var(--df-ink); }
.ui-widget-content .ui-state-focus,
.ui-widget-content .ui-state-active { border-color: var(--df-primary); background: var(--df-primary-container); color: var(--df-on-primary-container); }
.daterangepicker .ranges li { color: var(--df-ink); }
.daterangepicker .ranges li:hover,
.daterangepicker td.available:hover,
.daterangepicker th.available:hover,
.datepicker table tr td.day:hover,
.datepicker table tr td.day.focused,
.datepicker table tr td span:hover,
.datepicker .datepicker-switch:hover,
.datepicker .prev:hover,
.datepicker .next:hover,
.datepicker tfoot tr th:hover,
.bootstrap-datetimepicker-widget table td span:hover,
.bootstrap-datetimepicker-widget table td.day:hover,
.bootstrap-datetimepicker-widget table thead tr:first-child th:hover { background-color: var(--df-neutral-container); color: var(--df-ink); }
.daterangepicker td.in-range { background-color: var(--df-primary-container); color: var(--df-on-primary-container); }
.daterangepicker td.off,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date,
.daterangepicker td.off.end-date { background-color: transparent; color: var(--df-ink-muted); }
.daterangepicker .ranges li.active,
.daterangepicker td.active,
.daterangepicker td.active:hover { background-color: var(--df-primary); color: var(--df-on-primary); }
.daterangepicker .calendar-table .next span,
.daterangepicker .calendar-table .prev span { border-color: var(--df-ink); }
.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td span.active,
.datepicker table tr td span.active:hover { color: var(--df-on-primary) !important; }
.datepicker table tr td.today,
.datepicker table tr td.today:hover { background-image: none; background-color: var(--df-primary-container) !important; color: var(--df-on-primary-container); }
.fc-button { border-color: var(--df-outline-strong); background: var(--df-surface); color: var(--df-ink); }
.fc-widget-header { background: var(--df-background); color: var(--df-ink-soft); }
.fc-header-title h2 { color: inherit; }
.table-transparent,
.table-transparent th { color: var(--df-ink) !important; }
.color-555,
.color-555 * { color: var(--df-ink-soft) !important; }
.text-muted-imp { color: var(--df-ink-muted) !important; }
table.dataTable tbody > tr.selected { background-color: var(--df-primary-container); }
/* app.css draws every legend white (for the old sign-in page): the title of a group of fields could not be read. */
#scrollable-container legend,
.modal legend { color: var(--df-ink); }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--df-ink-muted); }
/* the words of the charts (Highcharts writes their colour on each one) */
.highcharts-background { fill: var(--df-surface); }
.highcharts-title,
.highcharts-axis-title,
.highcharts-axis-labels text,
.highcharts-legend text,
.highcharts-data-label text,
.c3 text { fill: var(--df-ink-soft) !important; color: var(--df-ink-soft) !important; }
.highcharts-text-outline { stroke: none; }
/* the number on a group of farms on a map: dark words on its colour, in both looks */
.marker-cluster span { color: var(--df-on-helper); }
.swal-modal { background-color: var(--df-surface); }
.swal-title { color: var(--df-ink); }
.swal-text { color: var(--df-ink-soft); }
.swal-content__input,
.swal-content__textarea { border-color: var(--df-outline-strong); background-color: var(--df-surface); color: var(--df-ink); }
.swal-icon--success::before,
.swal-icon--success::after,
.swal-icon--success__hide-corners { background: var(--df-surface); }
.swal-button--cancel { background-color: var(--df-neutral-container); color: var(--df-ink); }
.swal-button--cancel:not([disabled]):hover { background-color: var(--df-outline); }

/* =========================================================================
 * The x-ui components (resources/views/components/ui, WR-18): one look for
 * every rebuilt page, light and dark.
 * ========================================================================= */

/* x-ui.card */
.df-card {
  margin-bottom: var(--df-space-l);
  border: 1px solid var(--df-outline);
  border-radius: var(--df-radius-lg);
  background: var(--df-surface);
  box-shadow: var(--dfui-shadow-card);
  color: var(--df-ink);
}
.df-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--df-space-s);
  padding: var(--df-space-l) var(--df-space-l) 0;
}
.df-card__title {
  margin: 0;
  font-size: var(--df-font-size-title);
  line-height: var(--df-line-height-title);
  font-weight: 600;
}
.df-card__subtitle { margin: var(--df-space-xs) 0 0; color: var(--df-ink-muted); font-size: var(--df-font-size-body); }
.df-card__actions { display: flex; flex-wrap: wrap; gap: var(--df-space-s); }
.df-card__body { padding: var(--df-space-l); }
.df-card__foot { padding: var(--df-space-m) var(--df-space-l); border-top: 1px solid var(--df-outline); }

/* x-ui.tile: one number with its words; the icon on its helper colour. */
.df-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--df-space-m);
  margin-bottom: var(--df-space-l);
}
.df-tile {
  display: flex;
  gap: var(--df-space-m);
  align-items: flex-start;
  padding: var(--df-space-l);
  border: 1px solid var(--df-outline);
  border-radius: var(--df-radius-lg);
  background: var(--df-surface);
  box-shadow: var(--dfui-shadow-card);
  color: var(--df-ink);
  text-decoration: none;
}
a.df-tile[aria-current="true"],
a.df-tile:hover,
a.df-tile:focus { border-color: var(--df-primary); color: var(--df-ink); text-decoration: none; }
.df-tile__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--df-radius-md);
  background: var(--df-primary);
  color: var(--df-on-primary);
}
.df-tile--fresh .df-tile__icon { background: var(--df-fresh); color: var(--df-on-helper); }
.df-tile--sun .df-tile__icon { background: var(--df-sun); color: var(--df-on-helper); }
.df-tile--sky .df-tile__icon { background: var(--df-sky); color: var(--df-on-helper); }
.df-tile--coral .df-tile__icon { background: var(--df-coral); color: var(--df-on-helper); }
.df-tile--violet .df-tile__icon { background: var(--df-violet); color: var(--df-on-primary); }
.df-tile__label { display: block; color: var(--df-ink-soft); font-size: var(--df-font-size-body); }
.df-tile__value {
  display: block;
  font-size: var(--df-font-size-display);
  line-height: var(--df-line-height-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.df-tile__hint { display: block; color: var(--df-ink-muted); font-size: var(--df-font-size-small); }

/* x-ui.chip (x-status-chip): a pill, the word always written. done uses the
   violet's tint. */
.df-chip { display: inline-block; white-space: nowrap; }
.label.df-tone-done {
  border: 1px solid var(--df-done);
  background-color: var(--df-violet-tint) !important;
  color: var(--df-done) !important;
}

/* x-ui.tabs (x-subnav) */
.df-tabs { margin-bottom: var(--df-space-l); }
.df-tabs .nav-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.df-tabs .nav-tabs > li { float: none; flex: none; }
/* Many tabs: more lines instead of a sideways scroll, so none is hidden (T4APP). */
@media (min-width: 768px) {
  .df-tabs--wrap .nav-tabs { flex-wrap: wrap; overflow: visible; }
}
.df-tabs .badge { margin-left: var(--df-space-xs); background-color: var(--df-neutral-container); color: var(--df-neutral); }

/* x-ui.table: search, filter chips, choose several, empty state, paging. */
.df-table { margin-bottom: var(--df-space-l); }
.df-table__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--df-space-s);
  margin-bottom: var(--df-space-m);
}
.df-table__search { display: flex; flex: 1 1 240px; gap: var(--df-space-s); max-width: 420px; margin: 0; }
.df-table__search .form-control { flex: 1; min-height: 40px; }
.df-filter-chips { display: flex; flex-wrap: wrap; gap: var(--df-space-s); margin: 0; padding: 0; list-style: none; }
.df-filter-chips--row { margin-bottom: var(--df-space-m); } /* chips with a form or a table right under them */
.df-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--df-space-xs);
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--df-outline-strong);
  border-radius: var(--df-radius-pill);
  background: var(--df-surface);
  color: var(--df-ink);
  font-size: var(--df-font-size-body);
  font-weight: 600;
  text-decoration: none;
}
.df-filter-chip:hover,
.df-filter-chip:focus { border-color: var(--df-primary); color: var(--df-ink); text-decoration: none; }
.df-filter-chip[aria-current="true"] {
  border-color: var(--df-primary);
  background: var(--df-primary-container);
  color: var(--df-on-primary-container);
}
.df-filter-chip__count { color: inherit; font-variant-numeric: tabular-nums; opacity: 0.85; }
.df-table__chosen { color: var(--df-ink-soft); font-size: var(--df-font-size-body); }
.df-table__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--df-space-s);
  margin-top: var(--df-space-s);
  color: var(--df-ink-soft);
  font-size: var(--df-font-size-body);
}
.df-table__foot .pagination { margin: 0; }
@media (pointer: coarse) {
  .df-filter-chip { min-height: var(--df-tap-target); }
}

/* x-ui.empty */
.df-empty {
  padding: var(--df-space-xxl) var(--df-space-l);
  text-align: center;
  color: var(--df-ink-soft);
}
.df-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--df-space-m);
  border-radius: var(--df-radius-pill);
  background: var(--df-primary-container);
  color: var(--df-on-primary-container);
  font-size: 22px;
}
.df-empty__title { margin: 0 0 var(--df-space-xs); color: var(--df-ink); font-size: var(--df-font-size-subtitle); font-weight: 600; }
.df-empty__text { max-width: 48ch; margin: 0 auto var(--df-space-m); }

/* x-ui.dialog (a Bootstrap modal: it opens with data-toggle="modal") */
.df-dialog .modal-dialog { max-width: 480px; }
.df-dialog .modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--df-space-s); }
.df-dialog .modal-footer > .btn + .btn { margin-left: 0; }

/* x-ui.page-header (x-page-header with a path line) */
.df-page-header__path { margin: 0 0 var(--df-space-xs); padding: 0; list-style: none; color: var(--df-ink-muted); font-size: var(--df-font-size-body); }
.df-page-header__path li { display: inline; }
.df-page-header__path li + li::before { content: "/"; margin: 0 var(--df-space-s); color: var(--df-ink-muted); }
.df-page-header__path a { color: var(--df-primary-strong); }

/* The theme switch in the profile menu (Light / Dark / Same as my phone). */
.df-theme-switch { margin: 0; padding: var(--df-space-s) var(--df-space-m); border: 0; }
.df-theme-switch__label { display: block; margin-bottom: var(--df-space-xs); color: var(--df-ink-soft); font-size: var(--df-font-size-small); font-weight: 600; }
.df-theme-switch__choices { display: flex; flex-wrap: wrap; gap: var(--df-space-xs); }
.df-theme-switch__choice {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--df-outline-strong);
  border-radius: var(--df-radius-pill);
  background: var(--df-surface);
  color: var(--df-ink);
  font-size: var(--df-font-size-small);
  font-weight: 600;
  cursor: pointer;
}
.df-theme-switch__choice[aria-pressed="true"] {
  border-color: var(--df-primary);
  background: var(--df-primary-container);
  color: var(--df-on-primary-container);
}
@media (pointer: coarse) {
  .df-theme-switch__choice { min-height: var(--df-tap-target); }
}
