:root {
  --ink: #193333;
  --muted: #5b6e6d;
  --teal: #176d66;
  --teal-hover: #105b55;
  --teal-light: #e8f3ef;
  --canvas: #f5f7f6;
  --surface: #fff;
  --line: #dce4e0;
  --danger: #ae302b;
  --radius: 12px;
  --shadow: 0 16px 48px #102e2b26;
  font-family:
    Segoe UI,
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--teal);
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
:focus-visible {
  outline: 3px solid #268e83;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 12px;
  background: white;
}
.skip-link:focus {
  top: 12px;
}
.sidebar {
  width: 232px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #153838;
  color: #eff7f3;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  font-size: 24px;
  font-weight: 700;
  padding: 0 10px;
}
.brand-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 40px;
  background: #b9d9c6;
  color: #153838;
  border-radius: 9px;
  font-size: 29px;
  font-weight: 700;
  font-family: Georgia, serif;
}
.brand-caption {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #c0d4cd;
  letter-spacing: 0.02em;
  margin-top: 0;
}
.nav-label {
  font-size: 11px;
  color: #b3ccc5;
  margin: 48px 14px 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-item {
  color: #d3e2dc;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 7px;
  min-height: 46px;
}
.nav-item:hover {
  background: #224b48;
  color: #fff;
}
.nav-item.active {
  background: #2b514b;
  color: #fff;
}
.sidebar-bottom {
  margin-top: auto;
}
.workspace-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 14px 24px;
  font-size: 12px;
  color: #e0eee7;
}
.workspace-note .icon {
  color: #b9d9c6;
}
.muted-line {
  display: block;
  color: #b3ccc5;
  font-size: 11px;
  margin-top: 2px;
}
.app-main {
  margin-left: 232px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 78px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.breadcrumbs {
  display: flex;
  gap: 13px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumbs > :last-child {
  color: var(--ink);
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  min-width: 0;
}
.account > span:last-child {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal);
  font-weight: 600;
}
.page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 44px;
  flex: 1;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}
.eyebrow {
  font-size: 12px;
  color: var(--teal);
  font-weight: 600;
  margin: 0 0 8px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 650;
  margin-bottom: 12px;
  text-wrap: balance;
}
h2 {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 0;
}
h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.page-description {
  color: var(--muted);
  margin: 0;
  max-width: 70ch;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background 0.16s ease-out,
    border-color 0.16s ease-out;
}
.button:hover {
  background: #edf2ef;
  border-color: #b6c8c0;
}
.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.button.primary:hover {
  background: var(--teal-hover);
}
.button.subtle {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.button.subtle:hover {
  background: #e8eeeb;
  color: var(--ink);
}
.button.danger {
  color: var(--danger);
  border-color: #e7c5c0;
}
.button.danger:hover {
  background: #fbece9;
}
.button.danger.primary {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}
.button .icon {
  width: 17px;
  height: 17px;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
}
.icon-button:hover {
  background: #edf2ef;
}
.directory {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 14px;
}
.inline-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.count-badge {
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 23px;
  padding: 0 7px;
  border-radius: 5px;
  background: #edf2ef;
  color: #50635b;
  font-variant-numeric: tabular-nums;
}
.toolbar {
  padding: 0 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.search-field {
  position: relative;
  flex: 1;
  max-width: 420px;
}
.search-field .icon {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.search-field input {
  padding-left: 38px;
  width: 100%;
}
input,
select,
textarea {
  border: 1px solid #cbd7d0;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
  min-height: 42px;
  min-width: 0;
}
input::placeholder,
textarea::placeholder {
  color: #647670;
  opacity: 1;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
}
.sort-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.sort-field select {
  font-size: 12px;
  max-width: 190px;
}
.list-header,
.enterprise-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(100px, 1fr) 130px;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
}
.list-header {
  background: #f6f8f7;
  border-block: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.align-right {
  text-align: right;
}
.enterprise-row {
  min-height: 94px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background 0.16s ease-out;
}
.enterprise-row:hover {
  background: #f7faf8;
}
.enterprise-row:last-child {
  border-bottom: 0;
}
.enterprise-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.enterprise-monogram {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--teal-light);
  color: var(--teal);
  font-size: 14px;
  font-weight: 650;
  border-radius: 10px;
}
.enterprise-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.enterprise-type {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.enterprise-id {
  font-family: Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.row-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 12px;
  color: var(--teal);
  font-weight: 600;
}
.row-action .icon {
  width: 17px;
  height: 17px;
}
.list-caption {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
}
.list-caption:empty {
  display: none;
}
.state-panel {
  padding: 52px 24px;
  text-align: center;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.state-panel h3 {
  font-size: 16px;
  margin: 14px 0 8px;
}
.state-panel p {
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 16px;
}
.state-panel .icon {
  width: 32px;
  height: 32px;
  color: var(--teal);
}
.loading-line {
  display: block;
  width: 100px;
  height: 5px;
  background: #d8e6de;
  border-radius: 3px;
  overflow: hidden;
}
.loading-line:after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: var(--teal);
  animation: loading 1.2s ease-in-out infinite alternate;
}
.context-note {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 26px 0;
  max-width: 75ch;
}
.context-note > .icon {
  margin-top: 2px;
  color: var(--teal);
}
.context-note h3 {
  font-size: 12px;
  margin-bottom: 4px;
}
.context-note p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 44px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.setup-panel {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  border: 1px solid #b8cec3;
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 28px;
  overflow: hidden;
}
.setup-intro {
  padding: 28px;
  background: #eaf3ed;
}
.section-icon {
  color: var(--teal);
  display: block;
  margin-bottom: 14px;
}
.setup-intro h2 {
  font-size: 20px;
  margin-bottom: 12px;
}
.setup-intro p {
  font-size: 13px;
  color: #4d6658;
  max-width: 48ch;
}
.setup-step {
  font-size: 12px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.setup-step > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: #d6e7dc;
  border-radius: 50%;
  color: #315b45;
  font-size: 11px;
}
.setup-panel form {
  padding: 24px 28px;
}
.form-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.form-heading h3 {
  margin: 0;
}
label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 7px;
}
.setup-panel input,
.auth-form input {
  width: 100%;
}
.field-hint {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 0;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.form-error {
  color: var(--danger);
  font-size: 12px;
  margin: 14px 0 0;
}
.notice {
  border-radius: 7px;
  background: #e5f1e9;
  color: #24573c;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 13px;
}
.notice.error {
  background: #fbece9;
  color: #962d28;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 22px;
  background: #193d36;
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 20;
  font-size: 13px;
}
.toast.error {
  background: #8d2c28;
}
.device-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 18px;
}
.device-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
}
.device-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.device-card-head > .icon {
  background: var(--teal-light);
  box-sizing: content-box;
  padding: 12px;
  border-radius: 10px;
  color: var(--teal);
}
.device-card h2 {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.device-card-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
}
.device-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 14px;
  font-size: 12px;
}
.device-card dt {
  color: var(--muted);
}
.device-card dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.device-card .form-actions {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
  justify-content: space-between;
}
.device-card .button {
  font-size: 12px;
  min-height: 38px;
  padding: 8px 12px;
}
.device-toolbar {
  padding: 0 0 22px;
}
.device-status {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.device-summary {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}
.device-summary h2 {
  margin: 0;
}
.device-summary .button {
  margin-left: auto;
}
.detail-id {
  font-size: 12px;
  margin-top: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.detail-id span {
  font-family: Consolas, monospace;
}
dialog {
  border: 0;
  border-radius: var(--radius);
  padding: 28px;
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: auto;
}
dialog::backdrop {
  background: #0d292979;
}
dialog .form-heading {
  margin-bottom: 8px;
}
dialog h2 {
  font-size: 21px;
}
dialog .dialog-description {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
}
dialog textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  font:
    12px/1.6 Consolas,
    monospace;
  tab-size: 2;
}
dialog input {
  width: 100%;
}
.policy-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.policy-list li + li {
  border-top: 1px solid var(--line);
}
.policy-list button {
  width: 100%;
  padding: 15px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: 0;
  color: var(--ink);
  text-align: left;
  overflow-wrap: anywhere;
}
.policy-list button:hover {
  background: #f1f6f3;
}
.qr-code {
  text-align: center;
}
.qr-code img {
  width: 256px;
  max-width: 100%;
  image-rendering: pixelated;
}
.dialog-feedback {
  font-size: 12px;
  color: var(--danger);
  margin-top: 12px;
}
.dialog-feedback:empty {
  display: none;
}
.dialog-success {
  color: var(--teal);
  font-size: 12px;
  margin-top: 12px;
}
.dialog-success:empty {
  display: none;
}
.auth-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-brand {
  background: #153838;
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.auth-brand .brand {
  padding: 0;
}
.auth-intro {
  margin: auto 0;
  padding: 80px 0;
  max-width: 470px;
}
.auth-intro h2 {
  font-size: 42px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin-bottom: 24px;
  text-wrap: balance;
}
.auth-intro p {
  font-size: 16px;
  color: #c4d7cf;
  max-width: 40ch;
}
.auth-brand-footer {
  font-size: 12px;
  color: #b6cec3;
}
.auth-content {
  display: grid;
  place-items: center;
  padding: 48px 32px;
  background: #fff;
}
.auth-form {
  width: 100%;
  max-width: 360px;
}
.auth-form h1 {
  font-size: 28px;
}
.auth-form > p {
  color: var(--muted);
  margin-bottom: 30px;
}
.auth-form label {
  margin-top: 20px;
}
.auth-form .button {
  width: 100%;
  margin-top: 26px;
}
.auth-form .field-hint {
  margin-top: 20px;
}
.auth-form .notice {
  margin-top: 20px;
}
.auth-back {
  display: inline-block;
  margin-top: 24px;
  font-size: 13px;
}
@keyframes loading {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(150%);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (min-width: 1600px) {
  .page {
    padding-top: 56px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
  }
  .app-main {
    margin-left: 200px;
  }
  .page {
    padding: 32px 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .page-footer {
    padding-inline: 28px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .setup-panel {
    grid-template-columns: 1fr 1.2fr;
  }
  .list-header,
  .enterprise-row {
    grid-template-columns: minmax(0, 1.4fr) minmax(90px, 1fr) 100px;
    gap: 12px;
  }
  .row-action {
    font-size: 11px;
  }
  .row-action .icon {
    display: none;
  }
  .auth-brand {
    padding: 36px;
  }
  .auth-intro h2 {
    font-size: 36px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 16px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }
  .brand {
    padding: 0;
    font-size: 21px;
    gap: 9px;
  }
  .brand-symbol {
    width: 30px;
    height: 34px;
    font-size: 24px;
  }
  .brand-caption {
    font-size: 10px;
  }
  .nav-label,
  .workspace-note,
  .sidebar nav {
    display: none;
  }
  .sidebar-bottom {
    margin: 0;
  }
  .sidebar-bottom .nav-item {
    font-size: 12px;
    padding: 8px;
  }
  .sidebar-bottom .icon {
    width: 17px;
  }
  .app-main {
    margin: 0;
    min-height: calc(100dvh - 72px);
  }
  .topbar {
    height: 56px;
    padding: 0 20px;
  }
  .account > span:last-child {
    display: none;
  }
  .page {
    padding: 30px 20px;
  }
  .page-heading {
    margin-bottom: 26px;
    gap: 18px;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 28px;
  }
  .page-description {
    font-size: 13px;
  }
  .eyebrow {
    font-size: 11px;
  }
  .page-heading > .button {
    min-height: 44px;
  }
  .section-heading {
    padding: 16px 16px 12px;
  }
  .toolbar {
    padding: 0 16px 16px;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .search-field {
    max-width: none;
    flex: auto;
  }
  .sort-field {
    justify-content: space-between;
  }
  .sort-field label {
    margin: 0;
  }
  .sort-field select {
    min-height: 36px;
    padding: 7px 10px;
  }
  .list-header {
    display: none;
  }
  .enterprise-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 18px 16px;
  }
  .enterprise-identity {
    grid-column: 1;
    gap: 10px;
  }
  .enterprise-monogram {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
  .enterprise-name {
    font-size: 13px;
  }
  .enterprise-id {
    grid-column: 1;
    padding-left: 46px;
    font-size: 11px;
  }
  .row-action {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 0;
  }
  .row-action .icon {
    display: block;
    width: 20px;
    height: 20px;
  }
  .list-caption {
    padding-inline: 16px;
  }
  .setup-panel {
    grid-template-columns: 1fr;
  }
  .setup-intro {
    padding: 22px;
  }
  .setup-step {
    display: none;
  }
  .setup-intro p {
    margin: 0;
  }
  .setup-panel form {
    padding: 20px;
  }
  .setup-intro .section-icon {
    display: none;
  }
  .page-footer {
    padding: 18px 20px;
    font-size: 10px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .context-note {
    padding-top: 22px;
  }
  .device-tools {
    width: 100%;
    gap: 8px;
  }
  .device-tools .button {
    font-size: 12px;
    padding: 8px 12px;
    flex: 1;
  }
  .device-grid {
    grid-template-columns: 1fr;
  }
  .device-toolbar {
    padding: 0 0 18px;
  }
  .device-toolbar .sort-field {
    display: none;
  }
  dialog {
    padding: 22px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    padding: 24px;
  }
  .auth-intro {
    padding: 34px 0 0;
    margin: 0;
  }
  .auth-intro h2 {
    font-size: 28px;
    margin-bottom: 8px;
  }
  .auth-intro p {
    font-size: 13px;
    margin-bottom: 0;
  }
  .auth-brand-footer {
    display: none;
  }
  .auth-content {
    padding: 36px 24px 48px;
  }
  .auth-form {
    max-width: 440px;
  }
}
