/* Shared admin dashboard stylesheet. Plain CSS, no build step, no CDN. */

:root {
  --bg: #070a0f;
  --bg-2: #0b111a;
  --panel: #101823;
  --panel-2: #0d141f;
  --panel-3: #131f2d;
  --line: #223144;
  --line-soft: rgba(126, 219, 255, .14);
  --text: #edf7ff;
  --muted: #8fa0b8;
  --faint: #5f6f86;
  --cyan: #4dd9ff;
  --blue: #3c82ff;
  --green: #47e38c;
  --amber: #f4bd50;
  --red: #ff6b7b;
  --radius: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

:root[data-theme="light"] {
  --bg: #eef5fb;
  --bg-2: #dcebf5;
  --panel: #ffffff;
  --panel-2: #f3f8fc;
  --panel-3: #e5f0f8;
  --line: #9fb7c9;
  --line-soft: rgba(15, 83, 112, .26);
  --text: #071827;
  --muted: #314b63;
  --faint: #536b80;
  --cyan: #005f83;
  --blue: #174fc7;
  --green: #08723d;
  --amber: #815000;
  --red: #ad1f32;
  --shadow: 0 18px 50px rgba(21, 52, 78, .18);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

html,
body,
.table-wrap,
.main {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  min-height: 100vh;
  margin: 0;
  zoom: .8;
  background:
    radial-gradient(circle at 16% -12%, rgba(77, 217, 255, .14), transparent 32rem),
    radial-gradient(circle at 84% 8%, rgba(60, 130, 255, .15), transparent 30rem),
    linear-gradient(135deg, var(--bg), var(--bg-2) 54%, #06080d);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.01em;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .85), transparent 82%);
}

:root[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(8, 126, 164, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 126, 164, .045) 1px, transparent 1px);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #8be8ff; text-decoration: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(77, 217, 255, .78);
  outline-offset: 2px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: 125vh;
  min-height: 125vh;
  padding: 16px 12px;
  background:
    linear-gradient(180deg, rgba(18, 30, 44, .98), rgba(8, 12, 18, .98)),
    var(--panel);
  border-right: 1px solid var(--line-soft);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .03);
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  margin-bottom: 18px;
  padding: 10px;
  color: #fff;
  background: linear-gradient(145deg, rgba(77, 217, 255, .13), rgba(60, 130, 255, .05));
  border: 1px solid rgba(77, 217, 255, .18);
  border-radius: 14px;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: #051018;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -.06em;
  background: linear-gradient(135deg, var(--cyan), #8ff5ff 44%, var(--blue));
  border-radius: 11px;
  box-shadow: 0 0 24px rgba(77, 217, 255, .36);
}

.brand-title {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar nav { display: grid; gap: 6px; }

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 12px;
}

.sidebar nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .045);
  border-color: rgba(255, 255, 255, .06);
}

.sidebar nav a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(77, 217, 255, .16), rgba(60, 130, 255, .11));
  border-color: rgba(77, 217, 255, .26);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.sidebar-footer a,
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 8px 10px;
  color: #ffc0c8;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  background: rgba(255, 107, 123, .08);
  border: 1px solid rgba(255, 107, 123, .18);
  border-radius: 12px;
}

.theme-toggle {
  width: 100%;
  color: #cdefff;
  font-family: inherit;
  cursor: pointer;
  background: rgba(77, 217, 255, .08);
  border-color: rgba(77, 217, 255, .18);
}

.sidebar-footer a:hover {
  color: #fff;
  background: rgba(255, 107, 123, .14);
  border-color: rgba(255, 107, 123, .3);
}

.theme-toggle:hover {
  color: #fff;
  background: rgba(77, 217, 255, .14);
  border-color: rgba(77, 217, 255, .3);
}

:root[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(226, 240, 249, 1));
  border-right-color: rgba(15, 83, 112, .24);
}

:root[data-theme="light"] .brand-title,
:root[data-theme="light"] .hdr h1,
:root[data-theme="light"] .section-head h2,
:root[data-theme="light"] .card .val,
:root[data-theme="light"] .toolbar-copy strong,
:root[data-theme="light"] .maintenance-panel strong,
:root[data-theme="light"] .detail-grid .item .val,
:root[data-theme="light"] .login-card h2,
:root[data-theme="light"] .login-hero h1 {
  color: var(--text);
}

:root[data-theme="light"] .card,
:root[data-theme="light"] .card-form,
:root[data-theme="light"] .detail-grid .item,
:root[data-theme="light"] .empty,
:root[data-theme="light"] .toolbar,
:root[data-theme="light"] .maintenance-panel,
:root[data-theme="light"] .table-wrap,
:root[data-theme="light"] .login-card {
  background: linear-gradient(180deg, #ffffff, #eef6fb);
  border-color: rgba(15, 83, 112, .24);
}

:root[data-theme="light"] .card::before {
  background: linear-gradient(90deg, rgba(0, 95, 131, .9), rgba(23, 79, 199, .15));
}

:root[data-theme="light"] .card .lbl,
:root[data-theme="light"] .detail-grid .item .lbl,
:root[data-theme="light"] label,
:root[data-theme="light"] .toolbar-copy span,
:root[data-theme="light"] .maintenance-panel span,
:root[data-theme="light"] .stat-note,
:root[data-theme="light"] .field-hint,
:root[data-theme="light"] .brand-subtitle,
:root[data-theme="light"] .page-subtitle {
  color: var(--muted);
}

:root[data-theme="light"] .btn {
  color: #ffffff;
  background: linear-gradient(135deg, #00688f, #174fc7);
  border-color: rgba(0, 95, 131, .7);
  box-shadow: 0 12px 30px rgba(23, 79, 199, .18);
}

:root[data-theme="light"] .btn:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #005170, #123f9d);
}

:root[data-theme="light"] .btn.secondary,
:root[data-theme="light"] .action-row a,
:root[data-theme="light"] .action-row button,
:root[data-theme="light"] .key-copy-btn {
  color: #064b68;
  background: rgba(0, 95, 131, .1);
  border-color: rgba(0, 95, 131, .28);
}

:root[data-theme="light"] .btn.secondary:hover,
:root[data-theme="light"] .action-row a:hover,
:root[data-theme="light"] .action-row button:hover,
:root[data-theme="light"] .key-copy-btn:hover {
  color: #ffffff;
  background: #00688f;
  border-color: #00688f;
}

:root[data-theme="light"] .action-row .danger,
:root[data-theme="light"] .sidebar-footer a {
  color: #9f1729;
  background: rgba(173, 31, 50, .1);
  border-color: rgba(173, 31, 50, .26);
}

:root[data-theme="light"] .action-row .danger:hover,
:root[data-theme="light"] .sidebar-footer a:hover {
  color: #ffffff;
  background: #ad1f32;
  border-color: #ad1f32;
}

:root[data-theme="light"] input[type="text"],
:root[data-theme="light"] input[type="password"],
:root[data-theme="light"] input[type="number"],
:root[data-theme="light"] select {
  color: var(--text);
  background: #ffffff;
  border-color: rgba(49, 75, 99, .38);
}

:root[data-theme="light"] th {
  color: #102033;
  background: #dcebf5;
  border-bottom-color: rgba(15, 83, 112, .22);
}

:root[data-theme="light"] td {
  border-bottom-color: rgba(15, 83, 112, .14);
}

:root[data-theme="light"] tbody tr:hover { background: rgba(8, 126, 164, .045); }

:root[data-theme="light"] .license-key { color: #0f5f7e; }

:root[data-theme="light"] .theme-toggle {
  color: #064b68;
  background: rgba(0, 95, 131, .1);
  border-color: rgba(0, 95, 131, .28);
}

:root[data-theme="light"] .theme-toggle:hover {
  color: #ffffff;
  background: #00688f;
  border-color: #00688f;
}

:root[data-theme="light"] .sidebar nav a {
  color: #314b63;
}

:root[data-theme="light"] .sidebar nav a:hover {
  color: #071827;
  background: rgba(0, 95, 131, .08);
  border-color: rgba(0, 95, 131, .14);
}

:root[data-theme="light"] .sidebar nav a.active {
  color: #071827;
  background: rgba(0, 95, 131, .14);
  border-color: rgba(0, 95, 131, .26);
}

:root[data-theme="light"] .license-key,
:root[data-theme="light"] .timeline-cell,
:root[data-theme="light"] .timeline-cell span {
  color: #064b68;
}

.contact-section-title {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.admin-contact-card,
.sidebar-footer a.admin-contact-card {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 9px;
  overflow: hidden;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(24, 119, 242, .18), rgba(255, 255, 255, .045) 50%, rgba(0, 168, 255, .08)),
    rgba(255, 255, 255, .045);
  border: 1px solid rgba(24, 119, 242, .26);
  border-radius: 14px;
  gap: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.admin-contact-card::before,
.sidebar-footer a.admin-contact-card::before {
  position: absolute;
  top: -42px;
  right: -28px;
  width: 92px;
  height: 92px;
  pointer-events: none;
  content: "";
  background: rgba(24, 119, 242, .3);
  border-radius: 999px;
  filter: blur(22px);
}

.admin-contact-card:hover,
.sidebar-footer a.admin-contact-card:hover {
  color: #fff;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(24, 119, 242, .24), rgba(255, 255, 255, .06) 50%, rgba(0, 168, 255, .1)),
    rgba(255, 255, 255, .055);
  border-color: rgba(125, 211, 252, .36);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .24);
  transform: translateY(-1px);
}

.admin-contact-icon {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  color: #fff;
  place-items: center;
  background: #1877f2;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 11px;
  box-shadow: 0 12px 24px rgba(24, 119, 242, .28);
}

.admin-contact-body {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.admin-contact-title {
  color: #f8fbff;
  font-size: 12px;
  font-weight: 900;
}

.admin-contact-desc {
  color: #aac7f8;
  font-size: 10.5px;
  font-weight: 700;
}

.admin-contact-arrow {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  color: rgba(226, 232, 240, .78);
}

.login-contact {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(126, 219, 255, .12);
}

.sidebar-footer .admin-contact-card {
  width: 100%;
}

.sidebar-contact-title {
  margin: 2px 0 -2px;
}

:root[data-theme="light"] .admin-contact-card,
:root[data-theme="light"] .sidebar-footer a.admin-contact-card {
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(24, 119, 242, .12), rgba(255, 255, 255, .72) 50%, rgba(0, 168, 255, .08)),
    #ffffff;
  border-color: rgba(24, 119, 242, .28);
}

:root[data-theme="light"] .admin-contact-card:hover,
:root[data-theme="light"] .sidebar-footer a.admin-contact-card:hover {
  color: #071827;
  border-color: rgba(0, 95, 131, .38);
  box-shadow: 0 14px 28px rgba(21, 52, 78, .14);
}

:root[data-theme="light"] .admin-contact-title {
  color: #071827;
}

:root[data-theme="light"] .admin-contact-desc,
:root[data-theme="light"] .admin-contact-arrow {
  color: #174fc7;
}

.nav-icon,
.btn-icon,
.action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.nav-icon svg,
.btn-icon svg,
.action-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-icon svg,
.action-icon svg {
  width: 13px;
  height: 13px;
}

.main {
  width: 100%;
  max-width: 1240px;
  padding: 22px clamp(14px, 3vw, 30px) 34px;
}

.hdr {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hdr h1,
.section-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.section-head h2 { font-size: 18px; letter-spacing: -.025em; }

.page-eyebrow {
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.page-subtitle {
  max-width: 680px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 15px;
  color: #03101a;
  font-family: inherit;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), #7be7ff 48%, #65a3ff);
  border: 1px solid rgba(160, 239, 255, .62);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(77, 217, 255, .18);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.btn:hover {
  color: #021018;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(77, 217, 255, .25);
}

.btn.secondary {
  color: var(--text);
  background: rgba(17, 28, 42, .92);
  border-color: rgba(126, 219, 255, .18);
  box-shadow: none;
}

.btn.secondary:hover {
  color: #fff;
  background: rgba(24, 39, 58, .98);
  border-color: rgba(126, 219, 255, .34);
}

.btn.small {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.btn-block { width: 100%; }

.btn[disabled],
button[disabled] {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.card,
.card-form,
.detail-grid .item,
.empty,
.toolbar,
.table-wrap {
  background: linear-gradient(180deg, rgba(19, 31, 45, .96), rgba(12, 18, 27, .96));
  border: 1px solid rgba(126, 219, 255, .13);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), var(--shadow);
}

.card {
  position: relative;
  min-height: 92px;
  overflow: hidden;
  padding: 13px;
  border-radius: var(--radius);
}

.card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, rgba(77, 217, 255, .88), rgba(60, 130, 255, 0));
}

.card .lbl,
.detail-grid .item .lbl {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.card .val {
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.055em;
}

.card .val.compact-val {
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.stat-note {
  margin-top: 8px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.35;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 9px;
  border-radius: var(--radius);
  flex-wrap: wrap;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .22);
}

.toolbar-copy {
  min-width: 150px;
  margin-right: auto;
}

.toolbar-copy strong {
  display: block;
  color: #fff;
  font-size: 13px;
}

.toolbar-copy span {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 11.5px;
}

.search-input { max-width: 260px; }

.compact-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(190px, 1.2fr) repeat(3, minmax(120px, .8fr)) auto auto;
  align-items: center;
  gap: 8px;
}

.compact-toolbar .toolbar-copy {
  min-width: 0;
  margin-right: 0;
}

.compact-toolbar input,
.compact-toolbar select,
.compact-toolbar .btn {
  width: 100%;
  max-width: none;
}

.compact-toolbar .btn {
  white-space: nowrap;
}

.reseller-toolbar {
  grid-template-columns: minmax(150px, .9fr) minmax(220px, 1.3fr) minmax(130px, .8fr) minmax(150px, .9fr) auto auto;
}

.maintenance-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(19, 31, 45, .96), rgba(12, 18, 27, .96));
  border: 1px solid rgba(126, 219, 255, .16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.maintenance-panel.active {
  border-color: rgba(244, 189, 80, .42);
  box-shadow: 0 18px 55px rgba(244, 189, 80, .08), var(--shadow);
}

.maintenance-panel strong {
  display: block;
  margin-bottom: 5px;
  color: #fff;
  font-size: 16px;
}

.maintenance-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.maintenance-panel .btn {
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  color: var(--text);
  font-size: 11px;
}

th,
td {
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid rgba(126, 219, 255, .1);
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #aebbd0;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
  background: rgba(15, 25, 37, .98);
  box-shadow: inset 0 -1px 0 rgba(126, 219, 255, .12);
}

tr:last-child td { border-bottom: none; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: rgba(77, 217, 255, .035); }
td.wrap { max-width: 280px; white-space: normal; }

.license-key {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  color: #d9f6ff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .01em;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.license-key-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.license-key-cell .license-key {
  min-width: 0;
  flex: 0 1 auto;
}

.key-copy-btn {
  flex: 0 0 auto;
  min-height: 23px;
  padding: 4px 8px;
  color: #b8edff;
  font-family: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  background: rgba(77, 217, 255, .07);
  border: 1px solid rgba(77, 217, 255, .18);
  border-radius: 9px;
}

.key-copy-btn:hover {
  color: #fff;
  background: rgba(77, 217, 255, .13);
  border-color: rgba(77, 217, 255, .34);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 900;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.pill.active { color: var(--green); background: rgba(71, 227, 140, .1); }
.pill.suspended { color: var(--amber); background: rgba(244, 189, 80, .1); }
.pill.expired { color: var(--red); background: rgba(255, 107, 123, .1); }
.pill.unused { color: #9dafc8; background: rgba(157, 175, 200, .1); }
.pill.deleted { color: var(--red); background: rgba(255, 107, 123, .1); }

.act { white-space: normal; }

.action-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.action-inline { display: inline-flex; margin: 0; }

.action-row a,
.action-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 7px;
  color: #b8edff;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  background: rgba(77, 217, 255, .07);
  border: 1px solid rgba(77, 217, 255, .18);
  border-radius: 9px;
}

.act { min-width: 360px; }

.licenses-table-wrap {
  width: 100%;
  overflow-x: hidden;
}

.licenses-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.licenses-table th:nth-child(1),
.licenses-table td:nth-child(1) { width: 24%; }

.licenses-table th:nth-child(2),
.licenses-table td:nth-child(2) { width: 9%; }

.licenses-table th:nth-child(3),
.licenses-table td:nth-child(3) { width: 25%; }

.licenses-table th:nth-child(4),
.licenses-table td:nth-child(4) { width: 8%; }

.licenses-table th:nth-child(5),
.licenses-table td:nth-child(5) { width: 13%; }

.licenses-table th:last-child,
.licenses-table td:last-child { width: 21%; }

.licenses-table.has-owner th:nth-child(1),
.licenses-table.has-owner td:nth-child(1) { width: 22%; }

.licenses-table.has-owner th:nth-child(2),
.licenses-table.has-owner td:nth-child(2) { width: 8%; }

.licenses-table.has-owner th:nth-child(3),
.licenses-table.has-owner td:nth-child(3) { width: 23%; }

.licenses-table.has-owner th:nth-child(4),
.licenses-table.has-owner td:nth-child(4) { width: 7%; }

.licenses-table.has-owner th:nth-child(5),
.licenses-table.has-owner td:nth-child(5) { width: 8%; }

.licenses-table.has-owner th:nth-child(6),
.licenses-table.has-owner td:nth-child(6) { width: 11%; }

.licenses-table.has-owner th:nth-child(7),
.licenses-table.has-owner td:nth-child(7) { width: 21%; }

.licenses-table th,
.licenses-table td {
  padding: 8px 7px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.licenses-table .license-key {
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.licenses-table td.wrap {
  max-width: none;
}

.licenses-table .act {
  min-width: 0;
}

.licenses-table .action-row {
  flex-wrap: nowrap;
  gap: 3px;
  white-space: nowrap;
}

.licenses-table .action-row a,
.licenses-table .action-row button {
  min-height: 22px;
  padding: 3px 5px;
  font-size: 9.5px;
}

.licenses-table .action-icon { display: none; }

.timeline-cell {
  color: var(--text);
  font-size: 10.5px;
  line-height: 1.45;
}

.timeline-cell div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 5px;
}

.timeline-cell span {
  color: var(--faint);
  font-weight: 800;
}

.action-row a:hover,
.action-row button:hover {
  color: #fff;
  background: rgba(77, 217, 255, .13);
  border-color: rgba(77, 217, 255, .34);
}

.action-row .danger {
  color: #ffc0c8;
  background: rgba(255, 107, 123, .08);
  border-color: rgba(255, 107, 123, .2);
}

.action-row .danger:hover {
  color: #fff;
  background: rgba(255, 107, 123, .16);
  border-color: rgba(255, 107, 123, .34);
}

.card-form {
  width: 100%;
  max-width: 540px;
  padding: 24px;
  border-radius: var(--radius);
}

.form-wide { max-width: 620px; }

label {
  display: block;
  margin: 16px 0 7px;
  color: #b7c4d8;
  font-size: 12px;
  font-weight: 800;
}

label:first-child { margin-top: 0; }

input[type="text"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  background: rgba(4, 9, 15, .72);
  border: 1px solid rgba(143, 160, 184, .26);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

input[type="text"]::placeholder { color: #617086; }

input:focus,
select:focus {
  border-color: rgba(77, 217, 255, .72);
  box-shadow: 0 0 0 4px rgba(77, 217, 255, .1);
  outline: none;
}

.mini-input {
  max-width: 84px;
  min-height: 34px;
  padding: 7px 9px;
}

.field-hint {
  margin-top: 5px;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.45;
}

.conditional-field { display: none; }
.form-actions { margin-top: 22px; }
.form-submit { margin-top: 20px; }

.inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-field input {
  flex: 1 1 auto;
}

.inline-field .btn {
  flex: 0 0 auto;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 0;
  padding: 8px 10px;
  color: var(--text);
  font-size: 12px;
  background: rgba(4, 9, 15, .52);
  border: 1px solid rgba(143, 160, 184, .18);
  border-radius: 11px;
}

.check-row input { width: auto; }

.compact-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.msg {
  margin-bottom: 16px;
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
  border: 1px solid transparent;
  border-radius: 13px;
}

.msg.err {
  color: #ffd1d7;
  background: rgba(255, 107, 123, .1);
  border-color: rgba(255, 107, 123, .24);
}

.msg.ok {
  color: #c7ffdf;
  background: rgba(71, 227, 140, .1);
  border-color: rgba(71, 227, 140, .22);
}

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 12px;
  color: #d9f7ff;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(77, 217, 255, .11), rgba(60, 130, 255, .08));
  border: 1px solid rgba(77, 217, 255, .2);
  border-radius: 14px;
  flex-wrap: wrap;
}

.impersonation-banner strong { color: #fff; }

.empty {
  padding: 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  border-radius: var(--radius);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: #bfefff;
  font-size: 12.5px;
  font-weight: 800;
}

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

.detail-grid .item {
  min-height: 104px;
  padding: 16px;
  border-radius: var(--radius);
}

.detail-grid .item .val {
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.key-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.login-shell {
  display: grid;
  width: min(900px, 100%);
  grid-template-columns: minmax(0, 1fr) 390px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(17, 28, 42, .92), rgba(9, 14, 22, .94));
  border: 1px solid rgba(126, 219, 255, .15);
  border-radius: 28px;
  box-shadow: 0 36px 110px rgba(0, 0, 0, .46);
}

.login-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  padding: 34px;
  background:
    radial-gradient(circle at 24% 18%, rgba(77, 217, 255, .22), transparent 15rem),
    linear-gradient(150deg, rgba(60, 130, 255, .13), rgba(7, 10, 15, .32));
}

.login-hero::after {
  position: absolute;
  right: -54px;
  bottom: -72px;
  width: 260px;
  height: 260px;
  content: "";
  background: conic-gradient(from 200deg, rgba(77, 217, 255, .72), rgba(60, 130, 255, .1), rgba(77, 217, 255, .72));
  border-radius: 50%;
  filter: blur(2px);
  opacity: .3;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 54px;
  padding: 8px 10px;
  color: #d9f7ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(77, 217, 255, .08);
  border: 1px solid rgba(77, 217, 255, .18);
  border-radius: 999px;
}

.login-hero h1 {
  max-width: 500px;
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 45px);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.login-hero p {
  max-width: 390px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.login-metrics {
  display: grid;
  max-width: 380px;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 30px;
}

.login-metrics span {
  display: block;
  padding: 10px 12px;
  color: #dff8ff;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
}

.login-card {
  align-self: center;
  justify-self: center;
  width: min(330px, calc(100% - 32px));
  max-width: 330px;
  margin: 0;
  padding: 28px;
  background: rgba(10, 16, 24, .9);
  border: 1px solid rgba(126, 219, 255, .14);
  border-radius: 20px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.login-card h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.login-card p {
  margin: 7px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-card form {
  display: grid;
  gap: 12px;
}

.login-card label {
  margin: 0 0 -4px;
  color: #c6d4e8;
  font-size: 11.5px;
}

.login-card input[type="text"],
.login-card input[type="password"] {
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 13px;
}

.login-card .form-submit {
  width: 100%;
  margin-top: 8px;
}

.login-error { margin-top: 16px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .shell { display: block; }

  .sidebar {
    position: relative;
    height: auto;
    min-height: 0;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .sidebar .brand { margin-bottom: 12px; }
  .sidebar nav { display: flex; overflow-x: auto; padding-bottom: 2px; }
  .sidebar nav a { flex: 0 0 auto; }
  .sidebar-footer { margin-top: 10px; padding-top: 0; }
  .sidebar-footer a { width: fit-content; }

  .main { padding: 24px 16px 34px; }
  .toolbar { align-items: stretch; }
  .toolbar:not(.compact-toolbar) .toolbar-copy { width: 100%; margin-right: 0; }
  .toolbar:not(.compact-toolbar) .btn,
  .toolbar:not(.compact-toolbar) input,
  .toolbar:not(.compact-toolbar) select { width: 100%; max-width: none; }
  .compact-toolbar { grid-template-columns: 1fr; }
  .maintenance-panel { grid-template-columns: 1fr; }
  .maintenance-form { align-items: stretch; flex-direction: column; }

  .login-shell { grid-template-columns: 1fr; }
  .login-hero { min-height: auto; padding: 30px; }
  .login-badge { margin-bottom: 34px; }
  .login-card { width: auto; max-width: none; margin: 18px; }
}

@media (max-width: 560px) {
  .login-page { padding: 0; place-items: stretch; }
  .login-shell { min-height: 100vh; border: 0; border-radius: 0; }
  .login-card { margin: 0; border-right: 0; border-left: 0; border-radius: 0; }
  .login-metrics { grid-template-columns: 1fr; }
  .hdr { align-items: stretch; }
  .hdr .btn { width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .card-form { max-width: none; padding: 20px; }
  .detail-grid { grid-template-columns: 1fr; }
}
