/* ============ RESET & BASE ============ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a2e;
  --bg-hover: #222240;
  --bg-active: #2a2a4a;
  --surface: #16162a;
  --surface-light: #1e1e36;

  --text-primary: #e8e8f0;
  --text-secondary: #9999b3;
  --text-muted: #666680;

  --accent: #ffffff;
  --accent-hover: #e0e0e0;
  --accent-dim: rgba(255, 255, 255, 0.1);

  --green: #00d26a;
  --green-dim: rgba(0, 210, 106, 0.15);
  --red: #ff4757;
  --red-dim: rgba(255, 71, 87, 0.15);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.15);

  --border: #2a2a40;
  --border-light: #33334d;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --sidebar-width: 320px;
  --topbar-height: 56px;
  --input-height: 72px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  height: 100%;
  overflow: hidden;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
  background: #2a2a40;
  border-radius: 4px;
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-top: calc(16px + var(--safe-top));
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  max-height: 120px;
  display: block;
  width: auto;
  margin-left: 18px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
  transition: transform 0.25s ease;
}

.logo-img:hover {
  transform: scale(1.02);
}

.welcome-logo-center {
  max-height: 200px;
  width: auto;
  opacity: 0.8;
  filter: drop-shadow(0 4px 20px rgba(201, 168, 76, 0.3));
  transition: opacity 0.3s ease;
  object-fit: contain;
}

.welcome-logo-center:hover {
  opacity: 0.95;
}

.wip-icon {
  margin-right: 3px;
}

.wip-text {
  font-weight: 700;
  margin-right: 8px;
  background: linear-gradient(90deg, #ff7a00, #ffb347, #ff7a00);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-icon {
  font-size: 24px;
  color: var(--accent);
  font-weight: 700;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(2deg, #959595d4, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-close {
  display: block;
}

.btn-new-chat {
  margin: 12px 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1a1a2e 0%, #0a0a0f 100%);
  border: 1px solid #33334d;
  border-radius: var(--radius);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-new-chat::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #959595d4, #ffffff);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.btn-new-chat:hover {
  border-color: #444466;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-new-chat .btn-content {
  background: linear-gradient(2deg, #959595d4, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-new-chat .btn-content span {
  font-size: 18px;
  font-weight: 700;
  /* Reset the transparent fill so inner span doesn't conflict */
  -webkit-text-fill-color: inherit;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

/* ─── Dashboard Panel (sidebar) ─── */
.dashboard-panel {
  flex: 1;
  overflow: hidden;
  padding: 0 12px 8px;
  display: flex;
  flex-direction: column;
}

.dash-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
}

.dash-price {
  text-align: center;
  padding: 12px 8px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.dash-price .price-value {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  transition: color 0.3s;
}

.dash-price .price-value.flash {
  color: #fff;
}

.dash-price .price-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
  color: var(--text-muted);
}

.dash-price .price-change.up {
  color: #00d26a !important;
}

.dash-price .price-change.down {
  color: #ff4757 !important;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  min-width: 0;
}

.dash-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  min-width: 0;
  gap: 4px;
}

.dash-item .label {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-item .value {
  font-weight: 600;
  color: #ddd;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}

.dash-item .value.bullish {
  color: #4caf50;
}

.dash-item .value.bearish {
  color: #f44336;
}

.dash-item .value.neutral {
  color: var(--text-secondary);
}

.dash-item .value.warning {
  color: #ff9800;
}

.dash-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 6px 4px 2px;
  font-weight: 600;
  opacity: 0.6;
}

.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}

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

.dash-row .value {
  font-weight: 600;
  color: #ccc;
}

.chat-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.chat-item:hover {
  background: var(--bg-hover);
}

.chat-item.active {
  background: var(--bg-active);
  border-left: 3px solid var(--text-secondary);
}

.chat-item-icon {
  font-size: 14px;
  opacity: 0.5;
  flex-shrink: 0;
}

.chat-item-content {
  flex: 1;
  min-width: 0;
}

.chat-item-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-preview {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.chat-item-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.chat-item:hover .chat-item-delete {
  opacity: 1;
}

.chat-item-delete:hover {
  color: var(--red);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.btn-settings {
  width: 10%;
  padding: 10px 14px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  font-family: var(--font);
}

.btn-settings:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ============ MAIN ============ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

/* ============ TOPBAR ============ */
.topbar {
  height: var(--topbar-height);
  padding: 0 16px;
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-tester-badge {
  background: var(--surface-light);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  font-size: 14px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: none;
  /* JS toggles display:inline-flex and .visible */
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  animation: pulse-glow 2s infinite;
}

.btn-tester-badge.visible {
  display: inline-flex;
}

.btn-tester-badge:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.05);
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(77, 171, 245, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(77, 171, 245, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(77, 171, 245, 0);
  }
}

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

.pnl-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s;
}

.pnl-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pnl-indicator.profit {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green);
}

.pnl-indicator.loss {
  border-color: var(--red);
  background: var(--red-dim);
  color: var(--red);
}

.pnl-value {
  white-space: nowrap;
}

.context-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--surface);
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: default;
}

.context-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.context-dot.warning {
  background: var(--accent);
}

.context-dot.danger {
  background: var(--red);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  line-height: 1;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

#menuBtn {
  display: block;
}

/* ============ MESSAGES ============ */
.messages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

.messages {
  max-width: 800px;
  margin: 0 auto;
  margin-top: auto;
  padding: 12px 16px;
  padding-bottom: 0px;
}

/* Welcome */
.welcome {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 100%;
  padding: 20px;
}

.welcome-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.welcome h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.welcome p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.welcome-tips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.tip {
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.tip:hover {
  background: var(--surface-light);
  color: var(--text-primary);
  border-color: var(--accent);
}

.tip:active {
  transform: scale(0.97);
}

/* Message bubbles */
.message {
  margin-bottom: 20px;
  animation: msgIn 0.3s ease;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.message-user .message-avatar {
  background: var(--blue-dim);
  color: var(--blue);
}

.message-model .message-avatar,
.message-assistant .message-avatar {
  background: var(--accent-dim);
  color: var(--accent);
}

.message-role {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.message-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.message-body {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.message-user .message-body {
  background: var(--surface);
  border: 1px solid var(--border);
}

.message-model .message-body,
.message-assistant .message-body {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
}

.dev-extraction-highlight {
  background: rgba(255, 171, 0, 0.15);
  border-bottom: 2px dashed var(--warning);
  cursor: help;
  transition: background 0.2s;
  border-radius: 2px;
  padding: 0 2px;
  position: relative;
  display: inline-block;
}

.dev-extraction-highlight:hover {
  background: rgba(255, 171, 0, 0.3);
}

.message-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-start;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.message:hover .message-actions {
  opacity: 1;
}

.btn-action {
  font-size: 14px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action:hover,
.btn-action.active {
  background: var(--surface-light);
  transform: translateY(-1px);
}

.btn-action.active {
  color: var(--accent);
  border-color: var(--accent);
}

/* Hide thumbs feedback buttons as per user request (kept in code) */
.btn-action[title*="odpowiedź"] {
  display: none;
}

/* Error messages and retries */
.error-message {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--red);
}

.retry-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.btn-retry {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-retry:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.retry-status {
  font-size: 12px;
  color: var(--text-muted);
}

/* Markdown styles within messages */
.message-body h1,
.message-body h2,
.message-body h3 {
  margin: 12px 0 6px;
  color: var(--text-primary);
}

.message-body h1 {
  font-size: 18px;
}

.message-body h2 {
  font-size: 16px;
}

.message-body h3 {
  font-size: 14px;
  color: var(--accent);
}

.message-body p {
  margin-bottom: 6px;
}

.message-body p:last-child {
  margin-bottom: 0;
}

.message-body ul,
.message-body ol {
  margin: 4px 0;
  padding-left: 24px;
}

.message-body li {
  margin-bottom: 2px;
}

.message-body code {
  font-family: var(--font-mono);
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent);
}

.message-body pre {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 10px 0;
  overflow-x: auto;
}

.message-body pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

.message-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.message-body em {
  color: var(--text-secondary);
}

.message-body blockquote {
  border-left: 3px solid var(--border-light);
  padding-left: 14px;
  margin: 10px 0;
  color: var(--text-secondary);
}

.message-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
}

.message-body th,
.message-body td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.message-body th {
  background: var(--surface);
  font-weight: 600;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* ============ INPUT AREA ============ */
.input-area {
  padding: 0px 16px;
  padding-bottom: calc(8px + var(--safe-bottom));
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.input-wrapper {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 8px 8px 18px;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--accent);
}

.input-wrapper textarea {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  outline: none;
  max-height: 150px;
  padding: 6px 0;
}

.input-wrapper textarea::placeholder {
  color: var(--text-muted);
}

.btn-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-send:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.btn-send:disabled {
  background: var(--bg-hover);
  color: var(--text-muted);
  cursor: default;
}

.btn-send:active:not(:disabled) {
  transform: scale(0.95);
}

.input-footer {
  max-width: 800px;
  margin: 4px auto 0;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ============ MODALS ============ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}

.modal-large {
  max-width: 600px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
}

.setting-group {
  margin-bottom: 24px;
}

.setting-group:last-child {
  margin-bottom: 0;
}

.setting-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setting-group input[type="text"],
.setting-group input[type="password"],
.setting-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.setting-group textarea {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
  min-height: 200px;
}

.setting-group input:focus,
.setting-group textarea:focus {
  border-color: var(--accent);
}

.setting-group small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.input-with-btn input {
  flex: 1;
}

.prompt-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}

.btn-sm {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: var(--accent);
  color: #000;
  font-family: var(--font);
  transition: all 0.15s;
}

.btn-sm:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red);
}

.btn-danger:hover {
  background: var(--red);
  color: white;
}

.danger-zone {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.context-info {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.info-row span:last-child {
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* ============ DESKTOP SIDEBAR TOGGLE ============ */
@media (min-width: 769px) {
  .sidebar.collapsed {
    transform: translateX(-100%);
    margin-left: calc(var(--sidebar-width) * -1);
  }

  .main {
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* ============ SIDEBAR OVERLAY (mobile) ============ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.sidebar-overlay.show {
  display: block;
}

/* ============ RESPONSIVE / MOBILE ============ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }

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

  .sidebar-close {
    display: block;
  }

  #menuBtn {
    display: block;
  }

  .topbar {
    height: calc(var(--topbar-height) + var(--safe-top));
  }

  .messages {
    padding: 12px;
  }

  .welcome {
    padding: 40px 16px;
  }

  .welcome h1 {
    font-size: 20px;
  }

  .welcome-tips {
    flex-direction: column;
  }

  .tip {
    text-align: left;
  }

  .message-body {
    padding: 12px 14px;
    font-size: 14px;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
    margin: 16px;
  }

  .input-wrapper {
    border-radius: var(--radius);
  }

  .context-indicator .context-text {
    display: none;
  }
}

@media (max-width: 380px) {
  .message-body {
    font-size: 13px;
  }

  .message-time {
    display: none;
  }
}

/* ============ LOADING STATES ============ */
.loading-shimmer {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-light) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============ TOAST NOTIFICATIONS ============ */
.toast-container {
  position: fixed;
  top: calc(16px + var(--safe-top));
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  animation: toastIn 0.3s ease;
  max-width: 320px;
}

.toast-success {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid var(--green);
}

.toast-error {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red);
}

.toast-info {
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid var(--blue);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* ============ EMPTY STATE ============ */
.empty-chats {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.empty-chats span {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

/* ============ IMAGE PREVIEW ============ */
.image-preview-area {
  max-width: 800px;
  margin: 0 auto 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.image-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-item .remove-image {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.image-preview-item .remove-image:hover {
  background: var(--red);
}

.upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 2;
}

.upload-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.upload-pct {
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

/* ============ ATTACH & MIC BUTTONS ============ */
.btn-attach,
.btn-mic {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 18px;
  padding: 6px;
}

.btn-attach:hover,
.btn-mic:hover {
  color: var(--accent);
}

.btn-mic.recording {
  color: var(--red);
  animation: pulseRec 1s infinite;
}

@keyframes pulseRec {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.recording-indicator {
  color: var(--red);
  font-size: 12px;
  font-weight: 500;
  animation: pulseRec 1s infinite;
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ============ MESSAGE IMAGES ============ */
.message-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.message-images img {
  max-width: 200px;
  max-height: 320px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s;
  object-fit: cover;
}

.message-images img:hover {
  transform: scale(1.02);
  border-color: var(--accent);
}

/* Image lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}

/* ============ MODEL SELECTOR ============ */
.topbar-title-area {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.model-selector {
  position: relative;
}

.model-selector-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-weight: 500;
}

.model-selector-btn:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.model-selector-btn .chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.model-selector.open .model-selector-btn .chevron {
  transform: rotate(180deg);
}

.model-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 240px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  animation: dropdownIn 0.2s ease-out;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.model-selector.open .model-dropdown {
  display: flex;
}

.model-option {
  padding: 12px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid var(--border);
}

.model-option:last-child {
  border-bottom: none;
}

.model-option:hover {
  background: var(--bg-hover);
}

.model-option.active {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
}

.model-option-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.model-option-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Model selector in settings panel */
.settings-dropdown {
  left: 0;
  right: 0;
  width: 100%;
}

.setting-group .model-selector-btn {
  background: var(--bg-main);
  border-color: var(--border);
}

/* ============ ERROR & RETRY ============ */
.error-message {
  color: var(--red);
  font-size: 13px;
  background: var(--red-dim);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--red);
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.retry-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-retry {
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-retry:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.retry-status {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 12px;
}

/* Developer Mode Styles */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

.dev-info-bubble {
  background: rgba(0, 191, 165, 0.05);
  border: 1px dashed rgba(0, 191, 165, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  display: none;
  /* Shown only in devMode */
}

body.dev-mode .dev-info-bubble {
  display: block;
}

.dev-fact-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  padding-bottom: 2px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.05);
}

.dev-fact-score {
  font-weight: bold;
  color: var(--warning);
}

.dev-highlight {
  border-bottom: 1px dashed var(--accent);
  cursor: help;
  position: relative;
}

.dev-highlight:hover::after {
  content: attr(data-meta);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-light);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 10px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* ============ INLINE LOGS ============ */
.inline-logs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 10px;
  padding: 14px;
  font-size: 13px;
  animation: slideDown 0.2s ease-out;
  border-left: 2px solid var(--accent);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.inline-logs h4 {
  margin: 10px 0 6px;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.log-section {
  margin-bottom: 12px;
}

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

.log-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: block;
}

.log-queries {
  color: var(--text-secondary);
  line-height: 1.4;
  font-style: italic;
}

.log-facts-container {
  background: var(--bg-primary);
  padding: 8px;
  border-radius: 6px;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
}

.log-fact-item {
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

.log-fact-item:last-child {
  border-bottom: none;
}

.log-fact-score {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Password Overlay */
.password-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.password-card {
  background: var(--bg-secondary);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.password-card .logo {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  display: block;
}

.password-card h3 {
  margin-bottom: 10px;
  color: #fff;
}

.password-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.password-card input {
  width: 100%;
  padding: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  margin-bottom: 15px;
  text-align: center;
}

.masked-input {
  -webkit-text-security: disc;
  text-security: disc;
}

.password-card .btn-primary {
  width: 100%;
  padding: 12px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.lockout-msg {
  margin-top: 15px;
  color: #ff4d4d;
  font-size: 13px;
  font-weight: 500;
}

/* Backup Actions */
.backup-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.backup-actions .btn-sm {
  flex: 1;
}

/* Video Process Overlay */
.video-process-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-process-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 450px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.video-process-card h3 {
  margin-bottom: 20px;
  font-weight: 600;
  color: #fff;
}

.video-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.video-input-group input {
  flex: 1;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  color: #fff;
}

.video-input-group .btn-secondary {
  padding: 0 15px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
}

.video-options {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.video-options label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.yt-status {
  margin-top: 15px;
  font-size: 0.9rem;
  min-height: 1.2rem;
}

.yt-status.success {
  color: #10b981;
}

.yt-status.error {
  color: #ef4444;
}

.yt-status.loading {
  color: #3b82f6;
}

.btn-yt {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.btn-yt:hover {
  color: #ff0000;
}

.close-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.close-overlay:hover {
  color: #fff;
}

/* Progress Bar Styles */
.progress-container {
  width: 100%;
  background: var(--bg-main);
  height: 12px;
  border-radius: 6px;
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

#progressBar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), #60a5fa);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#progressTitle {
  background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* ============ TESTER MODAL ============ */
.modal-tabs {
  display: flex;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.tab-btn {
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
  padding: 10px 0;
}

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

.tester-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-card label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat-card div:not(.status-badge) {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.running {
  background: var(--green-dim);
  color: var(--green);
}

.status-badge.offline {
  background: var(--red-dim);
  color: var(--red);
}

.tester-last-trigger,
.tester-last-interaction {
  margin-bottom: 20px;
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tester-last-trigger h3,
.tester-last-interaction h3 {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--accent);
}

.trigger-info,
.interaction-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.interactions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 500px;
  overflow-y: auto;
}

.interaction-item {
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border);
}

.interaction-item.ok {
  border-left-color: var(--green);
}

.interaction-item.error {
  border-left-color: var(--red);
}

.interaction-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.interaction-q {
  font-weight: 600;
  margin-bottom: 4px;
}

.interaction-score {
  font-weight: 700;
  color: var(--accent);
}

.report-view {
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
  background: var(--bg-primary);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Log Overlay */
.log-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 18, 0.92);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #a0b0c0;
}

.log-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #1e2a3a;
  font-size: 15px;
  font-weight: 600;
  color: #e0e8f0;
}

.log-overlay-close {
  background: none;
  border: none;
  color: #708090;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
}

.log-overlay-close:hover {
  background: #1e2a3a;
  color: #ff5555;
}

.log-overlay-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  white-space: pre-wrap;
  word-break: break-all;
}

.log-overlay-content .log-err {
  color: #ff7777;
}

.log-overlay-content .log-warn {
  color: #ffbb33;
}

.log-overlay-content .log-info {
  color: #66aadd;
}

.log-overlay-content .log-scheduler {
  color: #55cc88;
}

.log-overlay-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  border-top: 1px solid #1e2a3a;
  font-size: 11px;
  color: #606878;
}

.log-loading {
  color: #708090;
  font-style: italic;
}

.btn-sm {
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid #2a3a4a;
  background: #1a2a3a;
  color: #a0b0c0;
  cursor: pointer;
  font-size: 11px;
}

.btn-sm:hover {
  background: #2a3a5a;
}

.log-overlay-content {
  overflow-y: scroll !important;
}

/* ═══════════════ REPORT OVERLAY ═══════════════ */
.report-overlay-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #a0b0c0;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  height: 100%;
}

.report-col {
  display: flex;
  flex-direction: column;
  background: rgba(20, 28, 40, 0.6);
  border: 1px solid #1e2a3a;
  border-radius: 8px;
  padding: 16px;
}

.report-col h3 {
  color: #e0e8f0;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #1e2a3a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-col h3 .badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #1a2a3a;
  color: #708090;
  font-weight: 400;
}

.report-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(30, 42, 58, 0.5);
}

.report-item:last-child {
  border-bottom: none;
}

.report-label {
  color: #708090;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.report-value {
  color: #c0d0e0;
  font-size: 13px;
}

.report-value.good {
  color: #55cc88;
}

.report-value.warn {
  color: #ffbb33;
}

.report-value.bad {
  color: #ff7777;
}

.report-proposal {
  background: rgba(30, 50, 80, 0.3);
  border: 1px solid #2a3a5a;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 6px 0;
  font-size: 12px;
}

.param-pill {
  display: inline-block;
  background: rgba(60, 80, 100, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  color: #b0c0d0;
  white-space: nowrap;
}

.report-proposal .param-old,
.param-old {
  color: #ff7777;
  text-decoration: line-through;
}

.report-proposal .param-new,
.param-new {
  color: #55cc88;
  font-weight: 600;
}

.report-proposal .param-detail {
  color: #708090;
  font-size: 11px;
}

.report-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.report-toggle-btn {
  padding: 4px 14px;
  border-radius: 4px;
  border: 1px solid #2a3a4a;
  background: #1a2a3a;
  color: #708090;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s;
}

.report-toggle-btn.active {
  background: #2a5a3a;
  border-color: #55cc88;
  color: #55cc88;
}

.report-toggle-btn.off {
  background: #5a2a2a;
  border-color: #ff5555;
  color: #ff5555;
}

.report-toggle-btn:not(.active):not(.off):hover {
  background: #2a3a5a;
}

.report-err-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid rgba(30, 42, 58, 0.3);
  gap: 8px;
}

.report-err-msg {
  flex: 1;
  color: #ff7777;
  font-size: 11px;
  word-break: break-all;
  line-height: 1.4;
}

.report-err-count {
  color: #708090;
  font-size: 10px;
  white-space: nowrap;
  padding: 2px 6px;
  background: rgba(255, 119, 119, 0.1);
  border-radius: 3px;
}

.report-err-action {
  flex-shrink: 0;
}

.report-btn-sm {
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid #2a3a4a;
  background: #1a2a3a;
  color: #a0b0c0;
  cursor: pointer;
  font-size: 10px;
  white-space: nowrap;
}

.report-btn-sm:hover {
  background: #2a3a5a;
}

.report-empty {
  color: #606878;
  font-style: italic;
  font-size: 12px;
}

.report-live-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.report-live-stat {
  background: rgba(20, 28, 40, 0.5);
  border-radius: 4px;
  padding: 6px 12px;
  text-align: center;
  min-width: 60px;
}

.report-live-stat .stat-value {
  font-size: 15px;
  font-weight: 600;
  color: #e0e8f0;
}

.report-live-stat .stat-label {
  font-size: 9px;
  text-transform: uppercase;
  color: #606878;
  letter-spacing: 0.5px;
}

.report-health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.report-health-dot.green {
  background: #55cc88;
}

.report-health-dot.yellow {
  background: #ffbb33;
}

.report-health-dot.red {
  background: #ff5555;
}

.report-health-dot.gray {
  background: #606878;
}

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

/* ============ PREMIUM DASHBOARD UI ============ */
.premium-dashboard {
  background: #1a1a1a;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 15px 0;
  border: 1px solid #333;
  font-family: var(--font);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.premium-row-top {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.premium-card {
  flex: 1;
  background: #252525;
  border-radius: var(--radius);
  padding: 15px;
  border: 1px solid #3a3a3a;
  min-width: 0;
}

.premium-card-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.premium-card-value {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.premium-card-subtext {
  font-size: 11px;
  font-weight: 600;
}

.premium-card-subtext.red {
  color: #ff4d4d;
}

.premium-card-subtext.green {
  color: #00e676;
}

.premium-verdict-text {
  font-size: 18px;
  font-weight: 700;
  color: #ffa726;
  /* Gold/Orange */
}

.premium-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #bbb;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}

.premium-table {
  width: 100%;
  margin-bottom: 20px;
}

.premium-table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #2a2a2a;
}

.premium-table-row:last-child {
  border-bottom: none;
}

.premium-table-key {
  font-size: 13px;
  color: #ccc;
}

.premium-table-val-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.premium-table-val {
  font-weight: 600;
  font-size: 13px;
}

.premium-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.premium-badge.bearish {
  background: rgba(255, 71, 87, 0.2);
  color: #ff4757;
}

.premium-badge.bullish {
  background: rgba(0, 210, 106, 0.2);
  color: #00d26a;
}

.premium-badge.neutral {
  background: rgba(153, 153, 179, 0.2);
  color: #9999b3;
}

.premium-badge.warning {
  background: rgba(255, 167, 38, 0.2);
  color: #ffa726;
}

.premium-scores {
  margin-top: 15px;
}

.premium-score-row {
  margin-bottom: 12px;
}

.premium-score-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
}

.premium-score-bar-bg {
  height: 6px;
  background: #333;
  border-radius: 3px;
  overflow: hidden;
}

.premium-score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease-out;
}

.premium-score-bar-fill.green {
  background: #00e676;
}

.premium-score-bar-fill.orange {
  background: #ffa726;
}

.premium-score-bar-fill.red {
  background: #ff5252;
}

.premium-final-msg {
  background: rgba(255, 167, 38, 0.1);
  border: 1px solid rgba(255, 167, 38, 0.3);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-top: 15px;
  font-size: 13px;
  color: #ffa726;
  font-weight: 600;
}

/* ═══ FAZA 5: Trade Plan — Confluence, R:R, Multi-TP, Invalidation, Checklist ═══ */

.premium-trade-plan {
  padding: 0 0 10px 0;
}

.premium-rr-row {
  display: flex;
  gap: 12px;
  margin: 8px 0;
}

.premium-rr-badge {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.premium-rr-badge.bullish {
  border-color: rgba(0, 210, 106, 0.3);
  background: rgba(0, 210, 106, 0.08);
}

.premium-rr-badge.bearish {
  border-color: rgba(255, 71, 87, 0.3);
  background: rgba(255, 71, 87, 0.08);
}

.premium-rr-badge.neutral {
  border-color: rgba(153, 153, 179, 0.3);
  background: rgba(153, 153, 179, 0.08);
}

.premium-rr-label {
  font-size: 11px;
  color: #9999b3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.premium-rr-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.premium-tp-row {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.premium-tp-item {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  font-size: 11px;
  color: #ccc;
  text-align: center;
}

.premium-tp-label {
  display: block;
  font-size: 10px;
  color: #9999b3;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.premium-invalidation-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255, 71, 87, 0.08);
  border: 1px solid rgba(255, 71, 87, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 12px;
  color: #ff6b7a;
  line-height: 1.5;
}

.premium-invalidation-icon {
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 1px;
}

.premium-invalidation-text {
  flex: 1;
}

/* ═══ Checklist ═══ */

.premium-checklist {
  padding: 0 0 5px 0;
}

.premium-checklist-step {
  padding: 7px 10px;
  margin: 3px 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(153, 153, 179, 0.3);
  font-size: 12px;
  color: #ccc;
  line-height: 1.5;
}

.premium-checklist-step:first-child {
  border-left-color: rgba(0, 210, 106, 0.5);
}

.premium-checklist-step:last-child {
  border-left-color: rgba(255, 71, 87, 0.5);
}

/* ═══════════════ SIDEBAR TOOLS ═══════════════ */
.sidebar-tools {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-sidebar-tool {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 5px;
  background: rgba(30, 42, 58, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0px;
  color: #e0e8f0;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sidebar-tool:hover {
  background: rgba(0, 180, 216, 0.2);
  border-color: rgba(0, 180, 216, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ═══════════════ CHART OVERLAYS ═══════════════ */
.chart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 18, 0.96);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #e0e8f0;
}

.chart-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #0f131a;
  border-bottom: 1px solid #1e2a3a;
  flex-wrap: wrap;
  gap: 12px;
}

.chart-overlay-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.chart-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.chart-tab-group {
  display: flex;
  background: #182230;
  padding: 3px;
  border-radius: 6px;
  gap: 2px;
}

.chart-tab-btn {
  background: transparent;
  border: none;
  color: #8a9bb0;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.chart-tab-btn:hover {
  color: #ffffff;
}

.chart-tab-btn.active {
  background: #00b4d8;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 180, 216, 0.3);
}

.chart-overlay-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-select {
  background: #182230;
  color: #e0e8f0;
  border: 1px solid #2a3a4a;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}

.chart-select:hover {
  border-color: #00b4d8;
}

.chart-overlay-metrics {
  display: flex;
  gap: 20px;
  padding: 8px 20px;
  background: #131a24;
  border-bottom: 1px solid #1e2a3a;
  font-size: 12px;
  color: #8a9bb0;
  overflow-x: auto;
}

.metric-item strong {
  color: #ffffff;
  margin-left: 4px;
}

.chart-overlay-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #0a0d14;
  display: flex;
}

.chart-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* === Heatmap Canvas (Coinglass-style) === */
.heatmap-canvas-wrap {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  background: #0a0a1a;
  overflow: hidden;
}

.heatmap-canvas-wrap canvas#hmMainCanvas {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.heatmap-side-profile {
  flex: 0 0 120px;
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  height: 100%;
  display: block;
  background: #0d0d20;
  border-left: 1px solid rgba(100, 100, 180, 0.2);
}

/* Color Legend */
.heatmap-legend {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(10, 10, 26, 0.85);
  border: 1px solid rgba(100, 100, 180, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  backdrop-filter: blur(6px);
}

.heatmap-legend span {
  font-size: 10px;
  color: #a0a8c0;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
}

.heatmap-legend-max {
  color: #f0f040 !important;
}

.heatmap-legend canvas {
  border-radius: 3px;
  border: 1px solid rgba(100, 100, 180, 0.15);
}

/* Tooltip */
.heatmap-tooltip {
  position: absolute;
  z-index: 20;
  background: rgba(15, 15, 35, 0.92);
  border: 1px solid rgba(100, 100, 180, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  color: #d0d8e8;
  font-family: 'Inter', sans-serif;
  pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  line-height: 1.6;
}

.heatmap-tooltip strong {
  color: #fff;
}

.heatmap-tooltip .ht-ask {
  color: #ff4060;
}

.heatmap-tooltip .ht-bid {
  color: #00e070;
}

@media (max-width: 768px) {
  .heatmap-side-profile {
    flex: 0 0 60px;
    width: 60px;
    min-width: 60px;
    max-width: 60px;
  }

  .heatmap-legend {
    top: 8px;
    left: 8px;
    padding: 5px 7px;
  }

  .chart-overlay-header {
    padding: 10px;
  }
}

/* === Splash Screen === */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #080810;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: splashFadeIn 0.3s ease-out;
}

.splash-content {
  text-align: center;
  animation: splashPulse 1.5s ease-in-out;
}

.splash-logo {
  max-height: 320px;
  filter: drop-shadow(0 0 30px rgba(100, 180, 255, 0.4));
  animation: splashGlow 1.5s ease-in-out;
}

.splash-loader {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #4a9eff, transparent);
  margin: 30px auto 0;
  border-radius: 2px;
  animation: splashBar 1.2s ease-in-out infinite;
}

@keyframes splashFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes splashGlow {
  0% {
    opacity: 0;
    transform: scale(0.8);
    filter: drop-shadow(0 0 0px transparent);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
    filter: drop-shadow(0 0 40px rgba(100, 180, 255, 0.6));
  }

  100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(100, 180, 255, 0.3));
  }
}

@keyframes splashPulse {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }

  30% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes splashBar {
  0% {
    width: 0;
    margin-left: 30px;
  }

  50% {
    width: 60px;
    margin-left: 0;
  }

  100% {
    width: 0;
    margin-left: -30px;
  }
}

.splash-screen.splash-exit {
  animation: splashFadeOut 0.5s ease-in forwards;
}

@keyframes splashFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* === Sidebar Logo MERCURIUS Style === */
.sidebar-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8px 12px !important;
  min-height: auto !important;
  height: auto !important;
}

.sidebar-header .logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 !important;
}

.sidebar-header .logo-img {
  max-height: 80px !important;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.sidebar-close {
  padding: 4px 8px !important;
  font-size: 16px !important;
}

.btn-new-chat {
  margin: 8px 12px !important;
  padding: 8px 12px !important;
}

/* Usunięcie wolnego obszaru nad i pod ceną */
.sidebar-tools {
  margin-bottom: 0 !important;
  /* Usuwa margines pod przyciskami Heatmapa/Orderbook */
  padding-bottom: 4px !important;
}

.dashboard-panel {
  padding-top: 0 !important;
}

.dash-price {
  padding-top: 4px !important;
  /* Podciąga cenę $63 993,11 mocno do góry */
  padding-bottom: 1px !important;
  /* Zmniejsza odstęp pod spadkiem procentowym -1.84% */
  margin-top: 0 !important;
  margin-bottom: 4px !important;
}

/* === Wider chat container === */
.messages {
  max-width: 960px !important;
  padding: 20px 24px !important;
}

/* === Chat width: full when sidebar collapsed, 960px when open === */
.messages {
  max-width: 100% !important;
  padding: 20px 24px !important;
}

.sidebar:not(.collapsed)~.main .messages,
.sidebar.open~.main .messages {
  max-width: 960px !important;
}

/* === Desktop: collapsed = hidden sidebar === */
@media (min-width: 769px) {
  .sidebar.collapsed~.main .messages {
    max-width: 100% !important;
  }
}

/* === Mobile: open = sidebar visible === */
@media (max-width: 768px) {
  .sidebar.open~.main .messages {
    max-width: 960px !important;
  }
}

/* === Hamburger → X animation === */
.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  position: relative;
}

.menu-btn .hamburger-icon {
  font-size: 22px;
  transition: transform 0.3s ease, opacity 0.2s ease;
  display: inline-block;
}

.menu-btn.active .hamburger-icon {
  transform: rotate(90deg);
  opacity: 0;
  position: absolute;
}

.menu-btn .close-icon {
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  position: absolute;
  width: 20px;
  top: 8px;
  height: 20px;
}

.menu-btn .close-icon::before,
.menu-btn .close-icon::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
}

.menu-btn .close-icon::before {
  transform: rotate(45deg);
}

.menu-btn .close-icon::after {
  transform: rotate(-45deg);
}

.menu-btn.active .close-icon {
  opacity: 1;
}

/* === Quantum Particles === */
.quantum-container {
  position: relative;
  width: 100%;
  height: 80px;
  overflow: hidden;
  flex-shrink: 0;
}

.quantum-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* === Quantum Particles Container Fix === */
.input-area {
  flex-shrink: 0;
}

.messages-container {
  flex: 1;
  min-height: 0;
}

/* === Quantum Particles — background under chat === */
.quantum-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.main {
  position: relative;
  overflow: hidden;
}

.messages-container {
  position: relative;
  z-index: 1;
  border-left: none;
  border-right: none;
}

.input-area {
  position: relative;
  z-index: 1;
}

/* === Auto-healing Info Modal === */
.autoheal-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.autoheal-modal-content {
  background: #12131a;
  border: 1px solid #2a2d3a;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.autoheal-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #888;
  font-size: 24px;
  cursor: pointer;
}

.autoheal-modal-close:hover {
  color: #fff;
}

.autoheal-modal-content h3 {
  color: #e0e8f0;
  margin: 0 0 16px 0;
  font-size: 18px;
}

.autoheal-modal-body {
  color: #a0b0c0;
  font-size: 14px;
  line-height: 1.7;
}

.autoheal-modal-body h4 {
  color: #c9a84c;
  margin: 16px 0 8px 0;
  font-size: 14px;
}

.autoheal-modal-body ol,
.autoheal-modal-body ul {
  padding-left: 20px;
  margin: 8px 0;
}

.autoheal-modal-body li {
  margin-bottom: 6px;
}

.autoheal-modal-example {
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-top: 16px;
  color: #c9a84c;
}

.report-info-btn {
  background: none;
  border: 1px solid #555;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  color: #888;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1;
}

.report-info-btn:hover {
  border-color: #c9a84c;
  color: #c9a84c;
}

/* === Pozycja & PnL card === */
.premium-row-top {
  flex-wrap: wrap;
}

.premium-pos-card {
  flex: 1 1 240px;
  min-width: 200px;
}

.premium-pos-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.premium-pos-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.premium-pos-key {
  color: #999;
  font-weight: 600;
}

.premium-pos-val {
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.premium-pos-row .premium-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .premium-row-top {
    flex-direction: column;
  }
}