.bubble {
  white-space: normal;
}

.app {
  grid-template-columns: minmax(0, 1fr);
}

.main {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.topbar {
  gap: 16px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.topbar-brand b {
  display: block;
  letter-spacing: 0.15em;
}

.topbar-brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.chat-panel {
  min-height: 0;
  height: calc(100vh - 65px);
}

.status-pill {
  white-space: nowrap;
}

.top-actions .small-btn {
  white-space: nowrap;
}

.bubble p {
  margin: 0 0 0.9em;
}

.bubble p:last-child {
  margin-bottom: 0;
}

.bubble ul,
.bubble ol {
  padding-left: 1.5rem;
}

.bubble li + li {
  margin-top: 0.35em;
}

.bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8em 0;
  font-size: 0.92em;
}

.bubble th,
.bubble td {
  border: 1px solid var(--line);
  padding: 0.55em 0.7em;
  text-align: left;
  vertical-align: top;
}

.bubble th {
  color: var(--cyan);
  background: #101a29;
}

.bubble .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0.8em 0;
}

.bubble .table-wrap table {
  margin: 0;
}

.bubble .chart-card {
  margin: 0 0 0.8em;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, #101b2a, #0c1420);
}

.bubble .chart-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.bubble .chart-row {
  display: grid;
  grid-template-columns: minmax(70px, 0.8fr) minmax(90px, 2fr) auto;
  gap: 9px;
  align-items: center;
  margin: 8px 0;
  font-size: 12px;
}

.bubble .chart-label {
  overflow-wrap: anywhere;
}

.bubble .chart-track {
  height: 9px;
  overflow: hidden;
  border-radius: 8px;
  background: #1b293b;
}

.bubble .chart-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.bubble .chart-value {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bubble .schedule-table td:first-child {
  white-space: nowrap;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.auth-dialog {
  width: min(430px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--text);
  background: transparent;
}

.auth-dialog::backdrop {
  background: #020711c9;
  backdrop-filter: blur(5px);
}

.auth-dialog .login-card {
  width: 100%;
  margin: 0;
}

body.offline .status-pill {
  border-color: #66512d;
  color: #f2cb7d;
}

body.offline .status-pill i,
body.offline .online-dot {
  background: #f2b65e;
  box-shadow: 0 0 10px #f2b65e66;
}

.auth-dialog h2 {
  margin: 4px 0 10px;
  font-size: 22px;
}

.auth-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.auth-actions .primary {
  width: auto;
  flex: 1;
  margin-top: 0;
}

@media (max-width: 480px) {
  .auth-dialog .login-card {
    padding: 25px;
  }

  .topbar {
    padding: 0 12px;
  }

  .topbar-brand {
    gap: 7px;
  }

  .topbar-brand small {
    font-size: 7px;
  }

  .top-actions {
    gap: 5px;
  }

  .top-actions .small-btn {
    padding: 6px 7px;
    font-size: 10px;
  }

  .top-actions .status-pill {
    padding: 5px 6px;
    font-size: 8px;
  }
}
