:root {
  --radius-lg: 20px;
  --radius-xl: 26px;
}

:root[data-theme="light"][data-variant="glass"] {
  --bg-1: #ecf4fb;
  --bg-2: #dbe7f2;
  --ink: #0d2033;
  --ink-soft: #193754;
  --ink-muted: #5a6f87;
  --line: rgba(34, 87, 141, 0.12);
  --line-strong: rgba(34, 87, 141, 0.22);
  --surface: rgba(243, 248, 252, 0.7);
  --surface-strong: rgba(253, 254, 255, 0.84);
  --accent: #0d67c6;
  --accent-strong: #1e8ddb;
  --accent-glow: rgba(62, 150, 233, 0.26);
  --success: #1aa37d;
  --warning: #dc9d2d;
  --danger: #d25555;
  --shadow-1: 0 18px 38px -28px rgba(8, 28, 50, 0.24);
  --shadow-2: 0 30px 72px -40px rgba(8, 28, 50, 0.32);
  --glass-blur: 20px;
  --glass-saturate: 145%;
  --glass-brightness: 1.03;
}

:root[data-theme="dark"][data-variant="glass"] {
  --bg-1: #071320;
  --bg-2: #0b1d2e;
  --ink: #ecf6ff;
  --ink-soft: #c8dff6;
  --ink-muted: #86a3c4;
  --line: rgba(101, 165, 220, 0.15);
  --line-strong: rgba(122, 188, 241, 0.24);
  --surface: rgba(9, 23, 37, 0.68);
  --surface-strong: rgba(11, 31, 49, 0.82);
  --accent: #67baff;
  --accent-strong: #8fd5ff;
  --accent-glow: rgba(88, 188, 255, 0.26);
  --success: #35c49b;
  --warning: #e7b14d;
  --danger: #ef7777;
  --shadow-1: 0 22px 42px -30px rgba(0, 0, 0, 0.58);
  --shadow-2: 0 34px 84px -46px rgba(0, 0, 0, 0.72);
  --glass-blur: 18px;
  --glass-saturate: 135%;
  --glass-brightness: 0.88;
}

:root[data-theme="light"][data-variant="scientific"] {
  --bg-1: #eef4fa;
  --bg-2: #deebf5;
  --ink: #0b1d31;
  --ink-soft: #18344f;
  --ink-muted: #607489;
  --line: rgba(37, 88, 136, 0.11);
  --line-strong: rgba(37, 88, 136, 0.2);
  --surface: rgba(247, 250, 253, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --accent: #0d67c6;
  --accent-strong: #1f86d4;
  --accent-glow: rgba(62, 150, 233, 0.18);
  --success: #1d9b77;
  --warning: #d69a2f;
  --danger: #d45b5b;
  --shadow-1: 0 16px 36px -30px rgba(8, 28, 50, 0.18);
  --shadow-2: 0 24px 58px -40px rgba(8, 28, 50, 0.24);
  --glass-blur: 8px;
  --glass-saturate: 118%;
  --glass-brightness: 1;
}

:root[data-theme="dark"][data-variant="scientific"] {
  --bg-1: #08131f;
  --bg-2: #0b1927;
  --ink: #ebf4fc;
  --ink-soft: #c8d9eb;
  --ink-muted: #8ca7c1;
  --line: rgba(101, 165, 220, 0.12);
  --line-strong: rgba(122, 188, 241, 0.2);
  --surface: rgba(10, 20, 31, 0.84);
  --surface-strong: rgba(12, 26, 41, 0.92);
  --accent: #6ab8ff;
  --accent-strong: #8ed3ff;
  --accent-glow: rgba(88, 188, 255, 0.16);
  --success: #36bf97;
  --warning: #e0af4a;
  --danger: #eb7373;
  --shadow-1: 0 18px 40px -32px rgba(0, 0, 0, 0.62);
  --shadow-2: 0 26px 68px -46px rgba(0, 0, 0, 0.7);
  --glass-blur: 6px;
  --glass-saturate: 110%;
  --glass-brightness: 0.92;
}

html,
body {
  min-height: 100%;
}

body {
  background-color: var(--bg-1);
  background-image:
    radial-gradient(1200px 720px at 4% -4%, rgba(34, 119, 201, 0.18), transparent 58%),
    radial-gradient(900px 620px at 95% 10%, rgba(23, 157, 188, 0.12), transparent 52%),
    radial-gradient(680px 520px at 50% 100%, rgba(153, 195, 230, 0.12), transparent 54%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(235, 243, 249, 0.96) 38%, rgba(219, 231, 242, 1) 100%);
  background-attachment: fixed;
}

body::before {
  opacity: 1;
  background-image:
    linear-gradient(rgba(28, 81, 136, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 81, 136, 0.06) 1px, transparent 1px),
    radial-gradient(460px 280px at 50% 0%, rgba(255, 255, 255, 0.42), transparent 72%),
    var(--noise);
  background-size: 88px 88px, 88px 88px, auto, 160px 160px;
  background-position: center center, center center, center top, center center;
  mix-blend-mode: normal;
}

body::after {
  background:
    radial-gradient(340px 260px at var(--pointer-x) var(--pointer-y), rgba(95, 182, 255, 0.16), transparent 65%);
  opacity: 0.6;
  mix-blend-mode: screen;
}

:root[data-theme="dark"] body {
  background-image:
    radial-gradient(1000px 620px at 4% -4%, rgba(34, 119, 201, 0.18), transparent 56%),
    radial-gradient(820px 520px at 96% 8%, rgba(32, 175, 183, 0.1), transparent 48%),
    radial-gradient(760px 520px at 50% 100%, rgba(72, 122, 188, 0.12), transparent 52%),
    linear-gradient(180deg, rgba(7, 19, 32, 1), rgba(9, 25, 40, 0.98) 38%, rgba(11, 29, 46, 1) 100%);
}

:root[data-theme="dark"] body::before {
  background-image:
    linear-gradient(rgba(91, 147, 195, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 147, 195, 0.08) 1px, transparent 1px),
    radial-gradient(460px 280px at 50% 0%, rgba(96, 152, 220, 0.14), transparent 72%),
    var(--noise);
  opacity: 0.78;
}

#root {
  perspective: 1200px;
}

#root h1,
#root h2,
#root h3,
#root h4 {
  letter-spacing: -0.035em;
}

.label,
.\!label,
.tag,
.chip,
.nav-pill,
.segmented-btn,
.btn {
  font-family: "IBM Plex Mono", monospace;
}

.label,
.\!label {
  letter-spacing: 0.28em !important;
  color: #61768d !important;
}

.glass-panel,
.panel,
.panel-soft {
  border-color: var(--line);
  box-shadow: var(--shadow-1);
}

.panel,
.glass-panel {
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(238, 246, 251, 0.56)),
    linear-gradient(120deg, rgba(13, 103, 198, 0.06), transparent 32%);
  border: 1px solid rgba(174, 196, 219, 0.48);
}

.glass-panel {
  background:
    linear-gradient(180deg, rgba(252, 254, 255, 0.9), rgba(241, 248, 253, 0.72)),
    linear-gradient(120deg, rgba(13, 103, 198, 0.08), transparent 36%);
  border: 1px solid rgba(166, 190, 215, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 22px 56px -36px rgba(7, 31, 58, 0.26);
}

.panel-soft {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(238, 246, 251, 0.58));
  border: 1px solid rgba(177, 198, 219, 0.44);
}

.panel::before,
.glass-panel::before {
  background:
    radial-gradient(280px 180px at var(--mx, 18%) var(--my, 10%), rgba(255, 255, 255, 0.35), transparent 62%);
  opacity: 0.8;
}

.glass-panel::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.04) 52%, transparent 100%),
    linear-gradient(90deg, transparent 0, rgba(90, 152, 219, 0.08) 46%, transparent 100%);
  opacity: 0.55;
}

.panel:hover,
.glass-panel:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 155, 208, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 26px 62px -40px rgba(7, 31, 58, 0.3);
}

aside.glass-panel,
header.glass-panel {
  background:
    linear-gradient(180deg, rgba(252, 254, 255, 0.94), rgba(242, 248, 253, 0.82)),
    linear-gradient(135deg, rgba(13, 103, 198, 0.06), transparent 42%);
}

#root .min-h-screen > div > aside.glass-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#root .min-h-screen > div > aside.glass-panel > .mt-6.rounded-3xl {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

#root .min-h-screen > div > aside.glass-panel > .mt-6.rounded-3xl nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.18rem;
  scrollbar-gutter: stable;
}

#root .min-h-screen > div > aside.glass-panel > .mt-6.rounded-3xl nav::-webkit-scrollbar {
  width: 10px;
}

#root .min-h-screen > div > aside.glass-panel > .mt-6.rounded-3xl nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(96, 157, 212, 0.28);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.btn {
  border-radius: 16px;
  height: 44px;
  padding: 0 1.35rem;
  border-color: rgba(168, 191, 214, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(236, 245, 252, 0.44));
  color: var(--ink-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 12px 24px -20px rgba(8, 28, 50, 0.24);
}

.btn::after {
  border-color: rgba(255, 255, 255, 0.42);
}

.btn:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 16px 28px -22px rgba(8, 28, 50, 0.28);
}

.btn-primary {
  color: #f7fbff;
  border-color: rgba(27, 127, 213, 0.54);
  background:
    linear-gradient(135deg, #0f67c8 0%, #0f73cf 42%, #1691dc 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 34px -24px rgba(16, 111, 191, 0.52);
}

.btn-secondary {
  color: var(--accent);
  border-color: rgba(121, 174, 222, 0.34);
  background:
    linear-gradient(180deg, rgba(223, 238, 251, 0.84), rgba(241, 248, 253, 0.62));
}

.btn-ghost {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(238, 246, 251, 0.26));
}

.btn-danger {
  background:
    linear-gradient(135deg, #cb5656 0%, #de6c6c 100%);
  border-color: rgba(211, 92, 92, 0.6);
}

.btn-sm {
  height: 38px;
  border-radius: 14px;
}

.nav-pill {
  border-radius: 18px;
  border-color: rgba(170, 193, 216, 0.44);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(236, 245, 252, 0.46));
  color: var(--ink-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.nav-pill:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    0 18px 30px -28px rgba(8, 28, 50, 0.26);
}

.nav-pill-active {
  color: var(--accent);
  border-color: rgba(101, 160, 214, 0.4);
  background:
    linear-gradient(180deg, rgba(232, 243, 253, 0.92), rgba(220, 237, 250, 0.72));
  box-shadow:
    inset 3px 0 0 rgba(13, 103, 198, 0.88),
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 18px 30px -28px rgba(16, 111, 191, 0.38);
}

.segmented {
  border-color: rgba(170, 193, 216, 0.44);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(236, 245, 252, 0.4));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.segmented-btn {
  color: var(--ink-muted);
}

.segmented-btn-active {
  color: var(--accent);
  border-color: rgba(96, 157, 212, 0.42);
  background:
    linear-gradient(180deg, rgba(232, 243, 253, 0.96), rgba(220, 237, 250, 0.82));
  box-shadow: 0 12px 22px -20px rgba(16, 111, 191, 0.38);
}

.chip,
.tag {
  border-color: rgba(173, 195, 217, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(237, 245, 251, 0.42));
  color: var(--ink-soft);
}

.tag-warning,
.chip-warning,
.chip-caution {
  border-color: rgba(214, 154, 47, 0.38);
  background: rgba(214, 154, 47, 0.12);
  color: #996711;
}

.tag-danger,
.chip-danger {
  border-color: rgba(210, 85, 85, 0.34);
  background: rgba(210, 85, 85, 0.12);
  color: #a74343;
}

.tag-success {
  border-color: rgba(26, 163, 125, 0.34);
  background: rgba(26, 163, 125, 0.12);
  color: #16795f;
}

.input-field {
  border-radius: 14px;
  border-color: rgba(170, 193, 216, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(237, 245, 251, 0.78));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.input-field::placeholder {
  color: #6f8296;
}

.input-field:focus {
  border-color: rgba(30, 141, 219, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 0 0 3px rgba(30, 141, 219, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 248, 253, 0.86));
}

.toast {
  border-color: rgba(173, 195, 217, 0.46);
  background:
    linear-gradient(180deg, rgba(252, 254, 255, 0.92), rgba(239, 247, 252, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 16px 36px -24px rgba(8, 28, 50, 0.26);
}

.bg-white\/30 {
  background-color: rgba(241, 247, 252, 0.36);
}

.bg-white\/40 {
  background-color: rgba(242, 248, 252, 0.46);
}

.bg-white\/50 {
  background-color: rgba(244, 249, 253, 0.58);
}

.bg-white\/60 {
  background-color: rgba(246, 250, 253, 0.68);
}

.bg-white\/70 {
  background-color: rgba(249, 252, 254, 0.76);
}

.bg-white\/80 {
  background-color: rgba(252, 254, 255, 0.84);
}

.bg-slate-100\/60 {
  background-color: rgba(231, 241, 249, 0.7);
}

.bg-slate-200\/40 {
  background-color: rgba(223, 235, 245, 0.48);
}

.border-slate-300 {
  border-color: rgba(152, 177, 201, 0.42);
}

.text-slate-400 {
  color: #7088a1;
}

.slot-tile {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(236, 245, 252, 0.46));
  backdrop-filter: blur(12px) saturate(132%);
  -webkit-backdrop-filter: blur(12px) saturate(132%);
}

.slot-tile:hover {
  box-shadow: 0 12px 24px -18px rgba(8, 28, 50, 0.24);
}

:root[data-theme="dark"] .panel {
  background:
    linear-gradient(180deg, rgba(14, 28, 43, 0.88), rgba(9, 21, 33, 0.74)),
    linear-gradient(120deg, rgba(103, 186, 255, 0.07), transparent 40%);
  border-color: rgba(101, 165, 220, 0.18);
}

:root[data-theme="dark"] .glass-panel {
  background:
    linear-gradient(180deg, rgba(13, 27, 42, 0.86), rgba(9, 23, 37, 0.74)),
    linear-gradient(130deg, rgba(103, 186, 255, 0.08), transparent 38%);
  border-color: rgba(101, 165, 220, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 54px -38px rgba(0, 0, 0, 0.72);
}

:root[data-theme="dark"] .panel-soft {
  background:
    linear-gradient(180deg, rgba(13, 26, 40, 0.8), rgba(9, 20, 31, 0.72));
  border-color: rgba(101, 165, 220, 0.16);
}

:root[data-theme="dark"] .glass-panel::before,
:root[data-theme="dark"] .panel::before {
  background:
    radial-gradient(280px 180px at var(--mx, 18%) var(--my, 10%), rgba(114, 186, 248, 0.14), transparent 62%);
}

:root[data-theme="dark"] .glass-panel::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 48%, transparent 100%),
    linear-gradient(90deg, transparent 0, rgba(108, 178, 241, 0.08) 46%, transparent 100%);
}

:root[data-theme="dark"] aside.glass-panel,
:root[data-theme="dark"] header.glass-panel {
  background:
    linear-gradient(180deg, rgba(11, 25, 39, 0.92), rgba(10, 22, 35, 0.82)),
    linear-gradient(135deg, rgba(103, 186, 255, 0.06), transparent 44%);
}

:root[data-theme="dark"] .btn {
  border-color: rgba(101, 165, 220, 0.18);
  background:
    linear-gradient(180deg, rgba(18, 35, 53, 0.78), rgba(10, 24, 37, 0.72));
  color: var(--ink-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 26px -22px rgba(0, 0, 0, 0.58);
}

:root[data-theme="dark"] .btn-primary {
  color: #f5fbff;
  border-color: rgba(103, 186, 255, 0.34);
  background:
    linear-gradient(135deg, #12599d 0%, #177ac4 48%, #2d9de2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 34px -24px rgba(20, 123, 196, 0.46);
}

:root[data-theme="dark"] .btn-secondary,
:root[data-theme="dark"] .btn-ghost {
  background:
    linear-gradient(180deg, rgba(18, 35, 53, 0.72), rgba(11, 24, 36, 0.66));
}

:root[data-theme="dark"] .nav-pill {
  border-color: rgba(101, 165, 220, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 31, 47, 0.86), rgba(11, 24, 37, 0.74));
}

:root[data-theme="dark"] .nav-pill-active {
  background:
    linear-gradient(180deg, rgba(21, 49, 76, 0.92), rgba(12, 39, 63, 0.82));
  border-color: rgba(103, 186, 255, 0.34);
  box-shadow:
    inset 3px 0 0 rgba(103, 186, 255, 0.92),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 30px -28px rgba(0, 0, 0, 0.6);
}

:root[data-theme="dark"] .segmented {
  border-color: rgba(101, 165, 220, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 31, 47, 0.84), rgba(11, 24, 37, 0.74));
}

:root[data-theme="dark"] .segmented-btn-active {
  background:
    linear-gradient(180deg, rgba(21, 49, 76, 0.96), rgba(12, 39, 63, 0.84));
  border-color: rgba(103, 186, 255, 0.32);
}

:root[data-theme="dark"] .chip,
:root[data-theme="dark"] .tag {
  border-color: rgba(101, 165, 220, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 31, 47, 0.72), rgba(11, 24, 37, 0.64));
}

:root[data-theme="dark"] .tag-warning,
:root[data-theme="dark"] .chip-warning,
:root[data-theme="dark"] .chip-caution {
  color: #f4c76f;
  background: rgba(224, 175, 74, 0.14);
}

:root[data-theme="dark"] .tag-danger,
:root[data-theme="dark"] .chip-danger {
  color: #f09393;
  background: rgba(235, 115, 115, 0.14);
}

:root[data-theme="dark"] .tag-success {
  color: #6adab7;
  background: rgba(54, 191, 151, 0.14);
}

:root[data-theme="dark"] .input-field {
  border-color: rgba(101, 165, 220, 0.2);
  background:
    linear-gradient(180deg, rgba(13, 29, 45, 0.88), rgba(9, 22, 34, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] .input-field::placeholder {
  color: rgba(134, 163, 196, 0.82);
}

:root[data-theme="dark"] .input-field:focus {
  border-color: rgba(103, 186, 255, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 3px rgba(103, 186, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(15, 34, 53, 0.92), rgba(10, 24, 38, 0.84));
}

:root[data-theme="dark"] .toast {
  border-color: rgba(101, 165, 220, 0.22);
  background:
    linear-gradient(180deg, rgba(14, 29, 44, 0.94), rgba(10, 22, 35, 0.88));
}

:root[data-theme="dark"] .bg-white\/30 {
  background-color: rgba(14, 30, 45, 0.34);
}

:root[data-theme="dark"] .bg-white\/40 {
  background-color: rgba(14, 30, 45, 0.42);
}

:root[data-theme="dark"] .bg-white\/50 {
  background-color: rgba(14, 30, 45, 0.5);
}

:root[data-theme="dark"] .bg-white\/60 {
  background-color: rgba(14, 30, 45, 0.58);
}

:root[data-theme="dark"] .bg-white\/70 {
  background-color: rgba(15, 31, 47, 0.68);
}

.settings-lab-upgraded {
  gap: 1.25rem;
}

.settings-content-panel {
  display: grid;
  gap: 1.1rem;
}

.settings-hero-panel {
  position: relative;
  overflow: hidden;
}

.settings-hero-panel::after {
  content: "";
  position: absolute;
  inset: auto 1.4rem 1rem auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(30, 141, 219, 0.2), rgba(30, 141, 219, 0) 70%);
  pointer-events: none;
}

.settings-hero-description {
  max-width: 68ch;
  line-height: 1.65;
}

.settings-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 1rem;
}

.settings-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}

.settings-section-note {
  margin-top: 0.75rem;
  max-width: 64ch;
  color: var(--ink-muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.settings-choice-group {
  gap: 0.85rem !important;
}

.settings-choice-group-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-choice-group-note {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.76rem;
  line-height: 1.7;
}

.settings-choice-grid.segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.settings-choice-group--variant .settings-choice-grid.segmented {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.settings-choice-group--density .settings-choice-grid.segmented {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.settings-choice-card.segmented-btn {
  position: relative;
  min-height: 146px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.95rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(166, 190, 215, 0.44);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(241, 248, 253, 0.66)),
    linear-gradient(140deg, rgba(13, 103, 198, 0.07), rgba(30, 141, 219, 0) 55%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 18px 34px -28px rgba(8, 28, 50, 0.18);
  text-align: left;
}

.settings-choice-card.segmented-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 22px 38px -28px rgba(13, 103, 198, 0.24);
}

.settings-choice-card.segmented-btn-active {
  border-color: rgba(30, 141, 219, 0.38);
  background:
    linear-gradient(180deg, rgba(244, 250, 255, 0.96), rgba(226, 239, 250, 0.86)),
    linear-gradient(140deg, rgba(13, 103, 198, 0.1), rgba(30, 141, 219, 0) 58%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 24px 42px -28px rgba(13, 103, 198, 0.28);
}

.settings-choice-copy {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.settings-choice-label {
  color: var(--ink);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.settings-choice-note {
  color: var(--ink-muted);
  font-size: 0.72rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.settings-choice-card.segmented-btn-active .settings-choice-note {
  color: var(--ink-soft);
}

.settings-choice-preview {
  position: relative;
  display: block;
  width: 100%;
  height: 58px;
  border-radius: 16px;
  border: 1px solid rgba(166, 190, 215, 0.44);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(237, 245, 251, 0.68));
  overflow: hidden;
}

.settings-preview-orb,
.settings-preview-panel,
.settings-preview-line {
  position: absolute;
  display: block;
}

.settings-preview-orb {
  top: 11px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(30, 141, 219, 0.18);
  box-shadow: 0 0 0 8px rgba(30, 141, 219, 0.06);
}

.settings-preview-panel {
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 26px;
  border-radius: 12px;
  border: 1px solid rgba(166, 190, 215, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(234, 243, 250, 0.56));
}

.settings-preview-line {
  left: 12px;
  top: 12px;
  width: 42%;
  height: 5px;
  border-radius: 999px;
  background: rgba(30, 141, 219, 0.3);
}

.settings-choice-card[data-settings-group="theme"][data-settings-value="light"] .settings-choice-preview {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(231, 241, 249, 0.74));
}

.settings-choice-card[data-settings-group="theme"][data-settings-value="dark"] .settings-choice-preview {
  border-color: rgba(96, 157, 212, 0.24);
  background:
    linear-gradient(180deg, rgba(13, 29, 45, 0.94), rgba(10, 22, 35, 0.84));
}

.settings-choice-card[data-settings-group="theme"][data-settings-value="dark"] .settings-preview-line {
  background: rgba(103, 186, 255, 0.62);
}

.settings-choice-card[data-settings-group="theme"][data-settings-value="dark"] .settings-preview-panel {
  border-color: rgba(101, 165, 220, 0.22);
  background:
    linear-gradient(180deg, rgba(21, 49, 76, 0.82), rgba(12, 39, 63, 0.72));
}

.settings-choice-card[data-settings-group="theme"][data-settings-value="dark"] .settings-preview-orb {
  background: rgba(103, 186, 255, 0.22);
  box-shadow: 0 0 0 8px rgba(103, 186, 255, 0.08);
}

.settings-choice-card[data-settings-group="theme"][data-settings-value="system"] .settings-choice-preview {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0 50%, rgba(13, 29, 45, 0.9) 50% 100%);
}

.settings-choice-card[data-settings-group="theme"][data-settings-value="system"] .settings-preview-panel {
  background:
    linear-gradient(90deg, rgba(241, 248, 253, 0.8) 0 50%, rgba(12, 39, 63, 0.78) 50% 100%);
}

.settings-choice-card[data-settings-group="theme"][data-settings-value="system"] .settings-preview-line {
  width: 52%;
  background:
    linear-gradient(90deg, rgba(30, 141, 219, 0.3) 0 60%, rgba(103, 186, 255, 0.62) 60% 100%);
}

.settings-choice-card[data-settings-group="variant"][data-settings-value="glass"] .settings-choice-preview {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(235, 245, 252, 0.66)),
    linear-gradient(135deg, rgba(13, 103, 198, 0.12), rgba(13, 103, 198, 0) 55%);
  backdrop-filter: blur(10px);
}

.settings-choice-card[data-settings-group="variant"][data-settings-value="glass"] .settings-preview-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(231, 241, 249, 0.5));
}

.settings-choice-card[data-settings-group="variant"][data-settings-value="scientific"] .settings-choice-preview {
  background:
    linear-gradient(180deg, rgba(248, 251, 253, 0.94), rgba(233, 242, 249, 0.86));
}

.settings-choice-card[data-settings-group="variant"][data-settings-value="scientific"] .settings-preview-panel {
  border-style: solid;
  border-color: rgba(90, 118, 141, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(240, 246, 251, 0.72));
}

.settings-choice-card[data-settings-group="variant"][data-settings-value="scientific"] .settings-preview-line {
  width: 54%;
  background: rgba(13, 103, 198, 0.42);
}

.settings-choice-card[data-settings-group="density"][data-settings-value="comfortable"] .settings-preview-panel::before,
.settings-choice-card[data-settings-group="density"][data-settings-value="compact"] .settings-preview-panel::before,
.settings-choice-card[data-settings-group="density"][data-settings-value="compact"] .settings-preview-panel::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 999px;
  background: rgba(30, 141, 219, 0.18);
}

.settings-choice-card[data-settings-group="density"][data-settings-value="comfortable"] .settings-preview-panel::before {
  top: 8px;
}

.settings-choice-card[data-settings-group="density"][data-settings-value="compact"] .settings-preview-panel::before {
  top: 7px;
}

.settings-choice-card[data-settings-group="density"][data-settings-value="compact"] .settings-preview-panel::after {
  top: 13px;
}

.settings-safety-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(166, 190, 215, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(237, 245, 251, 0.48));
}

.settings-safety-toggle input {
  margin-top: 0.2rem;
}

.settings-safety-copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.settings-safety-title {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}

.settings-safety-subtitle,
.settings-safety-description {
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.settings-save-button {
  min-width: 168px;
  margin-left: auto;
}

.settings-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  direction: ltr;
}

@media (max-width: 900px) {
  .settings-choice-grid.segmented,
  .settings-choice-group--variant .settings-choice-grid.segmented,
  .settings-choice-group--density .settings-choice-grid.segmented {
    grid-template-columns: 1fr;
  }

  .settings-choice-card.segmented-btn {
    min-height: 132px;
  }

  .settings-actions-row {
    justify-content: stretch;
  }

  .settings-save-button {
    width: 100%;
    min-width: 0;
  }
}

:root[data-theme="dark"] .settings-card::before {
  background:
    linear-gradient(135deg, rgba(103, 186, 255, 0.08), rgba(103, 186, 255, 0) 42%);
}

:root[data-theme="dark"] .settings-choice-card.segmented-btn {
  border-color: rgba(101, 165, 220, 0.2);
  background:
    linear-gradient(180deg, rgba(14, 29, 44, 0.9), rgba(10, 22, 35, 0.82)),
    linear-gradient(140deg, rgba(103, 186, 255, 0.08), rgba(103, 186, 255, 0) 58%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 34px -28px rgba(0, 0, 0, 0.58);
}

:root[data-theme="dark"] .settings-choice-card.segmented-btn:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 22px 40px -28px rgba(0, 0, 0, 0.66);
}

:root[data-theme="dark"] .settings-choice-card.segmented-btn-active {
  border-color: rgba(103, 186, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(19, 42, 64, 0.96), rgba(11, 30, 48, 0.88)),
    linear-gradient(140deg, rgba(103, 186, 255, 0.12), rgba(103, 186, 255, 0) 58%);
}

:root[data-theme="dark"] .settings-choice-label {
  color: var(--ink);
}

:root[data-theme="dark"] .settings-choice-note,
:root[data-theme="dark"] .settings-choice-group-note,
:root[data-theme="dark"] .settings-section-note,
:root[data-theme="dark"] .settings-safety-subtitle,
:root[data-theme="dark"] .settings-safety-description,
:root[data-theme="dark"] .settings-hero-description {
  color: var(--ink-muted);
}

:root[data-theme="dark"] .settings-choice-preview {
  border-color: rgba(101, 165, 220, 0.22);
  background:
    linear-gradient(180deg, rgba(16, 35, 54, 0.92), rgba(11, 24, 37, 0.84));
}

:root[data-theme="dark"] .settings-preview-line {
  background: rgba(103, 186, 255, 0.42);
}

:root[data-theme="dark"] .settings-preview-panel {
  border-color: rgba(101, 165, 220, 0.22);
  background:
    linear-gradient(180deg, rgba(22, 47, 71, 0.84), rgba(12, 31, 48, 0.74));
}

:root[data-theme="dark"] .settings-preview-orb {
  background: rgba(103, 186, 255, 0.18);
  box-shadow: 0 0 0 8px rgba(103, 186, 255, 0.08);
}

:root[data-theme="dark"] .settings-safety-toggle {
  border-color: rgba(101, 165, 220, 0.2);
  background:
    linear-gradient(180deg, rgba(14, 29, 44, 0.86), rgba(10, 22, 35, 0.78));
}

:root[data-theme="dark"] .bg-white\/80 {
  background-color: rgba(16, 33, 50, 0.78);
}

:root[data-theme="dark"] .bg-slate-100\/60 {
  background-color: rgba(18, 35, 53, 0.58);
}

:root[data-theme="dark"] .bg-slate-200\/40 {
  background-color: rgba(21, 40, 61, 0.44);
}

:root[data-theme="dark"] .border-slate-300 {
  border-color: rgba(101, 165, 220, 0.2);
}

:root[data-theme="dark"] .text-slate-400 {
  color: #88a4c2;
}

.recharts-responsive-container,
.recharts-wrapper {
  min-width: 0 !important;
}

.recharts-responsive-container {
  min-height: 240px !important;
}

.protocols-lab-upgraded {
  gap: 1.25rem;
}

.protocols-tab-bar {
  align-self: flex-start;
}

.protocols-tab-button {
  min-width: 148px;
}

.cell-lines-lab-upgraded {
  gap: 1rem;
}

.cell-lines-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.cell-lines-search-field {
  flex: 1 1 280px;
  min-width: 240px;
}

.cell-lines-search-input {
  min-width: 240px;
}

.cell-lines-button-new,
.cell-lines-button-refresh {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cell-lines-button-new {
  min-width: 154px;
  padding-inline: 1.25rem !important;
  letter-spacing: 0.14em;
}

.cell-lines-button-refresh {
  min-width: 108px;
}

.protocols-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.05rem 1.2rem;
  position: relative;
  overflow: hidden;
}

.protocols-hero-panel::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(26, 163, 125, 0.18), rgba(26, 163, 125, 0) 72%);
  pointer-events: none;
}

.protocols-hero-copy {
  display: grid;
  gap: 0.28rem;
  position: relative;
  z-index: 1;
}

.protocols-hero-title {
  margin: 0.15rem 0 0;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.protocols-hero-description {
  display: none;
  margin: 0;
  max-width: 62ch;
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.protocols-hero-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(156px, max-content);
  gap: 0.6rem;
  justify-content: flex-end;
  align-items: center;
  direction: ltr;
}

.protocols-hero-action {
  min-width: 156px;
}

.protocols-hero-action[data-protocol-target="library"] {
  order: 0;
}

.protocols-hero-action[data-protocol-target="authoring"] {
  order: 1;
}

.protocols-hero-import {
  order: 2;
}

.protocols-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem 1.15rem;
  align-items: start;
}

.protocols-detail-tag,
.protocols-detail-title,
.protocols-detail-meta {
  grid-column: 1;
  min-width: 0;
}

.protocols-detail-tag {
  justify-self: start;
  align-self: start;
  width: max-content;
  max-width: 100%;
}

.protocols-detail-title {
  margin: 0;
}

.protocols-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.protocols-detail-actions {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  grid-column: 2;
  grid-row: 1 / span 3;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 0.7rem;
  justify-self: end;
  align-items: start;
  justify-content: flex-end;
  direction: ltr;
  margin: 0 !important;
  transform: none !important;
  z-index: 1;
}

.protocols-detail-action {
  margin: 0 !important;
}

.protocols-detail-actions > button,
.protocols-detail-actions > .btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0 !important;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(166, 190, 215, 0.38);
  box-shadow: none;
}

.protocols-detail-actions > button svg,
.protocols-detail-actions > .btn svg {
  width: 16px;
  height: 16px;
}

.protocols-secondary-panel {
  margin-top: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(166, 190, 215, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(240, 247, 252, 0.44)),
    linear-gradient(125deg, rgba(13, 103, 198, 0.04), transparent 45%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 14px 28px -30px rgba(7, 31, 58, 0.2);
  overflow: hidden;
}

.protocols-secondary-panel > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.82rem 1rem;
  cursor: pointer;
  list-style: none;
}

.protocols-secondary-panel > summary::-webkit-details-marker {
  display: none;
}

.protocols-secondary-panel > summary::marker {
  display: none;
  content: "";
}

.protocols-secondary-panel[open] > summary {
  border-bottom: 1px solid rgba(166, 190, 215, 0.26);
}

.protocols-secondary-copy {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.protocols-secondary-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.protocols-secondary-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(166, 190, 215, 0.34);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.protocols-secondary-body {
  display: grid;
  gap: 0.85rem;
  padding: 0.95rem 1rem 1rem;
}

.protocols-authoring-note {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(166, 190, 215, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(237, 245, 251, 0.48));
}

.protocols-authoring-note p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.protocols-authoring-note-dot {
  width: 11px;
  height: 11px;
  margin-top: 0.32rem;
  flex: 0 0 11px;
  border-radius: 999px;
  background: rgba(26, 163, 125, 0.22);
  box-shadow: 0 0 0 7px rgba(26, 163, 125, 0.08);
}

.protocols-code-manager {
  grid-column: 1 / -1;
}

.protocols-code-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.protocols-code-panel-note {
  margin: 0;
  max-width: 56ch;
  color: var(--ink-muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.protocols-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 0.9rem;
  align-items: end;
}

.protocols-code-field {
  display: grid;
  gap: 0.45rem;
}

.protocols-code-field-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #61768d;
}

.protocols-code-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  justify-content: flex-end;
  align-items: end;
  gap: 0.65rem;
  direction: ltr;
}

.protocols-code-actions .btn {
  min-width: 144px;
}

.protocols-code-helper,
.protocols-code-status {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.6;
}

.protocols-code-helper {
  color: var(--ink-muted);
}

.protocols-code-status {
  min-height: 1.25rem;
  color: var(--ink-muted);
}

.protocols-code-status[data-tone="success"] {
  color: var(--success);
}

.protocols-code-status[data-tone="error"] {
  color: var(--danger);
}

.protocols-attachments-panel {
  grid-column: 1 / -1;
}

.protocols-attachments-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 1rem;
}

.protocols-attachments-note {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-muted);
  font-size: 0.79rem;
  line-height: 1.65;
}

.protocols-attachments-list {
  display: grid;
  gap: 0.75rem;
}

.protocols-attachments-empty {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px dashed rgba(166, 190, 215, 0.48);
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.protocols-attachment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(166, 190, 215, 0.34);
  background: rgba(255, 255, 255, 0.52);
}

.protocols-attachment-copy {
  min-width: 0;
}

.protocols-attachment-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.protocols-attachment-name {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.protocols-attachment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.4rem;
  color: var(--ink-muted);
  font-size: 0.74rem;
}

.protocols-attachment-link {
  min-width: 110px;
  justify-self: end;
}

.sop-import-open {
  overflow: hidden;
}

.sop-import-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.sop-import-modal.hidden {
  display: none;
}

.sop-import-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 18, 30, 0.48);
  backdrop-filter: blur(10px);
}

.sop-import-dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: min(92vh, 980px);
  overflow: auto;
  display: grid;
  gap: 1.15rem;
  padding: 1.35rem;
}

.sop-import-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 1rem;
}

.sop-import-header h2 {
  margin: 0.55rem 0 0;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.sop-import-description {
  margin: 0.6rem 0 0;
  max-width: 62ch;
  color: var(--ink-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.sop-import-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 0.75rem;
  justify-content: flex-start;
}

.sop-import-mode {
  min-height: 48px;
}

.sop-import-mode.is-active {
  border-color: rgba(13, 103, 198, 0.34);
  background: linear-gradient(180deg, rgba(13, 103, 198, 0.12), rgba(30, 141, 219, 0.08));
  color: var(--accent);
}

.sop-import-upload-card,
.sop-import-editor {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(166, 190, 215, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(237, 245, 251, 0.48));
}

.sop-import-upload-copy h3 {
  margin: 0.55rem 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.sop-import-upload-copy p:last-child {
  margin: 0.45rem 0 0;
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.sop-import-file-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px dashed rgba(125, 158, 192, 0.45);
  background: rgba(255, 255, 255, 0.46);
}

.sop-import-file-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sop-import-file-name {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
}

.sop-import-attachment-meta {
  min-height: 1rem;
}

.sop-import-attachment-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(166, 190, 215, 0.34);
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.sop-import-action-row,
.sop-import-footer {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
  direction: ltr;
}

.sop-import-action-row .btn,
.sop-import-footer .btn {
  min-width: 168px;
}

.sop-import-status {
  min-height: 1.25rem;
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.sop-import-status[data-tone="success"] {
  color: var(--success);
}

.sop-import-status[data-tone="error"] {
  color: var(--danger);
}

.sop-import-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.sop-import-field-grid--stack {
  align-items: start;
}

.sop-import-field {
  display: grid;
  gap: 0.45rem;
}

.sop-import-field span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #61768d;
}

.sop-import-field textarea {
  min-height: 120px;
  resize: vertical;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

@media (max-width: 768px) {
  body::before {
    background-size: 64px 64px, 64px 64px, auto, 140px 140px;
  }

  .glass-panel,
  .panel {
    border-radius: 18px;
  }

  .protocols-hero-panel {
    grid-template-columns: 1fr;
  }

  .cell-lines-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .cell-lines-search-field,
  .cell-lines-search-input,
  .cell-lines-button-new,
  .cell-lines-button-refresh {
    width: 100%;
    min-width: 0;
  }

  .protocols-hero-actions {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .protocols-hero-action {
    width: 100%;
    min-width: 0;
  }

  .protocols-detail-header,
  .protocols-code-row {
    grid-template-columns: 1fr;
  }

  .protocols-code-actions {
    grid-auto-flow: row;
    justify-content: stretch;
  }

  .protocols-code-actions .btn {
    width: 100%;
  }

  .protocols-detail-actions,
  .protocols-attachments-head,
  .sop-import-header {
    grid-template-columns: 1fr;
  }

  .protocols-detail-actions {
    grid-column: 1;
    grid-row: auto;
    grid-auto-flow: row;
    justify-content: stretch;
  }

  .protocols-attachment-item,
  .sop-import-action-row,
  .sop-import-footer {
    align-items: stretch;
  }

  .protocols-attachment-item {
    grid-template-columns: 1fr;
  }

  .sop-import-action-row,
  .sop-import-footer {
    grid-auto-flow: row;
    justify-content: stretch;
  }

  .protocols-attachment-link,
  .protocols-detail-actions .btn,
  .sop-import-action-row .btn,
  .sop-import-footer .btn {
    width: 100%;
    min-width: 0;
  }

  .sop-import-dialog {
    padding: 1rem;
  }

  .sop-import-mode-grid,
  .sop-import-field-grid {
    grid-template-columns: 1fr;
  }
}

:root[data-theme="dark"] .protocols-hero-panel::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(54, 191, 151, 0.14), rgba(54, 191, 151, 0) 72%);
}

:root[data-theme="dark"] .protocols-hero-description,
:root[data-theme="dark"] .protocols-authoring-note p {
  color: var(--ink-muted);
}

:root[data-theme="dark"] .protocols-authoring-note {
  border-color: rgba(101, 165, 220, 0.2);
  background:
    linear-gradient(180deg, rgba(14, 29, 44, 0.86), rgba(10, 22, 35, 0.78));
}

:root[data-theme="dark"] .protocols-authoring-note-dot {
  background: rgba(54, 191, 151, 0.2);
  box-shadow: 0 0 0 7px rgba(54, 191, 151, 0.08);
}

:root[data-theme="dark"] .protocols-code-manager {
  border-color: rgba(101, 165, 220, 0.18);
}

:root[data-theme="dark"] .protocols-code-panel-note,
:root[data-theme="dark"] .protocols-code-helper,
:root[data-theme="dark"] .protocols-code-status {
  color: var(--ink-muted);
}

:root[data-theme="dark"] .protocols-attachments-panel,
:root[data-theme="dark"] .sop-import-upload-card,
:root[data-theme="dark"] .sop-import-editor {
  border-color: rgba(101, 165, 220, 0.2);
  background:
    linear-gradient(180deg, rgba(14, 29, 44, 0.86), rgba(10, 22, 35, 0.78)),
    linear-gradient(125deg, rgba(103, 186, 255, 0.08), transparent 46%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 22px 42px -32px rgba(0, 0, 0, 0.46);
}

:root[data-theme="dark"] .protocols-secondary-panel {
  border-color: rgba(101, 165, 220, 0.18);
  background:
    linear-gradient(180deg, rgba(14, 29, 44, 0.8), rgba(10, 22, 35, 0.72)),
    linear-gradient(125deg, rgba(103, 186, 255, 0.07), transparent 46%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 30px -30px rgba(0, 0, 0, 0.42);
}

:root[data-theme="dark"] .protocols-secondary-panel[open] > summary {
  border-bottom-color: rgba(101, 165, 220, 0.18);
}

:root[data-theme="dark"] .protocols-secondary-value {
  border-color: rgba(101, 165, 220, 0.22);
  background: rgba(12, 28, 42, 0.58);
  color: var(--ink-soft);
}

:root[data-theme="dark"] .protocols-detail-actions > button,
:root[data-theme="dark"] .protocols-detail-actions > .btn {
  border-color: rgba(101, 165, 220, 0.22);
  background: rgba(12, 28, 42, 0.58);
}

:root[data-theme="dark"] .protocols-attachments-note,
:root[data-theme="dark"] .protocols-attachment-meta,
:root[data-theme="dark"] .sop-import-description,
:root[data-theme="dark"] .sop-import-upload-copy p:last-child,
:root[data-theme="dark"] .sop-import-status {
  color: var(--ink-muted);
}

:root[data-theme="dark"] .protocols-attachment-item,
:root[data-theme="dark"] .sop-import-file-picker,
:root[data-theme="dark"] .sop-import-attachment-pill {
  border-color: rgba(101, 165, 220, 0.22);
  background: rgba(12, 28, 42, 0.58);
}

:root[data-theme="dark"] .protocols-attachments-empty {
  border-color: rgba(101, 165, 220, 0.26);
}
