/* =========================================================
 * License Cloud Admin — Dark OLED Ops Console
 * Design system from ui-ux-pro-max:
 * - Style: Dark Mode OLED / Professional SaaS dashboard
 * - Colors: slate base + indigo accent + green success
 * - Type: Fira Sans + Fira Code + Noto Sans SC
 * - UX: 44px touch targets, focus rings, reduced-motion
 * ========================================================= */

:root {
  --bg: #020617;
  --bg-elevated: #0b1224;
  --panel: #0f172a;
  --panel-2: #111827;
  --panel-hover: #152038;
  --line: #1e293b;
  --line-strong: #334155;
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --brand: #6366f1;
  --brand-2: #818cf8;
  --brand-soft: rgba(99, 102, 241, 0.14);
  --brand-border: rgba(99, 102, 241, 0.42);
  --ok: #22c55e;
  --ok-soft: rgba(34, 197, 94, 0.12);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.12);
  --bad: #ef4444;
  --bad-soft: rgba(239, 68, 68, 0.12);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.12);
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 0 0 0 3px rgba(99, 102, 241, 0.35);
  --font: "Fira Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --side-w: 268px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(34, 197, 94, 0.08), transparent 50%),
    radial-gradient(600px 400px at 50% 100%, rgba(56, 189, 248, 0.05), transparent 45%),
    var(--bg);
}

a { color: var(--brand-2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); }

.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  backdrop-filter: blur(12px);
  z-index: 20;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 4px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.brand-mark svg { width: 22px; height: 22px; color: white; }

.brand-text .brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 16px;
  line-height: 1.2;
}

.brand-text .sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.side-section-label {
  margin: 8px 10px 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.nav svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

.nav:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav.active {
  background: var(--brand-soft);
  border-color: var(--brand-border);
  color: #e0e7ff;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.08);
}

.nav.active svg { color: var(--brand-2); }

.side-foot {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
}

.side-foot .label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.side-foot label,
.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(2, 6, 23, 0.4);
}

.auth-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.auth-pill.ok {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--ok-soft);
}
.auth-pill.ok::before { background: var(--ok); }

.auth-pill.bad {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.35);
  background: var(--bad-soft);
}
.auth-pill.bad::before { background: var(--bad); }

/* ---------- Main ---------- */
.main {
  min-width: 0;
  padding: 20px 22px 48px;
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.top-left { min-width: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.top h1 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.view { animation: fadeIn 220ms var(--ease); }
.view.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Cards / Panels ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}

.card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 13px;
  box-shadow: var(--shadow);
  transition: border-color 180ms var(--ease), transform 180ms var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.card .k {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card .v {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
}

.card.tone-ok .v { color: #86efac; }
.card.tone-warn .v { color: #fcd34d; }
.card.tone-bad .v { color: #fca5a5; }
.card.tone-info .v { color: #7dd3fc; }
.card.tone-brand .v { color: #c7d2fe; }

.card::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18), transparent 70%);
  pointer-events: none;
}

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 30%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.panel-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Controls ---------- */
.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #152038;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  transition: filter 150ms var(--ease), background 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease);
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; }

.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: transparent;
  color: white;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  background: var(--bad-soft);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.btn.soft {
  background: rgba(255, 255, 255, 0.03);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.toolbar .grow { flex: 1 1 180px; min-width: 160px; }

.field, .side-foot input,
.form input, .form select, .form textarea,
.toolbar input, .toolbar select {
  width: 100%;
  min-height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #0b1220;
  color: var(--text);
  padding: 8px 12px;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.form textarea { min-height: 88px; resize: vertical; }

.field:focus, .side-foot input:focus,
.form input:focus, .form select:focus, .form textarea:focus,
.toolbar input:focus, .toolbar select:focus {
  border-color: var(--brand-border);
  box-shadow: var(--focus);
  outline: none;
}

.form {
  display: grid;
  gap: 12px;
}

.grid2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form label, .field-block {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.form .col2, .field-block.col2 { grid-column: 1 / -1; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* ---------- Table ---------- */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.25);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  background: #0d1528;
  white-space: nowrap;
}

tbody tr {
  transition: background 140ms var(--ease);
}

tbody tr:hover {
  background: rgba(99, 102, 241, 0.06);
}

tbody tr:last-child td { border-bottom: none; }

td.mono, code, .code, .mono {
  font-family: var(--mono);
  font-size: 12px;
}

code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
  word-break: break-all;
}

.code {
  background: #060b18;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 96px;
  color: #c7d2fe;
  line-height: 1.55;
}

.ops {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ops .btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px !important;
}

/* ---------- Badge / Tips ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.badge.active, .badge.valid {
  color: #bbf7d0;
  background: var(--ok-soft);
  border-color: rgba(34, 197, 94, 0.28);
}

.badge.revoked, .badge.expired, .badge.unbound, .badge.bad {
  color: #fecaca;
  background: var(--bad-soft);
  border-color: rgba(239, 68, 68, 0.28);
}

.badge.warn {
  color: #fde68a;
  background: var(--warn-soft);
  border-color: rgba(245, 158, 11, 0.28);
}

.badge.info {
  color: #bae6fd;
  background: var(--info-soft);
  border-color: rgba(56, 189, 248, 0.28);
}

.tips {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tips li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}

.tips li svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--brand-2);
}

.tips code {
  font-size: 11px;
}

.help-text {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.issue-result-wrap {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.issue-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- Toast / Modal ---------- */
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: min(420px, calc(100vw - 24px));
  background: #0b1220;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  z-index: 50;
  box-shadow: var(--shadow);
  animation: fadeIn 180ms var(--ease);
}

.toast.hidden { display: none; }
.toast.ok { border-color: rgba(34, 197, 94, 0.4); }
.toast.bad { border-color: rgba(239, 68, 68, 0.45); }

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 60;
}

.modal-mask.hidden { display: none; }

.modal {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.modal h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.modal p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* ---------- Mobile ---------- */
.mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
}

.mobile-bar .brand {
  font-weight: 700;
  font-size: 15px;
}

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .mobile-bar { display: flex; }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 300px);
    transform: translateX(-105%);
    transition: transform 220ms var(--ease);
    box-shadow: var(--shadow);
  }
  .side.open { transform: none; }
  .side-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    z-index: 19;
  }
  .side-backdrop.hidden { display: none; }
  .main { padding: 14px 14px 40px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: stretch; }
  .top-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card .v { font-size: 22px; }
}

/* 授权码操作：变更按钮 */
.ops .btn.soft {
  border-color: color-mix(in srgb, var(--accent, #6ee7b7) 35%, transparent);
}
/* stamp:1785632298 */
