:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #08101e;
  color: #e5e7eb;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 80% 0, #172554, #08101e 40%);
}
.auth-pending > :not(.auth-gate) {
  display: none !important;
}
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 70% 10%, #1e3a8a, #08101e 48%);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  min-width: 0;
  justify-self: center;
  padding: 30px;
  border: 1px solid #334155;
  border-radius: 20px;
  background: #0d1627;
  box-shadow: 0 24px 80px #020617aa;
}
.auth-card h1 {
  font-size: 30px;
}
.auth-card > .meta {
  margin-bottom: 22px;
}
.auth-form {
  display: grid;
  gap: 14px;
}
.auth-form .button {
  width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 2px;
}
.topbar,
main,
.console-panel,
.nav,
.global-message {
  width: min(1460px, 100%);
  margin-inline: auto;
}
.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px 18px;
}
.eyebrow {
  margin: 0 0 5px;
  color: #7dd3fc;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 800;
}
h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}
h2,
h3 {
  line-height: 1.2;
}
.meta {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}
.connection {
  color: #86efac;
  font-size: 13px;
}
.connection.error {
  color: #fca5a5;
}
.user-session {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.user-session strong {
  color: #e2e8f0;
  font-size: 12px;
}
.session-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #93c5fd;
  cursor: pointer;
  font-size: 12px;
}
.nav {
  display: flex;
  gap: 8px;
  padding: 0 28px 14px;
  overflow-x: auto;
}
.nav-button {
  flex: 0 0 auto;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 9px 15px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-weight: 800;
}
.nav-button:hover {
  color: #e2e8f0;
  border-color: #64748b;
}
.nav-button.active {
  background: #dbeafe;
  border-color: #dbeafe;
  color: #0f172a;
}

.console-panel {
  padding: 0 28px;
}
.activity-details {
  border-block: 1px solid #1e293b;
}
.activity-details > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 2px;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.activity-details[open] > summary .meta {
  display: none;
}
.console {
  min-height: 100px;
  max-height: 220px;
  overflow: auto;
  margin: 0 0 12px;
  padding: 13px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #020617;
  color: #93c5fd;
  font:
    12px/1.55 ui-monospace,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.auth-code-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 9px;
  padding: 12px 14px;
  border: 1px solid #2563eb;
  border-radius: 10px;
  background: #172554;
}
.auth-code-panel div {
  display: grid;
  gap: 4px;
}
.auth-code-panel code {
  color: #fff;
  font:
    800 21px/1.2 ui-monospace,
    monospace;
  letter-spacing: 0.12em;
  user-select: all;
}
.global-message {
  margin-top: 14px;
  margin-bottom: -4px;
}
main {
  padding: 22px 28px 48px;
}

.workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}
.workspace-heading strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.workspace-heading > .meta {
  max-width: 440px;
  text-align: right;
}
.toolbar {
  display: grid;
  grid-template-columns:
    minmax(220px, 2fr) minmax(160px, 1fr) minmax(170px, 1fr)
    auto auto;
  gap: 10px;
  align-items: end;
  padding: 16px;
  background: #111827e8;
  border: 1px solid #334155;
  border-radius: 16px;
}
label {
  display: grid;
  gap: 7px;
  color: #a8b4c5;
  font-size: 12px;
  font-weight: 700;
}
label small {
  color: #64748b;
  font-weight: 500;
  line-height: 1.4;
}
input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #475569;
  border-radius: 9px;
  padding: 0 11px;
  background: #0f172a;
  color: #f8fafc;
}
textarea {
  padding-block: 10px;
  resize: vertical;
}
.more-filters {
  grid-column: 1 / -1;
  border-top: 1px solid #263449;
  padding-top: 10px;
}
.more-filters > summary,
.advanced-settings > summary,
.technical-details > summary {
  color: #93c5fd;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.more-filters-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  padding-top: 12px;
}
.button {
  align-self: end;
  min-height: 40px;
  border: 1px solid #475569;
  border-radius: 9px;
  padding: 0 16px;
  background: #1e293b;
  color: #dbeafe;
  cursor: pointer;
  font-weight: 800;
  position: relative;
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    background-color 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}
.button:hover {
  border-color: #93c5fd;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px #02061755;
}
.button:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: none;
}
.button:disabled,
[data-action]:disabled {
  opacity: 0.45;
  cursor: wait;
}
.button.is-loading {
  opacity: 0.82;
}
.button.is-loading::before {
  width: 13px;
  height: 13px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  display: inline-block;
  vertical-align: -2px;
  animation: button-spin 0.65s linear infinite;
}
@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}
.primary {
  background: #60a5fa;
  border-color: #60a5fa;
  color: #07111f;
}
.danger {
  background: #450a0a;
  border-color: #b91c1c;
  color: #fecaca;
}

.process-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  gap: 10px;
  margin: 16px 0 10px;
}
.process-flow-top,
.process-flow-bottom {
  width: 100%;
}
.process-flow-top {
  margin-top: 0;
}
.process-flow-bottom {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #27354a;
}
.process-step {
  position: relative;
  display: flex;
  flex: 1 1 calc(50% - 5px);
  flex-direction: row;
  align-items: center;
  gap: 2px 10px;
  width: calc(50% - 5px);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  min-height: 92px;
  padding: 15px;
  text-align: left;
  border: 1px solid #334155;
  border-radius: 14px;
  background: #111827;
  color: #e2e8f0;
  cursor: pointer;
}
.process-step:hover {
  transform: translateY(-1px);
  border-color: #60a5fa;
  background: #14213a;
}
.process-step > span {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1d4ed8;
  color: white;
  font-weight: 900;
}
.process-step strong {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}
.process-step small {
  flex: 1 1 140px;
  min-width: 0;
  color: #7f8da2;
  line-height: 1.35;
}
.process-controls {
  display: flex;
  justify-content: flex-end;
}
.process-controls-top {
  min-height: 0;
  margin-bottom: 4px;
}
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #0d1627;
}
.bulk-bar strong {
  color: #93c5fd;
  font-size: 12px;
}
.bulk-bar .meta {
  margin-right: auto;
}
.bulk-bar select {
  width: auto;
  min-width: 190px;
}
.bulk-bar .button {
  min-height: 38px;
}
.lead-select {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 10px;
}
.lead-select input {
  width: auto;
  min-height: auto;
}

.summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 18px 0 24px;
}
.summary-card {
  padding: 15px;
  border: 1px solid #27354a;
  border-radius: 13px;
  background: #0d1627;
}
.summary-card strong {
  display: block;
  color: #f8fafc;
  font-size: 23px;
}
.summary-card span {
  color: #94a3b8;
  font-size: 12px;
}
.tracking-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 520px;
}
.task-list {
  display: grid;
  gap: 8px;
}
.task-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  text-align: left;
}
button.task-item {
  cursor: pointer;
}
.task-item span,
.task-item small {
  color: #94a3b8;
}
.users-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(500px, 2fr);
  gap: 16px;
  align-items: start;
}
.users-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.user-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #0f172a;
}
.user-card > div:first-child {
  display: grid;
  gap: 4px;
}
.user-card small {
  color: #64748b;
}
.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.user-actions select {
  width: auto;
}
.active-check {
  display: flex;
  align-items: center;
}
.active-check input {
  width: auto;
  min-height: auto;
}
.owner-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.board {
  display: grid;
  gap: 26px;
}
.board-group {
  min-width: 0;
}
.board-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.board-group-heading h2 {
  margin: 0 0 3px;
  font-size: 18px;
}
.board-group-heading p {
  margin: 0;
}
.group-count {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border: 1px solid #334155;
  border-radius: 50%;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
}
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 12px;
  align-items: start;
}
.column {
  min-height: 160px;
  padding: 11px;
  border: 1px solid #27354a;
  border-top: 3px solid var(--accent);
  border-radius: 13px;
  background: #101827cc;
}
.column header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.column h3 {
  margin: 0;
  font-size: 13px;
}
.count {
  color: #94a3b8;
  font-size: 12px;
}
.empty-column {
  margin: 22px 6px;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}
.empty-state {
  padding: 55px 24px;
  border: 1px dashed #475569;
  border-radius: 16px;
  text-align: center;
  background: #0d1627;
}
.empty-state h2 {
  margin: 4px 0 8px;
}
.empty-state p:last-child {
  color: #94a3b8;
}
.lead {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid #334155;
  border-radius: 11px;
  background: #1b2739;
  cursor: grab;
}
.lead:hover {
  border-color: #64748b;
}
.lead:active {
  cursor: grabbing;
}
.lead.dragging {
  opacity: 0.35;
  border-color: #60a5fa;
}
.lead h3 {
  margin: 7px 0 7px;
  font-size: 14px;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.badge {
  padding: 3px 7px;
  border-radius: 99px;
  background: #334155;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 800;
}
.lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}
.lead-actions button {
  border: 1px solid #475569;
  border-radius: 7px;
  padding: 6px 8px;
  background: #0f172a;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 11px;
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease;
}
.lead-actions button:hover {
  border-color: #93c5fd;
  color: #fff;
  transform: translateY(-1px);
}
.lead-actions button:active {
  transform: translateY(1px) scale(0.98);
}

.message {
  padding: 10px 13px;
  border-radius: 9px;
  background: #172554;
  color: #bfdbfe;
  animation: message-in 0.2s ease-out;
}
.message.error {
  background: #450a0a;
  color: #fecaca;
}
@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .button,
  .lead-actions button,
  .message,
  .drawer {
    transition: none;
    animation: none;
  }
}
.config-view,
.files-view {
  padding-bottom: 40px;
}
.config-card {
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid #334155;
  border-radius: 16px;
  background: #111827dd;
}
.config-card h2 {
  margin-top: 0;
}
.config-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.config-grid .wide {
  grid-column: 1 / -1;
}
.config-grid .button {
  justify-self: start;
}
.config-section {
  padding: 18px;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #0f172acc;
}
.config-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 18px;
}
.config-section-heading h3 {
  margin: 0 0 5px;
  font-size: 16px;
}
.config-section-heading p {
  margin: 0;
  color: #9aabc1;
  font-size: 13px;
  line-height: 1.5;
}
.config-step {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: #1e3a5f;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
}
.config-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}
.config-fields > .wide {
  grid-column: 1 / -1;
}
.config-status-block {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #29384c;
  border-radius: 9px;
  background: #111c2e;
}
.mockup-settings {
  display: grid;
  gap: 14px;
}
.mockup-provider-field {
  max-width: 520px;
}
.mockup-active-model {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #3b82f6;
  border-left: 4px solid #60a5fa;
  border-radius: 10px;
  background: linear-gradient(110deg, #172b46, #111c2e);
}
.mockup-active-model span:first-child {
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mockup-active-model strong {
  color: #f8fafc;
  font-size: 16px;
}
.mockup-active-model span:last-child {
  color: #b8c7da;
  font-size: 13px;
}
.mockup-provider-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  padding: 16px;
  border: 1px solid #29384c;
  border-radius: 10px;
  background: #0b1422;
}
.mockup-provider-panel > .wide {
  grid-column: 1 / -1;
}
[hidden] {
  display: none !important;
}
.field-label {
  color: #a8b6c9;
  font-size: 12px;
  font-weight: 700;
}
.config-status {
  line-height: 1.4;
}
.config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.config-actions .button {
  min-height: 42px;
}
.config-section input,
.config-section select {
  min-height: 42px;
}
.config-section small {
  display: block;
  margin-top: 6px;
  color: #8392a8;
  line-height: 1.45;
}
.advanced-settings {
  padding: 14px;
  border: 1px solid #334155;
  border-radius: 10px;
}
.advanced-settings .config-grid {
  padding-top: 16px;
}
.query-suggestions {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
}

.query-suggestions-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.query-suggestions-list p {
  flex-basis: 100%;
  margin: 0;
}

.query-suggestions-list label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.queries {
  width: 100%;
  margin: 10px 0;
  font:
    13px/1.5 ui-monospace,
    monospace;
}
.technical-path {
  opacity: 0.65;
}
.technical-details > summary {
  font-size: 15px;
}
.effective {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin-top: 20px;
}
.effective dt {
  color: #94a3b8;
}
.effective dd {
  margin: 0;
  color: #e2e8f0;
  word-break: break-word;
}
.danger-zone {
  border-color: #7f1d1d;
}
.outputs-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.outputs-heading h2 {
  margin-bottom: 0;
}
.output-search {
  margin: 14px 0 8px;
}
.outputs {
  max-height: 560px;
  overflow-y: auto;
  padding-right: 6px;
  border-top: 1px solid #1e293b;
}
.output-group {
  border-bottom: 1px solid #1e293b;
}
.output-group summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  color: #dbeafe;
  cursor: pointer;
  list-style: none;
}
.output-group summary::-webkit-details-marker {
  display: none;
}
.output-group summary::before {
  content: "+";
  width: 16px;
  color: #60a5fa;
}
.output-group[open] summary::before {
  content: "-";
}
.output-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 0 0 12px 18px;
}
.output-picker .button {
  min-height: 34px;
  padding: 0 11px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4;
  background: #02061799;
}
.drawer {
  position: fixed;
  z-index: 5;
  top: 0;
  right: 0;
  width: min(780px, 100vw);
  height: 100vh;
  overflow: auto;
  padding: 32px 26px;
  background: #0f172a;
  border-left: 1px solid #334155;
  box-shadow: -18px 0 50px #020617aa;
  transform: translateX(100%);
  transition: transform 0.2s ease;
}
.drawer.open {
  transform: translateX(0);
}
.drawer-close {
  position: absolute;
  top: 12px;
  right: 18px;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 30px;
  cursor: pointer;
}
.detail-title {
  padding-right: 30px;
}
.lead-unique-id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}
.lead-unique-id code {
  color: #cbd5e1;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.detail-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #334155;
}
.detail-section h3 {
  margin: 0 0 10px;
  color: #93c5fd;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.brief {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  color: #cbd5e1;
  font:
    13px/1.55 ui-monospace,
    monospace;
}
.followup {
  padding: 10px 0;
  border-bottom: 1px solid #1e293b;
}
.followup small {
  color: #94a3b8;
}
.followup-form {
  display: grid;
  gap: 9px;
}
.followup-form .button {
  justify-self: start;
}

.drawer { height: 100dvh; overflow-x: hidden; padding-top: 54px; }
.drawer-close { position: sticky; top: 0; float: right; z-index: 2; background: #0f172a; border-radius: 8px; }
.drawer .detail-section { min-width: 0; overflow-wrap: anywhere; }
.drawer .detail-title h2 { overflow-wrap: anywhere; }
.drawer .badges { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer .brief { max-height: none; overflow: visible; font-family: inherit; line-height: 1.7; }
.drawer .followup-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.drawer .followup-form label { display: grid; gap: 7px; min-width: 0; color: #cbd5e1; font-size: 13px; }
.drawer .followup-form input, .drawer .followup-form select, .drawer .followup-form textarea { width: 100%; min-width: 0; }
.drawer .followup-form button, .drawer .followup-form label:has(textarea) { grid-column: 1 / -1; }
.drawer .button { white-space: normal; max-width: 100%; }
.drawer .owner-control { display: flex; flex-wrap: wrap; gap: 12px; }
.drawer .owner-control select { flex: 1; min-width: 150px; }
.drawer details > summary { cursor: pointer; padding: 12px 0; color: #93c5fd; font-weight: 600; }
.opportunity-item { margin-top: 16px; padding: 18px; border: 1px solid #334155; border-radius: 12px; background: #162238; }
.opportunity-item h4 { margin: 0 0 14px; font-size: 16px; }
.opportunity-item dl { margin: 0; }
.opportunity-item dt { margin-top: 12px; color: #93c5fd; font-size: 12px; font-weight: 600; }
.opportunity-item dd { margin: 5px 0 0; color: #cbd5e1; line-height: 1.6; }
@media (max-width: 600px) {
  .drawer .followup-form { grid-template-columns: minmax(0, 1fr); }
  .drawer .mockup-responsive-grid { grid-template-columns: minmax(0, 1fr); }
  .drawer .button { min-height: 44px; }
}

@media (max-width: 1000px) {
  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .more-filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .summary {
    grid-template-columns: repeat(3, 1fr);
  }
  .config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .config-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mockup-provider-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .users-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .process-step {
    flex-basis: 100%;
    width: 100%;
    min-height: 78px;
  }
}

@media (max-width: 620px) {
  .topbar,
  main,
  .nav,
  .console-panel {
    padding-left: 14px;
    padding-right: 14px;
  }
  .topbar {
    align-items: start;
    flex-direction: column;
  }
  .user-session {
    justify-content: flex-start;
  }
  .workspace-heading {
    align-items: start;
    flex-direction: column;
  }
  .workspace-heading > .meta {
    text-align: left;
  }
  .toolbar,
  .more-filters-grid,
  .summary,
  .config-grid {
    grid-template-columns: 1fr;
  }
  .process-flow {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .process-step {
    flex: 1 1 auto;
    width: 100%;
  }
  .config-fields {
    grid-template-columns: 1fr;
  }
  .config-fields > .wide {
    grid-column: auto;
  }
  .config-actions .button {
    flex: 1 1 100%;
  }
  .toolbar .button {
    width: 100%;
  }
  .bulk-bar .meta {
    flex-basis: 100%;
  }
  .bulk-bar select,
  .bulk-bar .button {
    width: 100%;
  }
  .board-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .column {
    flex: 0 0 86vw;
    scroll-snap-align: start;
  }
  .output-picker {
    grid-template-columns: 1fr;
    padding-left: 0;
  }
  .task-item,
  .user-card {
    grid-template-columns: 1fr;
  }
  .user-actions {
    justify-content: flex-start;
  }
  .auth-code-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .drawer {
    height: 100dvh;
    padding-left: 18px;
    padding-right: 18px;
  }
}
.mockup-section label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.mockup-section input, .mockup-section select, .mockup-section textarea { width: 100%; min-width: 0; }
.mockup-section input[type="color"] { height: 42px; padding: 4px; }
.mockup-section textarea { min-height: 82px; resize: vertical; }
.mockup-status { margin-top: 12px; padding: 10px 12px; border-radius: 8px; color: var(--muted); }
.mockup-status:empty { display: none; }
.mockup-status.is-running { background: #eff6ff; color: #1d4ed8; }
.mockup-status.is-done { background: #ecfdf3; color: #067647; }
.mockup-status.is-error { background: #fef3f2; color: #b42318; }
.mockup-result { margin-top: 16px; }
.mockup-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.mockup-preview { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border: 1px solid var(--border,#dce4df); border-radius: 12px; background: #fff; }
.mockup-responsive-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;margin-top:1rem}.mockup-responsive-grid figure{margin:0;display:flex;flex-direction:column;gap:.55rem;padding:1rem;border:1px solid var(--line,#deded8);border-radius:14px;background:var(--surface,#fff)}.mockup-responsive-grid figcaption{font-size:.9rem;font-weight:650}.mockup-responsive-grid .mockup-preview{width:100%;height:auto;max-height:360px;object-fit:contain;background:#f3f2ee;border-radius:8px}.mockup-responsive-grid .mockup-preview-mobile{max-height:360px}
.mockup-piece-actions{display:flex;align-items:center;gap:.6rem;margin-top:auto}.mockup-piece-actions .button:first-child{flex:1;text-align:center}.mockup-piece-actions .mockup-download-icon{flex:none;display:inline-flex;align-items:center;justify-content:center;width:2.8rem;min-width:2.8rem;height:2.8rem;padding:0;font-size:1.5rem;line-height:1}
