:root {
  --blue-900: #071936;
  --blue-800: #112a54;
  --blue-700: #1c55c9;
  --blue-600: #2f7bff;
  --blue-500: #5ca8ff;
  --blue-100: #dedeff;
  --green-500: #22c55e;
  --yellow-500: #ffb020;
  --red-500: #ff5b61;
  --purple-500: #8b5cf6;
  --ink: #111827;
  --muted: #667085;
  --line: #e6edf7;
  --paper: #ffffff;
  --soft: #f5f9ff;
  --soft-2: #f8fbff;
  --shadow: 0 20px 60px rgba(17, 42, 84, 0.13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-140%);
  border-radius: var(--radius);
  background: var(--blue-900);
  color: #fff;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(47, 123, 255, 0.12), transparent 38%),
    linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

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

.eyebrow {
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  color: var(--blue-900);
  font-size: 34px;
  font-weight: 900;
}

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

.primary-button,
.ghost-button,
.text-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(180deg, #2f7bff, #1666ee);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47, 123, 255, 0.24);
}

.ghost-button {
  background: #fff;
  color: var(--blue-800);
  border-color: var(--line);
}

.ghost-button.compact {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.text-button {
  background: transparent;
  color: var(--blue-600);
  padding: 0 8px;
}

.danger-button {
  background: #fff7f7;
  color: #e11d48;
  border-color: #ffd6d9;
}

.primary-button svg,
.ghost-button svg,
.text-button svg,
.danger-button svg {
  width: 18px;
  height: 18px;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

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

.modal-card {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid rgba(47, 123, 255, 0.18);
  border-radius: 10px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
  color: #344054;
}

.modal-card h2 {
  margin-top: 6px;
  color: var(--blue-900);
  font-size: 22px;
  line-height: 1.25;
}

.modal-card p {
  margin-top: 10px;
  color: #475467;
  line-height: 1.65;
}

.modal-kicker {
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 950;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

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

.screen-nav,
.insight-panel,
.phone-frame {
  border: 1px solid rgba(47, 123, 255, 0.15);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.screen-nav {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 8px;
  border-radius: 18px;
  padding: 12px;
}

.screen-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #344054;
  text-align: left;
  font-size: 14px;
  font-weight: 800;
}

.screen-tab span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
  border-radius: 7px;
  background: #eef5ff;
  color: var(--blue-700);
  font-size: 12px;
}

.screen-tab.active {
  background: #edf5ff;
  color: var(--blue-700);
  border-color: #cfe1ff;
}

.device-column {
  position: sticky;
  top: 20px;
}

.phone-frame {
  width: 100%;
  min-height: 780px;
  border-radius: 36px;
  padding: 14px 14px 16px;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.status-icons {
  color: #111827;
  font-size: 8px;
  letter-spacing: 3px;
}

.mobile-screen {
  position: relative;
  min-height: 720px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--paper);
}

.mobile-page {
  display: flex;
  flex-direction: column;
  min-height: 720px;
}

.phone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid #edf2f7;
  background: rgba(255, 255, 255, 0.95);
}

.phone-header strong {
  color: var(--blue-700);
  font-size: 18px;
  font-weight: 900;
}

.phone-header .header-title {
  color: var(--ink);
  font-size: 17px;
}

.phone-header.brand-header {
  justify-content: space-between;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #1f2937;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.screen-body {
  flex: 1;
  overflow: auto;
  padding: 18px;
  scrollbar-width: thin;
}

.screen-body.with-nav {
  padding-bottom: 94px;
}

.bottom-nav {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 46px rgba(17, 42, 84, 0.16);
}

.bottom-nav button {
  display: grid;
  gap: 3px;
  place-items: center;
  min-height: 62px;
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.bottom-nav svg {
  width: 20px;
  height: 20px;
}

.bottom-nav button.active {
  color: var(--blue-600);
}

.bottom-nav .add-action {
  transform: translateY(-12px);
  width: 58px;
  height: 58px;
  min-height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(180deg, #2f7bff, #1768ef);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47, 123, 255, 0.34);
}

.card,
.metric-card,
.soft-card,
.coupon-card,
.timeline-card,
.partner-card,
.scenario-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 42, 84, 0.06);
}

.card {
  padding: 16px;
}

.soft-card {
  padding: 14px;
  background: var(--soft-2);
}

.stack {
  display: grid;
  gap: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.section-title h3 {
  color: var(--blue-900);
  font-size: 16px;
  font-weight: 900;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.small {
  font-size: 12px;
}

.pet-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
}

.pet-photo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: #edf5ff center / cover;
}

.pet-photo.large {
  width: 100%;
  height: 178px;
  border-radius: 8px 8px 0 0;
}

.pet-card h2,
.pet-profile-title {
  color: var(--blue-900);
  font-size: 20px;
  font-weight: 900;
}

.chip-row,
.quick-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #475467;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.chip.blue {
  background: #eaf3ff;
  color: var(--blue-700);
  border-color: #cfe1ff;
}

.chip.active,
.chip[aria-pressed="true"] {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: #fff;
}

.chip.green {
  background: #ecfdf3;
  color: #099250;
  border-color: #c7f3d7;
}

.chip.yellow {
  background: #fff7e6;
  color: #b86b00;
  border-color: #ffe3a3;
}

.chip.red {
  background: #fff0f1;
  color: #d92d20;
  border-color: #ffd0d3;
}

.reminder-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.square-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: #edf5ff;
  color: var(--blue-600);
}

.square-icon.green {
  background: #eafaf1;
  color: var(--green-500);
}

.square-icon.yellow {
  background: #fff8e8;
  color: var(--yellow-500);
}

.square-icon.red {
  background: #fff1f2;
  color: var(--red-500);
}

.square-icon.purple {
  background: #f4efff;
  color: var(--purple-500);
}

.square-icon svg {
  width: 22px;
  height: 22px;
}

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

.guide-tile {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 88px;
  border: 0;
  border-radius: var(--radius);
  background: #f1f7ff;
  color: var(--blue-800);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.guide-tile svg {
  width: 24px;
  height: 24px;
  color: var(--blue-600);
}

.guide-tile:nth-child(2) {
  background: #edfbf4;
}

.guide-tile:nth-child(2) svg {
  color: var(--green-500);
}

.guide-tile:nth-child(3) {
  background: #fff7e7;
}

.guide-tile:nth-child(3) svg {
  color: var(--yellow-500);
}

.guide-tile:nth-child(4) {
  background: #f5f0ff;
}

.guide-tile:nth-child(4) svg {
  color: var(--purple-500);
}

.banner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(47, 123, 255, 0.13), rgba(92, 168, 255, 0.04)),
    #eef6ff;
  overflow: hidden;
}

.banner strong {
  display: block;
  color: var(--blue-900);
  font-size: 17px;
  font-weight: 900;
}

.voucher {
  display: grid;
  place-items: center;
  width: 92px;
  height: 56px;
  border: 1px dashed #7eb2ff;
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue-600);
  font-weight: 900;
  transform: rotate(-7deg);
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #e9eef7;
  overflow: hidden;
}

.progress-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-600), #75b9ff);
}

.step-dots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.dot {
  height: 5px;
  border-radius: 999px;
  background: #d8e3f2;
}

.dot.active {
  background: var(--blue-600);
}

.onboarding-hero {
  display: grid;
  gap: 18px;
  place-items: center;
  padding-top: 20px;
  text-align: center;
}

.qr-dog {
  position: relative;
  width: 170px;
  height: 170px;
  border-radius: 38px;
  background: url("https://images.unsplash.com/photo-1583337130417-3346a1be7dee?auto=format&fit=crop&w=380&q=80") center / cover;
  box-shadow: 0 18px 42px rgba(17, 42, 84, 0.14);
}

.qr-card {
  position: absolute;
  right: -14px;
  bottom: -12px;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 8px solid #fff;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 42, 84, 0.16);
}

.qr-pattern {
  width: 46px;
  height: 46px;
  background:
    linear-gradient(90deg, #111 8px, transparent 8px) 0 0 / 14px 14px,
    linear-gradient(#111 8px, transparent 8px) 0 0 / 14px 14px,
    #fff;
}

.qr-pattern.small {
  width: 64px;
  height: 64px;
  border: 10px solid #fff;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(17, 42, 84, 0.12);
}

.inbound-card {
  width: 100%;
  text-align: left;
}

.benefit-list {
  display: grid;
  gap: 8px;
  width: 100%;
}

.benefit-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.form-stack {
  display: grid;
  gap: 12px;
}

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

.consent-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.consent-row.required {
  background: #f8fbff;
}

.consent-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--blue-600);
}

.consent-row strong {
  color: var(--blue-900);
  font-size: 13px;
}

.consent-row em {
  display: inline-flex;
  margin-left: 6px;
  color: var(--blue-700);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d9e4f2;
  border-radius: var(--radius);
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 132px;
  padding: 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.12);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.keypad button {
  min-height: 58px;
  border: 0;
  background: #fff;
  color: #111827;
  font-size: 20px;
  font-weight: 500;
}

.completion-mark {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 20px auto;
  border-radius: 50%;
  background: #eaf3ff;
  color: var(--blue-600);
}

.completion-mark svg {
  width: 52px;
  height: 52px;
}

.profile-cover {
  overflow: hidden;
  padding: 0;
}

.profile-content {
  padding: 14px;
}

.mini-chart {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 76px;
  margin-top: 10px;
}

.mini-chart span {
  flex: 1;
  min-width: 0;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #2f7bff, #a8ceff);
}

.list-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.list-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.compact-row {
  min-height: 42px;
}

.consent-audit-row {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: flex-start;
}

.consent-audit-row .square-icon {
  grid-row: span 2;
}

.consent-audit-row strong {
  line-height: 1.35;
  word-break: keep-all;
}

.consent-audit-row .consent-version {
  grid-column: 2;
  justify-self: start;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.storage-health {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.storage-health.is-ok {
  background: #f5fff9;
  border-color: #c8f1d9;
}

.storage-health.is-blocked {
  background: #fff7f7;
  border-color: #ffd7d9;
}

.link-stack {
  display: grid;
  gap: 10px;
}

.link-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.link-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.3;
}

.link-card.compact {
  min-height: 92px;
}

.link-card:hover {
  border-color: #bfd8ff;
  background: #f7fbff;
}

.admin-link-panel {
  margin-top: 12px;
}

.admin-link-groups {
  display: grid;
  gap: 16px;
}

.admin-link-groups h4 {
  margin: 0 0 8px;
  color: var(--blue-900);
  font-size: 13px;
}

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

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6f9ff;
}

.segmented.scrollable {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented.scrollable button {
  min-width: max-content;
  padding: 0 12px;
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.service-strip button {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue-800);
  font-size: 12px;
  font-weight: 900;
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.segmented button.active {
  background: var(--blue-600);
  color: #fff;
}

.ai-hero {
  display: grid;
  grid-template-columns: 1fr 82px;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #edf5ff, #fff);
}

.ai-dog {
  width: 82px;
  height: 82px;
  border-radius: 28px;
  background: url("https://images.unsplash.com/photo-1597633425046-08f5110420b5?auto=format&fit=crop&w=240&q=80") center / cover;
}

.topic-card,
.product-card,
.clinic-card,
.service-card {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  text-align: left;
}

.topic-photo,
.product-photo,
.clinic-photo {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  background: #edf5ff center / cover;
}

.answer-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f7fbff;
}

.check-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.check-list svg {
  width: 18px;
  height: 18px;
  color: var(--blue-600);
}

.warning-box {
  border-color: #ffd9c4;
  background: #fff7ed;
}

.method-card {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 8px;
  align-items: center;
  padding: 13px;
}

.radio-dot {
  width: 24px;
  height: 24px;
  border: 2px solid #bfd5ff;
  border-radius: 50%;
}

.method-card.selected .radio-dot {
  border: 7px solid var(--blue-600);
}

.timeline {
  position: relative;
  display: grid;
  gap: 16px;
  margin: 6px 0;
}

.timeline-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: start;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  margin: 4px auto 0;
  border-radius: 50%;
  background: var(--blue-600);
  box-shadow: 0 0 0 5px #eaf3ff;
}

.coupon-card {
  padding: 14px;
}

.coupon-value {
  color: var(--blue-600);
  font-size: 32px;
  font-weight: 950;
}

.coupon-card .primary-button {
  width: 100%;
  margin-top: 12px;
}

.coupon-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.coupon-actions .primary-button {
  margin-top: 0;
}

.qr-preview-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
}

.product-card {
  grid-template-columns: 64px 1fr 42px;
}

.product-photo {
  width: 64px;
  height: 64px;
}

.cart-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #d9e4f2;
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue-600);
}

.clinic-card {
  grid-template-columns: 74px 1fr;
}

.clinic-photo {
  width: 74px;
  height: 74px;
}

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

.insurance-option {
  display: grid;
  place-items: center;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.insurance-option.selected {
  border-color: var(--blue-600);
  background: #edf5ff;
  color: var(--blue-700);
}

.partner-mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric-card {
  padding: 14px;
}

.metric-card strong {
  color: var(--blue-600);
  font-size: 30px;
  font-weight: 950;
}

.metric-card em {
  color: var(--green-500);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.quick-action {
  display: grid;
  place-items: center;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.revenue-total {
  padding: 18px;
  background: linear-gradient(135deg, #0b1f45, #1768ef);
  color: #fff;
}

.revenue-total .muted {
  color: rgba(255, 255, 255, 0.76);
}

.revenue-total strong {
  display: block;
  margin-top: 6px;
  font-size: 34px;
  font-weight: 950;
}

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

.scenario-card {
  padding: 12px;
}

.scenario-card strong {
  color: var(--blue-900);
  font-size: 18px;
  font-weight: 950;
}

.insight-panel {
  min-height: 780px;
  border-radius: 18px;
  padding: 18px;
}

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

.panel-header h2 {
  color: var(--blue-900);
  font-size: 26px;
  font-weight: 950;
}

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

.panel-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.panel-card h3 {
  color: var(--blue-700);
  font-size: 15px;
  font-weight: 950;
  margin-bottom: 8px;
}

.ia-tree {
  display: grid;
  gap: 12px;
}

.ia-root {
  width: 120px;
  margin: 0 auto;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--blue-600);
  color: #fff;
  text-align: center;
  font-weight: 900;
}

.ia-branches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.ia-branch {
  display: grid;
  gap: 8px;
  align-content: start;
}

.ia-branch > strong {
  display: block;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.ia-branch span {
  display: block;
  padding: 8px;
  border-radius: 7px;
  background: #f4f7fb;
  color: #475467;
  font-size: 12px;
  text-align: center;
}

.color-swatch {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.color-swatch span {
  min-height: 34px;
  border-radius: 7px;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 174px 1fr 210px;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.admin-sidebar {
  padding: 16px;
  border-right: 1px solid var(--line);
  background: #f8fbff;
}

.admin-sidebar strong {
  display: block;
  margin-bottom: 16px;
  color: var(--blue-900);
  font-weight: 950;
}

.admin-sidebar button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.admin-sidebar button.active {
  background: #edf5ff;
  color: var(--blue-700);
}

.admin-main,
.admin-side {
  padding: 16px;
}

.admin-side {
  border-left: 1px solid var(--line);
  background: #fbfdff;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.table th,
.table td {
  padding: 10px 8px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
}

.table th {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 12px;
  height: 132px;
  padding-top: 18px;
}

.bar-set {
  display: grid;
  align-items: end;
  grid-template-columns: repeat(3, 10px);
  gap: 3px;
  flex: 1;
  height: 100%;
}

.bar-set span {
  display: block;
  border-radius: 5px 5px 0 0;
  background: var(--blue-600);
}

.bar-set span:nth-child(2) {
  background: #91bfff;
}

.bar-set span:nth-child(3) {
  background: #d7e6ff;
}

.donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--blue-600) 0 38%, #91bfff 38% 74%, #d7e6ff 74% 100%);
  display: grid;
  place-items: center;
}

.donut::after {
  content: attr(data-label);
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  color: var(--blue-900);
  font-weight: 950;
  text-align: center;
}

body[data-screen="partner"] .workspace {
  grid-template-columns: 220px minmax(0, 1fr);
}

body[data-screen="partner"] .device-column {
  display: none;
}

body[data-screen="partner"] .admin-dashboard {
  grid-template-columns: 170px minmax(0, 1fr) 240px;
}

body[data-screen="partner"] .admin-sidebar {
  padding: 12px;
}

body[data-screen="partner"] .admin-side {
  grid-column: auto;
  border-top: 0;
  border-left: 1px solid var(--line);
  display: block;
}

body[data-screen="partner"] .admin-main .panel-grid {
  grid-template-columns: 1fr;
}

body[data-screen="partner"] .kpi-row {
  grid-template-columns: repeat(5, minmax(82px, 1fr));
}

.calculator {
  display: grid;
  gap: 12px;
}

.calc-row {
  display: grid;
  grid-template-columns: 160px 1fr 100px;
  gap: 10px;
  align-items: center;
}

.calc-row input[type="range"] {
  width: 100%;
  accent-color: var(--blue-600);
}

.calc-row input[type="number"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d9e4f2;
  border-radius: var(--radius);
  padding: 0 10px;
}

.revenue-breakdown {
  display: grid;
  gap: 10px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.breakdown-bar {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  background: #eef3fb;
  overflow: hidden;
}

.breakdown-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-600), #74b8ff);
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 200px minmax(340px, 410px);
  }

  .insight-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: 100%;
    padding: 0;
  }

  .topbar,
  .screen-nav,
  .insight-panel {
    display: none;
  }

  .workspace {
    display: block;
  }

  body[data-screen="partner"] .device-column {
    display: block;
  }

  body[data-screen="partner"] .workspace {
    display: block;
  }

  .device-column {
    position: static;
  }

  .phone-frame {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }

  .phone-status {
    display: none;
  }

  .mobile-screen,
  .mobile-page {
    min-height: 100vh;
    border-radius: 0;
  }

  .modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .modal-card {
    border-radius: 10px;
    padding: 22px 18px 18px;
  }

  .modal-actions {
    grid-template-columns: 1fr;
  }
}
