:root {
  --paper: #f6f7f8;
  --surface: #ffffff;
  --surface-2: #eff2f4;
  --surface-3: #e8eeee;
  --ink: #202326;
  --muted: #6f7478;
  --line: #d9dee2;
  --line-soft: rgba(32, 35, 38, 0.08);
  --navy: #243449;
  --clay: #b86f57;
  --clay-dark: #9f5741;
  --sage: #5e8173;
  --amber: #d8a647;
  --blue: #4b6f92;
  --danger: #ab4f4f;
  --shadow: 0 18px 42px rgba(20, 28, 36, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", Helvetica, Arial, sans-serif;
}

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

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.brand-name {
  font-size: 18px;
  font-weight: 850;
}

.brand-caption {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

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

.nav-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item i {
  font-size: 20px;
}

.nav-item span {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item b {
  color: var(--sage);
  font-size: 13px;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(94, 129, 115, 0.16);
  background: var(--surface-3);
  color: var(--ink);
}

.sidebar-status {
  position: absolute;
  right: 18px;
  bottom: 24px;
  left: 18px;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(94, 129, 115, 0.13);
}

.sidebar-status strong,
.sidebar-status span {
  display: block;
  font-size: 12px;
}

.sidebar-status span {
  margin-top: 3px;
  color: var(--muted);
}

.main-shell {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--sage);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.15;
}

h3 {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.2;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

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

.search-box {
  display: grid;
  grid-template-columns: 20px minmax(180px, 270px);
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.primary-button,
.secondary-button,
.icon-button,
.text-button {
  border-radius: var(--radius);
  font-weight: 800;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.primary-button {
  background: var(--clay);
  color: #fff;
}

.primary-button:hover {
  background: var(--clay-dark);
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #c9cdd0;
  color: #fff;
}

.secondary-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.secondary-button:hover,
.icon-button:hover {
  border-color: #c4cbd0;
  background: #fdfdfd;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.icon-button i {
  font-size: 20px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--sage);
}

.wide {
  width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.dashboard-layout,
.history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
}

.dashboard-main {
  min-width: 0;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card,
.featured-project,
.project-card,
.side-panel,
.upload-pane,
.analysis-pane,
.flow-steps,
.canvas-zone,
.inspector,
.history-table,
.credit-hero,
.settings-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(20, 28, 36, 0.04);
}

.metric-card {
  min-height: 112px;
  padding: 18px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 34px;
  line-height: 1;
}

.featured-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 22px;
  margin-bottom: 18px;
  padding: 22px;
}

.featured-copy p {
  max-width: 580px;
  margin: 10px 0 18px;
}

.featured-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 0;
}

.featured-images img {
  width: 100%;
  height: 228px;
  border-radius: var(--radius);
  object-fit: cover;
}

.progress-line {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress-line span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--clay));
}

.progress-line.active span {
  width: 42%;
  animation: loadbar 1.6s ease-in-out infinite;
}

@keyframes loadbar {
  0% {
    transform: translateX(-110%);
  }
  70%,
  100% {
    transform: translateX(240%);
  }
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.button-row.center {
  justify-content: center;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  overflow: hidden;
}

.project-card button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.project-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.project-card .copy {
  padding: 14px;
}

.project-card h3 {
  margin-bottom: 6px;
}

.project-card p {
  min-height: 40px;
  margin-bottom: 12px;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.pill.ready,
.pill.soft {
  background: var(--surface-3);
  color: var(--sage);
}

.pill.warning {
  background: rgba(216, 166, 71, 0.16);
  color: #90691e;
}

.pill.danger {
  background: rgba(171, 79, 79, 0.13);
  color: var(--danger);
}

.right-column {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.side-panel {
  padding: 18px;
}

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

.panel-title p {
  margin: 4px 0 0;
  font-size: 12px;
}

.panel-title.compact {
  margin-bottom: 8px;
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.status-list b {
  color: var(--sage);
  font-size: 12px;
}

.analysis-summary {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  align-items: center;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 8px solid rgba(94, 129, 115, 0.18);
  border-top-color: var(--sage);
  border-radius: 50%;
}

.score-ring span {
  font-size: 14px;
  font-weight: 850;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip-row span,
.chip-row button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--sage);
  font-size: 12px;
  font-weight: 800;
}

.chip-row button {
  border-color: rgba(94, 129, 115, 0.16);
}

.chip-row button.active {
  background: var(--sage);
  color: #fff;
}

.workflow-layout {
  display: grid;
  grid-template-columns: 210px minmax(420px, 1fr) minmax(360px, 440px);
  gap: 18px;
  align-items: start;
}

.flow-steps {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.step {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.step span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  font-weight: 850;
}

.step b,
.step small {
  display: block;
}

.step small {
  margin-top: 2px;
  font-size: 11px;
}

.step.active,
.step.done {
  background: var(--surface-3);
  color: var(--ink);
}

.step.done span {
  background: var(--sage);
  color: #fff;
}

.upload-pane,
.analysis-pane {
  min-height: calc(100vh - 142px);
  padding: 18px;
}

.pane-header {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 470px;
  border: 1px dashed #c8d0d4;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fbfcfc, #f5f7f8);
}

.drop-zone.dragging {
  border-color: var(--sage);
  background: rgba(94, 129, 115, 0.07);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-empty {
  max-width: 360px;
  padding: 28px;
  text-align: center;
}

.drop-empty i {
  display: block;
  margin-bottom: 14px;
  color: var(--sage);
  font-size: 46px;
}

.drop-empty h3 {
  font-size: 22px;
}

.asset-preview {
  position: relative;
  width: min(78%, 520px);
  aspect-ratio: 1;
}

.asset-preview img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  object-fit: contain;
}

.asset-badge,
.canvas-label {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(32, 35, 38, 0.84);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.upload-footer {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.upload-footer .primary-button {
  min-width: 128px;
}

.upload-footer p {
  margin-bottom: 0;
  font-size: 13px;
}

.analysis-empty,
.analysis-loading {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 520px;
  text-align: center;
}

.analysis-empty i {
  color: var(--sage);
  font-size: 48px;
}

.loading-orbit {
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  border: 6px solid rgba(94, 129, 115, 0.16);
  border-top-color: var(--sage);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-orbit.small {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-width: 4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.warning-box {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(216, 166, 71, 0.36);
  border-radius: var(--radius);
  background: rgba(216, 166, 71, 0.1);
}

.warning-box p {
  margin: 4px 0 0;
  font-size: 13px;
}

.answer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.answer-option,
.recommendation-card,
.option-grid button,
.rail-thumb,
.rail-action,
.segmented button {
  border-radius: var(--radius);
}

.answer-option {
  min-height: 38px;
  border: 1px solid rgba(216, 166, 71, 0.35);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.answer-option.active {
  border-color: var(--clay);
  background: rgba(184, 111, 87, 0.12);
  color: var(--clay-dark);
}

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

.recommendation-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  text-align: left;
}

.recommendation-card.active {
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(184, 111, 87, 0.12);
}

.rec-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.rec-head strong {
  font-size: 14px;
}

.rec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.generate-bar {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.quick-controls,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.quick-controls label,
.detail-grid label,
.settings-list label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

select,
.settings-list input,
.detail-grid input,
.range-field input {
  min-height: 38px;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

select {
  padding: 0 10px;
}

.detail-drawer {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfc;
}

.detail-drawer summary {
  min-height: 42px;
  padding: 12px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.detail-grid {
  grid-template-columns: repeat(2, 1fr);
  padding: 0 12px 12px;
}

.studio-layout {
  display: grid;
  grid-template-columns: 82px minmax(480px, 1fr) 350px;
  gap: 18px;
  min-height: calc(100vh - 142px);
}

.asset-rail {
  display: grid;
  align-content: start;
  gap: 10px;
}

.rail-thumb,
.rail-action {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
}

.rail-thumb {
  overflow: hidden;
  aspect-ratio: 1;
  padding: 4px;
}

.rail-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: cover;
}

.rail-thumb.active {
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(184, 111, 87, 0.14);
}

.rail-action {
  display: grid;
  place-items: center;
  height: 50px;
  color: var(--sage);
}

.canvas-zone,
.inspector {
  padding: 18px;
}

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

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-width: 280px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.segmented button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.segmented button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(20, 28, 36, 0.08);
}

.canvas-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - 250px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #eef0f0, #dfe3e4);
}

.canvas-frame > img {
  max-width: min(74%, 560px);
  max-height: calc(100vh - 300px);
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: var(--shadow);
}

.compare-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 88%;
}

.compare-view figure {
  position: relative;
  margin: 0;
}

.compare-view img {
  width: 100%;
  max-height: calc(100vh - 330px);
  border-radius: var(--radius);
  object-fit: cover;
}

.compare-view figcaption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 7px 9px;
  border-radius: var(--radius);
  background: rgba(32, 35, 38, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.generation-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  background: rgba(246, 247, 248, 0.78);
  backdrop-filter: blur(10px);
  text-align: center;
}

.generation-overlay span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.inspector-section {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.option-grid button {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 850;
}

.option-grid button.active {
  border-color: var(--clay);
  background: rgba(184, 111, 87, 0.1);
  color: var(--clay-dark);
}

.prompt-field,
.range-field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

textarea {
  min-height: 112px;
  padding: 10px;
  resize: vertical;
}

.queue-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.queue-list {
  display: grid;
  gap: 8px;
}

.queue-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
}

.queue-item span {
  color: var(--muted);
}

.history-table,
.settings-panel {
  padding: 18px;
}

.table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 140px 110px;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.asset-grid figure {
  margin: 0;
}

.asset-grid img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
}

.asset-grid figcaption {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 850;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  gap: 18px;
}

.credit-hero {
  min-height: 260px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(36, 52, 73, 0.96), rgba(75, 111, 146, 0.9) 55%, rgba(184, 111, 87, 0.92));
  color: #fff;
}

.credit-hero span,
.credit-hero p {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 750;
}

.credit-hero strong {
  display: block;
  margin: 10px 0;
  font-size: 76px;
  line-height: 0.95;
}

.settings-list {
  display: grid;
  gap: 12px;
}

.settings-list label {
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 190px);
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.snapshot-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.snapshot-dialog::backdrop {
  background: rgba(32, 35, 38, 0.28);
}

.snapshot-dialog pre {
  overflow: auto;
  max-height: 560px;
  margin: 0;
  padding: 14px;
  border-radius: var(--radius);
  background: #111416;
  color: #e8eeee;
  font-size: 12px;
  line-height: 1.55;
}

.dialog-copy {
  margin-bottom: 18px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  transform: translateY(18px);
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 14px;
  border: 1px solid rgba(32, 35, 38, 0.1);
  border-radius: var(--radius);
  background: rgba(32, 35, 38, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 780;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .brand-block {
    justify-content: center;
  }

  .brand-block > div:not(.brand-mark),
  .nav-item span,
  .nav-item b,
  .sidebar-status {
    display: none;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .dashboard-layout,
  .history-layout,
  .workflow-layout,
  .studio-layout,
  .account-layout {
    grid-template-columns: 1fr;
  }

  .flow-steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .upload-pane,
  .analysis-pane {
    min-height: auto;
  }

  .asset-rail {
    grid-template-columns: repeat(4, 72px);
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    top: auto;
    z-index: 20;
    height: 72px;
    padding: 8px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .brand-block,
  .sidebar-status {
    display: none;
  }

  .nav-stack {
    grid-template-columns: repeat(5, 1fr);
    height: 100%;
  }

  .nav-item {
    min-height: 56px;
    padding: 0;
  }

  .nav-item span {
    display: block;
    font-size: 11px;
  }

  .main-shell {
    padding: 18px 14px 92px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .search-box {
    flex: 1;
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .topbar-actions .primary-button {
    display: none;
  }

  .kpi-row,
  .project-grid,
  .featured-project,
  .featured-images,
  .quick-controls,
  .detail-grid,
  .flow-steps {
    grid-template-columns: 1fr;
  }

  .canvas-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
    min-width: 0;
  }

  .canvas-frame > img {
    max-width: 92%;
  }

  .table-row {
    grid-template-columns: 80px minmax(0, 1fr);
    padding: 10px;
  }

  .table-row b:nth-of-type(2),
  .table-row span:nth-of-type(2) {
    display: none;
  }
}
