﻿:root {
  --bg: #eef3fb;
  --sidebar: #102b46;
  --sidebar-active: #2f80ff;
  --text: #13294b;
  --muted: #6d82a3;
  --line: #dbe5f1;
  --surface: #ffffff;
  --primary: #13345a;
  --success-bg: #e9fbef;
  --success-text: #159947;
  --warn-bg: #fff7d6;
  --warn-text: #c89612;
  --orange-bg: #fff0df;
  --orange-text: #d9761a;
  --danger-bg: #fdeceb;
  --danger-text: #cf4d4d;
  --neutral-bg: #eef4fb;
  --neutral-text: #5c6f8d;
  --shadow: 0 18px 40px rgba(18, 43, 78, 0.08);
  --radius: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

button, input, select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 246px 1fr;
}

.sidebar {
  background: var(--sidebar);
  color: #fff;
  padding: 18px 12px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 18px;
}

.sidebar-brand strong {
  display: block;
  font-size: 1.05rem;
}

.sidebar-brand span {
  display: block;
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
}

.sidebar-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.sidebar-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.sidebar-nav {
  display: grid;
  gap: 12px;
}

.nav-group {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 10px;
}

.nav-group-title {
  color: rgba(255,255,255,0.78);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 6px 8px 10px;
}

.nav-item {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: #e9f1fb;
  margin-bottom: 6px;
}

.nav-item:last-child {
  margin-bottom: 0;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 700;
}

.main-panel {
  padding: 22px;
}

.topbar {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.topbar p {
  margin: 0;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ghost-btn,
.primary-btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
}

.ghost-btn {
  background: #edf4fd;
  color: var(--primary);
}

.primary-btn {
  background: var(--primary);
  color: #fff;
}

.hero-card,
.content-card,
.metric-card,
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
  margin-bottom: 18px;
}

.section-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4a6b95;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-card h2 {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.05;
}

.hero-copy {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-status {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero-logo {
  width: 120px;
  height: auto;
  object-fit: contain;
}

.status-badge,
.status,
.severity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-badge {
  background: var(--success-bg);
  color: var(--success-text);
}

.stats-grid,
.chart-grid,
.admin-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.stats-grid-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.chart-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid {
  grid-template-columns: minmax(320px, 420px) 1fr;
}

.stat-card,
.content-card,
.metric-card {
  padding: 18px;
}

.metric-card {
  display: grid;
  gap: 12px;
  min-height: 152px;
}

.metric-head span,
.metric-sub,
.stat-card span,
.card-head span,
.stat-card small {
  color: var(--muted);
}

.metric-head strong,
.stat-card strong {
  display: block;
  font-size: 2rem;
  margin-top: 8px;
}

.level-shell {
  height: 14px;
  border-radius: 999px;
  background: #f2f6fb;
  border: 1px solid var(--line);
  overflow: hidden;
}

.level-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.3s ease, background 0.3s ease;
}

.level-fill.neutral {
  background: #dbe7f6;
}

.level-fill.low {
  background: #ffffff;
}

.level-fill.warn {
  background: #f6df77;
}

.level-fill.orange {
  background: #f3a24f;
}

.level-fill.danger {
  background: #dc5d5d;
}

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

.card-head h3 {
  margin: 0;
  font-size: 1rem;
}

.form-card {
  align-self: start;
}

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

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

.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.form-grid label span {
  color: var(--text);
  font-weight: 600;
}

.form-grid input,
.form-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f9fbff;
  color: var(--text);
}

.form-grid .span-2 {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.customer-groups {
  display: grid;
  gap: 16px;
}

.customer-block {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: #fbfdff;
}

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

.customer-header h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.customer-summary {
  color: var(--muted);
  font-size: 14px;
}

.customer-device-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.customer-device-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.customer-device-card h5 {
  margin: 0 0 10px;
  font-size: 0.98rem;
}

.customer-device-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.empty-block {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: #f9fbff;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.status.online {
  background: var(--success-bg);
  color: var(--success-text);
}

.status.error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.status.unknown {
  background: var(--neutral-bg);
  color: var(--neutral-text);
}

.severity.low {
  background: var(--neutral-bg);
  color: var(--neutral-text);
}

.severity.medium {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.severity.high {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.metric-low {
  color: var(--text);
  font-weight: 600;
}

.metric-medium {
  color: var(--warn-text);
  font-weight: 700;
}

.metric-high {
  color: var(--danger-text);
  font-weight: 700;
}

@media (max-width: 1600px) {
  .stats-grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .hero-card,
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-grid,
  .customer-device-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .chart-grid,
  .form-grid,
  .stats-grid-6 {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: span 1;
  }
}

.metric-card {
  border: 1px solid var(--line);
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.metric-card.state-neutral,
.metric-card.state-low {
  background: #ffffff;
  border-color: var(--line);
}

.metric-card.state-warn {
  background: #fff7d6;
  border-color: #f0d36b;
}

.metric-card.state-orange {
  background: #fff0df;
  border-color: #f0b06c;
}

.metric-card.state-danger {
  background: #fdeceb;
  border-color: #e38b8b;
}

.metric-card.state-warn .metric-head strong,
.metric-card.state-orange .metric-head strong,
.metric-card.state-danger .metric-head strong {
  color: var(--text);
}

.metric-card.state-danger .metric-sub {
  color: #9c4040;
}

.level-shell {
  display: none;
}

.metric-card {
  text-align: center;
  align-items: center;
}

.metric-head {
  width: 100%;
  text-align: center;
}

.metric-head span {
  display: block;
}

.metric-head strong {
  display: block;
  width: 100%;
  text-align: center;
}

.metric-sub {
  width: 100%;
  text-align: center;
}

.customer-device-link {
  display: block;
  color: inherit;
}

.customer-device-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.customer-device-link:hover .customer-device-card {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(18, 43, 78, 0.08);
  border-color: #aac6ef;
}

.detail-summary-card {
  margin-bottom: 18px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-meta-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fbfdff;
  display: grid;
  gap: 6px;
}

.detail-meta-item strong {
  font-size: 0.9rem;
}

.detail-meta-item span {
  color: var(--muted);
}

@media (max-width: 1200px) {
  .detail-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }
}

.detail-threshold-card {
  margin-bottom: 18px;
}

@keyframes alarmBlink {
  0% {
    box-shadow: 0 0 0 rgba(220, 93, 93, 0);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 4px rgba(220, 93, 93, 0.18);
    opacity: 0.82;
  }
  100% {
    box-shadow: 0 0 0 rgba(220, 93, 93, 0);
    opacity: 1;
  }
}

.metric-card.state-danger {
  animation: alarmBlink 1.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .metric-card.state-danger {
    animation: none;
  }
}

.metric-card.state-danger {
  background: #ffdddd;
  border-color: #ff3b30;
  animation: alarmBlinkStrong 0.95s ease-in-out infinite;
}

.metric-card.state-danger .metric-head strong,
.metric-card.state-danger .metric-sub,
.metric-card.state-danger .metric-head span {
  color: #8f1111;
}

@keyframes alarmBlinkStrong {
  0% {
    background: #fff5f5;
    border-color: #ff6b63;
    box-shadow: 0 0 0 rgba(255, 59, 48, 0);
    opacity: 1;
  }
  50% {
    background: #ffb3ae;
    border-color: #ff1f14;
    box-shadow: 0 0 0 6px rgba(255, 31, 20, 0.22);
    opacity: 1;
  }
  100% {
    background: #fff5f5;
    border-color: #ff6b63;
    box-shadow: 0 0 0 rgba(255, 59, 48, 0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .metric-card.state-danger {
    animation: none;
  }
}

.metric-card.state-danger {
  background: #ffb3b3;
  border: 2px solid #ff1f1f;
  animation: alarmBlinkCritical 0.8s ease-in-out infinite;
}

.metric-card.state-danger .metric-head span,
.metric-card.state-danger .metric-head strong,
.metric-card.state-danger .metric-sub {
  color: #7a0000;
}

@keyframes alarmBlinkCritical {
  0% {
    background: #ffe3e3;
    border-color: #ff5a5a;
    box-shadow: 0 0 0 rgba(255, 0, 0, 0);
    transform: scale(1);
  }
  50% {
    background: #ff7f7f;
    border-color: #ff0000;
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.45);
    transform: scale(1.01);
  }
  100% {
    background: #ffe3e3;
    border-color: #ff5a5a;
    box-shadow: 0 0 0 rgba(255, 0, 0, 0);
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .metric-card.state-danger {
    animation: none;
    transform: none;
  }
}

.customer-device-card-danger {
  background: #fff0f0;
  border: 1px solid #ff8f8f;
}

.customer-device-card-danger {
  background: #ffb3b3;
  border: 2px solid #ff1f1f;
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.22);
  animation: customerAlarmBlink 0.9s ease-in-out infinite;
}

.customer-device-card-danger h5,
.customer-device-card-danger .customer-device-meta,
.customer-device-card-danger .customer-device-meta span {
  color: #7a0000;
}

@keyframes customerAlarmBlink {
  0% {
    background: #ffe3e3;
    border-color: #ff5a5a;
    box-shadow: 0 0 0 rgba(255, 0, 0, 0);
  }
  50% {
    background: #ff7f7f;
    border-color: #ff0000;
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.42);
  }
  100% {
    background: #ffe3e3;
    border-color: #ff5a5a;
    box-shadow: 0 0 0 rgba(255, 0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-device-card-danger {
    animation: none;
  }
}

.sidebar-session {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 12px;
  margin: 0 0 14px;
  display: grid;
  gap: 4px;
}

.sidebar-session strong {
  color: #fff;
  font-size: 0.95rem;
}

.sidebar-session span,
.sidebar-session small {
  color: rgba(255,255,255,0.75);
}

.sidebar-logout {
  width: 100%;
  margin-top: 8px;
}

.login-body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #edf3fb 0%, #dfe9f7 100%);
}

.login-shell {
  width: min(100%, 460px);
  padding: 24px;
}

.login-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 44px rgba(18, 43, 78, 0.12);
  padding: 28px;
  display: grid;
  gap: 20px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
}

.login-brand span {
  color: var(--muted);
}

.login-copy h1 {
  margin: 0 0 8px;
}

.login-copy p {
  margin: 0;
  color: var(--muted);
}

.login-error {
  border: 1px solid #ffb3b3;
  background: #fff0f0;
  color: #8f1111;
  border-radius: 14px;
  padding: 12px 14px;
}

.login-form-grid {
  grid-template-columns: 1fr;
}

.login-body-clean {
  min-height: 100vh;
  margin: 0;
  background: #eef3fb;
}

.login-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 40px 14%;
}

.login-panel {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(18, 43, 78, 0.10);
  padding: 34px 30px 28px;
}

.login-logo-block {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.login-logo-large {
  width: 132px;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.login-title-block {
  margin-bottom: 20px;
}

.login-subtitle-center {
  margin: 0;
  text-align: center;
  color: #56739a;
  font-size: 14px;
}

.login-form-clean {
  display: grid;
  gap: 14px;
}

.login-label {
  display: grid;
  gap: 8px;
}

.login-label span {
  color: #163256;
  font-weight: 700;
  font-size: 13px;
}

.login-label input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cfdcf0;
  border-radius: 12px;
  background: #eaf1fb;
  padding: 10px 12px;
  color: #163256;
  outline: none;
}

.login-label input:focus {
  border-color: #8fb0df;
  box-shadow: 0 0 0 3px rgba(47, 128, 255, 0.10);
}

.login-submit-btn {
  margin-top: 6px;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: #163256;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.login-submit-btn:hover {
  background: #102844;
}

.login-error {
  border: 1px solid #ffb3b3;
  background: #fff1f1;
  color: #8f1111;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

@media (max-width: 920px) {
  .login-stage {
    justify-content: center;
    padding: 24px;
  }

  .login-panel {
    max-width: 420px;
    padding: 28px 22px 24px;
  }

  .login-logo-large {
    width: 120px;
  }
}

.login-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 40px 18%;
}

.login-panel {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 56px rgba(18, 43, 78, 0.12);
  padding: 46px 30px 38px;
}

.login-logo-block {
  display: flex;
  justify-content: center;
  margin-bottom: 34px;
}

.login-logo-large {
  width: 170px;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.login-title-block {
  margin-bottom: 24px;
}

.login-subtitle-center {
  margin: 0;
  text-align: center;
  color: #58769e;
  font-size: 15px;
  font-weight: 500;
}

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

.login-label {
  display: grid;
  gap: 8px;
}

.login-label span {
  color: #163256;
  font-weight: 700;
  font-size: 15px;
}

.login-label input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c8d7ed;
  border-radius: 12px;
  background: #eaf1fb;
  padding: 12px 14px;
  color: #163256;
  font-size: 15px;
  outline: none;
}

.login-label input:focus {
  border-color: #8fb0df;
  box-shadow: 0 0 0 3px rgba(47, 128, 255, 0.10);
}

.login-submit-btn {
  margin-top: 8px;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: #163256;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.login-submit-btn:hover {
  background: #102844;
}

@media (max-width: 920px) {
  .login-stage {
    justify-content: center;
    padding: 24px;
  }

  .login-panel {
    max-width: 430px;
    padding: 34px 24px 28px;
  }

  .login-logo-large {
    width: 150px;
  }
}

.login-panel {
  max-width: 645px;
  padding: 46px 42px 38px;
}

.login-logo-large {
  width: 185px;
}

.login-stage {
  padding: 40px 16%;
}

body.login-body.login-body-clean .login-stage {
  justify-content: center;
  padding: 40px 24px;
}

body.login-body.login-body-clean .login-panel {
  width: min(100%, 640px) !important;
  max-width: 640px !important;
  min-width: 640px;
  padding: 54px 46px 42px !important;
  border-radius: 22px;
  box-shadow: 0 24px 56px rgba(18, 43, 78, 0.12);
}

body.login-body.login-body-clean .login-logo-block {
  margin-bottom: 34px;
}

body.login-body.login-body-clean .login-logo-large {
  width: 190px !important;
}

body.login-body.login-body-clean .login-title-block {
  margin-bottom: 24px;
}

body.login-body.login-body-clean .login-subtitle-center {
  font-size: 15px;
}

body.login-body.login-body-clean .login-form-clean {
  gap: 18px;
}

body.login-body.login-body-clean .login-label span {
  font-size: 15px;
}

body.login-body.login-body-clean .login-label input {
  min-height: 48px;
  padding: 12px 16px;
  font-size: 15px;
}

body.login-body.login-body-clean .login-submit-btn {
  min-height: 48px;
  font-size: 16px;
  border-radius: 13px;
}

@media (max-width: 760px) {
  body.login-body.login-body-clean .login-panel {
    width: min(100%, 440px) !important;
    max-width: 440px !important;
    min-width: 0;
    padding: 34px 24px 28px !important;
  }

  body.login-body.login-body-clean .login-logo-large {
    width: 150px !important;
  }
}

body.login-body.login-body-clean .login-panel {
  width: min(100%, 530px) !important;
  max-width: 530px !important;
  min-width: 530px;
  padding: 50px 38px 38px !important;
}

body.login-body.login-body-clean .login-logo-large {
  width: 175px !important;
}

@media (max-width: 760px) {
  body.login-body.login-body-clean .login-panel {
    width: min(100%, 440px) !important;
    max-width: 440px !important;
    min-width: 0;
    padding: 34px 24px 28px !important;
  }
}

body.login-body.login-body-clean .login-panel {
  width: min(100%, 480px) !important;
  max-width: 480px !important;
  min-width: 480px;
  padding: 46px 34px 36px !important;
}

body.login-body.login-body-clean .login-logo-large {
  width: 170px !important;
}

@media (max-width: 760px) {
  body.login-body.login-body-clean .login-panel {
    width: min(100%, 420px) !important;
    max-width: 420px !important;
    min-width: 0;
    padding: 32px 22px 26px !important;
  }
}

body.login-body.login-body-clean .login-panel {
  width: min(100%, 430px) !important;
  max-width: 430px !important;
  min-width: 430px;
  padding: 42px 30px 34px !important;
}

body.login-body.login-body-clean .login-logo-large {
  width: 160px !important;
}

@media (max-width: 760px) {
  body.login-body.login-body-clean .login-panel {
    width: min(100%, 400px) !important;
    max-width: 400px !important;
    min-width: 0;
    padding: 30px 22px 24px !important;
  }
}

body.login-body.login-body-clean .login-panel {
  width: min(100%, 430px) !important;
  max-width: 430px !important;
  min-width: 430px;
  padding: 42px 30px 34px !important;
}

body.login-body.login-body-clean .login-logo-large {
  width: 160px !important;
}

@media (max-width: 760px) {
  body.login-body.login-body-clean .login-panel {
    width: min(100%, 400px) !important;
    max-width: 400px !important;
    min-width: 0;
    padding: 30px 22px 24px !important;
  }
}

body.login-body.login-body-clean .login-panel {
  width: min(100%, 400px) !important;
  max-width: 400px !important;
  min-width: 400px;
  padding: 42px 30px 34px !important;
}

body.login-body.login-body-clean .login-logo-large {
  width: 160px !important;
}

@media (max-width: 760px) {
  body.login-body.login-body-clean .login-panel {
    width: min(100%, 400px) !important;
    max-width: 400px !important;
    min-width: 0;
    padding: 30px 22px 24px !important;
  }
}

.detail-threshold-readonly .empty-block {
  margin-top: 6px;
}

.error-shell {
  min-height: calc(100vh - 44px);
  display: grid;
  place-items: center;
}

.error-card {
  width: min(100%, 620px);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 36px 34px;
  text-align: center;
  border: 1px solid var(--line);
}

.error-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: #edf4fd;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.error-card h1 {
  margin: 18px 0 10px;
  font-size: 2rem;
}

.error-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.error-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.detail-threshold-readonly .empty-block {
  margin-top: 6px;
}

.error-shell {
  min-height: calc(100vh - 44px);
  display: grid;
  place-items: center;
}

.error-card {
  width: min(100%, 620px);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 36px 34px;
  text-align: center;
  border: 1px solid var(--line);
}

.error-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: #edf4fd;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.error-card h1 {
  margin: 18px 0 10px;
  font-size: 2rem;
}

.error-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.error-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}
ï»¿
.lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tenant-lifecycle-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdff;
  padding: 18px;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tenant-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.tenant-trial {
  background: #eef4ff;
  color: #325fa8;
}

.tenant-active {
  background: #e9fbef;
  color: #159947;
}

.tenant-past_due {
  background: #fff7d6;
  color: #c89612;
}

.tenant-suspended,
.tenant-cancelled,
.billing-unpaid {
  background: #ffe3e3;
  color: #8f1111;
}

.billing-pending {
  background: #eef4ff;
  color: #325fa8;
}

.billing-current {
  background: #e9fbef;
  color: #159947;
}

.billing-past_due {
  background: #fff7d6;
  color: #c89612;
}

@media (max-width: 1200px) {
  .lifecycle-grid {
    grid-template-columns: 1fr;
  }
}
.lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tenant-lifecycle-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdff;
  padding: 18px;
  display: grid;
  gap: 16px;
}

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

.billing-run-form {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 18px;
}

.billing-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.billing-facts strong {
  color: var(--text);
}

.payment-inline-form {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tenant-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.tenant-trial {
  background: #eef4ff;
  color: #325fa8;
}

.tenant-active {
  background: #e9fbef;
  color: #159947;
}

.tenant-past_due {
  background: #fff7d6;
  color: #c89612;
}

.tenant-suspended,
.tenant-cancelled,
.billing-unpaid {
  background: #ffe3e3;
  color: #8f1111;
}

.billing-pending {
  background: #eef4ff;
  color: #325fa8;
}

.billing-current {
  background: #e9fbef;
  color: #159947;
}

.billing-past_due {
  background: #fff7d6;
  color: #c89612;
}

@media (max-width: 1200px) {
  .lifecycle-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .billing-facts {
    grid-template-columns: 1fr;
  }

  .billing-run-form {
    justify-content: stretch;
  }

  .billing-run-form .primary-btn {
    width: 100%;
  }
}
.gateway-note {
  border: 1px dashed var(--line);
  background: #f8fbff;
  color: var(--muted);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 0 0 18px;
}

.gateway-note-ok {
  border-style: solid;
  background: #eef9f1;
  color: #11663a;
}

.section-mini-head {
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
}

.lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tenant-lifecycle-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdff;
  padding: 18px;
  display: grid;
  gap: 16px;
}

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

.billing-run-form {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 18px;
}

.billing-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.billing-facts strong {
  color: var(--text);
}

.payment-inline-form,
.billing-profile-form {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tenant-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.tenant-trial {
  background: #eef4ff;
  color: #325fa8;
}

.tenant-active {
  background: #e9fbef;
  color: #159947;
}

.tenant-past_due {
  background: #fff7d6;
  color: #c89612;
}

.tenant-suspended,
.tenant-cancelled,
.billing-unpaid {
  background: #ffe3e3;
  color: #8f1111;
}

.billing-pending {
  background: #eef4ff;
  color: #325fa8;
}

.billing-current {
  background: #e9fbef;
  color: #159947;
}

.billing-past_due {
  background: #fff7d6;
  color: #c89612;
}

@media (max-width: 1200px) {
  .lifecycle-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .billing-facts {
    grid-template-columns: 1fr;
  }

  .billing-run-form {
    justify-content: stretch;
  }

  .billing-run-form .primary-btn {
    width: 100%;
  }
}
.landing-body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(47, 128, 255, 0.10), transparent 28%),
    linear-gradient(180deg, #eef3fb 0%, #e4edf9 100%);
  color: var(--text);
}

.landing-shell {
  min-height: 100vh;
  padding: 26px;
}

.landing-hero {
  width: min(1400px, 100%);
  margin: 0 auto;
}

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

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.landing-brand-logo-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(18, 43, 78, 0.10);
  display: grid;
  place-items: center;
}

.landing-brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.landing-brand strong {
  display: block;
  font-size: 1.12rem;
}

.landing-brand small {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.landing-topbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.landing-copy-card,
.landing-form-card {
  background: rgba(255,255,255,0.96);
  border-radius: 26px;
  box-shadow: 0 24px 56px rgba(18, 43, 78, 0.10);
  border: 1px solid rgba(219,229,241,0.9);
}

.landing-copy-card {
  padding: 42px 40px;
}

.landing-copy-card h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 760px;
}

.landing-lead {
  margin: 0 0 24px;
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.landing-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2f5fa9;
  font-weight: 700;
  font-size: 0.9rem;
}

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

.landing-feature-card {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.landing-feature-card strong {
  display: block;
  margin: 0 0 8px;
  font-size: 1rem;
}

.landing-feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.landing-form-card {
  padding: 26px 24px;
  position: sticky;
  top: 24px;
}

.landing-form-head {
  margin-bottom: 18px;
}

.landing-trial-form {
  gap: 18px;
}

.landing-form-note {
  border: 1px solid var(--line);
  background: #f8fbff;
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--muted);
  line-height: 1.6;
}

.landing-submit-btn {
  width: 100%;
  min-height: 48px;
}

@media (max-width: 1200px) {
  .landing-hero-grid {
    grid-template-columns: 1fr;
  }

  .landing-form-card {
    position: static;
  }
}

@media (max-width: 860px) {
  .landing-shell {
    padding: 18px;
  }

  .landing-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-topbar-actions {
    justify-content: stretch;
  }

  .landing-topbar-actions a {
    text-align: center;
  }

  .landing-copy-card,
  .landing-form-card {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }
}
.landing-body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(47, 128, 255, 0.10), transparent 28%),
    linear-gradient(180deg, #eef3fb 0%, #e4edf9 100%);
  color: var(--text);
}

.landing-shell {
  min-height: 100vh;
  padding: 26px;
}

.landing-hero {
  width: min(1400px, 100%);
  margin: 0 auto;
}

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

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.landing-brand-logo-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(18, 43, 78, 0.10);
  display: grid;
  place-items: center;
}

.landing-brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.landing-brand strong {
  display: block;
  font-size: 1.12rem;
}

.landing-brand small {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.landing-topbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.landing-copy-card,
.landing-form-card {
  background: rgba(255,255,255,0.96);
  border-radius: 26px;
  box-shadow: 0 24px 56px rgba(18, 43, 78, 0.10);
  border: 1px solid rgba(219,229,241,0.9);
}

.landing-copy-card {
  padding: 42px 40px;
}

.landing-copy-card h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 760px;
}

.landing-lead {
  margin: 0 0 24px;
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.landing-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2f5fa9;
  font-weight: 700;
  font-size: 0.9rem;
}

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

.landing-feature-card {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.landing-feature-card strong {
  display: block;
  margin: 0 0 8px;
  font-size: 1rem;
}

.landing-feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.landing-form-card {
  padding: 26px 24px;
  position: sticky;
  top: 24px;
}

.landing-form-head {
  margin-bottom: 18px;
}

.landing-trial-form {
  gap: 18px;
}

.landing-form-note {
  border: 1px solid var(--line);
  background: #f8fbff;
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--muted);
  line-height: 1.6;
}

.landing-submit-btn {
  width: 100%;
  min-height: 48px;
}

@media (max-width: 1200px) {
  .landing-hero-grid {
    grid-template-columns: 1fr;
  }

  .landing-form-card {
    position: static;
  }
}

@media (max-width: 860px) {
  .landing-shell {
    padding: 18px;
  }

  .landing-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-topbar-actions {
    justify-content: stretch;
  }

  .landing-topbar-actions a {
    text-align: center;
  }

  .landing-copy-card,
  .landing-form-card {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }
}

.login-brand-stack {
  text-align: center;
}

.login-product-name {
  display: block;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}

.trial-banner-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #fff5dd 0%, #ffffff 58%);
  border: 1px solid #f1d28b;
  border-radius: 24px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 18px 32px rgba(22, 50, 86, 0.08);
}

.trial-banner-card h2 {
  margin: 0 0 8px;
  color: #163256;
}

.trial-banner-copy {
  margin: 0;
  color: #5f6f86;
}

.trial-banner-meta {
  display: grid;
  gap: 10px;
  justify-items: end;
  color: #163256;
  text-align: right;
}

@media (max-width: 860px) {
  .trial-banner-card {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .trial-banner-meta {
    justify-items: start;
    text-align: left;
  }
}

.auth-panel-wide {
  max-width: 560px !important;
}

.auth-copy-block {
  margin-bottom: 18px;
  color: #5f6f86;
}

.auth-copy-block h1 {
  margin: 0 0 10px;
  color: #163256;
  font-size: 30px;
}

.auth-copy-block p {
  margin: 0;
  line-height: 1.6;
}

.auth-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.auth-info-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f5f8fd;
  border: 1px solid #d9e4f4;
  color: #163256;
}

.auth-secret-box {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff9ea;
  border: 1px solid #eed08f;
}

.auth-secret-box code,
.auth-debug-block a {
  word-break: break-all;
}

.auth-debug-block {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #eef5ff;
  border: 1px solid #bfd3f1;
  color: #163256;
}

@media (max-width: 760px) {
  .auth-info-grid {
    grid-template-columns: 1fr;
  }
}

.maintenance-hero-card {
  margin-bottom: 22px;
  padding: 34px 36px;
  border-radius: 30px;
  border: 1px solid rgba(226, 155, 65, 0.34);
  background:
    radial-gradient(circle at top right, rgba(255, 213, 132, 0.28), transparent 34%),
    linear-gradient(135deg, #fff4dc 0%, #fffaf1 46%, #ffffff 100%);
  box-shadow: 0 22px 40px rgba(22, 50, 86, 0.1);
}

.maintenance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(200, 122, 19, 0.12);
  color: #9a5806;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.maintenance-hero-card h1 {
  margin: 18px 0 14px;
  color: #163256;
  font-size: clamp(2.4rem, 4vw, 4.1rem);
  line-height: 1.05;
}

.maintenance-copy {
  margin: 0 0 22px;
  max-width: 900px;
  color: #53657e;
  font-size: 1.08rem;
  line-height: 1.8;
}

.maintenance-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.maintenance-meta-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(199, 214, 232, 0.9);
  color: #163256;
}

.maintenance-meta-card span {
  color: #5f6f86;
  line-height: 1.6;
}

.maintenance-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-secondary {
  padding-top: 24px;
}

.landing-secondary-intro {
  margin: 0 0 24px;
  padding: 0 6px;
}

.landing-secondary-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #5a7eb5;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-secondary-intro h2 {
  margin: 0 0 10px;
  color: #163256;
  font-size: 1.9rem;
}

.landing-secondary-intro p {
  margin: 0;
  color: #5f6f86;
  line-height: 1.7;
}

.maintenance-form-muted {
  opacity: 0.88;
}

.maintenance-form-muted input,
.maintenance-form-muted button {
  cursor: not-allowed;
}

@media (max-width: 960px) {
  .maintenance-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .maintenance-hero-card {
    padding: 24px 20px;
    border-radius: 24px;
  }

  .maintenance-actions {
    flex-direction: column;
  }

  .maintenance-actions a {
    text-align: center;
  }
}

.maintenance-hero-clean {
  padding: 36px 38px;
}

.maintenance-hero-grid-clean {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.maintenance-side-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(199, 214, 232, 0.9);
  color: #163256;
}

.maintenance-side-card p {
  margin: 0;
  color: #5f6f86;
  line-height: 1.7;
}

.landing-secondary-intro-compact {
  max-width: 820px;
  margin: 0 auto 24px;
  text-align: center;
}

.landing-hero-grid-compact {
  align-items: start;
}

.maintenance-summary-card {
  position: static;
}

.maintenance-summary-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.maintenance-summary-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f5f8fd;
  border: 1px solid #d9e4f4;
  color: #163256;
}

.maintenance-summary-item span {
  color: #5f6f86;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .maintenance-hero-grid-clean {
    grid-template-columns: 1fr;
  }
}

.auth-qr-shell {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.auth-qr-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #d9e4f4;
  justify-items: center;
}

.auth-qr-box {
  width: 220px;
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #dfe8f5;
}

.auth-qr-box img,
.auth-qr-box canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.auth-qr-help {
  color: #5f6f86;
  line-height: 1.5;
  text-align: center;
}

.auth-qr-fallback {
  display: grid;
  gap: 14px;
}

.auth-secret-box-muted span {
  color: #5f6f86;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .auth-qr-shell {
    grid-template-columns: 1fr;
  }

  .auth-qr-card {
    justify-items: stretch;
  }

  .auth-qr-box {
    margin: 0 auto;
  }
}

body.login-body.login-body-clean .login-panel.auth-panel-wide {
  width: min(100%, 1000px) !important;
  max-width: 1000px !important;
  min-width: 1000px !important;
  padding: 56px 58px 46px !important;
}

body.login-body.login-body-clean .login-panel.auth-panel-wide .auth-qr-shell {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 22px;
}

body.login-body.login-body-clean .login-panel.auth-panel-wide .auth-qr-box {
  width: 240px;
  min-height: 240px;
}

body.login-body.login-body-clean .login-panel.auth-panel-wide .auth-qr-box img,
body.login-body.login-body-clean .login-panel.auth-panel-wide .auth-qr-box canvas {
  max-width: 216px;
  max-height: 216px;
}

@media (max-width: 1100px) {
  body.login-body.login-body-clean .login-panel.auth-panel-wide {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
    min-width: 0 !important;
    padding: 42px 34px 34px !important;
  }
}

@media (max-width: 760px) {
  body.login-body.login-body-clean .login-panel.auth-panel-wide {
    width: min(100%, 430px) !important;
    max-width: 430px !important;
    min-width: 0 !important;
    padding: 30px 22px 24px !important;
  }

  body.login-body.login-body-clean .login-panel.auth-panel-wide .auth-qr-shell {
    grid-template-columns: 1fr;
  }
}

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

.inline-action-form .ghost-btn,
.inline-action-form .primary-btn {
  margin: 0;
}
.device-section-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.device-section-nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #f1f6fe;
  border: 1px solid #d7e4f5;
  color: #163256;
  font-weight: 600;
  text-decoration: none;
}

.device-section-nav a:hover {
  background: #e7f0fc;
}

#deviceDetailPage code {
  word-break: break-all;
  white-space: normal;
}

@media (max-width: 760px) {
  .device-section-nav {
    flex-direction: column;
  }

  .device-section-nav a {
    justify-content: center;
  }
}

.device-update-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.nested-content-card {
  border: 1px solid rgba(30, 63, 117, 0.12);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1100px) {
  .device-update-grid {
    grid-template-columns: 1fr;
  }
}


.device-section-nav a.active {
  background: #163256;
  color: #ffffff;
  border-color: #163256;
}

