/* ==========================================================================
   Portal Assistant — Design Tokens
   Extracted from app.portalassistant.com (Dashboard) computed styles.
   ========================================================================== */

:root {
  /* ---------- Typography ---------- */
  --pa-font-sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;

  /* Type scale: the prototype's, exactly (claude.ai/artifact/Q3j49TUX1vUQKCpdfQcXWj: the Figma "UI
     Revamp & Design Guideline" v1.1/v1.2 scale with its HubSpot type scale on top). Each size comes with
     its own line-height (--pa-leading-*). In rem so the browser's own text size reaches them;
     components use these tokens, never a px font-size (icon sizes are not text and stay px). */
  --pa-text-10: 0.625rem;                /* avatar initials in the tightest spots only */
  --pa-text-11: 0.6875rem;               /* overline (uppercase labels), nav and header badges, kbd */
  --pa-text-12: 0.75rem;                 /* help, field errors, tags, counts, small meta and timestamps */
  --pa-text-13: 0.8125rem;               /* captions and secondary lines, field labels, crumbs, pills, chips, segmented buttons, tooltips */
  --pa-text-14: 0.875rem;                /* body, buttons, menus, tabs, table cells and headers, typed text */
  --pa-text-16: 1rem;                    /* card and panel titles (h3), the logo name */
  --pa-text-18: 1.125rem;                /* the prototype's base h2 (18/26), for rules still written with it */
  --pa-text-20: 1.25rem;                 /* section, modal, side panel and step titles (h2) */
  --pa-text-22: 1.375rem;                /* one-time code digits */
  --pa-text-24: 1.5rem;                  /* large avatar initials; the display size on phones */
  --pa-text-26: 1.625rem;                /* the Home greeting */
  --pa-text-28: 1.75rem;                 /* page title (h1), large numbers */
  --pa-text-32: 2rem;
  /* Line-heights that go with the sizes: 11 and 12px → 16, 13 → 18, 14 → 20, 16 → 24, 20 → 28,
     26 → 32, 28 → 36 */
  --pa-leading-16: 1rem;
  --pa-leading-18: 1.125rem;
  --pa-leading-20: 1.25rem;
  --pa-leading-22: 1.375rem;              /* 14px prose: messages, descriptions (the prototype's 14/22) */
  --pa-leading-24: 1.5rem;
  --pa-leading-28: 1.75rem;
  --pa-leading-32: 2rem;
  --pa-leading-36: 2.25rem;
  /* Typed text in a field: 14px at every width, as in the prototype */
  --pa-text-input: var(--pa-text-14);

  /* Names by role, kept for the rules written with them */
  --pa-text-xs: var(--pa-text-12);       /* chart axis labels */
  --pa-text-sm: var(--pa-text-12);       /* help, tags, counts, small meta */
  --pa-text-base: var(--pa-text-14);     /* body default */
  --pa-text-md: var(--pa-text-16);       /* card and panel titles */
  --pa-text-lg: var(--pa-text-20);
  --pa-text-xl: var(--pa-text-20);
  /* A page's h1 (page title, a detail page's record header): 600 28/36 at every width, as the
     prototype's t-h1. The 03 pages set 24/32 (v03/_shared/session-03.css, 12/11/2026). Always pair
     --pa-text-title with --pa-leading-title. The Home greeting has its own size (26/32 bold) */
  --pa-text-title: var(--pa-text-28);
  --pa-text-title-phone: var(--pa-text-28);
  --pa-leading-title: var(--pa-leading-36);

  /* ---------- Control sizes ----------
     36px is the default for a button, a field, a select and a segmented control (the team's choice,
     22/10/2026; the usual work products use 32 to 40px); 24px for dense rows and toolbars
     (desktop only); 40px for a screen with one task (sign-in, a wizard's footer). A button and a
     field side by side take the same size. Touch screens get bigger targets (below). */
  --pa-control-sm: 1.5rem;               /* 24: Small, inside table rows and dense toolbars */
  --pa-control-md: 2.25rem;              /* 36: the default */
  --pa-control-lg: 2.5rem;               /* 40: one-task screens; the header's buttons */
  --pa-item-height: 2.25rem;             /* 36: a row in the side menu, a popover menu or a listbox */
  --pa-tab-height: 2.5rem;               /* 40: tabs (underline and folder) */
  --pa-row-height: 3rem;                 /* 48: a table row (Rows: Comfortable) */
  --pa-row-height-compact: 2.5rem;       /* 40: Rows: Compact */

  /* ---------- Icon sizes ----------
     Three sizes, the Size property of the Figma icon set (28/10/2026): 16 in chips, tags, pills and
     small tiles; 20 the default, beside 14px text; 24 on the header's buttons and in icon tiles.
     32 and 48 only for the one icon of an empty state or a done screen. Icons are not text: px. */
  --pa-icon-sm: 16px;
  --pa-icon-md: 20px;
  --pa-icon-lg: 24px;
  --pa-icon-xl: 32px;                    /* an empty state */
  --pa-icon-2xl: 48px;                   /* a done or success screen */

  --pa-weight-light: 300;
  --pa-weight-regular: 400;
  --pa-weight-medium: 500;
  --pa-weight-semibold: 600;
  --pa-weight-bold: 700;

  --pa-leading-none: 1;      /* headings use line-height:100% */
  --pa-leading-tight: 1.4;
  --pa-leading-normal: 1.4286; /* 20px on 14px */
  --pa-leading-relaxed: 1.5;

  --pa-tracking-tight: -0.02em; /* tile labels */

  /* ---------- Brand & neutrals ---------- */
  --pa-primary: #206BC4;
  --pa-primary-hover: #1A5AA6;
  --pa-primary-subtle: #E6F0FF;   /* active tab, tab panel */
  --pa-primary-subtle-2: #E1ECFB; /* header chip buttons (Cart, Feedback) */
  --pa-primary-subtle-3: #E8F0FE;
  --pa-link: #1877F2;

  --pa-sidebar-bg: #182433;
  --pa-sidebar-divider: #1F2E41;
  --pa-sidebar-text: #FCFDFE;
  --pa-sidebar-icon: #929DAB;

  --pa-bg-page: #F6F8FB;
  --pa-bg-surface: #FFFFFF;
  --pa-bg-surface-alt: #F9FBFF;

  --pa-text: #182433;          /* body text */
  --pa-text-heading: #181C32;  /* section headings (cl-gray) */
  --pa-text-secondary: #3F4254;/* cl-gray-2 */
  --pa-text-tertiary: #5E6278; /* cl-gray-3 */
  --pa-text-muted: #7E8299;    /* cl-gray-4 */
  --pa-text-subtle: #A1A5B7;
  --pa-text-notice: #667382;
  --pa-text-inverse: #FFFFFF;

  --pa-border: #E4E6EF;
  --pa-border-strong: #B5B5C3;
  --pa-border-input: rgba(110, 117, 130, 0.2);

  /* ---------- Status ---------- */
  --pa-danger: #FF1744;
  --pa-warning: #FD9400;
  --pa-warning-soft: #FFB545;
  --pa-success: #2BBD6C;

  /* ---------- Request types ---------- */
  --pa-type-lop: #1223BF;          /* Letter of Protection (10001) */
  --pa-type-medical: #1256BF;      /* Medical Bill (10002) */
  --pa-type-prescription: #206BC4; /* Prescription (10003) */
  --pa-type-affidavit: #04758E;    /* Affidavit (10004) */
  --pa-type-others: #0EAAB4;       /* Others tile */
  --pa-type-others-alt: #0EB450;   /* Others (10005) chip */
  --pa-type-transfer: #0E8CB4;     /* Transfer (10006) */
  --pa-type-coordination: #0EB48C; /* Coordination (10007) */
  --pa-type-delivery: #2BBD6C;     /* Delivery (10008) */

  /* ---------- Data viz ---------- */
  --pa-chart-mine: #0C77C4;   /* "My Request" series */
  --pa-chart-shared: #A2D57C; /* "Shared With Me" series */
  --pa-chart-grid: #E4E6EF;
  --pa-chart-axis: #3F4254;

  /* ---------- Spacing (4px base) ---------- */
  --pa-space-1: 4px;
  --pa-space-2: 8px;
  --pa-space-3: 12px;
  --pa-space-4: 16px;
  --pa-space-5: 20px;
  --pa-space-6: 24px;
  --pa-space-8: 32px;

  /* ---------- Radius ---------- */
  --pa-radius-xs: 2px;
  --pa-radius-sm: 4px;   /* buttons, inputs, chips */
  --pa-radius-md: 8px;   /* cards, tiles, nav items, tabs */
  --pa-radius-lg: 16px;
  --pa-radius-pill: 32px;
  --pa-radius-full: 50%;

  /* ---------- Elevation ---------- */
  --pa-shadow-card: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
  --pa-shadow-tile: 0 0 6px 0 rgba(0, 0, 0, 0.10);
  --pa-shadow-header: 0 1px 4px 0 rgba(0, 0, 0, 0.20);
  --pa-shadow-dropdown: 0 8px 16px 0 rgba(0, 0, 0, 0.15);
  --pa-shadow-hairline: 0 1px 0 0 rgba(24, 36, 51, 0.04);

  /* ---------- Layout ---------- */
  --pa-sidebar-width: 240px;
  --pa-header-height: 57px;
  --pa-gutter: 16px;
  /* The work area's grid: a page splits its content on 12 columns, 8 on a tablet (641–991px) and
     4 on a phone (640px and down), 24px apart, 16px from 760px down (app-02.css). Home and Request
     detail put theirs on 8 + 4 on wide screens. Content fills the work area at every width (fluid). */
  --pa-grid-columns: 12;
  --pa-grid-gutter: 24px;

  /* ---------- Overlays ----------
     One dimmed layer behind every blocking overlay (modal, confirmation, modal side panel), and
     the widths they come in. Which overlay to use: Patterns › Choosing an overlay. */
  --pa-scrim: rgb(10 15 21 / 0.4);
  --pa-modal-sm: 400px;        /* confirmations */
  --pa-modal-md: 600px;        /* default: a short form or a choice */
  --pa-modal-lg: 800px;        /* a form with an editor or two columns */
  --pa-modal-xl: 968px;        /* last resort: consider a page */
  --pa-side-panel: 440px;      /* side panel: filters, settings, a short list */
  --pa-side-panel-wide: 640px; /* side panel: a record preview, a table */

  /* ---------- Motion ----------
     Unhurried on purpose: many people using the product are middle-aged or new to it, so every
     change is slow enough to follow, yet never long enough to wait for. Reduced motion turns it
     all off (css/app-02.css). */
  --pa-ease: cubic-bezier(0.2, 0, 0, 1);            /* state changes: starts gently, settles slowly */
  --pa-ease-enter: cubic-bezier(0.25, 0.6, 0.3, 1); /* content arriving: slows down into place */
  --pa-ease-exit: cubic-bezier(0.4, 0, 1, 1);       /* content leaving: speeds up as it goes */
  --pa-duration-short: 200ms;  /* small marks, such as the check appearing in a checkbox */
  --pa-duration: 300ms;        /* hover, selection, popups opening */
  --pa-duration-long: 450ms;   /* new content: panels, steps, lists, dialogs, the side menu */
  --pa-stagger: 50ms;          /* between the items of a list that arrive one after another */
  --pa-rise: 8px;              /* how far arriving content travels */
}

/* Text size: Compact, a personal choice (account menu › Text size on the 03 pages, remembered per
   user). Titles take one step down the scale; body text (14px) and meta (12px) keep their size,
   so nothing gets under the floors. */
:root[data-text-size="compact"] {
  --pa-text-16: 0.875rem;
  --pa-text-20: 1rem;
  --pa-text-26: 1.375rem;
  --pa-text-28: 1.5rem;
  --pa-text-32: 1.75rem;
}

/* Touch screens (and phone widths, laid out for touch): bigger targets, about 40-44px, as Apple and
   Salesforce (2.75rem) ask for a finger */
@media (pointer: coarse), (max-width: 640px) {
  :root {
    --pa-control-sm: 2rem;
    --pa-control-md: 2.5rem;
    --pa-control-lg: 2.75rem;
    --pa-item-height: 2.75rem;
    --pa-tab-height: 2.75rem;
  }
}

