/* Shared dark/light theme tokens + primitives — consumed by downlines.css,
   register.css and training.css. Matches the landing page (colteum.com)
   theme in landing/src/index.css. Dark is the default; add `.light` to
   <html> to switch (see utils/theme.js). */

:root {
  --bg-page: #050a17;
  --bg-surface: #0b1224;
  --bg-card: #0f1830;
  --bg-card-hover: #131f3d;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --border-subtle: #1e293b;

  --color-brand-blue: #2f6fed;
  --color-brand-blue-bright: #4f8bff;
  --color-brand-gold: #f0b429;
  --color-brand-green: #22c55e;

  --color-error-bg: #3b1219;
  --color-error-text: #fca5a5;
  --color-error-border: #dc2626;
  --color-success-bg: #10241a;
  --color-success-text: #86efac;
  --color-success-border: #16a34a;
}

:root.light {
  --bg-page: #f5f7fb;
  --bg-surface: #ffffff;
  --bg-card: #f1f5f9;
  --bg-card-hover: #e6ecf5;
  --text-primary: #0f172a;
  --text-muted: #475569;
  --border-subtle: #e2e8f0;

  --color-error-bg: #fee2e2;
  --color-error-text: #991b1b;
  --color-error-border: #dc2626;
  --color-success-bg: #dcfce7;
  --color-success-text: #166534;
  --color-success-border: #16a34a;
}

body {
  background: var(--bg-page);
  color: var(--text-primary);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.btn-primary {
  background: var(--color-brand-blue);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-brand-blue-bright);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover:not(:disabled) {
  background: var(--border-subtle);
}
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-success {
  background: var(--color-brand-green);
  color: #06210f;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-success:hover:not(:disabled) {
  background: #34d972;
}
.btn-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.copy-btn {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.copy-btn:hover {
  background: var(--border-subtle);
}

.error-message,
.error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-left: 4px solid var(--color-error-border);
}

.success-message,
.connected-info {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-left: 4px solid var(--color-success-border);
}

.notice-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.notice-card h2 {
  color: var(--color-brand-blue-bright);
}

.wallet-badge {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

/* Colteum brand lockup, shared across all app pages */
.colteum-logo {
  display: inline-flex;
  align-items: center;
}
.colteum-logo img {
  display: block;
  height: auto;
  /* The navy lettering is dim on the dark background; lift it a little */
  filter: brightness(1.3) drop-shadow(0 0 6px rgba(79, 139, 255, 0.25));
}
:root.light .colteum-logo img {
  filter: none;
}
.colteum-logo--header img {
  height: 44px;
  width: auto;
}
.colteum-logo--full img {
  width: min(360px, 100%);
}

/* Light/dark toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--color-brand-blue);
}
