:root {
  --background: #f5f2fb;
  --card: #fff;
  --muted: #f0edf6;
  --muted-foreground: #716b88;
  --foreground: #181526;
  --primary: #16122f;
  --primary-foreground: #fff;
  --accent: #6743f5;
  --accent-soft: #eee9ff;
  --accent-soft-hover: #e6defe;
  --destructive: #d84636;
  --destructive-soft: #fff0ee;
  --warning: #9a5a11;
  --warning-soft: #fff4dc;
  --success: #08775b;
  --success-soft: #dff8ef;
  --border: #ded8ec;
  --shadow: 0 24px 70px rgba(28, 21, 58, .16);
  color: var(--foreground);
  background: var(--background);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 0; background: var(--background); }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 38%, transparent); outline-offset: 2px; }
.app-icon { width: 18px; height: 18px; flex: 0 0 auto; }

/* External review shell */
.review-toolbar { position: sticky; z-index: 60; top: 0; display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 22px; background: rgba(255,255,255,.95); box-shadow: 0 1px 0 var(--border); backdrop-filter: blur(18px); }
.review-brand { display: grid; gap: 2px; }
.review-brand strong { font-size: 15px; }
.review-kicker { color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.review-controls { display: flex; align-items: end; gap: 9px; }
.review-controls label { display: grid; gap: 3px; color: var(--muted-foreground); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.review-controls select, .quiet-button, .notes-toggle { min-height: 34px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); padding: 0 12px; }
.notes-toggle { grid-auto-flow: column !important; align-items: center; padding-top: 0 !important; }
.notes-toggle input { accent-color: var(--accent); }
.state-pills { display: flex; gap: 7px; overflow-x: auto; padding: 11px 22px 0; }
.state-pill { flex: 0 0 auto; border: 0; border-radius: 999px; background: var(--card); padding: 8px 12px; color: var(--muted-foreground); font-size: 11px; font-weight: 750; box-shadow: 0 1px 3px rgba(25,19,55,.08); }
.state-pill:hover { background: var(--accent-soft); color: var(--foreground); }
.state-pill.active { background: var(--primary); color: white; }
.prototype-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; align-items: start; gap: 16px; padding: 16px 22px 44px; }
.prototype-stage, .screen-root { min-width: 0; }
.review-notes { position: sticky; top: 84px; display: grid; max-height: calc(100vh - 104px); gap: 14px; overflow-y: auto; border-radius: 24px; background: var(--card); padding: 18px; box-shadow: 0 14px 42px rgba(27,20,60,.1); }
.review-notes[hidden] { display: none; }
.note-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note-group, .score-target { border-radius: 999px; padding: 5px 8px; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.note-group { background: var(--accent-soft); color: var(--accent); }
.score-target { background: var(--success-soft); color: var(--success); }
.review-notes h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.review-notes section { padding-top: 12px; box-shadow: inset 0 1px 0 var(--muted); }
.review-notes h3 { margin: 0 0 5px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.review-notes p, .review-notes li { margin: 0; color: var(--muted-foreground); font-size: 11px; line-height: 1.5; }
.review-notes ul { display: grid; gap: 4px; margin: 0; padding-left: 16px; }
.question-card { border-radius: 17px; background: var(--primary); padding: 13px !important; box-shadow: none !important; }
.question-card h3, .question-card p { color: white; }

/* Recognizable Journey frame */
.odia-app { position: relative; display: grid; min-height: 760px; max-height: 760px; grid-template-columns: 168px minmax(0, 1fr); overflow: hidden; border-radius: 26px; background: var(--background); box-shadow: 0 18px 55px rgba(31,23,56,.13); }
.app-sidebar { display: flex; min-width: 0; flex-direction: column; padding: 14px 10px; background: var(--card); box-shadow: 1px 0 0 var(--muted); }
.brand-mark { display: flex; align-items: center; gap: 8px; padding: 2px 9px 14px; font-size: 13px; }
.brand-mark > span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 10px; background: var(--primary); color: white; font-weight: 900; }
.app-sidebar nav { display: grid; gap: 2px; }
.nav-item { display: flex; min-height: 37px; align-items: center; gap: 9px; border: 0; border-radius: 999px; background: transparent; padding: 0 12px; font-size: 11px; text-align: left; }
.nav-item > span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 7px; background: var(--muted); color: var(--muted-foreground); font-size: 8px; font-weight: 800; }
.nav-item:hover, .nav-item.is-active { background: var(--accent-soft); }
.nav-item.is-active { font-weight: 800; }
.account-row { display: grid; min-width: 0; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 8px; margin-top: auto; padding: 9px; }
.account-row > b, .topbar b, .avatar { display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.account-row > b { width: 32px; height: 32px; font-size: 9px; }
.account-row > span { display: grid; min-width: 0; gap: 1px; }
.account-row strong, .account-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-row strong { font-size: 10px; }
.account-row small { color: var(--muted-foreground); font-size: 8px; }
.journey-main { min-width: 0; }
.topbar { display: flex; min-height: 53px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 20px; background: var(--card); font-size: 11px; }
.topbar > div { display: flex; align-items: center; gap: 6px; }
.topbar button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; }
.topbar b { width: 28px; height: 28px; font-size: 8px; }
.journey-canvas { min-height: 707px; overflow: hidden; padding: 18px; }
.journey-card { display: grid; grid-template-columns: 106px minmax(0,1fr); overflow: hidden; border-radius: 24px; background: var(--card); }
.journey-cover { display: grid; min-height: 123px; place-items: end center; background: linear-gradient(145deg,#d4d0dc,#b4b0c2); padding: 10px; color: var(--muted-foreground); font-size: 8px; }
.journey-card-body { min-width: 0; padding: 15px; }
.journey-title, .journey-actions, .journey-meta { display: flex; min-width: 0; align-items: center; gap: 8px; }
.journey-title h1 { margin: 0; font-size: 15px; }
.journey-title span { color: var(--muted-foreground); font-size: 9px; }
.journey-meta { flex-wrap: wrap; margin-top: 10px; color: var(--muted-foreground); font-size: 9px; }
.journey-meta b { color: var(--foreground); }
.journey-actions { margin-top: 14px; font-size: 10px; }
.avatar { width: 27px; height: 27px; font-size: 8px; }
.chip { border-radius: 999px; background: var(--accent-soft); padding: 5px 8px; color: var(--accent); }
.chip.success { background: var(--success-soft); color: var(--success); }
.journey-tabs { display: flex; gap: 11px; overflow: hidden; margin-top: 15px; border-radius: 999px; background: var(--card); padding: 4px; }
.journey-tabs button { flex: 0 0 auto; min-height: 31px; border: 0; border-radius: 999px; background: transparent; padding: 0 10px; color: var(--muted-foreground); font-size: 9px; }
.journey-tabs button.is-active { background: var(--primary); color: white; }
.builder-toolbar { display: flex; gap: 7px; margin: 16px 0; }
.builder-toolbar button, .soft-button { min-height: 31px; border: 0; border-radius: 999px; background: var(--accent-soft); padding: 0 11px; color: var(--accent); font-size: 9px; font-weight: 700; }
.day-label { display: grid; width: 45px; gap: 2px; color: var(--muted-foreground); font-size: 7px; }
.day-label strong { color: var(--foreground); font-size: 10px; }
.service-row { display: grid; width: calc(100% - 58px); min-height: 57px; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 8px; margin: -29px 0 13px 58px; border: 0; border-radius: 20px; background: var(--card); padding: 9px 12px; font-size: 9px; text-align: left; }
.service-row > div, .service-row > span { display: grid; gap: 4px; }
.service-row small { color: var(--muted-foreground); }
.service-row button, .service-row i { border: 0; background: transparent; font-style: normal; }
.service-row.selected { background: #fff9b8; }
.service-row.muted { background: #e9e4fb; }
.service-scrim { position: absolute; z-index: 4; inset: 0; background: rgba(18,14,36,.16); }
.service-sheet { position: absolute; z-index: 5; top: 0; right: 0; bottom: 0; display: flex; width: 58%; min-width: 420px; flex-direction: column; background: var(--card); box-shadow: -18px 0 46px rgba(25,19,53,.13); }
.service-sheet-header { display: flex; min-height: 62px; align-items: center; gap: 10px; padding: 0 16px; box-shadow: 0 1px 0 var(--muted); }
.service-sheet-header > div { display: flex; min-width: 0; flex: 1; align-items: center; gap: 7px; }
.service-sheet-header h2 { margin: 0; font-size: 14px; }
.service-sheet-header span { color: var(--muted-foreground); font-size: 8px; }
.status-pill { border-radius: 999px; background: var(--accent-soft); padding: 7px 14px; color: var(--primary) !important; font-size: 9px !important; font-weight: 800; }
.circle-button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 50%; background: transparent; font-size: 18px; }
.circle-button:hover { background: var(--accent-soft); }
.circle-button .app-icon { width: 14px; }
.danger-hover:hover { background: var(--destructive-soft); color: var(--destructive); }
.service-tabs { display: flex; min-height: 43px; gap: 15px; padding: 0 16px; box-shadow: 0 1px 0 var(--muted); }
.service-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted-foreground); font-size: 8px; }
.service-tabs button.active { border-bottom-color: var(--primary); color: var(--foreground); font-weight: 800; }
.service-sheet-body { flex: 1; overflow-y: auto; padding: 17px; background: color-mix(in srgb,var(--background) 46%,white); }
.service-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.service-form-grid label { display: grid; gap: 5px; color: var(--muted-foreground); font-size: 8px; }
.service-form-grid label span { min-height: 38px; border-radius: 16px; background: var(--card); padding: 11px; color: var(--foreground); font-size: 9px; box-shadow: 0 1px 3px rgba(30,22,58,.05); }
.activity-card { margin-top: 14px; border-radius: 22px; background: var(--card); padding: 14px; }
.activity-card header { display: flex; align-items: start; justify-content: space-between; font-size: 10px; }
.activity-card header small, .activity-card p { color: var(--muted-foreground); font-size: 8px; }
.sent-event { display: flex; align-items: center; gap: 10px; margin-top: 14px; border-radius: 16px; background: var(--success-soft); padding: 11px; color: var(--success); }
.sent-event > span { display: grid; gap: 3px; }
.sent-event strong { font-size: 9px; }
.sent-event small { color: var(--success); font-size: 8px; }
.service-sheet-footer { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; box-shadow: 0 -1px 0 var(--muted); }
.service-sheet-footer > div { display: flex; gap: 6px; }
.email-action { background: var(--primary); color: white; }

/* Shared controls */
.primary-button, .destructive-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 999px; padding: 0 15px; color: white; font-size: 10px; font-weight: 800; }
.primary-button { background: var(--primary); }
.primary-button:hover { background: #2a2450; }
.destructive-button { background: var(--destructive); }
.mode-switch { display: inline-flex; gap: 3px; border-radius: 999px; background: var(--muted); padding: 3px; }
.mode-switch button { min-height: 31px; border: 0; border-radius: 999px; background: transparent; padding: 0 11px; color: var(--muted-foreground); font-size: 10px; font-weight: 700; }
.mode-switch button.active { background: var(--card); color: var(--foreground); box-shadow: 0 1px 4px rgba(30,23,58,.1); }
.sender-warning, .lifecycle-banner, .readiness-banner { display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 10px; border-radius: 18px; padding: 10px 12px; }
.sender-warning { margin: 10px 14px 0; background: var(--destructive-soft); color: var(--destructive); }
.sender-warning strong, .lifecycle-banner strong, .readiness-banner strong { display: block; font-size: 10px; }
.sender-warning p, .lifecycle-banner small, .readiness-banner small { display: block; margin: 2px 0 0; font-size: 8px; line-height: 1.4; }
.sender-warning button, .lifecycle-banner button, .readiness-banner button { min-height: 29px; border: 0; border-radius: 999px; background: var(--card); padding: 0 10px; color: inherit; font-size: 8px; font-weight: 800; }

/* Final full-screen Focus studio */
.focus-studio { position: relative; display: flex; height: 760px; flex-direction: column; overflow: hidden; border-radius: 26px; background: var(--card); box-shadow: 0 18px 55px rgba(31,23,56,.16); }
.studio-header { display: grid; min-height: 68px; flex: 0 0 auto; grid-template-columns: auto minmax(190px,1fr) auto auto; align-items: center; gap: 12px; padding: 9px 14px; box-shadow: 0 1px 0 var(--muted); }
.back-to-journey { display: inline-flex; min-height: 34px; align-items: center; gap: 4px; border: 0; border-radius: 999px; background: var(--accent-soft); padding: 0 10px; color: var(--accent); font-size: 9px; font-weight: 800; }
.back-to-journey .app-icon { width: 13px; }
.studio-title { display: flex; min-width: 0; align-items: center; gap: 9px; }
.studio-title > .app-icon { width: 34px; height: 34px; border-radius: 11px; background: var(--accent-soft); padding: 8px; color: var(--accent); }
.studio-title span { display: grid; min-width: 0; gap: 2px; }
.studio-title h2 { overflow: hidden; margin: 0; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.studio-title p { margin: 0; color: var(--muted-foreground); font-size: 8px; }
.studio-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.draft-status { display: inline-flex; align-items: center; gap: 4px; margin-right: 5px; border-radius: 999px; padding: 6px 8px; font-size: 8px; font-weight: 800; }
.draft-status .app-icon { width: 11px; }
.draft-status.saved { background: var(--success-soft); color: var(--success); }
.draft-status.saving { background: var(--muted); color: var(--muted-foreground); }
.draft-status.error { background: var(--destructive-soft); color: var(--destructive); }
.studio-body { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(0,1.18fr) minmax(310px,.82fr); margin-top: 10px; }
.editor-pane, .inspector-pane { min-width: 0; min-height: 0; }
.editor-pane { box-shadow: inset -1px 0 0 var(--muted); }
.pane-scroll, .inspector-scroll { height: 100%; overflow-y: auto; padding: 14px; }
.pane-scroll { display: grid; align-content: start; gap: 12px; }
.inspector-pane { display: flex; flex-direction: column; background: color-mix(in srgb,var(--background) 55%,white); }
.inspector-pane > nav { display: flex; flex: 0 0 auto; gap: 4px; padding: 0 12px 9px; }
.inspector-pane > nav button { min-height: 31px; border: 0; border-radius: 999px; background: transparent; padding: 0 10px; color: var(--muted-foreground); font-size: 9px; font-weight: 700; }
.inspector-pane > nav button.active { background: var(--card); color: var(--foreground); box-shadow: 0 1px 4px rgba(30,23,58,.08); }
.compose-fields { display: grid; gap: 11px; }
.address-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.address-grid label, .text-field, .message-field { display: grid; min-width: 0; gap: 5px; }
.address-grid label > span, .text-field > span, .message-field > span { font-size: 9px; font-weight: 800; }
.field-control { display: flex; min-width: 0; min-height: 44px; align-items: center; gap: 8px; border: 0; border-radius: 18px; background: var(--muted); padding: 5px 9px; text-align: left; }
.field-control > b { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 8px; }
.field-control > span { display: grid; min-width: 0; flex: 1; gap: 1px; overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.field-control small { overflow: hidden; color: var(--muted-foreground); font-size: 7px; font-weight: 500; text-overflow: ellipsis; }
.field-control i { font-style: normal; }
.field-control button { border: 0; background: transparent; color: var(--accent); font-size: 15px; }
.cc-link { justify-self: start; min-height: 25px; border: 0; background: transparent; color: var(--muted-foreground); font-size: 9px; }
.text-field input, .message-field textarea { width: 100%; border: 0; border-radius: 18px; background: var(--muted); padding: 11px 12px; font-size: 10px; }
.message-field textarea { min-height: 225px; resize: none; line-height: 1.6; }
.message-field > span { display: flex; justify-content: space-between; }
.message-field small { color: var(--muted-foreground); font-size: 8px; font-weight: 500; }
.inline-detail-picker, .po-fields { border-radius: 22px; background: color-mix(in srgb,var(--muted) 70%,white); padding: 12px; }
.inline-detail-picker > header, .po-fields > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inline-detail-picker header > span, .po-fields header > span { display: grid; gap: 2px; }
.inline-detail-picker header strong, .po-fields header strong { font-size: 10px; }
.inline-detail-picker header small, .po-fields header small { color: var(--muted-foreground); font-size: 8px; line-height: 1.4; }
.inline-detail-picker header > b, .po-fields header > b { flex: 0 0 auto; border-radius: 999px; background: var(--accent-soft); padding: 5px 7px; color: var(--accent); font-size: 8px; }
.detail-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 10px; }
.detail-options button, .po-option-list button { display: grid; min-width: 0; grid-template-columns: 20px minmax(0,1fr); align-items: center; gap: 7px; border: 0; border-radius: 15px; background: var(--card); padding: 9px; text-align: left; }
.detail-options button:hover, .detail-options button.selected, .po-option-list button:hover, .po-option-list button.selected { background: var(--accent-soft); }
.detail-options .app-icon, .po-option-list .app-icon, .empty-check { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 6px; }
.detail-options .app-icon, .po-option-list .app-icon { background: var(--primary); padding: 3px; color: white; }
.empty-check { border: 1px solid var(--border); background: var(--card); }
.detail-options button > span:last-child, .po-option-list button > span:last-child { display: grid; min-width: 0; gap: 2px; }
.detail-options strong, .detail-options small, .po-option-list strong, .po-option-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-options strong, .po-option-list strong { font-size: 8px; }
.detail-options small, .po-option-list small { color: var(--muted-foreground); font-size: 7px; }
.detail-contract { margin: 9px 2px 0; color: var(--muted-foreground); font-size: 8px; line-height: 1.4; }
.always-visible { display: grid; gap: 5px; margin-top: 10px; border-radius: 16px; background: var(--card); padding: 10px; }
.always-visible > strong { color: var(--muted-foreground); font-size: 8px; text-transform: uppercase; }
.always-visible span { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 8px; font-size: 8px; }
.po-option-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 7px; }
.context-panel { border-radius: 22px; background: var(--card); padding: 15px; }
.context-panel > header { display: flex; align-items: center; gap: 10px; }
.context-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.context-panel header > div:last-child { display: grid; gap: 2px; }
.context-panel header strong { font-size: 11px; }
.context-panel header small { color: var(--muted-foreground); font-size: 8px; }
.context-panel dl { display: grid; margin: 13px 0; }
.context-panel dl div { display: grid; grid-template-columns: 75px minmax(0,1fr); gap: 8px; padding: 9px 0; box-shadow: inset 0 -1px 0 var(--muted); }
.context-panel dt { color: var(--muted-foreground); font-size: 8px; }
.context-panel dd { margin: 0; font-size: 8px; line-height: 1.45; }
.email-preview { overflow: hidden; border-radius: 22px; background: var(--card); box-shadow: 0 5px 22px rgba(28,21,58,.08); }
.email-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; box-shadow: 0 1px 0 var(--muted); }
.email-preview header > div { display: flex; align-items: center; gap: 8px; }
.email-preview header b { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: var(--primary); color: white; font-size: 8px; }
.email-preview header span { display: grid; gap: 1px; color: var(--success); font-size: 8px; font-weight: 800; }
.email-preview header div span { color: var(--foreground); }
.email-preview header small { color: var(--muted-foreground); font-size: 7px; font-weight: 500; }
.preview-body { padding: 16px; }
.preview-body h3 { margin: 0 0 13px; font-size: 12px; }
.plain-email-body { font-size: 9px; line-height: 1.55; }
.preview-body section { display: grid; gap: 6px; margin-top: 16px; border-radius: 16px; background: var(--muted); padding: 11px; }
.preview-body section > strong { font-size: 9px; }
.preview-body section div { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 7px; font-size: 8px; }
.preview-body section span { color: var(--muted-foreground); }
.preview-body footer { margin-top: 15px; color: var(--muted-foreground); font-size: 8px; line-height: 1.5; }
.preview-body footer strong { color: var(--foreground); }
.studio-footer { display: flex; min-height: 61px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; box-shadow: 0 -1px 0 var(--muted); }
.studio-footer > div { display: flex; align-items: center; gap: 8px; }
.studio-footer > div:first-child { display: grid; gap: 2px; }
.studio-footer > div:first-child span { font-size: 9px; font-weight: 700; }
.studio-footer > div:first-child small { color: var(--muted-foreground); font-size: 7px; }
.spinner { width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: spin .75s linear infinite; }
.spinner.dark { width: 11px; height: 11px; border-color: color-mix(in srgb,var(--muted-foreground) 25%,transparent); border-top-color: var(--muted-foreground); }

/* Draft and send lifecycle */
.lifecycle-banner, .readiness-banner { margin: 10px 14px 0; }
.lifecycle-banner.success { background: var(--success-soft); color: var(--success); }
.lifecycle-banner.danger { grid-template-columns: 25px minmax(0,1fr) auto auto; background: var(--destructive-soft); color: var(--destructive); }
.readiness-banner { background: var(--warning-soft); color: var(--warning); }
.supplier-draft-tray { position: absolute; z-index: 20; right: 16px; bottom: 16px; width: min(420px,calc(100% - 32px)); overflow: hidden; border-radius: 24px; background: var(--card); box-shadow: 0 24px 75px rgba(25,18,55,.28); }
.supplier-draft-tray > header { display: flex; min-height: 44px; align-items: center; justify-content: space-between; padding: 0 14px; background: var(--primary); color: white; }
.supplier-draft-tray > header strong { font-size: 11px; }
.supplier-draft-tray > header span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 8px; }
.draft-tray-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 32px; align-items: center; gap: 8px; padding: 12px; }
.draft-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.draft-tray-row > button:nth-child(2) { display: grid; min-width: 0; gap: 2px; border: 0; border-radius: 13px; background: transparent; padding: 4px; text-align: left; }
.draft-tray-row > button:nth-child(2):hover { background: var(--accent-soft); }
.draft-tray-row strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.draft-tray-row span { font-size: 8px; }
.draft-tray-row small { color: var(--muted-foreground); font-size: 7px; }
.supplier-draft-tray > footer { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: color-mix(in srgb,var(--muted) 62%,white); }
.supplier-draft-tray footer span { color: var(--muted-foreground); font-size: 8px; }
.confirm-scrim { position: absolute; z-index: 30; inset: 0; background: rgba(18,14,36,.48); }
.discard-card { position: absolute; z-index: 31; top: 50%; left: 50%; width: min(430px,calc(100% - 32px)); border-radius: 26px; background: var(--card); padding: 22px; box-shadow: var(--shadow); transform: translate(-50%,-50%); }
.destructive-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: var(--destructive-soft); color: var(--destructive); }
.discard-card h3 { margin: 14px 0 7px; font-size: 17px; }
.discard-card p { margin: 0; color: var(--muted-foreground); font-size: 11px; line-height: 1.5; }
.discard-card > div:last-child { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.app-toast { position: absolute; z-index: 30; top: 16px; left: 50%; display: grid; width: min(420px,calc(100% - 32px)); grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 9px; border-radius: 18px; background: var(--primary); padding: 10px 12px; color: white; box-shadow: var(--shadow); transform: translateX(-50%); }
.app-toast > .app-icon { display: grid; width: 24px; height: 24px; border-radius: 50%; background: var(--success); padding: 5px; }
.app-toast span { display: grid; gap: 2px; }
.app-toast strong { font-size: 9px; }
.app-toast small { color: rgba(255,255,255,.72); font-size: 8px; }
.app-toast button { border: 0; background: transparent; color: white; font-size: 8px; font-weight: 800; }

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

@media (max-width: 1180px) {
  .prototype-layout { grid-template-columns: 1fr; }
  .review-notes { position: static; max-height: none; }
}

@media (max-width: 920px) {
  .review-toolbar { position: static; align-items: flex-start; flex-direction: column; }
  .review-controls { width: 100%; flex-wrap: wrap; }
  .review-controls label { flex: 1; min-width: 130px; }
  .review-controls select { width: 100%; }
  .prototype-layout { padding: 14px 14px 36px; }
  .state-pills { padding-left: 14px; padding-right: 14px; }
  .odia-app, .focus-studio { min-height: 730px; max-height: 730px; height: 730px; }
  .app-sidebar { display: none; }
  .odia-app { grid-template-columns: 1fr; }
  .service-sheet { width: 67%; min-width: 390px; }
  .studio-header { grid-template-columns: auto minmax(170px,1fr) auto; }
  .studio-header > .mode-switch { grid-row: 2; grid-column: 2; justify-self: start; }
  .studio-header-actions { grid-column: 3; grid-row: 1 / span 2; }
  .studio-body { grid-template-columns: minmax(0,1.18fr) minmax(285px,.82fr); }
  .message-field textarea { min-height: 235px; }
}

@media (max-width: 720px) {
  .studio-title > .app-icon, .draft-status { display: none; }
  .studio-body { grid-template-columns: 1fr; }
  .inspector-pane { display: none; }
  .studio-footer > div:first-child { display: none; }
  .studio-footer { justify-content: flex-end; }
  .address-grid, .detail-options, .po-option-list { grid-template-columns: 1fr; }
  .lifecycle-banner.danger { grid-template-columns: 24px minmax(0,1fr); }
  .lifecycle-banner.danger button { grid-column: 2; }
}

@media (prefers-reduced-motion: no-preference) {
  button, .state-pill { transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease; }
}
