:root {
  --brand: #ff9900;
  --ink: #1f2933;
  --muted: #667085;
  --line: #d9dde3;
  --panel: #ffffff;
  --page: #f4f6f8;
  --amazon-dark: #131921;
  --amazon-blue: #232f3e;
  --ok: #0f766e;
  --danger: #b42318;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: linear-gradient(135deg, var(--amazon-dark), var(--amazon-blue));
}

.login-panel {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup.compact {
  padding: 18px;
  color: #fff;
}

.brand-lockup.compact span {
  display: block;
  color: #cbd5e1;
  font-size: 13px;
  margin-top: 2px;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #111827;
  font-weight: 900;
  overflow: hidden;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 25px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 17px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.hint,
.form-error {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-error {
  color: var(--danger);
}

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

.sidebar {
  background: var(--amazon-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.nav-list {
  display: grid;
  gap: 4px;
  padding: 8px;
}

.nav-item,
.ghost-button {
  border: 0;
  background: transparent;
  color: #d7dde6;
  text-align: left;
  padding: 12px 14px;
  border-radius: 6px;
}

.nav-item.active,
.nav-item:hover,
.ghost-button:hover {
  background: var(--amazon-blue);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  color: #cbd5e1;
  display: grid;
  gap: 10px;
  font-size: 13px;
}

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

.topbar {
  height: 78px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.usage-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff7e6;
  border: 1px solid #ffd38a;
  border-radius: 999px;
  padding: 9px 14px;
  color: #8a4b00;
}

.view-panel {
  padding: 24px 28px 40px;
}

.workflow-grid,
.admin-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 20px;
  align-items: start;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 20px;
  align-items: start;
}

.admin-grid {
  grid-template-columns: minmax(520px, 0.95fr) minmax(360px, 1.05fr);
}

.size-grid {
  display: grid;
  grid-template-columns: 1.4fr minmax(96px, 0.8fr) minmax(96px, 0.8fr);
  gap: 10px;
  align-items: end;
}

.input-panel,
.result-panel,
.generated-panel,
.chat-sidebar,
.chat-panel,
.admin-grid > section,
.settings-grid > section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  min-width: 0;
}

.input-panel {
  display: grid;
  gap: 16px;
}

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

.section-heading span {
  color: var(--muted);
  font-size: 13px;
}

.upload-box {
  border: 1px dashed #aab3c0;
  border-radius: 8px;
  min-height: 112px;
  display: grid;
  place-items: center;
  text-align: center;
  background: #fafafa;
  color: var(--muted);
}

.upload-box input {
  display: none;
}

.upload-box span {
  color: var(--ink);
  font-weight: 800;
}

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

.preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.compact-preview {
  grid-template-columns: repeat(4, minmax(0, 80px));
}

.chat-reference-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.chat-reference-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.chat-reference-legend strong,
.chat-reference-item > span,
.chat-message-references figure > span {
  color: var(--ink);
  font-weight: 800;
}

.chat-reference-item {
  display: grid;
  gap: 5px;
  margin: 0;
}

.chat-reference-item > span {
  font-size: 11px;
}

.compact-upload {
  min-height: 86px;
}

.template-grid {
  display: grid;
  gap: 14px;
}

.template-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.template-card.pending {
  border-color: #facc15;
  background: #fffdf3;
}

.template-card.rejected {
  border-color: #fecaca;
  background: #fff7f7;
}

.template-thumb {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
}

.template-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.template-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.template-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.status-badge {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  background: #eef2ff;
  color: #3730a3;
}

.status-badge.approved {
  background: #ecfdf3;
  color: #047857;
}

.status-badge.pending {
  background: #fffbeb;
  color: #92400e;
}

.status-badge.rejected {
  background: #fef2f2;
  color: #b42318;
}

.chat-sidebar,
.chat-panel {
  padding: 18px;
}

.chat-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.chat-list-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 4px;
  text-align: left;
}

.chat-list-item.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.16);
}

.chat-list-item span,
.chat-message-meta {
  color: var(--muted);
  font-size: 12px;
}

.chat-panel {
  display: grid;
  gap: 14px;
}

.chat-messages {
  min-height: 360px;
  max-height: 720px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
  display: grid;
  align-content: start;
  gap: 12px;
}

.chat-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.chat-message.user {
  background: #fff7e6;
  border-color: #ffd38a;
}

.chat-message p {
  margin: 0;
  line-height: 1.5;
}

.chat-message img {
  max-width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.chat-message-references {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 8px;
}

.chat-message-references figure {
  display: grid;
  gap: 5px;
  margin: 0;
}

.chat-message-references figure > span {
  font-size: 11px;
}

.chat-message-references img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.image-chat-draft strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.manual-copy-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fbfcfe;
  display: grid;
  gap: 12px;
}

.manual-copy-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e7ebf0;
  padding-bottom: 10px;
}

.manual-copy-head strong {
  font-size: 15px;
}

.manual-copy-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.style-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.style-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.style-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.18);
}

.style-card-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.style-card-text strong {
  font-size: 13px;
  line-height: 1.25;
}

.style-card-text small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.style-thumb {
  position: relative;
  width: 78px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid #d9e0ea;
  border-radius: 6px;
  background: linear-gradient(135deg, #f8fafc, #e7edf6);
}

.style-product,
.style-accent {
  position: absolute;
  display: block;
  border-radius: 4px;
}

.style-product {
  left: 24px;
  top: 18px;
  width: 30px;
  height: 20px;
  background: #111827;
  box-shadow: 0 7px 12px rgba(15, 23, 42, 0.22);
}

.style-product::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
}

.style-accent.one {
  left: 8px;
  top: 8px;
  width: 22px;
  height: 5px;
  background: var(--brand);
}

.style-accent.two {
  right: 8px;
  top: 10px;
  width: 18px;
  height: 5px;
  background: #2563eb;
}

.style-accent.three {
  left: 10px;
  bottom: 8px;
  width: 58px;
  height: 5px;
  background: #cbd5e1;
}

.style-thumb.faithful {
  background: #fff;
}

.style-thumb.faithful .style-product {
  left: 22px;
  top: 16px;
  outline: 2px solid #94a3b8;
}

.style-thumb.faithful .style-accent.one,
.style-thumb.faithful .style-accent.two {
  width: 8px;
  height: 8px;
  border: 1px solid #64748b;
  background: transparent;
}

.style-thumb.conversion .style-accent.one,
.style-thumb.conversion .style-accent.two,
.style-thumb.conversion .style-accent.three,
.style-thumb.specs .style-accent.one,
.style-thumb.specs .style-accent.two,
.style-thumb.specs .style-accent.three {
  height: 7px;
}

.style-thumb.mobile .style-accent.one,
.style-thumb.mobile .style-accent.three {
  left: 7px;
  width: 64px;
  height: 10px;
  background: #111827;
}

.style-thumb.lifestyle {
  background: linear-gradient(180deg, #dbeafe 0 45%, #e7f0dc 45% 100%);
}

.style-thumb.editorial {
  aspect-ratio: 16 / 9;
  width: 78px;
}

.style-thumb.macro .style-product {
  left: 16px;
  top: 8px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

.style-thumb.bundle .style-accent.one,
.style-thumb.bundle .style-accent.two {
  top: 32px;
  width: 12px;
  height: 14px;
}

.style-thumb.comparison::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 0;
  background: rgba(255, 153, 0, 0.18);
}

.style-thumb.studio {
  background: radial-gradient(circle at 50% 80%, rgba(15, 23, 42, 0.12), transparent 32%), linear-gradient(180deg, #ffffff, #edf2f7);
}

.style-thumb.warm {
  background: linear-gradient(135deg, #fff2d8, #f8fafc 45%, #f2e6d8);
}

.style-thumb.warm .style-accent.three {
  background: #d7b98c;
}

.style-thumb.tech {
  background: linear-gradient(135deg, #e8eef7, #c8d4e5);
}

.style-thumb.tech .style-accent.one,
.style-thumb.tech .style-accent.two {
  background: #38bdf8;
}

.style-thumb.outdoor {
  background: linear-gradient(180deg, #bfdbfe 0 48%, #dcecc6 48% 100%);
}

.style-thumb.minimal {
  background: #fff;
}

.style-thumb.minimal .style-product {
  left: 34px;
  top: 20px;
}

.style-thumb.minimal .style-accent.one,
.style-thumb.minimal .style-accent.two,
.style-thumb.minimal .style-accent.three {
  opacity: 0.35;
}

.style-thumb.retail {
  background: linear-gradient(135deg, #fff7ed, #fee2e2);
}

.style-thumb.retail .style-accent.one,
.style-thumb.retail .style-accent.three {
  height: 9px;
  background: #ef4444;
}

.style-thumb.material .style-product {
  left: 17px;
  top: 8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.style-thumb.gift {
  background: linear-gradient(135deg, #fff7ed, #f8fafc);
}

.style-thumb.gift .style-accent.one,
.style-thumb.gift .style-accent.two {
  top: 34px;
  width: 12px;
  height: 14px;
}

.style-thumb.compare::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 0;
  background: rgba(255, 153, 0, 0.2);
}

.style-thumb.compare::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 1px;
  background: #94a3b8;
}

.button-row,
.image-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 11px 15px;
  font-weight: 800;
}

.primary-button {
  background: var(--brand);
  color: #111827;
}

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

.danger-button {
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 11px 15px;
  font-weight: 800;
  background: #fff1f2;
  color: #991b1b;
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
}

.copy-grid {
  display: grid;
  gap: 14px;
}

.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 20px;
}

.copy-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.copy-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.18);
}

.copy-card h4 {
  margin: 0;
  font-size: 16px;
}

.copy-card p,
.copy-card li {
  line-height: 1.5;
}

.copy-card ul {
  margin: 0;
  padding-left: 18px;
}

.copy-details {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fafafa;
}

.copy-details summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}

.copy-details p {
  margin: 10px 0 0;
  color: #334155;
}

.copy-details pre {
  margin: 10px 0 0;
  padding: 10px;
  overflow: auto;
  white-space: pre-wrap;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #334155;
  font: inherit;
}

.generated-panel {
  margin-top: 20px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.generation-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8e6;
  color: #253246;
}

.generation-status p {
  margin: 3px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.generation-status.active {
  border-color: rgba(255, 153, 0, 0.55);
}

.generation-status .skip-current-button {
  width: auto;
  margin-left: auto;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.image-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.image-card.is-loading {
  border-color: rgba(255, 153, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.12);
}

.image-card.is-error {
  border-color: #fca5a5;
}

.image-card.is-error .retry-button {
  background: #fff1f2;
  color: #991b1b;
}

.image-thumb {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 14px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 153, 0, 0.22), rgba(35, 47, 62, 0.14)),
    #f8fafc;
  color: #253246;
  font-weight: 900;
}

.image-thumb small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(35, 47, 62, 0.18);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-card button {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 10px;
  color: var(--amazon-blue);
  font-weight: 800;
}

.image-meta {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.inline-form input {
  min-width: 0;
}

.inline-form .primary-button {
  grid-column: 1 / -1;
  justify-self: start;
}

.user-list,
.risk-grid {
  display: grid;
  gap: 14px;
}

.user-row,
.risk-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.daily-cost-panel {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.daily-cost-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.daily-cost-title span {
  color: var(--muted);
  font-size: 13px;
}

.daily-cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.daily-cost-table th,
.daily-cost-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.daily-cost-table th {
  color: var(--muted);
  background: #f8fafc;
  font-weight: 700;
}

.user-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.account-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  overflow: hidden;
}

.account-summary {
  display: grid;
  gap: 4px;
  grid-column: 1 / -1;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.account-summary strong,
.account-summary span,
.account-summary em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary span,
.account-summary em {
  color: var(--muted);
  font-style: normal;
}

.account-row label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
}

.account-row input {
  width: 100%;
  min-width: 0;
}

.account-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.account-permissions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.account-permissions label {
  display: flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
}

.account-permissions input {
  width: auto;
}

.protected-account {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #f8fafc;
  font-weight: 800;
}

.permission-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.permission-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 400;
}

.permission-row input {
  width: auto;
}

.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

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

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

th {
  background: #f9fafb;
  color: var(--muted);
  font-size: 13px;
}

.log-product-cell {
  display: grid;
  grid-template-columns: 54px minmax(180px, 1fr);
  gap: 10px;
  align-items: start;
  max-width: 360px;
}

.log-thumb {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f8fafc;
}

.log-thumb.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.log-product-copy {
  display: grid;
  gap: 3px;
}

.log-product-copy strong {
  font-size: 13px;
}

.log-product-copy small,
.log-product-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.skill-flow {
  margin: 0;
  padding-left: 20px;
  line-height: 1.9;
}

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

.modal {
  width: min(980px, 100%);
  max-height: 94vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  padding: 18px;
}

.modal .section-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding-bottom: 12px;
}

#annotationCanvas {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 14px;
  cursor: crosshair;
  touch-action: none;
}

#annotationCanvas.brush-mode {
  cursor: cell;
}

.annotation-toolbar {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.segmented-control {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.segmented-control button {
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 10px 14px;
  font-weight: 800;
}

.segmented-control button:last-child {
  border-right: 0;
}

.segmented-control button.active {
  background: var(--brand);
  color: #111827;
}

.upload-inline {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.upload-inline input {
  display: none;
}

.upload-inline span {
  font-weight: 800;
}

.compact-preview {
  grid-template-columns: repeat(3, minmax(72px, 96px));
  margin-bottom: 12px;
}

@media (max-width: 980px) {
  .app-shell,
  .workflow-grid,
  .chat-layout,
  .admin-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .app-shell {
    display: block;
  }

  .nav-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar {
    height: auto;
    padding: 18px;
    align-items: flex-start;
    gap: 12px;
  }

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

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

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

  .style-preview-grid {
    grid-template-columns: 1fr;
  }
}
