/* ===== Nalar CMS — components ===== */

/* Card */
.card { background: #fff; background-image: radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.05), transparent 45%), radial-gradient(circle at 0% 100%, rgba(239, 68, 68, 0.04), transparent 45%); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: 14px 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); gap: 12px; }
.card-head h3 { font-size: 13px; font-weight: 600; }
.card-head p { font-size: 11.5px; color: var(--text-tertiary); margin-top: 1px; }
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* Page head */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.page-title { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.page-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.page-head-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: var(--r-md); border: 1px solid transparent;
  font-weight: 500; font-size: 12.5px; background: transparent; color: var(--text-primary); white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 100%, white 8%), var(--brand)); color: #fff; box-shadow: 0 1px 2px rgba(13,118,184,0.15), 0 4px 10px rgba(13,118,184,0.18); transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease; text-decoration: none; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; text-decoration: none; box-shadow: 0 2px 4px rgba(13,118,184,0.18), 0 6px 14px rgba(13,118,184,0.24); transform: translateY(-1px); }
.btn-primary:active { background: #08496f; color: #fff; text-decoration: none; box-shadow: 0 1px 2px rgba(13,118,184,0.2); transform: translateY(0); }
.btn-secondary { background: #fff; border-color: var(--border-strong); color: var(--text-primary); text-decoration: none; }
.btn-secondary:hover { background: var(--surface); color: var(--text-primary); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface); color: var(--text-primary); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.icon-btn {
  width: 28px; height: 28px; border-radius: var(--r-sm); border: none; background: transparent;
  display: flex; align-items: center; justify-content: center; color: var(--text-tertiary);
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { background: var(--surface); color: var(--text-primary); }

.select-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px;
  border-radius: var(--r-md); border: 1px solid var(--border-strong); background: #fff;
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
}
.select-chip svg { width: 14px; height: 14px; }
.select-chip:hover { background: var(--surface); }

/* Tags / badges */
.tag, .badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: var(--r-full); line-height: 1.5; white-space: nowrap;
}
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-emerald { background: var(--emerald-soft); color: var(--emerald); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-pink { background: var(--pink-soft); color: var(--pink); }
.badge-teal { background: var(--teal-soft); color: var(--teal); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-slate { background: var(--slate-soft); color: var(--slate); }
.badge-indigo { background: var(--indigo-soft); color: var(--indigo); }
.tag-accent { background: var(--brand-soft); color: var(--brand-text); }
.tag-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-secondary); }

/* Chip (removable) */
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500;
  background: var(--surface); color: var(--text-secondary); border-radius: var(--r-full); padding: 5px 5px 5px 10px;
}
.chip button { width: 16px; height: 16px; border: none; background: transparent; color: var(--text-tertiary); display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.chip button svg { width: 10px; height: 10px; }
.chip button:hover { background: var(--surface-hover); color: var(--text-primary); }

/* Avatar */
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0;
}

/* Stat icon dots */
.stat-icon, .activity-dot {
  width: 34px; height: 34px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.activity-dot { width: 28px; height: 28px; border-radius: 50%; }
.stat-icon svg, .activity-dot svg { width: 16px; height: 16px; }
.activity-dot svg { width: 13px; height: 13px; }
.ic-blue { background: var(--blue-soft); color: var(--blue); }
.ic-emerald { background: var(--emerald-soft); color: var(--emerald); }
.ic-amber { background: var(--amber-soft); color: var(--amber); }
.ic-purple { background: var(--purple-soft); color: var(--purple); }
.ic-pink { background: var(--pink-soft); color: var(--pink); }
.ic-teal { background: var(--teal-soft); color: var(--teal); }
.ic-red { background: var(--red-soft); color: var(--red); }
.ic-slate { background: var(--slate-soft); color: var(--slate); }
.ic-indigo { background: var(--indigo-soft); color: var(--indigo); }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card { padding: 14px 16px; }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-label { font-size: 11.5px; color: var(--text-tertiary); font-weight: 500; }
.stat-value { font-size: 20px; font-weight: 600; margin-top: 3px; letter-spacing: -0.01em; }
.stat-delta { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; margin-top: 9px; }
.stat-delta svg { width: 12px; height: 12px; }
.stat-delta.up { color: var(--emerald); }
.stat-delta.down { color: var(--red); }
.stat-delta-note { color: var(--text-tertiary); font-weight: 500; }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--text-tertiary); padding: 9px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 12.5px; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface); }
.row-flex { display: flex; align-items: center; gap: 10px; }
.cell-thumb { width: 34px; height: 34px; border-radius: var(--r-sm); flex-shrink: 0; }
.cell-thumb-img { overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.cell-thumb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell-primary { font-weight: 600; color: var(--text-primary); }
.cell-secondary { font-size: 11.5px; color: var(--text-tertiary); margin-top: 1px; }
.checkbox { width: 15px; height: 15px; accent-color: var(--brand); }

.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.table-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Artikel: search + kategori + tanggal + aksi dalam satu baris */
.table-toolbar-article {
  display: block;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.article-filters {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(130px, 170px) 128px 128px auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.article-filters .search-input {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 36px;
}
.article-filters .select-wrap {
  min-width: 0;
  width: 100%;
}
.article-filters input.input[type="date"] {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 36px;
  font-size: 12px;
  padding: 6px 8px;
  box-sizing: border-box;
}
.article-filters .btn {
  white-space: nowrap;
  justify-self: start;
}
.search-input { display: flex; align-items: center; gap: 7px; background: var(--surface); border-radius: var(--r-md); padding: 0 10px; height: 30px; width: 200px; }
.search-input svg { width: 14px; height: 14px; color: var(--text-tertiary); flex-shrink: 0; }
.search-input input { border: none; background: transparent; outline: none; width: 100%; font-size: 12px; }

.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-tertiary); }
.pagination { display: flex; align-items: center; gap: 3px; }
.page-btn { width: 26px; height: 26px; border-radius: var(--r-sm); border: none; background: transparent; color: var(--text-secondary); font-size: 12px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.page-btn svg { width: 14px; height: 14px; }
.page-btn:hover { background: var(--surface); }
.page-btn.active { background: var(--brand); color: #fff; }

/* Row action menu */
.row-actions { display: inline-flex; }
.menu {
  display: none; position: absolute; min-width: 180px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 5px; z-index: 50;
}
.menu.open { display: block; }
.menu-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: var(--r-sm); font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.menu-item svg { width: 15px; height: 15px; }
.menu-item:hover { background: var(--surface); color: var(--text-primary); text-decoration: none; }
.menu-item.active { background: var(--brand-soft); color: var(--brand-text); }
.menu-item.danger { color: var(--red); }
.menu-item.danger:hover { background: var(--red-soft); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }

/* Tabs */
.tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tab-btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 12.5px; font-weight: 500; color: var(--text-tertiary); background: transparent; border: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--brand-text); border-bottom-color: var(--brand); }
.tab-btn .count { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-full); background: var(--surface); color: var(--text-tertiary); }
.tab-btn.active .count { background: var(--brand-soft); color: var(--brand-text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Pill tabs (settings sub-nav) */
.pill-tabs { display: flex; flex-direction: column; gap: 2px; }
.pill-tab { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r-md); font-size: 12.5px; font-weight: 500; color: var(--text-secondary); }
.pill-tab svg { width: 16px; height: 16px; flex-shrink: 0; }
.pill-tab:hover { background: var(--surface); }
.pill-tab.active { background: var(--brand-soft); color: var(--brand-text); }

/* Forms */
.field { margin-bottom: 13px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.field .hint { font-weight: 400; color: var(--text-tertiary); font-size: 11px; }
.input, .textarea {
  width: 100%; border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 7px 10px;
  font-size: 12.5px; background: #fff; color: var(--text-primary);
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.textarea { min-height: 80px; resize: vertical; font-family: inherit; }
.input-title { width: 100%; border: none; outline: none; font-size: 20px; font-weight: 600; font-family: inherit; color: var(--text-primary); }
.input-title::placeholder { color: var(--text-tertiary); }

.select-wrap { position: relative; }
.select { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 7px 30px 7px 10px; background: #fff; appearance: none; font-size: 12.5px; }
.select-wrap svg { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text-tertiary); pointer-events: none; }

.radio { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.radio .dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-strong); }

.seg { display: inline-flex; background: var(--surface); border-radius: var(--r-md); padding: 3px; gap: 2px; }
.seg-opt { padding: 5px 10px; border-radius: var(--r-sm); font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.seg-opt.active { background: #fff; color: var(--text-primary); box-shadow: var(--shadow-xs); }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track { position: absolute; inset: 0; background: var(--border-strong); border-radius: var(--r-full); transition: 0.15s; }
.switch-track::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.15s; box-shadow: var(--shadow-xs); }
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::before { transform: translateX(16px); }

.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 12.5px; font-weight: 600; }
.settings-row-desc { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; max-width: 480px; line-height: 1.55; }

.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); padding: 18px; text-align: center;
  color: var(--text-tertiary); font-size: 11.5px; background: var(--surface); cursor: pointer;
}
.dropzone.has-image { border-style: solid; cursor: default; }
.dropzone.is-dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.is-uploading { opacity: .65; pointer-events: none; }
.dropzone svg { width: 20px; height: 20px; margin-bottom: 7px; color: var(--text-tertiary); }
.dropzone strong { color: var(--text-primary); font-weight: 600; }
.dropzone:hover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.has-image:hover { background: var(--surface); border-color: var(--border-strong); }

.empty-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--surface); color: var(--text-tertiary); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.empty-icon svg { width: 22px; height: 22px; }

/* Overlay / drawer / modal */
.overlay { display: none; position: fixed; inset: 0; background: rgba(23, 21, 35, 0.4); z-index: 60; }
.overlay.open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw; background: #fff; z-index: 61;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--border); }

.modal {
  display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -48%); width: 440px; max-width: 92vw;
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); z-index: 61;
}
.modal.open { display: block; }
.modal-head { padding: 15px 18px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--border); }

/* Activity feed */
.activity-item { display: flex; gap: 10px; padding: 8px 0; }
.activity-text { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.activity-text b { color: var(--text-primary); font-weight: 600; }
.activity-time { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }


/* ===== Template gallery, preview & code editor (template pages) ===== */
.t-thumb { position: relative; height: 118px; overflow: hidden; }
.t-thumb i { position: absolute; display: block; }

.tpl-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0; overflow: hidden; }
.tpl-hero-preview { position: relative; background: var(--surface); border-right: 1px solid var(--border); padding: 14px; }
.tpl-hero-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.tpl-hero-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.tpl-hero-desc { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }
.tpl-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.tpl-fact-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); }
.tpl-fact-value { font-size: 12.5px; font-weight: 500; margin-top: 2px; }
.tpl-swatches { display: flex; gap: 6px; margin-top: 3px; }
.tpl-swatches span { width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(0,0,0,0.09); }
.tpl-hero-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
@media (max-width: 980px) { .tpl-hero { grid-template-columns: 1fr; } .tpl-hero-preview { border-right: none; border-bottom: 1px solid var(--border); } }

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.tpl-item { border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; overflow: hidden; display: flex; flex-direction: column; transition: 0.12s; }
.tpl-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.tpl-item.is-active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tpl-item.hidden { display: none; }
.tpl-item-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; border-top: 1px solid var(--border); }
.tpl-item-name { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tpl-item-desc { font-size: 11.5px; color: var(--text-tertiary); line-height: 1.55; }
.tpl-item-actions { display: flex; gap: 6px; padding: 0 12px 11px; }
.tpl-item-actions .btn { flex: 1; }

.preview-stage { background: var(--surface); border-radius: var(--r-md); padding: 12px; display: flex; justify-content: center; }
.preview-viewport { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); width: 100%; height: 520px; }
.preview-viewport.mobile-shell { border-radius: 18px; box-shadow: var(--shadow-md); }
.preview-viewport iframe { border: 0; display: block; background: #fff; transform-origin: top left; }
.device-toggle { display: flex; gap: 2px; background: var(--surface); border-radius: var(--r-sm); padding: 2px; }
.device-btn { display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 5px; border: none; background: transparent; color: var(--text-tertiary); font-size: 11.5px; font-weight: 600; }
.device-btn svg { width: 13px; height: 13px; }
.device-btn.active { background: #fff; color: var(--brand-text); box-shadow: var(--shadow-xs); }
.scale-note { font-size: 11px; color: var(--text-tertiary); font-family: var(--font-mono); }

.preview-modal { position: fixed; inset: 16px; z-index: 70; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden; }
.preview-modal.open { display: flex; }
.preview-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.preview-modal-body { flex: 1; background: var(--surface); padding: 16px; display: flex; justify-content: center; overflow: hidden; }
.preview-modal-body .preview-viewport { height: 100%; }

/* Code editor */
.code-pane { background: #14161f; border-radius: var(--r-md); overflow: hidden; }
.code-tabs { display: flex; align-items: center; gap: 4px; padding: 7px 10px; background: #1c1f2b; border-bottom: 1px solid #2a2e3d; flex-wrap: wrap; }
.code-tab { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: #8b90a8; background: transparent; border: none; padding: 5px 10px; border-radius: var(--r-sm); }
.code-tab:hover { color: #d7dae8; }
.code-tab.active { background: #313648; color: #fff; }
.code-tab .dot { width: 6px; height: 6px; border-radius: 50%; background: #fbbf24; display: none; }
.code-tab.dirty .dot { display: block; }
.code-body { display: flex; max-height: 460px; overflow: auto; }
.code-gutter { padding: 12px 0 12px 12px; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.75; color: #454a63; text-align: right; user-select: none; }
.code-area { flex: 1; border: 0; outline: 0; resize: none; background: transparent; color: #d5d8e6; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.75; padding: 12px 14px; min-height: 420px; white-space: pre; overflow: hidden; tab-size: 2; }
.code-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #1c1f2b; border-top: 1px solid #2a2e3d; font-family: var(--font-mono); font-size: 10.5px; color: #7c8199; flex-wrap: wrap; }
.code-status { display: flex; align-items: center; gap: 6px; }
.code-status svg { width: 12px; height: 12px; }
.code-status.ok { color: #6ee7b7; }
.code-status.warn { color: #fcd34d; }

.var-ref { border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; }
.var-ref-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; font-size: 12px; font-weight: 600; }
.var-ref-body { padding: 0 12px 12px; display: none; }
.var-ref.open .var-ref-body { display: block; }
.var-list { display: flex; flex-wrap: wrap; gap: 5px; }
.var-list code { font-family: var(--font-mono); font-size: 10.5px; background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary); padding: 3px 7px; border-radius: 5px; cursor: pointer; }
.var-list code:hover { border-color: var(--brand); color: var(--brand-text); }

.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.opt-row:last-child { border-bottom: none; }
.opt-label { font-size: 12.5px; font-weight: 500; }
.opt-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.color-field { display: flex; align-items: center; gap: 7px; }
.color-field input[type="color"] { width: 26px; height: 26px; padding: 0; border: 1px solid var(--border-strong); border-radius: 6px; background: none; }
.color-field .hex { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); width: 62px; text-transform: uppercase; }
.range-field { display: flex; align-items: center; gap: 8px; width: 168px; }
.range-field input[type="range"] { flex: 1; accent-color: var(--brand); }
.range-field .val { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); width: 34px; text-align: right; }
.palette-row { display: flex; gap: 7px; flex-wrap: wrap; }
.palette-btn { display: flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: var(--r-full); border: 1px solid var(--border-strong); background: #fff; font-size: 11.5px; font-weight: 500; }
.palette-btn:hover { background: var(--surface); }
.palette-btn u { display: flex; }
.palette-btn u i { width: 11px; height: 11px; border-radius: 50%; display: block; margin-left: -3px; border: 1.5px solid #fff; }
