:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-soft: #eef0f3;
  --charcoal: #171923;
  --charcoal-2: #252938;
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --accent-bright: #6366f1;
  --accent-soft: #eef2ff;
  --green: #059669;
  --green-soft: #ecfdf5;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --shadow: 0 18px 46px rgba(17, 24, 39, .10);
  --shadow-soft: 0 8px 24px rgba(17, 24, 39, .07);
  --glow: 0 8px 22px rgba(79, 70, 229, .22);
  --radius: 8px;
  --font: Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

body { background: var(--bg); }
button, input, textarea, select { outline: none; }
button { -webkit-tap-highlight-color: transparent; }
button:active:not(:disabled) { transform: translateY(0) scale(.985); }

.page-ripple {
  position: fixed;
  z-index: 9999;
  width: 12px;
  height: 12px;
  pointer-events: none;
  background: rgba(79, 70, 229, .20);
  border: 1px solid rgba(99, 102, 241, .26);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: page-ripple .5s ease-out forwards;
}
@keyframes page-ripple {
  70% { opacity: .65; transform: translate(-50%, -50%) scale(6); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(8); }
}

.global-header {
  min-height: 64px;
  gap: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(17, 24, 39, .04);
  backdrop-filter: blur(12px);
}
.brand-block { min-width: 184px; }
.brand-mark {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: var(--glow);
  border-radius: 8px;
}
.brand-name { color: var(--ink); }
.brand-note, .prototype-tag { color: #9ca3af; }
.global-nav { gap: 4px; }
.global-nav button {
  min-height: 38px;
  color: #596273;
  border-radius: 7px;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.global-nav button:hover { color: var(--accent); background: var(--accent-soft); }
.global-nav button.active { color: #fff; background: linear-gradient(135deg, #4f46e5, #6366f1); box-shadow: 0 7px 18px rgba(79, 70, 229, .20); }
.global-main { min-height: calc(100vh - 64px); }

.button, .icon-button, .text-button { border-radius: 7px; }
.button { min-height: 40px; padding: 0 15px; }
.button.primary { background: linear-gradient(135deg, #4f46e5, #6366f1); box-shadow: 0 7px 17px rgba(79, 70, 229, .18); }
.button.primary:hover { background: linear-gradient(135deg, #4338ca, #5558e8); box-shadow: 0 10px 24px rgba(79, 70, 229, .25); }
.button.secondary { border-color: #d7dce4; box-shadow: 0 1px 2px rgba(17, 24, 39, .03); }
.button.secondary:hover { color: var(--accent); background: var(--accent-soft); border-color: #c7ccff; }
.button.danger { border-color: #fecaca; }
.button.success { border-color: #a7f3d0; }
.icon-button { border-color: #dfe3e9; transition: color .18s ease, background .18s ease, border .18s ease, transform .18s ease; }
.icon-button:hover { color: var(--accent); background: var(--accent-soft); border-color: #c7ccff; }
.text-button { color: var(--accent); }
.text-button:hover { color: var(--accent-dark); background: var(--accent-soft); }

.control, .select-control, .textarea-control {
  min-height: 42px;
  color: var(--ink);
  background: #fff;
  border-color: #d9dee7;
  border-radius: 7px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.control:hover, .select-control:hover, .textarea-control:hover { border-color: #b8c0ce; }
.control:focus, .select-control:focus, .textarea-control:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99, 102, 241, .14); }
.field label { color: #4b5563; }

.segmented { padding: 3px; background: #eef0f4; border-radius: 8px; }
.segmented button { border-radius: 6px; }
.segmented button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(17, 24, 39, .08); }
.segmented.dark { background: rgba(17, 24, 39, .05); }
.segmented.dark button { color: #6b7280; }
.segmented.dark button.active { color: #fff; background: var(--accent); }
.filter-chips button, .status-badge { border-radius: 999px; }
.filter-chips button:hover { color: var(--accent); border-color: #c7ccff; }
.filter-chips button.active { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 5px 14px rgba(79, 70, 229, .16); }

.page-titlebar { margin-bottom: 24px; }
.page-titlebar h1 { font-size: 28px; letter-spacing: 0; }
.page-titlebar p { margin-top: 8px; font-size: 13px; }
.content-panel {
  background: #fff;
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.panel-head { min-height: 62px; padding: 0 20px; }
.panel-head h2 { font-size: 16px; }
.panel-body { padding: 20px; }
.section-heading { margin-bottom: 14px; }

.overview-page { min-height: calc(100vh - 64px); background: var(--bg); padding-top: 24px; }
.overview-intro { color: var(--ink); background: transparent; }
.overview-intro-inner {
  min-height: 400px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.overview-copy { padding-left: 34px; }
.overview-copy h1 { font-size: 42px; }
.overview-copy p { color: var(--muted); }
.overview-media { min-height: 400px; }
.overview-media::after { display: none; }
.overview-content { padding-top: 34px; }
.project-list { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.project-line { padding: 0 22px; border-bottom-color: var(--line-soft); transition: background .18s ease; }
.project-line:hover { background: #fafaff; }
.project-number { color: var(--accent); font-size: 23px; }
.overview-band { gap: 12px; margin-top: 22px; border: 0; }
.overview-metric { background: #fff; border: 1px solid var(--line) !important; border-radius: var(--radius); box-shadow: 0 4px 14px rgba(17, 24, 39, .04); }

.android-page { padding-top: 30px; }
.android-toolbar { margin-bottom: 22px; }
.android-stage { gap: 34px; }
.phone { background: #111827; border: 1px solid #252b38; box-shadow: 0 25px 60px rgba(17, 24, 39, .20); }
.phone-screen { background: #f8fafc; }
.phone-status, .phone-header { background: #181b26; }
.phone-header small { color: #c4c8d2; }
.phone-header p { color: #aeb4c2; }
.phone-primary { min-height: 46px; background: linear-gradient(135deg, #4f46e5, #6366f1); border-radius: 8px; box-shadow: 0 8px 20px rgba(79, 70, 229, .20); }
.phone-primary:hover { background: linear-gradient(135deg, #4338ca, #5558e8); }
.phone-bottom { background: rgba(255, 255, 255, .98); }
.phone-bottom button.active { color: var(--accent); }
.phone-quick button, .phone-row, .type-choice, .choice-row, .timeline-clip { border-radius: 8px; }
.phone-quick button { min-height: 72px; box-shadow: 0 2px 8px rgba(17, 24, 39, .03); }
.phone-quick button:hover, .phone-row:hover, .type-choice:hover, .choice-row:hover { background: var(--accent-soft); border-color: #c7ccff; }
.phone-notice { background: var(--accent-soft); border-left-color: var(--accent); }
.phone-row { margin-bottom: 6px; padding-left: 8px; padding-right: 8px; border: 1px solid var(--line-soft); }
.phone-section-head { margin-top: 15px; }
.workflow-panel { border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.screen-map-grid { gap: 10px; }
.screen-map-item { min-height: 86px; border-radius: 8px; transition: transform .18s ease, border .18s ease, box-shadow .18s ease; }
.screen-map-item:hover { transform: translateY(-2px); border-color: #c7ccff; box-shadow: 0 8px 18px rgba(79, 70, 229, .08); }
.screen-map-item.active { background: var(--accent-soft); border-color: #bfc5ff; }
.wizard-mini-step.active { color: var(--accent); }
.generation-orbit { border-color: #c7ccff; box-shadow: 0 0 0 9px rgba(79, 70, 229, .06); }
.result-video { background: var(--charcoal); border-radius: 8px; }

.workspace-page { min-height: calc(100vh - 64px); grid-template-columns: 218px minmax(0, 1fr); }
.workspace-sidebar { top: 64px; height: calc(100vh - 64px); padding: 20px 13px; background: #171923; }
.workspace-user { padding: 9px 11px 19px; }
.workspace-user span { color: #858c99; }
.workspace-nav { gap: 4px; margin-top: 16px; }
.workspace-nav button { min-height: 42px; color: #aeb4c2; border-radius: 7px; transition: color .18s ease, background .18s ease, transform .18s ease; }
.workspace-nav button:hover { color: #fff; background: rgba(255, 255, 255, .07); transform: translateX(2px); }
.workspace-nav button.active { background: linear-gradient(135deg, #4f46e5, #5950ea); box-shadow: 0 8px 19px rgba(79, 70, 229, .20); }
.workspace-nav-title { color: #6b7280; }
.workspace-content { padding: 30px 30px 60px; }
.workspace-inner { max-width: 1280px; }
.stats-strip { gap: 12px; background: transparent; border: 0; }
.stat-cell { min-height: 104px; padding: 18px; background: #fff; border: 1px solid var(--line) !important; border-radius: var(--radius); box-shadow: 0 5px 16px rgba(17, 24, 39, .045); }
.stat-icon { color: var(--accent); background: var(--accent-soft); border-radius: 8px; }
.stat-cell strong { font-size: 24px; }
.dashboard-grid, .config-grid { gap: 16px; }
.quick-action { min-height: 76px; border-radius: 8px; transition: transform .18s ease, border .18s ease, background .18s ease, box-shadow .18s ease; }
.quick-action:hover { transform: translateY(-2px); background: var(--accent-soft); border-color: #c7ccff; box-shadow: 0 8px 18px rgba(79, 70, 229, .08); }
.toolbar-row { min-height: 58px; padding: 10px 18px; }

.data-table th { height: 46px; color: #667085; background: #f8fafc; }
.data-table td { padding-top: 14px; padding-bottom: 14px; }
.data-table tbody tr { transition: background .16s ease; }
.data-table tbody tr:hover { background: #f8f8ff; }
.media-cell img { border-radius: 7px; }
.empty-state { padding: 58px 24px; }

.material-grid, .asset-list, .geo-platform-grid { gap: 14px; }
.material-card, .asset-card, .platform-row { overflow: hidden; border-radius: 8px; box-shadow: 0 4px 14px rgba(17, 24, 39, .04); transition: transform .18s ease, border .18s ease, box-shadow .18s ease; }
.material-card:hover, .asset-card:hover, .platform-row:hover { transform: translateY(-2px); border-color: #c7ccff; box-shadow: 0 10px 22px rgba(79, 70, 229, .09); }
.material-card.selected, .asset-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .10); }
.asset-avatar { background: linear-gradient(135deg, #4f46e5, #6366f1); }

.pc-creator, .geo-flow { overflow: hidden; border-radius: 8px; box-shadow: var(--shadow-soft); }
.creator-steps, .geo-steps { background: #f8fafc; }
.creator-step { transition: color .18s ease, background .18s ease; }
.creator-step:hover { background: #f0f2ff; }
.creator-step.active { color: var(--accent); background: var(--accent-soft); }
.creator-step > span { border-radius: 50%; }
.creator-main, .geo-main { padding: 24px; }
.creator-aside { background: #fbfcfe; }
.creator-footer { padding-top: 22px; }
.quota-panel { color: #3730a3; background: var(--accent-soft); border-left: 3px solid var(--accent); }
.platform-row { min-height: 124px; }
.platform-logo { border-radius: 8px; }
.check-tile { border-radius: 8px; transition: transform .18s ease, border .18s ease, background .18s ease; }
.check-tile:hover { transform: translateY(-1px); border-color: #c7ccff; }
.check-tile.selected { border-color: #aeb5ff; background: var(--accent-soft); }
.variant-editor { overflow: hidden; border-radius: 8px; }
.variant-head { padding: 12px 14px; background: #f8fafc; }
.extension-status { border-radius: 8px; }

.switch { background: #d1d5db; }
.switch.on { background: var(--green); box-shadow: 0 0 0 3px rgba(16, 185, 129, .12); }
.risk-line { border-radius: 7px; }

.cost-page { padding-top: 34px; }
.cost-inner { width: min(1180px, calc(100% - 40px)); }
.cost-layout { gap: 18px; }
.cost-result { overflow: hidden; top: 90px; padding: 25px; background: #171923; border-radius: 8px; box-shadow: var(--shadow); }
.cost-result::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 4px; background: linear-gradient(90deg, #4f46e5, #6366f1); }
.cost-result span { color: #aeb4c2; }
.cost-result p { color: #c8ccd5; }
.roadmap-list { margin-top: 0; }
.roadmap-line { padding: 20px 0; }

.modal-backdrop { background: rgba(17, 24, 39, .62); backdrop-filter: blur(4px); }
.modal-dialog { border: 1px solid rgba(255, 255, 255, .52); border-radius: 10px; box-shadow: 0 28px 90px rgba(17, 24, 39, .30); animation: modal-in .2s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header { min-height: 64px; }
.modal-footer { padding-top: 16px; padding-bottom: 16px; }
.modal-message { background: var(--accent-soft); border-left-color: var(--accent); border-radius: 0 7px 7px 0; }
.toast { background: #171923; border: 1px solid #2a3040; border-radius: 8px; }
.skeleton-bar { background: #e5e7eb; border-radius: 999px; }
.skeleton-bar > span { background: linear-gradient(90deg, #4f46e5, #818cf8); }

@media (max-width: 860px) {
  .global-header { min-height: 58px; }
  .global-main { min-height: calc(100vh - 58px); }
  .overview-page { padding-top: 14px; }
  .overview-intro-inner { border-radius: 8px; }
  .overview-copy { padding: 38px 24px 12px; }
  .workspace-page { min-height: calc(100vh - 58px); }
  .workspace-sidebar { top: 58px; }
  .workspace-content { padding: 22px 14px 48px; }
  .stats-strip { gap: 10px; }
  .stat-cell { min-height: 96px; }
}

@media (max-width: 560px) {
  .global-header { min-height: 56px; }
  .global-main { min-height: calc(100vh - 56px); }
  .overview-copy h1 { font-size: 30px; }
  .overview-content { padding-top: 22px; }
  .project-list { border-radius: 8px; }
  .phone { box-shadow: 0 18px 40px rgba(17, 24, 39, .18); }
  .workspace-sidebar { top: 56px; }
  .workspace-content { padding-left: 10px; padding-right: 10px; }
  .page-titlebar h1 { font-size: 23px; }
  .stats-strip { gap: 8px; }
  .stat-cell { min-height: 86px; }
  .panel-head { padding-left: 15px; padding-right: 15px; }
  .panel-body { padding: 15px; }
  .creator-main, .geo-main { padding: 17px; }
  .modal-dialog { border-radius: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-ripple { display: none; }
}
