:root {
  --bg: #efe6d7;
  --panel: rgba(255, 252, 247, 0.82);
  --panel-strong: rgba(255, 252, 247, 0.94);
  --text: #1f2933;
  --muted: #677681;
  --line: rgba(31, 41, 51, 0.08);
  --accent: #0f766e;
  --accent-strong: #115e59;
  --danger: #b91c1c;
  --shadow: 0 24px 60px rgba(77, 61, 33, 0.12);
  --sidebar-width: 260px;
  --frame-pad: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Avenir Next", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(191, 219, 254, 0.3), transparent 24%),
    linear-gradient(180deg, #f6efe4 0%, var(--bg) 100%);
}

body.unauthenticated .titlebar,
body.unauthenticated .shell {
  display: none;
}

body.authenticated .auth-page {
  display: none;
}

[hidden] {
  display: none !important;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.auth-brand {
  margin-bottom: 28px;
}

.auth-head {
  margin-bottom: 18px;
}

.auth-head h2 {
  margin: 4px 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
}

.auth-card .formGrid {
  gap: 14px;
}

.auth-card .primary-button {
  width: 100%;
  justify-content: center;
}

.titlebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) auto;
  height: 46px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.78);
  backdrop-filter: blur(16px);
}

.titlebar-spacer {
  display: flex;
  gap: 10px;
  height: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 100%;
  border-right: 1px solid var(--line);
}

.admin-email {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-link {
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
}

.logout-link:hover {
  color: var(--accent-strong);
}

.titlebar-meta {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.titlebar-meta {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 var(--frame-pad);
  white-space: nowrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.42);
  padding: 24px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(420px, 100%);
  background: #fffcf7;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.24);
  padding: 20px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-card .formGrid {
  gap: 14px;
}

.modal-card label {
  gap: 7px;
}

.modal-card input {
  border-radius: 14px;
  background: #ffffff;
}

.modal-card .primary-button {
  width: 100%;
  justify-content: center;
  border-radius: 14px;
}

.modal-card .notice {
  margin: 14px 0 0;
}

.tab-strip {
  display: flex;
  min-width: 0;
  gap: 2px;
  align-items: end;
  overflow: auto hidden;
  padding: 8px var(--frame-pad) 0;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 240px;
  height: 34px;
  border: 1px solid rgba(31, 41, 51, 0.08);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 0 12px;
  background: rgba(87, 98, 110, 0.16);
  color: rgba(31, 41, 51, 0.66);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.tab:hover {
  transform: none;
  background: rgba(87, 98, 110, 0.22);
  color: rgba(31, 41, 51, 0.78);
}

.tab.active {
  background: rgba(255, 252, 247, 0.98);
  color: var(--text);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.42), 0 10px 24px rgba(77, 61, 33, 0.1);
}

.tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-close {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: inherit;
  line-height: 1;
}

.tab-close:hover {
  background: rgba(31, 41, 51, 0.08);
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - 46px);
  margin-top: 46px;
}

.sidebar {
  position: sticky;
  top: 46px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 46px);
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #f6efe4 0%, var(--bg) 100%);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand h1,
.panel h3,
.hero-panel h2 {
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-weight: 600;
}

.brand h1 {
  font-size: 28px;
  line-height: 1;
}

.brand p,
.muted {
  margin: 6px 0 0;
  color: var(--muted);
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--text);
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent-strong);
}

.nav-item.active {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: white;
}

.nav-item.active:hover {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: white;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(31, 41, 51, 0.08);
}

.sidebar-language {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-language select {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font: inherit;
}

.sidebar-powered,
.sidebar-version {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.sidebar-powered a {
  color: var(--accent-strong);
  text-decoration: none;
}

.main {
  min-width: 0;
  padding: 24px;
  background: linear-gradient(180deg, #f6efe4 0%, var(--bg) 100%);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel + .panel,
.content-grid + .panel {
  margin-top: 22px;
}

.hero-panel {
  margin-bottom: 22px;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-panel h2 {
  font-size: 44px;
  line-height: 1.04;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: stretch;
}

.content-grid-equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-grid > .panel {
  height: 100%;
}

.content-grid > .panel + .panel {
  margin-top: 0;
}

.create-panel {
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-count {
  color: var(--muted);
  font-size: 12px;
}

button,
input,
textarea,
select {
  font: inherit;
}

a.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 12px 16px;
  text-decoration: none;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

button {
  border: none;
  border-radius: 16px;
  cursor: pointer;
  padding: 12px 16px;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

button:hover {
  transform: translateY(-1px);
}

a.link-button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.link-button.disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.58;
}

.primary-button {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: white;
  font-weight: 700;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text);
}

.ghost-button:hover {
  background: rgba(15, 118, 110, 0.12);
  border-color: rgba(15, 118, 110, 0.24);
  color: var(--accent-strong);
}

.danger-button {
  color: var(--danger);
}

.compact-button {
  min-height: 34px;
  padding: 8px 12px;
}

.result-button {
  min-width: 54px;
  justify-content: center;
  font-weight: 700;
}

.result-button:hover {
  background: rgba(15, 118, 110, 0.14);
  border-color: rgba(15, 118, 110, 0.28);
  color: var(--accent-strong);
}

.task-control-actions {
  gap: 8px;
}

.formGrid {
  display: grid;
  gap: 16px;
  flex: 1;
  align-content: start;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-row-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-section-title {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  outline: none;
}

input,
select {
  min-height: 48px;
  padding: 0 16px;
}

textarea {
  min-height: 132px;
  resize: vertical;
  padding: 14px 16px;
  line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.notice {
  margin-bottom: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  box-shadow: 0 14px 36px rgba(77, 61, 33, 0.08);
}

.notice.error {
  border-color: rgba(185, 28, 28, 0.22);
  background: rgba(254, 242, 242, 0.88);
  color: var(--danger);
}

.toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 60;
  max-width: min(360px, calc(100vw - 36px));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 12px 16px;
  background: rgba(23, 32, 38, 0.92);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(10px);
  color: #f6f8fa;
  font-size: 13px;
}

.toast.success {
  color: #f6f8fa;
}

.toast.error {
  color: #f6f8fa;
}

.tableWrap {
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  font-size: 13px;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 700;
}

.result-column {
  min-width: 86px;
  white-space: nowrap;
}

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

tr[data-task-id],
tr[data-device-id] {
  cursor: pointer;
}

tr[data-task-id]:hover,
tr[data-device-id]:hover {
  background: rgba(15, 118, 110, 0.06);
}

tr[data-task-id].selected,
tr[data-device-id].selected {
  background: rgba(20, 184, 166, 0.1);
}

.status {
  display: inline-block;
  min-width: 72px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  text-align: center;
}

.online,
.completed,
.collector-ready {
  background: rgba(16, 185, 129, 0.18);
  color: #065f46;
}

.offline,
.deactivated,
.failed,
.collector-chromeOffline,
.collector-extensionMissing,
.collector-managedBrowserMissing {
  background: rgba(239, 68, 68, 0.16);
  color: var(--danger);
}

.stopped,
.collector-unknown {
  background: rgba(100, 116, 139, 0.18);
  color: #475569;
}

.running,
.accepted,
.paused,
.assigned,
.queued,
.collector-needsRemoteDebugPermission,
.collector-needsSetup {
  background: rgba(245, 158, 11, 0.18);
  color: #8a5a00;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 14px;
}

.detail-empty {
  min-height: 120px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  place-content: center;
}

.task-summary {
  margin-bottom: 14px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-grid > div {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
}

.summary-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.summary-grid strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-grid .full-id {
  white-space: normal;
  word-break: break-all;
}

.summary-grid .result-cell {
  overflow: visible;
}

.summary-grid .result-cell .result-button {
  min-width: 72px;
}

.activation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
}

.activation-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.activation-card strong {
  color: var(--text);
  font-size: 13px;
}

.activation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.result-summary {
  margin-bottom: 16px;
}

.summary-input {
  min-height: 28px;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.summary-input:focus {
  border-color: transparent;
  box-shadow: none;
}

.org-name-input,
.org-admin-email-input,
.org-admin-password-input {
  display: block;
  width: 100%;
  min-width: 180px;
}

.org-admin-password-input {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
}

.muted-small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.row-actions {
  white-space: nowrap;
}

.summary-keywords {
  grid-column: 1 / -1;
}

.summary-keywords textarea {
  min-height: 112px;
  resize: vertical;
}

.summary-keywords textarea[readonly] {
  background: rgba(255, 255, 255, 0.72);
  cursor: default;
}

.detail-section {
  margin-bottom: 14px;
  min-width: 0;
}

.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.detail-section-head h4 {
  margin: 0;
  font-size: 14px;
}

.detail-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.payload {
  max-height: 220px;
  margin: 0 0 14px;
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.payload[hidden] {
  display: none;
}

.events {
  display: grid;
  gap: 10px;
}

.task-result-content {
  display: grid;
  gap: 16px;
  max-width: 100%;
}

.filter-rules-panel {
  margin-bottom: 4px;
}

.filter-rule-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.filter-rule-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  min-height: 30px;
  border-radius: 8px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.filter-rule-item.muted {
  color: var(--muted);
}

.filter-rule-toggle-all {
  color: var(--text);
  background: rgba(216, 222, 211, 0.78);
}

.filter-rule-item input {
  width: 14px;
  height: 14px;
  min-height: 0;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--green);
}

.filter-help-button {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.filter-help-button:hover {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.28);
  color: var(--green);
}

.filter-rule-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-rule-item strong {
  min-width: 22px;
  border-radius: 999px;
  padding: 1px 5px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--green);
  font-size: 12px;
  text-align: center;
}

.filter-rule-toggle-all strong {
  min-width: 22px;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 400;
  justify-self: end;
  text-align: right;
}

.filter-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

.filter-stats div {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
}

.filter-help-popover {
  position: fixed;
  z-index: 50;
}

.filter-help-card {
  display: grid;
  gap: 10px;
  max-height: min(60vh, 420px);
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.filter-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-help-head strong {
  color: var(--text);
  font-size: 13px;
}

.filter-help-close {
  border: none;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.filter-help-close:hover {
  background: rgba(15, 118, 110, 0.1);
  color: var(--green);
}

.filter-help-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.filter-stats span {
  color: var(--muted);
  font-size: 12px;
}

.filter-stats strong {
  color: var(--text);
  font-size: 18px;
}

.result-filter-workbench {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.result-filter-sidebar {
  position: sticky;
  top: 16px;
  min-width: 0;
}

.result-filter-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.result-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-filter-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: none;
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(216, 222, 211, 0.78);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.result-filter-tab:hover {
  background: rgba(15, 118, 110, 0.12);
  color: var(--text);
}

.result-filter-tab.active {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  font-weight: 400;
}

.result-filter-tab strong {
  min-width: 0;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.email-cell-with-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.email-cell-with-badge > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-include-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(250, 204, 21, 0.28);
  color: #854d0e;
  font-size: 12px;
  font-weight: 400;
}

.artifact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.artifact-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-decoration: none;
}

.artifact-item:hover {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.24);
}

.artifact-item span,
.artifact-item small {
  color: var(--muted);
  font-size: 12px;
}

.artifact-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-preview-table {
  min-height: calc(100vh - 270px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
}

.result-preview-table-primary,
.result-preview-table-secondary {
  min-height: 300px;
}

.result-preview-table-workbench {
  min-height: calc(100vh - 360px);
}

.result-preview-table-secondary {
  background: rgba(255, 250, 244, 0.72);
}

.tabulator {
  border: none;
  background: transparent;
  font-family: "IBM Plex Sans", "Avenir Next", sans-serif;
}

.tabulator .tabulator-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 250, 244, 0.86);
}

.tabulator .tabulator-col,
.tabulator .tabulator-header .tabulator-col {
  background: transparent;
}

.tabulator .tabulator-row {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.72);
}

.tabulator .tabulator-row:nth-child(even) {
  background: rgba(249, 246, 241, 0.92);
}

.timeline {
  display: grid;
  gap: 0;
  max-height: 360px;
  overflow: auto;
  border-radius: 20px;
  padding: 14px 16px;
  background: #172026;
  color: #e5f4ee;
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.events > .empty-state {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.event-line {
  min-width: 0;
  padding: 1px 0;
}

.event-line.failed,
.event-line.stopped,
.event-line.stderr {
  color: #fecaca;
}

.event-line.completed {
  color: #bbf7d0;
}

.event-line.paused,
.event-line.resumed {
  color: #fde68a;
}

.event-line-text {
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 980px) {
  .titlebar {
    grid-template-columns: 1fr auto;
  }

  .titlebar-spacer {
    display: none;
  }

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

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .filter-stats,
  .result-filter-workbench {
    grid-template-columns: 1fr;
  }

  .result-filter-sidebar {
    position: static;
  }

}
