:root {
  color-scheme: dark;
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  --bg: #050806;
  --bg-soft: #080d09;
  --panel: rgba(7, 12, 8, 0.94);
  --panel-strong: rgba(4, 8, 5, 0.98);
  --panel-active: rgba(45, 92, 22, 0.18);
  --neon: #8cff32;
  --neon-bright: #9dff45;
  --neon-deep: #4f9f21;
  --neon-border: rgba(140, 255, 50, 0.36);
  --neon-border-strong: rgba(140, 255, 50, 0.68);
  --text: #f2f6f0;
  --muted: #abb7aa;
  --muted-2: #7f8b7d;
  --line: rgba(140, 255, 50, 0.16);
  --danger: #ff5d5d;
  --warning: #e4bf48;
  --success: #8cff32;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.44);
  --glow-soft: 0 0 18px rgba(140, 255, 50, 0.14);
  --glow: 0 0 18px rgba(140, 255, 50, 0.25), 0 0 34px rgba(140, 255, 50, 0.09);
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -8%, rgba(88, 187, 35, 0.12), transparent 34rem),
    linear-gradient(90deg, transparent 24.85%, rgba(140, 255, 50, 0.025) 25%, transparent 25.15%, transparent 49.85%, rgba(140, 255, 50, 0.02) 50%, transparent 50.15%, transparent 74.85%, rgba(140, 255, 50, 0.025) 75%, transparent 75.15%),
    linear-gradient(180deg, #030504 0%, #071008 47%, #040705 100%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .55;
  background-image:
    linear-gradient(rgba(140,255,50,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,255,50,.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 82%);
}

::selection { background: rgba(140, 255, 50, .28); color: #fff; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}

.shell { width: min(1180px, 94vw); margin: 54px auto 72px; }

.entalek-return-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.entalek-return-link {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border: 1px solid var(--neon-border-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 31, 13, .98), rgba(5, 12, 6, .98));
  color: var(--neon-bright);
  text-decoration: none;
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 900;
  line-height: 1.5;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), var(--glow-soft);
  transition: filter .18s ease, box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.entalek-return-link:hover {
  filter: brightness(1.10);
  border-color: var(--neon);
  box-shadow: 0 0 20px rgba(140,255,50,.24), 0 0 40px rgba(140,255,50,.08);
  transform: translateY(-1px);
}
.entalek-return-link:active { transform: translateY(0); }

.hero {
  position: relative;
  min-height: 230px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 24px;
  padding: 42px 120px;
  overflow: hidden;
  border: 1px solid rgba(140, 255, 50, .24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 25%, rgba(91, 194, 35, .14), transparent 48%),
    linear-gradient(145deg, rgba(8,15,9,.97), rgba(3,7,4,.98));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.025), var(--glow-soft);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(140,255,50,.026) 50%, transparent);
}
.hero > div { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 12px;
  color: #c4d3bf;
  font-weight: 700;
  letter-spacing: .08em;
  direction: ltr;
  font-size: .9rem;
}
h1 {
  margin: 4px 0 12px;
  color: var(--neon-bright);
  font-size: clamp(2.35rem, 6vw, 4.65rem);
  line-height: 1.1;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(140,255,50,.55), 0 0 30px rgba(140,255,50,.26);
}
.hero p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.8; }
.version {
  position: absolute;
  inset-inline-end: 28px;
  top: 28px;
  z-index: 2;
  min-width: 82px;
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 12px 16px;
  border: 1px solid var(--neon-border);
  border-radius: 18px;
  background: rgba(3, 8, 4, .86);
  color: var(--neon);
  font-size: 1.12rem;
  font-weight: 900;
  direction: ltr;
  box-shadow: inset 0 0 20px rgba(140,255,50,.035), var(--glow-soft);
}

.panel {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(7,12,8,.97), rgba(4,8,5,.96));
  box-shadow: 0 16px 42px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.018);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.panel:hover { border-color: rgba(140,255,50,.27); box-shadow: 0 18px 48px rgba(0,0,0,.34), var(--glow-soft); }
.panel-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.panel h2, .panel h3 { color: #f5f8f3; }
.panel h2 { margin: 0 0 8px; font-size: clamp(1.2rem, 2vw, 1.48rem); font-weight: 900; }
.panel h3 { margin: 0; font-weight: 800; }
.panel p { margin: 0; line-height: 1.85; color: var(--muted); }
.compact { padding-block: 22px; }

button,
form button,
#refresh,
.workspace-actions button {
  border: 1px solid var(--neon-border-strong);
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--neon-bright), #78e728);
  color: #071006;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(140,255,50,.15), inset 0 1px 0 rgba(255,255,255,.30);
  transition: filter .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
button:hover:not(:disabled), form button:hover:not(:disabled), #refresh:hover:not(:disabled), .workspace-actions button:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 0 18px rgba(140,255,50,.27), 0 0 34px rgba(140,255,50,.08);
}
button:active:not(:disabled) { filter: brightness(.96); }
button:disabled {
  cursor: not-allowed;
  border-color: rgba(160,170,160,.18) !important;
  background: #252b26 !important;
  color: #747d73 !important;
  box-shadow: none !important;
  filter: none !important;
}
.secondary,
.workspace-actions button:not(.primary) {
  margin-top: 12px;
  border-color: rgba(140,255,50,.30);
  background: rgba(8,15,9,.96);
  color: var(--neon);
  box-shadow: none;
}
.flow-actions .secondary { margin-top: 0; }
.secondary:hover:not(:disabled), .workspace-actions button:not(.primary):hover:not(:disabled) {
  border-color: rgba(140,255,50,.66);
  background: rgba(31,65,15,.34);
  box-shadow: var(--glow-soft);
}
#flow-cancel { border-color: rgba(255,93,93,.48); color: #ff8a8a; }
#flow-cancel:hover:not(:disabled) { background: rgba(110,24,24,.24); box-shadow: 0 0 16px rgba(255,93,93,.12); }

input, select, textarea {
  min-width: 0;
  border: 1px solid rgba(140,255,50,.22);
  border-radius: 12px;
  padding: 11px 13px;
  background: rgba(3,8,4,.88);
  color: var(--text);
  caret-color: var(--neon);
  box-shadow: inset 0 1px 10px rgba(0,0,0,.24);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
input::placeholder, textarea::placeholder { color: #778175; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: rgba(140,255,50,.36); }
input:focus, select:focus, textarea:focus {
  border-color: var(--neon-border-strong);
  background: rgba(5,12,6,.98);
  box-shadow: 0 0 0 3px rgba(140,255,50,.07), 0 0 16px rgba(140,255,50,.08);
  outline: none;
}
select { color-scheme: dark; }
input[type="file"] { padding: 8px; }
input[type="file"]::file-selector-button {
  margin-inline-end: 10px;
  border: 1px solid rgba(140,255,50,.38);
  border-radius: 9px;
  padding: 7px 11px;
  background: #101b10;
  color: var(--neon);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
input[type="checkbox"] { accent-color: var(--neon-deep); }

.inline-form, .term-form { display: grid; gap: 12px; margin-top: 18px; }
.inline-form { grid-template-columns: 1fr auto; }
.term-form { grid-template-columns: 1fr 1fr; }
.term-form button { grid-column: 1 / -1; }
.auth-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; margin-top: 18px; }
.check { display: flex; align-items: center; gap: 8px; padding: 10px; color: #dce5d9; }

.status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.status-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(140,255,50,.18);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  background: rgba(2,7,3,.62);
}
.status-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: rgba(140,255,50,.58);
  box-shadow: 0 0 10px rgba(140,255,50,.42);
}
.status-card span { color: var(--muted-2); font-size: .92rem; }
.status-card strong { font-size: 1.12rem; font-weight: 900; }
.good { color: var(--success) !important; text-shadow: 0 0 12px rgba(140,255,50,.20); }
.bad { color: var(--danger) !important; }
.warn { color: var(--warning) !important; }
.detail { margin-top: 18px !important; padding-top: 18px; border-top: 1px solid var(--line); }

.list { display: grid; gap: 10px; margin-top: 18px; }
.row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border: 1px solid rgba(140,255,50,.17);
  border-radius: 14px;
  background: rgba(4,9,5,.66);
}
.row:hover { border-color: rgba(140,255,50,.31); background: rgba(12,24,9,.76); }
.row code { direction: ltr; font-size: .78rem; color: #a7b3a4; overflow-wrap: anywhere; }
.pill {
  border: 1px solid rgba(140,255,50,.28);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(49,103,24,.22);
  color: var(--neon);
  font-size: .8rem;
  font-weight: 800;
}

.e2e-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.flow-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.flow-current {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(140,255,50,.14);
  border-radius: 12px;
  background: rgba(2,7,3,.50);
  color: var(--muted);
}
.flow-current code { direction: ltr; overflow-wrap: anywhere; color: var(--neon); font-weight: 800; }
.flow-progress {
  white-space: pre-wrap;
  direction: ltr;
  text-align: left;
  margin: 14px 0 0;
  max-height: 300px;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(140,255,50,.18);
  border-radius: 12px;
  background: #020503;
  color: #c8d3c5;
  box-shadow: inset 0 0 28px rgba(0,0,0,.38);
}
.assisted-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(140,255,50,.28);
  border-radius: 14px;
  background: rgba(30,60,16,.10);
}
.assisted-box textarea { width: 100%; min-height: 150px; margin-top: 10px; direction: ltr; text-align: left; }

.workspace-tools { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 10px; margin-top: 18px; }
.replace-tools { grid-template-columns: 1fr 1fr auto auto; }
.workspace-list { display: grid; gap: 16px; margin-top: 18px; }
.workspace-item {
  border: 1px solid rgba(140,255,50,.18);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
  background: rgba(3,8,4,.70);
}
.workspace-item:hover { border-color: rgba(140,255,50,.33); box-shadow: var(--glow-soft); }
.workspace-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted-2); font-size: .85rem; direction: ltr; }
.workspace-meta code { color: var(--neon); }
.workspace-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.workspace-column { display: grid; gap: 7px; color: #dfe7dd; }
.workspace-column textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  line-height: 1.7;
  border: 1px solid rgba(140,255,50,.21);
  border-radius: 12px;
  padding: 12px;
}
.workspace-column textarea[readonly] { background: #050806; color: #b8c4b5; }
.workspace-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.workspace-actions button { margin-top: 0; }
.workspace-actions button.primary { background: linear-gradient(180deg, var(--neon-bright), #78e728); color: #071006; }
.workspace-diff {
  margin: 0;
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(228,191,72,.26);
  border-radius: 12px;
  padding: 12px;
  background: #070905;
  color: #e6d99c;
  white-space: pre-wrap;
}

.security-check {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(140,255,50,.16);
  border-radius: 12px;
  background: rgba(3,8,4,.58);
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #030604; }
::-webkit-scrollbar-thumb { background: #244516; border: 2px solid #030604; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #376c1d; }
* { scrollbar-color: #244516 #030604; scrollbar-width: thin; }

@media (max-width: 900px) {
  .shell { width: min(94vw, 900px); margin-top: 28px; }
  .hero { padding-inline: 32px; padding-top: 88px; }
  .version { inset-inline-end: 22px; top: 20px; min-height: 58px; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .e2e-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .shell { width: min(94vw, 680px); margin-bottom: 42px; }
  .entalek-return-nav { grid-template-columns: 1fr; gap: 10px; }
  .entalek-return-link { min-height: 54px; padding: 12px 16px; }
  .hero { min-height: auto; padding: 78px 20px 32px; border-radius: 22px; }
  h1 { font-size: clamp(2rem, 11vw, 3.3rem); }
  .version { inset-inline-end: 16px; top: 16px; min-width: 72px; min-height: 48px; border-radius: 13px; font-size: .92rem; }
  .panel { padding: 21px 18px; border-radius: 17px; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .panel-head > button { width: 100%; margin-top: 0; }
  .status-grid, .e2e-grid, .inline-form, .term-form, .auth-form, .workspace-tools, .replace-tools, .workspace-columns, .flow-current { grid-template-columns: 1fr; }
  .term-form button { grid-column: auto; }
  .row { align-items: flex-start; flex-direction: column; }
  .flow-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .flow-actions button { width: 100%; }
}

@media (max-width: 440px) {
  .shell { width: 94vw; margin-top: 16px; }
  .hero { padding-inline: 14px; }
  .status-grid, .flow-actions { grid-template-columns: 1fr; }
  .panel { padding: 18px 14px; }
  button, form button, #refresh { width: 100%; }
  .workspace-actions button { width: auto; flex: 1 1 46%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

#brand-logo{max-width:72px;max-height:72px;object-fit:contain}.brand-heading{display:flex;gap:14px;align-items:center}
