* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  grid-template-columns: 320px minmax(0, 1fr);
  background: #071321;
  color: #f4f8fb;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  padding-bottom: 30px;
}

body.locked {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  color: #eaf7ff;
  background: #263c54;
  cursor: pointer;
}

button.primary {
  color: #041320;
  background: #57d6ff;
  font-weight: 700;
}

button.danger {
  background: #6c2530;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #2e4963;
  border-radius: 8px;
  background: #0b1d31;
  color: #f4f8fb;
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 560px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.app-header {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #20384f;
  background: #08192b;
  padding: 0 24px;
  z-index: 30;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #f4f8fb;
  min-width: 0;
}

.app-brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.app-brand-title {
  font-size: 22px;
  font-weight: 800;
}

.app-brand-for,
.app-brand-suffix {
  color: #c4d1df;
  font-size: 15px;
  font-weight: 800;
}

.app-brand-logo {
  width: 78px;
  height: auto;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header-icon-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #2e4963;
  background: transparent;
  color: #b9c7d6;
}

.header-icon-button:hover {
  border-color: #57d6ff;
  color: #eaf7ff;
}

.header-icon-button.active {
  border-color: #57d6ff;
  background: rgba(87, 214, 255, .14);
  color: #f4f8fb;
}

.header-icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-icon-button.spinning svg {
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sidebar {
  grid-column: 1;
  grid-row: 2;
  border-right: 1px solid #20384f;
  padding: 12px 20px 20px;
  background: #08192b;
  height: calc(100vh - 64px - 30px);
  overflow: auto;
}

.topbar h2 {
  margin: 4px 0 0;
}

.eyebrow {
  color: #57d6ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.panel,
.summary-card,
.model-item,
.empty {
  border: 1px solid #20384f;
  border-radius: 10px;
  background: #0e2135;
}

.panel h3 {
  margin: 0;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  margin: 0 0 14px;
}

.sidebar-actions input {
  height: 44px;
}

.icon-button {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 26px;
  line-height: 1;
  font-weight: 300;
}

.model-list {
  display: grid;
  gap: 0;
  border-top: 1px solid #20384f;
}

.model-item {
  border: 0;
  border-bottom: 1px solid #20384f;
  border-radius: 0;
  background: transparent;
  padding: 13px 10px;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.model-item:focus-visible {
  outline: 2px solid #57d6ff;
  outline-offset: -2px;
}

.model-item.active {
  background: #12314d;
  box-shadow: inset 3px 0 0 #57d6ff;
}

.model-item-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  gap: 10px;
  align-items: center;
}

.model-current-mark {
  color: #57d6ff;
  font-size: 24px;
  line-height: 1;
  opacity: 0;
  text-align: right;
}

.model-item.active .model-current-mark {
  opacity: 1;
}

.model-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-code-row .code {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.model-item .code {
  font-size: 14px;
  font-weight: 800;
}

.model-item .meta {
  color: #9fb0c3;
  font-size: 12px;
  margin-top: 6px;
}

.model-item .sub-meta {
  color: #718397;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.model-updated-at {
  grid-column: 1 / -1;
  color: #718397;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.main {
  grid-column: 2;
  grid-row: 2;
  padding: 16px 28px 28px;
  height: calc(100vh - 64px - 30px);
  overflow: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.empty {
  padding: 40px;
  color: #a8b8ca;
}

.dashboard {
  display: grid;
  gap: 18px;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 2px;
}

.dashboard-header h2 {
  margin: 0;
}

.dashboard-header p {
  margin: 6px 0 0;
  color: #9fb0c3;
  font-size: 13px;
}

.dashboard-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dashboard-back-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #f4f8fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: -10px;
}

.dashboard-back-button:hover {
  background: rgba(244, 248, 251, .08);
}

.dashboard-back-button svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  stroke-width: 2.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-filters {
  display: grid;
  grid-template-columns: 110px 100px 100px minmax(220px, 1fr);
  gap: 10px;
  min-width: min(620px, 100%);
}

.dashboard-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-summary {
  display: grid;
  gap: 16px;
  align-content: start;
}

.dashboard-summary p,
.dashboard-chart p {
  margin: -8px 0 0;
  color: #9fb0c3;
  font-size: 12px;
}

.summary-flow {
  display: grid;
  gap: 0;
}

.summary-flow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 11px 0;
  border-top: 1px solid #20384f;
}

.summary-flow-row:first-child {
  border-top: 0;
}

.summary-flow-row span {
  color: #9fb0c3;
  font-size: 13px;
  font-weight: 800;
}

.summary-flow-row strong {
  color: #f4f8fb;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.dashboard-chart h3,
.dashboard-summary h3,
.dashboard-pie h3,
.dashboard-table h3 {
  margin: 0 0 14px;
}

.dashboard-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.dashboard-card-title h3 {
  margin: 0;
}

.dashboard-card-title strong {
  color: #57d6ff;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pie-body {
  display: grid;
  grid-template-rows: auto auto;
  gap: 14px;
  align-items: start;
  width: 100%;
}

.pie-chart-wrap {
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.pie-chart {
  width: 190px;
  height: 190px;
  transform: rotate(-90deg);
}

.pie-chart circle {
  transition: stroke-dasharray .18s ease;
}

.pie-legend {
  display: grid;
  gap: 8px;
  min-width: 0;
  text-align: left;
}

.pie-legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: #9fb0c3;
  font-size: 13px;
}

.pie-legend-row i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.pie-legend-row strong {
  color: #f4f8fb;
  overflow-wrap: anywhere;
}

.pie-legend-row small {
  grid-column: 2 / -1;
  color: #718397;
  font-size: 11px;
  margin-top: -5px;
}

.pie-legend-footer {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #20384f;
  color: #718397;
  font-size: 11px;
  text-align: right;
}

.period-bar-chart {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  min-height: 150px;
  overflow: hidden;
  max-width: 100%;
}

.period-bar-axis {
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  color: #718397;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  padding: 8px 0 24px;
}

.period-bar-plot {
  min-width: 0;
  width: 100%;
  height: 140px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: clamp(2px, 0.55vw, 7px);
  align-items: end;
  padding: 8px 6px 0;
  border-left: 1px solid #2e4963;
  border-bottom: 1px solid #2e4963;
  background:
    linear-gradient(to bottom, rgba(46, 73, 99, .48) 1px, transparent 1px) 0 8px / 100% 94px repeat-y;
}

.period-bar-item {
  height: 132px;
  display: grid;
  grid-template-rows: 18px minmax(0, 1fr) 20px;
  gap: 4px;
  align-items: end;
  text-align: center;
  min-width: 0;
  overflow: hidden;
}

.period-bar-item span {
  align-self: start;
  color: #9fb0c3;
  font-size: 9px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.period-bar-item i {
  display: block;
  width: 100%;
  max-width: 30px;
  justify-self: center;
  min-height: 0;
  border-radius: 5px 5px 0 0;
  background: #57d6ff;
  box-shadow: 0 0 16px rgba(87, 214, 255, .18);
}

.period-bar-item em {
  color: #7f91a5;
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.transition-list {
  display: grid;
  gap: 10px;
}

.transition-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  color: #9fb0c3;
  font-size: 12px;
}

.transition-path {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #f4f8fb;
  font-weight: 800;
}

.transition-path span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.transition-path i {
  color: #57d6ff;
  font-style: normal;
  flex: 0 0 auto;
}

.transition-row strong {
  color: #f4f8fb;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chart-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
  color: #9fb0c3;
  font-size: 12px;
}

.chart-row div {
  height: 12px;
  border-radius: 999px;
  background: #08192b;
  overflow: hidden;
}

.chart-row i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #57d6ff;
}

.dashboard-table {
  display: grid;
  gap: 0;
}

.dashboard-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(110px, auto));
  gap: 16px;
  align-items: center;
  border-top: 1px solid #20384f;
  padding: 12px 0;
  color: #9fb0c3;
  font-size: 13px;
}

.dashboard-table-row strong {
  color: #f4f8fb;
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
  .dashboard-top {
    grid-template-columns: 1fr;
  }
}

.dashboard-empty {
  color: #c1ccd7;
}

.hidden {
  display: none !important;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid #20384f;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 132px;
  justify-content: center;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #9fb0c3;
  padding: 12px 18px;
  white-space: nowrap;
}

.tab svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab.active {
  background: #12314d;
  color: #f4f8fb;
  box-shadow: inset 0 -2px 0 #57d6ff;
}

.tab-count {
  display: inline;
  margin-left: 8px;
  color: #9fb0c3;
  font-size: 12px;
  font-weight: 700;
}

.tab-panel {
  min-width: 0;
}

#modelTab {
  padding-bottom: 70px;
}

.model-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 18px;
  align-items: start;
}

.model-save-footer {
  position: fixed;
  left: 320px;
  right: 0;
  bottom: 30px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 28px;
  border-top: 1px solid rgba(32, 56, 79, .65);
  background: rgba(7, 19, 33, .72);
  backdrop-filter: blur(10px);
  z-index: 25;
}

.model-save-footer button {
  min-width: 128px;
}

.save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.save-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.single-grid {
  max-width: 560px;
}

.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

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

.note {
  color: #9fb0c3;
  font-size: 13px;
  line-height: 1.6;
}

.settings-form {
  display: grid;
  gap: 16px;
}

.settings-form label {
  display: grid;
  gap: 7px;
}

.settings-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.settings-form label > span {
  color: #9fb0c3;
  font-size: 12px;
  font-weight: 700;
}

.field-label small {
  color: #718397;
  font-size: 10px;
  font-weight: 700;
}

.settings-field > span {
  color: #9fb0c3;
  font-size: 12px;
  font-weight: 700;
}

.computed-value {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid #20384f;
  border-radius: 8px;
  background: #08192b;
  color: #d9edf8;
  padding: 10px 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.short-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
}

.feature-settings {
  display: grid;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid rgba(32, 56, 79, .72);
}

.feature-settings h3 {
  margin: 4px 0 0;
  font-size: 14px;
}

.check-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px !important;
  min-height: 28px;
  color: #cfe0ec;
  font-size: 13px;
  font-weight: 700;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: #57d6ff;
}

.feature-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  padding: 8px 10px;
  border: 1px solid #20384f;
  border-radius: 8px;
  background: #08192b;
}

.drop-zone {
  min-height: 180px;
  width: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 1px dashed #57d6ff;
  border-radius: 10px;
  background: #091b2e;
  color: #d9edf8;
  cursor: pointer;
  text-align: center;
  padding: 24px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  position: relative;
}

.drop-zone.drag-over {
  background: #12314d;
}

.drop-zone.has-preview {
  min-height: 220px;
  align-content: end;
  box-shadow: inset 0 -110px 90px rgba(2, 9, 16, .68);
}

.image-drop-zone {
  min-height: 220px;
  max-width: 100%;
}

.firmware-drop-zone {
  min-height: 86px;
  width: max(100%, 560px);
  padding: 16px;
}

.drop-zone input {
  display: none;
}

.drop-zone span {
  font-weight: 800;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.drop-zone small {
  color: #9fb0c3;
}

.drop-zone-spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(159, 176, 195, .35);
  border-top-color: #57d6ff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.drop-zone.uploading {
  pointer-events: none;
  opacity: .78;
}

.drop-zone.uploading .drop-zone-spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-inline {
  color: #9fb0c3;
  padding: 12px 0;
}

.firmware-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
  width: max(100%, 560px);
}

.firmware-panel {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.firmware-row {
  display: grid;
  grid-template-columns: 64px minmax(64px, 82px) minmax(80px, 1.05fr) minmax(80px, 1fr) 92px 86px;
  gap: 8px;
  align-items: center;
  border-top: 1px solid #20384f;
  padding: 14px 0;
  min-width: 0;
}

.firmware-header {
  color: #9fb0c3;
  font-size: 12px;
  font-weight: 800;
}

.firmware-row.disabled {
  opacity: .55;
}

.firmware-cell {
  min-width: 0;
  align-self: center;
}

.firmware-header > div:first-child,
.firmware-enabled {
  display: flex;
  justify-content: center;
}

.firmware-version {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.latest-label {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border: 1px solid rgba(74, 222, 128, .45);
  border-radius: 4px;
  background: rgba(34, 197, 94, .18);
  color: #86efac;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.firmware-meta,
.firmware-file,
.firmware-kind,
.firmware-description {
  color: #9fb0c3;
  font-size: 13px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.firmware-file {
  display: flex;
  align-items: center;
  gap: 6px;
}

.firmware-file span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.firmware-warning-icon {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 17px;
  border: 1px solid rgba(245, 158, 11, .55);
  border-radius: 50%;
  background: rgba(245, 158, 11, .16);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.firmware-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 86px;
}

.firmware-actions > button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.quiet-trash-button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #718397;
  padding: 0;
}

.quiet-trash-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quiet-trash-button:hover {
  background: rgba(255, 180, 180, .09);
  color: #ffb4b4;
}

.firmware-edit-row {
  display: grid;
  gap: 14px;
  border-top: 1px solid #20384f;
  background: #091b2e;
  padding: 16px;
  overflow: hidden;
  animation: firmwareEditOpen .18s ease-out;
}

.firmware-edit-row.closing {
  animation: firmwareEditClose .18s ease-in forwards;
}

@keyframes firmwareEditOpen {
  from {
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    max-height: 520px;
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes firmwareEditClose {
  from {
    max-height: 520px;
    opacity: 1;
    transform: translateY(0);
  }
  to {
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
  }
}

.firmware-edit-file {
  display: grid;
  gap: 6px;
}

.firmware-edit-file span,
.firmware-edit-row label > span {
  color: #9fb0c3;
  font-size: 12px;
  font-weight: 700;
}

.firmware-edit-file strong {
  overflow-wrap: anywhere;
  color: #d9edf8;
  font-size: 13px;
}

.firmware-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.4fr);
  gap: 12px;
}

.firmware-edit-row label {
  display: grid;
  gap: 7px;
}

.firmware-edit-description {
  grid-column: 1 / -1;
}

.firmware-edit-description textarea {
  min-height: 82px;
}

.firmware-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.icon-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.icon-text-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.firmware-kind {
  text-align: right;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
}

.switch input {
  display: none;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #45586c;
}

.switch span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #c1ccd7;
}

.switch input:checked + span {
  background: #57d6ff;
}

.switch input:checked + span::after {
  left: 21px;
  background: #041320;
}

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 42px;
  border-top: 1px solid #20384f;
  background: #06111f;
  color: #7f90a4;
  font-size: 11px;
  z-index: 20;
}

.footer-actions {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-icon-button {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #718397;
}

.footer-icon-button svg,
.footer-icon-button img {
  width: 14px;
  height: 14px;
}

.footer-icon-button img {
  filter: invert(56%) sepia(9%) saturate(959%) hue-rotate(171deg) brightness(89%) contrast(88%);
}

.footer-icon-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-icon-button:hover {
  background: rgba(87, 214, 255, .08);
  color: #9fdff4;
}

.footer-icon-button:hover img {
  filter: invert(85%) sepia(20%) saturate(842%) hue-rotate(160deg) brightness(96%) contrast(97%);
}

.footer-icon-button.spinning svg {
  animation: spin .75s linear infinite;
}

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(680px, calc(100vw - 56px));
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(87, 214, 255, .35);
  border-radius: 10px;
  background: rgba(25, 127, 95, .94);
  color: #f4fff9;
  font-weight: 800;
  text-align: center;
  padding: 14px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .38);
  z-index: 80;
  pointer-events: none;
}

.toast.error {
  border-color: rgba(255, 154, 154, .45);
  background: rgba(142, 44, 52, .95);
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(2, 9, 16, .68);
  z-index: 300;
  animation: confirmFade .12s ease-out;
}

.confirm-card {
  width: min(420px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  border: 1px solid #20384f;
  border-radius: 10px;
  background: #0e2135;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
  animation: confirmPop .14s ease-out;
}

.confirm-card h3 {
  margin: 0;
  font-size: 18px;
}

.confirm-card p {
  margin: 12px 0 0;
  color: #c1ccd7;
  line-height: 1.65;
  white-space: pre-wrap;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 20px;
}

.confirm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
}

.confirm-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes confirmFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes confirmPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-panel {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #071321;
  z-index: 100;
}

.login-card {
  width: min(360px, calc(100vw - 40px));
  display: grid;
  gap: 14px;
  border: 1px solid #20384f;
  border-radius: 12px;
  background: #0e2135;
  padding: 28px;
  text-align: center;
}

.login-icon {
  width: 72px;
  height: 72px;
  justify-self: center;
  border-radius: 16px;
}

.login-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
}

.login-brand-row span {
  color: #7f90a4;
  font-size: 13px;
  font-weight: 800;
}

.login-logo-onkyo {
  width: 92px;
}

.login-logo-campagne {
  width: 78px;
}

.login-logo-ambass {
  width: 70px;
  max-height: 46px;
  object-fit: contain;
}

.login-card h1 {
  margin: 0 0 6px;
}

.login-error {
  min-height: 18px;
  color: #ff9a9a;
  font-size: 13px;
}

@media (max-width: 980px) {
  .model-settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
