:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #0b0a12;
  color: #f4f1ff;
  --panel: rgba(20, 18, 32, .9);
  --border: rgba(159, 119, 255, .18);
  --muted: #a7a2b9;
  --accent: #a477ff;
  --accent-light: #c3a3ff;
}

* { box-sizing: border-box; }
body {
  min-width: 360px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 10% 0, rgba(122, 72, 221, .2), transparent 36rem),
    radial-gradient(ellipse at 100% 70%, rgba(93, 49, 184, .12), transparent 34rem),
    linear-gradient(145deg, #0b0a12, #12101c 58%, #0b0a12);
}
button, input, select { font: inherit; }
[hidden] { display: none !important; }
.page { width: min(1420px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 32px; }
.page-header, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-header { min-height: 72px; margin-bottom: 28px; }
.brand { display: flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.brand img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 0 14px #a477ff70); }
.brand > span { display: grid; gap: 2px; }
.brand strong { font-size: 20px; font-weight: 650; letter-spacing: -.2px; }
.header-tools { display: grid; gap: 4px; margin-right: auto; padding-left: 24px; }
.eyebrow { margin: 0 0 7px; color: var(--accent-light); font-size: 10px; font-weight: 750; letter-spacing: 1.5px; }
.subtitle, .panel p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.subtitle { margin: 0; }
.header-tools .eyebrow { display: none; }
.connection-status { padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; color: #cfc5e9; font-size: 11px; white-space: nowrap; }
.connection-status.online { border-color: #36775d; color: #8de0b4; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.7px; }
h2 { margin-bottom: 5px; font-size: 16px; }
.panel { margin-bottom: 15px; padding: 21px; border: 1px solid var(--border); border-radius: 15px; background: linear-gradient(145deg, rgba(24, 21, 37, .96), rgba(17, 15, 27, .96)); box-shadow: 0 18px 50px #0004, inset 0 1px #ffffff08; }
.login-panel { max-width: 600px; margin: 70px auto; padding: 28px; }
.inline-form { display: flex; gap: 10px; }
input, select { min-width: 0; min-height: 41px; padding: 0 12px; border: 1px solid #373149; border-radius: 9px; outline: 0; background: #11101a; color: #f4f1ff; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #a477ff20; }
.button { min-height: 39px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px; color: white; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: .16s ease; }
.button:hover:not(:disabled) { filter: brightness(1.14); transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button.primary { background: linear-gradient(110deg, #a477ff, #6536c7); box-shadow: 0 6px 18px #864ded30; }
.button.secondary { border-color: #493b63; background: #211a30; color: #d5c3ff; }
.button.danger { border-color: #70384e; background: #351a29; color: #ffadca; }
.dashboard-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 18px; align-items: start; }
.sidebar { position: sticky; top: 16px; display: flex; min-height: 610px; flex-direction: column; padding: 18px 12px; border: 1px solid var(--border); border-radius: 15px; background: linear-gradient(180deg, rgba(23, 19, 36, .96), rgba(15, 13, 24, .96)); box-shadow: inset 0 1px #ffffff08; }
.nav-caption { margin: 3px 12px 12px; color: #78728d; font-size: 9px; font-weight: 750; letter-spacing: 1.3px; }
.nav-list { display: grid; gap: 7px; }
.nav-item { position: relative; display: flex; min-height: 44px; align-items: center; gap: 11px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #aaa4bc; cursor: pointer; font-size: 12px; text-align: left; transition: .16s ease; }
.nav-item > span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; background: #ffffff08; color: #b9a0ee; font-size: 16px; }
.nav-item:hover { background: #ffffff08; color: #eee6ff; }
.nav-item.active { border-color: #7651b844; background: linear-gradient(100deg, #7045b32b, #a477ff0b); color: #e7d9ff; box-shadow: inset 3px 0 var(--accent); }
.nav-item.active > span { background: #a477ff24; color: #d4bbff; }
.sidebar-footer { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 15px 8px 2px; border-top: 1px solid #ffffff10; color: #9a94aa; font-size: 10px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #48d49b; box-shadow: 0 0 10px #48d49b88; }
.dashboard-content { min-width: 0; }
.dashboard-panel { animation: panel-in .18s ease; }
@keyframes panel-in { from { opacity: .65; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.section-heading { margin-bottom: 17px; }
.section-heading > div { min-width: 0; }
.section-heading h1, .section-heading h2 { margin-bottom: 5px; }
.section-heading p { margin-bottom: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.stat-card { position: relative; display: grid; min-height: 148px; align-content: start; gap: 8px; padding: 17px; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(145deg, rgba(28, 23, 43, .98), rgba(17, 15, 27, .98)); }
.stat-card::after { position: absolute; right: -26px; bottom: -42px; width: 112px; height: 112px; border-radius: 50%; background: radial-gradient(circle, #a477ff19, transparent 70%); content: ""; }
.stat-icon { position: absolute; top: 14px; right: 15px; color: #b390ff; font-size: 19px; }
.stat-label { color: #aaa2bc; font-size: 9px; font-weight: 750; letter-spacing: .9px; }
.stat-card strong { margin-top: 8px; color: #fff; font-size: 31px; font-weight: 650; line-height: 1; }
.stat-card small { color: #8f899f; font-size: 10px; }
.chart-panel { margin-bottom: 15px; }
.creation-chart { display: grid; height: 150px; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; padding-top: 8px; border-bottom: 1px solid #ffffff16; }
.chart-column { display: grid; min-width: 0; grid-template-rows: 16px 1fr 18px; justify-items: center; gap: 6px; }
.chart-column strong { color: #cfc1ea; font-size: 10px; }
.chart-column small { color: #8f899f; font-size: 9px; text-transform: capitalize; }
.chart-track { display: flex; width: min(100%, 30px); height: 100%; align-items: end; overflow: hidden; border-radius: 8px 8px 3px 3px; background: #ffffff08; }
.chart-bar { width: 100%; height: var(--bar-height); min-height: 3px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #c3a3ff, #7045b3); box-shadow: 0 0 16px #a477ff36; transition: height .2s ease; }
.overview-panel { margin-bottom: 0; }
.overview-panel .section-heading { margin-bottom: 13px; }
.recent-list { display: grid; }
.recent-item { display: flex; min-height: 58px; align-items: center; gap: 11px; padding: 9px 1px; border-top: 1px solid #ffffff0d; }
.recent-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid #69518f66; border-radius: 10px; background: #8e60d91a; color: #c2a4ff; font-size: 17px; }
.recent-icon.is-online { border-color: #3e8d6966; background: #35b67a16; color: #7de2aa; }
.recent-copy { display: grid; min-width: 0; flex: 1; gap: 4px; }
.recent-copy strong { overflow: hidden; color: #eee9fa; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.recent-copy small { color: #89839a; font-size: 10px; }
.create-panel { display: grid; grid-template-columns: 1fr; gap: 14px; }
.create-panel > div:first-child p { margin: 0; }
.create-form { display: grid; grid-template-columns: minmax(170px, 1fr) 155px auto; gap: 9px; }
.new-key { display: grid; grid-template-columns: minmax(170px, .9fr) minmax(180px, 1.2fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid #8c6a33; border-radius: 11px; background: linear-gradient(100deg, #352812, #261e13); color: #ffe6ae; }
.new-key > div { display: grid; gap: 4px; }
.new-key strong { color: #ffedc8; font-size: 11px; }
.new-key small { color: #c8b68e; font-size: 9px; line-height: 1.4; }
.new-key code { overflow-wrap: anywhere; color: #fff8e9; font-size: 13px; }
.filter-heading { align-items: end; }
.filters { display: flex; align-items: center; gap: 8px; }
.filters select { min-width: 130px; }
.search-field { display: flex; min-width: 230px; min-height: 39px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #373149; border-radius: 9px; background: #11101a; color: #a99bc9; }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #a477ff20; }
.search-field > span { font-size: 20px; line-height: 1; }
.search-field input { width: 100%; min-height: 35px; padding: 0; border: 0; outline: 0; background: transparent; font-size: 10px; }
.search-field input:focus { box-shadow: none; }
.table-wrap { overflow-x: auto; border: 1px solid #ffffff0c; border-radius: 10px; }
table { width: 100%; min-width: 1060px; border-collapse: collapse; text-align: left; font-size: 10px; }
th { padding: 12px 10px; background: #ffffff04; color: #a99cbd; font-size: 9px; letter-spacing: .7px; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 10px; border-top: 1px solid #ffffff0c; color: #e7e0f2; vertical-align: middle; }
td code { color: #d6c4ff; font-size: 10px; }
.license-identity { min-width: 140px; }
.license-identity small { display: block; margin-top: 4px; color: #918ba1; font-size: 9px; }
.device-cell { max-width: 155px; overflow-wrap: anywhere; color: #a7a0b6; font-size: 9px; }
.badge { display: inline-block; padding: 5px 8px; border: 1px solid #4f825f; border-radius: 999px; color: #a3e5b7; font-size: 9px; white-space: nowrap; }
.badge-online { border-color: #38845b; color: #98e6b2; }
.badge-offline, .badge-unactivated { border-color: #524965; color: #c1b7d3; }
.badge-expired, .badge-banned, .badge-disabled { border-color: #8a3d57; color: #ff9fbb; }
.row-actions { min-width: 105px; }
.action-menu { position: relative; width: max-content; }
.action-menu > summary { display: flex; min-height: 30px; align-items: center; padding: 0 10px; font-size: 9px; list-style: none; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu-list { display: grid; min-width: 168px; gap: 5px; margin-top: 6px; padding: 7px; border: 1px solid var(--border); border-radius: 10px; background: #171422; box-shadow: 0 12px 30px #0008; }
.action-menu-list .button { min-height: 32px; padding: 0 10px; text-align: left; }
.privacy-card { display: flex; gap: 15px; }
.privacy-card p:last-child { margin-bottom: 0; }
.privacy-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid #45856566; border-radius: 11px; background: #42c48516; color: #88e8b1; font-size: 17px; }
.dashboard-footer { display: flex; justify-content: space-between; align-items: center; margin: 12px 2px 0; color: #777187; font-size: 9px; letter-spacing: .6px; }
.text-button { padding: 8px 0; border: 0; background: none; color: #bda0ff; cursor: pointer; font-size: 10px; }
.text-button:hover { color: #e3d4ff; }
.message { margin: 12px 0 0 !important; }
.message.error { color: #ff9cad; }
.empty-row { padding: 24px !important; color: var(--muted); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 1000px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .new-key { grid-template-columns: 1fr auto; }
  .new-key > div { grid-column: 1 / -1; }
  .filter-heading { align-items: flex-start; flex-direction: column; }
  .filters { width: 100%; flex-wrap: wrap; }
  .search-field { flex: 1; }
}
@media (max-width: 760px) {
  .page { width: min(100% - 24px, 620px); padding-top: 16px; }
  .page-header { align-items: flex-start; margin-bottom: 18px; }
  .header-tools { display: none; }
  .brand img { width: 42px; height: 42px; }
  .brand strong { font-size: 16px; }
  .connection-status { padding: 7px 9px; font-size: 9px; }
  .dashboard-layout { grid-template-columns: 1fr; gap: 12px; }
  .sidebar { position: static; min-height: 0; padding: 8px; }
  .nav-caption, .sidebar-footer { display: none; }
  .nav-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .nav-item { min-height: 40px; justify-content: center; gap: 5px; padding: 0 5px; font-size: 10px; }
  .nav-item > span { width: 21px; height: 21px; font-size: 13px; }
  .panel { padding: 15px; }
  .create-form { grid-template-columns: minmax(0, 1fr); }
  .filters { align-items: stretch; flex-direction: column; }
  .filters select { min-height: 39px; }
}
@media (max-width: 480px) {
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 127px; padding: 13px; }
  .stat-card strong { font-size: 27px; }
  .new-key { grid-template-columns: 1fr; }
  .new-key > div { grid-column: auto; }
  .section-heading { align-items: flex-start; }
  .page-header { gap: 8px; }
  .connection-status { max-width: 116px; white-space: normal; text-align: center; }
}
