/*
 * Earthlings OS — Complete Tailwind-compatible CSS
 * Dark "Command Center" Theme
 *
 * This file provides ALL utility classes used by the Askama templates,
 * plus semantic component classes for the dashboard UI.
 *
 * Color Palette (Zinc-based dark theme):
 *   zinc-950: #09090b    zinc-500: #71717a
 *   zinc-900: #18181b    zinc-400: #a1a1aa
 *   zinc-800: #27272a    zinc-300: #d4d4d8
 *   zinc-700: #3f3f46    zinc-200: #e4e4e7
 *   zinc-600: #52525b    zinc-100: #f4f4f5
 *
 * Accent Colors:
 *   sky-400:     #38bdf8    sky-500:     #0ea5e9
 *   emerald-400: #34d399    emerald-500: #10b981
 *   amber-400:   #fbbf24    amber-500:   #f59e0b
 *   rose-400:    #fb7185    rose-500:    #f43f5e
 *   violet-400:  #a78bfa    violet-500:  #8b5cf6
 */

/* ================================================================
   1. CSS RESET / NORMALIZE
   ================================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  font-feature-settings: normal;
  font-variation-settings: normal;
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  line-height: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

hr { height: 0; color: inherit; border-top-width: 1px; }
abbr:where([title]) { text-decoration: underline dotted; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }

code, kbd, samp, pre {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
  font-size: 1em;
}

small { font-size: 80%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -0.25em; }
sup { top: -0.5em; }

table { text-indent: 0; border-color: inherit; border-collapse: collapse; }

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button, select { text-transform: none; }
button, [type='button'], [type='reset'], [type='submit'] { -webkit-appearance: button; }
::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; }
[type='search'] { -webkit-appearance: textfield; outline-offset: -2px; }
::-webkit-search-decoration { -webkit-appearance: none; }
::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; }
summary { display: list-item; }
blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre { margin: 0; }
fieldset { margin: 0; padding: 0; }
legend { padding: 0; }
ol, ul, menu { list-style: none; margin: 0; padding: 0; }
dialog { padding: 0; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { opacity: 1; color: #71717a; }
button, [role="button"] { cursor: pointer; }
:disabled { cursor: default; }
img, svg, video, canvas, audio, iframe, embed, object { display: block; vertical-align: middle; }
img, video { max-width: 100%; height: auto; }
[hidden] { display: none; }

/* ================================================================
   2. CSS CUSTOM PROPERTIES
   ================================================================ */

:root {
  --color-background: #18181b;
  --color-surface: #27272a;
  --color-elevated: #3f3f46;
  --color-border: #3f3f46;
  --color-text-primary: #f4f4f5;
  --color-text-secondary: #a1a1aa;
  --color-text-muted: #71717a;

  --color-healthy: #34d399;
  --color-healthy-bg: rgba(52, 211, 153, 0.1);
  --color-warning: #fbbf24;
  --color-warning-bg: rgba(251, 191, 36, 0.1);
  --color-critical: #fb7185;
  --color-critical-bg: rgba(251, 113, 133, 0.1);
  --color-info: #38bdf8;
  --color-info-bg: rgba(56, 189, 248, 0.1);
  --color-processing: #a78bfa;
  --color-processing-bg: rgba(167, 139, 250, 0.1);

  --font-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, 'Courier New', monospace;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  --z-dropdown: 50;
  --z-sticky: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ================================================================
   3. BASE STYLES
   ================================================================ */

html {
  background-color: var(--color-background);
  color: var(--color-text-primary);
  font-size: 0.875rem;
}

body {
  background-color: var(--color-background);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  min-height: 100vh;
}

::selection {
  background-color: rgba(56, 189, 248, 0.3);
  color: var(--color-text-primary);
}

:focus-visible {
  outline: 2px solid var(--color-info);
  outline-offset: 2px;
}

/* ================================================================
   4. TYPOGRAPHY UTILITIES
   ================================================================ */

.text-xs   { font-size: 0.75rem; line-height: 1rem; }
.text-sm   { font-size: 0.8125rem; line-height: 1.25rem; }
.text-base { font-size: 0.875rem; line-height: 1.375rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem; line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }

.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-mono     { font-family: var(--font-mono); }

.text-left    { text-align: left; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.uppercase    { text-transform: uppercase; }
.lowercase    { text-transform: lowercase; }
.capitalize   { text-transform: capitalize; }
.italic       { font-style: italic; }
.truncate     { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.break-words  { overflow-wrap: break-word; word-break: break-word; }
.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide  { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

h1, .h1 { font-size: 1.5rem; font-weight: 600; line-height: 2rem; }
h2, .h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.75rem; }
h3, .h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.75rem; }
h4, .h4 { font-size: 0.875rem; font-weight: 600; line-height: 1.375rem; }

/* ================================================================
   5. LAYOUT UTILITIES
   ================================================================ */

/* Display */
.block        { display: block; }
.inline-block { display: inline-block; }
.inline       { display: inline; }
.flex         { display: flex; }
.inline-flex  { display: inline-flex; }
.grid         { display: grid; }
.hidden       { display: none; }
.contents     { display: contents; }

/* Flexbox */
.flex-row     { flex-direction: row; }
.flex-col     { flex-direction: column; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-col-reverse { flex-direction: column-reverse; }
.flex-wrap    { flex-wrap: wrap; }
.flex-nowrap  { flex-wrap: nowrap; }
.flex-1       { flex: 1 1 0%; }
.flex-auto    { flex: 1 1 auto; }
.flex-initial { flex: 0 1 auto; }
.flex-none    { flex: none; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow    { flex-grow: 1; }
.flex-grow-0  { flex-grow: 0; }
.shrink-0     { flex-shrink: 0; }

/* Alignment */
.items-start    { align-items: flex-start; }
.items-center   { align-items: center; }
.items-end      { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.items-stretch  { align-items: stretch; }
.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around  { justify-content: space-around; }
.justify-evenly  { justify-content: space-evenly; }
.self-start   { align-self: flex-start; }
.self-center  { align-self: center; }
.self-end     { align-self: flex-end; }
.self-stretch { align-self: stretch; }

/* Grid */
.grid-cols-1  { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5  { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6  { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col-span-1   { grid-column: span 1 / span 1; }
.col-span-2   { grid-column: span 2 / span 2; }
.col-span-3   { grid-column: span 3 / span 3; }
.col-span-4   { grid-column: span 4 / span 4; }
.col-span-6   { grid-column: span 6 / span 6; }
.col-span-full { grid-column: 1 / -1; }

/* Gap */
.gap-0  { gap: 0; }
.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-5  { gap: 1.25rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.gap-x-1  { column-gap: 0.25rem; }
.gap-x-2  { column-gap: 0.5rem; }
.gap-x-4  { column-gap: 1rem; }
.gap-y-1  { row-gap: 0.25rem; }
.gap-y-2  { row-gap: 0.5rem; }
.gap-y-4  { row-gap: 1rem; }

/* Space between children */
.space-y-0\.5 > * + * { margin-top: 0.125rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.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; }
.space-x-4 > * + * { margin-left: 1rem; }

/* Divide */
.divide-y > * + * { border-top-width: 1px; border-top-style: solid; border-top-color: var(--color-border); }
.divide-zinc-700\/50 > * + * { border-top-color: rgba(63, 63, 70, 0.5); }

/* ================================================================
   6. SPACING — Padding
   ================================================================ */

.p-0   { padding: 0; }
.p-0\.5 { padding: 0.125rem; }
.p-1   { padding: 0.25rem; }
.p-2   { padding: 0.5rem; }
.p-3   { padding: 0.75rem; }
.p-4   { padding: 1rem; }
.p-5   { padding: 1.25rem; }
.p-6   { padding: 1.5rem; }
.p-8   { padding: 2rem; }
.px-0  { padding-left: 0; padding-right: 0; }
.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-5  { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6  { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8  { padding-left: 2rem; padding-right: 2rem; }
.py-0  { padding-top: 0; padding-bottom: 0; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1  { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.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-5  { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6  { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8  { padding-top: 2rem; padding-bottom: 2rem; }
.pt-0 { padding-top: 0; } .pt-1 { padding-top: 0.25rem; } .pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; } .pt-4 { padding-top: 1rem; } .pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }
.pb-0 { padding-bottom: 0; } .pb-1 { padding-bottom: 0.25rem; } .pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; } .pb-4 { padding-bottom: 1rem; } .pb-6 { padding-bottom: 1.5rem; }
.pb-8 { padding-bottom: 2rem; }
.pl-0 { padding-left: 0; } .pl-2 { padding-left: 0.5rem; } .pl-4 { padding-left: 1rem; }
.pr-0 { padding-right: 0; } .pr-2 { padding-right: 0.5rem; } .pr-4 { padding-right: 1rem; }
.pr-10 { padding-right: 2.5rem; }

/* ================================================================
   7. SPACING — Margin
   ================================================================ */

.m-0  { margin: 0; }
.m-1  { margin: 0.25rem; }
.m-2  { margin: 0.5rem; }
.m-4  { margin: 1rem; }
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-0 { margin-left: 0; margin-right: 0; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.mx-5 { margin-left: 1.25rem; margin-right: 1.25rem; }
.my-0 { margin-top: 0; margin-bottom: 0; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.mt-0 { margin-top: 0; } .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-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; } .mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-0 { margin-left: 0; } .ml-0\.5 { margin-left: 0.125rem; }
.ml-1 { margin-left: 0.25rem; } .ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; } .ml-auto { margin-left: auto; }
.mr-0 { margin-right: 0; } .mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; } .mr-4 { margin-right: 1rem; }
.mr-auto { margin-right: auto; }
.-mt-1 { margin-top: -0.25rem; }
.-mb-1 { margin-bottom: -0.25rem; }

/* ================================================================
   8. SIZING
   ================================================================ */

.w-full    { width: 100%; }
.w-screen  { width: 100vw; }
.w-auto    { width: auto; }
.w-0       { width: 0; }
.w-0\.5    { width: 0.125rem; }
.w-1       { width: 0.25rem; }
.w-1\.5    { width: 0.375rem; }
.w-2       { width: 0.5rem; }
.w-3       { width: 0.75rem; }
.w-3\.5    { width: 0.875rem; }
.w-4       { width: 1rem; }
.w-5       { width: 1.25rem; }
.w-6       { width: 1.5rem; }
.w-7       { width: 1.75rem; }
.w-8       { width: 2rem; }
.w-10      { width: 2.5rem; }
.w-12      { width: 3rem; }
.w-16      { width: 4rem; }
.w-24      { width: 6rem; }
.w-32      { width: 8rem; }
.w-40      { width: 10rem; }
.w-48      { width: 12rem; }
.w-64      { width: 16rem; }
.w-80      { width: 20rem; }
.w-96      { width: 24rem; }
.w-1\/2    { width: 50%; }
.w-1\/3    { width: 33.333333%; }
.w-2\/3    { width: 66.666667%; }
.w-1\/4    { width: 25%; }
.w-3\/4    { width: 75%; }
.min-w-0   { min-width: 0; }
.min-w-full { min-width: 100%; }
.max-w-sm  { max-width: 24rem; }
.max-w-md  { max-width: 28rem; }
.max-w-lg  { max-width: 32rem; }
.max-w-xl  { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-full { max-width: 100%; }
.max-w-prose { max-width: 65ch; }

/* Arbitrary max-w used in templates */
.max-w-\[75\%\]  { max-width: 75%; }
.max-w-\[85\%\]  { max-width: 85%; }

.h-full    { height: 100%; }
.h-screen  { height: 100vh; }
.h-auto    { height: auto; }
.h-0       { height: 0; }
.h-1       { height: 0.25rem; }
.h-1\.5    { height: 0.375rem; }
.h-2       { height: 0.5rem; }
.h-3       { height: 0.75rem; }
.h-4       { height: 1rem; }
.h-5       { height: 1.25rem; }
.h-6       { height: 1.5rem; }
.h-7       { height: 1.75rem; }
.h-8       { height: 2rem; }
.h-10      { height: 2.5rem; }
.h-12      { height: 3rem; }
.h-16      { height: 4rem; }
.h-24      { height: 6rem; }
.h-32      { height: 8rem; }
.h-48      { height: 12rem; }
.h-64      { height: 16rem; }
.min-h-0   { min-height: 0; }
.min-h-full { min-height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-h-full { max-height: 100%; }
.max-h-screen { max-height: 100vh; }
.max-h-64  { max-height: 16rem; }
.max-h-96  { max-height: 24rem; }

/* Arbitrary values used in templates */
.min-h-\[320px\] { min-height: 320px; }
.min-w-\[640px\] { min-width: 640px; }
.min-w-\[700px\] { min-width: 700px; }
.min-w-\[1\.25rem\] { min-width: 1.25rem; }

/* ================================================================
   9. POSITION & OVERFLOW
   ================================================================ */

.static   { position: static; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }
.inset-0  { inset: 0; }
.inset-y-0 { top: 0; bottom: 0; }
.inset-y-12 { top: 3rem; bottom: 3rem; }
.top-0    { top: 0; } .top-1   { top: 0.25rem; }
.top-2    { top: 0.5rem; } .top-4   { top: 1rem; }
.top-1\/2 { top: 50%; }
.right-0  { right: 0; } .right-2 { right: 0.5rem; }
.right-2\.5 { right: 0.625rem; } .right-4 { right: 1rem; }
.bottom-0 { bottom: 0; } .bottom-2 { bottom: 0.5rem; }
.bottom-4 { bottom: 1rem; }
.left-0   { left: 0; } .left-2  { left: 0.5rem; }
.left-4   { left: 1rem; } .left-1\/2 { left: 50%; }

.overflow-auto    { overflow: auto; }
.overflow-hidden  { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll  { overflow: scroll; }
.overflow-x-auto  { overflow-x: auto; }
.overflow-y-auto  { overflow-y: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-hidden { overflow-y: hidden; }

.z-0   { z-index: 0; }
.z-10  { z-index: 10; }
.z-20  { z-index: 20; }
.z-30  { z-index: 30; }
.z-40  { z-index: 40; }
.z-50  { z-index: 50; }

/* ================================================================
   10. BACKGROUND COLORS — Zinc Scale
   ================================================================ */

.bg-transparent { background-color: transparent; }
.bg-black       { background-color: #000; }
.bg-white       { background-color: #fff; }
.bg-black\/50   { background-color: rgba(0, 0, 0, 0.5); }
.bg-black\/60   { background-color: rgba(0, 0, 0, 0.6); }

.bg-zinc-950 { background-color: #09090b; }
.bg-zinc-900 { background-color: #18181b; }
.bg-zinc-800 { background-color: #27272a; }
.bg-zinc-800\/95 { background-color: rgba(39, 39, 42, 0.95); }
.bg-zinc-800\/50 { background-color: rgba(39, 39, 42, 0.5); }
.bg-zinc-700 { background-color: #3f3f46; }
.bg-zinc-700\/80 { background-color: rgba(63, 63, 70, 0.8); }
.bg-zinc-700\/50 { background-color: rgba(63, 63, 70, 0.5); }
.bg-zinc-700\/30 { background-color: rgba(63, 63, 70, 0.3); }
.bg-zinc-600 { background-color: #52525b; }
.bg-zinc-500 { background-color: #71717a; }

/* ================================================================
   11. BACKGROUND COLORS — Accent Colors
   ================================================================ */

/* Sky */
.bg-sky-400   { background-color: #38bdf8; }
.bg-sky-500   { background-color: #0ea5e9; }
.bg-sky-700\/30 { background-color: rgba(3, 105, 161, 0.3); }
.bg-sky-800\/50 { background-color: rgba(7, 89, 133, 0.5); }
.bg-sky-900\/30 { background-color: rgba(12, 74, 110, 0.3); }
.bg-sky-900\/40 { background-color: rgba(12, 74, 110, 0.4); }
.bg-sky-900\/50 { background-color: rgba(12, 74, 110, 0.5); }

/* Emerald */
.bg-emerald-400 { background-color: #34d399; }
.bg-emerald-500 { background-color: #10b981; }
.bg-emerald-900\/20 { background-color: rgba(6, 78, 59, 0.2); }
.bg-emerald-900\/30 { background-color: rgba(6, 78, 59, 0.3); }
.bg-emerald-900\/40 { background-color: rgba(6, 78, 59, 0.4); }
.bg-emerald-900\/50 { background-color: rgba(6, 78, 59, 0.5); }

/* Amber */
.bg-amber-400  { background-color: #fbbf24; }
.bg-amber-500\/20 { background-color: rgba(245, 158, 11, 0.2); }
.bg-amber-900\/20 { background-color: rgba(120, 53, 15, 0.2); }
.bg-amber-900\/30 { background-color: rgba(120, 53, 15, 0.3); }
.bg-amber-900\/40 { background-color: rgba(120, 53, 15, 0.4); }
.bg-amber-900\/50 { background-color: rgba(120, 53, 15, 0.5); }

/* Rose */
.bg-rose-400  { background-color: #fb7185; }
.bg-rose-900\/10 { background-color: rgba(136, 19, 55, 0.1); }
.bg-rose-900\/30 { background-color: rgba(136, 19, 55, 0.3); }
.bg-rose-900\/40 { background-color: rgba(136, 19, 55, 0.4); }
.bg-rose-900\/50 { background-color: rgba(136, 19, 55, 0.5); }

/* Violet */
.bg-violet-400  { background-color: #a78bfa; }
.bg-violet-900\/30 { background-color: rgba(76, 29, 149, 0.3); }
.bg-violet-900\/40 { background-color: rgba(76, 29, 149, 0.4); }

/* Semantic background aliases */
.bg-background { background-color: var(--color-background); }
.bg-surface    { background-color: var(--color-surface); }
.bg-elevated   { background-color: var(--color-elevated); }

/* ================================================================
   12. TEXT COLORS
   ================================================================ */

/* Zinc scale */
.text-zinc-100 { color: #f4f4f5; }
.text-zinc-200 { color: #e4e4e7; }
.text-zinc-300 { color: #d4d4d8; }
.text-zinc-400 { color: #a1a1aa; }
.text-zinc-500 { color: #71717a; }
.text-zinc-600 { color: #52525b; }
.text-zinc-700 { color: #3f3f46; }
.text-white    { color: #fff; }
.text-black    { color: #000; }

/* Sky */
.text-sky-400  { color: #38bdf8; }
.text-sky-300  { color: #7dd3fc; }
.text-sky-300\/80 { color: rgba(125, 211, 252, 0.8); }

/* Emerald */
.text-emerald-400 { color: #34d399; }
.text-emerald-300\/80 { color: rgba(110, 231, 183, 0.8); }

/* Amber */
.text-amber-400 { color: #fbbf24; }

/* Rose */
.text-rose-400  { color: #fb7185; }
.text-rose-300  { color: #fda4af; }

/* Violet */
.text-violet-400 { color: #a78bfa; }

/* Semantic text aliases */
.text-primary   { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted     { color: var(--color-text-muted); }

/* ================================================================
   13. BORDER UTILITIES
   ================================================================ */

.border        { border-width: 1px; border-style: solid; border-color: var(--color-border); }
.border-0      { border-width: 0; }
.border-2      { border-width: 2px; }
.border-t      { border-top-width: 1px; border-top-style: solid; border-top-color: var(--color-border); }
.border-b      { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: var(--color-border); }
.border-l      { border-left-width: 1px; border-left-style: solid; border-left-color: var(--color-border); }
.border-r      { border-right-width: 1px; border-right-style: solid; border-right-color: var(--color-border); }
.border-b-2    { border-bottom-width: 2px; border-bottom-style: solid; }

/* Border colors — zinc */
.border-zinc-700    { border-color: #3f3f46; }
.border-zinc-700\/80 { border-color: rgba(63, 63, 70, 0.8); }
.border-zinc-700\/60 { border-color: rgba(63, 63, 70, 0.6); }
.border-zinc-700\/50 { border-color: rgba(63, 63, 70, 0.5); }
.border-zinc-600    { border-color: #52525b; }
.border-zinc-800    { border-color: #27272a; }

/* Border colors — accent */
.border-sky-400     { border-color: #38bdf8; }
.border-sky-500     { border-color: #0ea5e9; }
.border-sky-700\/50 { border-color: rgba(3, 105, 161, 0.5); }
.border-sky-800\/30 { border-color: rgba(7, 89, 133, 0.3); }
.border-sky-800\/50 { border-color: rgba(7, 89, 133, 0.5); }
.border-emerald-400  { border-color: #34d399; }
.border-emerald-800\/40 { border-color: rgba(6, 95, 70, 0.4); }
.border-amber-400   { border-color: #fbbf24; }
.border-amber-800\/30 { border-color: rgba(146, 64, 14, 0.3); }
.border-amber-800\/40 { border-color: rgba(146, 64, 14, 0.4); }
.border-rose-400    { border-color: #fb7185; }
.border-rose-800\/30 { border-color: rgba(159, 18, 57, 0.3); }
.border-violet-400  { border-color: #a78bfa; }
.border-violet-800\/30 { border-color: rgba(91, 33, 182, 0.3); }
.border-transparent { border-color: transparent; }

/* Border radius */
.rounded-none { border-radius: 0; }
.rounded-sm   { border-radius: 0.125rem; }
.rounded      { border-radius: 0.25rem; }
.rounded-md   { border-radius: 0.375rem; }
.rounded-lg   { border-radius: 0.5rem; }
.rounded-xl   { border-radius: 0.75rem; }
.rounded-2xl  { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t-lg { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }
.rounded-b-lg { border-bottom-left-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }

/* Shadow */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow    { box-shadow: var(--shadow-md); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6); }
.shadow-none { box-shadow: none; }
.shadow-black\/20 { --tw-shadow-color: rgba(0,0,0,0.2); }

/* Ring */
.ring-1 { box-shadow: 0 0 0 1px var(--color-border); }
.ring-2 { box-shadow: 0 0 0 2px var(--color-info); }
.focus\:ring-1:focus { box-shadow: 0 0 0 1px var(--color-info); }
.focus\:ring-sky-500\/30:focus { box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3); }

/* ================================================================
   14. OPACITY & VISUAL
   ================================================================ */

.opacity-0   { opacity: 0; }
.opacity-25  { opacity: 0.25; }
.opacity-40  { opacity: 0.4; }
.opacity-50  { opacity: 0.5; }
.opacity-75  { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.backdrop-blur    { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-grab { cursor: grab; }
.cursor-grabbing { cursor: grabbing; }

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

.select-none { user-select: none; }
.select-text { user-select: text; }
.resize-none { resize: none; }
.appearance-none { appearance: none; }

/* ================================================================
   15. TRANSFORMS
   ================================================================ */

.transform { transform: translateX(0); }
.translate-x-0 { transform: translateX(0); }
.-translate-x-full { transform: translateX(-100%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.rotate-180 { transform: rotate(180deg); }
.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }

/* ================================================================
   16. TRANSITIONS & ANIMATIONS
   ================================================================ */

.transition       { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all   { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

.duration-150 { transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

.ease-in  { transition-timing-function: cubic-bezier(0.4, 0, 1, 1); }
.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

.delay-0   { transition-delay: 0ms; }
.delay-150 { transition-delay: 150ms; }

/* Keyframe animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.5; } }
@keyframes bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes skeleton-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes progress-indeterminate { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes typing-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }

.animate-spin       { animation: spin 1s linear infinite; }
.animate-pulse      { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-bounce     { animation: bounce 1s infinite; }
.animate-fade-in    { animation: fade-in 0.2s ease-out; }
.animate-pulse-dot  { animation: pulse-dot 1.5s ease-in-out infinite; }
.animate-float      { animation: float 6s ease-in-out infinite; }
.animate-shake      { animation: shake 0.3s ease-in-out; }

/* ================================================================
   17. HOVER / FOCUS / ACTIVE STATE VARIANTS
   ================================================================ */

/* Hover backgrounds */
.hover\:bg-zinc-700\/50:hover { background-color: rgba(63, 63, 70, 0.5); }
.hover\:bg-zinc-700\/30:hover { background-color: rgba(63, 63, 70, 0.3); }
.hover\:bg-zinc-600:hover { background-color: #52525b; }
.hover\:bg-sky-500:hover { background-color: #0ea5e9; }

/* Hover text */
.hover\:text-zinc-100:hover { color: #f4f4f5; }
.hover\:text-zinc-200:hover { color: #e4e4e7; }
.hover\:text-zinc-300:hover { color: #d4d4d8; }
.hover\:text-sky-300:hover { color: #7dd3fc; }

/* Active */
.active\:scale-95:active { transform: scale(0.95); }

/* Focus */
.focus\:outline-none:focus { outline: none; }
.focus\:border-sky-500:focus { border-color: #0ea5e9; }

/* Disabled */
.disabled\:opacity-40:disabled { opacity: 0.4; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }

/* ================================================================
   18. RESPONSIVE BREAKPOINTS
   ================================================================ */

/* sm: 640px+ */
@media (min-width: 640px) {
  .sm\:inline { display: inline; }
  .sm\:inline-flex { display: inline-flex; }
  .sm\:max-w-\[75\%\] { max-width: 75%; }
}

/* md: 768px+ */
@media (min-width: 768px) {
  .md\:hidden { display: none; }
  .md\:block  { display: block; }
  .md\:flex   { display: flex; }
  .md\:inline { display: inline; }
  .md\:relative { position: relative; }
  .md\:inset-y-0 { top: 0; bottom: 0; }
  .md\:translate-x-0 { transform: translateX(0); }
  .md\:shadow-none { box-shadow: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* lg: 1024px+ */
@media (min-width: 1024px) {
  .lg\:hidden { display: none; }
  .lg\:block  { display: block; }
  .lg\:flex   { display: flex; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:p-6 { padding: 1.5rem; }
}

/* xl: 1280px+ */
@media (min-width: 1280px) {
  .xl\:hidden { display: none; }
  .xl\:block  { display: block; }
  .xl\:flex   { display: flex; }
}

/* Hidden at breakpoints */
.hidden { display: none; }
@media (min-width: 1024px) {
  .hidden.lg\:block { display: block; }
  .hidden.lg\:flex  { display: flex; }
}

/* ================================================================
   19. COMPONENT STYLES — Cards
   ================================================================ */

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.card-elevated {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: var(--shadow-md);
}

.card-glow {
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card-glow:hover {
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(56, 189, 248, 0.05);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

/* ================================================================
   20. COMPONENT STYLES — Buttons
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background-color: #38bdf8;
  color: #0c4a6e;
  border-color: #38bdf8;
}
.btn-primary:hover:not(:disabled) { background-color: #7dd3fc; }
.btn-primary:active:not(:disabled) { background-color: #0ea5e9; }

.btn-secondary {
  background-color: var(--color-elevated);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}
.btn-secondary:hover:not(:disabled) { background-color: #52525b; }

.btn-ghost {
  background-color: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background-color: var(--color-elevated);
  color: var(--color-text-primary);
}

.btn-danger {
  background-color: #fb7185;
  color: #1c1917;
  border-color: #fb7185;
}
.btn-danger:hover:not(:disabled) { background-color: #fda4af; }

.btn-success {
  background-color: #34d399;
  color: #064e3b;
  border-color: #34d399;
}
.btn-success:hover:not(:disabled) { background-color: #6ee7b7; }

.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.875rem; }
.btn-icon { padding: 0.5rem; width: 2rem; height: 2rem; }

/* ================================================================
   21. COMPONENT STYLES — Inputs
   ================================================================ */

.input {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.input:focus { outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2); }
.input::placeholder { color: var(--color-text-muted); }
.input:disabled { opacity: 0.5; cursor: not-allowed; }

.textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  resize: vertical;
  min-height: 5rem;
  transition: border-color var(--transition-fast);
}
.textarea:focus { outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2); }

.select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  padding-right: 2rem;
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
  cursor: pointer;
}
.select:focus { outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2); }

.label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

/* Toggle switch */
.toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; user-select: none; }
.toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  width: 2.5rem; height: 1.25rem;
  background-color: var(--color-elevated);
  border-radius: 9999px;
  transition: background-color var(--transition-fast);
  position: relative;
}
.toggle-input:checked + .toggle-track { background-color: #34d399; }
.toggle-track::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 1rem; height: 1rem;
  background-color: white; border-radius: 9999px;
  transition: transform var(--transition-fast);
}
.toggle-input:checked + .toggle-track::after { transform: translateX(1.25rem); }
.toggle-label { margin-left: 0.5rem; font-size: 0.8125rem; color: var(--color-text-secondary); }

/* ================================================================
   22. COMPONENT STYLES — Badges
   ================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.badge-healthy { background-color: var(--color-healthy-bg); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.2); }
.badge-warning { background-color: var(--color-warning-bg); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.2); }
.badge-critical { background-color: var(--color-critical-bg); color: #fb7185; border: 1px solid rgba(251, 113, 133, 0.2); }
.badge-info { background-color: var(--color-info-bg); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.2); }
.badge-processing { background-color: var(--color-processing-bg); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.2); }
.badge-neutral { background-color: var(--color-elevated); color: var(--color-text-secondary); border: 1px solid var(--color-border); }
.badge-dot::before { content: ''; display: inline-block; width: 0.375rem; height: 0.375rem; border-radius: 9999px; background-color: currentColor; }

/* ================================================================
   23. COMPONENT STYLES — Tables
   ================================================================ */

.table-container { width: 100%; overflow-x: auto; border: 1px solid var(--color-border); border-radius: 0.5rem; }
.table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.table thead { background-color: var(--color-elevated); }
.table th { padding: 0.75rem 1rem; text-align: left; font-weight: 500; color: var(--color-text-secondary); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; border-bottom: 1px solid var(--color-border); }
.table td { padding: 0.75rem 1rem; color: var(--color-text-primary); border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background-color var(--transition-fast); }
.table tbody tr:hover { background-color: rgba(63, 63, 70, 0.5); }

/* ================================================================
   24. COMPONENT STYLES — Status & Connection
   ================================================================ */

.status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
}

.status-dot.is-active { box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.status-pill-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  transition: background-color var(--transition-fast);
}

.status-pill-connected {
  background-color: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.2);
}
.status-pill-connected .status-pill-dot { background-color: #34d399; }

.status-pill-connecting {
  background-color: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.2);
}
.status-pill-connecting .status-pill-dot { background-color: #fbbf24; animation: pulse-dot 1.5s ease-in-out infinite; }

.status-pill-offline {
  background-color: rgba(251, 113, 133, 0.1);
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.2);
}
.status-pill-offline .status-pill-dot { background-color: #fb7185; }

/* Progress bar (connecting indicator) */
.progress-bar-container {
  height: 2px;
  background-color: var(--color-surface);
  overflow: hidden;
  position: relative;
}

.progress-bar-indeterminate {
  position: absolute;
  top: 0;
  height: 100%;
  width: 40%;
  background-color: #38bdf8;
  animation: progress-indeterminate 1.5s ease-in-out infinite;
}

/* Nav link active indicator */
.nav-link-active {
  position: relative;
}
.nav-link-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1rem;
  border-radius: 0 2px 2px 0;
  background-color: #38bdf8;
}

/* ================================================================
   25. COMPONENT STYLES — Modals & Overlays
   ================================================================ */

.modal-backdrop {
  position: fixed; inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: var(--z-overlay);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.modal {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 32rem;
  max-height: 90vh; overflow-y: auto;
  z-index: var(--z-modal);
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-body { padding: 1.25rem; }

.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border);
}

/* ================================================================
   26. COMPONENT STYLES — Empty State
   ================================================================ */

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state-icon { width: 3rem; height: 3rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.empty-state-title { font-size: 1.125rem; font-weight: 600; color: var(--color-text-primary); margin-bottom: 0.5rem; }
.empty-state-description { font-size: 0.8125rem; color: var(--color-text-secondary); max-width: 24rem; }

/* ================================================================
   27. COMPONENT STYLES — Loading / Skeleton
   ================================================================ */

.skeleton {
  background: linear-gradient(90deg, var(--color-elevated) 25%, var(--color-surface) 50%, var(--color-elevated) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 0.375rem;
}

.skeleton-text { height: 0.875rem; margin-bottom: 0.5rem; }
.skeleton-heading { height: 1.25rem; width: 60%; margin-bottom: 0.75rem; }
.skeleton-avatar { width: 1.5rem; height: 1.5rem; border-radius: 0.375rem; }
.skeleton-stat { height: 2rem; width: 3rem; border-radius: 0.375rem; }
.skeleton-bubble { height: 3rem; border-radius: 0.5rem; }
.skeleton-bubble-short { width: 60%; }

/* ================================================================
   28. COMPONENT STYLES — Inline Errors
   ================================================================ */

.inline-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  color: #fb7185;
  background-color: rgba(136, 19, 55, 0.15);
  border: 1px solid rgba(251, 113, 133, 0.2);
  border-radius: 0.375rem;
}

.inline-error-warn {
  color: #fbbf24;
  background-color: rgba(120, 53, 15, 0.15);
  border-color: rgba(251, 191, 36, 0.2);
}

.inline-error .retry-btn,
.inline-error-warn .retry-btn {
  margin-left: auto;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  color: inherit;
  background-color: transparent;
  border: 1px solid currentColor;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.inline-error .retry-btn:hover,
.inline-error-warn .retry-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* ================================================================
   29. COMPONENT STYLES — Accordion
   ================================================================ */

.accordion-button {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color var(--transition-fast);
}

.accordion-button:hover {
  background-color: rgba(63, 63, 70, 0.3);
}

/* Alpine x-collapse support */
[x-collapse] {
  overflow: hidden;
}

/* ================================================================
   30. COMPONENT STYLES — Toast
   ================================================================ */

.toast-container {
  position: fixed; top: 1rem; right: 1rem;
  z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: 0.5rem;
  max-width: 24rem;
}

.toast {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  animation: toast-in var(--transition-slow) ease-out;
}

.toast-success { border-left: 3px solid #34d399; }
.toast-warning { border-left: 3px solid #fbbf24; }
.toast-error   { border-left: 3px solid #fb7185; }
.toast-info    { border-left: 3px solid #38bdf8; }

/* ================================================================
   31. COMPONENT STYLES — Split Pane
   ================================================================ */

.split-pane { display: flex; height: 100%; min-height: 0; }
.split-pane-left, .split-pane-right { flex: 1; overflow-y: auto; padding: 1rem; }
.split-pane-left { border-right: 1px solid var(--color-border); }
.split-pane-divider { width: 4px; background-color: var(--color-border); cursor: col-resize; flex-shrink: 0; transition: background-color var(--transition-fast); }
.split-pane-divider:hover { background-color: #38bdf8; }

/* ================================================================
   32. COMPONENT STYLES — Approval Cards
   ================================================================ */

.approval-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid #fbbf24;
  border-radius: 0.5rem;
  padding: 1rem;
}
.approval-card.approved { border-left-color: #34d399; }
.approval-card.denied { border-left-color: #fb7185; }

/* ================================================================
   33. SCROLLBAR STYLING
   ================================================================ */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-background); }
::-webkit-scrollbar-thumb { background-color: var(--color-elevated); border-radius: 9999px; border: 2px solid var(--color-background); }
::-webkit-scrollbar-thumb:hover { background-color: #52525b; }
::-webkit-scrollbar-corner { background: var(--color-background); }

* { scrollbar-width: thin; scrollbar-color: var(--color-elevated) var(--color-background); }

.scrollbar-thin::-webkit-scrollbar { width: 6px; }
.scrollbar-thin::-webkit-scrollbar-track { background: #27272a; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 3px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: #52525b; }
.scrollbar-thin { scrollbar-width: thin; scrollbar-color: #3f3f46 #27272a; }

/* ================================================================
   34. HTMX INTEGRATION
   ================================================================ */

.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
.htmx-request.htmx-indicator { display: inline-block; }

/* ================================================================
   35. PRINT STYLES
   ================================================================ */

@media print {
  body { background: white; color: black; }
  .no-print { display: none !important; }
}

/* ================================================================
   36. PLACEHOLDER COLORS (used in inline styles in templates)
   ================================================================ */

.placeholder-zinc-500::placeholder { color: #71717a; }
.placeholder-zinc-600::placeholder { color: #52525b; }

/* ================================================================
   37. PAGE ENTER ANIMATION
   ================================================================ */

.page-enter {
  animation: fade-in 0.15s ease-out;
}

/* Stream cursor for token streaming */
.stream-cursor { animation: typing-cursor 530ms step-end infinite; }
.chat-bubble-enter { animation: fade-in 0.15s ease-out; }

/* ================================================================
   38. ALIGN TEXT BOTTOM
   ================================================================ */

.align-text-bottom { vertical-align: text-bottom; }

/* ================================================================
   39. REDUCED MOTION — Accessibility
   ================================================================ */

@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;
  }
  .animate-spin, .animate-pulse, .animate-bounce,
  .animate-pulse-dot, .animate-float { animation: none !important; }
}

/* ================================================================
   40. ENHANCED CARD SYSTEM
   ================================================================ */

.card-interactive {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  cursor: pointer;
}

.card-interactive:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(56, 189, 248, 0.08);
  background-color: rgba(39, 39, 42, 0.8);
}

.card-interactive:active { transform: scale(0.995); }

.card-glow-active {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.08), 0 0 0 1px rgba(56, 189, 248, 0.15);
}

.card-glow-urgent {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.08), 0 0 0 1px rgba(251, 191, 36, 0.15);
}

.card-dimmed { opacity: 0.55; }
.card-dimmed:hover { opacity: 0.75; }

/* ================================================================
   41. ENHANCED BUTTON SYSTEM
   ================================================================ */

.btn:focus-visible { outline: 2px solid var(--color-info); outline-offset: 2px; }
.btn:active:not(:disabled) { transform: scale(0.97); }

.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 1rem; height: 1rem;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  top: 50%; left: 50%;
  margin: -0.5rem 0 0 -0.5rem;
  color: var(--color-text-primary);
}

.btn-primary.btn-loading::after { color: #0c4a6e; }
.btn-danger.btn-loading::after { color: #1c1917; }
.btn-success.btn-loading::after { color: #064e3b; }

/* Button group for segmented controls */
.btn-group {
  display: inline-flex;
  background-color: rgba(63, 63, 70, 0.5);
  border-radius: 0.5rem;
  padding: 0.125rem;
  gap: 0.125rem;
}

.btn-group .btn-group-item {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-group .btn-group-item:hover { color: var(--color-text-secondary); }
.btn-group .btn-group-item.active {
  background-color: var(--color-elevated);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

/* ================================================================
   42. ENHANCED FORM SYSTEM
   ================================================================ */

.form-group { margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.form-label-required::after {
  content: '*';
  color: #fb7185;
  margin-left: 0.25rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.form-error-msg {
  font-size: 0.75rem;
  color: #fb7185;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.input.input-error, .textarea.input-error, .select.input-error {
  border-color: #fb7185;
}
.input.input-error:focus, .textarea.input-error:focus, .select.input-error:focus {
  box-shadow: 0 0 0 2px rgba(251, 113, 133, 0.2);
}

.input.input-success { border-color: #34d399; }
.input.input-success:focus { box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.2); }

/* Read-only display field */
.field-readonly {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  background-color: var(--color-background);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
  position: relative;
}

.field-readonly.field-copyable {
  cursor: pointer;
  padding-right: 2.5rem;
  transition: border-color var(--transition-fast);
}

.field-readonly.field-copyable:hover {
  border-color: var(--color-border);
}

.field-readonly .copy-btn {
  position: absolute;
  right: 0.375rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.25rem;
  border-radius: 0.25rem;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.field-readonly:hover .copy-btn { opacity: 1; }
.field-readonly .copy-btn:hover { color: var(--color-text-primary); }
.field-readonly .copy-btn.copied { color: #34d399; opacity: 1; }

/* ================================================================
   43. ENHANCED TABLE SYSTEM
   ================================================================ */

.table-striped tbody tr:nth-child(odd) {
  background-color: rgba(39, 39, 42, 0.3);
}

.table-compact th { padding: 0.5rem 0.75rem; }
.table-compact td { padding: 0.5rem 0.75rem; }

.table-sortable th { cursor: pointer; user-select: none; }
.table-sortable th:hover { color: var(--color-text-primary); }

.table-sortable th .sort-icon {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-left: 0.25rem;
  opacity: 0.3;
  transition: opacity var(--transition-fast);
  vertical-align: middle;
}

.table-sortable th:hover .sort-icon { opacity: 0.7; }

/* Outcome icons for tables */
.outcome-icon { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; font-weight: 500; }
.outcome-icon svg { width: 0.875rem; height: 0.875rem; }
.outcome-success { color: #34d399; }
.outcome-blocked { color: #fb7185; }
.outcome-denied { color: #fbbf24; }
.outcome-pending { color: var(--color-text-muted); }

/* Filter results counter */
.filter-results {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  padding: 0.25rem 0.5rem;
  background-color: rgba(63, 63, 70, 0.3);
  border-radius: 0.25rem;
}

/* ================================================================
   44. COPY-TO-CLIPBOARD COMPONENT
   ================================================================ */

.copyable {
  position: relative;
  cursor: pointer;
}

.copyable:hover .copyable-icon { opacity: 1; }

.copyable-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.25rem;
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.copyable-icon:hover {
  color: var(--color-text-primary);
  background-color: var(--color-elevated);
}

.copyable-icon.copied {
  opacity: 1;
  color: #34d399;
}

/* ================================================================
   45. SCROLL INDICATORS
   ================================================================ */

.scroll-container {
  position: relative;
}

.scroll-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2rem;
  background: linear-gradient(transparent, var(--color-surface));
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.scroll-container.has-overflow::after { opacity: 1; }

/* Scroll to bottom button */
.scroll-bottom-btn {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.scroll-bottom-btn:hover {
  color: var(--color-text-primary);
  background-color: var(--color-elevated);
}

/* ================================================================
   46. CODE BLOCK STYLING
   ================================================================ */

.code-block-wrapper {
  position: relative;
  margin: 0.75rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background-color: var(--color-background);
}

.code-block-wrapper .code-block-lang {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.625rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-block-wrapper .code-copy-btn {
  position: absolute;
  top: 0.375rem;
  right: 3rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.code-block-wrapper:hover .code-copy-btn { opacity: 1; }
.code-block-wrapper .code-copy-btn:hover { color: var(--color-text-primary); }
.code-block-wrapper .code-copy-btn.copied { color: #34d399; }

.code-block {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-x: auto;
  margin: 0;
}

.code-inline {
  padding: 0.125rem 0.375rem;
  font-size: 0.8125rem;
  background-color: var(--color-elevated);
  border-radius: 0.25rem;
  color: #fb7185;
}

/* ================================================================
   47. CONFIRMATION DIALOG
   ================================================================ */

.confirm-dialog {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 24rem;
  z-index: var(--z-modal);
  overflow: hidden;
}

.confirm-dialog-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.confirm-dialog-icon.danger { background-color: rgba(251, 113, 133, 0.15); color: #fb7185; }
.confirm-dialog-icon.warning { background-color: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.confirm-dialog-icon.info { background-color: rgba(56, 189, 248, 0.15); color: #38bdf8; }

/* ================================================================
   48. TOAST IMPROVEMENTS
   ================================================================ */

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background-color: currentColor;
  opacity: 0.3;
  border-radius: 0 0 0.5rem 0.5rem;
  transition: width linear;
}

.toast .toast-close {
  padding: 0.25rem;
  border-radius: 0.25rem;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.toast .toast-close:hover { color: var(--color-text-primary); }

/* ================================================================
   49. STREAM PANE IMPROVEMENTS
   ================================================================ */

.stream-pane {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.stream-pane-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.stream-pane-header .pane-label { font-weight: 600; }
.stream-pane-header .pane-count { margin-left: auto; font-family: var(--font-mono); }

/* Thinking pane */
.stream-pane-thinking { color: rgba(125, 211, 252, 0.85); }
.stream-pane-thinking .stream-pane-header { border-color: rgba(56, 189, 248, 0.15); }
.stream-pane-thinking .stream-pane-header .pane-label { color: #38bdf8; }

/* Output pane */
.stream-pane-output { color: rgba(110, 231, 183, 0.85); }
.stream-pane-output .stream-pane-header { border-color: rgba(52, 211, 153, 0.15); }
.stream-pane-output .stream-pane-header .pane-label { color: #34d399; }

/* Placeholder text in empty panes */
.stream-placeholder {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-style: italic;
  padding-top: 1rem;
}

/* ================================================================
   50. TIMESTAMP FORMATTING
   ================================================================ */

.timestamp {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.timestamp-relative {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

/* Message timestamp — always visible in compact chat bubbles */
.msg-timestamp {
  font-size: 0.625rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  opacity: 0.5;
  user-select: none;
  transition: opacity var(--transition-fast);
}

.msg-row:hover .msg-timestamp { opacity: 0.85; }

/* ================================================================
   51. BREADCRUMB IMPROVEMENTS
   ================================================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: var(--color-text-primary); }
.breadcrumb .breadcrumb-sep { color: var(--color-elevated); }
.breadcrumb .breadcrumb-current { color: var(--color-text-secondary); font-weight: 500; }

/* ================================================================
   52. PROGRESS STEPS
   ================================================================ */

.steps {
  display: flex;
  align-items: center;
  gap: 0;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-number {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.step-number.step-inactive { background-color: var(--color-elevated); color: var(--color-text-muted); }
.step-number.step-active { background-color: #0ea5e9; color: white; }
.step-number.step-complete { background-color: #34d399; color: #064e3b; }

.step-label {
  font-size: 0.75rem;
  transition: color var(--transition-fast);
}

.step-label.step-inactive { color: var(--color-text-muted); }
.step-label.step-active { color: var(--color-text-primary); font-weight: 500; }
.step-label.step-complete { color: #34d399; }

.step-connector {
  width: 2rem;
  height: 2px;
  margin: 0 0.375rem;
  transition: background-color var(--transition-fast);
}

.step-connector.step-inactive { background-color: var(--color-border); }
.step-connector.step-active { background-color: #0ea5e9; }
.step-connector.step-complete { background-color: #34d399; }

/* ================================================================
   53. APPROVAL CARD ENHANCEMENTS
   ================================================================ */

.approval-card-pending {
  background-color: var(--color-surface);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-left: 3px solid #fbbf24;
  border-radius: 0.5rem;
  padding: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.approval-card-pending:hover {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.06);
}

.approval-age {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.approval-age.urgent { color: #fbbf24; }
.approval-age.critical { color: #fb7185; }

/* ================================================================
   54. ZONE BADGES (UNIFIED)
   ================================================================ */

.zone-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.zone-green { background-color: rgba(6, 78, 59, 0.35); color: #34d399; border-color: rgba(52, 211, 153, 0.25); }
.zone-yellow { background-color: rgba(120, 53, 15, 0.35); color: #fbbf24; border-color: rgba(251, 191, 36, 0.25); }
.zone-red { background-color: rgba(136, 19, 55, 0.35); color: #fb7185; border-color: rgba(251, 113, 133, 0.25); }

.zone-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: currentColor;
}

/* ================================================================
   55. CRON PRESETS COMPONENT
   ================================================================ */

.cron-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.cron-preset-btn {
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  background-color: transparent;
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cron-preset-btn:hover {
  color: var(--color-text-primary);
  border-color: var(--color-info);
  background-color: rgba(56, 189, 248, 0.05);
}

.cron-preset-btn.active {
  color: var(--color-info);
  border-color: var(--color-info);
  background-color: rgba(56, 189, 248, 0.1);
}

/* ================================================================
   56. SAVE FEEDBACK / STATUS INDICATORS
   ================================================================ */

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.25rem;
  animation: fade-in 0.15s ease-out;
}

.save-status-success { color: #34d399; background-color: rgba(52, 211, 153, 0.1); }
.save-status-error { color: #fb7185; background-color: rgba(251, 113, 133, 0.1); }
.save-status-saving { color: var(--color-text-muted); }

/* Auto-refresh indicator */
.refresh-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.refresh-indicator .refresh-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: var(--color-text-muted);
  transition: background-color var(--transition-fast);
}

.refresh-indicator.active .refresh-dot {
  background-color: #34d399;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

/* ================================================================
   57. TYPING INDICATOR IMPROVEMENTS
   ================================================================ */

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
}

.typing-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: var(--color-text-muted);
  animation: typing-bounce 1.4s ease-in-out infinite;
}

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

@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.typing-label {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-left: 0.5rem;
}

/* ================================================================
   58. CHAT MESSAGE ENHANCEMENTS
   ================================================================ */

.msg-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.msg-row:hover .msg-actions { opacity: 1; }

.msg-action-btn {
  padding: 0.25rem;
  border-radius: 0.25rem;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-action-btn:hover {
  color: var(--color-text-primary);
  background-color: var(--color-elevated);
}

.msg-action-btn.copied { color: #34d399; }

/* ================================================================
   59. DRAG AND DROP VISUAL FEEDBACK
   ================================================================ */

.dragging {
  opacity: 0.5;
  border-style: dashed !important;
}

.drag-over {
  background-color: rgba(56, 189, 248, 0.05) !important;
}

.drag-above {
  box-shadow: inset 0 2px 0 0 #38bdf8;
}

.drag-below {
  box-shadow: inset 0 -2px 0 0 #38bdf8;
}

/* ================================================================
   60. NOTIFICATION BADGE
   ================================================================ */

.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  font-size: 0.625rem;
  font-weight: 600;
  font-family: var(--font-mono);
  border-radius: 9999px;
  line-height: 1;
}

.notification-badge-warning { background-color: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.notification-badge-danger { background-color: rgba(251, 113, 133, 0.2); color: #fb7185; }
.notification-badge-info { background-color: rgba(56, 189, 248, 0.2); color: #38bdf8; }

/* ================================================================
   61. MODE INDICATOR ENHANCEMENTS
   ================================================================ */

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 0.375rem;
  border: 1px solid transparent;
}

.mode-standalone { background-color: rgba(63, 63, 70, 0.6); color: var(--color-text-secondary); border-color: var(--color-border); }
.mode-ship { background-color: rgba(12, 74, 110, 0.3); color: #38bdf8; border-color: rgba(56, 189, 248, 0.2); }
.mode-mothership { background-color: rgba(76, 29, 149, 0.3); color: #a78bfa; border-color: rgba(167, 139, 250, 0.2); }

/* ================================================================
   62. HOVER OVERLAY EFFECTS
   ================================================================ */

.hover-highlight { transition: background-color var(--transition-fast); }
.hover-highlight:hover { background-color: rgba(63, 63, 70, 0.5); }

/* ================================================================
   63. ADDITIONAL ANIMATION KEYFRAMES
   ================================================================ */

@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
.animate-fade-out { animation: fade-out 0.2s ease-in forwards; }

@keyframes slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.animate-slide-up { animation: slide-up 0.2s ease-out; }

@keyframes scale-in { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.animate-scale-in { animation: scale-in 0.15s ease-out; }

/* ================================================================
   64. HTMX SWAP TRANSITION
   ================================================================ */

.htmx-swapping { opacity: 0.5; transition: opacity var(--transition-fast); }
.htmx-settling { opacity: 1; transition: opacity var(--transition-fast); }
.htmx-added { animation: fade-in 0.15s ease-out; }

/* ================================================================
   65. COMPACT CHAT BUBBLES
   ================================================================ */

/* Msg-actions visible by default on touch devices */
@media (hover: none) {
  .msg-actions { opacity: 0.7; }
}

/* Markdown inside chat bubbles */
.msg-row .prose-chat p { margin: 0.25em 0; }
.msg-row .prose-chat pre {
  margin: 0.5em 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background: rgba(0, 0, 0, 0.3);
  overflow-x: auto;
  font-size: 0.8125rem;
}
.msg-row .prose-chat code {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
}
.msg-row .prose-chat a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Stream view split layout */
.stream-split-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.stream-split-container > div {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.stream-split-divider {
  width: 1px;
  background: var(--color-border);
  flex-shrink: 0;
}

/* ================================================================
   66. DASHBOARD SIDEBAR & KANBAN
   ================================================================ */

/* Kanban column cards */
.kanban-card {
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.kanban-card:hover {
  background-color: rgba(63, 63, 70, 0.4);
}

/* Graph canvas responsive sizing */
.graph-card canvas {
  display: block;
  width: 100%;
  height: 5rem;
  border-radius: 0.25rem;
}

/* Kanban expand animation */
.kanban-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.kanban-expand.open {
  max-height: 200px;
}

/* ================================================================
   67. MISSING SPACING / SIZING UTILITIES
   ================================================================ */

.mb-0\.5  { margin-bottom: 0.125rem; }
.-mb-0\.5 { margin-bottom: -0.125rem; }
.gap-0\.5 { gap: 0.125rem; }
.h-3\.5   { height: 0.875rem; }

/* ================================================================
   68. TAILWIND JIT UTILITY CLASSES
   Hand-written equivalents of Tailwind JIT arbitrary-value classes
   used in dashboard.html and chat.html templates.
   ================================================================ */

/* Arbitrary font size */
.text-\[10px\] { font-size: 10px; line-height: 1.4; }

/* Arbitrary max-width */
.max-w-\[70\%\] { max-width: 70%; }
.sm\:max-w-\[65\%\] { max-width: 65%; }
@media (min-width: 640px) {
  .sm\:max-w-\[65\%\] { max-width: 65%; }
}

/* Max height */
.max-h-60 { max-height: 15rem; }
.max-h-48 { max-height: 12rem; }
.max-h-64 { max-height: 16rem; }

/* Object fit */
.object-cover { object-fit: cover; }

/* Background colors with opacity */
.bg-zinc-900\/50 { background-color: rgba(24, 24, 27, 0.5); }
.bg-zinc-800\/50 { background-color: rgba(39, 39, 42, 0.5); }
.bg-zinc-800\/80 { background-color: rgba(39, 39, 42, 0.8); }
.bg-zinc-700\/50 { background-color: rgba(63, 63, 70, 0.5); }
.bg-zinc-700\/30 { background-color: rgba(63, 63, 70, 0.3); }
.bg-sky-700\/20 { background-color: rgba(3, 105, 161, 0.2); }
.bg-sky-900\/50 { background-color: rgba(12, 74, 110, 0.5); }
.bg-emerald-700\/30 { background-color: rgba(4, 120, 87, 0.3); }
.bg-emerald-900\/50 { background-color: rgba(6, 78, 59, 0.5); }
.bg-amber-900\/50 { background-color: rgba(120, 53, 15, 0.5); }
.bg-rose-700\/30 { background-color: rgba(190, 18, 60, 0.3); }
.bg-rose-900\/50 { background-color: rgba(136, 19, 55, 0.5); }
.bg-black\/60 { background-color: rgba(0, 0, 0, 0.6); }

/* Hover background with opacity */
.hover\:bg-zinc-700\/30:hover { background-color: rgba(63, 63, 70, 0.3); }
.hover\:bg-emerald-700\/50:hover { background-color: rgba(4, 120, 87, 0.5); }
.hover\:bg-rose-700\/50:hover { background-color: rgba(190, 18, 60, 0.5); }

/* Border colors with opacity */
.border-zinc-700\/50 { border-color: rgba(63, 63, 70, 0.5); }
.border-zinc-700\/60 { border-color: rgba(63, 63, 70, 0.6); }
.border-zinc-700\/30 { border-color: rgba(63, 63, 70, 0.3); }
.border-sky-700\/40 { border-color: rgba(3, 105, 161, 0.4); }
.border-sky-800\/50 { border-color: rgba(7, 89, 133, 0.5); }

/* Divide with opacity */
.divide-zinc-700\/50 > :not(:first-child) { border-top: 1px solid rgba(63, 63, 70, 0.5); }
.divide-zinc-700\/30 > :not(:first-child) { border-top: 1px solid rgba(63, 63, 70, 0.3); }

/* Responsive padding */
@media (min-width: 1024px) {
  .lg\:p-5 { padding: 1.25rem; }
  .lg\:p-6 { padding: 1.5rem; }
  .lg\:flex { display: flex; }
}
