﻿:root {
  color-scheme: light;
  --primary: #3264ff;
  --primary-dark: #203fbd;
  --sidebar: #26339a;
  --sidebar-deep: #17246f;
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #7b8496;
  --line: #e6ebf2;
  --danger: #ef4444;
  --success: #16a34a;
  --warning: #f59e0b;
  --shadow: 0 18px 48px rgba(28, 43, 91, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

h1,
h2,
p {
  margin: 0;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.site-footer {
  position: absolute;
  z-index: 2;
  right: 50%;
  bottom: 14px;
  left: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 7px 16px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  font-size: 13px;
  text-align: center;
  transform: translateX(50%);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
}

.site-footer-divider {
  color: #94a3b8;
}

.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 430px;
  gap: 46px;
  align-items: center;
  overflow: hidden;
  padding: 44px max(40px, calc((100vw - 1220px) / 2));
  background:
    radial-gradient(circle at 18% 18%, rgba(120, 236, 255, 0.28), transparent 26%),
    radial-gradient(circle at 72% 20%, rgba(78, 199, 185, 0.18), transparent 24%),
    linear-gradient(135deg, #081126 0%, #182a75 48%, #eef4ff 48%, #f7fbff 100%);
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.login-screen::before {
  width: 620px;
  height: 620px;
  left: -180px;
  bottom: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(50, 100, 255, 0.38), transparent 68%);
}

.login-screen::after {
  width: 1px;
  height: 130%;
  left: 53%;
  top: -15%;
  background: linear-gradient(180deg, transparent, rgba(122, 236, 255, 0.72), transparent);
  box-shadow: 0 0 26px rgba(122, 236, 255, 0.58);
  transform: rotate(42deg);
}

.login-brand {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 22px;
  color: #ffffff;
  text-align: center;
}

.brand-hero {
  display: grid;
  justify-items: center;
}

.eyebrow {
  margin-bottom: 12px;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.82;
}

.login-brand h1 {
  font-size: clamp(42px, 5.5vw, 68px);
  line-height: 1.04;
  letter-spacing: 0.08em;
  text-shadow: 0 0 28px rgba(128, 226, 255, 0.42);
}

.brand-subtitle {
  margin-top: 16px;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.95;
}

.brand-price {
  margin-top: 10px;
  padding: 9px 18px;
  border: 1px solid rgba(139, 236, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #dff8ff;
  font-size: clamp(14px, 1.35vw, 17px);
  box-shadow: inset 0 0 22px rgba(110, 231, 255, 0.08), 0 12px 34px rgba(0, 0, 0, 0.16);
}

.qr-list {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.qr-card {
  position: relative;
  width: min(178px, 34vw);
  padding: 12px 12px 14px;
  border: 1px solid rgba(130, 230, 255, 0.32);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.09));
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.22), inset 0 0 28px rgba(122, 236, 255, 0.08);
  backdrop-filter: blur(10px);
}

.qr-card img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.92);
}

.qr-card p {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: #eafcff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.qr-orbit {
  position: absolute;
  inset: -10px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(95, 119, 255, 0.28), rgba(78, 199, 185, 0.3));
  filter: blur(18px);
}

.status {
  display: inline-flex;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.status.error {
  background: rgba(239, 68, 68, 0.16);
  color: #fff0f0;
}

.login-card {
  padding: 34px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.card-head {
  margin-bottom: 26px;
}

.card-head h2 {
  font-size: 28px;
}

.card-head p,
.section-title p,
#welcomeText,
.admin-status {
  margin-top: 8px;
  color: var(--muted);
}

.auth-form,
.workflow-form,
.profile-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: #4b5563;
  font-size: 14px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 28px;
  height: 28px;
  transform: translateY(-50%);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
}

.password-toggle:hover {
  background: #eef3ff;
  color: var(--primary-dark);
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(50, 100, 255, 0.12);
}

.primary,
.light,
.ghost,
.forgot-password,
.danger-soft,
.activate-soft,
.device-toggle,
.tab {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 700;
}

.primary {
  background: var(--primary);
  color: #ffffff;
}

.primary:hover {
  background: var(--primary-dark);
}

.ghost,
.light {
  background: #eef3ff;
  color: var(--primary-dark);
}

.forgot-password {
  background: transparent;
  color: var(--primary-dark);
}

.forgot-password:hover {
  background: #eef3ff;
}

.danger-soft {
  background: #fff0f0;
  color: var(--danger);
}

.device-toggle.disable,
.device-toggle.enable,
.activate-soft {
  background: #ecfdf3;
  color: var(--success);
}

.device-unbind {
  background: #fff0f0;
  color: var(--danger);
}

.device-toggle.disable:hover,
.device-toggle.enable:hover,
.activate-soft:hover {
  background: var(--success);
  color: #ffffff;
}

.device-unbind:hover {
  background: var(--danger);
  color: #ffffff;
}

.full {
  width: 100%;
}

.admin-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}

.sidebar {
  padding: 24px 18px;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-deep));
  color: #ffffff;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 26px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.sidebar-logo small {
  display: block;
  margin-top: 4px;
  opacity: 0.72;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav a {
  padding: 13px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.side-nav a.active,
.side-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.admin-main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px 26px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff, #eaf0ff);
  box-shadow: var(--shadow);
}

.topbar h1 {
  font-size: 28px;
}

.topbar-actions,
.table-controls,
.filter-tabs,
.group-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.actions-cell .actions-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.table-controls {
  justify-content: flex-end;
}

.search-input {
  width: 300px;
  min-height: 42px;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.admin-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}

.admin-status.error {
  background: #fff0f0;
  color: var(--danger);
}

.content-card {
  margin-top: 18px;
  padding: 22px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(28, 43, 91, 0.08);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.setting-item {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.setting-item span {
  color: var(--muted);
  font-size: 13px;
}

.setting-item strong,
.download-card strong {
  color: var(--text);
  font-size: 16px;
}

.security-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.help-block {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.help-block h3 {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 17px;
}

.help-block ol,
.help-block ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

.help-block strong {
  color: var(--text);
}

.download-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  max-width: 760px;
}

.download-meta {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.download-meta span {
  color: var(--muted);
  font-size: 13px;
}

.download-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.download-note {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.7;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.workflow-form {
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  align-items: end;
}

.profile-form {
  max-width: 760px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}

.table-title {
  align-items: flex-start;
}

.tab {
  background: #f1f4fa;
  color: #657084;
}

.tab.active,
.tab:hover {
  background: var(--primary);
  color: #ffffff;
}

.license-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.license-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.license-table th,
.license-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.license-table tbody tr:nth-child(even) td {
  background-image: linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22));
}

.license-table th {
  color: #667085;
  font-weight: 700;
}

.license-table th:nth-child(1),
.license-table td:nth-child(1) {
  background-color: #f8fbff;
}

.license-table th:nth-child(2),
.license-table td:nth-child(2) {
  background-color: #f7fcf9;
}

.license-table th:nth-child(3),
.license-table td:nth-child(3) {
  background-color: #fffaf2;
}

.license-table th:nth-child(4),
.license-table td:nth-child(4) {
  background-color: #f8f6ff;
}

.license-table th:nth-child(5),
.license-table td:nth-child(5) {
  background-color: #f4fbfb;
}

.license-table th:nth-child(6),
.license-table td:nth-child(6) {
  background-color: #fff7f7;
}

.license-table th:nth-child(7),
.license-table td:nth-child(7) {
  background-color: #f7faff;
}

.license-table th:nth-child(8),
.license-table td:nth-child(8) {
  background-color: #fbf8ff;
}

.license-table th:nth-child(9),
.license-table td:nth-child(9) {
  background-color: #f9fcf4;
}

.license-table th:nth-child(10),
.license-table td:nth-child(10) {
  background-color: #fff8fb;
}

.license-table tr:hover td {
  background-image: linear-gradient(rgba(50, 100, 255, 0.04), rgba(50, 100, 255, 0.04));
}

.col-code {
  min-width: 190px;
}

.col-status {
  min-width: 64px;
}

.col-user {
  min-width: 80px;
}

.col-workflow {
  min-width: 96px;
}

.col-created,
.col-expiry {
  min-width: 92px;
}

.col-devices {
  min-width: 260px;
}

.col-period {
  min-width: 72px;
}

.col-limit {
  min-width: 86px;
}

.col-actions {
  min-width: 360px;
}

.code-cell {
  font-family: Consolas, "SFMono-Regular", monospace;
  line-height: 1.35;
  text-align: left;
}

.code-cell .code-with-copy span {
  word-break: break-all;
}

.status-cell {
  white-space: nowrap;
}

.user-cell,
.workflow-cell {
  white-space: nowrap;
  line-height: 1.25;
}

.time-cell {
  line-height: 1.25;
}

.devices-cell {
  overflow: visible;
  text-align: left;
}

.actions-cell {
  vertical-align: middle;
  text-align: center;
}



.value-with-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.code-with-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.copy-icon {
  min-width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 6px;
  background: #eef3ff;
  color: var(--primary-dark);
  font-size: 12px;
  line-height: 1;
}

.copy-icon:hover,
.copy-icon.copied {
  background: var(--primary);
  color: #ffffff;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
  font-weight: 700;
}

.pill.disabled {
  background: rgba(245, 158, 11, 0.14);
  color: var(--warning);
}

.pill.destroyed,
.pill.expired {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.group-tools {
  min-width: 76px;
}

.group-tools select {
  width: 76px;
  min-height: 32px;
  padding: 4px 6px;
}

.group-name-input {
  min-width: 92px;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 12px;
}

.device-limit-input {
  width: 62px;
  min-height: 32px;
  padding: 4px 6px;
}

.force-device-limit-toggle {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 7px;
  border-radius: 7px;
  background: #eef3ff;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.force-device-limit-toggle input {
  width: 14px;
  min-height: 14px;
  padding: 0;
}

.device-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.device-items-scroll {
  display: grid;
  gap: 6px;
  max-height: 108px;
  overflow-y: auto;
  padding-right: 3px;
}

.device-items-scroll::-webkit-scrollbar {
  width: 6px;
}

.device-items-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.device-summary {
  color: var(--primary-dark);
  font-weight: 700;
}

.device-empty {
  color: var(--muted);
  font-size: 13px;
}

.device-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 11px;
  color: var(--muted);
}

.device-item span {
  min-width: max-content;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.device-name {
  font-weight: 700;
  color: var(--text);
}

.device-item.disabled .device-name {
  color: var(--danger);
}

.small {
  min-height: 28px;
  padding: 0 5px;
  border-radius: 7px;
  font-size: 11px;
  white-space: nowrap;
}

.empty-state,
.empty-cell {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.notice-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 800;
}

.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.notice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
}

.notice-panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.notice-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 16px;
  border-bottom: 1px solid var(--line);
}

.notice-eyebrow {
  margin-bottom: 6px;
  color: var(--warning);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.notice-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 22px;
}

.notice-body {
  display: grid;
  gap: 14px;
  padding: 22px 26px;
  color: var(--text);
  line-height: 1.8;
}

.notice-version,
.notice-alert {
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef3ff;
  color: var(--primary-dark);
  font-weight: 700;
}

.notice-alert {
  background: #fff7ed;
  color: #c2410c;
}

.notice-body h3 {
  margin: 4px 0 0;
  color: var(--primary-dark);
}

.notice-body ul,
.notice-body ol {
  margin: 0;
  padding-left: 22px;
}

.notice-summary {
  color: var(--muted);
}

.notice-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 26px 24px;
}

@media (max-width: 960px) {
  .login-screen,
  .admin-screen {
    grid-template-columns: 1fr;
  }

  .login-screen {
    gap: 28px;
    padding: 30px 18px;
  }

  .site-footer {
    bottom: 10px;
    right: 50%;
    left: auto;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 12px;
  }

  .login-screen::after {
    left: 72%;
    opacity: 0.42;
  }

  .login-brand {
    gap: 20px;
  }

  .qr-list {
    gap: 14px;
  }

  .qr-card {
    width: min(168px, 42vw);
  }

  .sidebar {
    position: static;
  }

  .workflow-form,
  .topbar,
  .section-title,
  .table-controls {
    grid-template-columns: 1fr;
    display: grid;
  }
}


