/* assets/css/style.css – minimal responsive dark/light + print-friendly */

/* Base */

:root {
  --bg-dark: #050814;
  --bg-light: #f5f5f7;
  --card-dark: #0b1020;
  --card-light: #ffffff;
  --text-dark: #e5e7eb;
  --text-light: #111827;
  --accent: #3b82f6;
  --accent-soft: #1e40af;
  --border-dark: #1f2933;
  --border-light: #d1d5db;
  --danger: #ef4444;
  --success: #22c55e;
  --neutral: #eab308;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

/* Themes */

body.theme-dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

body.theme-light {
  background-color: var(--bg-light);
  color: var(--text-light);
}

/* Top nav */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(5, 8, 20, 0.95);
  border-bottom: 1px solid var(--border-dark);
  backdrop-filter: blur(10px);
}

body.theme-light .top-nav {
  background: rgba(245, 245, 247, 0.95);
  border-bottom-color: var(--border-light);
}

.app-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-links a {
  margin: 0 0.5rem;
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.nav-links a.active {
  background-color: var(--accent);
  color: white;
}

/* Buttons */

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn.small {
  padding: 0.2rem 0.6rem;
}

.btn.primary {
  background-color: var(--accent);
  color: white;
}

.btn.secondary {
  background-color: transparent;
  color: inherit;
  border: 1px solid var(--border-dark);
}

body.theme-light .btn.secondary {
  border-color: var(--border-light);
}

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

/* Layout */

.page-wrapper {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1rem 2rem;
}

.card {
  background-color: var(--card-dark);
  border-radius: 1rem;
  border: 1px solid var(--border-dark);
  padding: 1rem 1.25rem;
}

body.theme-light .card {
  background-color: var(--card-light);
  border-color: var(--border-light);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.status-bar {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

/* Tables */

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border-dark);
}

body.theme-light .data-table th,
body.theme-light .data-table td {
  border-bottom-color: var(--border-light);
}

.data-table th {
  text-align: left;
  font-weight: 600;
}

/* Auth */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-box {
  width: min(400px, 100% - 2rem);
  background-color: var(--card-dark);
  border-radius: 1rem;
  border: 1px solid var(--border-dark);
  padding: 1.5rem;
}

.auth-title {
  margin-top: 0;
}

.auth-box label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.auth-box input {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.4rem;
  border: 1px solid var(--border-dark);
  background: transparent;
  color: inherit;
}

/* Settings tabs */

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.settings-tab {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  cursor: pointer;
}

.settings-tab.active {
  background-color: var(--accent);
  color: white;
}

.settings-panel {
  display: none;
  font-size: 0.9rem;
}

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

/* Two-column layout */

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .two-column {
    grid-template-columns: 1fr;
  }
}

/* Color coding for verdicts */

.verdict-buy {
  color: var(--success);
  font-weight: 600;
}

.verdict-neutral {
  color: var(--neutral);
  font-weight: 600;
}

.verdict-sell {
  color: var(--danger);
  font-weight: 600;
}

/* Print styles – text only, white background */

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .top-nav,
  .btn,
  #themeToggle {
    display: none !important;
  }
  .card {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
  }
}
