:root {
  color-scheme: dark;
  --bg: #080a09;
  --bg-raised: #0d100f;
  --panel: #101513;
  --panel-hover: #141a17;
  --surface: #151b18;
  --ink: #f3f5f4;
  --muted: #98a39c;
  --muted-strong: #c2c9c5;
  --border: #25302b;
  --border-strong: #36453d;
  --primary: #34b64a;
  --primary-hover: #40c856;
  --primary-active: #29953c;
  --primary-soft: #122a18;
  --primary-border: #276635;
  --success: #44c960;
  --success-bg: #102518;
  --warning: #e4a62d;
  --warning-bg: #271e0d;
  --danger: #ef6a64;
  --danger-bg: #291313;
  --info: #70b7ff;
  --info-bg: #111f2b;
  --focus-ring: rgba(52, 182, 74, 0.3);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --content-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  margin: 0;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-underline-offset: 0.16em;
  transition: color 120ms ease;
}

a:hover {
  color: var(--primary-hover);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.55rem, 2vw, 1.9rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: 1.08rem;
  letter-spacing: -0.018em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 0.98rem;
  margin-bottom: 0.7rem;
}

header {
  align-items: center;
  background: #090b0a;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1.1rem;
  justify-content: space-between;
  min-height: 68px;
  padding: 0.9rem max(1.25rem, calc((100% - var(--content-width)) / 2));
}

.header-brand {
  align-items: center;
  display: flex;
  gap: 1.1rem;
}

header h1 {
  font-size: 1.18rem;
  letter-spacing: -0.03em;
  margin: 0;
}

header h1::before {
  background: var(--primary);
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 0.72rem;
  margin-right: 0.65rem;
  width: 0.72rem;
}

.header-subtitle {
  border-left: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 0.88rem;
  padding-left: 1.1rem;
}

.header-session {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  grid-template-columns: none;
}

.header-session span {
  color: var(--muted-strong);
  font-size: 0.86rem;
}

.header-session button {
  min-height: 36px;
  padding: 0.42rem 0.75rem;
}

main {
  display: grid;
  gap: 1.25rem;
  margin: 2rem auto;
  max-width: var(--content-width);
  padding: 0 1.25rem;
}

main.winrpa-upload-page {
  align-items: center;
  margin: 0 auto;
  min-height: 100vh;
  padding: 1.5rem;
}

.winrpa-upload-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 3rem);
  width: 100%;
}

.winrpa-upload-status {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  max-width: 760px;
  padding: 2rem;
  text-align: center;
  width: 100%;
}

.winrpa-upload-status-completed {
  border-color: var(--success);
}

.winrpa-upload-status-error {
  border-color: var(--danger);
}

.winrpa-upload-kicker,
.winrpa-upload-execution,
.winrpa-upload-count {
  color: var(--muted-strong);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.winrpa-upload-status h1 {
  font-size: 2.2rem;
  letter-spacing: 0;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.winrpa-upload-message {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.winrpa-upload-form {
  align-items: center;
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.winrpa-upload-form input[type="file"] {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  max-width: 100%;
  padding: 1rem;
  width: 100%;
}

.winrpa-upload-form button {
  font-size: 1.15rem;
  min-height: 54px;
  min-width: 220px;
}

.panel,
.card,
.workflow-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
  padding: 1.3rem;
}

.panel > :last-child,
.card > :last-child,
.workflow-card > :last-child {
  margin-bottom: 0;
}

.toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.page-header {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.page-header h1 {
  margin-bottom: 0.35rem;
}

.page-header p {
  margin-bottom: 0;
}

.page-header-actions {
  align-items: center;
  display: flex;
  gap: 1.1rem;
}

.section-heading {
  align-items: baseline;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.refresh-control {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  gap: 0.35rem;
  grid-template-columns: max-content 45px;
  white-space: nowrap;
}

.refresh-label {
  line-height: 1.2;
  text-align: right;
}

.refresh-timer {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  height: 45px;
  justify-content: center;
  position: relative;
  width: 45px;
}

.refresh-timer svg {
  height: 45px;
  left: 0;
  position: absolute;
  top: 0;
  transform: rotate(-90deg);
  width: 45px;
}

.refresh-track,
.refresh-progress {
  fill: none;
  stroke-width: 3px;
}

.refresh-track {
  stroke: var(--border-strong);
}

.refresh-progress {
  stroke: var(--primary);
  stroke-dasharray: 119.38;
  stroke-dashoffset: 119.38;
  stroke-linecap: round;
}

.refresh-timer strong {
  font-size: 0.86rem;
  line-height: 1;
}

.refresh-timer small {
  color: var(--muted);
  font-size: 0.58rem;
  margin: 0 0 -0.15rem 0.07rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

.task-picker {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 1rem;
  justify-self: center;
  max-width: 620px;
  padding: 1.35rem;
  width: 100%;
}

.task-picker-back {
  justify-self: center;
  margin-bottom: -0.2rem;
  max-width: 620px;
  width: 100%;
}

.task-picker h2 {
  margin-bottom: 0.2rem;
  text-align: center;
}

.wizard-shell {
  gap: 1.25rem;
  max-width: 720px;
}

.wizard-back {
  max-width: 720px;
}

.wizard-heading {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
}

.wizard-heading h2 {
  margin-bottom: 0;
}

.wizard-heading .hint {
  margin-bottom: 0;
}

.wizard-steps {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.wizard-step {
  color: #728078;
  display: grid;
  gap: 0.48rem;
  min-width: 0;
}

.wizard-step span {
  font-size: 0.78rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.wizard-step strong {
  background: var(--border);
  border-radius: 999px;
  display: block;
  height: 5px;
  overflow: hidden;
}

.wizard-step strong::before {
  background: var(--primary);
  border-radius: inherit;
  content: "";
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
}

.wizard-step.completed,
.wizard-step.current {
  color: var(--muted-strong);
}

.wizard-step.completed strong::before,
.wizard-step.current strong::before {
  transform: scaleX(1);
}

.wizard-step.current span {
  color: var(--ink);
}

.wizard-form-shell .task-form {
  margin-top: 0.1rem;
}

.task-picker-list {
  display: grid;
  gap: 0.75rem;
  max-height: min(52vh, 460px);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.task-picker-item {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.task-picker-item-heading {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

.task-picker-item-body {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.task-picker-item-body .button {
  align-self: end;
  min-height: 40px;
  padding-inline: 0.9rem;
  white-space: nowrap;
}

.task-picker-item h3 {
  font-size: 0.98rem;
  margin-bottom: 0.18rem;
}

.task-picker-item .hint {
  line-height: 1.6;
  margin-bottom: 0;
}

.workflow-hint {
  color: #718078;
  font-size: 0.72rem;
  line-height: 1.35;
  margin-bottom: 0;
}

.empty-state {
  align-items: center;
  display: grid;
  justify-items: center;
  padding: 3.4rem 1rem;
  text-align: center;
}

.empty-state.compact {
  padding: 1.5rem 1rem;
}

.empty-state h2 {
  margin-bottom: 0.4rem;
}

.empty-state .hint {
  margin-bottom: 1.35rem;
}

form {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: 2fr 1fr 1fr auto;
}

.form-panel {
  max-width: 720px;
}

.form-grid {
  align-items: end;
  grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) auto;
}

.task-form {
  align-items: stretch;
  grid-template-columns: 1fr;
}

.inline-action-form {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  grid-template-columns: none;
}

.form-actions {
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.7rem;
  justify-content: flex-end;
  margin-top: 0.4rem;
  padding-top: 1.2rem;
}

.task-list-panel {
  display: grid;
  gap: 1rem;
}

.company-list-panel {
  display: grid;
  gap: 1rem;
}

.company-filters {
  align-items: end;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(260px, 1fr) auto;
  padding-bottom: 1rem;
}

.task-filters {
  align-items: end;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(180px, 1.2fr) repeat(2, minmax(150px, 0.8fr)) auto;
  padding-bottom: 1rem;
}

.task-filter-actions {
  display: flex;
  gap: 0.55rem;
}

.task-filter-actions .button {
  white-space: nowrap;
}

.confirm-dialog {
  background: transparent;
  border: 0;
  color: var(--ink);
  max-width: min(560px, calc(100% - 2rem));
  padding: 0;
  width: 100%;
}

.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.confirm-dialog-content {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
}

.confirm-dialog h2 {
  margin-bottom: 0.35rem;
}

.confirm-dialog .hint {
  margin-bottom: 0;
}

.confirm-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  margin: 0;
  overflow: hidden;
}

.confirm-summary div {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(130px, 0.55fr) minmax(0, 1fr);
  padding: 0.68rem 0.8rem;
}

.confirm-summary div + div {
  border-top: 1px solid var(--border);
}

.confirm-summary dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.confirm-summary dd {
  color: var(--muted-strong);
  margin: 0;
  overflow-wrap: anywhere;
}

label {
  color: var(--muted-strong);
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  margin-bottom: 0.42rem;
}

input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  min-height: 43px;
  padding: 0.62rem 0.72rem;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
  width: 100%;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #718078;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #4a5c52;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
  outline: none;
}

input:disabled,
select:disabled,
textarea:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.65;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary);
  min-height: auto;
  width: auto;
}

input[type="file"] {
  padding: 0.38rem;
}

input[type="file"]::file-selector-button {
  background: #1a241f;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  margin-right: 0.75rem;
  padding: 0.38rem 0.65rem;
}

.helptext,
.hint,
.empty,
.files {
  color: var(--muted);
  font-size: 0.9rem;
}

.helptext {
  display: block;
  margin-top: 0.35rem;
}

.files {
  font-size: 0.82rem;
  line-height: 1.65;
}

.errorlist {
  color: var(--danger);
  font-size: 0.83rem;
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

button,
.button,
.menu-button {
  align-items: center;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  color: #071108;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  gap: 0.4rem;
  justify-content: center;
  min-height: 43px;
  padding: 0.62rem 1rem;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

button:hover,
.button:hover,
.menu-button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #071108;
}

button:active,
.button:active,
.menu-button:active {
  background: var(--primary-active);
  border-color: var(--primary-active);
}

button:focus-visible,
.button:focus-visible,
.menu-button:focus-visible {
  box-shadow: 0 0 0 3px var(--focus-ring);
  outline: none;
}

button:disabled,
.button.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--surface);
  border-color: #52645b;
  color: var(--ink);
}

.button-danger {
  background: var(--danger-bg);
  border-color: #69302d;
  color: var(--danger);
}

.button-danger:hover {
  background: #351817;
  border-color: var(--danger);
  color: #ffdad8;
}

.logout-button {
  min-width: 72px;
}

.table-scroll {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 100%;
  overflow-x: auto;
}

.table-primary-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.table-primary-link:hover {
  color: var(--primary-hover);
}

.table-action-cell {
  text-align: right;
  white-space: nowrap;
}

.table-actions {
  align-items: center;
  display: flex;
  gap: 0.55rem;
  white-space: nowrap;
}

.table-actions form {
  display: inline-flex;
  gap: 0;
  grid-template-columns: none;
}

.table-actions button,
.table-actions .button-secondary {
  min-height: 36px;
  padding: 0.42rem 0.68rem;
}

.flow-upload-form {
  align-items: center;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: minmax(210px, 1fr) auto;
  min-width: 380px;
}

.flows-table {
  min-width: 1220px;
}

.flows-table th:first-child,
.flows-table .flow-name-cell {
  min-width: 260px;
  width: 28%;
}

.flows-table th:nth-child(2),
.flows-table th:nth-child(3),
.flows-table th:nth-child(5),
.flows-table th:nth-child(6) {
  width: 84px;
}

.flows-table th:nth-child(8) {
  min-width: 410px;
}

.flow-name-cell strong {
  display: block;
  line-height: 1.35;
}

.flow-name-cell .table-subtext {
  max-width: 300px;
}

.flow-upload-form input[type="file"] {
  font-size: 0.86rem;
  min-height: 36px;
  padding: 0.3rem;
}

.flow-upload-form input[type="file"]::file-selector-button {
  padding: 0.32rem 0.55rem;
}

.flow-upload-form button {
  min-height: 36px;
  padding: 0.42rem 0.68rem;
  white-space: nowrap;
}

.flow-form-errors {
  display: grid;
  gap: 0.25rem;
}

.table-subtext {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
}

.table-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

table {
  border-collapse: collapse;
  font-size: 0.92rem;
  width: 100%;
}

thead {
  background: var(--bg-raised);
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 0.78rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

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

tbody tr:hover {
  background: var(--panel-hover);
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge,
.status {
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  color: var(--success);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1;
  padding: 0.35rem 0.62rem;
}

.pending,
.running,
.info {
  background: var(--info-bg);
  border-color: #25445f;
  color: var(--info);
}

.converting,
.importing,
.warning {
  background: var(--warning-bg);
  border-color: #63491b;
  color: var(--warning);
}

.completed,
.success {
  background: var(--success-bg);
  border-color: var(--primary-border);
  color: var(--success);
}

.failed,
.danger {
  background: var(--danger-bg);
  border-color: #69302d;
  color: var(--danger);
}

.message {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  padding: 0.78rem 0.9rem;
}

.message.success {
  background: var(--success-bg);
  border-color: var(--primary-border);
  color: var(--success);
}

.message.warning {
  background: var(--warning-bg);
  border-color: #63491b;
  color: var(--warning);
}

.message.error {
  background: var(--danger-bg);
  border-color: #69302d;
  color: var(--danger);
}

.message.info {
  background: var(--info-bg);
  border-color: #25445f;
  color: var(--info);
}

.detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.detail-panel {
  display: grid;
  gap: 1rem;
}

.detail-panel h2 {
  margin-bottom: 0;
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-list div {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(120px, 0.4fr) minmax(0, 1fr);
  padding: 0.72rem 0;
}

.detail-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.detail-list div:last-child {
  padding-bottom: 0;
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-list dd {
  color: var(--muted-strong);
  margin: 0;
  overflow-wrap: anywhere;
}

.mono-inline,
.technical-muted {
  display: block;
  overflow-wrap: anywhere;
}

.mono-inline {
  color: var(--muted-strong);
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.8rem;
}

.technical-muted {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 0.22rem;
}

.technical-row td {
  background: #0b0f0d;
  padding: 0.65rem 0.8rem;
}

.technical-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0.45rem 0;
  padding: 0.68rem;
}

.technical-details summary {
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 650;
}

.technical-details pre {
  margin: 0.75rem 0 0;
  white-space: pre-wrap;
}

.evidence-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.evidence-thumb {
  align-items: stretch;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-strong);
  display: grid;
  gap: 0.65rem;
  justify-content: stretch;
  min-height: 0;
  padding: 0.7rem;
  text-align: left;
}

.evidence-thumb:hover {
  background: var(--panel-hover);
  border-color: var(--border-strong);
  color: var(--ink);
}

.evidence-thumb img {
  aspect-ratio: 16 / 10;
  background: #050706;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  object-fit: contain;
  width: 100%;
}

.evidence-thumb span {
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.image-dialog {
  background: transparent;
  border: 0;
  color: var(--ink);
  max-width: min(1100px, calc(100% - 2rem));
  padding: 0;
  width: 100%;
}

.image-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.image-dialog-content {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.image-dialog-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.image-dialog-header strong {
  overflow-wrap: anywhere;
}

.image-dialog-content img {
  background: #050706;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 78vh;
  object-fit: contain;
  width: 100%;
}

code,
pre {
  background: #0b0f0d;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: #ccebd3;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.87em;
}

code {
  padding: 0.1rem 0.3rem;
}

pre {
  overflow-x: auto;
  padding: 0.85rem;
}

.workflow-card {
  box-shadow: none;
}

.workflow-card-header {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.workflow-card-header h2 {
  margin-bottom: 0;
}

.workflow-meta {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0;
}

.workflow-meta div {
  background: var(--bg-raised);
  border-left: 2px solid var(--primary-border);
  padding: 0.48rem 0.68rem;
}

.workflow-meta dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workflow-meta dd {
  color: var(--muted-strong);
  font-size: 0.88rem;
  margin: 0.15rem 0 0;
}

.debug-form {
  align-items: stretch;
  grid-template-columns: 1fr;
}

.menu-main {
  align-content: center;
  justify-items: center;
  margin: 0 auto;
  min-height: 100vh;
}

.auth-main {
  align-content: center;
  justify-items: center;
  margin: 0 auto;
  min-height: 100vh;
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 1rem;
  max-width: 420px;
  padding: 2rem;
  width: min(420px, 100%);
}

.auth-card h1 {
  margin-bottom: 0;
  text-align: center;
}

.auth-card .hint {
  margin-bottom: 0.25rem;
  text-align: center;
}

.auth-form {
  align-items: stretch;
  grid-template-columns: 1fr;
}

.main-menu {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 1.65rem;
  justify-items: center;
  max-width: 1040px;
  min-width: min(420px, 100%);
  padding: 2.3rem 2rem;
  text-align: center;
  width: 100%;
}

.home-console {
  justify-items: stretch;
  text-align: left;
}

.home-console-heading {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
}

.home-console-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 280px minmax(0, 1fr);
}

.home-menu-panel,
.readiness-panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
  padding: 1.2rem;
}

.home-menu-panel {
  align-content: start;
  display: grid;
  gap: 1rem;
}

.home-menu-panel h2,
.readiness-panel h2 {
  margin-bottom: 0;
}

.menu-title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin: 0;
}

.menu-title::after {
  background: var(--primary);
  border-radius: 999px;
  content: "";
  display: block;
  height: 3px;
  margin: 0.8rem auto 0;
  width: 44px;
}

.menu-actions {
  align-items: stretch;
  display: grid;
  gap: 0.75rem;
}

.menu-user {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.menu-user strong {
  color: var(--muted-strong);
}

.menu-logout {
  display: block;
  grid-template-columns: none;
  margin-top: 0.35rem;
}

.menu-logout button {
  width: 100%;
}

.menu-button {
  width: 100%;
}

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

.readiness-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.readiness-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 0.35rem;
  min-height: 128px;
  padding: 0.9rem;
}

.readiness-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.readiness-card strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.readiness-card small {
  color: var(--muted-strong);
  font-size: 0.82rem;
  line-height: 1.35;
}

.readiness-card-success {
  border-color: var(--success);
}

.readiness-card-info {
  border-color: var(--info);
}

.readiness-card-warning {
  border-color: var(--warning);
}

.readiness-card-danger {
  border-color: var(--danger);
}

.readiness-alerts {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.85rem;
  padding-top: 1rem;
}

.readiness-alert-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.readiness-alert-list li {
  align-items: start;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.78rem 0;
}

.readiness-alert-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.readiness-alert-list li:last-child {
  padding-bottom: 0;
}

.readiness-alert-list strong {
  display: block;
  font-size: 0.92rem;
}

.readiness-alert-list span:not(.status) {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  line-height: 1.45;
  margin-top: 0.18rem;
}

.readiness-alert-meta {
  align-items: end;
  display: grid;
  gap: 0.35rem;
  justify-items: end;
}

.readiness-alert-meta time {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.token-panel {
  display: grid;
  gap: 0.75rem;
}

.token-copy-row {
  align-items: stretch;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.token-value {
  align-items: center;
  background: #0b0f0d;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: #d7f8dd;
  display: flex;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 1rem;
  overflow-wrap: anywhere;
  padding: 0.85rem;
}

.token-copy-row button {
  min-width: 96px;
}

.page-link {
  color: var(--muted-strong);
  display: inline-flex;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.page-link:hover {
  color: var(--primary);
}

.pagination {
  align-items: center;
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
}

.pagination a,
.pagination span {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  min-width: 36px;
  padding: 0 0.55rem;
  text-decoration: none;
}

.pagination a:hover,
.pagination .current {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--success);
}

.pagination span:not(.current) {
  color: var(--muted);
  opacity: 0.7;
}

.task-pagination {
  justify-content: flex-end;
}

@media (max-width: 820px) {
  header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.9rem 1.25rem;
  }

  .header-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .header-subtitle {
    border-left: 0;
    padding-left: 1.38rem;
  }

  .header-session {
    justify-content: space-between;
    padding-left: 1.38rem;
    width: 100%;
  }

  main {
    margin: 1.25rem auto;
    padding: 0 0.9rem;
  }

  form,
  .grid-2,
  .workflow-grid,
  .task-picker-item-body {
    grid-template-columns: 1fr;
  }

  .task-filters {
    grid-template-columns: 1fr;
  }

  .company-filters {
    grid-template-columns: 1fr;
  }

  .task-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .detail-grid,
  .detail-list div {
    grid-template-columns: 1fr;
  }

  .task-picker {
    padding: 1.05rem;
  }

  .task-picker-back {
    max-width: 100%;
  }

  .wizard-steps {
    gap: 0.45rem;
  }

  .wizard-step span {
    font-size: 0.72rem;
  }

  .task-picker-list {
    max-height: 58vh;
    padding-right: 0;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header-actions {
    justify-content: space-between;
  }

  .inline-action-form,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .refresh-label {
    text-align: left;
  }

  .panel,
  .card,
  .workflow-card {
    padding: 1.05rem;
  }

  .home-console-grid,
  .readiness-grid,
  .readiness-alert-list li {
    grid-template-columns: 1fr;
  }

  .home-menu-panel,
  .readiness-panel {
    padding: 1rem;
  }

  .readiness-alert-meta {
    align-items: start;
    justify-items: start;
  }

  .main-menu {
    padding: 2rem 1.2rem;
  }
}
