:root {
  --background: #09090B; --foreground: #FAFAFA;
  --card: #09090B; --card-foreground: #FAFAFA;
  --primary: #FAFAFA; --primary-foreground: #18181B;
  --secondary: #27272A; --secondary-foreground: #FAFAFA;
  --muted: #27272A; --muted-foreground: #A1A1AA;
  --accent: #27272A; --accent-foreground: #FAFAFA;
  --destructive: #EF4444; --destructive-foreground: #FAFAFA;
  --border: #27272A; --input: #27272A; --ring: #D4D4D8;
  --radius: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --transition: 150ms ease;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:var(--font);background:var(--background);color:var(--foreground);min-height:100vh;overflow:hidden}
.app{display:flex;flex-direction:column;height:100vh}

.header{display:flex;align-items:center;justify-content:space-between;padding:12px 20px;background:var(--card);border-bottom:1px solid var(--border);gap:12px;flex-shrink:0}
.header-left{display:flex;align-items:center;gap:12px}
.header-title{font-size:1rem;font-weight:600}
.header-right{display:flex;gap:8px;align-items:center}

.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;font-size:.8rem;font-weight:500;font-family:var(--font);border:none;border-radius:calc(var(--radius) - 2px);cursor:pointer;transition:all var(--transition);white-space:nowrap}
.btn-ghost{background:transparent;color:var(--muted-foreground);border:1px solid var(--border)}
.btn-ghost:hover{background:var(--accent);color:var(--accent-foreground)}
.select-sm{padding:5px 10px;font-size:.72rem;font-family:var(--font);background:var(--input);border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);color:var(--foreground);cursor:pointer}

.main{display:grid;grid-template-columns:280px 1fr;flex:1;overflow:hidden}
.panel{display:flex;flex-direction:column;overflow-y:auto;padding:16px;gap:10px}
.panel-sidebar{border-right:1px solid var(--border);background:var(--card)}
.panel-preview{background:#09090B;padding:24px}
.panel-title{font-size:.82rem;font-weight:600;margin-bottom:4px}

.comp-list{display:flex;flex-direction:column;gap:2px}
.comp-btn{padding:7px 12px;font-size:.78rem;font-family:var(--font);background:transparent;border:none;border-radius:calc(var(--radius) - 2px);color:var(--muted-foreground);cursor:pointer;text-align:left;transition:all var(--transition)}
.comp-btn:hover{background:var(--accent);color:var(--accent-foreground)}
.comp-btn.active{background:var(--accent);color:var(--accent-foreground);font-weight:500}

.section-label{font-size:.68rem;font-weight:600;color:var(--muted-foreground);text-transform:uppercase;letter-spacing:.5px;margin-top:12px}
.preset-list{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}
.preset-btn{width:100%;aspect-ratio:1;border-radius:calc(var(--radius) - 2px);border:2px solid var(--border);cursor:pointer;transition:all var(--transition)}
.preset-btn:hover{border-color:var(--ring)}
.preset-btn.active{border-color:var(--foreground);box-shadow:0 0 0 1px var(--foreground)}

.form-group{display:flex;flex-direction:column;gap:3px;margin-top:4px}
.form-group label{font-size:.68rem;font-weight:500;color:var(--muted-foreground)}
.color-input{width:100%;height:28px;border:1px solid var(--border);border-radius:calc(var(--radius) - 2px);background:var(--input);cursor:pointer;padding:2px}
.radius-row{display:flex;align-items:center;gap:6px}
.slider{flex:1;accent-color:var(--foreground)}
.val{font-size:.7rem;color:var(--muted-foreground);width:32px;text-align:right}

.preview-frame{max-width:100%;margin:0 auto;transition:max-width .3s ease}
.preview-frame.tablet{max-width:768px}
.preview-frame.mobile{max-width:375px}
.preview{padding:32px;border:1px solid var(--border);border-radius:var(--radius);background:var(--card);display:flex;flex-direction:column;gap:24px}

/* ─── shadcn-style components ─── */
.sh-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;font-size:.875rem;font-weight:500;font-family:var(--font);border:none;border-radius:var(--radius);cursor:pointer;transition:opacity var(--transition)}
.sh-btn:hover{opacity:.9}
.sh-btn-default{background:var(--primary);color:var(--primary-foreground)}
.sh-btn-secondary{background:var(--secondary);color:var(--secondary-foreground)}
.sh-btn-destructive{background:var(--destructive);color:var(--destructive-foreground)}
.sh-btn-outline{background:transparent;border:1px solid var(--input);color:var(--foreground)}
.sh-btn-ghost{background:transparent;color:var(--foreground)}
.sh-btn-ghost:hover{background:var(--accent)}
.sh-btn-sm{padding:6px 12px;font-size:.75rem}
.sh-btn-lg{padding:12px 24px;font-size:1rem}

.sh-input{width:100%;padding:10px 12px;font-size:.875rem;font-family:var(--font);background:transparent;border:1px solid var(--input);border-radius:var(--radius);color:var(--foreground);outline:none}
.sh-input:focus{border-color:var(--ring);box-shadow:0 0 0 2px rgba(212,212,216,.2)}
.sh-input::placeholder{color:var(--muted-foreground)}

.sh-card{padding:24px;background:var(--card);border:1px solid var(--border);border-radius:var(--radius)}
.sh-card-title{font-size:1.25rem;font-weight:600;margin-bottom:6px}
.sh-card-desc{font-size:.875rem;color:var(--muted-foreground);margin-bottom:16px}

.sh-badge{display:inline-flex;padding:2px 10px;font-size:.75rem;font-weight:500;border-radius:20px;border:1px solid transparent}
.sh-badge-default{background:var(--primary);color:var(--primary-foreground)}
.sh-badge-secondary{background:var(--secondary);color:var(--secondary-foreground)}
.sh-badge-destructive{background:var(--destructive);color:var(--destructive-foreground)}
.sh-badge-outline{background:transparent;border-color:var(--border);color:var(--foreground)}

.sh-alert{padding:16px;border:1px solid var(--border);border-radius:var(--radius)}
.sh-alert-title{font-size:.875rem;font-weight:600;margin-bottom:4px}
.sh-alert-desc{font-size:.8rem;color:var(--muted-foreground)}
.sh-alert-destructive{border-color:var(--destructive);color:var(--destructive)}

.sh-separator{width:100%;height:1px;background:var(--border)}

.sh-switch-track{width:40px;height:22px;background:var(--input);border-radius:11px;position:relative;cursor:pointer;transition:background var(--transition)}
.sh-switch-track.active{background:var(--primary)}
.sh-switch-thumb{width:18px;height:18px;border-radius:9px;background:#fff;position:absolute;top:2px;left:2px;transition:transform var(--transition)}
.sh-switch-track.active .sh-switch-thumb{transform:translateX(18px)}

.sh-avatar{width:40px;height:40px;border-radius:50%;background:var(--muted);display:flex;align-items:center;justify-content:center;font-size:.875rem;font-weight:500;color:var(--muted-foreground)}

.sh-skeleton{background:var(--muted);border-radius:var(--radius);animation:skeleton-pulse 2s ease infinite}
@keyframes skeleton-pulse{0%,100%{opacity:1}50%{opacity:.5}}

.comp-section{display:flex;flex-direction:column;gap:8px}
.comp-section-title{font-size:.75rem;font-weight:600;color:var(--muted-foreground)}
.comp-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:10px 20px;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);color:var(--foreground);font-size:.8rem;font-weight:500;z-index:200;animation:toast-in .3s ease}
@keyframes toast-in{from{opacity:0;transform:translateX(-50%) translateY(10px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}
::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
@media(max-width:768px){.main{grid-template-columns:1fr;grid-template-rows:auto 1fr}.panel-sidebar{max-height:200px;border-right:none;border-bottom:1px solid var(--border)}}
