/* ═══════════════════════════════════════════════════
   CHAOTOKEN Shared Styles
   All pages load this. Page-specific styles stay in each HTML.
   ═══════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --bg:        #000000;
  --bg2:       #111111;
  --bg3:       #1a1a1a;
  --bg-card:   #161616;
  --accent:    #76b900;
  --accent2:   #5e9400;
  --text:      #ffffff;
  --muted:     #999999;
  --border:    rgba(255,255,255,.1);
  --green:     #76b900;
  --red:       #ff4444;
  --sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Helvetica Neue', sans-serif;
  --mono:      'SF Mono', 'Fira Code', monospace;
  --radius:    4px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg); color: var(--text); font-family: var(--sans); }
body { background: var(--bg); color: var(--text); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
[v-cloak] { display: none; }

/* ── Buttons ── */
.section-btn {
  padding: 7px 16px; font-size: 12px; font-weight: 700;
  background: var(--accent); color: #fff; border: none;
  cursor: pointer; font-family: var(--sans); letter-spacing: .03em;
  transition: background .15s; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1.4;
}
.section-btn:hover { background: var(--accent2); }
.section-btn:disabled { opacity: .4; cursor: not-allowed; }

.tb-btn {
  padding: 7px 16px; font-size: 12px; font-weight: 600;
  background: var(--accent); color: #fff; border: none;
  cursor: pointer; font-family: var(--sans);
  transition: background .15s; display: inline-flex;
  align-items: center; justify-content: center; line-height: 1.4;
}
.tb-btn:hover { background: var(--accent2); }
.tb-btn:disabled { opacity: .4; cursor: not-allowed; }
.tb-btn.active { background: var(--accent2); font-weight: 700; }

.btn-primary {
  padding: 7px 16px; font-size: 12px; font-weight: 700;
  background: var(--accent); color: #fff; border: none;
  cursor: pointer; font-family: var(--sans);
  transition: background .15s; line-height: 1.4;
}
.btn-primary:hover { background: var(--accent2); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }

.btn-secondary {
  padding: 7px 16px; font-size: 12px; font-weight: 600;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; font-family: var(--sans);
  transition: all .15s; line-height: 1.4;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }

.auth-btn {
  padding: 7px 16px; font-size: 12px; font-weight: 700;
  background: var(--accent); color: #fff;
  border: none; cursor: pointer; font-family: var(--sans);
  transition: background .15s; letter-spacing: .03em;
  text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center;
  width: auto; line-height: 1.4;
}
.auth-btn:hover { background: var(--accent2); }
.auth-btn:disabled { opacity: .4; cursor: not-allowed; }

.link-btn {
  background: none; border: none; cursor: pointer;
  font-size: 11px; color: var(--muted); font-family: var(--sans);
}
.link-btn:hover { color: var(--accent); }
.link-btn.danger:hover { color: var(--red); }

/* ── Form inputs (shared) ── */
.auth-input {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  padding: 9px 12px; color: var(--text); font-size: 13px;
  outline: none; margin-bottom: 10px; font-family: var(--sans);
}
.auth-input:focus { border-color: var(--accent); }

/* ── Badges ── */
.badge {
  display: inline-block; padding: 2px 8px;
  font-size: 10px; font-weight: 600;
}
.badge-green { background: rgba(118,185,0,.15); color: var(--green); }
.badge-red { background: rgba(255,68,68,.12); color: var(--red); }
.badge-amber { background: rgba(255,166,0,.12); color: #ffa500; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 28px; width: 400px; max-width: 90vw;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 8px 60px rgba(0,0,0,.8);
}
.modal h4 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.modal input, .modal select {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  padding: 9px 12px; color: var(--text); font-size: 12px;
  outline: none; margin-bottom: 10px; font-family: var(--sans);
}
.modal input:focus, .modal select:focus { border-color: var(--accent); }
.modal select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 28px;
}
.modal-row { display: flex; gap: 10px; }
.modal-row input { margin-bottom: 10px; }
.modal-btns { display: flex; gap: 8px; margin-top: 4px; }
.modal-info { font-size: 11px; color: var(--muted); margin-bottom: 10px; }

/* ── Utility ── */
.td-mono { font-family: var(--mono); font-size: 11px; }
.td-muted { color: var(--muted); }
.no-data { text-align: center; padding: 40px; color: var(--muted); font-size: 13px; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 12px 18px; font-size: 13px;
  z-index: 200; box-shadow: 0 4px 20px rgba(0,0,0,.5);
}

/* ── Transitions ── */
.fade-enter-active, .fade-leave-active { transition: opacity .2s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }
