/* Fimo Studio mockup baseline.
   Tokens came from apps/ui/src/index.css dark theme.
   Component metrics came from AppHeader, LeftPanelNav, WorkspaceHeader,
   Field, Card, and related Fimo UI components.
   Reconcile this baseline against the current checkout before each mockup. */
:root {
  --background: #09090b;
  --foreground: #fafafa;
  --elevated: rgba(24, 24, 27, 0.5);
  --popover: #18181b;
  --muted: #27272a;
  --muted-foreground: #a1a1aa;
  --accent: #27272a;
  --border: rgba(255, 255, 255, 0.08);
  --input: rgba(255, 255, 255, 0.15);
  --input-bg: rgba(255, 255, 255, 0.045);
  --primary: #c2410c;
  --destructive: #ef6a6a;
  --success: #10b981;
  --warning: #f97316;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 16px;
  background: transparent;
  font-family: 'Inter Variable', Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--foreground);
  font-size: 14px;
  letter-spacing: -0.006em;
}

svg { flex-shrink: 0; }

.app {
  max-width: 1220px;
  margin: 0 auto;
  background: var(--background);
  border: 1px solid #26262b;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* AppHeader: p-3 pb-0 */
.app-header { display: flex; align-items: center; gap: 8px; padding: 12px 12px 0; }
.project-pill { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: 8px; font-weight: 500; }
.favicon { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, #f5d36b, #6dc28a); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: var(--muted-foreground); }
.icon-btn.active { background: var(--accent); color: var(--foreground); }
.icon-btn.sm { width: 24px; height: 24px; }

/* HeaderNavLink: rounded-full px-3 py-1.5 text-sm gap-1.5 */
.workspace-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow: hidden; }
.nav-link { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; color: var(--muted-foreground); white-space: nowrap; }
.nav-link.active { background: var(--accent); color: var(--foreground); }

/* Buttons: Fimo wrapper = shadcn + rounded-full */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--foreground); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; appearance: none; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.outline { border-color: var(--input); background: var(--input-bg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); color: var(--foreground); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--foreground); }
.btn.destructive { background: rgba(239, 106, 106, 0.16); color: var(--destructive); }
.btn.destructive.solid { background: #7f1d1d; color: #fecaca; }
.btn.sm { height: 32px; padding: 0 10px; }
.btn.disabled { opacity: 0.5; }

/* Workspace shell: elevated rounded panel */
.workspace { flex: 1; display: flex; margin: 12px; background: var(--elevated); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; min-height: 0; }

/* LeftPanelNav */
.left-nav { width: 240px; flex-shrink: 0; border-right: 1px solid var(--border); padding: 8px; }
.left-nav a { display: flex; align-items: center; gap: 12px; height: 32px; padding: 4px 4px 4px 8px; border-radius: 8px; color: var(--foreground); text-decoration: none; margin-bottom: 4px; font-size: 14px; }
.left-nav a svg { color: var(--muted-foreground); }
.left-nav a.active { background: var(--accent); }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* WorkspaceHeader: h-12 p-2 border-b */
.content-header { display: flex; align-items: center; height: 48px; gap: 8px; padding: 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.content-header h3 { margin: 0 0 0 8px; font-size: 14px; font-weight: 500; }
.content-header .crumb { color: var(--muted-foreground); }
.content-header .crumb-sep { color: var(--muted-foreground); opacity: 0.6; margin: 0 2px; }
.content-header .actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.content-body { flex: 1; padding: 32px; display: flex; flex-direction: column; gap: 24px; overflow-y: auto; }

/* Field rows: flat rows with hairline separators */
.field { display: flex; align-items: flex-start; gap: 12px; width: 100%; }
.field-content { flex: 1; display: flex; flex-direction: column; gap: 6px; line-height: 1.375; min-width: 0; }
.field-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.field-desc { font-size: 14px; color: var(--muted-foreground); }
.field-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.separator { width: 100%; border-bottom: 1px solid var(--border); }
.section-label { font-size: 14px; font-weight: 500; color: var(--muted-foreground); }

/* Badge: h-5 px-2 rounded-full text-xs font-medium */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge.success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge.warning { background: rgba(249, 115, 22, 0.2); color: var(--warning); }
.badge.destructive { background: rgba(239, 106, 106, 0.2); color: var(--destructive); }
.badge.secondary { background: var(--muted); color: var(--foreground); }
.badge.outline { border: 1px solid var(--border); color: var(--muted-foreground); }

/* Select trigger */
.select { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; height: 36px; min-width: 190px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--input); background: var(--input-bg); font-size: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.select.sm { height: 32px; min-width: 0; }
.select svg { color: var(--muted-foreground); opacity: 0.7; }

/* Switch */
.switch { position: relative; width: 32px; height: 18px; border-radius: 999px; background: var(--input); flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 1px; left: 1px; width: 16px; height: 16px; border-radius: 50%; background: var(--foreground); }
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(14px); background: #fff; }

/* Cards: domains-list pattern */
.cards { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.card { width: 100%; background: var(--popover); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); overflow: hidden; }
.card-row { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; font-size: 14px; }
.card-row .name { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-row .meta { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted-foreground); font-size: 12px; }

/* Dialog: shadcn DialogContent over overlay */
.overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); display: grid; place-items: center; padding: 24px; }
.dialog { width: 100%; max-width: 460px; background: var(--popover); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.dialog h2 { margin: 0; font-size: 16px; font-weight: 600; }
.dialog .dialog-desc { font-size: 14px; color: var(--muted-foreground); line-height: 1.45; }
.dialog .dialog-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.blurred { filter: blur(2px); pointer-events: none; }

/* Text input */
.text-input { display: flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--input); background: var(--input-bg); font-size: 14px; color: var(--foreground); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.text-input.placeholder { color: var(--muted-foreground); }

/* Alert */
.alert { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.alert.destructive { color: var(--destructive); border-color: rgba(239, 106, 106, 0.35); }
.alert.warning { color: var(--warning); border-color: rgba(249, 115, 22, 0.35); }
.alert .alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.alert .alert-desc { color: var(--muted-foreground); font-size: 13px; }

/* Scale the desktop layout in narrow panes instead of collapsing it. */
@media (max-width: 1251px) {
  body { zoom: calc(100vw / 1252px); }
}
