/* PLM Report: base styles built only on the its.fashion tokens in tokens.css.
   No raw hex here. Components are plain HTML + classes (no framework, no bundler). */
/* Derived tints (Claude Design's --tint, --tint-border, --warning-tint, --warning-border,
   --success-*, --destructive-*), mixed from the themeable colours so they follow the tenant theme. */
:root{--tint:color-mix(in srgb,var(--primary) 10%,var(--card));--tint-border:color-mix(in srgb,var(--primary) 32%,var(--card));--warning-tint:color-mix(in srgb,var(--warning) 12%,var(--card));--warning-border:color-mix(in srgb,var(--warning) 34%,var(--card));--success-tint:color-mix(in srgb,var(--success) 11%,var(--card));--success-border:color-mix(in srgb,var(--success) 32%,var(--card));--destructive-tint:color-mix(in srgb,var(--destructive) 9%,var(--card));--destructive-border:color-mix(in srgb,var(--destructive) 30%,var(--card))}
/* Derived values for the Claude Design look, all mixed from tokens.css (no raw hex):
   --subtle      captions, counts and hints (CD's slate-400/500 greys, kept above 4.5:1 on white;
                 re-mixed on .surface-dark so it stays legible there)
   --canvas      the grey behind report previews
   --primary-soft the light teal CD uses for sub-dots and the switcher arrow on dark
   radii, shadows and a small type scale for CD's 10px to 13.5px labels. */
:root,.surface-dark,.surface-light{--subtle:color-mix(in srgb,var(--muted-foreground) 85%,var(--card))}
/* .surface-light (CD): a light island inside a dark surface, e.g. a sidebar popover. The light role
   values are captured once at :root (so tenant theme overrides are included) and restored here. */
:root{--l-background:var(--background);--l-foreground:var(--foreground);--l-card:var(--card);--l-card-foreground:var(--card-foreground);--l-popover:var(--popover);--l-popover-foreground:var(--popover-foreground);--l-muted:var(--muted);--l-muted-foreground:var(--muted-foreground);--l-secondary:var(--secondary);--l-secondary-foreground:var(--secondary-foreground);--l-accent:var(--accent);--l-accent-foreground:var(--accent-foreground);--l-border:var(--border);--l-input:var(--input)}
.surface-light{--background:var(--l-background);--foreground:var(--l-foreground);--card:var(--l-card);--card-foreground:var(--l-card-foreground);--popover:var(--l-popover);--popover-foreground:var(--l-popover-foreground);--muted:var(--l-muted);--muted-foreground:var(--l-muted-foreground);--secondary:var(--l-secondary);--secondary-foreground:var(--l-secondary-foreground);--accent:var(--l-accent);--accent-foreground:var(--l-accent-foreground);--border:var(--l-border);--input:var(--l-input);color:var(--foreground)}
:root{
  --canvas:color-mix(in srgb,var(--muted) 50%,var(--secondary));
  --primary-soft:color-mix(in srgb,var(--primary) 55%,var(--card));
  --radius-sm:calc(var(--radius) - 2px);--radius-md:var(--radius);--radius-lg:calc(var(--radius) + 2px);--radius-xl:calc(var(--radius) + 4px);--radius-full:9999px;
  --shadow-xs:0 1px 2px color-mix(in srgb,var(--foreground) 8%,transparent);
  --shadow-card:0 1px 3px color-mix(in srgb,var(--foreground) 10%,transparent);
  --shadow-pop:0 16px 40px color-mix(in srgb,var(--foreground) 28%,transparent);
  --text-2xs:.625rem;--text-xs:.6875rem;--text-12:.75rem;--text-13:.8125rem;--text-13-5:.84375rem;--text-title:1.375rem;
  --leading-ui:1.45;
}
*,*::before,*::after{box-sizing:border-box}
html{font-family:var(--font-sans);font-size:16px;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--background);color:var(--foreground);line-height:var(--leading-ui)}
button,input,select,textarea{font-family:inherit}
a{color:var(--primary-strong)}
h1,h2,h3{line-height:var(--leading-tight);letter-spacing:var(--tracking-tight);margin:0 0 calc(var(--spacing)*3)}
h1{font-size:var(--text-xl);font-weight:var(--font-weight-bold)}
h2{font-size:var(--text-lg);font-weight:var(--font-weight-semibold)}
.eyebrow{font-size:var(--text-sm);letter-spacing:var(--tracking-widest);text-transform:uppercase;color:var(--primary-strong);font-weight:var(--font-weight-semibold)}
.muted{color:var(--muted-foreground)}
.subtle{color:var(--subtle)}
.prose{line-height:var(--leading-relaxed)}

/* Focus (CD): a ring outside buttons and links, a soft ring on fields. Checkboxes, radios and
   ranges keep the outline because a box-shadow on them reads as a smudge. :where() keeps these at
   the weight of one pseudo-class, so any page rule for its own control still wins. */
:where(button,[role=button],a,input[type=checkbox],input[type=radio],input[type=range]):focus-visible{outline:2px solid var(--ring);outline-offset:2px}
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea):focus{outline:none;border-color:var(--ring);box-shadow:0 0 0 3px color-mix(in srgb,var(--ring) 22%,transparent)}

/* Scrollbars (CD): slim rounded thumb on the input grey. The corner where two meet takes the box's
   own background (its default is white, which shows in dark mode). */
*::-webkit-scrollbar{width:11px;height:11px}
*::-webkit-scrollbar-corner{background:transparent}
*::-webkit-scrollbar-thumb{background:var(--input);border-radius:var(--radius-md);border:3px solid transparent;background-clip:content-box}
*::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--foreground) 45%,var(--card));background-clip:content-box}

/* Layout */
.page{min-height:100vh;display:flex;flex-direction:column}
.page-main{flex:1;display:flex;align-items:center;justify-content:center;padding:calc(var(--spacing)*8)}
.footer{padding:calc(var(--spacing)*4) calc(var(--spacing)*8);border-top:1px solid var(--border);font-size:var(--text-sm);color:var(--muted-foreground);display:flex;justify-content:space-between;gap:calc(var(--spacing)*4)}

/* Card */
.card{background:var(--card);color:var(--card-foreground);border:1px solid var(--border);border-radius:var(--radius-xl);padding:calc(var(--spacing)*8);width:100%;max-width:26rem;box-shadow:var(--shadow-xs)}
.card-stack>*+*{margin-top:calc(var(--spacing)*4)}

/* Forms (the design-system Input: 48px, 6px corners) */
.field{display:flex;flex-direction:column;gap:calc(var(--spacing)*1.5)}
.label{font-size:var(--text-sm);font-weight:var(--font-weight-semibold)}
.input{font:inherit;line-height:1.5;color:inherit;background:var(--background);border:1px solid var(--input);border-radius:var(--radius-sm);padding:calc(var(--spacing)*2.75) calc(var(--spacing)*4);width:100%;transition:border-color .15s ease,box-shadow .15s ease}
.hint{font-size:var(--text-sm);color:var(--muted-foreground)}
.error{font-size:var(--text-sm);color:var(--destructive)}

/* Buttons (the design-system Button: 16px semibold, 12px 24px, 6px corners, grows on hover;
   outline is a 2px foreground border that fills on hover). Small outline buttons keep CD's quiet
   1px look, as CD draws its in-table and toolbar buttons. */
.btn{font:inherit;font-size:var(--text-base);line-height:1.5;font-weight:var(--font-weight-semibold);border-radius:var(--radius-sm);padding:calc(var(--spacing)*3) calc(var(--spacing)*6);border:1px solid transparent;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:calc(var(--spacing)*2);width:100%;white-space:nowrap;text-decoration:none;transition:background-color .3s ease,color .3s ease,border-color .3s ease,transform .3s ease}
.btn-primary{background:var(--primary);color:var(--primary-foreground)}
.btn-primary:hover{background:var(--primary-hover)}
.btn-outline{background:transparent;border:2px solid var(--foreground);color:var(--foreground)}
.btn-outline:hover{background:var(--foreground);color:var(--background)}
.btn-sm.btn-outline{border-width:1px;border-color:var(--input);background:var(--card);color:var(--foreground)}
.btn-sm.btn-outline:hover{border-color:var(--foreground);background:var(--accent);color:var(--foreground)}
.btn-link{background:none;border:0;color:var(--primary-strong);width:auto;padding:0}
.btn-link:hover{color:var(--primary-hover)}
.btn[disabled],.btn[aria-disabled=true]{opacity:.6;cursor:not-allowed}
.btn-primary[aria-disabled=true]:hover{background:var(--primary)}
@media (prefers-reduced-motion:no-preference){.btn:not(.btn-sm):not(.btn-link):not([disabled]):not([aria-disabled=true]):hover{transform:scale(1.05)}}

/* Quiet button (CD .btnq): white, 1px input border, darkens on hover. */
.btn-quiet{font-size:var(--text-13);font-weight:var(--font-weight-semibold);line-height:1.3;color:var(--muted-foreground);background:var(--card);border:1px solid var(--input);border-radius:var(--radius-md);padding:8px 14px;cursor:pointer;white-space:nowrap;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:border-color .15s ease,color .15s ease,background .15s ease}
.btn-quiet:hover{border-color:var(--foreground);color:var(--foreground);background:var(--accent)}
.btn-quiet[disabled],.btn-quiet[aria-disabled=true]{opacity:.55;cursor:not-allowed}
.btn-quiet[disabled]:hover,.btn-quiet[aria-disabled=true]:hover{border-color:var(--input);color:var(--muted-foreground);background:var(--card)}
.btn-quiet[aria-expanded=true]{border-color:var(--foreground);color:var(--foreground);background:var(--accent)}
.btn-quiet.sm{font-size:var(--text-12);padding:4px 10px;border-radius:var(--radius-sm)}

/* Shared Claude Design patterns. Page CSS uses these instead of its own copies. */
/* Section caption: CD's uppercase 11px label above a group. */
.eyebrow-label{display:block;font-size:var(--text-xs);font-weight:var(--font-weight-bold);line-height:1.2;letter-spacing:.08em;text-transform:uppercase;color:var(--subtle);margin:0 0 calc(var(--spacing)*2.5)}
/* Card: 12px corners, 1px border. .tinted sits on the near-white accent. */
.ui-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius-xl);padding:calc(var(--spacing)*4)}
.ui-card.tinted{background:var(--accent)}
/* Segmented buttons: a row of choices, the pressed one filled. */
.seg{display:inline-flex;flex-wrap:wrap;gap:6px}
.seg-btn{font-size:var(--text-13);font-weight:var(--font-weight-semibold);line-height:1.3;padding:8px 11px;border-radius:var(--radius-md);border:1px solid var(--border);background:var(--card);color:var(--foreground);cursor:pointer;white-space:nowrap}
.seg-btn:hover{border-color:var(--input)}
.seg-btn[aria-pressed=true]{background:var(--primary);border-color:var(--primary);color:var(--primary-foreground)}
.seg-btn[disabled]{opacity:.55;cursor:not-allowed}
.seg-btn:focus-visible{outline:2px solid var(--ring);outline-offset:2px}
.seg-btn.seg-num{min-width:34px;text-align:center}
.seg-btn.seg-sm{padding:4px 11px;font-size:var(--text-12)}
/* Small tag: CD's uppercase format pill (PDF, EXCEL) and its warning and neutral variants. */
.pill-tag{display:inline-flex;align-items:center;gap:4px;font-size:var(--text-xs);font-weight:var(--font-weight-bold);line-height:1.3;letter-spacing:.05em;text-transform:uppercase;color:var(--primary-strong);background:var(--tint);border:1px solid var(--tint-border);border-radius:var(--radius-sm);padding:2px 8px;white-space:nowrap}
.pill-tag.warn{color:var(--warning);background:var(--warning-tint);border-color:var(--warning-border)}
.pill-tag.neutral{color:var(--muted-foreground);background:var(--muted);border-color:var(--border)}
/* ON/OFF switch pill. */
.toggle-pill{display:inline-flex;align-items:center;gap:6px;font-size:var(--text-xs);font-weight:var(--font-weight-bold);line-height:1.3;letter-spacing:.06em;padding:7px 14px;border-radius:var(--radius-full);border:1px solid var(--input);background:var(--card);color:var(--muted-foreground);cursor:pointer;white-space:nowrap}
.toggle-pill[aria-pressed=true]{background:var(--primary);border-color:var(--primary);color:var(--primary-foreground)}
/* Popover menu: white, 12px corners, CD's deep shadow. */
.ui-menu{background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border);border-radius:var(--radius-xl);box-shadow:var(--shadow-pop);padding:calc(var(--spacing)*2)}
.ui-menu-item{display:flex;align-items:center;gap:8px;width:100%;text-align:left;font-size:var(--text-13);font-weight:var(--font-weight-semibold);line-height:1.3;color:inherit;background:none;border:0;border-radius:var(--radius-md);padding:7px 9px;cursor:pointer;text-decoration:none}
.ui-menu-item:hover,.ui-menu-item:focus-visible{background:var(--accent)}
/* Checkbox: CD's 15px box, primary when ticked. */
.ui-check{appearance:none;-webkit-appearance:none;flex:none;width:15px;height:15px;margin:0;border:1.5px solid var(--input);border-radius:4px;background:var(--card);display:inline-grid;place-content:center;cursor:pointer;transition:background .15s ease,border-color .15s ease}
.ui-check::after{content:"";width:8px;height:5px;border:2px solid var(--primary-foreground);border-top:0;border-right:0;transform:translateY(-1px) rotate(-45deg);opacity:0}
.ui-check:checked{background:var(--primary);border-color:var(--primary)}
.ui-check:checked::after{opacity:1}
.ui-check:disabled{opacity:.5;cursor:not-allowed}

/* Status pill */
.pill{display:inline-flex;align-items:center;gap:calc(var(--spacing)*2);font-size:var(--text-sm);padding:calc(var(--spacing)*1) calc(var(--spacing)*3);border-radius:999px;background:var(--muted)}
.pill::before{content:"";width:.5rem;height:.5rem;border-radius:50%;background:var(--muted-foreground)}
.pill.ok::before{background:var(--success)}
.pill.bad::before{background:var(--destructive)}

/* The hidden attribute must win over every component display rule (.badge, .nav-tile, ...). */
[hidden]{display:none !important}

/* Read by screen readers, not shown (live regions that announce what a click did). */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
