@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap");
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
}

:root {
  /* ── Brand ── */
  --color-transact-navy: #0d2d4e;           /* brand primary */
  --color-transact-primary-lighter: #4a627a;
  --color-transact-primary-tint: #647c94;
  --color-transact-primary-shade: #00001b;
  --color-transact-primary-transparent: #e7eaed;
  --color-transact-sky-blue: #2280d2;
  --color-transact-swagger-blue: #16b5be;
  --color-transact-gold: #e9b13a;

  /* Whitelabel hooks — admin/consumer apps override these */
  --color-primary: var(--color-transact-navy);
  --color-primary-lighter: #4a627a;
  --color-primary-tint: #647c94;
  --color-primary-shade: #00001b;
  --color-primary-transparent: #e7eaed;
  --color-text-on-primary: #ffffff;

  /* ── Grayscale ── */
  --color-gray-1: #262626;   /* text primary */
  --color-gray-2: #616161;   /* text secondary, icons */
  --color-gray-3: #9e9e9e;   /* disabled */
  --color-gray-4: #e0e0e0;   /* borders */
  --color-gray-5: #eeeeee;   /* hairline / row hover */
  --color-gray-6: #f5f5f5;   /* page background */
  --color-white: #ffffff;
  --color-black: #000000;

  /* ── Semantic: text ── */
  --ta-color-text-primary: #262626;
  --ta-color-text-secondary: #616161;
  --ta-color-text-disabled: #616161;
  --ta-color-text-danger: #82001e;
  --ta-color-text-info: #005174;
  --ta-color-text-success: #005013;
  --ta-color-text-warning: #834400;
  --ta-color-text-pending: #26206a;

  /* ── Semantic: surface ── */
  --ta-color-background-default: #f5f5f5;
  --ta-color-surface-neutral-light: #ffffff;
  --ta-color-surface-neutral-default: #e0e0e0;
  --ta-color-surface-neutral-disabled: #f5f5f5;
  --ta-color-surface-brand-default: #0d2d4e;
  --ta-color-surface-brand-light: #e7eaed;
  --ta-color-surface-info-default: #007db3;
  --ta-color-surface-info-light: #e6f2f7;
  --ta-color-surface-success-default: #009624;
  --ta-color-surface-success-light: #e6f5e9;
  --ta-color-surface-warning-default: #fe9a2e;
  --ta-color-surface-warning-light: #ffeccc;
  --ta-color-surface-danger-default: #b5002a;
  --ta-color-surface-danger-light: #ffe7ec;
  --ta-color-surface-pending-default: #6058bc;
  --ta-color-surface-pending-light: #ecebf8;

  /* ── Semantic: border ── */
  --ta-color-border-default: #e0e0e0;
  --ta-color-border-disabled: #9e9e9e;
  --ta-color-border-neutral-strong: #616161;
  --ta-color-border-brand-primary: #0d2d4e;
  --ta-color-border-info: #007db3;
  --ta-color-border-success: #009624;
  --ta-color-border-warning: #fe9a2e;
  --ta-color-border-danger: #b5002a;
  --ta-color-border-pending: #6058bc;

  /* ── Semantic: icon ── */
  --ta-color-icon-default: #616161;
  --ta-color-icon-light: #ffffff;
  --ta-color-icon-info: #007db3;
  --ta-color-icon-success: #009624;
  --ta-color-icon-warning: #e5851d;
  --ta-color-icon-danger: #b5002a;
  --ta-color-icon-pending: #6058bc;

  /* ── Links ── */
  --color-link: #1b0fab;
  --color-link-hover: rgba(27, 15, 171, 0.1);
  --color-link-visited: #800080;

  /* ── Typography families ── */
  --font-body: 'Rubik', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Rubik', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── Type scale (exact px from tokens) ── */
  --ta-text-8: 0.5rem;
  --ta-text-10: 0.625rem;
  --ta-text-12: 0.75rem;   /* supporting body, heading-xs */
  --ta-text-14: 0.875rem;  /* body default, heading-sm */
  --ta-text-16: 1rem;      /* heading-rg */
  --ta-text-18: 1.125rem;
  --ta-text-20: 1.25rem;   /* heading-inline/lg */
  --ta-text-24: 1.5rem;    /* heading-xl, heading-overlay */
  --ta-text-28: 1.75rem;   /* heading-page, heading-2xl */
  --ta-text-32: 2rem;
  --ta-text-48: 3rem;
  --ta-text-60: 3.75rem;

  /* ── Heading tokens ── */
  --ta-typography-size-heading-2xl:       1.75rem;  /* 28 */
  --ta-typography-size-heading-page:      1.75rem;  /* 28 */
  --ta-typography-size-heading-xl:        1.5rem;   /* 24 */
  --ta-typography-size-heading-overlay:   1.5rem;   /* 24 */
  --ta-typography-size-heading-lg:        1.25rem;  /* 20 */
  --ta-typography-size-heading-inline:    1.25rem;  /* 20 */
  --ta-typography-size-heading-rg:        1rem;     /* 16 */
  --ta-typography-size-heading-sm:        0.875rem; /* 14 */
  --ta-typography-size-heading-xs:        0.75rem;  /* 12 */
  --ta-typography-size-body-default:      0.875rem; /* 14 */
  --ta-typography-size-body-supporting:   0.75rem;  /* 12 */

  --ta-typography-line-height-heading-2xl:      2.25rem;
  --ta-typography-line-height-heading-page:     2.25rem;
  --ta-typography-line-height-heading-xl:       2rem;
  --ta-typography-line-height-heading-overlay:  2rem;
  --ta-typography-line-height-heading-lg:       1.875rem;
  --ta-typography-line-height-heading-inline:   1.875rem;
  --ta-typography-line-height-heading-rg:       1.5rem;
  --ta-typography-line-height-heading-sm:       1.25rem;
  --ta-typography-line-height-heading-xs:       1.125rem;
  --ta-typography-line-height-body-default:     1.25rem;
  --ta-typography-line-height-body-supporting:  1.125rem;

  /* Weights — heading default is SemiBold 600; body default is Regular 400 */
  --ta-weight-regular: 400;
  --ta-weight-medium: 500;
  --ta-weight-semibold: 600;
  --ta-weight-bold: 700;
  --ta-typography-weight-heading-default: 600;
  --ta-typography-weight-body-default: 400;

  /* ── Radii ── */
  --ta-radius-none: 0;
  --ta-radius-default: 0.5rem;   /* 8px, buttons/cards/tags use pill for full */
  --ta-radius-full: 624.9375rem;

  /* ── Spacing (grid) ── */
  --ta-grid-gap-none: 0;
  --ta-grid-gap-xs: 0.25rem;
  --ta-grid-gap-element: 0.25rem;
  --ta-grid-gap-small: 0.5rem;
  --ta-grid-gap-component: 0.75rem;
  --ta-grid-gap-regular: 1rem;
  --ta-grid-gap-container: 1rem;
  --ta-grid-gap-large: 1.5rem;
  --ta-grid-gap-page: 1.5rem;
  --ta-grid-padding-element-x: 0.5rem;
  --ta-grid-padding-element-y: 0.25rem;
  --ta-grid-padding-component-x: 0.75rem;
  --ta-grid-padding-component-y: 0.75rem;
  --ta-grid-padding-container-x: 1.5rem;
  --ta-grid-padding-container-y: 1.5rem;
  --ta-grid-padding-page-x: 1.5rem;
  --ta-grid-padding-page-y: 1.5rem;

  /* ── Elevation ── */
  --ta-shadow-1:     0 10px 15px rgba(0, 0, 0, 0.10);
  --ta-shadow-2:     0 15px 25px rgba(0, 0, 0, 0.10);
  --ta-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.25);
  --ta-shadow-card:  0px 1px 3px rgba(16, 24, 40, 0.10), 0px 1px 2px rgba(16, 24, 40, 0.06);
  --ta-shadow-footer: 0px -5px 20px rgba(0, 0, 0, 0.10);
  --ta-shadow-outline-error: 0 0 0 1px #b5002a;
  --ta-shadow-outline-focus: 0 0 0 2px rgba(27, 15, 171, 0.12);

  /* ── Motion ── */
  --ta-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ta-duration-fast: 100ms;
  --ta-duration: 150ms;
  --ta-duration-slow: 300ms;
}

/* Dark mode overrides (app must add class ta-dark-mode to root) */
.ta-dark-mode {
  --ta-color-background-default: #262626;
  --ta-color-text-primary: #ffffff;
  --ta-color-text-secondary: #eeeeee;
  --ta-color-surface-neutral-light: #262626;
  --ta-color-surface-neutral-default: #262626;
  --ta-color-border-default: rgba(255, 255, 255, 0.25);
  --ta-color-icon-default: rgba(255, 255, 255, 0.75);
}

/* ─────────────────────────────────────────────────────────────
   Semantic element styles
   ───────────────────────────────────────────────────────────── */

html {
  font-family: var(--font-body);
  color: var(--ta-color-text-primary);
  background: var(--ta-color-background-default);
  /* font-size intentionally NOT set on html so rem math stays anchored
     to the browser default (16px) — component CSS uses rem and assumes 16px. */
  line-height: var(--ta-typography-line-height-body-default);
  font-weight: var(--ta-typography-weight-body-default);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--ta-color-text-primary);
  background: var(--ta-color-background-default);
  font-size: var(--ta-typography-size-body-default);
  line-height: var(--ta-typography-line-height-body-default);
  font-weight: var(--ta-typography-weight-body-default);
  -webkit-font-smoothing: antialiased;
}

/* Page title (h1 default) — heading-page / 28/36 SemiBold */
h1, .ta-h1, .ta-heading-page {
  font-family: var(--font-display);
  font-size: var(--ta-typography-size-heading-page);
  line-height: var(--ta-typography-line-height-heading-page);
  font-weight: var(--ta-typography-weight-heading-default);
  letter-spacing: -0.01em;
  margin: 0;
}

h2, .ta-h2, .ta-heading-xl {
  font-family: var(--font-display);
  font-size: var(--ta-typography-size-heading-xl);
  line-height: var(--ta-typography-line-height-heading-xl);
  font-weight: var(--ta-typography-weight-heading-default);
  margin: 0;
}

h3, .ta-h3, .ta-heading-lg {
  font-family: var(--font-display);
  font-size: var(--ta-typography-size-heading-lg);
  line-height: var(--ta-typography-line-height-heading-lg);
  font-weight: var(--ta-typography-weight-heading-default);
  margin: 0;
}

h4, .ta-h4, .ta-heading-rg {
  font-family: var(--font-display);
  font-size: var(--ta-typography-size-heading-rg);
  line-height: var(--ta-typography-line-height-heading-rg);
  font-weight: var(--ta-typography-weight-heading-default);
  margin: 0;
}

h5, .ta-h5, .ta-heading-sm {
  font-size: var(--ta-typography-size-heading-sm);
  line-height: var(--ta-typography-line-height-heading-sm);
  font-weight: var(--ta-typography-weight-heading-default);
  margin: 0;
}

h6, .ta-h6, .ta-heading-xs {
  font-size: var(--ta-typography-size-heading-xs);
  line-height: var(--ta-typography-line-height-heading-xs);
  font-weight: var(--ta-typography-weight-heading-default);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

p, .ta-body {
  font-size: var(--ta-typography-size-body-default);
  line-height: var(--ta-typography-line-height-body-default);
  margin: 0 0 0.75rem;
}

.ta-body-supporting, small {
  font-size: var(--ta-typography-size-body-supporting);
  line-height: var(--ta-typography-line-height-body-supporting);
  color: var(--ta-color-text-secondary);
}

a, .ta-link {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:visited { color: var(--color-link-visited); }

code, kbd, pre, .ta-mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}


/* FormField — input wrapper with label, prefix/suffix, hint & error subscript.
   Mirrors libs/tailwind-plugin/src/lib/css/form-field.css (.ta-form-field)
   Depends on tokens in colors_and_type.css + Material Icons from the host HTML. */

.ta-form-field {
  display: inline-block;
  position: relative;
  text-align: left;
  line-height: 1;
  font-family: var(--font-body);
  color: var(--ta-color-text-primary);
}
.ta-form-field.ta-form-field--full { display: block; width: 100%; }

/* ── Label ── */
.ta-form-field-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.875rem;       /* 14 */
  line-height: 1.25;
  margin-bottom: 0.5rem;     /* 8  */
  font-weight: 500;
  color: var(--ta-color-text-primary);
  transition: color 200ms var(--ta-ease);
}
.ta-form-field-label .required-marker { color: var(--color-error, #b5002a); }
.ta-form-field-label .optional-marker { color: var(--color-gray-2); font-weight: 400; font-size: 0.75rem; }

/* ── Input row (bordered flex container) ── */
.ta-form-field-flex {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  line-height: 1.375;
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 0 0 1px #616161;   /* "1px border" via shadow so it collapses cleanly on focus */
  transition: background-color 200ms var(--ta-ease),
              box-shadow 200ms var(--ta-ease),
              color 200ms var(--ta-ease);
  padding-right: 1rem;
  padding-left: 1rem;
}

/* Sizes: large / regular / small — vertical padding swaps */
.ta-form-field-large    .ta-form-field-flex { /* default 1rem */ }
.ta-form-field-regular  .ta-form-field-flex { }
.ta-form-field-small    .ta-form-field-flex { }

.ta-form-field-large   .ta-input-element { padding-top: 1rem;      padding-bottom: 1rem;      font-size: 1rem;     }
.ta-form-field-regular .ta-input-element { padding-top: 0.5rem;    padding-bottom: 0.5rem;    font-size: 1rem;     }
.ta-form-field-small   .ta-input-element { padding-top: 0.375rem;  padding-bottom: 0.375rem;  font-size: 0.875rem; }

/* Textarea has different internal padding */
.ta-form-field-type-ta-textarea .ta-form-field-flex { padding: 0.25rem 0.125rem; }
.ta-form-field-large.ta-form-field-type-ta-textarea   textarea.ta-input-element { padding: 0.75rem 0.875rem; resize: vertical; }
.ta-form-field-regular.ta-form-field-type-ta-textarea textarea.ta-input-element { padding: 0.5rem  0.875rem; resize: vertical; }
.ta-form-field-small.ta-form-field-type-ta-textarea   textarea.ta-input-element { padding: 0.375rem 0.875rem; resize: vertical; }

/* Native select — room for chevron */
.ta-form-field-type-ta-native-select .ta-input-element { padding-right: 2rem; }

/* Prefix / suffix (usually icons or short text like "$" or "%") */
.ta-form-field-flex-prefix,
.ta-form-field-flex-suffix {
  display: inline-flex;
  align-items: center;
  color: var(--color-gray-2);
  line-height: 1;
  min-height: 1.1875rem;
  flex-shrink: 0;
}
.ta-form-field-flex-prefix .material-icons,
.ta-form-field-flex-suffix .material-icons { font-size: 1.25rem; height: 1.25rem; width: 1.25rem; }

/* Gap between prefix/suffix and the input itself */
.ta-form-field-flex-prefix { margin-right: 0.625rem; }   /* 10px */
.ta-form-field-flex-suffix { margin-left:  0.625rem; }

/* The input/select/textarea itself */
.ta-form-field-flex-infix { flex-grow: 1; position: relative; display: inline-flex; max-width: 100%; }
.ta-input-element {
  font: inherit;
  background: transparent;
  border: 0;
  outline: none;
  color: currentColor;
  appearance: none;
  width: 100%;
  flex: 1 1 0%;
  line-height: 1.375;
  min-width: 1px;
  text-align: inherit;
}
.ta-input-element::placeholder { color: var(--color-gray-2); }
.ta-input-element:-webkit-autofill,
.ta-input-element:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgb(234, 242, 247) inset !important;
  box-shadow: 0 0 0 1000px rgb(234, 242, 247) inset !important;
  -webkit-text-fill-color: var(--ta-color-text-primary);
}

/* Native select chevron */
.ta-form-field-type-ta-native-select .ta-form-field-flex-infix::after {
  content: 'expand_more';
  font-family: 'Material Icons';
  font-size: 20px;
  color: var(--color-gray-2);
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  pointer-events: none;
}

/* ── States ── */
.ta-form-field:not(.ta-form-field--disabled):not(.ta-form-field--readonly) .ta-form-field-flex:hover {
  box-shadow: 0 0 0 2px rgba(25, 25, 25, 0.86);
}
.ta-form-field--focused .ta-form-field-flex { box-shadow: 0 0 0 2px #000; }

.ta-form-field--invalid .ta-form-field-flex { box-shadow: 0 0 0 1px #b5002a; }
.ta-form-field:not(.ta-form-field--disabled):not(.ta-form-field--readonly).ta-form-field--invalid .ta-form-field-flex:hover {
  box-shadow: 0 0 0 2px #b5002a;
}
.ta-form-field--invalid.ta-form-field--focused .ta-form-field-flex { box-shadow: 0 0 0 2px #b5002a; }

.ta-form-field--disabled .ta-form-field-flex,
.ta-form-field--readonly .ta-form-field-flex {
  color: var(--color-gray-2);
  background-color: var(--color-gray-6);
  cursor: not-allowed;
}
.ta-form-field--disabled .ta-input-element,
.ta-form-field--readonly .ta-input-element { cursor: not-allowed; }

/* ── Subscript: hint / error ── */
/* Reproduce libs/tailwind-plugin/src/lib/css/form-field.css verbatim.
   The wrapper inherits line-height:1 from .ta-form-field — DO NOT set 1.4
   here or the icon will center-mismatch the text. */
.ta-form-field-subscript-wrapper {
  margin-top: 0.5rem;
  font-size: 0.75rem;       /* 12 */
  color: var(--color-gray-2);
}

.ta-form-field-hint-wrapper,
.ta-form-field-error-wrapper {
  display: flex;
}

.ta-form-field-error-wrapper {
  color: var(--color-error, #b5002a);
  stroke: var(--color-error, #b5002a);
}
.ta-form-field-error-wrapper .ta-helper-text { display: flex; }
.ta-form-field-error-wrapper .ta-helper-text::before {
  font-family: 'Material Icons', sans-serif;
  content: 'report';
  line-height: 1;
  font-size: 1rem;
  width: 1rem;
  height: 1rem;
  margin-top: -0.125rem;
  margin-right: 0.25rem;
}

.ta-form-field-char-counter { margin-left: auto; color: var(--color-gray-2); tabular-nums: 1; }

/* Character counter turns red alongside invalid state */
.ta-form-field--invalid .ta-form-field-char-counter { color: #b5002a; }


/* Breadcrumbs — hierarchical navigation with chevron separators.
   Mirrors @ta/react-base-ui Breadcrumbs.
   Depends on tokens in colors_and_type.css and Material Icons in the host. */

.ta-breadcrumbs {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-link);
}

.ta-breadcrumbs ol {
  list-style: none;
  margin: 0; padding: 0;
  max-width: 100%;
  display: flex; flex-wrap: wrap; align-items: center;
}

/* Each item in the trail */
.ta-breadcrumb-item {
  font-size: 12px;
  display: flex; align-items: center;
  line-height: normal;
  min-width: 0;
}

/* Chevron separator between items */
.ta-breadcrumb-sep {
  font-family: 'Material Icons';
  font-size: 16px;
  color: var(--color-gray-2);
  margin: 0 4px;
  user-select: none;
  display: inline-flex; align-items: center;
}
.ta-breadcrumb-sep::before { content: 'chevron_right'; }

/* Anchor styling */
.ta-breadcrumb-link {
  display: inline-flex; align-items: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--color-link);
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 32ch;
  flex-shrink: 1;
  transition: color var(--ta-duration) var(--ta-ease);
}
.ta-breadcrumb-link:hover  { color: var(--color-link-visited); }
.ta-breadcrumb-link:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
  border-radius: 2px;
}

/* The CURRENT item — last item in the trail. No underline, dimmer color. */
.ta-breadcrumb-current {
  color: var(--ta-color-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 32ch;
}

/* Optional leading icon (e.g. home) on the first item */
.ta-breadcrumb-link .material-icons,
.ta-breadcrumb-current .material-icons {
  font-size: 14px;
  margin-right: 4px;
}


/* Section — content grouping primitives.
   Mirrors @ta/react-base-ui Section family + libs/tailwind-plugin/src/lib/css/section.css. */

/* Section heading text size — token from variables.css */
:root {
  --ta-section-heading-text-size: 20px;
  --ta-subsection-heading-text-size: 16px;
  --ta-content-stack-spacing: 1rem;
}

/* ── Section root ── */
.ta-section {
  --ta-content-stack-spacing: 1rem;
  font-family: var(--font-body);
}
.ta-section > *:not(:last-child) {
  margin-bottom: 24px;
}

/* Heading inside Section */
.ta-section-heading {
  font-size: var(--ta-section-heading-text-size);
  font-weight: 500;
  color: var(--ta-color-text-primary);
  font-family: var(--font-display);
  line-height: 1.3;
  margin: 0;
}

.ta-section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.ta-section-header > *:first-child { flex: 1; min-width: 0; }

/* Description sits under the heading */
.ta-section-description {
  margin: 4px 0 0;
  font-size: 14px; line-height: 1.5;
  color: var(--ta-color-text-secondary);
  max-width: 72ch;
}

/* Footer divider */
.ta-section-footer {
  padding-top: 24px;
  border-top: 1px solid var(--ta-color-border-default);
  display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
}

/* ── SubSection ── */
.ta-sub-section {
  font-family: var(--font-body);
}
.ta-sub-section > .ta-sub-section-heading,
.ta-sub-section > .ta-sub-section-header {
  margin-bottom: 16px;
}
/* Adjacent sub-sections get a bottom rule (mirror of plugin behaviour) */
.ta-sub-section:has(~ .ta-sub-section) {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-gray-4);
}

.ta-sub-section-heading {
  font-size: var(--ta-subsection-heading-text-size);
  font-weight: 500;
  color: var(--ta-color-text-primary);
  font-family: var(--font-body);
  line-height: 1.4;
  margin: 0;
}

.ta-sub-section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}

/* ── ContentStack: vertical flex with token-controlled gap ── */
.ta-content-stack {
  display: flex;
  flex-direction: column;
  gap: var(--ta-content-stack-spacing, 1rem);
}


/*
 * Form Field Component Styles
 * Migrated from form-field.js to Tailwind v4 CSS-first approach
 * 
 * Hardcoded values:
 * - Box shadow values: These match the theme's boxShadow definitions for outline states
 *   (#616161 for outline, #000 for outlineActive, rgba(25, 25, 25, 0.86) for outlineHover,
 *   #b5002a for error states)
 * - Autofill background: rgb(234, 242, 247) is a browser-specific autofill styling
 */

@layer components {
  .ta-form-field {
    display: inline-block;
    position: relative;
    text-align: left;
    line-height: 1;

    label {
      font-size: 0.875rem;
      transition-property:
        background-color, border-color, color, fill, stroke, opacity,
        box-shadow, transform;
      transition-duration: 200ms;
      display: block;
      margin-bottom: 0.5rem;
      font-weight: 500;

      .required-marker {
        color: var(--color-error);
      }
    }

    input:-webkit-autofill,
    textarea:-webkit-autofill,
    select:-webkit-autofill {
      -webkit-box-shadow: 0 0 0px 1000px rgb(234, 242, 247) inset !important;
    }

    input::placeholder {
      color: var(--color-gray-2);
    }
  }

  .ta-form-field--focused {
    .ta-form-field-flex {
      box-shadow: 0 0 0 2px #000;
    }
  }

  .ta-form-field--autofilled {
    .ta-form-field-flex {
      background-color: rgb(234, 242, 247);
    }
  }

  .ta-form-field--invalid {
    label {
      stroke: var(--color-gray-1);
      color: var(--color-gray-1);
    }

    .ta-form-field-flex {
      box-shadow: 0 0 0 1px #b5002a;
    }
  }

  .ta-form-field:not(.ta-form-field--disabled):not(.ta-form-field--readonly) {
    .ta-form-field-flex {
      &:hover {
        box-shadow: 0 0 0 2px rgba(25, 25, 25, 0.86);
      }
    }
  }

  .ta-form-field:not(.ta-form-field--disabled):not(
      .ta-form-field--readonly
    ).ta-form-field--invalid {
    .ta-form-field-flex {
      &:hover {
        box-shadow: 0 0 0 2px #b5002a;
      }
    }
  }

  .ta-form-field:not(.ta-form-field--disabled):not(
      .ta-form-field--readonly
    ).ta-form-field--invalid.ta-form-field--focused {
    .ta-form-field-flex {
      box-shadow: 0 0 0 2px #b5002a;
    }
  }

  .ta-form-field--disabled,
  .ta-form-field--readonly {
    .ta-form-field-flex {
      color: var(--color-gray-2);
      background-color: var(--color-gray-6);
      cursor: not-allowed;

      .ta-input-element {
        cursor: not-allowed;
      }
    }
  }

  .ta-form-field-flex-prefix,
  .ta-form-field-flex-suffix {
    flex-shrink: 1;
    display: flex;
    color: var(--color-gray-2);
    line-height: 1;
    min-height: 1.1875rem;
    align-items: center;

    .mat-icon,
    .material-icons {
      font-size: 1.25rem;
      margin-top: -0.0625rem;
      height: 1.25rem;
      width: 1.25rem;
    }
  }

  .ta-form-field-flex-infix {
    flex-grow: 1;
    position: relative;
    display: inline-flex;
    max-width: 100%;
  }

  .ta-form-field-type-ta-native-select,
  .ta-form-field-type-ta-native-select-multiple {
    .ta-input-element {
      padding-right: 2rem;
    }
  }

  .ta-form-field-status-wrapper {
    border-radius: 10px;
    transition-property:
      background-color, border-color, color, fill, stroke, opacity, box-shadow,
      transform;
    transition-duration: 200ms;
  }

  .ta-form-field-large {
    &.ta-form-field-type-ta-native-select,
    &.ta-form-field-type-ta-native-select-multiple,
    &.ta-form-field-type-ta-select {
      .ta-input-element {
        padding-top: 1.125rem;
        padding-bottom: 1.0625rem;
      }
    }
  }

  .ta-form-field-regular {
    &.ta-form-field-type-ta-native-select,
    &.ta-form-field-type-ta-native-select-multiple,
    &.ta-form-field-type-ta-select {
      .ta-input-element {
        padding-top: 0.625rem;
        padding-bottom: 0.5625rem;
      }
    }
  }

  .ta-form-field-small {
    .ta-input-element {
      font-size: 0.875rem;
    }

    &.ta-form-field-type-ta-native-select,
    &.ta-form-field-type-ta-native-select-multiple,
    &.ta-form-field-type-ta-select {
      .ta-input-element {
        padding-top: 0.5rem;
        padding-bottom: 0.4375rem;
      }
    }
  }

  .ta-form-field-large:not(.ta-form-field-type-ta-native-select):not(
      .ta-form-field-type-ta-native-select-multiple
    ):not(.ta-form-field-type-ta-textarea):not(.ta-form-field-type-ta-select) {
    .ta-input-element {
      padding-top: 1rem;
      padding-bottom: 1rem;
    }
  }

  .ta-form-field-regular:not(.ta-form-field-type-ta-native-select):not(
      .ta-form-field-type-ta-native-select-multiple
    ):not(.ta-form-field-type-ta-textarea):not(.ta-form-field-type-ta-select) {
    .ta-input-element {
      padding-top: 0.5rem;
      padding-bottom: 0.5rem;
    }
  }

  .ta-form-field-small:not(.ta-form-field-type-ta-native-select):not(
      .ta-form-field-type-ta-native-select-multiple
    ):not(.ta-form-field-type-ta-textarea):not(.ta-form-field-type-ta-select) {
    .ta-input-element {
      padding-top: 0.375rem;
      padding-bottom: 0.375rem;
    }
  }

  .ta-form-field-large .ta-form-field-flex {
    padding-right: 1rem;
    padding-left: 1rem;
    border-radius: 8px;
  }

  .ta-form-field-regular .ta-form-field-flex {
    padding-right: 1rem;
    padding-left: 1rem;
    border-radius: 8px;
  }

  .ta-form-field-small .ta-form-field-flex {
    padding-right: 1rem;
    padding-left: 1rem;
    border-radius: 8px;
  }

  .ta-form-field-large,
  .ta-form-field-regular,
  .ta-form-field-small {
    &.ta-form-field--unpadded .ta-form-field-flex {
      padding-right: 0;
      padding-left: 0;
    }

    &.ta-form-field--unpadded .ta-form-field-flex-infix {
      max-width: 100%;
    }
  }

  .ta-form-field-large.ta-form-field-type-ta-textarea {
    .ta-form-field-flex {
      padding: 0.25rem 0.125rem;
    }

    textarea.ta-input-element {
      padding: 0.75rem 0.875rem;
      resize: vertical;
    }
  }

  .ta-form-field-regular.ta-form-field-type-ta-textarea {
    .ta-form-field-flex {
      padding: 0.25rem 0.125rem;
    }

    textarea.ta-input-element {
      padding: 0.25rem 0.875rem;
      resize: vertical;
    }
  }

  .ta-form-field-small.ta-form-field-type-ta-textarea {
    .ta-form-field-flex {
      padding: 0.25rem 0.125rem;
    }

    textarea.ta-input-element {
      padding: 0.125rem 0.875rem;
      resize: vertical;
    }
  }

  .ta-form-field-flex {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    line-height: 1.375;
    background-color: var(--color-white);
    transition: inherit;
    transition-property:
      background-color, border-color, color, fill, stroke, opacity, box-shadow,
      transform;
    transition-duration: 200ms;
    box-shadow: 0 0 0 1px #616161;
  }

  .ta-form-field-hint-wrapper,
  .ta-form-field-error-wrapper {
    display: flex;
  }

  .ta-form-field-error-wrapper {
    color: var(--color-error);
    stroke: var(--color-error);

    .ta-helper-text {
      display: flex;

      &::before {
        font-family: 'Material Icons', sans-serif;
        content: 'report';
        line-height: 1;
        font-size: 1rem;
        width: 1rem;
        height: 1rem;
        margin-top: -0.125rem;
        margin-right: 0.25rem;
      }
    }
  }

  .ta-form-field-subscript-spacer {
    flex: 1 0 1rem;
  }

  .ta-form-field-large .ta-form-field-subscript-wrapper {
    margin-top: 0.5rem;
  }

  .ta-form-field-regular .ta-form-field-subscript-wrapper {
    margin-top: 0.5rem;
  }

  .ta-form-field-small .ta-form-field-subscript-wrapper {
    margin-top: 0.5rem;
  }

  .ta-form-field-subscript-wrapper {
    font-size: 0.75rem;
    color: var(--color-gray-2);
  }

  .ta-input-element-full-width {
    width: 100%;
  }

  .ta-input-element {
    font-size: 1rem;

    appearance: none;
    outline: none;
    line-height: 1.375;

    &:-moz-ui-invalid {
      box-shadow: none;
    }

    &::-ms-clear,
    &::-ms-reveal {
      display: none;
    }

    &[type='date'],
    &[type='datetime'],
    &[type='datetime-local'],
    &[type='month'],
    &[type='week'],
    &[type='time'] {
      /* Due to the native input masking these inputs can be slightly taller than
         the plain text inputs. We normalize it by resetting the line height. */
      line-height: 1;

      /* See: https://stackoverflow.com/questions/18381594/input-type-date-appearance-in-safari-on-ios */
      &::after {
        content: ' ';
        white-space: pre;
        width: 1px;
      }
    }

    /* Reduce the size of the native buttons in a date/time input,
       because they can increase the height of the input. */
    &::-webkit-inner-spin-button,
    &::-webkit-calendar-picker-indicator,
    &::-webkit-clear-button {
      font-size: 0.75rem;
    }
  }

  /* TaInputElement */
  .ta-form-field .ta-input-element {
    font: inherit;
    font-size: 1rem;
    line-height: 1;
    background: transparent;
    color: currentColor;
    max-width: 100%;
    min-width: 1px;
    vertical-align: bottom;
    text-align: inherit;
  }

  .ta-form-field .ta-input-element--small-font {
    font-size: 0.875rem;
  }

  .ta-input-element-full-width {
    width: 100%;
    flex: 1 1 0%;
  }

  input.ta-input-element {
    display: inline-block;
    line-height: 1;
  }
}


/*
 * Table component styles
 * 
 * Hardcoded color values that remain:
 * - #EBEBEB: border color for header and footer cells
 *   This is a specific design token that doesn't map to existing grey scale variables
 */

@layer components {
  .ta-table-row {
    border-bottom: 1px solid;
    border-bottom-color: var(--color-gray-4);
  }

  .ta-table-row-condensed {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.75rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .ta-table-header-cell {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-black);
    text-align: left;
    padding: 0.5rem;
    border-bottom: 1px solid #ebebeb;
  }

  .ta-table-footer-cell {
    font-size: 1rem;
    color: var(--color-black);
    text-align: left;
    padding: 0.5rem;
    border-bottom: 1px solid #ebebeb;
  }

  .ta-table-cell {
    font-size: 1rem;
    color: var(--color-gray-1);
    padding: 0.5rem;
    padding-top: 0.5625rem;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .ta-table-checkbox-cell {
    width: 1.25rem;
    padding-right: 1rem;
  }

  .ta-table-row-condensed:has(.ta-table-checkbox-cell)
    .ta-table-cell-condensed[tatablerowheader] {
    width: calc(100% - 1.25rem - 1rem);
  }

  .ta-table-cell-condensed {
    display: block;
    padding-top: 0.5rem;
    min-width: 47%;

    &.ta-table-checkbox-cell {
      min-width: 1.25rem;
      display: flex;
      align-items: center;
    }

    &[tatablerowheader] {
      font-size: 1.125rem;
      font-weight: 500;
      width: 100%;
    }

    &[tatablecellcondensedfullwidth] {
      width: 100%;
    }
  }

  .ta-table-cell-condensed-with-label {
    &:not([tatablerowheader]):before {
      content: attr(data-condensed-label);
      display: block;
      font-size: 0.75rem;
      font-weight: 400;
      margin-bottom: 0.175rem;
      color: var(--color-gray-2);
    }
  }
}


@layer components {
  .ta-tag {
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-items: center;
    white-space: nowrap;
    color: var(--ta-color-text-primary);
    gap: var(--ta-grid-gap-element);
  }

  .ta-tag-pill {
    border-radius: var(--ta-radius-full);
  }

  .ta-tag-border {
    border-width: 1px;
  }

  .ta-tag-regular {
    padding-right: var(--ta-grid-padding-element-x);
    padding-left: var(--ta-grid-padding-element-x);
    min-height: 1.5rem;
    font-size: var(--ta-typography-size-body-supporting);
    font-weight: 500;
    line-height: 1;

    .ta-tag-icon {
      font-size: 1rem;
      line-height: 1;
      height: 1rem;
      width: 1rem;
    }
  }

  .ta-tag-icon {
    color: var(--ta-color-icon-default);
  }

  .ta-tag-info {
    background-color: var(--ta-color-surface-info-light);
    border-color: var(--ta-color-border-info);
    color: var(--ta-color-text-info);

    .ta-tag-icon {
      color: var(--ta-color-icon-info);
    }
  }

  .ta-tag-success {
    background-color: var(--ta-color-surface-success-light);
    border-color: var(--ta-color-border-success);
    color: var(--ta-color-text-success);

    .ta-tag-icon {
      color: var(--ta-color-icon-success);
    }
  }

  .ta-tag-warning {
    background-color: var(--ta-color-surface-warning-light);
    border-color: var(--ta-color-border-warning);
    color: var(--ta-color-text-warning);

    .ta-tag-icon {
      color: var(--ta-color-icon-warning);
    }
  }

  .ta-tag-error {
    background-color: var(--ta-color-surface-danger-light);
    border-color: var(--ta-color-border-danger);
    color: var(--ta-color-text-danger);

    .ta-tag-icon {
      color: var(--ta-color-icon-danger);
    }
  }

  .ta-tag-pending {
    background-color: var(--ta-color-surface-pending-light);
    border-color: var(--ta-color-border-pending);
    color: var(--ta-color-text-pending);

    .ta-tag-icon {
      color: var(--ta-color-icon-pending);
    }
  }

  .ta-tag-enabled {
    background-color: var(--ta-color-surface-neutral-default);
    border-color: var(--ta-color-border-brand-primary);
  }

  .ta-tag-disabled {
    background-color: var(--ta-color-surface-neutral-disabled);
    border-color: var(--ta-color-border-disabled);
    color: var(--ta-color-text-disabled);
  }
}


@layer components {
  .ta-status-panel {
    display: flex;
    font-size: var(--ta-typography-size-body-default);
    position: relative;
    padding: var(--ta-grid-padding-component-x)
      var(--ta-grid-padding-component-y);
    border-radius: var(--ta-radius-default);
    border: 1px solid var(--ta-color-border-default);
    gap: var(--ta-grid-gap-component);
  }

  .ta-status-icon {
    color: var(--ta-color-icon-default);
    user-select: none;
    flex-shrink: 0;
  }

  .ta-status-content {
    color: var(--ta-color-text-primary);
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-line;
    align-self: center;
  }

  .ta-status-info {
    background-color: var(--ta-color-surface-info-light);
    border-color: var(--ta-color-border-info);

    .ta-status-icon {
      color: var(--ta-color-icon-info);
    }
  }

  .ta-status-warning {
    background-color: var(--ta-color-surface-warning-light);
    border-color: var(--ta-color-border-warning);

    .ta-status-icon {
      color: var(--ta-color-icon-warning);
    }
  }

  .ta-status-success {
    background-color: var(--ta-color-surface-success-light);
    border-color: var(--ta-color-border-success);

    .ta-status-icon {
      color: var(--ta-color-icon-success);
    }
  }

  .ta-status-error {
    background-color: var(--ta-color-surface-danger-light);
    border-color: var(--ta-color-border-danger);

    .ta-status-icon {
      color: var(--ta-color-icon-danger);
    }
  }

  .ta-status-neutral-1 {
    background-color: var(--ta-color-surface-neutral-default);
    border-color: var(--ta-color-border-brand-primary);
  }
}


/* AdminShell styles — matches @ta/react-base-ui AdminLayout tokens.
   Depends on tokens from colors_and_type.css and Material Icons — load those
   in the host HTML (this CSS does not @import them).

   Breakpoints (match tailwind plugin):
     md : 768px  — secondary toolbar appears inline; search expands
     lg : 1024px — content sidebar appears; secondary toolbar stays on a bar
                    below lg: secondary nav collapses into the slide-over menu;
                    page sidebar becomes a ContentNavSmall expandable panel.
*/

* { box-sizing: border-box; }
html, body { margin:0; padding:0; background: var(--color-gray-5); font-family: var(--font-body); color: var(--color-gray-1); -webkit-font-smoothing: antialiased; }
.material-icons { font-family: 'Material Icons'; font-weight: normal; font-style: normal; display:inline-block; line-height:1; vertical-align:middle; -webkit-font-feature-settings:'liga'; font-feature-settings:'liga'; text-transform: none; letter-spacing: normal; white-space: nowrap; word-wrap: normal; direction: ltr; }

/* ── Root ──
   `height: 100vh` (not min-height) prevents 1–2px subpixel overflow from
   flex-column children rounding up. */
.ta-admin { height: 100vh; display: flex; flex-direction: column; background: var(--color-gray-5); }

/* ── Header (sticky) ── */
.ta-admin-header { position: sticky; top: 0; z-index: 30; background: #fff; display: flex; flex-direction: column; }

/* Primary toolbar — white, h-16, border-b */
.ta-admin-primary { background: #fff; border-bottom: 1px solid var(--color-gray-4); }
.ta-admin-primary-inner {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px;
  height: 60px;
  min-width: 0;
}
@media (min-width: 768px) {
  .ta-admin-primary-inner { gap: 12px; padding: 0 24px; height: 64px; }
}

.ta-admin-menubtn {
  width: 40px; height: 40px; border: 0; border-radius: 9999px;
  background: transparent; color: var(--color-gray-1);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.ta-admin-menubtn:hover { background: var(--color-gray-5); }
.ta-admin-menubtn .material-icons { font-size: 24px; }

.ta-admin-app-title {
  display: flex; flex-direction: column; min-width: 0; line-height: 1.3;
  flex-shrink: 1; overflow: hidden;
}
.ta-admin-app-title .ctx { font-size: 15px; font-weight: 600; color: var(--color-gray-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-admin-app-title .app { font-size: 12px; color: var(--color-gray-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-admin-app-title .app.lg { font-size: 15px; font-weight: 600; color: var(--color-gray-1); }
@media (min-width: 768px) {
  .ta-admin-app-title .ctx { font-size: 16px; }
  .ta-admin-app-title .app.lg { font-size: 16px; }
}

/* Search: below md = hidden, replaced by icon; md-lg = 200px; lg+ = 280px */
.ta-admin-search {
  display: none;
  align-items: center; gap: 8px;
  background: var(--color-gray-5); border: 1px solid var(--color-gray-4);
  border-radius: 8px; padding: 0 10px 0 12px; height: 36px;
}
@media (min-width: 768px) {
  .ta-admin-search { display: flex; width: 220px; }
}
@media (min-width: 1280px) {
  .ta-admin-search { width: 280px; }
}
.ta-admin-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 13px; font-family: inherit; color: var(--color-gray-1); }
.ta-admin-search input::placeholder { color: var(--color-gray-3); }
.ta-admin-search .material-icons { color: var(--color-gray-3); font-size: 18px; }
.ta-admin-search .kbd { font-family: var(--font-mono); font-size: 11px; color: var(--color-gray-3); background: #fff; border: 1px solid var(--color-gray-4); border-radius: 4px; padding: 1px 5px; display: none; }
@media (min-width: 1280px) {
  .ta-admin-search .kbd { display: inline-block; }
}

/* Search icon-button visible only below md */
.ta-admin-searchbtn { display: inline-flex; }
@media (min-width: 768px) { .ta-admin-searchbtn { display: none; } }

.ta-admin-trailing { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
@media (min-width: 768px) { .ta-admin-trailing { gap: 12px; } }
.ta-admin-trailing .ta-admin-search { margin-right: 0; }
@media (min-width: 768px) { .ta-admin-trailing .ta-admin-search { margin-right: 4px; } }
.ta-admin-trailing .iconbtn { width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--color-gray-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; flex-shrink: 0; }
.ta-admin-trailing .iconbtn:hover { background: var(--color-gray-5); color: var(--color-gray-1); }
.ta-admin-trailing .iconbtn .material-icons { font-size: 20px; }
.ta-admin-trailing .iconbtn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 9999px; background: var(--ta-color-surface-danger-default); border: 2px solid #fff; }

/* Help button hidden on very small screens — low-priority affordance */
.ta-admin-trailing .iconbtn.help-btn { display: none; }
@media (min-width: 640px) { .ta-admin-trailing .iconbtn.help-btn { display: inline-flex; } }

/* User chip: on mobile only the avatar shows; meta + chevron hidden */
.ta-admin-me {
  display: flex; align-items: center; gap: 8px;
  padding: 0 4px; cursor: pointer; border-radius: 8px;
}
.ta-admin-me:hover { background: var(--color-gray-5); }
.ta-admin-me .avatar { width: 32px; height: 32px; border-radius: 9999px; background: var(--color-primary-lighter); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.ta-admin-me .meta { display: none; flex-direction: column; line-height: 1.3; }
.ta-admin-me .chev { display: none; }
@media (min-width: 1024px) {
  .ta-admin-me { gap: 10px; padding: 0 8px 0 4px; }
  .ta-admin-me .meta { display: flex; }
  .ta-admin-me .chev { display: inline-flex; }
}
.ta-admin-me .name { font-size: 13px; font-weight: 500; color: var(--color-gray-1); white-space: nowrap; }
.ta-admin-me .role { font-size: 11px; color: var(--color-gray-2); }

/* Secondary toolbar — black/gray-1, h-11; hidden below lg (moves into menu) */
.ta-admin-secondary { display: none; background: var(--color-gray-1); color: #fff; border-bottom: 1px solid var(--color-gray-1); }
@media (min-width: 1024px) { .ta-admin-secondary { display: block; } }
.ta-admin-secondary-inner { display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 44px; max-width: 1440px; margin: 0 auto; width: 100%; overflow-x: auto; scrollbar-width: thin; }
.ta-admin-secondary .mod { font-size: 16px; font-weight: 600; color: #fff; flex-shrink: 0; }
.ta-admin-secondary nav { display: flex; align-items: center; gap: 4px; flex-grow: 1; }
.ta-admin-secondary nav a { padding: 6px 12px; border-radius: 6px; color: rgba(255,255,255,0.75); font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 120ms var(--ta-ease), color 120ms var(--ta-ease); }
.ta-admin-secondary nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ta-admin-secondary nav a[aria-current="page"] { background: rgba(255,255,255,0.14); color: #fff; }

/* ── Body / Main container ── */
.ta-admin-body { flex-grow: 1; background: var(--color-gray-6); display: flex; min-height: 0; }
.ta-admin-maxwidth { width: 100%; margin: 0 auto; display: flex; flex-grow: 1; position: relative; background: var(--color-gray-6); min-width: 0; }

/* Content sidebar — fixed, w-60; hidden below lg */
.ta-admin-sidebar {
  display: none;
  width: 240px; flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--color-gray-4);
  position: sticky; top: 110px;
  /* Header is 64px primary + 1px border + 44px secondary + 1px border = 110px.
     Match exactly so sidebar bottom doesn't overflow the viewport by 2px. */
  height: calc(100vh - 110px); overflow-y: auto;
}
@media (min-width: 1024px) { .ta-admin-sidebar { display: block; } }
.ta-admin-sidebar .sidebar-inner { background: #fff; display: flex; flex-direction: column; gap: 24px; padding: 16px 16px 24px; }
.ta-admin-sidebar .sidebar-group { display: flex; flex-direction: column; gap: 2px; }
.ta-admin-sidebar .sidebar-lbl { font-size: 11px; color: var(--color-gray-2); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; padding: 4px 12px 6px; }
.ta-admin-sidebar a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 6px; color: var(--color-gray-1); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background 120ms var(--ta-ease); }
.ta-admin-sidebar a:hover { background: var(--color-gray-5); }
.ta-admin-sidebar a[aria-current="page"] { background: var(--ta-color-surface-brand-light, #e7eaed); color: var(--color-primary); }
.ta-admin-sidebar a .material-icons { color: var(--color-gray-2); }
.ta-admin-sidebar a[aria-current="page"] .material-icons { color: var(--color-primary); }
.ta-admin-sidebar a .badge { margin-left: auto; background: var(--color-gray-5); color: var(--color-gray-2); font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 9999px; }
.ta-admin-sidebar a[aria-current="page"] .badge { background: var(--color-primary); color: #fff; }

/* ── Content Nav Small — shown only below lg, above main content ── */
/* When the panel is open we lift the toolbar above the backdrop so the
   trigger button is still visible (and clickable to close). */
.ta-admin-contentnav-small { display: block; background: #fff; position: relative; z-index: 26; }
@media (min-width: 1024px) { .ta-admin-contentnav-small { display: none; } }
.ta-admin-contentnav-toolbar { display: flex; align-items: center; padding: 8px 16px; min-height: 52px; gap: 8px; border-bottom: 1px solid var(--color-gray-5); }
/* No separate "open" state — divider stays the same gray-5 used between
   sections inside the dropdown, so the trigger row reads as part of the menu. */
.ta-admin-contentnav-toolbar .page-title { font-size: 15px; font-weight: 600; color: var(--color-gray-1); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-admin-contentnav-toolbar .expand-btn {
  width: 40px; height: 40px; border-radius: 9999px;
  background: transparent; color: var(--color-gray-2);
  border: 1px solid var(--color-gray-4);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background 120ms var(--ta-ease);
}
.ta-admin-contentnav-toolbar .expand-btn:hover { background: var(--color-gray-5); }
.ta-admin-contentnav-toolbar .expand-btn[aria-expanded="true"] { background: var(--color-gray-4); }
.ta-admin-contentnav-toolbar .expand-btn .material-icons { font-size: 24px; }

.ta-admin-contentnav-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; z-index: 27;
  border-bottom: 1px solid var(--color-gray-4);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  /* Match production: panel anchors below the toolbar and may extend to the
     viewport bottom. Use the measured toolbar-bottom offset so the panel
     fills exactly the space the backdrop covers. */
  max-height: calc(100vh - var(--cn-backdrop-top, 116px));
  min-height: calc(100vh - var(--cn-backdrop-top, 116px));
  overflow-y: auto;
  animation: slide-down 220ms cubic-bezier(0,0,0.2,1);
}
@keyframes slide-down { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ta-admin-contentnav-panel .sidebar-group { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--color-gray-5); }
.ta-admin-contentnav-panel .sidebar-group:last-child { border-bottom: 0; padding-bottom: 24px; }
.ta-admin-contentnav-panel .sidebar-lbl { font-size: 11px; color: var(--color-gray-2); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; padding: 4px 12px 6px; }
.ta-admin-contentnav-panel a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; color: var(--color-gray-1); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.ta-admin-contentnav-panel a:hover { background: var(--color-gray-5); }
.ta-admin-contentnav-panel a[aria-current="page"] { background: var(--ta-color-surface-brand-light, #e7eaed); color: var(--color-primary); }
.ta-admin-contentnav-panel a .material-icons { color: var(--color-gray-2); }
.ta-admin-contentnav-panel a[aria-current="page"] .material-icons { color: var(--color-primary); }
.ta-admin-contentnav-panel a .badge { margin-left: auto; background: var(--color-gray-5); color: var(--color-gray-2); font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 9999px; }
.ta-admin-contentnav-panel a[aria-current="page"] .badge { background: var(--color-primary); color: #fff; }

.ta-admin-contentnav-backdrop {
  /* Anchor to the toolbar's bottom edge so the toolbar trigger
     row stays clear of the backdrop and the user can see what they opened. */
  position: fixed; left: 0; right: 0; bottom: 0; top: var(--cn-backdrop-top, 0);
  z-index: 24; background: rgba(0,0,0,0.35);
  animation: fade-in 200ms var(--ta-ease);
}

/* Content */
.ta-admin-content { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; background: var(--color-gray-6); }
.ta-admin-content main { flex-grow: 1; padding: 16px; min-width: 0; }
@media (min-width: 768px) { .ta-admin-content main { padding: 24px; } }
@media (min-width: 1024px) { .ta-admin-content main { padding: 24px 32px 48px; } }

/* ── Slide-over menu ── */
.ta-admin-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0.5); animation: fade-in 200ms var(--ta-ease); }
.ta-admin-menu {
  position: fixed; left: 0; top: 0; height: 100%;
  width: 384px; max-width: 100vw;
  background: #fff; z-index: 50;
  box-shadow: 0 0 16px rgba(0,0,0,0.25), 0 0 32px rgba(0,0,0,0.125);
  display: flex; flex-direction: column;
  animation: slide-in 250ms cubic-bezier(0,0,0.2,1);
}
@media (max-width: 419px) { .ta-admin-menu { width: 100vw; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(-100%); } }

.ta-admin-menu .menu-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--color-gray-4); flex-shrink: 0; }
.ta-admin-menu .menu-header .iconbtn { width: 32px; height: 32px; border: 0; border-radius: 9999px; background: transparent; color: var(--color-gray-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ta-admin-menu .menu-header .iconbtn:hover { background: var(--color-gray-5); color: var(--color-gray-1); }

.ta-admin-menu .menu-swap {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: transparent;
  color: var(--color-primary); font-size: 14px; font-weight: 500;
  border: 0; border-bottom: 1px solid var(--color-gray-4);
  cursor: pointer; text-align: left; width: 100%; flex-shrink: 0;
}
.ta-admin-menu .menu-swap:hover { background: var(--color-gray-5); }
.ta-admin-menu .menu-swap .material-icons { font-size: 20px; }

.ta-admin-menu .menu-scroll { overflow-y: auto; flex: 1; }
.ta-admin-menu nav { padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.ta-admin-menu nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--color-gray-1); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.ta-admin-menu nav a:hover { background: var(--color-gray-5); }
.ta-admin-menu nav a[aria-current="page"] { background: var(--ta-color-surface-brand-light, #e7eaed); color: var(--color-primary); }
.ta-admin-menu nav a .material-icons { color: var(--color-gray-2); }
.ta-admin-menu nav a[aria-current="page"] .material-icons { color: var(--color-primary); }

.ta-admin-menu .menu-section-label { font-size: 11px; color: var(--color-gray-2); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; padding: 16px 24px 6px; }


.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}



:root{--color-error:#b5002a;--color-transparent:transparent;}
body{margin:0;background:var(--color-gray-6);font-family:var(--font-body);color:var(--color-gray-1);}
a{color:var(--color-link);}
a:hover{color:var(--color-link-visited);}
.spin{animation:spin 1s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}
.amx-row:hover{background:var(--color-gray-6);}
.ta-tag .material-icons,.ta-tag-icon.material-icons{font-size:15px;line-height:1;}