:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f6fb;
  color: #20202b;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: #f7f6fb; }
button { font: inherit; cursor: pointer; }
.auth-gate { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 22px; background: #f7f6fb; }
.auth-gate[hidden] { display: none; }
.auth-card { width: min(390px, 100%); padding: 30px; border: 1px solid #ece9f1; border-radius: 12px; background: #fff; box-shadow: 0 18px 55px rgba(41, 29, 67, .12); }
.auth-mark { display: grid; width: 29px; height: 29px; place-items: center; margin-bottom: 20px; border-radius: 8px; background: linear-gradient(135deg, #ad87ff, #7154d8); color: #fff; font-weight: 900; }
.auth-card h1 { margin: 0; color: #282334; font-size: 1.45rem; letter-spacing: -.05em; }.auth-card p:not(.eyebrow):not(.auth-error) { color: #777184; font-size: .8rem; line-height: 1.5; }.auth-card .primary { width: 100%; margin-top: 18px; }.auth-button { display: block; text-align: center; text-decoration: none; }.auth-error { min-height: 1.2em; margin: 11px 0 0; color: #aa3b54; font-size: .72rem; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; gap: 27px; padding: 30px 18px 22px; background: #171d2e; color: #e9e8f0; }
.sidebar-brand { padding: 0 12px 16px; border-bottom: 1px solid #30384a; }
.markimage-wordmark { display: flex; align-items: center; gap: 11px; color: #faf9ff; font-size: 1.45rem; font-weight: 850; letter-spacing: -.075em; }
.brand-mark, .publisher-mark, .team-mark { display: grid; place-items: center; flex: none; color: #fff; font-weight: 900; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #ad87ff, #7154d8); font-size: 1.15rem; letter-spacing: -.13em; }
.wordmark-dot { color: #a889ff; }
.publisher-space { display: flex; align-items: center; gap: 10px; margin-top: 35px; color: #f6f5fb; }
.publisher-space > span:last-child, .security-note > span:last-child { display: grid; gap: 3px; min-width: 0; }
.publisher-space strong, .security-note strong { font-size: .78rem; line-height: 1.15; }
.publisher-space small, .security-note small { color: #a9adbe; font-size: .66rem; line-height: 1.2; }
.publisher-mark { width: 33px; height: 33px; border: 1px solid #4a5269; border-radius: 8px; background: #2b334a; color: #cbb9ff; font-size: .76rem; }
nav { display: grid; gap: 6px; }
.nav-heading { margin: 2px 12px 15px; color: #9298ac; font-size: .65rem; font-weight: 800; letter-spacing: .08em; }
.nav-item { padding: 11px 12px; border-radius: 7px; color: #c7cad5; text-align: left; text-decoration: none; font-size: .79rem; font-weight: 650; line-height: 1.25; }
.nav-item.active, .nav-item:hover { box-shadow: inset 3px 0 #af8dff; background: #373552; color: #fff; }
.security-note { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 20px 8px 0; border-top: 1px solid #30384a; color: #969cab; }
.team-mark { width: 34px; height: 34px; border-radius: 50%; background: #333c54; color: #d5d8e5; font-size: .7rem; }
.dot { display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: #71c99b; vertical-align: 1px; }

.workspace { width: min(1240px, 100%); margin: 0 auto; padding: 31px clamp(22px, 4vw, 58px) 60px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid #ebe9f0; }
.topbar-actions { display: flex; gap: 8px; }.topbar-secondary { width: auto; margin: 0; padding: 10px 14px; }
.topbar h1 { margin: 0; font-size: 1.68rem; line-height: 1.1; letter-spacing: -.06em; }
.eyebrow { margin: 0 0 7px; color: #8b859b; font-size: .62rem; font-weight: 800; letter-spacing: .1em; }
.primary, .secondary { border: 0; border-radius: 7px; font-size: .76rem; font-weight: 750; }
.primary { padding: 10px 14px; background: #65419c; color: white; box-shadow: 0 4px 10px rgba(78, 50, 130, .18); }
.primary:hover { background: #563586; }
.secondary { width: 100%; margin-top: 18px; padding: 10px 13px; background: #f0edf7; color: #533883; }

.execution-card, .panel { background: #fff; border: 1px solid #ece9f1; border-radius: 10px; box-shadow: 0 4px 18px rgba(37, 30, 58, .035); }
.execution-card { margin-top: 24px; padding: 23px 25px; }
.executions-panel { margin-top: 18px; }
.execution-title, .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.execution-title h2, .panel h2 { margin: 0; color: #292637; letter-spacing: -.035em; }
.execution-title h2 { font-size: 1.18rem; }
.muted { margin: .42rem 0 0; color: #797589; font-size: .78rem; line-height: 1.5; }
.status { display: inline-flex; align-items: center; width: fit-content; white-space: nowrap; padding: 5px 7px; border-radius: 4px; font-size: .6rem; font-weight: 800; letter-spacing: .04em; }
.neutral { background: #f0eef4; color: #777187; }
.ready { background: #e7f4ed; color: #39745a; }
.success { background: #e7f4ed; color: #39745a; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 21px; padding-top: 18px; border-top: 1px solid #eeeaf2; }
.metrics div { display: grid; gap: 3px; }
.metrics strong { color: #32294a; font-size: 1.25rem; letter-spacing: -.04em; }
.metrics span { color: #8a8499; font-size: .67rem; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(275px, .82fr); gap: 18px; margin-top: 18px; }
.panel { padding: 21px; }
.panel-heading { margin-bottom: 16px; }
.panel h2 { font-size: 1rem; }
.task-list { border-top: 1px solid #eeeaf2; }
.task { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #eeeaf2; }
.task-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; background: #e9ddff; color: #604697; font-size: .78rem; font-weight: 850; }
.task-icon.dim { background: #f0eef4; color: #938ca0; }
.task h3 { margin: 0; color: #332f40; font-size: .84rem; }
.task p { margin: 3px 0 0; color: #858091; font-size: .7rem; }
.text-action { padding: 5px 0; border: 0; background: transparent; color: #60418f; font-size: .72rem; font-weight: 750; }
.detail-panel dl { display: grid; gap: 13px; margin: 22px 0 0; }
.detail-panel dl div { padding-bottom: 12px; border-bottom: 1px solid #eeeaf2; }
.detail-panel dt { margin-bottom: 4px; color: #938ca0; font-size: .62rem; }
.detail-panel dd { margin: 0; color: #504b5e; font-size: .76rem; line-height: 1.45; }
.activity { margin-top: 18px; }
.adapter-list { display: grid; gap: 9px; margin-top: 16px; }
.adapter-row { padding: 14px; border: 1px solid #e9e4f0; border-radius: 8px; background: #fcfbfe; }
.adapter-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.adapter-title strong { color: #332f40; font-size: .84rem; }
.adapter-row p { margin: 7px 0 0; color: #777184; font-size: .72rem; line-height: 1.45; }.adapter-row b { color: #5b5369; }
.activity ol { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 10px 0 0; padding: 0; list-style: none; }
.activity li { padding-left: 11px; border-left: 1px solid #ddd6e9; color: #686274; font-size: .71rem; line-height: 1.45; }
.activity time { display: block; margin-bottom: 6px; color: #644394; font-size: .66rem; font-weight: 850; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 340px; padding: 12px 15px; border: 1px solid #e2d8f3; border-radius: 8px; background: #fff; box-shadow: 0 12px 32px rgba(38, 27, 61, .16); color: #3c3450; font-size: .78rem; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.pack-dialog { width: min(440px, calc(100% - 32px)); padding: 0; border: 1px solid #e8e3ef; border-radius: 11px; color: #2c2738; box-shadow: 0 24px 70px rgba(25, 18, 43, .22); }
.pack-dialog::backdrop { background: rgba(21, 18, 31, .28); backdrop-filter: blur(2px); }
.pack-dialog form { padding: 25px; }
.pack-dialog h2 { margin: 0; font-size: 1.18rem; letter-spacing: -.04em; }
.source-tabs { display: flex; gap: 5px; margin-top: 18px; padding: 4px; border-radius: 8px; background: #f3f0f7; }
.source-tab { flex: 1; padding: 8px; border: 0; border-radius: 5px; background: transparent; color: #746d81; font-size: .7rem; font-weight: 750; }
.source-tab.active { background: #fff; color: #5e3f90; box-shadow: 0 1px 4px rgba(43, 32, 66, .08); }
.field-label { display: block; margin: 22px 0 7px; color: #625c70; font-size: .72rem; font-weight: 750; }
.pack-dialog input, .pack-dialog select, .pack-dialog textarea, .auth-card input { width: 100%; padding: 10px 11px; border: 1px solid #ded9e7; border-radius: 7px; outline: none; color: #2d2839; background: #fff; font: inherit; font-size: .82rem; }
.pack-dialog textarea { min-height: 112px; resize: vertical; line-height: 1.45; }
.pack-dialog input:focus, .pack-dialog select:focus, .pack-dialog textarea:focus, .auth-card input:focus { border-color: #8868bc; box-shadow: 0 0 0 3px #ede7f7; }
.site-option { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px; border: 1px solid #e8e3ef; border-radius: 8px; }
.site-option input { accent-color: #65419c; }
.site-option span { display: grid; gap: 2px; flex: 1; font-size: .78rem; }.site-option small { color: #857e91; font-size: .68rem; }.site-option em { color: #43805f; font-size: .6rem; font-style: normal; font-weight: 850; }
.form-note { color: #8a8395; font-size: .68rem; line-height: 1.45; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }.dialog-actions .secondary { width: auto; margin: 0; }.dialog-actions .primary { padding: 10px 14px; }.primary:disabled { opacity: .6; cursor: wait; }
.task-dialog { width: min(560px, calc(100% - 32px)); }.task-actions { flex-wrap: wrap; }
.manual-step { margin: 18px 0; padding: 16px; border: 1px solid #f0c36a; border-left: 4px solid #d79520; border-radius: 8px; background: #fff9eb; }
.manual-step h3 { margin: 2px 0 8px; color: #553807; }
.manual-step p { margin: 0 0 10px; }
.profile-dialog { width: min(700px, calc(100% - 32px)); }.profile-dialog textarea { min-height: 92px; }.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 13px; }
.site-preferences { margin-top: 20px; padding: 16px; border: 1px solid #e1d8ef; border-radius: 9px; background: #faf8fe; }.site-preferences > .eyebrow { margin-bottom: 6px; }.site-preferences h3 { margin: 0; color: #342c43; font-size: .92rem; letter-spacing: -.02em; }.site-preference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }.site-preference-card { padding: 13px; border: 1px solid #e5dff0; border-radius: 8px; background: #fff; }.site-preference-card > strong { color: #51377c; font-size: .8rem; }.site-preference-card .field-label { margin-top: 13px; }.site-preference-card select { width: 100%; padding: 9px 10px; border: 1px solid #ded9e7; border-radius: 7px; background: #fff; color: #352d43; font: inherit; font-size: .76rem; }.site-preference-card select:disabled { color: #9992a2; background: #f7f5fa; }
.photo-dropzone { position: relative; display: grid; place-items: center; gap: 5px; min-height: 122px; padding: 18px; border: 1.5px dashed #b7a7d5; border-radius: 9px; background: #faf8fe; color: #686175; text-align: center; cursor: pointer; transition: .16s ease; }.photo-dropzone strong { color: #34284c; font-size: .86rem; }.photo-dropzone span { font-size: .75rem; line-height: 1.35; }.photo-dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }.photo-dropzone.dragging { border-color: #7d59ae; background: #f0eafe; box-shadow: 0 0 0 3px #e6ddf5; }
.profile-manager { width: min(560px, calc(100% - 32px)); }.profile-manager-list { display: grid; gap: 8px; margin-top: 16px; max-height: 420px; overflow: auto; }.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid #ebe6f2; border-radius: 8px; }.profile-row strong, .profile-row span { display: block; }.profile-row strong { font-size: .86rem; }.profile-row span { color: #777083; font-size: .75rem; margin-top: 3px; }.existing-photo-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }.existing-photo-list span { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 5px 7px; border-radius: 999px; background: #efe9f8; color: #4e3c6d; font-size: .72rem; }.remove-photo { border: 0; background: transparent; color: #6c4a9a; font: inherit; font-size: 1rem; line-height: 1; cursor: pointer; }
.site-fields { margin: 18px 0; padding: 15px; border: 1px solid #e7e0f1; border-radius: 9px; background: #fcfbfe; }.site-fields > .eyebrow { margin: 0 0 8px; }.choice-fieldset { margin: 13px 0; padding: 11px; border: 1px solid #e4ddec; border-radius: 7px; }.choice-fieldset legend { padding: 0 5px; color: #5a5169; font-size: .76rem; font-weight: 750; }.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }.choice-grid label { display: flex; align-items: center; gap: 6px; color: #4c4558; font-size: .76rem; }.choice-grid input { width: auto; padding: 0; }
.inline-select { display: flex; gap: 8px; }.inline-select .compact { width: auto; margin: 0; white-space: nowrap; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; align-items: center; padding: 14px 20px; }
  .sidebar-brand { display: flex; align-items: center; gap: 16px; padding: 0; border: 0; }
  .publisher-space { margin: 0; }
  .sidebar nav { display: flex; overflow: auto; }
  .nav-heading { display: none; }
  .nav-item { white-space: nowrap; }
  .security-note { display: none; }
  .content-grid { grid-template-columns: 1fr; }
  .activity ol { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .sidebar nav { display: none; }
  .workspace { padding: 24px 16px 42px; }
  .topbar, .execution-title { flex-direction: column; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .task { grid-template-columns: 31px minmax(0, 1fr) auto; }
  .task .text-action { grid-column: 2 / -1; justify-self: start; }
  .activity ol { grid-template-columns: 1fr; }
  .panel, .execution-card { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .site-preference-grid { grid-template-columns: 1fr; }
}
