:root {
  color: #17211d;
  background: #f5f7f6;
  font-family:
    "League Spartan", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f5f7f6;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid #cbd7d3;
  border-radius: 6px;
  padding: 8px 13px;
  color: #17211d;
  background: #fff;
  cursor: pointer;
}

button:hover {
  border-color: #9fb4ae;
}

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

.hidden {
  display: none !important;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(480px, 1fr);
  min-height: 100vh;
  background: #fff;
}

.login-media {
  min-height: 100vh;
  overflow: hidden;
  background: #dcece8;
}

.login-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px;
  background: #f8fbfa;
}

.glass-effect-LoginContainer .login-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.login-card {
  width: 510px;
  min-height: 400px;
  padding: 34px 40px 30px;
}

.login-card h1 {
  margin: 0 0 48px;
  color: #000;
  font-size: 30px;
  font-weight: 500;
  line-height: 0.92;
}

.login-field {
  display: block;
  margin-bottom: 42px;
}

.login-field span:first-child {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-size: 14px;
  font-weight: 600;
}

.login-field input {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.42);
  border-radius: 0;
  padding: 4px 0 6px;
  color: #111827;
  background: transparent;
  outline: none;
}

.login-field input:focus {
  border-bottom-color: #7cc1b7;
  box-shadow: 0 1px 0 #7cc1b7;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: -8px;
  bottom: 0;
  display: grid;
  width: 38px;
  min-height: 34px;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #4b5563;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.forgot-password {
  display: block;
  width: max-content;
  min-height: auto;
  margin: -28px 0 0 auto;
  border: 0;
  padding: 0;
  color: #ff8f00;
  font-size: 16px;
  font-weight: 600;
  background: transparent;
}

.login-error {
  margin-top: 18px;
  color: #ef4444;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.login-actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.login-submit,
button.primary {
  border-color: #7cc1b7;
  color: #fff;
  font-weight: 700;
  background: #7cc1b7;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.login-submit {
  width: 200px;
  border-radius: 24px;
}

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 100vh;
  max-width: 1920px;
  margin: 0 auto;
  padding: 18px;
  gap: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #dfe8e4;
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(23, 33, 29, 0.05);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: #235046;
}

.eyebrow {
  margin: 0 0 4px;
  color: #6b7a74;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  color: #17211d;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.topbar p:not(.eyebrow) {
  margin: 6px 0 0;
  color: #52625a;
  font-size: 14px;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #52625a;
  font-size: 13px;
  font-weight: 700;
}

.logout-button {
  min-height: 32px;
  border-color: #d5e0dc;
  padding: 5px 12px;
  color: #235046;
  font-size: 12px;
  font-weight: 800;
  background: #fff;
}

.status-pill {
  min-width: 112px;
  border: 1px solid #cdd8d2;
  border-radius: 999px;
  padding: 7px 12px;
  color: #52625a;
  text-align: center;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  background: #fff;
}

.status-pill.running {
  color: #7c4a00;
  border-color: #e9c46a;
  background: #fff8df;
}

.status-pill.passed {
  color: #12613a;
  border-color: #8fd0ad;
  background: #e8f7ef;
}

.status-pill.failed,
.status-pill.cancelled {
  color: #9b1c1c;
  border-color: #f2aaa7;
  background: #fff0ef;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 350px) minmax(0, 1fr);
  gap: 16px;
  height: clamp(560px, calc(100dvh - 150px), 900px);
  min-height: 0;
}

.control-panel,
.browser-panel,
.log-panel,
.results-bar,
.failure-panel {
  border: 1px solid #dfe8e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(23, 33, 29, 0.05);
}

.control-panel {
  height: 100%;
  padding: 16px;
  overflow: auto;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  color: #17211d;
  font-size: 18px;
  font-weight: 700;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.field span,
.command-preview span {
  color: #52625a;
  font-size: 13px;
  font-weight: 700;
}

.field select,
.field input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cad7d0;
  border-radius: 6px;
  padding: 8px 10px;
  color: #17211d;
  background: #fff;
}

.field select:focus,
.field input:focus {
  border-color: #7cc1b7;
  outline: 3px solid rgba(124, 193, 183, 0.18);
}

.workflow-steps {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  border: 1px solid #dfe8e4;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
}

.workflow-steps-header {
  display: grid;
  gap: 4px;
}

.workflow-steps-header span {
  color: #52625a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workflow-steps-header strong {
  color: #17211d;
  font-size: 14px;
  line-height: 1.25;
}

.workflow-steps-list {
  color: #52625a;
  font-size: 13px;
  line-height: 1.45;
}

.workflow-step-group + .workflow-step-group {
  margin-top: 12px;
}

.workflow-step-group h3 {
  margin: 0 0 8px;
  color: #235046;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workflow-step-group ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.workflow-step-group li {
  padding-left: 2px;
  color: #17211d;
}

.workflow-step-group li::marker {
  color: #7cc1b7;
  font-weight: 800;
}

.step-keyword {
  display: inline-block;
  min-width: 44px;
  margin-right: 6px;
  color: #52625a;
  font-weight: 800;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 16px;
  color: #17211d;
  font-size: 14px;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: #7cc1b7;
}

.command-preview {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.command-preview code {
  display: block;
  min-height: 58px;
  max-height: 112px;
  overflow: auto;
  border-radius: 6px;
  padding: 10px;
  color: #d9fbe8;
  background: #111b16;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.error-box {
  border: 1px solid #f2aaa7;
  border-radius: 6px;
  padding: 10px;
  color: #9b1c1c;
  background: #fff0ef;
  font-size: 13px;
}

.feature-meta {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: #52625a;
  font-size: 13px;
}

.feature-meta strong {
  color: #17211d;
  word-break: break-word;
}

.run-panel {
  display: grid;
  grid-template-rows: minmax(0, 1.65fr) minmax(180px, 0.55fr);
  gap: 16px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e3ebe7;
  padding: 11px 14px;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.panel-actions button {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 12px;
}

.panel-header h2 {
  margin: 0;
  color: #17211d;
  font-size: 16px;
  font-weight: 700;
}

.panel-header span {
  min-width: 0;
  overflow: hidden;
  color: #66766e;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-panel,
.log-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.browser-panel {
  background: #0f1714;
}

.browser-panel .panel-header {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  background: #fff;
}

.browser-frame,
.browser-frame iframe,
.chrome-stream,
.chrome-stream img {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}

.chrome-stream {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  contain: layout paint;
  overflow: hidden;
  background: #0f1714;
}

.chrome-stream img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}

.browser-placeholder {
  display: grid;
  place-content: center;
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 28px;
  color: #aebdb7;
  text-align: center;
  background: #0f1714;
}

.browser-placeholder strong {
  color: #fff;
  font-size: 16px;
}

.browser-placeholder span {
  font-size: 14px;
}

.browser-panel.expanded-preview {
  position: fixed;
  inset: 12px;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 0;
}

.browser-panel.expanded-preview .browser-frame,
.browser-panel.expanded-preview .browser-frame iframe,
.browser-panel.expanded-preview .chrome-stream,
.browser-panel.expanded-preview .chrome-stream img,
.browser-panel:fullscreen .browser-frame,
.browser-panel:fullscreen .browser-frame iframe,
.browser-panel:fullscreen .chrome-stream,
.browser-panel:fullscreen .chrome-stream img {
  height: 100%;
}

.browser-panel:fullscreen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #0f1714;
}

.log-panel pre {
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: auto;
  padding: 13px 14px;
  color: #d9fbe8;
  background: #111b16;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.log-panel .stderr {
  color: #ffb7b2;
}

.log-panel .system {
  color: #9dd6ff;
}

.log-panel .browser {
  color: #f8d98b;
}

.results-bar {
  display: grid;
  grid-template-columns: repeat(8, minmax(108px, 1fr)) minmax(150px, auto);
  gap: 10px;
  padding: 12px;
}

.result-card {
  display: grid;
  gap: 5px;
  border: 1px solid #e1e9e6;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdfc;
}

.result-card span {
  color: #66766e;
  font-size: 12px;
  font-weight: 700;
}

.result-card strong {
  color: #17211d;
  font-size: 18px;
  line-height: 1.1;
}

.success-card {
  border-color: #acd9bf;
  background: #f0faf4;
}

.success-card strong {
  color: #12613a;
}

.failure-card {
  border-color: #f2aaa7;
  background: #fff8f7;
}

.failure-card strong {
  color: #9b1c1c;
}

.skipped-card {
  border-color: #e9c46a;
  background: #fffaf0;
}

.skipped-card strong {
  color: #7c4a00;
}

.artifact-links {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.artifact-links a {
  border: 1px solid #7cc1b7;
  border-radius: 8px;
  padding: 10px 14px;
  color: #235046;
  font-weight: 800;
  text-decoration: none;
  background: #eef8f6;
}

.failure-panel {
  overflow: hidden;
}

#failure-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.failure-item {
  display: grid;
  gap: 8px;
  border: 1px solid #f2aaa7;
  border-radius: 6px;
  padding: 12px;
  background: #fff8f7;
}

.failure-item strong {
  color: #9b1c1c;
}

.failure-item span {
  color: #52625a;
}

.failure-item pre {
  margin: 0;
  overflow: auto;
  color: #611111;
  white-space: pre-wrap;
}

@media (max-width: 1100px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-media {
    display: none;
  }

  .login-pane {
    padding: 24px;
  }

  .workspace {
    grid-template-columns: 1fr;
    height: auto;
  }

  .run-panel {
    grid-template-rows: minmax(0, 1.65fr) minmax(180px, 0.55fr);
    height: clamp(560px, calc(100dvh - 110px), 820px);
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
  }

  .topbar,
  .topbar-status,
  .panel-header,
  .results-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .login-card {
    width: min(100%, 510px);
    padding: 30px 24px;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .run-panel {
    height: clamp(520px, calc(100dvh - 88px), 720px);
  }

  .artifact-links {
    justify-content: flex-start;
  }
}
