:root {
  --bg: #0a0b0f;
  --surface: #12141a;
  --surface-2: #1a1c24;
  --surface-3: #20232d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(37, 99, 235, 0.28);
  --text: #f8f9fc;
  --muted: #9ca3af;
  --muted-soft: #6b7280;
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.14);
  --purple: #8b5cf6;
  --purple-soft: rgba(139, 92, 246, 0.14);
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.14);
  --amber: #eab308;
  --amber-soft: rgba(234, 179, 8, 0.14);
  --pink: #ec4899;
  --pink-soft: rgba(236, 72, 153, 0.14);
  --slate-soft: rgba(148, 163, 184, 0.18);
  --shadow: 0 10px 15px rgba(0, 0, 0, 0.18), 0 4px 6px rgba(0, 0, 0, 0.12);
  --radius-xl: 18px;
  --radius-lg: 16px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --topbar-height: 64px;
  --sidebar-width: 256px;
  --sidebar-collapsed: 88px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0a0b0f 0%, #0a0b0f 100%);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.surface-glow {
  position: fixed;
  inset: auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.surface-glow-left {
  top: 120px;
  left: -120px;
  background: #2563eb;
}

.surface-glow-right {
  top: 20px;
  right: -120px;
  background: #8b5cf6;
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  background: #12141a;
  border-bottom: 1px solid var(--border);
}

.topbar-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.topbar-group-right {
  justify-content: flex-end;
}

.sidebar-toggle,
.topbar-icon,
.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.topbar-icon {
  position: relative;
}

.sidebar-toggle:hover,
.topbar-icon:hover,
.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.sidebar-toggle svg,
.topbar-icon svg {
  width: 20px;
  height: 20px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white;
  box-shadow: none;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  font-size: 1.02rem;
  line-height: 1.15;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.2;
}

.trend-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.82rem;
}

.trend-chip.up {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.42);
}

.trend-chip.down {
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.4);
}

.trend-chip.stable {
  color: var(--muted);
}

.notification-count {
  position: absolute;
  margin-top: -16px;
  margin-left: 16px;
  min-width: 18px;
  height: 18px;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.2rem 0.45rem 0.2rem 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-weight: 700;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-meta strong {
  font-size: 0.88rem;
}

.user-meta small {
  color: var(--muted);
  font-size: 0.76rem;
}

.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  z-index: 40;
  width: var(--sidebar-width);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #12141a;
  border-right: 1px solid var(--border);
  transition: width 0.24s ease, transform 0.24s ease, padding 0.24s ease;
  overflow: hidden;
}

.sidebar-nav {
  display: grid;
  gap: 0.35rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 46px;
  padding: 0.72rem 0.85rem;
  border-radius: 12px;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(37, 99, 235, 0.1);
  color: #60a5fa;
  border-color: rgba(37, 99, 235, 0.3);
}

.sidebar-link__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-link__icon svg {
  width: 20px;
  height: 20px;
}

.sidebar-link__label {
  font-size: 0.92rem;
  font-weight: 500;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 0.8rem;
}

.sidebar-status-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.sidebar-status-card__label {
  color: #93c5fd;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-status-card strong {
  font-size: 0.92rem;
  line-height: 1.35;
}

.sidebar-status-card small {
  color: var(--muted);
  line-height: 1.4;
}

.sidebar-footer__link {
  color: var(--muted);
  font-size: 0.86rem;
}

.sidebar-footer__link:hover {
  color: var(--text);
}

.main-panel {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: calc(var(--topbar-height) + 1.5rem) 1.5rem 1.5rem;
  transition: margin-left 0.24s ease;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.page-header__copy {
  display: grid;
  gap: 0.35rem;
  max-width: 720px;
}

.page-kicker {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-header h1,
.modal-header h3,
.content-card h2,
.subcard h3 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.2rem);
  line-height: 1.1;
  font-weight: 600;
}

.page-header__copy p,
.content-card__header p,
.metric-card__meta,
.section-copy,
.subcard__header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.page-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.ghost-button,
.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.72rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.primary-button {
  background: var(--blue);
  color: white;
  box-shadow: none;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #155dfc;
}

.secondary-button,
.ghost-button {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border);
  color: var(--text);
}

.secondary-button:hover,
.ghost-button:hover,
.card-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ghost-button.small {
  min-height: 38px;
  padding: 0.6rem 0.9rem;
  font-size: 0.84rem;
}

.card-link {
  color: #93c5fd;
  padding-inline: 0;
  min-height: auto;
  background: none;
}

.metric-grid,
.content-grid,
.settings-layout {
  display: grid;
  gap: 1.25rem;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.metric-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.metric-card,
.content-card,
.subcard,
.modal-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.metric-card {
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: grid;
  gap: 0.55rem;
}

.metric-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

.metric-card__icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.metric-card__icon--blue {
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.12);
}

.metric-card__icon--green {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.metric-card__icon--purple {
  background: var(--purple);
  box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.12);
}

.metric-card__icon--amber {
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12);
}

.metric-card__icon--pink {
  background: var(--pink);
  box-shadow: 0 0 0 6px rgba(236, 72, 153, 0.12);
}

.metric-card__icon--slate {
  background: #94a3b8;
  box-shadow: 0 0 0 6px rgba(148, 163, 184, 0.12);
}

.metric-card__value {
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
}

.content-card {
  border-radius: var(--radius-xl);
  padding: 1.25rem;
}

.content-card--compact {
  align-content: start;
}

.content-card__header,
.subcard__header,
.modal-header,
.filter-toolbar,
.toolbar-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.content-card__header {
  margin-bottom: 1rem;
}

.content-card__header h2,
.subcard__header h3 {
  font-size: 1.1rem;
  line-height: 1.3;
}

.content-grid--double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.content-grid--sessions {
  grid-template-columns: minmax(320px, 0.95fr) minmax(380px, 1.05fr);
  margin-bottom: 1.25rem;
}

.content-grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filter-card {
  margin-bottom: 1.25rem;
}

.filter-toolbar {
  align-items: end;
}

.filter-toolbar--tabs {
  align-items: center;
}

.field-group {
  display: grid;
  gap: 0.38rem;
  min-width: 0;
}

.field-group label,
.live-controls label,
.toggle {
  font-size: 0.86rem;
  color: var(--muted);
}

.field-group--search {
  flex: 1;
}

.field-group--compact {
  min-width: 220px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.78rem 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(59, 130, 246, 0.48);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

textarea {
  resize: vertical;
}

.entity-list,
.session-list,
.reservation-list,
.mini-stat-list,
.item-list,
.toggle-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.entity-row,
.reservation-card,
.session-card,
.device-card,
.mini-stat,
.item-list li {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.entity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
}

.entity-row__content {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.entity-row__content strong {
  font-size: 0.98rem;
}

.entity-row__content small,
.item-meta,
.muted {
  color: var(--muted);
}

.entity-row__aside {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge,
.status-chip,
.nx-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  border: 1px solid transparent;
}

.badge.online,
.status-chip.online,
.status-chip.aprovada,
.badge.aprovada {
  background: var(--green-soft);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.2);
}

.badge.active,
.status-chip.active {
  background: var(--blue-soft);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.32);
}

.badge.em_uso,
.status-chip.scheduled,
.badge.scheduled,
.status-chip.pendente,
.badge.pendente {
  background: var(--amber-soft);
  color: #fde68a;
  border-color: rgba(234, 179, 8, 0.28);
}

.badge.offline,
.badge.finished,
.status-chip.finished,
.badge.gray {
  background: var(--slate-soft);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.18);
}

.badge.manutencao,
.status-chip.cancelled,
.badge.cancelled,
.status-chip.rejeitada,
.badge.rejeitada {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.2);
}

.device-grid-section {
  margin-bottom: 1.25rem;
}

.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.device-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.device-card:hover,
.session-card:hover,
.reservation-card:hover {
  border-color: rgba(59, 130, 246, 0.28);
  transform: translateY(-2px);
}

.device-card__visual {
  position: relative;
  min-height: 180px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(139, 92, 246, 0.16));
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.device-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-card__pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 60%);
}

.device-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 11, 15, 0.04), rgba(10, 11, 15, 0.72));
}

.device-card__thumb {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 11, 15, 0.7);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
}

.device-card__badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 1;
}

.device-card__header,
.device-card__meta,
.reservation-card__meta,
.session-card__meta {
  display: grid;
  gap: 0.24rem;
}

.device-card__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.device-card__title h3 {
  margin: 0;
  font-size: 1rem;
}

.device-card__description {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.device-card__meta-list,
.device-card__specs,
.spec-grid {
  display: grid;
  gap: 0.65rem;
}

.device-card__meta-list {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.device-meta-chip,
.device-card__spec,
.spec-item {
  display: grid;
  gap: 0.3rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.device-meta-chip {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.device-card__spec small,
.spec-item span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.device-card__spec strong,
.spec-item strong {
  font-size: 0.9rem;
  line-height: 1.35;
}

.device-card__actions,
.reservation-card__actions,
.session-card__actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.device-card__actions > button,
.session-card__actions > button {
  flex: 1 1 160px;
}

.device-detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.device-detail-hero__visual {
  position: relative;
  min-height: 240px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(139, 92, 246, 0.16));
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.device-detail-hero__content {
  display: grid;
  align-content: start;
}

.reservation-list,
.session-list {
  gap: 1rem;
}

.reservation-card,
.session-card {
  padding: 1.05rem;
}

.reservation-card__top,
.session-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.reservation-card__window,
.session-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.session-card.selected {
  border-color: rgba(59, 130, 246, 0.34);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.session-summary-card,
.admin-hero-card,
.admin-section {
  margin-bottom: 1.25rem;
}

.session-summary-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: 1rem;
}

.session-subsection {
  background: rgba(255, 255, 255, 0.02);
}

.session-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.session-highlight {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.session-highlight span {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.session-highlight strong {
  font-size: 0.94rem;
  line-height: 1.35;
}

.control-stack {
  display: grid;
  gap: 1rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0;
}

.meta-grid div,
.mini-stat {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.meta-grid dt {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.meta-grid dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.subcard {
  border-radius: 18px;
  padding: 1rem;
}

.subcard__header {
  margin-bottom: 0.9rem;
}

.stacked-form {
  display: grid;
  gap: 0.9rem;
}

.command-form {
  margin-top: 0.95rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.command-feedback {
  margin-top: 0.9rem;
  min-height: 42px;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.command-feedback.is-info {
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
}

.command-feedback.is-success {
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
}

.command-feedback.is-error {
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
  background: rgba(244, 63, 94, 0.1);
}

.live-controls {
  display: flex;
  align-items: end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.telemetry-stream {
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(10, 11, 15, 0.45);
}

.telemetry-entry {
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.telemetry-entry__header {
  margin-bottom: 0.65rem;
}

.telemetry-entry__header strong {
  display: block;
}

.telemetry-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}

.telemetry-field {
  display: grid;
  gap: 0.25rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 11, 15, 0.45);
}

.telemetry-field span {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.telemetry-field strong {
  color: #dbeafe;
  font-size: 0.88rem;
  line-height: 1.35;
}

.telemetry-entry pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #dbeafe;
}

.session-event-list {
  display: grid;
  gap: 0.7rem;
}

.session-event {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.session-event__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.session-event__header strong {
  font-size: 0.9rem;
}

.session-event__header span {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.session-event--success {
  border-color: rgba(34, 197, 94, 0.25);
}

.session-event--warn {
  border-color: rgba(234, 179, 8, 0.25);
}

.session-event--error {
  border-color: rgba(244, 63, 94, 0.28);
}

.admin-section--priority {
  border-color: rgba(234, 179, 8, 0.34);
  box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.14);
}

.admin-section--secondary {
  opacity: 0.9;
}

.admin-reservation-card--pendente {
  border-color: rgba(234, 179, 8, 0.28);
}

.admin-reservation-card--aprovada {
  border-color: rgba(34, 197, 94, 0.2);
}

.admin-reservation-card--rejeitada {
  border-color: rgba(244, 63, 94, 0.2);
}

.admin-reservation-card .reservation-card__actions > button {
  flex: 1 1 150px;
}

.admin-access-code strong {
  color: #bbf7d0;
  letter-spacing: 0.04em;
}

.mini-stat-list {
  gap: 0.7rem;
}

.mini-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.mini-stat span {
  color: var(--muted);
  font-size: 0.88rem;
}

.mini-stat strong {
  font-size: 0.96rem;
}

.chart-area {
  min-height: 290px;
  display: grid;
  align-items: center;
}

.chart-shell,
.status-bars,
.status-bar-row,
.line-chart__footer {
  display: grid;
}

.chart-shell {
  gap: 0.9rem;
}

.line-chart {
  width: 100%;
  min-height: 240px;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.line-chart svg {
  width: 100%;
  height: 220px;
  overflow: visible;
}

.line-chart__grid line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-dasharray: 4 4;
}

.line-chart__area {
  fill: url(#weeklyAreaGradient);
}

.line-chart__path {
  fill: none;
  stroke: #60a5fa;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart__point {
  fill: #60a5fa;
  stroke: #0f172a;
  stroke-width: 3;
}

.line-chart__label {
  fill: var(--muted);
  font-size: 11px;
  text-anchor: middle;
}

.line-chart__value {
  fill: #dbeafe;
  font-size: 11px;
  text-anchor: middle;
}

.line-chart__footer {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.status-bars {
  gap: 0.85rem;
}

.status-bar-row {
  gap: 0.45rem;
}

.status-bar-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.status-bar-row__label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.status-dot.online {
  background: var(--green);
}

.status-dot.em_uso {
  background: var(--blue);
}

.status-dot.offline {
  background: #94a3b8;
}

.status-dot.manutencao {
  background: #f43f5e;
}

.status-bar-row__track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.simulation-panel .sim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.simulation-panel .panel-section:last-child {
  margin-bottom: 0;
}

.simulation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: flex-end;
}

.sim-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  margin: 0;
}

.sim-meta dt {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.2rem;
}

.sim-meta dd {
  margin: 0;
  font-weight: 600;
}

.timeline-stream {
  max-height: 320px;
  background: rgba(0, 0, 0, 0.35);
}

.timeline-entry {
  border-left: 3px solid transparent;
  padding: 0.4rem 0 0.6rem 0.8rem;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-entry:last-child {
  border-bottom: none;
}

.timeline-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.timeline-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-message {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.timeline-entry pre {
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.4);
  font-size: 0.75rem;
  line-height: 1.4;
  max-height: 160px;
  overflow: auto;
}

.timeline-entry.variant-success {
  border-left-color: rgba(0, 128, 55, 0.7);
}

.timeline-entry.variant-success .timeline-badge {
  background: rgba(0, 128, 55, 0.2);
  color: #4dff9c;
}

.timeline-entry.variant-info {
  border-left-color: rgba(255, 255, 255, 0.25);
}

.timeline-entry.variant-info .timeline-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.timeline-entry.variant-warn {
  border-left-color: rgba(245, 165, 36, 0.8);
}

.timeline-entry.variant-warn .timeline-badge {
  background: rgba(245, 165, 36, 0.25);
  color: #ffd27a;
}

.timeline-entry.variant-error {
  border-left-color: rgba(194, 0, 37, 0.8);
}

.timeline-entry.variant-error .timeline-badge {
  background: rgba(194, 0, 37, 0.25);
  color: #ff9aac;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.section-header h4 {
  margin: 0;
}

.section-header p {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-bar-row__fill {
  height: 100%;
  border-radius: inherit;
}

.status-bar-row__fill.online {
  background: linear-gradient(90deg, #22c55e, #86efac);
}

.status-bar-row__fill.em_uso {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.status-bar-row__fill.offline {
  background: linear-gradient(90deg, #64748b, #cbd5e1);
}

.status-bar-row__fill.manutencao {
  background: linear-gradient(90deg, #f43f5e, #fda4af);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tabs--wide {
  margin-bottom: 1.25rem;
}

.tab-button {
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tab-button.active {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.3);
  color: #dbeafe;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.settings-layout {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.toggle-list {
  gap: 1rem;
}

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.item-list li {
  padding: 1rem 1.05rem;
  color: var(--muted);
  line-height: 1.55;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

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

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.empty-state--card {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.empty-state--centered {
  text-align: center;
  margin-bottom: 1rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.72);
}

.modal.is-open {
  display: flex;
}

.modal-dialog {
  width: min(760px, 100%);
  border-radius: 24px;
  overflow: hidden;
}

.modal-dialog--wide {
  width: min(820px, 100%);
}

.modal-header,
.modal-footer,
.modal-body {
  padding: 1.1rem 1.25rem;
}

.modal-header {
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.3rem;
}

.modal-header p {
  margin: 0 0 0.3rem;
}

.modal-body {
  display: grid;
  gap: 1rem;
}

.modal-grid {
  display: grid;
  gap: 1rem;
}

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

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  border-top: 1px solid var(--border);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: none;
  background: rgba(0, 0, 0, 0.55);
}

.sidebar-overlay:not([hidden]) {
  display: block;
}

.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 50;
  min-width: 240px;
  max-width: 380px;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(18, 20, 26, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: rgba(244, 63, 94, 0.3);
  color: #fecdd3;
}

.auth-page {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, #0a0b0f 0%, #0f172a 100%);
}

.auth-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  gap: 1rem;
}

.auth-hero h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(2rem, 4vw, 2.6rem);
}

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

.auth-card {
  display: grid;
  align-content: start;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
}

.auth-button {
  width: 100%;
}

.auth-alert {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.1);
  color: #fecdd3;
}

body.compact-mode .metric-grid,
body.compact-mode .content-grid,
body.compact-mode .settings-layout {
  gap: 1rem;
}

body.compact-mode .metric-card,
body.compact-mode .content-card,
body.compact-mode .subcard {
  padding: 1.1rem;
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed);
  padding-inline: 0.75rem;
}

body.sidebar-collapsed .sidebar-link,
body.sidebar-collapsed .sidebar-status-card,
body.sidebar-collapsed .sidebar-footer__link {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-link__label,
body.sidebar-collapsed .sidebar-status-card strong,
body.sidebar-collapsed .sidebar-status-card small,
body.sidebar-collapsed .sidebar-status-card__label,
body.sidebar-collapsed .sidebar-footer__link {
  display: none;
}

body.sidebar-collapsed .main-panel {
  margin-left: var(--sidebar-collapsed);
}

@media (max-width: 1180px) {
  .metric-grid,
  .content-grid--double,
  .content-grid--triple,
  .settings-layout,
  .content-grid--sessions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .topbar {
    padding-inline: 1rem;
  }

  .trend-chip,
  .user-meta small {
    display: none;
  }

  .main-panel {
    padding-inline: 1rem;
  }

  .metric-grid,
  .content-grid--double,
  .content-grid--triple,
  .content-grid--sessions,
  .settings-layout,
  .auth-grid,
  .modal-grid--two,
  .device-detail-hero,
  .session-summary-layout {
    grid-template-columns: 1fr;
  }

  .page-header,
  .content-card__header,
  .subcard__header,
  .filter-toolbar,
  .toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .live-controls,
  .device-card__actions,
  .reservation-card__actions,
  .session-card__actions,
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 820px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .main-panel,
  body.sidebar-collapsed .main-panel {
    margin-left: 0;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .brand-copy small,
  .page-header__actions {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar-group {
    gap: 0.6rem;
  }

  .brand-copy strong {
    font-size: 0.92rem;
  }

  .user-pill {
    padding-right: 0.35rem;
  }

  .user-meta {
    display: none;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

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

  .session-highlight-grid {
    grid-template-columns: 1fr;
  }
}
