/* ============================================================================
 * GOOGLE CLOUD CONSOLE (PANTHEON) DESIGN TOKENS & SECTION 508 BASELINE
 * Default Theme: LIGHT (html.theme-light) | Secondary Theme: DARK (html.theme-dark)
 * Compliance: US Federal Revised Section 508 / WCAG 2.1 Level AA
 * ============================================================================ */

:root,
html.theme-light,
html[data-theme="light"] {
  color-scheme: light;

  /* Surface & Canvas Tokens */
  --gcp-bg-canvas: #f8f9fa;
  --gcp-bg-surface: #ffffff;
  --gcp-bg-surface-alt: #f1f3f4;
  --gcp-bg-surface-hover: #f8f9fa;
  --gcp-bg-surface-selected: #e8f0fe;
  --gcp-bg-header: #ffffff;
  --gcp-bg-code: #f1f3f4;
  --gcp-bg-overlay: rgba(32, 33, 36, 0.48);

  /* Typography Tokens (WCAG AA Verified) */
  --gcp-text-primary: #202124;
  --gcp-text-secondary: #5f6368;
  --gcp-text-muted: #5f6368;
  --gcp-text-on-primary: #ffffff;
  --gcp-text-link: #1967d2;
  --gcp-text-link-hover: #174ea6;

  /* Border & Divider Tokens */
  --gcp-border-subtle: #dadce0;
  --gcp-border-strong: #80868b;
  --gcp-border-input: #747775;
  --gcp-border-focus: #1a73e8;

  /* Brand & Interactive Primary (Google Blue) */
  --gcp-primary: #1a73e8;
  --gcp-primary-hover: #1765cc;
  --gcp-primary-active: #185abc;
  --gcp-primary-container: #e8f0fe;
  --gcp-on-primary-container: #174ea6;

  /* Secondary Accent (Clinical / Google Cyan-Blue) */
  --gcp-secondary: #007b83;
  --gcp-secondary-container: #e4f7fb;

  /* Semantic Status: Success / Healthy */
  --gcp-success: #1e8e3e;
  --gcp-success-bg: #e6f4ea;
  --gcp-success-border: #81c995;
  --gcp-success-text: #137333;

  /* Semantic Status: Warning / Degraded */
  --gcp-warning: #e37400;
  --gcp-warning-bg: #fef7e0;
  --gcp-warning-border: #fdd663;
  --gcp-warning-text: #b06000;

  /* Semantic Status: Error / Critical */
  --gcp-error: #d93025;
  --gcp-error-bg: #fce8e6;
  --gcp-error-border: #f28b82;
  --gcp-error-text: #c5221f;

  /* Semantic Status: Info / Active */
  --gcp-info: #1967d2;
  --gcp-info-bg: #e8f0fe;
  --gcp-info-border: #8ab4f8;
  --gcp-info-text: #174ea6;

  /* Elevation & Shadows */
  --gcp-shadow-1: 0 1px 2px 0 rgba(60, 64, 67, 0.30), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  --gcp-shadow-2: 0 1px 3px 0 rgba(60, 64, 67, 0.30), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
  --gcp-focus-ring: 0 0 0 2px #ffffff, 0 0 0 4px #1a73e8;

  /* Typography Families & Scale */
  --gcp-font-display: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --gcp-font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --gcp-font-mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout & Geometry */
  --gcp-radius-sm: 4px;
  --gcp-radius-md: 8px;
  --gcp-radius-lg: 12px;
  --gcp-radius-pill: 9999px;
}

html.theme-dark,
html[data-theme="dark"] {
  color-scheme: dark;

  /* Surface & Canvas Tokens */
  --gcp-bg-canvas: #202124;
  --gcp-bg-surface: #292a2d;
  --gcp-bg-surface-alt: #35363a;
  --gcp-bg-surface-hover: #3c4043;
  --gcp-bg-surface-selected: rgba(138, 180, 248, 0.16);
  --gcp-bg-header: #292a2d;
  --gcp-bg-code: #171717;
  --gcp-bg-overlay: rgba(0, 0, 0, 0.65);

  /* Typography Tokens (WCAG AA Verified) */
  --gcp-text-primary: #e8eaed;
  --gcp-text-secondary: #9aa0a6;
  --gcp-text-muted: #9aa0a6;
  --gcp-text-on-primary: #202124;
  --gcp-text-link: #8ab4f8;
  --gcp-text-link-hover: #aecbfa;

  /* Border & Divider Tokens */
  --gcp-border-subtle: #3c4043;
  --gcp-border-strong: #5f6368;
  --gcp-border-input: #80868b;
  --gcp-border-focus: #8ab4f8;

  /* Brand & Interactive Primary (Google Blue Dark Mode) */
  --gcp-primary: #8ab4f8;
  --gcp-primary-hover: #aecbfa;
  --gcp-primary-active: #669df6;
  --gcp-primary-container: rgba(138, 180, 248, 0.16);
  --gcp-on-primary-container: #d2e3fc;

  /* Secondary Accent */
  --gcp-secondary: #78d9ec;
  --gcp-secondary-container: rgba(120, 217, 236, 0.14);

  /* Semantic Status: Success / Healthy */
  --gcp-success: #81c995;
  --gcp-success-bg: rgba(129, 201, 149, 0.14);
  --gcp-success-border: #34a853;
  --gcp-success-text: #81c995;

  /* Semantic Status: Warning / Degraded */
  --gcp-warning: #fdd663;
  --gcp-warning-bg: rgba(253, 214, 99, 0.14);
  --gcp-warning-border: #fbbc04;
  --gcp-warning-text: #fdd663;

  /* Semantic Status: Error / Critical */
  --gcp-error: #f28b82;
  --gcp-error-bg: rgba(242, 139, 130, 0.14);
  --gcp-error-border: #ea4335;
  --gcp-error-text: #f28b82;

  /* Semantic Status: Info / Active */
  --gcp-info: #8ab4f8;
  --gcp-info-bg: rgba(138, 180, 248, 0.14);
  --gcp-info-border: #4285f4;
  --gcp-info-text: #8ab4f8;

  /* Elevation & Shadows */
  --gcp-shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.60), 0 1px 3px 1px rgba(0, 0, 0, 0.35);
  --gcp-shadow-2: 0 2px 6px 2px rgba(0, 0, 0, 0.55);
  --gcp-focus-ring: 0 0 0 2px #202124, 0 0 0 4px #8ab4f8;
}

/* ============================================================================
 * BASE ELEMENT RESETS & ACCESSIBILITY PRIMITIVES
 * ============================================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--gcp-bg-canvas);
  color: var(--gcp-text-primary);
  font-family: var(--gcp-font-sans);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background-color 150ms ease, color 150ms ease;
}

/* Section 508 Focus Indicator */
:focus-visible {
  outline: 2px solid var(--gcp-border-focus);
  outline-offset: 2px;
  box-shadow: var(--gcp-focus-ring);
}

/* Section 508 Skip Navigation Link */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 16px;
  z-index: 10000;
  padding: 8px 16px;
  background-color: var(--gcp-primary);
  color: var(--gcp-text-on-primary);
  font-family: var(--gcp-font-display);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--gcp-radius-sm);
  text-decoration: none;
  box-shadow: var(--gcp-shadow-2);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 8px;
}

/* Visually Hidden Utility for Screen Readers */
.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;
}

/* ============================================================================
 * PANTHEON TOP APPLICATION BAR & THEME TOGGLE
 * ============================================================================ */

.gcp-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 6px 20px;
  background-color: var(--gcp-bg-header);
  border-bottom: 1px solid var(--gcp-border-subtle);
  flex-shrink: 0;
}

.gcp-topbar__title {
  font-family: var(--gcp-font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--gcp-text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.gcp-topbar__spacer {
  flex: 1 1 auto;
}

.gcp-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  background-color: var(--gcp-bg-surface);
  color: var(--gcp-text-primary);
  border: 1px solid var(--gcp-border-subtle);
  border-radius: var(--gcp-radius-pill);
  font-family: var(--gcp-font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.gcp-theme-toggle:hover {
  background-color: var(--gcp-bg-surface-hover);
  border-color: var(--gcp-border-strong);
}

.gcp-theme-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

html.theme-light .gcp-theme-icon--sun {
  display: none;
}

html.theme-dark .gcp-theme-icon--moon {
  display: none;
}

/* ============================================================================
 * LAYOUT & FLEX UTILITIES (MAPPED TO PANTHEON TOKENS)
 * ============================================================================ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.hidden { display: none !important; }
.inline-block { display: inline-block; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.h-screen { height: 100vh; }
.w-screen { width: 100vw; }
.h-full { height: 100%; }
.w-full { width: 100%; }
.w-fit { width: fit-content; }
.min-w-full { min-width: 100%; }
.h-1 { height: 0.25rem; }
.h-1\.5 { height: 0.375rem; }
.w-1\.5 { width: 0.375rem; }
.h-3 { height: 0.75rem; }
.w-3 { width: 0.75rem; }
.h-3\.5 { height: 0.875rem; }
.w-3\.5 { width: 0.875rem; }
.h-4 { height: 1rem; }
.w-4 { width: 1rem; }
.h-4\.5 { height: 1.125rem; }
.w-4\.5 { width: 1.125rem; }
.h-5 { height: 1.25rem; }
.w-5 { width: 1.25rem; }
.h-6 { height: 1.5rem; }
.w-6 { width: 1.5rem; }
.h-7\.5 { height: 1.875rem; }
.w-7\.5 { width: 1.875rem; }
.h-8 { height: 2rem; }
.w-8 { width: 2rem; }
.h-10 { height: 2.5rem; }
.w-10 { width: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-12 { height: 3rem; }
.w-12 { width: 3rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.w-80 { width: 20rem; }

.max-h-32 { max-height: 8rem; }
.max-h-36 { max-height: 9rem; }
.max-h-\[35vh\] { max-height: 35vh; }
.max-w-md { max-width: 28rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-none { max-width: none; }
.max-w-\[85\%\] { max-width: 85%; }
.min-h-screen { min-height: 100vh; }

/* Padding & Margin */
.p-1 { padding: 0.25rem; }
.p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pl-8 { padding-left: 2rem; }
.pr-1 { padding-right: 0.25rem; }
.pr-2 { padding-right: 0.5rem; }
.pr-3 { padding-right: 0.75rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-1\.5 { padding-bottom: 0.375rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pt-4 { padding-top: 1rem; }

.m-0 { margin: 0; }
.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-3 { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-0\.5 { margin-bottom: 0.125rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-x-1 > * + * { margin-left: 0.25rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }

@media (min-width: 768px) {
  .md\:flex { display: flex !important; }
  .md\:grid { display: grid !important; }
  .md\:hidden { display: none !important; }
}

/* ============================================================================
 * PANTHEON SEMANTIC SURFACES & COLOR MAPPINGS
 * ============================================================================ */

.bg-slate-950 { background-color: var(--gcp-bg-canvas); }
.bg-slate-900 { background-color: var(--gcp-bg-surface); }
.bg-slate-800 { background-color: var(--gcp-bg-surface-alt); }
.bg-slate-900\/10 { background-color: var(--gcp-bg-surface); }
.bg-slate-900\/20 { background-color: var(--gcp-bg-surface-alt); }
.bg-slate-900\/30 { background-color: var(--gcp-bg-surface); }
.bg-slate-900\/40 { background-color: var(--gcp-bg-surface-alt); }
.bg-slate-900\/50 { background-color: var(--gcp-bg-header); }
.bg-slate-900\/60 { background-color: var(--gcp-bg-surface-alt); }
.gcp-trace-bg { background-color: var(--gcp-bg-code); }

.bg-teal-600 {
  background-color: var(--gcp-primary);
  color: var(--gcp-text-on-primary);
}
.bg-teal-600:hover,
.hover\:bg-teal-500:hover {
  background-color: var(--gcp-primary-hover);
}
.bg-teal-600\/5,
.bg-teal-500\/5,
.bg-teal-600\/10,
.bg-teal-500\/10,
.bg-teal-600\/15,
.bg-teal-600\/20,
.bg-teal-950\/20 {
  background-color: var(--gcp-primary-container);
}

.bg-sky-500\/10,
.bg-sky-600\/15,
.bg-sky-600\/20 {
  background-color: var(--gcp-info-bg);
}

.bg-rose-600 {
  background-color: var(--gcp-error);
  color: var(--gcp-text-on-primary);
}
.bg-rose-950\/5,
.bg-rose-950\/20,
.bg-rose-500\/10 {
  background-color: var(--gcp-error-bg);
}
.bg-emerald-500 {
  background-color: var(--gcp-success);
}
.bg-slate-500\/10 {
  background-color: var(--gcp-bg-surface-alt);
}

.bg-white\/\[0\.01\],
.bg-white\/\[0\.02\],
.bg-white\/5,
.bg-white\/\[0\.05\] {
  background-color: var(--gcp-bg-surface-alt);
}
.bg-white\/10,
.bg-white\/\[0\.08\],
.hover\:bg-white\/5:hover,
.hover\:bg-white\/10:hover,
.hover\:bg-white\/\[0\.01\]:hover,
.hover\:bg-white\/\[0\.03\]:hover {
  background-color: var(--gcp-bg-surface-hover);
}
.bg-transparent { background-color: transparent; }

/* Borders */
.border { border: 1px solid var(--gcp-border-subtle); }
.border-0 { border: 0; }
.border-r { border-right: 1px solid var(--gcp-border-subtle); }
.border-b { border-bottom: 1px solid var(--gcp-border-subtle); }
.border-t { border-top: 1px solid var(--gcp-border-subtle); }
.border-white\/5,
.border-white\/10,
.border-slate-500\/15 {
  border-color: var(--gcp-border-subtle);
}
.border-teal-500\/10,
.border-teal-500\/20,
.border-teal-500\/40,
.border-teal-900\/30,
.hover\:border-teal-500\/30:hover {
  border-color: var(--gcp-primary);
}
.border-sky-500\/10,
.border-sky-500\/20 {
  border-color: var(--gcp-info-border);
}
.border-rose-500\/20,
.border-rose-900\/30 {
  border-color: var(--gcp-error-border);
}
.border-emerald-500\/10 {
  border-color: var(--gcp-success-border);
}

.rounded { border-radius: var(--gcp-radius-sm); }
.rounded-md { border-radius: var(--gcp-radius-sm); }
.rounded-lg { border-radius: var(--gcp-radius-md); }
.rounded-xl { border-radius: var(--gcp-radius-md); }
.rounded-2xl { border-radius: var(--gcp-radius-lg); }
.rounded-full { border-radius: var(--gcp-radius-pill); }

/* Text Colors (Mapped to Pantheon Accessible Tokens) */
.text-white,
.text-slate-100,
.text-slate-200 {
  color: var(--gcp-text-primary);
}
.bg-teal-600.text-white,
.bg-teal-600 .text-white,
.bg-rose-600.text-white {
  color: var(--gcp-text-on-primary);
}
.text-white\/60 {
  color: var(--gcp-text-on-primary);
  opacity: 0.85;
}
.text-slate-300,
.text-slate-400,
.text-slate-500,
.text-slate-600 {
  color: var(--gcp-text-secondary);
}
.text-teal-400,
.text-teal-500,
.text-teal-400\/80,
.hover\:text-teal-400:hover {
  color: var(--gcp-primary);
}
.text-sky-400 {
  color: var(--gcp-info-text);
}
.text-emerald-400 {
  color: var(--gcp-success-text);
}
.text-rose-200,
.text-rose-400 {
  color: var(--gcp-error-text);
}

/* Font Sizes & Weights (Enforcing Readable Pantheon Scale) */
.text-\[7px\],
.text-\[8px\],
.text-\[9px\],
.text-\[10px\],
.text-\[11px\],
.text-xs {
  font-size: 0.78rem;
  line-height: 1.35;
}
.text-sm { font-size: 0.875rem; line-height: 1.45; }
.text-base,
.text-md { font-size: 1rem; line-height: 1.5; }
.text-lg { font-size: 1.125rem; line-height: 1.5; }
.text-xl { font-size: 1.25rem; line-height: 1.4; }
.text-2xl { font-size: 1.5rem; line-height: 1.35; }
.text-3xl { font-size: 1.875rem; line-height: 1.25; }

.font-sans { font-family: var(--gcp-font-sans); }
.font-outfit { font-family: var(--gcp-font-display); }
.font-mono { font-family: var(--gcp-font-mono); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-extrabold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.tracking-wide { letter-spacing: 0.02em; }
.tracking-wider { letter-spacing: 0.04em; }
.tracking-widest { letter-spacing: 0.06em; }
.leading-none { line-height: 1.1; }
.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.45; }
.leading-relaxed { line-height: 1.55; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.whitespace-pre-line { white-space: pre-line; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.list-disc { list-style-type: disc; }
.select-none { user-select: none; }

/* Interactive & Elevation */
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }
.shadow-md,
.shadow-lg,
.shadow-2xl {
  box-shadow: var(--gcp-shadow-1);
}
.transition {
  transition-property: background-color, border-color, color, box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-150 { transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.relative { position: relative; }
.absolute { position: absolute; }
.top-0 { top: 0; }
.top-2\.5 { top: 0.625rem; }
.left-0 { left: 0; }
.left-2\.5 { left: 0.625rem; }
.right-0 { right: 0; }
.right-2\.5 { right: 0.625rem; }
.bottom-0 { bottom: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }

/* Forms & Controls (Pantheon Input Styling) */
input,
textarea,
select {
  font-family: var(--gcp-font-sans);
  font-size: 0.875rem;
  color: var(--gcp-text-primary);
  background-color: var(--gcp-bg-surface);
  border: 1px solid var(--gcp-border-input);
  border-radius: var(--gcp-radius-sm);
}

input::placeholder,
textarea::placeholder {
  color: var(--gcp-text-secondary);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gcp-border-focus) !important;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-family: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Pantheon Surface Card Replacement for Glassmorphism */
.glass {
  background-color: var(--gcp-bg-surface);
  border: 1px solid var(--gcp-border-subtle);
  box-shadow: var(--gcp-shadow-1);
}

form:focus-within {
  border-color: var(--gcp-border-focus) !important;
}

.bg-gradient-to-r {
  background: linear-gradient(to right, var(--gcp-primary), var(--gcp-secondary));
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--gcp-bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--gcp-border-strong);
  border-radius: 4px;
}

/* Accessible Data Tables inside Clinical Responses */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 0.8125rem;
  border-radius: var(--gcp-radius-sm);
  overflow: hidden;
  border: 1px solid var(--gcp-border-subtle);
}

th,
td {
  border: 1px solid var(--gcp-border-subtle);
  padding: 8px 12px;
  text-align: left;
  color: var(--gcp-text-primary);
}

th {
  background-color: var(--gcp-bg-surface-alt);
  color: var(--gcp-text-secondary);
  font-weight: 600;
}

tr:nth-child(even) {
  background-color: var(--gcp-bg-surface-hover);
}

/* Clinical Warning Banner (Pantheon Error Callout) */
.medical-alert {
  background-color: var(--gcp-error-bg);
  border: 1px solid var(--gcp-error-border);
  border-left: 4px solid var(--gcp-error);
  color: var(--gcp-error-text);
  padding: 1rem;
  border-radius: var(--gcp-radius-sm);
  margin: 1rem 0;
  display: flex;
  gap: 0.75rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.message-fade-in {
  animation: fadeIn 0.2s ease-out forwards;
}

.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--gcp-primary);
  border-radius: 50%;
  margin-right: 4px;
  animation: pulse-dot 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
  margin-right: 0;
}

/* Resizer Bars */
.resizer-bar {
  width: 4px;
  background: transparent;
  cursor: col-resize;
  transition: background-color 0.2s ease;
  z-index: 40;
  align-self: stretch;
  flex-shrink: 0;
}

.resizer-bar:hover,
.resizer-bar.active {
  background-color: var(--gcp-primary);
}

/* Accessibility Touch Targets */
.touch-target-button {
  min-height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Bottom Nav */
.bottom-nav {
  height: 60px;
  background-color: var(--gcp-bg-header);
  border-top: 1px solid var(--gcp-border-subtle);
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  color: var(--gcp-text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.bottom-nav-item.active {
  color: var(--gcp-primary);
}

@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;
  }
}
