:root {
  --bg: #101116;
  --panel: #1a1b24;
  --panel-soft: #222330;
  --panel-raised: #242634;
  --input: #12131a;
  --text: #ececf6;
  --muted: #a0a3b7;
  --muted-strong: #c5c8d8;
  --line: #333545;
  --line-strong: #46495d;
  --brand: #6f7df6;
  --brand-dark: #5966de;
  --accent: #5eead4;
  --danger: #b83b3b;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #6d718a #191a23;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #191a23;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #191a23;
  border-radius: 999px;
  background: #6d718a;
}

::-webkit-scrollbar-thumb:hover {
  background: #858aa8;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(111, 125, 246, 0.18), transparent 34vw),
    radial-gradient(circle at bottom right, rgba(94, 234, 212, 0.1), transparent 32vw),
    var(--bg);
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

body,
button,
input,
select,
textarea,
a {
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(26, 27, 36, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: white;
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
}

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

.topnav,
.account-box,
.hero-actions,
.toolbar-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-box {
  justify-content: flex-end;
}

.account-label {
  max-width: 190px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-button,
.plain-button,
.ghost-button,
.primary-button,
.danger-button,
.icon-text-button,
.icon-button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.nav-button,
.ghost-button,
.plain-button,
.icon-text-button {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.nav-button:hover,
.ghost-button:hover,
.plain-button:hover,
.icon-text-button:hover {
  border-color: var(--brand);
}

.primary-button {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

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

.danger-button {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
}

.large {
  min-height: 46px;
  padding: 0 18px;
}

.full {
  width: 100%;
  margin-top: 16px;
}

.icon-button {
  width: 36px;
  padding: 0;
  border-color: var(--line);
  background: var(--panel);
  font-size: 22px;
  line-height: 1;
}

main {
  padding: 24px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.hero-panel,
.quick-panel,
.control-panel,
.main-panel,
.admin-panel,
.log-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  min-height: 560px;
  overflow: hidden;
}

.hero-copy {
  align-self: center;
  padding: 56px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: 46px;
  line-height: 1.12;
}

h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

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

.hero-text {
  max-width: 650px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.hero-text p {
  margin: 0 0 8px;
}

.hero-visual {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 42px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    #15161d;
}

.home-illustration {
  width: min(100%, 390px);
  aspect-ratio: 1;
  justify-self: center;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.quick-panel,
.control-panel,
.admin-panel {
  padding: 20px;
}

.state-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.state-list div,
.selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.state-list span,
.selection-summary span {
  color: var(--muted);
  font-size: 13px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.control-panel {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow: auto;
}

.panel-head,
.category-head,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--text);
  color-scheme: dark;
}

textarea {
  min-height: 86px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.5;
}

input[type="date"] {
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0;
}

input[type="date"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: 40px;
}

input[type="number"] {
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  opacity: 0;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(19, 124, 105, 0.18);
  border-color: var(--brand);
}

.compact-modal {
  max-width: 380px;
}

.notice-message {
  margin: 22px 0 18px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.notice-actions {
  justify-content: center;
  margin-top: 0;
}

.toggle-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.toggle-line label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  font-size: 13px;
}

.toggle-line input,
.category-tree input,
.gallery-card input {
  width: auto;
  min-height: auto;
}

.selection-summary {
  margin-top: 14px;
}

.category-head {
  margin: 18px 0 10px;
}

.custom-generate-group {
  margin-bottom: 8px;
}

.custom-generate-items .field {
  margin-top: 0;
}

.custom-dot {
  width: 13px;
  height: 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.category-tree {
  display: grid;
  gap: 8px;
}

.category-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-soft);
}

.category-toggle {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  padding: 0 12px;
  background: transparent;
  text-align: left;
}

.category-toggle strong {
  font-size: 14px;
}

.category-toggle small {
  color: var(--muted);
}

.category-items {
  display: none;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.category-group.open .category-items {
  display: grid;
  gap: 8px;
}

.category-item {
  display: grid;
  grid-template-columns: auto 1fr 76px;
  gap: 8px;
  align-items: center;
}

.category-item span {
  font-size: 13px;
}

.category-item input[type="number"] {
  min-height: 34px;
  padding: 0 8px;
}

.main-panel {
  min-height: 680px;
  padding: 20px;
}

.warning-bar {
  margin-bottom: 16px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  font-size: 14px;
}

.toolbar {
  margin-bottom: 16px;
}

.toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  min-height: 260px;
}

.gallery.empty {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

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

.empty-state strong {
  color: var(--text);
}

.gallery-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.gallery-thumb {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #e6e6e6 25%, transparent 25%),
    linear-gradient(-45deg, #e6e6e6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6e6e6 75%),
    linear-gradient(-45deg, transparent 75%, #e6e6e6 75%);
  background-color: #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.gallery-thumb img {
  max-width: 100%;
  max-height: 100%;
}

.gallery-meta {
  min-width: 0;
}

.gallery-meta strong,
.gallery-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-meta small {
  color: var(--muted);
  font-size: 12px;
}

.gallery-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}

.log-panel {
  margin-top: 18px;
  padding: 16px;
  box-shadow: none;
}

.logs {
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  margin-top: 12px;
  color: #dbeee8;
  border-radius: 8px;
  padding: 12px;
  background: #15221f;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.log-line.error {
  color: #ffb8b8;
}

.log-line.ok {
  color: #b8ffd7;
}

.admin-table-wrap {
  overflow: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
}

.admin-table td input,
.admin-table td select {
  min-height: 34px;
}

.modal {
  width: min(480px, calc(100vw - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
}

.modal-box {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head h2,
.field span,
#authTitle {
  color: var(--text);
}

.modal-box input,
.modal-box select {
  background: #0f1018;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

.modal-box input::placeholder {
  color: #7d829a;
  -webkit-text-fill-color: #7d829a;
}

#apiKeyInput {
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.model-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.model-actions button {
  min-height: 40px;
}

#modelSelect:disabled {
  color: #8b90a8;
  -webkit-text-fill-color: #8b90a8;
}

.guide-modal {
  width: min(680px, calc(100vw - 24px));
}

.guide-list {
  display: grid;
  gap: 10px;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.guide-list section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--panel-soft);
}

.guide-list h3 {
  margin: 0 0 5px;
  color: #ffffff;
  font-size: 15px;
}

.guide-list p {
  margin: 0;
  color: #c8cbe0;
  font-size: 13px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 2000;
  min-width: 260px;
  max-width: calc(100vw - 32px);
  transform: translate(-50%, -120%);
  border: 1px solid rgba(94, 234, 212, 0.45);
  border-radius: 8px;
  padding: 13px 18px;
  background: #182c2f;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  text-align: center;
  font-weight: 800;
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.helper-link {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.support-link {
  display: grid;
  min-height: 44px;
  place-items: center;
  margin-top: 16px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.support-link:hover {
  border-color: var(--accent);
}

.order-controls {
  display: flex;
  gap: 6px;
}

.order-controls button {
  min-width: 34px;
  min-height: 32px;
  padding: 0;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.type-billing-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.type-billing-hint.paid {
  color: #fbbf24;
}

.type-example-preview {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.type-example-art {
  width: 96px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.type-example-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.type-example-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.type-example-copy strong {
  color: #fff;
  font-size: 14px;
}

.type-example-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-only {
  display: none;
}

body.is-admin .admin-only {
  display: inline-flex;
}

body.is-admin button.admin-only {
  display: inline-flex;
}

@media (max-width: 1080px) {
  .topbar,
  .home-grid,
  .hero-panel,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .topnav,
  .account-box {
    justify-content: flex-start;
  }

  .control-panel {
    position: static;
    max-height: none;
  }

  h1 {
    font-size: 34px;
  }
}

@media (max-width: 680px) {
  main,
  .topbar {
    padding: 14px;
  }

  .hero-copy,
  .hero-visual {
    padding: 22px;
  }

  .toolbar,
  .toolbar-actions,
  .toggle-line {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .category-item {
    grid-template-columns: auto 1fr;
  }

  .category-item input[type="number"] {
    grid-column: 2;
  }
}

/* UI readability and alignment pass */
button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.topbar {
  grid-template-columns: minmax(320px, 1fr) auto minmax(230px, auto);
  gap: 16px;
}

.brand {
  min-width: 0;
}

.brand strong {
  line-height: 1.2;
}

.topnav {
  justify-content: center;
}

.nav-button,
.plain-button,
.ghost-button,
.primary-button,
.danger-button,
.icon-text-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.nav-button,
.ghost-button,
.plain-button,
.icon-text-button {
  background: rgba(255, 255, 255, 0.03);
}

.nav-button:hover,
.ghost-button:hover,
.plain-button:hover,
.icon-text-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

main {
  width: min(1480px, 100%);
  margin: 0 auto;
}

.home-grid {
  align-items: stretch;
}

.hero-panel {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
}

.hero-copy {
  padding: clamp(28px, 4vw, 56px);
}

h1 {
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.1;
}

.hero-text {
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.65;
}

.hero-steps {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: hero-step;
}

.hero-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.035);
}

.hero-steps li::before {
  counter-increment: hero-step;
  content: counter(hero-step);
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.14);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.hero-notice {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(251, 191, 36, 0.07);
  color: #fde68a;
  font-size: 13px;
}

.hero-notice p {
  margin: 0;
}

.hero-actions {
  margin-top: 22px;
}

.hero-actions .primary-button,
.hero-actions .ghost-button {
  width: 150px;
  min-width: 150px;
  height: 46px;
}

.hero-visual {
  padding: clamp(24px, 3vw, 42px);
}

.quick-panel {
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.state-list {
  flex: 1;
  display: grid;
  grid-template-rows: repeat(3, 58px);
  align-content: start;
}

.state-list div,
.selection-summary {
  gap: 12px;
}

.state-list div {
  min-height: 0;
  padding: 0 16px;
}

.state-list strong,
.selection-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-list span,
.selection-summary span {
  color: #c8cbe0;
}

.workspace-grid {
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
}

.panel-head h2,
.toolbar h2,
.admin-panel h2 {
  line-height: 1.25;
}

input,
select {
  background: var(--input);
}

input:focus,
select:focus {
  outline: 3px solid rgba(111, 125, 246, 0.18);
}

.toggle-line label {
  line-height: 1.35;
}

.category-toggle {
  grid-template-columns: 18px minmax(0, 1fr) auto 18px;
}

.category-toggle strong,
.category-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-item {
  grid-template-columns: 18px minmax(0, 1fr) 82px;
  gap: 10px;
  min-height: 38px;
  border-radius: 8px;
  padding: 4px 6px;
}

.category-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.full {
  margin-top: 12px;
  min-height: 44px;
}

.category-head {
  margin-top: 26px;
}

.category-group {
  background: #242634;
}

.category-toggle small {
  color: #cbd0ff;
}

.category-toggle input,
.category-item input[type="checkbox"] {
  accent-color: var(--brand);
}

.category-chevron {
  color: #d9dcff;
  font-size: 15px;
  transition: none;
}

.category-group.open .category-chevron {
  transform: rotate(180deg);
}

.group-check:indeterminate {
  accent-color: var(--brand);
}

.category-item input[type="number"] {
  text-align: center;
}

.toolbar {
  flex-wrap: wrap;
}

.gallery-toolbar {
  margin-top: 24px;
}

.toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-actions button {
  min-width: 110px;
}

.gallery {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.gallery-card {
  min-width: 0;
}

.gallery-actions {
  grid-template-columns: 22px minmax(0, 1fr);
}

.logs {
  line-height: 1.55;
}

.log-panel {
  margin-top: 0;
  background: #191a23;
}

.log-panel summary {
  cursor: pointer;
  list-style: none;
}

.log-panel summary::-webkit-details-marker {
  display: none;
}

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

.log-chevron {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #d9dcff;
  transition: none;
}

.log-panel[open] .log-chevron {
  transform: rotate(180deg);
}

.log-panel .panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.logs {
  min-height: 220px;
  max-height: 300px;
  background: #090a0f;
  color: #cbd5ff;
  gap: 0;
}

.log-line {
  margin: 0;
  padding: 0;
  line-height: 1.45;
  white-space: pre-wrap;
}

.log-line span {
  color: #9aa5ff;
}

.log-line.error {
  color: #ff8f8f;
}

.log-line.ok {
  color: #8dffc0;
}

.gallery.empty {
  display: grid;
  grid-template-columns: 1fr !important;
  place-items: center;
  min-height: 260px;
}

.empty-state {
  justify-items: center;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  place-self: center;
  text-align: center;
}

.gallery.empty .empty-state {
  display: grid;
  align-content: center;
  justify-content: center;
  min-height: 220px;
}

.admin-table {
  min-width: 1080px;
  table-layout: fixed;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
}

.admin-table th {
  white-space: nowrap;
}

.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
  width: 86px;
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
  width: 230px;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
  width: 160px;
}

.admin-table th:nth-child(4),
.admin-table td:nth-child(4),
.admin-table th:nth-child(5),
.admin-table td:nth-child(5),
.admin-table th:nth-child(7),
.admin-table td:nth-child(7) {
  width: 112px;
}

.admin-table th:nth-child(6),
.admin-table td:nth-child(6) {
  width: 150px;
}

.admin-table th:nth-child(8),
.admin-table td:nth-child(8) {
  width: 148px;
}

.admin-table td input,
.admin-table td select {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.modal-box {
  padding: 22px;
}

.support-link {
  margin-top: auto;
}

.order-controls {
  justify-content: center;
}

@media (max-width: 1080px) {
  .topbar,
  .home-grid,
  .hero-panel,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .topnav,
  .account-box {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .topbar {
    gap: 12px;
  }

  .topnav,
  .account-box,
  .hero-actions,
  .toolbar-actions {
    width: 100%;
  }

  .topnav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .account-box,
  .hero-actions,
  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-label {
    max-width: none;
  }

  .hero-steps li {
    grid-template-columns: 28px minmax(0, 1fr);
  }
}

[hidden] {
  display: none !important;
}
