/* JINKUSU SuperAdmin — ice / black / white (matches landing) */
:root {
  --black: #030712;
  --surface: #0c1220;
  --card: #0f172a;
  --border: rgba(125, 211, 252, 0.16);
  --border-hover: rgba(125, 211, 252, 0.35);
  --text: #fafafa;
  --dim: #94a3b8;
  --ice-100: #e0f2fe;
  --ice-200: #bae6fd;
  --ice-300: #7dd3fc;
  --ice-400: #38bdf8;
  --ice-500: #0ea5e9;
  --danger: #f87171;
  --font: "Inter", system-ui, sans-serif;
  --font-display: "Sora", var(--font);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--black);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 18, 32, 0.98), rgba(3, 7, 18, 0.99));
  backdrop-filter: blur(12px);
}
.bar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--border-hover), 0 8px 28px rgba(56, 189, 248, 0.12);
}
.bar-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.bar .dim {
  display: block;
  color: var(--ice-300);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 2px;
}

.panel {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 22px 72px;
}
.hidden { display: none !important; }

h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
h2 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 12px;
}
h3 { font-size: 1rem; margin: 0 0 10px; font-weight: 700; }
.hint { color: var(--dim); font-size: 13px; margin: 0 0 16px; line-height: 1.5; }

form label {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
input, select {
  display: block;
  width: 100%;
  max-width: 420px;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
}
input:focus, select:focus {
  outline: none;
  border-color: var(--ice-400);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

button {
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  font-size: 13px;
}
button.primary {
  background: linear-gradient(135deg, var(--ice-200), var(--ice-400));
  color: var(--black);
  border: none;
  margin-top: 10px;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.2);
}
button.primary:hover { filter: brightness(1.05); }
button.ghost:hover {
  border-color: var(--border-hover);
  color: var(--ice-100);
}

.err { color: var(--danger); font-size: 13px; margin-top: 14px; line-height: 1.45; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.create-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 28px;
}
.create-box .inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .create-box .inline { grid-template-columns: 1fr; }
}

.new-license {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(3, 7, 18, 0.92));
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.new-license h3 { color: var(--ice-200); }
.new-license img { max-width: 220px; display: block; margin: 14px 0; border-radius: 8px; }
.mono {
  font-size: 11px;
  word-break: break-all;
  color: var(--dim);
  line-height: 1.5;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.tbl th, .tbl td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}
.tbl th {
  color: var(--ice-300);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
code {
  font-size: 11px;
  background: var(--black);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--ice-200);
}

button.sm { padding: 6px 10px; font-size: 11px; margin-right: 6px; }
.danger-text { color: var(--danger) !important; border-color: rgba(248, 113, 113, 0.35) !important; }

.sess-dlg {
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  max-width: 760px;
  width: calc(100vw - 40px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.sess-dlg::backdrop {
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(4px);
}
.sess-dlg-inner { padding: 22px 24px 20px; }
.sess-dlg h3 { margin-top: 0; font-family: var(--font-display); }
.sess-max-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}
.sess-max-row label { margin-bottom: 0; flex: 1; min-width: 200px; }
.sess-max-row input { max-width: 120px; }
.sess-list-wrap {
  max-height: min(52vh, 420px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  background: var(--card);
}
.sess-mini {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.sess-mini th, .sess-mini td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.sess-mini th {
  position: sticky;
  top: 0;
  background: var(--card);
  color: var(--ice-300);
  z-index: 1;
}
.sess-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sess-badge.ok { background: rgba(56, 189, 248, 0.15); color: var(--ice-300); }
.sess-badge.off { background: rgba(248, 113, 113, 0.12); color: var(--danger); }
.sess-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.audit-block { margin-top: 8px; }
.audit-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 14px;
  align-items: end;
  margin-bottom: 12px;
}
.audit-filters label { margin-bottom: 0; font-size: 11px; }
.audit-filters input { max-width: none; margin-top: 6px; }
.audit-filters button { margin-top: 0; }
.audit-crit { display: flex; align-items: center; gap: 8px; flex-direction: row; text-transform: none; }
.audit-crit input { width: auto; margin: 0; }

.health-strip {
  font-size: 12px;
  color: var(--ice-300);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  margin-bottom: 18px;
}

.license-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px 14px;
  align-items: end;
  margin-bottom: 12px;
}
.license-filters label { margin-bottom: 0; font-size: 11px; }
.license-filters input, .license-filters select { max-width: none; margin-top: 6px; }

.lic-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.lic-pager .dim { color: var(--dim); }

.client-dl-box,
.orders-box,
.client-versions-box {
  background: var(--card);
  border: 1px solid var(--border-hover);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 24px;
}
.update-preview {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  max-height: 180px;
  overflow: auto;
  font-size: 11px;
  white-space: pre-wrap;
}
.client-ver-list {
  margin: 8px 0 0;
  padding-left: 1.1rem;
  font-size: 0.875rem;
}
.client-ver-list li { margin: 0.25rem 0; }
.client-dl-box h2 { font-size: 1rem; margin-bottom: 8px; }
.client-dl-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-top: 12px;
}
.client-dl-fields label { margin-bottom: 0; }
.client-dl-fields input,
.client-dl-fields textarea {
  width: 100%;
  margin-top: 6px;
}
.client-dl-fields textarea {
  min-height: 88px;
  resize: vertical;
  font-family: inherit;
}
@media (max-width: 720px) {
  .client-dl-fields { grid-template-columns: 1fr; }
}

.security-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 24px;
}
.security-box h2 { font-size: 1rem; margin-bottom: 8px; }
.inline-pw {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}
.inline-pw label { margin-bottom: 0; }
.inline-pw button { margin-top: 0; }
.audit-table-wrap {
  overflow: auto;
  max-height: min(50vh, 400px);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.audit-table-wrap .tbl { margin: 0; }
.tbl-compact th, .tbl-compact td {
  font-size: 11px;
  padding: 8px 8px;
  vertical-align: top;
}
.tbl-compact code { font-size: 10px; word-break: break-all; }
