:root {
  font-family:
    Inter,
    Segoe UI,
    sans-serif;
  color: #182d39;
  background: #f2f6f8;
  font-size: 16px;
  --green: #137767;
  --line: #dde6ea;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  padding: 10px 16px;
  color: #193945;
}
button:hover {
  background: #edf5f3;
}
button.primary {
  color: white;
  background: var(--green);
  border-color: var(--green);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
input,
textarea,
select {
  width: 100%;
  padding: 11px;
  border: 1px solid #c9d5dc;
  border-radius: 8px;
  background: white;
  color: #182d39;
}
input:focus,
textarea:focus,
select:focus,
button:focus-visible {
  outline: 3px solid #8ad9c8;
  outline-offset: 2px;
}
label {
  display: grid;
  gap: 7px;
  font-size: 0.9rem;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 2rem;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 1.2rem;
}
p {
  line-height: 1.65;
  color: #536773;
}
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  font-weight: 650;
  color: #137767;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
}
.mark {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #137767;
  color: white;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.story {
  padding: 10vh 8vw;
  background: #102f38;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.story h1 {
  font-size: 3.3rem;
  line-height: 1.12;
  margin: 55px 0 22px;
  max-width: 500px;
}
.story p {
  color: #b9d0d3;
  max-width: 440px;
}
.story .eyebrow {
  color: #8ed8c6;
}
.auth-side {
  padding: 8vh 9vw;
  display: grid;
  align-content: center;
}
.auth-side form {
  display: grid;
  gap: 17px;
}
.error {
  color: #a62b3d;
  font-size: 0.9rem;
  line-height: 1.5;
  min-height: 20px;
}
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  padding: 30px 20px;
  background: white;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 35px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.sidebar nav button {
  text-align: left;
  border: 0;
  color: #293d49;
}
.sidebar nav button.active {
  background: #e7f4ef;
  color: #116957;
}
.side-note {
  margin-top: auto;
  font-size: 0.85rem;
  color: #526573;
  line-height: 1.5;
}
.workspace {
  min-width: 0;
}
header {
  padding: 18px 34px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user {
  display: flex;
  align-items: center;
  gap: 13px;
}
.avatar {
  display: grid;
  place-items: center;
  background: #e1f1ec;
  color: #116957;
  border-radius: 50%;
  width: 36px;
  height: 36px;
}
main {
  padding: 32px;
  max-width: 1600px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.page-head p {
  margin-bottom: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.stat,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.stat {
  padding: 20px;
}
.stat strong {
  font-size: 2rem;
  display: block;
  margin: 8px 0;
}
.stat span {
  font-size: 0.9rem;
  color: #536773;
}
.grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 20px;
}
.panel {
  padding: 24px;
  margin-bottom: 20px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.panel-head h2 {
  margin: 0;
}
.tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.tabs button.active {
  background: #153d45;
  color: white;
}
.empty {
  text-align: center;
  border: 1px dashed #cedce1;
  border-radius: 12px;
  padding: 50px 20px;
}
.empty .symbol {
  font-size: 2.5rem;
  color: #377b75;
  margin-bottom: 16px;
}
.badge {
  font-size: 0.78rem;
  display: inline-block;
  border-radius: 20px;
  padding: 5px 10px;
  color: #47616e;
  background: #edf3f5;
}
.badge.good {
  color: #11725b;
  background: #e6f5ee;
}
.notice {
  border-left: 3px solid #daae52;
  background: #fffbef;
  padding: 15px 18px;
  line-height: 1.6;
  color: #6d581f;
  margin: 0 0 24px;
  border-radius: 0 8px 8px 0;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
form.device-form {
  display: grid;
  gap: 16px;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.device {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.device h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}
.device p {
  margin: 0;
  font-size: 0.9rem;
}
.event {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.event small {
  display: block;
  margin-top: 5px;
  color: #607582;
}
.loading {
  padding: 60px;
}
.footer {
  padding: 20px 32px;
  color: #667984;
  font-size: 0.85rem;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 400px;
  padding: 15px 20px;
  border-radius: 10px;
  background: #173f38;
  color: white;
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 28px;
  width: 520px;
  max-width: 95vw;
}
dialog::backdrop {
  background: #10283277;
}
.connection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .auth-side {
    padding: 8vh 6vw;
  }
  .story {
    padding: 8vh 6vw;
  }
}
@media (max-width: 650px) {
  .auth {
    grid-template-columns: 1fr;
  }
  .story {
    padding: 30px;
  }
  .story h1 {
    font-size: 2rem;
    margin-top: 30px;
  }
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 15px;
    gap: 15px;
  }
  .sidebar nav {
    display: flex;
  }
  .side-note {
    display: none;
  }
  main {
    padding: 20px;
  }
  header {
    padding: 15px;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
}

/* Compact application chassis: the map is the default workspace. */
.map-first-shell .sidebar {
  gap: 16px;
  padding: 20px 14px;
}
.sidebar .module-nav {
  border: 0;
  margin: 0;
  padding: 0;
}
.sidebar .module-nav .settings-item {
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin-top: 20px;
  padding-top: 20px;
}
.compact-header {
  height: 48px;
  padding: 6px 20px;
  font-size: 0.88rem;
}
.profile-menu {
  position: relative;
}
.profile-menu summary {
  list-style: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #e0f1eb;
  color: #116754;
  border: 1px solid #c4e2d7;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 600;
}
.profile-menu summary::-webkit-details-marker {
  display: none;
}
.profile-dropdown {
  position: absolute;
  right: 0;
  top: 43px;
  width: 240px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  z-index: 2000;
  box-shadow: 0 12px 36px #173c3926;
  display: grid;
  gap: 8px;
}
.profile-dropdown small {
  color: #536773;
  margin-bottom: 8px;
}
.profile-dropdown button {
  text-align: left;
  border: 0;
  padding: 9px;
}
.profile-fields {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 15px;
}
.profile-fields dd {
  margin: 0;
}
.profile-fields dt {
  color: #536773;
}
.workspace:has(.fiber-workspace) main {
  padding: 12px;
}
.fiber-heading {
  margin-bottom: 10px;
  min-height: 42px;
}
.fiber-heading .eyebrow,
.fiber-heading > div > p {
  display: none;
}
.fiber-heading h1 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 0;
}
.fiber-heading .actions button {
  padding: 8px 12px;
  font-size: 0.85rem;
}
.fiber-layout {
  min-height: calc(100vh - 125px);
}
.fiber-map {
  min-height: calc(100vh - 215px);
}
.fiber-inspector {
  max-height: calc(100vh - 125px);
}
.fiber-summary {
  padding: 10px 14px;
}
.fiber-tools {
  max-height: calc(100vh - 125px);
  overflow: auto;
}
.settings-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 20px;
}
.settings-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-tabs button {
  text-align: left;
}
.settings-tabs .active {
  background: #137767;
  color: white;
}
.settings-content {
  max-width: 1000px;
}
.settings-content form {
  display: grid;
  gap: 15px;
}
.settings-content .actions {
  margin-top: 12px;
}
.settings-user {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.settings-user p {
  margin: 4px 0;
}
.settings-content input[type="file"] {
  padding: 8px;
}
.settings-content h1 {
  font-size: 1.5rem;
}
.backup-status {
  white-space: pre-wrap;
  line-height: 1.6;
  color: #365463;
}
.settings-warning {
  padding: 14px;
  background: #fff6df;
  border-radius: 8px;
  color: #675120;
}
.settings-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
@media (max-width: 1250px) {
  .fiber-inspector {
    max-height: 450px;
  }
  .fiber-layout {
    min-height: 600px;
  }
}
@media (max-width: 700px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .fiber-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .fiber-map {
    min-height: 450px;
  }
  .fiber-tools {
    max-height: none;
  }
  .map-first-shell .sidebar {
    padding: 12px;
  }
  .sidebar .module-nav .settings-item {
    border: 0;
    margin: 0;
    padding: 10px;
  }
  .profile-dropdown {
    right: 0;
  }
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkbox-label input {
  width: auto;
}
[hidden] {
  display: none !important;
}
