[v-cloak] { display: none; }

:root {
  --sidebar-width: 310px;
  --night-1: #031528;
  --night-2: #07365b;
  --night-3: #0b7fb1;
  --cyan: #23d7f2;
  --cyan-2: #0fa9de;
  --cyan-soft: #dff8ff;
  --blue: #0a6fa6;
  --blue-deep: #0a3151;
  --page-bg: #eef7fb;
  --card: #ffffff;
  --card-soft: #f7fbfe;
  --text: #102033;
  --muted: #5f7488;
  --line: #d7eaf3;
  --line-strong: #c7e0eb;
  --shadow: 0 18px 46px rgba(9, 72, 112, 0.11);
  --shadow-strong: 0 26px 60px rgba(3, 31, 58, 0.18);
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(35, 215, 242, 0.14), transparent 22%),
    radial-gradient(circle at left 18%, rgba(11, 127, 177, 0.09), transparent 30%),
    var(--page-bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: #0a7eaf;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(15, 169, 222, 0.28);
  outline-offset: 2px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 22px 18px 16px;
  overflow-y: auto;
  color: #fff;
  background:
    radial-gradient(circle at 15% 0%, rgba(35, 215, 242, 0.24), transparent 30%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 60%, var(--night-3) 100%);
  box-shadow: 12px 0 38px rgba(3, 30, 57, 0.26);
}

.sidebar-backdrop {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 4px 4px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.brand-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong {
  display: block;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  opacity: 0.82;
  letter-spacing: 0.2px;
}

.logo,
.login-logo {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #79f0ff, #1ccbe6);
  color: #043257;
  font-weight: 950;
  letter-spacing: -0.5px;
  box-shadow: 0 12px 26px rgba(0, 205, 255, 0.24);
}

.logo {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 17px;
}

.login-logo {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  font-size: 21px;
}

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

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-group-label {
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.08px;
  text-transform: uppercase;
}

.nav-btn {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 9px 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.94);
  text-align: left;
  font-size: 15px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-btn:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.nav-btn.active {
  border-color: rgba(255, 255, 255, 0.34);
  background: linear-gradient(135deg, #0ba9df, #1bd1ea);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 174, 224, 0.3);
}

.nav-icon {
  display: grid;
  flex: 0 0 46px;
  min-width: 46px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  color: #e5fbff;
  font-size: 10.5px;
  font-weight: 950;
  letter-spacing: 0.2px;
}

.nav-btn.active .nav-icon {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(3, 53, 84, 0.2);
  color: #fff;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-meta {
  margin-left: auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 900;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 18px 8px 2px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12.5px;
}

.connection-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffcf59;
  box-shadow: 0 0 0 4px rgba(255, 207, 89, 0.12);
}

.connection-dot.online {
  background: #4ee79b;
  box-shadow: 0 0 0 4px rgba(78, 231, 155, 0.12);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #fff;
}

.main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 26px;
}

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

.topbar-copy {
  min-width: 0;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #0588bc;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.28px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.7px;
}

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

.top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  background: #fff;
  color: #8a6411;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(11, 83, 126, 0.06);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffc94c;
}

.status-pill.connected {
  color: #0877ad;
}

.status-pill.connected .status-dot {
  background: #30d58a;
  box-shadow: 0 0 0 4px rgba(48, 213, 138, 0.13);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.primary,
.ghost,
.danger-button,
.table-btn,
.link-button {
  border-radius: 13px;
  padding: 11px 16px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.primary {
  border: 0;
  background: linear-gradient(135deg, #079dd6, #16c8e3);
  color: #fff;
  box-shadow: 0 9px 20px rgba(6, 159, 213, 0.2);
}

.primary:hover,
.link-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.ghost {
  border: 1px solid #cfe0ed;
  background: #eef7fd;
  color: #12334e;
}

.ghost:hover {
  background: #e3f2fb;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.danger-button {
  width: 100%;
  margin-top: 16px;
  border: 1px solid #fecaca;
  background: #fff1f1;
  color: #a42020;
}

button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none !important;
}

.login-card {
  display: grid;
  max-width: 690px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 45px;
}

.login-card h2 {
  margin: 0 0 6px;
  font-size: 25px;
}

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

.login-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input,
select {
  min-width: 0;
  border: 1px solid #cfe4ef;
  border-radius: 13px;
  padding: 13px 15px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  outline: none;
}

input:focus,
select:focus {
  border-color: #19bfe1;
  box-shadow: 0 0 0 4px rgba(25, 191, 225, 0.12);
}

.alert {
  margin: 12px 0;
  border-radius: 13px;
  padding: 12px 14px;
  font-weight: 800;
}

.alert.error {
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.alert.ok {
  border: 1px solid #9ae6b4;
  background: #e7faee;
  color: #166534;
}

.global-alert {
  position: relative;
  z-index: 4;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  gap: 24px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 26px;
  padding: 26px;
  background:
    radial-gradient(circle at 86% 20%, rgba(69, 234, 255, 0.34), transparent 25%),
    linear-gradient(135deg, #063a67, #0b86b3);
  color: #fff;
  box-shadow: var(--shadow-strong);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 62%);
  pointer-events: none;
}

.hero-copy {
  max-width: 880px;
}

.hero-kicker {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 1px;
  opacity: 0.82;
  text-transform: uppercase;
}

.dashboard-hero h2 {
  margin: 6px 0 7px;
  font-size: clamp(28px, 3vw, 37px);
}

.dashboard-hero p {
  margin: 0;
  max-width: 760px;
  opacity: 0.9;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 780;
}

.hero-actions {
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.dashboard-hero .primary {
  background: #fff;
  color: #076a98;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.dashboard-hero .hero-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.grid {
  display: grid;
  gap: 15px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 128px;
}

.stat-icon {
  display: grid;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #e7f9ff, #d5f4fb);
  color: #0879a8;
  font-size: 12px;
  font-weight: 950;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.stat-card strong {
  display: block;
  margin: 3px 0;
  color: #064d85;
  font-size: 34px;
  line-height: 1;
}

.stat-card small {
  color: #6d8092;
}

.dashboard-sections {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.workshop-section {
  padding: 20px;
}

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

.section-head.compact {
  margin-bottom: 15px;
}

.section-head h2,
.module-toolbar h2 {
  margin: 0 0 5px;
  font-size: 21px;
}

.section-head p,
.module-toolbar p {
  margin: 0;
  color: var(--muted);
}

.section-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #0b7eb0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
  background: #ebf9ff;
  color: #086f9b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

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

.action-card {
  display: grid;
  position: relative;
  overflow: hidden;
  min-height: 146px;
  align-content: start;
  gap: 8px;
  border: 1px solid #dceef6;
  border-radius: 18px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.action-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(35, 215, 242, 0.95), rgba(255, 255, 255, 0));
  opacity: 0.8;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(8, 111, 160, 0.1);
}

.action-card strong {
  font-size: 15px;
  line-height: 1.35;
}

.action-card small {
  color: var(--muted);
  line-height: 1.45;
}

.action-icon {
  display: grid;
  width: 44px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  font-size: 10.5px;
  font-weight: 950;
  letter-spacing: 0.25px;
}

.action-tag {
  margin-top: auto;
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
}

.tone-cyan {
  border-color: #bfeaf4;
  background: linear-gradient(145deg, #ffffff, #f2fbff);
}

.tone-cyan .action-icon,
.tone-cyan .action-tag {
  background: #dff8ff;
  color: #046f99;
}

.tone-blue {
  border-color: #d4e7f1;
  background: linear-gradient(145deg, #fbfdff, #f0f7fd);
}

.tone-blue .action-icon,
.tone-blue .action-tag {
  background: #eaf4fb;
  color: #0a5f88;
}

.tone-dark {
  border-color: rgba(5, 63, 96, 0.12);
  background: linear-gradient(145deg, #0b3659, #0c5a89);
  color: #fff;
}

.tone-dark small {
  color: rgba(255, 255, 255, 0.82);
}

.tone-dark .action-icon,
.tone-dark .action-tag {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.tone-light {
  border-color: #e3edf3;
  background: linear-gradient(145deg, #ffffff, #f7fbfe);
}

.tone-light .action-icon,
.tone-light .action-tag {
  background: #eef7fb;
  color: #35556d;
}

.tone-amber {
  border-color: #f3e2b4;
  background: linear-gradient(145deg, #fffdf7, #fff6de);
}

.tone-amber .action-icon,
.tone-amber .action-tag {
  background: #fff0c9;
  color: #8a5b00;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-support-grid {
  align-items: start;
}

.system-list {
  display: grid;
  gap: 0;
}

.system-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid #e6f1f6;
}

.system-list > div:last-child {
  border-bottom: 0;
}

.system-list span {
  color: var(--muted);
}

.ok-text {
  color: #14804a;
}

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

.fun-panel {
  background:
    radial-gradient(circle at top right, rgba(35, 215, 242, 0.11), transparent 28%),
    #ffffff;
}

.workflow-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #deedf4;
  border-radius: 16px;
  padding: 12px 13px;
  background: var(--card-soft);
}

.workflow-chip {
  display: grid;
  width: 44px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: #dff7fc;
  color: #087ca8;
  font-size: 10px;
  font-weight: 950;
}

.workflow-item strong,
.workflow-item small {
  display: block;
}

.workflow-item small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.workflow-item b {
  color: #0a5a84;
  font-size: 22px;
}

.module-section {
  min-width: 0;
}

.module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
  padding: 17px 19px;
}

.module-actions,
.view-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.view-switch {
  border: 1px solid #d6eaf3;
  border-radius: 13px;
  padding: 4px;
  background: #f2f9fc;
}

.view-switch button {
  border: 0;
  border-radius: 9px;
  padding: 9px 12px;
  background: transparent;
  color: #4c6578;
  font-weight: 800;
  cursor: pointer;
}

.view-switch button.active {
  background: #fff;
  color: #057fae;
  box-shadow: 0 4px 12px rgba(8, 91, 132, 0.1);
}

.frame-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #cfe4ef;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  min-height: calc(100vh - 190px);
}

.frame-card iframe {
  display: block;
  width: 100%;
  min-height: calc(100vh - 190px);
  border: 0;
  background: #fff;
}

.frame-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: #f7fbfd;
  color: var(--muted);
  font-size: 14px;
}

.frame-inline-actions > div {
  display: flex;
  gap: 8px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 12px;
  margin-bottom: 12px;
}

.filters.one-column {
  grid-template-columns: 1fr;
}

.ticket-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.clear-filter {
  border: 0;
  background: transparent;
  color: #087ba9;
  font-weight: 800;
  cursor: pointer;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #e1eef4;
  border-radius: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3fbff;
  color: #526d81;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid #e5f1f7;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f9fdff;
}

tr.muted {
  background: #f5f6f7;
  opacity: 0.68;
}

.cell-panne {
  min-width: 220px;
  max-width: 410px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  background: #e7f4ff;
  color: #086899;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.b-ok {
  background: #e8f8ef;
  color: #13743a;
}

.b-info {
  background: #e6f4ff;
  color: #075f94;
}

.b-warn {
  background: #fff4d8;
  color: #8a5b00;
}

.b-danger {
  background: #ffe8e8;
  color: #a62222;
}

.b-muted {
  background: #e5e7eb;
  color: #374151;
}

.actions {
  white-space: nowrap;
}

.actions button,
.table-btn {
  margin-right: 5px;
  border: 1px solid #cfe4ef;
  background: #fff;
  color: #14354e;
  padding: 8px 10px;
}

.actions button:hover,
.table-btn:hover {
  border-color: #8dd7e9;
  background: #eefaff;
}

.count-badge {
  display: inline-grid;
  min-width: 34px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: #e5f8fc;
  color: #087da7;
  font-weight: 900;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 16px;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 7px;
}

.bar-item span {
  color: #445f73;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8f3f7;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0aa7df, #1bd4eb);
}

.ranking-list {
  display: grid;
}

.ranking-list > div {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid #e8f1f5;
}

.rank {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: #e5f7fc;
  color: #087ca8;
  font-weight: 900;
}

.muted-text {
  color: var(--muted);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.full-width {
  grid-column: 1 / -1;
}

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

.endpoint-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px;
  border: 1px solid #e0eef4;
  border-radius: 14px;
  background: #f9fdff;
}

.endpoint-list strong,
.endpoint-list small {
  display: block;
}

.endpoint-list small {
  margin-top: 3px;
  color: var(--muted);
}

.endpoint-list a {
  border-radius: 10px;
  padding: 8px 11px;
  background: #e5f8fc;
  font-weight: 850;
  text-decoration: none;
}

.module-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.module-status-grid > div {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 11px;
  border: 1px solid #dfedf3;
  border-radius: 15px;
  padding: 13px;
  background: #f9fdff;
}

.module-status-grid > div > span {
  display: grid;
  width: 42px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #dff7fc;
  color: #087ca8;
  font-size: 10px;
  font-weight: 950;
}

.module-status-grid strong,
.module-status-grid small {
  display: block;
}

.module-status-grid small {
  margin-top: 3px;
  color: var(--muted);
}

.module-status-grid b {
  color: #16804b;
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(5, 28, 46, 0.64);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: 24px;
  padding: 25px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
}

.modal-box h2 {
  margin: 4px 42px 20px 0;
  font-size: 24px;
}

.modal-kicker {
  color: #0784b2;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 1.1px;
}

.close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #eef7fb;
  color: #25465d;
  font-size: 24px;
  cursor: pointer;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-grid p {
  display: grid;
  gap: 5px;
  margin: 0;
  border: 1px solid #e1eef4;
  border-radius: 14px;
  padding: 13px;
  background: #fbfeff;
}

.detail-grid p.wide {
  grid-column: 1 / -1;
}

.detail-grid strong {
  color: #5a7285;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.detail-grid span {
  overflow-wrap: anywhere;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 17px;
}

.client-contact {
  margin-top: -10px;
  color: var(--muted);
}

.client-stats-grid {
  margin: 18px 0 10px;
}

.table-subline {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.client-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ghost-table-btn {
  background: #f4fbff;
  color: #0b638f;
}

.client-detail-grid {
  margin-top: 18px;
}

.client-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.client-devices {
  margin-top: 24px;
}

.client-device-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.client-device-card {
  display: grid;
  gap: 4px;
  border: 1px solid #dceaf1;
  border-radius: 14px;
  padding: 14px;
  background: #fbfeff;
}

.client-device-card small {
  color: var(--muted);
}

.client-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.client-history-card {
  border: 1px solid #dceaf1;
  border-radius: 16px;
  padding: 16px;
  background: #fbfeff;
}

.muted-history-card {
  background: linear-gradient(180deg, #fbfeff, #f5fbfe);
}

.client-history-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.client-history-pills span {
  padding: 9px 12px;
  border-radius: 999px;
  background: #eef8fd;
  color: #0b638f;
  font-weight: 800;
}

.client-ticket-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.client-ticket-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid #dceaf1;
  border-radius: 13px;
  padding: 12px;
  background: #fbfeff;
  text-align: left;
  cursor: pointer;
}

.client-ticket-list strong,
.client-ticket-list small {
  display: block;
}

.client-ticket-list small {
  margin-top: 3px;
  color: var(--muted);
}

.client-history-cta {
  margin-top: 16px;
}

.frame-loading {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px dashed #b9dff0;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7fcff, #edf8fd);
  color: #076b9e;
  font-size: 16px;
  font-weight: 900;
}

.frame-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(247, 252, 255, 0.96), rgba(237, 248, 253, 0.92)),
    #edf8fd;
  backdrop-filter: blur(2px);
}

.frame-loading-rich {
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 26px;
  text-align: center;
}

.frame-loading-rich strong {
  font-size: 18px;
  color: #0a5278;
}

.frame-loading-rich small {
  max-width: 440px;
  color: #2d6b86;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.frame-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(10, 112, 166, 0.16);
  border-top-color: #0a8fd4;
  animation: frameSpin 0.9s linear infinite;
}

.frame-feedback {
  position: absolute;
  inset: 18px;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  border-radius: 18px;
}

.frame-feedback p {
  max-width: 520px;
  margin: 0;
  color: #3a5f73;
  line-height: 1.5;
}

.frame-feedback-error {
  background: rgba(255, 250, 250, 0.98);
  border: 1px solid rgba(194, 74, 90, 0.18);
  box-shadow: 0 18px 42px rgba(7, 31, 58, 0.14);
}

.frame-feedback-error strong {
  color: #8d2435;
}

.frame-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.nav-btn:disabled,
.action-card:disabled,
.top-actions button:disabled,
.frame-loading-rich button:disabled,
.frame-feedback button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

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

button.link-button {
  font: inherit;
}

@media (max-width: 1240px) {
  :root {
    --sidebar-width: 258px;
  }

  .sidebar {
    padding: 18px 13px;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .nav-btn {
    min-height: 50px;
    gap: 9px;
    padding: 7px 8px;
    font-size: 14.5px;
  }

  .nav-icon {
    flex-basis: 41px;
    min-width: 41px;
  }

  .main {
    padding: 21px;
  }

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

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

  .client-history-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid,
  .analytics-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 800px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    max-height: 100vh;
    padding: 10px 13px;
    overflow: visible;
    box-shadow: 0 8px 24px rgba(3, 32, 61, 0.24);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    border: 0;
    background: rgba(4, 24, 42, 0.35);
  }

  .brand {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .logo {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .brand-copy span {
    margin-top: 2px;
    font-size: 12px;
  }

  .menu-toggle {
    display: flex;
  }

  .sidebar-nav {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 65px);
    padding: 12px 13px 18px;
    overflow-y: auto;
    background: linear-gradient(180deg, #06385f, #064d79 70%, #075f8d);
    box-shadow: 0 18px 28px rgba(3, 32, 61, 0.28);
  }

  .sidebar.is-open .sidebar-nav {
    display: grid;
  }

  .sidebar-footer {
    display: none;
  }

  .nav-btn {
    min-height: 48px;
    border-radius: 13px;
    font-size: 15px;
  }

  .main {
    margin-left: 0;
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: auto;
  }

  .frame-card iframe {
    min-height: 72vh;
  }

  .module-status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .main {
    padding: 12px;
  }

  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .top-actions,
  .top-actions > *,
  .module-actions,
  .module-actions > * {
    width: 100%;
  }

  .status-pill,
  .top-actions .ghost,
  .top-actions .primary,
  .module-actions > * {
    justify-content: center;
    text-align: center;
  }

  .login-card {
    grid-template-columns: 1fr;
    margin-top: 18px;
    text-align: center;
  }

  .login-logo {
    margin: 0 auto;
  }

  .login-row {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 108px;
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .card {
    border-radius: 18px;
    padding: 16px;
  }

  .workshop-section {
    padding: 16px;
  }

  .module-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 15px;
  }

  .view-switch {
    width: 100%;
  }

  .view-switch button {
    flex: 1;
  }

  .frame-inline-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .frame-inline-actions > div {
    width: 100%;
  }

  .client-quick-actions,
  .client-actions-cell {
    flex-direction: column;
  }

  .client-device-list {
    grid-template-columns: 1fr;
  }

  .frame-inline-actions a,
  .frame-inline-actions button {
    flex: 1;
    text-align: center;
  }

  th,
  td {
    padding: 10px;
  }

  .actions {
    white-space: normal;
  }

  .actions button {
    margin-bottom: 5px;
  }

  .workflow-item,
  .module-status-grid > div {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid p.wide {
    grid-column: auto;
  }

  .modal {
    padding: 10px;
  }

  .modal-box {
    max-height: calc(100vh - 20px);
    border-radius: 18px;
    padding: 18px;
  }

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

  .modal-actions button {
    width: 100%;
  }

  .endpoint-list > div {
    align-items: flex-start;
    flex-direction: column;
  }
}
