:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --border-color: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --accent-blue: #58a6ff;
  --verdict-pass: #3fb950;
  --verdict-fail: #f85149;
  --verdict-running: #d29922;
  --verdict-error: #d29922;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* Global Navigation */
.global-nav {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  position: relative;
  z-index: 200;
}

.global-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.global-nav-brand {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.global-nav-brand:hover {
  color: var(--accent-blue);
}

.global-nav-links {
  display: flex;
  gap: 8px;
}

.global-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  transition: color 0.15s, background-color 0.15s;
}

.global-nav-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

.global-nav-link.active {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.dashboard-header {
  margin-bottom: 24px;
}

.dashboard-header h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.dashboard-header .breadcrumb {
  color: var(--text-secondary);
  font-weight: 400;
}

.runs-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.runs-table th,
.runs-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  vertical-align: middle;
}

.runs-table th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.runs-table tbody tr:last-child td {
  border-bottom: none;
}

.runs-table tbody tr:hover {
  background-color: var(--bg-tertiary);
}

.run-id {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--accent-blue);
}

.run-started {
  color: var(--text-secondary);
  font-size: 14px;
}

.run-info a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--accent-blue);
  text-decoration: none;
}

.run-info a:hover .run-id {
  text-decoration: underline;
}

.run-scenario-count {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: inherit;
}

.run-scenarios {
  max-width: 300px;
}

.run-scenario-name {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.verdict {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
}

.verdict-pass {
  background-color: rgba(63, 185, 80, 0.15);
  color: var(--verdict-pass);
}

.verdict-fail {
  background-color: rgba(248, 81, 73, 0.15);
  color: var(--verdict-fail);
}

.verdict-running {
  background-color: rgba(210, 153, 34, 0.15);
  color: var(--verdict-running);
}

.verdict-error {
  background-color: rgba(210, 153, 34, 0.15);
  color: var(--verdict-error);
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  padding: 48px 16px;
}

.empty-state a,
.empty-state-link {
  color: var(--accent-blue);
  text-decoration: none;
}

.empty-state a:hover,
.empty-state-link:hover {
  text-decoration: underline;
}

/* Links */
.run-id a {
  color: var(--accent-blue);
  text-decoration: none;
}

.run-id a:hover {
  text-decoration: underline;
}

.header-link {
  color: var(--text-primary);
  text-decoration: none;
}

.header-link:hover {
  color: var(--accent-blue);
}

/* Run Detail */
.run-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
  padding: 16px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-item-right-align {
  text-align: right;
}

.summary-item-action {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.summary-item .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.summary-item .value {
  font-size: 14px;
}

.summary-item .value a {
  color: var(--accent-blue);
  text-decoration: none;
}

.summary-item .value a:hover {
  text-decoration: underline;
}

.summary-item .mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.scenario-name {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

.scenario-name a {
  color: var(--accent-blue);
  text-decoration: none;
}

.scenario-name a:hover {
  text-decoration: underline;
}

/* Expectations */
.expectations-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.expectation-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.expectation-item:last-child {
  border-bottom: none;
}

.expectation-status {
  font-size: 14px;
  width: 20px;
  flex-shrink: 0;
}

.expectation-item.met .expectation-status {
  color: var(--verdict-pass);
}

.expectation-item.unmet .expectation-status {
  color: var(--text-secondary);
}

.expectation-text {
  font-size: 14px;
}

/* Steps Panel Layout */
.steps-panel-layout {
  display: flex;
  gap: 24px;
}

.steps-panel-layout .steps-list {
  flex: 0 0 30%;
  max-width: 30%;
  font-size: 60%;
}

.screenshot-panel {
  flex: 1;
  position: sticky;
  top: 24px;
  align-self: flex-start;
}

.screenshot-large {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.screenshot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Steps */
.steps-list {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.step-item {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.step-item:hover {
  background-color: var(--bg-tertiary);
}

.step-item.active {
  background-color: var(--bg-tertiary);
  border-left: 3px solid var(--accent-blue);
  padding-left: 13px;
}

.step-item:last-child {
  border-bottom: none;
}

.step-indicator {
  font-size: 14px;
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}

.step-indicator.pass {
  color: var(--verdict-pass);
}

.step-indicator.fail {
  color: var(--verdict-fail);
}

.step-index {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-secondary);
  width: 24px;
  flex-shrink: 0;
  text-align: right;
}

.step-content {
  flex: 1;
}

.step-action {
  display: block;
}

.action-type {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
}

.action-detail {
  font-size: 13px;
  color: var(--text-secondary);
}

.element-meta {
  font-size: 12px;
  color: var(--text-muted, #888);
  font-style: italic;
}

.step-reason {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-primary);
  padding: 12px 16px;
  background-color: var(--bg-tertiary);
  border-radius: 4px;
}

/* Verdict Box */
.verdict-box {
  margin-top: 24px;
  padding: 16px 20px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.verdict-box-pass {
  border-left: 4px solid var(--verdict-pass);
}

.verdict-box-fail {
  border-left: 4px solid var(--verdict-fail);
}

.verdict-box-error {
  border-left: 4px solid var(--verdict-error);
}

.verdict-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.verdict-indicator {
  font-size: 18px;
}

.verdict-indicator.pass {
  color: var(--verdict-pass);
}

.verdict-indicator.fail {
  color: var(--verdict-fail);
}

.verdict-indicator.error {
  color: var(--verdict-error);
}

.verdict-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-blue);
}

.verdict-reason {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.verdict-reason p {
  margin: 0 0 8px 0;
}

.verdict-reason p:last-child {
  margin-bottom: 0;
}

.step-reason p {
  margin: 0 0 4px 0;
}

.step-reason p:last-child {
  margin-bottom: 0;
}

/* Video player */
.video-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
}

.scenario-video {
  max-width: 50%;
  height: auto;
  border-radius: 4px;
}

/* Video jump-to-section buttons */
.video-jump-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.video-jump-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.video-jump-btn {
  padding: 4px 10px;
  font-size: 13px;
  font-family: inherit;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
}

.video-jump-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

/* Instructions and Expectations Row */
.instructions-expectations-row {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.instructions-column {
  flex: 1 1 40%;
  min-width: 250px;
}

.expectations-column {
  flex: 1 1 60%;
  min-width: 300px;
}

.instructions-column .instructions-box,
.instructions-column .instructions-list,
.expectations-column .expectations-list {
  margin-bottom: 0;
}

/* Instructions List */
.instructions-list {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 16px 8px 40px;
  margin: 0 0 24px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  list-style-position: outside;
}

.instruction-item {
  padding: 1px 0;
  padding-left: 8px;
}

.instruction-item::marker {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Legacy Instructions Box */
.instructions-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.instructions-box p {
  margin: 0 0 8px 0;
}

.instructions-box p:last-child {
  margin-bottom: 0;
}

/* Setups Section (scenario run view) */
.setups-section {
  margin-bottom: 16px;
}

.setups-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Header Navigation */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-nav {
  display: flex;
  gap: 16px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: color 0.15s, background-color 0.15s;
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header .section-title {
  margin: 0;
}

.section-header .header-actions {
  display: flex;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
  background-color: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.btn-primary:hover {
  background-color: #4393e6;
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
}

/* Action Links */
.scenario-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scenario-actions form {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.action-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  vertical-align: baseline;
  font-family: inherit;
}

.action-link:hover {
  text-decoration: underline;
}

/* Inline forms for button_to action icons */
.website-actions form,
.scenario-actions form {
  display: inline;
}

.action-icon {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  font-family: inherit;
  transition: color 0.15s;
}

.action-icon:hover {
  color: #79b8ff;
}

.action-icon.action-delete {
  color: var(--verdict-fail);
}

.action-icon.action-delete:hover {
  color: #ff6b6b;
}

.action-delete {
  color: var(--verdict-fail);
}

.action-icon.action-run {
  color: var(--verdict-pass);
}

.action-icon.action-run:hover {
  color: #5fff5f;
}

/* Flash Messages */
.flash {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

.flash-notice {
  background-color: rgba(63, 185, 80, 0.15);
  color: var(--verdict-pass);
  border: 1px solid var(--verdict-pass);
}

.flash-alert {
  background-color: rgba(248, 81, 73, 0.15);
  color: var(--verdict-fail);
  border: 1px solid var(--verdict-fail);
}

/* Form Styles */
.form-container {
  max-width: 700px;
}

.definition-form {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 24px;
}

.form-errors {
  background-color: rgba(248, 81, 73, 0.15);
  border: 1px solid var(--verdict-fail);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 24px;
  color: var(--verdict-fail);
}

.form-errors h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
}

.form-errors ul {
  margin: 0;
  padding-left: 20px;
}

.form-errors li {
  font-size: 13px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.form-input-small {
  width: 120px;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* Table URL column */
.scenario-url {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Credentials Layout */
.credentials-layout {
  display: flex;
  gap: 24px;
  min-height: calc(100vh - 150px);
}

.credentials-sidebar {
  flex: 0 0 250px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.folder-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.folder-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.15s;
}

.folder-nav-item:hover {
  background-color: var(--bg-tertiary);
}

.folder-nav-item.active {
  background-color: var(--bg-tertiary);
  border-left: 3px solid var(--accent-blue);
  padding-left: 13px;
}

.folder-icon {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  color: var(--text-secondary);
  width: 16px;
  text-align: center;
}

.folder-name {
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-count {
  font-size: 12px;
  color: var(--text-secondary);
  background-color: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 10px;
}

.folder-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 8px 16px;
}

.folder-nav-item-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

.folder-nav-item-wrapper .folder-nav-item {
  flex: 1;
}

.folder-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  color: var(--text-primary);
  text-decoration: none;
}

.folder-actions {
  display: none;
  gap: 4px;
}

.folder-actions-left {
  padding-left: 8px;
  order: -1;
}

.folder-actions-right {
  padding-right: 8px;
}

.folder-nav-item-wrapper:hover .folder-actions {
  display: flex;
}

.folder-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 11px;
  border-radius: 4px;
  transition: background-color 0.15s, color 0.15s;
}

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

.folder-action-delete:hover {
  color: var(--verdict-fail);
}

.new-folder-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-color);
}

.new-folder-input {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.new-folder-input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.credentials-main {
  flex: 1;
  min-width: 0;
}

.credential-count {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Credentials Table */
.credentials-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.credentials-table th,
.credentials-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.credentials-table th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.credentials-table th:first-child {
  border-top-left-radius: 6px;
}

.credentials-table th:last-child {
  border-top-right-radius: 6px;
}

.credentials-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 6px;
}

.credentials-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 6px;
}

.credentials-table tbody tr:last-child td {
  border-bottom: none;
}

.credentials-table tbody tr:hover {
  background-color: var(--bg-tertiary);
}

.credential-name {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
}

.credential-type {
  font-size: 13px;
  color: var(--text-secondary);
}

.credential-value {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

.value-masked {
  display: flex;
  align-items: center;
  gap: 8px;
}

.masked-text {
  color: var(--text-secondary);
  letter-spacing: 2px;
}

.reveal-btn {
  background: none;
  border: none;
  color: var(--accent-blue);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
}

.reveal-btn:hover {
  text-decoration: underline;
}

.credential-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.credential-actions form {
  display: inline;
  margin: 0;
  padding: 0;
}

/* Move Dropdown */
.move-dropdown {
  position: relative;
  display: inline-block;
}

.move-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  min-width: 150px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.move-dropdown-content.show {
  display: block;
}

.move-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.move-option:hover {
  background-color: var(--bg-tertiary);
}

.move-option:first-child {
  border-radius: 6px 6px 0 0;
}

.move-option:last-child {
  border-radius: 0 0 6px 6px;
}

/* Password Input */
.password-input-wrapper {
  display: flex;
  gap: 8px;
}

.password-input-wrapper .form-input {
  flex: 1;
}

.toggle-password-btn {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.15s;
}

.toggle-password-btn:hover {
  background-color: var(--bg-primary);
}

.form-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.form-hint code {
  background-color: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
}

.form-empty {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0;
}

.form-empty a,
.form-hint a {
  color: var(--accent-blue);
}

.inline-form {
  display: inline;
}

/* Credential Checkboxes */
.credential-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 12px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.credential-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background-color 0.15s;
}

.credential-checkbox:hover {
  background-color: var(--bg-tertiary);
}

.credential-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.credential-checkbox-name {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-blue);
}

.credential-checkbox-type {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Setups Manager */
.setups-manager {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-label-small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.selected-setups-section,
.available-setups-section {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
}

.selected-setups-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.selected-setup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-bottom: 8px;
}

.selected-setup-item:last-child {
  margin-bottom: 0;
}

.setup-name {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--accent-blue);
}

.setup-actions {
  display: flex;
  gap: 4px;
}

.setup-move-btn,
.setup-remove-btn,
.setup-add-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.setup-move-btn:hover,
.setup-add-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

.setup-remove-btn:hover {
  background-color: rgba(248, 81, 73, 0.15);
  color: var(--verdict-fail);
  border-color: var(--verdict-fail);
}

.available-setups-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.available-setup-item.hidden {
  display: none;
}

.setup-add-btn {
  background-color: var(--bg-secondary);
  padding: 6px 12px;
}

.no-setups-message {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
}

/* Navigation User Section */
.global-nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.company-name {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 8px 16px;
  border-right: 1px solid var(--border-color);
  margin-right: 8px;
}

.btn-link {
  background: none;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
}

/* Website Selector */
.website-selector {
  position: relative;
  margin-right: 8px;
}

.website-selector-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.website-selector-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
}

.website-selector-btn .caret {
  font-size: 10px;
  color: var(--text-secondary);
}

.website-selector-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 100;
  margin-top: 4px;
  display: none;
}

.website-selector-dropdown.show {
  display: block;
}

.website-option {
  display: block;
  padding: 10px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
}

.website-option:hover {
  background: var(--bg-tertiary);
}

.website-option.current {
  color: var(--text-primary);
  font-weight: 500;
}

.website-option-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
}

.website-option-row:hover {
  background: var(--bg-tertiary);
}

.website-option-row .website-option {
  padding: 0;
  color: var(--text-primary);
}

.website-option-select {
  color: var(--accent-blue);
  font-size: 11px;
  background: transparent;
  border: 1px solid var(--accent-blue);
  border-radius: 4px;
  cursor: pointer;
  margin-left: 8px;
  padding: 2px 8px;
}

.website-option-select:hover {
  background: var(--accent-blue);
  color: var(--bg-primary);
}

.website-option.manage {
  color: var(--text-secondary);
  font-size: 13px;
}

/* Style button_to forms in website selector to look like links */
.website-selector-dropdown form {
  display: block;
  margin: 0;
  padding: 0;
}

.website-selector-dropdown button.website-option {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.website-selector-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* Website List */
.current-website {
  background: rgba(88, 166, 255, 0.1);
}

.website-name-link {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: var(--text-primary);
}

.website-name-link:hover {
  color: var(--accent-blue);
}

.select-label {
  color: var(--accent-blue);
  font-size: 12px;
  margin-left: 8px;
}

.current-badge {
  display: inline-block;
  background: var(--accent-blue);
  color: var(--bg-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  text-transform: uppercase;
}

.btn-small {
  font-size: 12px;
  padding: 4px 8px;
}

/* Form value display (read-only) */
.form-value {
  color: var(--text-primary);
  font-size: 14px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  margin: 4px 0;
}

/* Auth Forms */
.auth-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 24px;
}

.auth-form {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 32px;
}

.auth-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px 0;
  text-align: center;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 24px 0;
}

.auth-form-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-errors {
  background-color: rgba(248, 81, 73, 0.15);
  border: 1px solid var(--verdict-fail);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: var(--verdict-fail);
  font-size: 14px;
}

.auth-errors ul {
  margin: 0;
  padding-left: 20px;
}

.auth-errors li {
  margin-bottom: 4px;
}

.auth-errors li:last-child {
  margin-bottom: 0;
}

.auth-form .form-actions {
  margin-top: 8px;
  padding-top: 0;
  border-top: none;
}

.auth-links {
  margin-top: 16px;
  text-align: center;
}

.auth-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 14px;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-signup-prompt {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.auth-signup-prompt p {
  margin: 0 0 12px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.btn-full {
  width: 100%;
}

.btn-large {
  padding: 12px 24px;
  font-size: 16px;
}

/* Landing Page */
.landing-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 24px;
}

.landing-hero {
  text-align: center;
}

.landing-title {
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text-primary);
}

.landing-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin: 0 0 32px 0;
}

.landing-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Settings Page */
.settings-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 24px 0;
  color: var(--text-primary);
}

.settings-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 24px;
}

.settings-section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text-primary);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-form .form-actions {
  margin-top: 8px;
  padding-top: 0;
  border-top: none;
}

.settings-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-info-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.settings-info-value {
  font-size: 16px;
  color: var(--text-primary);
}

.settings-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.settings-description code {
  background-color: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
}

.api-key-display {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 16px;
}

.api-key-value {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--accent-blue);
  word-break: break-all;
}

/* Notices */
.notice {
  padding: 12px 16px;
  border-radius: 6px;
  margin: 16px 24px;
  font-size: 14px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.notice-success {
  background-color: rgba(63, 185, 80, 0.15);
  color: var(--verdict-pass);
  border: 1px solid var(--verdict-pass);
}

.notice-error {
  background-color: rgba(248, 81, 73, 0.15);
  color: var(--verdict-fail);
  border: 1px solid var(--verdict-fail);
}

/* Scenarios Layout (reuses credentials layout patterns) */
.scenarios-layout {
  display: flex;
  gap: 24px;
  min-height: calc(100vh - 150px);
}

.scenarios-sidebar {
  flex: 0 0 250px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.scenarios-main {
  flex: 1;
  min-width: 0;
}

/* Scenario Tag Badges */
.scenario-tags-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.scenario-tag-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-blue);
  background-color: rgba(88, 166, 255, 0.15);
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 0.15s;
}

.scenario-tag-badge:hover {
  background-color: rgba(88, 166, 255, 0.25);
}

/* Run Tag Badge */
.run-tag {
  font-size: 14px;
  color: var(--text-secondary);
}

.run-tag-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-blue);
  background-color: rgba(88, 166, 255, 0.15);
  border-radius: 12px;
  margin-right: 6px;
}

.run-tag-badge:last-child {
  margin-right: 0;
}

/* Tag Checkboxes (for scenario edit form) */
.tag-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.tag-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 16px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: background-color 0.15s, border-color 0.15s;
}

.tag-checkbox:hover {
  background-color: var(--bg-tertiary);
}

.tag-checkbox.selected {
  background-color: rgba(88, 166, 255, 0.15);
  border-color: var(--accent-blue);
}

.tag-checkbox input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.tag-checkbox-name {
  font-size: 13px;
  color: var(--text-primary);
}

/* Inline Edit */
.hidden {
  display: none !important;
}

.inline-edit-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  flex: 1;
}

.inline-edit-input {
  flex: 1;
  padding: 4px 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-blue);
  border-radius: 4px;
  outline: none;
}

.inline-edit-input:focus {
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.folder-action-edit {
  color: var(--text-secondary);
}

.folder-action-edit:hover {
  color: var(--accent-blue);
}

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

.folder-action-disabled:hover {
  background-color: transparent;
  color: var(--text-secondary);
}

/* Inline icon buttons (E and X) for tags */
.folder-icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  width: 16px;
  text-align: center;
  transition: color 0.15s;
}

.folder-icon-btn:hover {
  color: var(--accent-blue);
}

.folder-icon-btn-delete:hover {
  color: var(--verdict-fail);
}

.folder-icon-btn-run {
  color: var(--verdict-pass);
}

.folder-icon-btn-run:hover {
  color: var(--verdict-pass);
  opacity: 0.8;
}

.folder-icon-btn-disabled {
  opacity: 0.5;
  cursor: default;
}

.folder-icon-btn-disabled:hover {
  color: var(--text-secondary);
}

/* Pre-Scenarios Manager (mirrors Setups Manager styles) */
.pre-scenarios-manager {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.selected-pre-scenarios-section,
.available-pre-scenarios-section {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
}

.selected-pre-scenarios-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.selected-pre-scenario-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-bottom: 8px;
}

.selected-pre-scenario-item:last-child {
  margin-bottom: 0;
}

.pre-scenario-name {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--accent-blue);
}

.pre-scenario-actions {
  display: flex;
  gap: 4px;
}

.pre-scenario-move-btn,
.pre-scenario-remove-btn,
.pre-scenario-add-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.pre-scenario-move-btn:hover,
.pre-scenario-add-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

.pre-scenario-remove-btn:hover {
  background-color: rgba(248, 81, 73, 0.15);
  color: var(--verdict-fail);
  border-color: var(--verdict-fail);
}

.available-pre-scenarios-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.available-pre-scenario-item.hidden {
  display: none;
}

.pre-scenario-add-btn {
  background-color: var(--bg-secondary);
  padding: 6px 12px;
}

.no-pre-scenarios-message {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
}

.form-hint-small {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Pre-Scenario Verdicts */
.verdict-pre-scenario-fail {
  background-color: rgba(248, 81, 73, 0.15);
  color: var(--verdict-fail);
}

.verdict-pre-scenario-error {
  background-color: rgba(210, 153, 34, 0.15);
  color: var(--verdict-error);
}

/* Pre-Scenarios Section in Run View */
.pre-scenarios-section {
  margin-top: 24px;
}

.pre-scenarios-toggle {
  cursor: pointer;
  user-select: none;
  padding: 8px 0;
}

.pre-scenarios-toggle::-webkit-details-marker {
  margin-right: 8px;
}

.pre-scenarios-section[open] .pre-scenarios-toggle {
  margin-bottom: 16px;
}

/* Pre-Scenario Run Section (nested collapsible in scenario detail view) */
.pre-scenario-run-section {
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-secondary);
}

.pre-scenario-run-header {
  cursor: pointer;
  user-select: none;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}

.pre-scenario-run-header::-webkit-details-marker {
  display: none;
}

.pre-scenario-run-header::marker {
  display: none;
  content: "";
}

.pre-scenario-arrow {
  font-size: 12px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.pre-scenario-run-section[open] .pre-scenario-arrow {
  transform: rotate(90deg);
}

.pre-scenario-run-header .pre-scenario-name {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.pre-scenario-run-header .verdict {
  margin-left: auto;
}

.pre-scenario-run-content {
  padding: 0 16px 16px 16px;
  border-top: 1px solid var(--border-color);
}

/* Section description */
.section-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

/* Subscription status badges */
.subscription-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
}

.subscription-status--active {
  background-color: var(--status-success-bg, #dcfce7);
  color: var(--status-success-text, #166534);
}

.subscription-status--past_due {
  background-color: var(--status-warning-bg, #fef3c7);
  color: var(--status-warning-text, #92400e);
}

.subscription-status--canceled {
  background-color: var(--status-error-bg, #fee2e2);
  color: var(--status-error-text, #991b1b);
}

.subscription-status--unknown {
  background-color: var(--bg-tertiary, #e5e7eb);
  color: var(--text-secondary, #6b7280);
}

/* Legal Pages */
.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.legal-document {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 40px;
}

.legal-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
}

.legal-updated {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 32px;
}

.legal-document h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.legal-document h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0 8px;
}

.legal-document p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 12px;
}

.legal-document ul {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 12px;
  padding-left: 24px;
}

.legal-document li {
  margin-bottom: 4px;
}

.legal-document a {
  color: var(--accent-blue);
  text-decoration: none;
}

.legal-document a:hover {
  text-decoration: underline;
}

.legal-uppercase {
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-primary) !important;
}

/* Legal Accept Page */
.legal-accept {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 40px;
}

.legal-accept-intro {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 32px;
}

.legal-accept-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.legal-accept-item {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px 20px;
}

.legal-accept-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.legal-accept-item h3 a {
  color: var(--accent-blue);
  text-decoration: none;
}

.legal-accept-item h3 a:hover {
  text-decoration: underline;
}

.legal-accept-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.legal-accept-form {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.legal-accept-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.legal-accept-checkbox input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.legal-accept-checkbox label {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.legal-accept-checkbox a {
  color: var(--accent-blue);
  text-decoration: none;
}

.legal-accept-checkbox a:hover {
  text-decoration: underline;
}

/* Legal consent text on signup */
.legal-consent-text {
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.5;
}

.legal-consent-text a {
  color: var(--accent-blue);
  text-decoration: none;
}

.legal-consent-text a:hover {
  text-decoration: underline;
}

/* Deployments Dashboard */
.deployments-grid {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.deployment-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border-color);
}

.deployment-row:last-child {
  border-bottom: none;
}

.deployment-label {
  flex: 0 0 120px;
  display: flex;
  align-items: center;
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-right: 1px solid var(--border-color);
}

.deployment-cells {
  display: flex;
  align-items: stretch;
  flex: 1;
  padding: 8px;
  gap: 6px;
}

.deployment-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 8px 6px;
  border-radius: 6px;
  text-decoration: none;
  transition: filter 0.15s;
  gap: 4px;
}

.deployment-cell:hover {
  filter: brightness(1.3);
}

.deployment-cell-pass {
  background-color: rgba(63, 185, 80, 0.15);
}

.deployment-cell-fail {
  background-color: rgba(248, 81, 73, 0.15);
}

.deployment-cell-error {
  background-color: rgba(210, 153, 34, 0.15);
}

.deployment-cell-running {
  background-color: rgba(210, 153, 34, 0.15);
}

.deployment-icon {
  font-size: 24px;
  line-height: 1;
}

.deployment-cell-pass .deployment-icon {
  color: var(--verdict-pass);
}

.deployment-cell-fail .deployment-icon {
  color: var(--verdict-fail);
}

.deployment-cell-error .deployment-icon {
  color: var(--verdict-error);
}

.deployment-cell-running .deployment-icon {
  color: var(--verdict-running);
}

.deployment-date {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  line-height: 1;
  text-align: center;
}

.deployment-time {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  line-height: 1;
  text-align: center;
}

/* Footer */
.global-footer {
  border-top: 1px solid var(--border-color);
  padding: 24px;
  margin-top: 60px;
}

.global-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.global-footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.global-footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
}

.global-footer-links a:hover {
  color: var(--accent-blue);
}

.global-footer-copyright {
  color: var(--text-secondary);
  font-size: 12px;
  margin: 0;
}

/* === Debug Log Page === */

.debug-log-link {
  font-size: 13px;
  font-weight: normal;
  color: var(--accent-blue);
  margin-left: 12px;
}

.debug-header {
  margin-bottom: 24px;
}

.debug-header h1 {
  margin: 0 0 8px 0;
  font-size: 20px;
}

.debug-header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.debug-back-link {
  color: var(--accent-blue);
  margin-left: auto;
}

.debug-step-section {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.debug-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  flex-wrap: wrap;
}

.debug-step-number {
  font-weight: 600;
  color: var(--text-primary);
}

.debug-step-action {
  font-weight: 600;
  color: var(--accent-blue);
}

.debug-step-target {
  color: var(--text-primary);
}

.debug-step-type {
  color: var(--text-secondary);
  font-size: 12px;
}

.debug-step-keys {
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
}

.debug-reasoning {
  padding: 12px 16px;
  background: #1a2332;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  line-height: 1.5;
  color: #c9d1d9;
  white-space: pre-wrap;
}

.debug-instructions-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
}

.debug-instructions-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.debug-instructions-label + .debug-instructions-label {
  margin-top: 12px;
}

.debug-instructions-pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.debug-llm-input {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.debug-llm-input .debug-pre {
  margin: 0 0 12px 0;
}

.debug-llm-input .debug-pre:last-child {
  margin-bottom: 0;
}

.debug-llm-input-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-blue);
  margin-bottom: 4px;
  margin-top: 12px;
}

.debug-llm-input-label:first-child {
  margin-top: 0;
}

.debug-screenshot-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.debug-screenshot-controls {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.debug-screenshot-controls label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.debug-screenshot-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
}

.debug-screenshot {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.debug-no-screenshot {
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
}

/* Element bounding box overlays */
.debug-element-overlay {
  position: absolute;
  border: 1px solid rgba(88, 166, 255, 0.5);
  background: rgba(88, 166, 255, 0.08);
  pointer-events: none;
  box-sizing: border-box;
}

.debug-element-overlay.debug-element-chosen {
  border: 2px solid rgba(63, 185, 80, 0.9);
  background: rgba(63, 185, 80, 0.15);
  z-index: 1;
}

.debug-element-label {
  position: absolute;
  top: -1px;
  left: -1px;
  font-size: 9px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  background: rgba(88, 166, 255, 0.8);
  color: #fff;
  padding: 0 3px;
  line-height: 14px;
  border-radius: 0 0 3px 0;
}

.debug-element-chosen .debug-element-label {
  background: rgba(63, 185, 80, 0.9);
}

.debug-details {
  padding: 8px 16px 16px;
}

.debug-collapsible {
  margin-bottom: 4px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.debug-collapsible summary {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.debug-collapsible summary:hover {
  color: var(--text-primary);
}

.debug-collapsible[open] summary {
  border-bottom: 1px solid var(--border-color);
}

.debug-pre {
  padding: 12px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  background: var(--bg-primary);
}

.debug-token-info {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 0 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.debug-header-meta .debug-token-info {
  padding: 0;
}

.debug-token-est {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: normal;
  margin-left: 4px;
}

.debug-verdict-reason {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
}

.debug-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
}