.admin-theme {
  color-scheme: light;
  --admin-canvas: #c7d2c4;
  --admin-surface: #d4ddd0;
  --admin-subtle: #cbd6c8;
  --admin-control: #bfcebd;
  --admin-control-hover: #b3c5b1;
  --admin-border: #a5b5a2;
  --admin-text: #25372a;
  --admin-muted: #3f5142;
  --admin-accent: #185536;
  background-color: var(--admin-canvas);
  color: var(--admin-text);
}

.admin-theme .bg-slate-900 {
  background-color: var(--admin-surface);
}

.admin-theme .bg-slate-800,
.admin-theme .bg-slate-600,
.admin-theme thead {
  background-color: var(--admin-subtle);
}

.admin-theme .bg-slate-700 {
  background-color: var(--admin-control);
}

.admin-theme .hover\:bg-slate-800\/50:hover,
.admin-theme .hover\:bg-slate-700:hover,
.admin-theme .hover\:bg-slate-600:hover {
  background-color: var(--admin-control-hover);
}

.admin-theme .border-slate-800 {
  border-color: var(--admin-border);
}

.admin-theme .text-slate-400,
.admin-theme .text-slate-500,
.admin-theme .text-slate-600 {
  color: var(--admin-muted);
}

.admin-theme .text-emerald-400,
.admin-theme .hover\:text-emerald-400:hover {
  color: var(--admin-accent);
}

.admin-theme .bg-emerald-500\/15,
.admin-theme nav [aria-current="page"] {
  background-color: #b9cbb8;
  color: #245537;
}

.admin-nav {
  gap: 0.3rem;
  padding: 0.45rem;
  border: 1px solid var(--admin-border);
  border-radius: 0.75rem;
  background: var(--admin-surface);
}

.admin-nav-brand {
  padding: 0.4rem 0.55rem;
  margin-right: 0.1rem;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.45rem;
  white-space: nowrap;
}

.admin-nav a:hover {
  background: var(--admin-subtle);
  color: var(--admin-accent);
}

.admin-nav [aria-current="page"] {
  font-weight: 600;
}

.admin-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
}

.admin-icon::before,
.admin-icon::after {
  content: "";
  position: absolute;
}

.admin-icon-dashboard::before {
  top: 1px;
  left: 1px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 7px 0, 0 7px, 7px 7px;
}

.admin-icon-user::before {
  inset: 0 4px auto;
  height: 6px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.admin-icon-user::after {
  inset: auto 1px 0;
  height: 6px;
  border: 1.5px solid currentColor;
  border-radius: 5px 5px 2px 2px;
}

.admin-icon-server::before,
.admin-icon-server::after {
  inset: 1px 0 auto;
  height: 5px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.admin-icon-server::after {
  top: 8px;
}

.admin-icon-check::before {
  inset: 0;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.admin-icon-check::after {
  inset: 4px 3px auto auto;
  width: 6px;
  height: 4px;
  border: solid currentColor;
  border-width: 0 0 1.5px 1.5px;
  transform: rotate(-45deg);
}

.admin-icon-network::before {
  inset: 0;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.admin-icon-network::after {
  inset: 0 4px;
  border: solid currentColor;
  border-width: 0 1.5px;
  border-radius: 50%;
}

.admin-icon-external::before,
.admin-icon-exit::before {
  inset: 3px 4px 0 0;
  border: 1.5px solid currentColor;
  border-right: 0;
  border-radius: 2px;
}

.admin-icon-external::after,
.admin-icon-exit::after {
  inset: 0 0 auto auto;
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
}

.admin-icon-exit::after {
  top: 4px;
  right: 2px;
  transform: rotate(45deg);
}

.admin-theme .bg-emerald-600 {
  background-color: #276344;
  color: var(--admin-surface);
}

.admin-theme .hover\:bg-emerald-500:hover {
  background-color: #1c5036;
}

.admin-theme .bg-red-500\/15 {
  background-color: #dfd0c8;
}

.admin-theme .text-red-400,
.admin-theme .hover\:text-red-400:hover {
  color: #95372c;
}

.admin-theme .bg-red-600\/80 {
  background-color: #88382d;
  color: var(--admin-surface);
}

.admin-theme .hover\:bg-red-500:hover {
  background-color: #7d332a;
}

.admin-theme .bg-amber-950\/25 {
  background-color: #ded4b8;
}

.admin-theme .border-amber-900 {
  border-color: #cbb47f;
}

.admin-theme .text-amber-300,
.admin-theme .text-amber-400 {
  color: #765318;
}

.admin-theme .bg-amber-600,
.admin-theme .hover\:bg-amber-500:hover {
  background-color: #755018;
  color: var(--admin-surface);
}

.admin-theme :is(input:not([type="hidden"]), select, textarea) {
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
}

.admin-theme :is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
}

.cabinet {
  display: grid;
  gap: 1rem;
}

.cabinet-card {
  min-width: 0;
  padding: clamp(0.9rem, 3vw, 1.35rem);
  border: 1px solid var(--admin-border);
  border-radius: 0.8rem;
  background: var(--admin-surface);
}

.cabinet-card h2 {
  font-size: 1.1rem;
  font-weight: 650;
}

.cabinet-card p {
  margin-top: 0.3rem;
  color: var(--admin-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.cabinet-status {
  padding: 0.35rem 0.7rem;
  border-radius: 2rem;
  background: var(--admin-control);
  color: var(--admin-text);
  font-size: 0.875rem;
  font-weight: 600;
}

.cabinet-status-active {
  background: #b9cbb8;
  color: var(--admin-accent);
}

.cabinet-status-blocked {
  background: #dfd0c8;
  color: #95372c;
}

.cabinet-guide {
  border-color: var(--admin-accent);
  background: var(--admin-control);
}

.cabinet-setup-choice {
  margin: 0.75rem 0;
  padding: 0.85rem;
  border: 1px solid var(--admin-border);
  border-radius: 0.6rem;
  background: var(--admin-surface);
}

.cabinet-setup-choice h3 {
  font-weight: 600;
}

.cabinet-setup-install {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--admin-accent);
  font-size: 0.875rem;
  text-decoration: underline;
}

.guide-app-example {
  background: var(--admin-subtle);
  scroll-margin-top: 1rem;
}

.guide-app-example:target {
  border-color: var(--admin-accent);
}

.cabinet-guide-links,
.cabinet-copy-row,
.cabinet-qr {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cabinet-guide-links,
.cabinet-copy,
.cabinet-profile-list,
.cabinet-table {
  margin-top: 0.8rem;
}

.cabinet-guide-links a,
.cabinet-copy {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.45rem;
  background: #276344;
  color: var(--admin-surface);
  font-size: 0.875rem;
  font-weight: 600;
}

.cabinet-guide-links a:hover,
.cabinet-copy:hover {
  background: #1c5036;
}

.cabinet-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.cabinet-stats div,
.cabinet-profile {
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid var(--admin-border);
  border-radius: 0.55rem;
  background: var(--admin-subtle);
}

.cabinet-stats dt {
  color: var(--admin-muted);
  font-size: 0.8rem;
}

.cabinet-stats dd,
.cabinet-profile h3 {
  font-weight: 650;
}

.cabinet-stats dd {
  overflow-wrap: anywhere;
}

.cabinet-traffic-detail {
  display: block;
  color: var(--admin-muted);
  font-size: 0.8rem;
  font-weight: normal;
}

.cabinet-profile-list {
  display: grid;
  gap: 0.65rem;
}

.cabinet-copy-row {
  margin-top: 0.45rem;
}

.cabinet-copy-row code {
  flex: 1 1 16rem;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}

.cabinet-copy-row .cabinet-copy {
  margin-top: 0;
}

.cabinet-qr {
  margin-top: 0.8rem;
}

.cabinet-qr > :first-child {
  flex: 1 1 16rem;
}

.cabinet-qr-image {
  max-width: 100%;
  padding: 0.35rem;
  border-radius: 0.4rem;
  background: var(--admin-surface);
}

.cabinet-qr-image svg {
  display: block;
  width: min(44vw, 8rem);
  height: auto;
}

.cabinet-table {
  border: 1px solid var(--admin-border);
  border-radius: 0.45rem;
}
