/* normalize essentials */
html {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  line-height: 1.15;
}
body { margin: 0; }
article, aside, footer, header, nav, section { display: block; }
h1 { font-size: 2em; margin: .67em 0; }
figcaption, figure, main { display: block; }
figure { margin: 1em 40px; }
hr { box-sizing: content-box; height: 0; overflow: visible; }
pre { font-family: monospace, monospace; font-size: 1em; }
a { -webkit-text-decoration-skip: objects; background-color: transparent; }
abbr[title] { border-bottom: none; text-decoration: underline dotted; }
b, strong { font-weight: bolder; }
code, kbd, samp { font-family: 'JetBrains Mono', monospace; font-size: 1em; }
dfn { font-style: italic; }
mark { background-color: #fde68a; color: #1c1917; }
small { font-size: 80%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -.25em; }
sup { top: -.5em; }
audio, video { display: inline-block; }
audio:not([controls]) { display: none; height: 0; }
img { border-style: none; }
svg:not(:root) { overflow: hidden; }
button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}
button, input { overflow: visible; }
button, select { text-transform: none; }
[type=reset], [type=submit], button, html [type=button] { -webkit-appearance: button; }
[type=button]::-moz-focus-inner,
[type=reset]::-moz-focus-inner,
[type=submit]::-moz-focus-inner,
button::-moz-focus-inner { border-style: none; padding: 0; }
fieldset { padding: .35em .75em .625em; }
legend { box-sizing: border-box; color: inherit; display: table; max-width: 100%; padding: 0; white-space: normal; }
progress { display: inline-block; vertical-align: baseline; }
textarea { overflow: auto; }
[type=checkbox], [type=radio] { box-sizing: border-box; padding: 0; }
[type=number]::-webkit-inner-spin-button,
[type=number]::-webkit-outer-spin-button { height: auto; }
[type=search] { -webkit-appearance: textfield; outline-offset: -2px; }
[type=search]::-webkit-search-cancel-button,
[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; }
details, menu { display: block; }
summary { display: list-item; }
canvas { display: inline-block; }
[hidden], template { display: none; }

/* ============================================================
   DESIGN TOKENS — Blue Ice Cream (SAFE FOR GENIEACS)
   ============================================================ */
   @import url('https://fonts.googleapis.com/css2?family=Elms+Sans:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&display=swap" rel="stylesheet');

:root {
  /* Vanilla Cream & Ice Blue Palette */
  --bg-base:        #eef6fb; 
  --bg-surface:     #ffffff;
  --bg-elevated:    #e4f0f8;
  --bg-glass:       rgba(255, 255, 255, 0.90);

  /* Skeuomorphic Safe Shadows */
  --shadow-inset:   inset 0 2px 4px rgba(183, 211, 230, 0.4);
  --shadow-outset:  0 4px 10px rgba(183, 211, 230, 0.4);

  /* Borders — Kept structural integrity */
  --border-subtle:  #d6e6f2;
  --border-default: #b9d2e6;
  --border-strong:  #7dd3fc;

  /* Accent — Blueberry / Frosty Mint */
  --accent:         #3b82f6;       
  --accent-dim:     rgba(59, 130, 246, 0.12);
  --accent-hover:   #2563eb;       
  --accent-glow:    0 4px 12px rgba(59, 130, 246, 0.25);
  --accent-bright:  #7dd3fc;       

  /* Text - Deep Navy */
  --text-primary:   #1e3a8a;       
  --text-secondary: #475569;       
  --text-muted:     #94a3b8;       
  --text-accent:    #3b82f6;

  /* Status */
  --status-up:      #059669;       
  --status-down:    #dc2626;       
  --status-warn:    #d97706;       
  --status-unknown: #64748b;

  --status-up-bg:   rgba(5, 150, 105, 0.08);
  --status-down-bg: rgba(220, 38, 38, 0.08);
  --status-warn-bg: rgba(217, 119, 6, 0.08);

  /* Moderated Radius (No breaking pills) */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;

  --font-ui:   'Elms Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Elms Sans', monospace;

  --fade:      0.18s;
  --transition: all var(--fade) cubic-bezier(0.4, 0, 0.2, 1);

  /* Legacy compat aliases */
  --color1:       var(--border-subtle);
  --color2:       var(--border-default);
  --color3:       var(--bg-elevated);
  --color4:       var(--accent);
  --color5:       var(--text-primary);
  --disabled:     var(--text-muted);
  --status-red:   var(--status-down);
  --status-green: var(--status-up);
  --status-gray:  var(--status-unknown);
  --status-yellow: var(--status-warn);
}

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

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-image: radial-gradient(ellipse 70% 40% at 50% -5%, rgba(125, 211, 252, 0.15) 0%, transparent 60%);
}

body, button, input, option, select, textarea {
  color: var(--text-primary);
  font-family: var(--font-ui);
  outline-color: var(--accent);
}

a {
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
a, a:visited { color: var(--accent); }
a:hover {
  color: #ffffff;
  background-color: var(--accent);
  border-radius: 4px;
  box-shadow: var(--accent-glow);
}
a span { text-decoration: inherit; }

b, strong { font-weight: 700; }
i { font-style: italic; }

/* ============================================================
   LAYOUT
   ============================================================ */
#content-wrapper {
  display: flex;
  flex-grow: 1;
  overflow-x: auto;
  overflow-y: auto;
}

/* ============================================================
   HEADER
   ============================================================ */
#header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  overflow: visible;
  position: relative;
  box-shadow: var(--shadow-outset);
}
/* Accent top rule */
#header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-bright) 0%, var(--accent) 40%, #818cf8 100%);
}

#header > .drawer-wrapper {
  left: 50%;
  margin-left: -360px;
  position: fixed;
  top: 0;
  width: 720px;
  z-index: 10;
}
#header > .drawer-wrapper > .drawer {
  background-color: var(--bg-glass);
  border-bottom: 1px solid var(--border-default);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  border-left: 1px solid var(--border-default);
  border-right: 1px solid var(--border-default);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.1), 0 1px 0 var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-top: -1px;
  overflow: hidden;
  transition: height var(--fade), opacity var(--fade);
}
#header > .drawer-wrapper > .drawer > div { padding: .4em .5em; }
#header > .drawer-wrapper > .drawer > .status {
  display: flex;
  align-items: center;
  gap: .5em;
}
#header > .drawer-wrapper > .drawer > .status > span {
  border-radius: var(--radius-sm);
  padding: .15em .5em;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

@keyframes pending-blink {
  0%   { background-color: rgba(5, 150, 105, 0.18); }
  100% { background-color: transparent; }
}
#header > .drawer-wrapper > .drawer > .status > .pending.active {
  animation: pending-blink .6s ease-in-out 0s infinite alternate;
  color: var(--status-up);
}
#header > .drawer-wrapper > .drawer > .status > .stale.active {
  background-color: rgba(100, 116, 139, 0.1);
  color: var(--text-secondary);
}
#header > .drawer-wrapper > .drawer > .status > .fault.active {
  background-color: var(--status-down-bg);
  color: var(--status-down);
}
#header > .drawer-wrapper > .drawer > .status > .queued.active { font-weight: 700; }
#header > .drawer-wrapper > .drawer > .status > .actions { flex-grow: 1; text-align: right; }

#header > .drawer-wrapper > .drawer > .staging .parameter {
  display: inline-block;
  font-style: italic;
  max-width: 500px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: text-bottom;
  color: var(--text-secondary);
}
#header > .drawer-wrapper > .drawer > .staging input {
  box-sizing: border-box;
  margin-bottom: .4em;
  margin-top: .4em;
  padding: .4em .6em;
  width: 100%;
}
#header > .drawer-wrapper > .drawer > .staging .actions { text-align: right; }

#header > .drawer-wrapper > .drawer > .queue { max-height: 400px; overflow-y: auto; }
#header > .drawer-wrapper > .drawer > .queue > .pending {
  animation: pending-blink .6s ease-in-out 0s infinite alternate;
  border-radius: var(--radius-sm);
}
#header > .drawer-wrapper > .drawer > .queue > .stale {
  background-color: rgba(100, 116, 139, 0.08);
  border-radius: var(--radius-sm);
}
#header > .drawer-wrapper > .drawer > .queue > .fault {
  background-color: var(--status-down-bg);
  border-radius: var(--radius-sm);
}
#header > .drawer-wrapper > .drawer > .queue .parameter {
  display: inline-block;
  font-style: italic;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: text-bottom;
  color: var(--text-secondary);
}
#header > .drawer-wrapper > .drawer > .queue .value {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: text-bottom;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
}
#header > .drawer-wrapper > .drawer > .queue > div { display: flex; }
#header > .drawer-wrapper > .drawer > .queue > div > .actions { flex-grow: 1; text-align: right; }

/* Notifications */
#header > .drawer-wrapper > .notifications-wrapper > .notification {
  background-color: var(--bg-glass);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(30, 58, 138, 0.1);
  backdrop-filter: blur(12px);
  left: 0; right: 0;
  padding: .5em .75em;
  transition: opacity var(--fade), top var(--fade);
  font-size: 13px;
}
#header > .drawer-wrapper > .notifications-wrapper > .notification.error {
  background-color: #fef2f2;
  border-color: rgba(220, 38, 38, 0.3);
  color: var(--status-down);
}
#header > .drawer-wrapper > .notifications-wrapper > .notification.success {
  background-color: #f0fdf4;
  border-color: rgba(5, 150, 105, 0.3);
  color: var(--status-up);
}
#header > .drawer-wrapper > .notifications-wrapper > .notification.warning {
  background-color: #fffbeb;
  border-color: rgba(217, 119, 6, 0.3);
  color: var(--status-warn);
}

/* Nav tabs */
#header > nav {
  bottom: -1px;
  display: inline-block;
  overflow: visible;
  position: absolute;
}
#header > nav > ul {
  display: inline-flex;
  gap: 3px;
  font-weight: 600;
  margin: 0 12px;
  padding: 0;
  list-style: none;
}
#header > nav > ul > li {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-bottom: none;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  display: inline-block;
  transition: background-color var(--fade), border-color var(--fade);
  box-shadow: inset 0 -2px 5px rgba(0,0,0,0.02);
}
#header > nav > ul > li:hover {
  background-color: var(--bg-surface);
}
#header > nav > ul > li.active {
  background-color: var(--bg-surface);
  border-color: var(--border-default);
  border-top: 3px solid var(--accent);
  box-shadow: 0 -2px 8px rgba(59, 130, 246, 0.15);
}
#header > nav > ul > li > a,
#header > nav > ul > li > a:hover,
#header > nav > ul > li > a:visited {
  background: none;
  color: var(--text-secondary);
  display: inline-block;
  min-width: 130px;
  padding: 9px 14px;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  transition: color var(--fade);
  box-shadow: none; /* prevent a:hover shadow here */
}
#header > nav > ul > li.active > a,
#header > nav > ul > li:hover > a { color: var(--accent); }

/* Logo */
#header > .logo { display: inline-block; position: relative; }
#header > .logo > img {
  height: 46px;
  margin: 10px 20px 10px 12px;
  vertical-align: top;
}
#header > .logo > .version {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0px;
  position: absolute;
  right: 10px;
}
#header > .user-menu { float: right; margin: 8px 10px; }

/* ============================================================
   SIDE MENU
   ============================================================ */
#side-menu {
  min-width: 210px;
  width: 210px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-default);
  padding-top: 8px;
  box-shadow: 2px 0 8px rgba(183, 211, 230, 0.2);
}
#side-menu > ul { list-style: none; padding: 0; margin: 0; }
#side-menu > ul > li > a {
  background-color: transparent;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-left: 3px solid transparent;
  display: block;
  margin: 2px 8px 2px 0;
  padding: 9px 12px 9px 16px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: var(--transition);
  box-shadow: none;
}
#side-menu > ul > li > a:hover {
  background-color: var(--bg-elevated);
  color: var(--accent);
  border-left-color: var(--accent-bright);
}
#side-menu > ul > li.active > a {
  background-color: var(--bg-elevated);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 700;
  box-shadow: inset 0 2px 4px rgba(183, 211, 230, 0.3);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#content { flex-grow: 1; margin: 16px 20px; min-height: 250px; }
#content::after { content: ""; display: block; padding-bottom: 1px; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  text-shadow: 1px 1px 0px #ffffff;
}
h1::after {
  content: '';
  display: inline-block;
  height: 4px;
  width: 1.8em;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: 2px;
}
h2 { color: var(--text-primary); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
h3 { color: var(--text-secondary); font-size: 1rem; font-weight: 600; }
p.error { color: var(--status-down); }

/* ============================================================
   TABLES
   ============================================================ */
table.table { border-spacing: 0; overflow-x: auto; text-align: left; width: 100%; }
table.table table.table { font-size: 90%; }

table.table th {
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg-elevated);
  padding: .55em .75em;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.8);
}
table.table td {
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
}
table.table td, table.table th { margin: 0; padding: .5em .75em; white-space: nowrap; }
table.table tfoot td > a { margin-left: 1em; }

table.table.highlight > tbody > tr { transition: background-color var(--fade); }
table.table.highlight > tbody > tr:hover { background-color: var(--bg-elevated); }
table.table.highlight > tbody > tr:hover > td { color: var(--text-primary); }

table.table tbody > tr.empty { color: var(--text-muted); text-align: center; }
table.table tbody > tr.empty:hover { background-color: transparent; }

/* ============================================================
   FORMS & INPUTS (Skeuomorphic Inset)
   ============================================================ */
input::-moz-focus-inner { border: 0; padding: 0; }

input, select, textarea {
  background-color: #f7fbff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  display: block;
  padding: .4em .65em;
  transition: border-color var(--fade), box-shadow var(--fade);
  font-family: var(--font-ui);
  font-size: 13px;
  box-shadow: var(--shadow-inset); /* Inner shadow for skeuomorphism */
}
input.error, select.error, textarea.error {
  background-color: #fef2f2;
  border-color: rgba(220, 38, 38, 0.5);
}
input:focus, input:hover,
select:focus, select:hover,
textarea:focus, textarea:hover {
  border-color: var(--accent);
  outline: none;
  background-color: #ffffff;
  box-shadow: inset 0 1px 2px rgba(183, 211, 230, 0.2), 0 0 0 3px rgba(59, 130, 246, 0.15);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }

/* ============================================================
   BUTTONS (Skeuomorphic Gloss)
   ============================================================ */
button, input[type=button] {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--accent);
  cursor: pointer;
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: .4em .9em;
  transition: var(--transition);
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(183, 211, 230, 0.5), inset 0 1px 0 #ffffff;
}
button.primary, input.primary[type=button] {
  background: linear-gradient(180deg, #60a5fa 0%, var(--accent) 100%);
  border: 1px solid var(--accent-hover);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255,255,255,0.4);
  text-shadow: 0 -1px 0 rgba(0,0,0,0.1);
}
button.primary:hover:enabled, input.primary[type=button]:hover:enabled {
  background: linear-gradient(180deg, #7dd3fc 0%, #2563eb 100%);
  box-shadow: var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.6);
}
button.critical, input.critical[type=button] {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: var(--status-down);
}
button.critical:hover:enabled { 
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #fff; 
}
button:hover:enabled, input[type=button]:hover:enabled {
  background: linear-gradient(180deg, #ffffff 0%, #f0f7fb 100%);
  color: var(--accent-hover);
}
button:active:enabled, input[type=button]:active:enabled {
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
button:disabled, input[type=button]:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

/* ============================================================
   CODEMIRROR
   ============================================================ */
.CodeMirror {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  direction: ltr;
  font-family: var(--font-mono);
  font-size: 13px;
  height: 300px;
  overflow: hidden;
  position: relative;
  transition: border-color var(--fade), box-shadow var(--fade);
  box-shadow: var(--shadow-inset);
}
.CodeMirror:hover, .CodeMirror:focus-within {
  border-color: var(--accent);
  box-shadow: inset 0 1px 2px rgba(183, 211, 230, 0.2), 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.CodeMirror-lines { padding: 4px 0; }
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like { padding: 0 4px; }
.CodeMirror-gutter-filler,
.CodeMirror-scrollbar-filler { background-color: var(--bg-base); }
.CodeMirror-gutters {
  background-color: var(--bg-elevated);
  border-right: 1px solid var(--border-default);
  white-space: nowrap;
}
.CodeMirror-linenumber {
  color: var(--text-muted);
  min-width: 20px;
  padding: 0 8px 0 5px;
  text-align: right;
  white-space: nowrap;
  font-size: 11px;
}
.CodeMirror-guttermarker { color: var(--text-primary); }
.CodeMirror-guttermarker-subtle { color: var(--text-muted); }
.CodeMirror-cursor { border-left: 2px solid var(--accent); border-right: none; width: 0; }
.CodeMirror div.CodeMirror-secondarycursor { border-left: 1px solid var(--text-muted); }
.cm-fat-cursor .CodeMirror-cursor { background: var(--accent); border: 0 !important; width: auto; }
.cm-fat-cursor div.CodeMirror-cursors { z-index: 1; }
.cm-fat-cursor .CodeMirror-line::selection,
.cm-fat-cursor .CodeMirror-line > span::selection,
.cm-fat-cursor .CodeMirror-line > span > span::selection { background: transparent; }
.cm-fat-cursor { caret-color: transparent; }

/* Syntax colors */
.cm-s-default .cm-header    { color: var(--accent); font-weight: 700; }
.cm-s-default .cm-quote     { color: var(--status-up); }
.cm-negative                { color: var(--status-down); }
.cm-positive                { color: var(--status-up); }
.cm-header, .cm-strong      { font-weight: 700; }
.cm-em                      { font-style: italic; }
.cm-link                    { text-decoration: underline; }
.cm-strikethrough           { text-decoration: line-through; }
.cm-s-default .cm-keyword   { color: #7c3aed; } 
.cm-s-default .cm-atom      { color: #0369a1; }
.cm-s-default .cm-number    { color: #0284c7; }
.cm-s-default .cm-def       { color: #0369a1; }
.cm-s-default .cm-variable-2 { color: #0369a1; }
.cm-s-default .cm-type,
.cm-s-default .cm-variable-3 { color: #0891b2; }
.cm-s-default .cm-comment   { color: #94a3b8; font-style: italic; }
.cm-s-default .cm-string    { color: #059669; } 
.cm-s-default .cm-string-2  { color: #d97706; } 
.cm-s-default .cm-meta,
.cm-s-default .cm-qualifier { color: var(--text-muted); }
.cm-s-default .cm-builtin   { color: var(--accent); }
.cm-s-default .cm-bracket   { color: var(--text-secondary); }
.cm-s-default .cm-tag       { color: #0284c7; }
.cm-s-default .cm-attribute { color: #7c3aed; }
.cm-s-default .cm-hr        { color: var(--text-muted); }
.cm-s-default .cm-link      { color: var(--accent); }
.cm-invalidchar,
.cm-s-default .cm-error     { color: var(--status-down); }
.CodeMirror-composing       { border-bottom: 2px solid; }
div.CodeMirror span.CodeMirror-matchingbracket { color: var(--status-up); font-weight: 700; }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: var(--status-down); }
.CodeMirror-matchingtag     { background: rgba(217, 119, 6, 0.1); }
.CodeMirror-activeline-background { background: rgba(59, 130, 246, 0.05); }

.CodeMirror-scroll { height: 100%; margin-bottom: -50px; margin-right: -50px; outline: none; overflow: scroll !important; padding-bottom: 50px; position: relative; z-index: 0; }
.CodeMirror-sizer { border-right: 50px solid transparent; position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar,
.CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { display: none; outline: none; position: absolute; z-index: 6; }
.CodeMirror-vscrollbar { overflow-x: hidden; overflow-y: scroll; right: 0; top: 0; }
.CodeMirror-hscrollbar { bottom: 0; left: 0; overflow-x: scroll; overflow-y: hidden; }
.CodeMirror-scrollbar-filler { bottom: 0; right: 0; }
.CodeMirror-gutter-filler { bottom: 0; left: 0; }
.CodeMirror-gutters { left: 0; min-height: 100%; position: absolute; top: 0; z-index: 3; }
.CodeMirror-gutter { display: inline-block; height: 100%; margin-bottom: -50px; vertical-align: top; white-space: normal; }
.CodeMirror-gutter-wrapper { background: none !important; border: none !important; position: absolute; z-index: 4; }
.CodeMirror-gutter-background { bottom: 0; position: absolute; top: 0; z-index: 4; }
.CodeMirror-gutter-elt { cursor: default; position: absolute; z-index: 4; }
.CodeMirror-gutter-wrapper ::selection,
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent; }
.CodeMirror-lines { cursor: text; min-height: 1px; }
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
  word-wrap: normal; -webkit-tap-highlight-color: transparent;
  font-feature-settings: "calt"; background: transparent; border-radius: 0;
  border-width: 0; color: inherit; font-family: inherit; font-size: inherit;
  font-variant-ligatures: contextual; line-height: inherit; margin: 0;
  overflow: visible; position: relative; white-space: pre; z-index: 2;
}
.CodeMirror-wrap pre.CodeMirror-line,
.CodeMirror-wrap pre.CodeMirror-line-like { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-linebackground { bottom: 0; left: 0; position: absolute; right: 0; top: 0; z-index: 0; }
.CodeMirror-linewidget { padding: .1px; position: relative; z-index: 2; }
.CodeMirror-rtl pre { direction: rtl; }
.CodeMirror-code { outline: none; }
.CodeMirror-gutter, .CodeMirror-gutters, .CodeMirror-linenumber,
.CodeMirror-scroll, .CodeMirror-sizer { box-sizing: content-box; }
.CodeMirror-measure { height: 0; overflow: hidden; position: absolute; visibility: hidden; width: 100%; }
.CodeMirror-cursor { pointer-events: none; position: absolute; }
.CodeMirror-measure pre { position: static; }
div.CodeMirror-cursors { position: relative; visibility: hidden; z-index: 3; }
.CodeMirror-focused div.CodeMirror-cursors, div.CodeMirror-dragcursors { visibility: visible; }
.CodeMirror-selected { background: rgba(59, 130, 246, 0.1); }
.CodeMirror-focused .CodeMirror-selected { background: rgba(59, 130, 246, 0.15); }
.CodeMirror-crosshair { cursor: crosshair; }
.CodeMirror-line::selection,
.CodeMirror-line > span::selection,
.CodeMirror-line > span > span::selection { background: rgba(59, 130, 246, 0.15); }
.CodeMirror-line::-moz-selection,
.CodeMirror-line > span::-moz-selection,
.CodeMirror-line > span > span::-moz-selection { background: rgba(59, 130, 246, 0.15); }
.cm-searching { background-color: rgba(217, 119, 6, 0.15); }
.cm-force-border { padding-right: .1px; }
@media print { .CodeMirror div.CodeMirror-cursors { visibility: hidden; } }
.cm-tab-wrap-hack::after { content: ""; }
span.CodeMirror-selectedtext { background: none; }

/* ============================================================
   FILTER
   ============================================================ */
.filter { margin-bottom: .75em; }
.filter > input {
  background-color: #f7fbff;
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 13px;
  margin: 2px;
  padding: .4em .65em;
  width: 35em;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-inset);
}
.filter > input:focus, .filter > input:hover {
  border-color: var(--accent);
  box-shadow: inset 0 1px 2px rgba(183, 211, 230, 0.2), 0 0 0 3px rgba(59, 130, 246, 0.15);
  background-color: #ffffff;
  outline: none;
}

/* ============================================================
   OVERVIEW / CHARTS
   ============================================================ */
.page-overview > h1 { text-align: center; }
.overview-chart-group { display: flex; justify-content: center; }
.overview-chart-group h2 { text-align: center; }

table.parameter-list { border-spacing: 0; text-align: left; }
table.parameter-list th {
  padding: 0 1em 0 0;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.overview-dot > svg { margin-bottom: -.125em; margin-left: .2em; margin-right: .2em; }
.overview-dot > svg > circle { stroke: var(--text-primary); stroke-width: .08em; }

span.inform > * { margin-right: .5em; }

.pie-chart { margin: 20px; text-align: center; }
.pie-chart > svg > path { stroke: var(--bg-base); stroke-width: 1.5px; }
.pie-chart > svg > a { opacity: 0; transition: opacity var(--fade); }
.pie-chart > svg > a > text { font-weight: 700; opacity: .5; }
.pie-chart > svg > a > path { stroke: var(--accent); }
.pie-chart > svg > a:hover { opacity: 1; }
.pie-chart > .legend { margin: 15px; text-align: left; }
.pie-chart > .legend > .legend-line > .color {
  border: 1px solid var(--border-default);
  display: inline-block;
  height: 10px;
  margin-right: 6px;
  width: 10px;
  border-radius: 2px;
}

/* ============================================================
   ALL PARAMETERS
   ============================================================ */
span.na { color: var(--text-muted); }
.all-parameters > input {
  margin-bottom: 2px;
  padding: 6px 8px;
  width: 700px;
  font-family: var(--font-mono);
  font-size: 13px;
  box-shadow: var(--shadow-inset);
}
.all-parameters > .parameter-list { font-family: var(--font-mono); font-size: 13px; }
.all-parameters > .parameter-list button { font-size: 14px; }
.all-parameters > .parameter-list {
  background-color: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  height: 200px;
  overflow-y: scroll;
  box-shadow: var(--shadow-inset);
}
.all-parameters > .parameter-list > table { border-spacing: 0; table-layout: fixed; width: 100%; }
.all-parameters > .parameter-list > table > tbody > tr > td {
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  white-space: nowrap;
  padding: .3em .5em;
}
.all-parameters > .parameter-list > table > tbody > tr { transition: background-color var(--fade); }
.all-parameters > .parameter-list > table > tbody > tr:hover { background-color: var(--bg-elevated); }
.all-parameters > .parameter-list > table > tbody > tr > td.left > * { max-width: 100%; }
.all-parameters > .parameter-list > table > tbody > tr > td.right { padding-right: .5em; text-align: right; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container-right { clear: right; float: right; }
.container-full-width { clear: both; }
.actions-bar { margin-bottom: 12px; margin-top: 12px; display: flex; align-items: center; gap: 8px; }

/* ============================================================
   TAGS (Jelly Pill)
   ============================================================ */
span.tag {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--accent);
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: .15em .6em .15em .5em;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(183, 211, 230, 0.4);
}
.tags > .tag { margin-right: .4em; }

/* ============================================================
   OVERLAY / MODAL
   ============================================================ */
.overlay-wrapper {
  align-items: center;
  background-color: rgba(30, 58, 138, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  bottom: 0; left: 0; right: 0; top: 0;
  display: flex;
  justify-content: center;
  position: fixed;
  transition: opacity var(--fade), top var(--fade);
  z-index: 100;
}
.overlay-wrapper > .overlay {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 56px rgba(30, 58, 138, 0.16), 0 0 0 1px rgba(183, 211, 230, 0.5);
  max-height: 90vh;
  max-width: 90vw;
  overflow: auto;
  padding: 20px;
}
.overlay > .put-form { min-width: 700px; }

/* ============================================================
   AUTOCOMPLETE
   ============================================================ */
.autocomplete {
  background-color: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.12);
  max-height: 300px;
  overflow-y: auto;
  transition: opacity var(--fade);
}
.autocomplete > .suggestion {
  padding: 7px 10px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}
.autocomplete > .suggestion.selected,
.autocomplete > .suggestion:hover {
  background-color: var(--bg-elevated);
  color: var(--accent);
}

/* ============================================================
   LONG TEXT
   ============================================================ */
span.long-text {
  display: inline-block;
  max-width: 400px;
  overflow-x: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}
span.long-text-overflowed { cursor: pointer; }
span.long-text-overflowed:hover { text-decoration: underline dotted; }
textarea.long-text { font-family: var(--font-mono); font-size: 13px; min-height: 10vh; min-width: 10vw; }
span.parameter-value > span:empty::before { color: var(--text-muted); content: "blank"; }

/* ============================================================
   WIZARD DIALOG
   ============================================================ */
.wizard-dialog {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(183, 211, 230, 0.4);
  margin: 12px auto;
  max-width: 720px;
  padding: 16px;
}

/* ============================================================
   ICONS
   ============================================================ */
.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  height: 1em;
  width: 1em;
}
.icon.icon-unsorted { opacity: .25; }

/* ============================================================
   LOADING
   ============================================================ */
.loading { opacity: .5; }

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.loading-overlay { align-items: center; display: flex; justify-content: center; }
.loading-overlay::after {
  animation: spin 0.9s linear infinite;
  content: "";
  height: 36px;
  width: 36px;
  border: 3px solid rgba(59, 130, 246, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress {
  background-color: var(--bg-elevated);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-inset);
}
.progress > .progress-bar {
  background: linear-gradient(90deg, var(--accent-bright), var(--accent));
  height: 100%;
  border-radius: 99px;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.4);
  transition: width 0.3s ease;
}

/* ============================================================
   TABLE CELLS & SCROLLBAR
   ============================================================ */
td, th { line-height: normal; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); border-radius: 99px; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 99px; border: 2px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

::selection { background-color: rgba(59, 130, 246, 0.15); color: var(--text-primary); }

/* ============================================================
   COMPACT ICON BOXES (Edit Pen, Trash, Refresh)
   ============================================================ */
/* Target any button or link that contains an icon */
button:has(.icon), 
a:has(.icon) {
  padding: 0.2em 0.2em; /* Shrinks the top/bottom and left/right padding */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Specific tighter fix for action links inside tables (like the edit pen) */
table.table td > a:has(.icon),
.actions > a {
  padding: 0.20em 0.3em; 
  border-radius: var(--radius-sm); /* Keeps the hover box subtly rounded */
}

/* Optional: If you want the actual SVG pen drawing slightly smaller too */
.icon {
  font-size: 0.8em; /* Change to 0.8em for even smaller, or leave at 1em */
}