/* Genesis UI kit — layout & component styles.
   Tokens come from ../../colors_and_type.css */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  font-size: var(--fs-body);
  -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font-body); cursor: pointer; }
input, textarea, select { font-family: var(--font-body); }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ---- Nav ---- */
.nav { position: sticky; top: 0; z-index: 40; height: 56px; background: rgba(255,255,255,.78);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700;
  font-size: 18px; letter-spacing: -0.03em; color: var(--text-primary); }
.brand img { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 2px; margin-left: 24px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--text-secondary); padding: 7px 12px;
  border-radius: 6px; border: 0; background: transparent; transition: all 200ms var(--ease); }
.nav-link:hover { color: var(--text-primary); background: var(--bg-alt); }
.nav-link.active { color: var(--text-primary); background: var(--bg-alt); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: 9px; background: var(--bg); color: var(--text-muted); font-size: 13px; min-width: 240px; transition: all 200ms var(--ease); }
.nav-search:hover { border-color: var(--border-strong); }
.nav-search .kbd { margin-left: auto; display: flex; gap: 3px; }
.kbd-key { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); background: var(--surface);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center; transition: all 200ms var(--ease); }
.icon-btn:hover { background: var(--bg-alt); color: var(--text-primary); }
.avatar { border-radius: 9999px; background: linear-gradient(135deg,#a5b4fc,#6366F1); flex: none; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:600; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500;
  border-radius: 6px; border: 1px solid transparent; transition: all 200ms var(--ease); white-space: nowrap; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-md { height: 38px; padding: 0 18px; font-size: 14px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }
.btn [data-lucide] { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-btn-glow); }
.btn-secondary { background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.btn-secondary:hover { transform: translateY(-1px); border-color: #c8c8cf; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-alt); }
.btn-destructive { background: transparent; color: var(--error); border-color: #f3b6b6; }
.btn-destructive:hover { transform: translateY(-1px); background: var(--error-bg); }

/* ---- Chips ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px; padding: 4px 12px;
  font-size: 12px; font-weight: 500; border: 0; transition: all 200ms var(--ease); }
.chip-tag { background: var(--bg-alt); color: #555; }
.chip-tag:hover { background: #e9e9ec; }
.chip-tag.active { background: var(--primary); color: #fff; }
.chip-dot { width: 6px; height: 6px; border-radius: 9999px; }
.chip-pub { background: var(--success-bg); color: #0B7A53; }
.chip-pen { background: var(--warning-bg); color: #A66A00; }
.chip-rej { background: var(--error-bg); color: #C53030; }

/* ---- Kit card ---- */
.kit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 980px){ .kit-grid { grid-template-columns: repeat(2,1fr); } }
.kit-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  transition: all 200ms var(--ease); text-align: left; padding: 0; border-width:1px; cursor: pointer; }
.kit-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.kit-preview { height: 200px; display: flex; align-items: center; justify-content: center;
  background-color: var(--bg-alt); background-image: radial-gradient(#dcdce1 1.4px, transparent 1.4px); background-size: 18px 18px; }
.kit-swatches { display: flex; gap: 9px; }
.kit-sw { width: 34px; height: 50px; border-radius: 7px; box-shadow: 0 2px 10px rgba(0,0,0,.10); }
.kit-body { padding: 16px; }
.kit-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.kit-desc { font-size: 13px; color: var(--text-secondary); margin: 5px 0 14px; line-height: 1.45; }
.kit-foot { display: flex; align-items: center; gap: 8px; }
.kit-author { font-size: 12px; color: var(--text-secondary); }
.kit-stats { margin-left: auto; display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }
.kit-stats span { display: inline-flex; align-items: center; gap: 4px; }
.kit-stats [data-lucide] { width: 13px; height: 13px; }

/* ---- Generic ---- */
.section-head { font-family: var(--font-display); font-weight: 600; font-size: 32px; letter-spacing: -0.03em; }
.overline { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.card-surface { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---- Command palette / modal ---- */
.overlay { position: fixed; inset: 0; background: rgba(10,10,10,.32); backdrop-filter: blur(2px); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.cmd { width: 560px; max-width: 90vw; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden; }
.cmd-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cmd-input input { border: 0; outline: 0; font-size: 15px; flex: 1; background: transparent; color: var(--text-primary); }
.cmd-input [data-lucide] { width: 18px; height: 18px; color: var(--text-muted); }
.cmd-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.cmd-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.cmd-item:hover, .cmd-item.sel { background: var(--bg-alt); }
.cmd-item [data-lucide] { width: 16px; height: 16px; color: var(--text-secondary); }
.cmd-item .meta { margin-left: auto; font-size: 12px; color: var(--text-muted); }

/* ---- Input ---- */
.field-label { display:block; font-size: 12px; font-weight: 500; margin-bottom: 6px; color: var(--text-secondary); }
.input { width: 100%; font-size: 14px; padding: 10px 14px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-primary); outline: none; transition: all 150ms var(--ease); }
.input::placeholder { color: var(--text-muted); }
.input:focus { border-color: var(--primary); box-shadow: var(--focus-ring); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }
