:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface2: #ffffff;
  --border: #e3e8f0;
  --text: #0f172a;
  --muted: #5b6878;
  --accent: #2563eb;
  --success: #059669;
  --danger: #dc2626;
  --warn: #b45309;
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; min-height: 100vh; }

nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 20px; }
.nav-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 52px; }
.logo { font-weight: 700; font-size: 1.1rem; }
.nav-badge { font-size: .75rem; color: var(--muted); background: var(--surface2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 20px; }

.tool-tabs { background: var(--surface); border-bottom: 1px solid var(--border); }
.tabs-inner { max-width: 900px; margin: 0 auto; display: flex; gap: 2px; padding: 0 4px; }
.tool-tab { background: none; border: none; color: var(--muted); padding: 14px 18px; cursor: pointer; font-size: .875rem; font-weight: 500; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.tool-tab:hover { color: var(--text); }
.tool-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.container { max-width: 900px; margin: 0 auto; padding: 28px 20px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* GEN CARD */
.gen-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.gen-options { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 24px; }
.option-group { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.opt-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; width: 60px; flex-shrink: 0; }
.radio-label, .checkbox-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: .875rem; color: var(--muted); transition: color .15s; }
.radio-label:hover, .checkbox-label:hover { color: var(--text); }
.radio-label input, .checkbox-label input { accent-color: var(--accent); }

.uuid-display { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
#uuid-text { font-family: 'Consolas', 'Monaco', monospace; font-size: 1.1rem; color: var(--accent); letter-spacing: .05em; word-break: break-all; flex: 1; }
.uuid-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-icon { background: var(--surface); border: 1px solid var(--border); color: var(--muted); width: 36px; height: 36px; border-radius: var(--radius); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color .15s, border-color .15s; }
.btn-icon:hover { color: var(--accent); border-color: var(--accent); }
.btn-primary { background: var(--accent); border: none; color: #fff; padding: 9px 20px; border-radius: var(--radius); cursor: pointer; font-size: .875rem; font-weight: 600; transition: opacity .15s; }
.btn-primary:hover { opacity: .85; }
.btn-sm { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 6px 12px; border-radius: 5px; cursor: pointer; font-size: .8rem; transition: background .15s; }
.btn-sm:hover { background: var(--border); }

.copy-toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--success); color: #0a1a12; padding: 8px 24px; border-radius: 20px; font-weight: 700; font-size: .875rem; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 100; }
.copy-toast.show { opacity: 1; }

/* HISTORY */
.recent-section { margin-bottom: 20px; }
.recent-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.history-list { display: flex; flex-direction: column; gap: 4px; }
.history-item { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 8px 14px; font-family: monospace; font-size: .875rem; color: var(--muted); }
.history-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px 6px; font-size: .75rem; border-radius: 4px; transition: color .15s; flex-shrink: 0; }
.history-item button:hover { color: var(--accent); }

/* BULK */
.bulk-controls { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.field-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.field-row label { font-size: .875rem; font-weight: 600; color: var(--muted); min-width: 55px; }
.num-input { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 7px 12px; border-radius: 6px; width: 80px; font-size: .875rem; outline: none; }
.num-input:focus { border-color: var(--accent); }
.muted-txt { font-size: .8rem; color: var(--muted); }
.bulk-area { width: 100%; height: 340px; background: var(--surface2); border: 1px solid var(--border); color: var(--success); font-family: 'Consolas', 'Monaco', monospace; font-size: .875rem; padding: 14px; outline: none; resize: vertical; border-radius: var(--radius); }
.info-bar { padding: 6px 0; font-size: .8rem; color: var(--muted); }

/* VALIDATE */
.validate-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.field-row-col { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field-row-col label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.text-input { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 10px 14px; border-radius: 6px; font-family: 'Consolas', monospace; font-size: .95rem; outline: none; width: 100%; letter-spacing: .05em; }
.text-input:focus { border-color: var(--accent); }
.val-result { padding: 16px; border-radius: var(--radius); font-size: .9rem; line-height: 1.8; display: none; }
.val-result.valid { background: #0d2a1f; border: 1px solid #05966944; color: var(--success); display: block; }
.val-result.invalid { background: #2a0d0d; border: 1px solid #dc262644; color: var(--danger); display: block; }
.val-label { font-weight: 700; margin-bottom: 4px; }
.val-row { display: flex; gap: 12px; }
.val-key { color: var(--muted); min-width: 80px; }

/* TIP */
.tip-row { padding: 12px 16px; background: var(--surface2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; font-size: .85rem; color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 600px) {
  .uuid-display { flex-direction: column; }
  .uuid-actions { width: 100%; justify-content: flex-end; }
  #uuid-text { font-size: .9rem; }
  .bulk-controls { flex-direction: column; align-items: flex-start; }
}
