/* =====================================================
   CRYPITO - Dark Trading Theme
   ===================================================== */

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

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2333;
  --bg-card: #161b22;
  --bg-input: #0d1117;
  --border-color: #30363d;
  --border-light: #21262d;

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;

  --green: #3fb950;
  --green-bg: rgba(46, 160, 67, 0.15);
  --green-border: rgba(46, 160, 67, 0.4);
  --red: #f85149;
  --red-bg: rgba(218, 54, 51, 0.15);
  --red-border: rgba(218, 54, 51, 0.4);
  --blue: #58a6ff;
  --blue-bg: rgba(88, 166, 255, 0.15);
  --yellow: #d29922;
  --purple: #bc8cff;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --transition: 0.2s ease;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* --- LAYOUT --- */
.app-container {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

/* --- HEADER --- */
.app-header {
  grid-column: 1 / -1;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo-icon {
  font-size: 1.6rem;
}

.logo-text {
  background: linear-gradient(135deg, var(--green), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.api-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.offline { background: var(--red); }

/* --- SIDEBAR NAV --- */
.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  border-left: 3px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  text-decoration: none;
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border-left-color: var(--blue);
  font-weight: 600;
}

.nav-icon {
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
}

/* --- MAIN CONTENT --- */
.main-content {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(100vh - 52px - 36px);
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
}

/* --- FOOTER --- */
.app-footer {
  grid-column: 1 / -1;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- KPI CARDS --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition);
}

.kpi-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* --- TEXT COLORS --- */
.text-gain { color: var(--green) !important; }
.text-loss { color: var(--red) !important; }
.text-neutral { color: var(--text-secondary) !important; }
.text-accent { color: var(--blue) !important; }
.text-secondary { color: var(--text-secondary) !important; }

/* --- FEEDBACK FINANCEIRO --- */
.feedback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.feedback-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.feedback-card.feedback-gain { border-color: var(--green-border); background: var(--green-bg); }
.feedback-card.feedback-loss { border-color: var(--red-border); background: var(--red-bg); }

.feedback-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.feedback-label { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.feedback-value { font-size: 1.4rem; font-weight: 700; margin: 0.3rem 0; }
.feedback-detail { font-size: 0.75rem; color: var(--text-muted); }

/* --- HIGHLIGHTS --- */
.feedback-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.highlight-best { border-left: 3px solid var(--green); }
.highlight-worst { border-left: 3px solid var(--red); }
.highlight-label { font-weight: 600; }
.highlight-par { color: var(--blue); font-weight: 600; }
.highlight-value { font-weight: 700; }
.highlight-date { color: var(--text-muted); font-size: 0.85rem; }

/* --- PAIRS GRID --- */
.pairs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.pairs-section h4 {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- MINI TABLE --- */
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.mini-table th {
  text-align: left;
  padding: 0.4rem 0.5rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-weight: 500;
}

.mini-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

/* --- TODAY SUMMARY --- */
.today-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.today-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* --- FORMS --- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 500;
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--transition);
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-bg);
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
}

.form-select {
  cursor: pointer;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
}

.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover {
  background: #4c9aed;
  border-color: #4c9aed;
}

.btn-success {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.btn-success:hover { background: #2ea043; }

.btn-danger {
  background: transparent;
  border-color: var(--red);
  color: var(--red);
}
.btn-danger:hover {
  background: var(--red-bg);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.3rem;
  font-size: 1rem;
  border-radius: 4px;
  transition: all var(--transition);
}

.btn-icon:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.btn-edit:hover { color: var(--blue); }
.btn-delete:hover { color: var(--red); }

/* --- BADGES --- */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-compra { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.badge-venda { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.badge-aberto { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(88, 166, 255, 0.4); }
.badge-fechado { background: rgba(139, 148, 158, 0.15); color: var(--text-secondary); border: 1px solid var(--border-color); }

/* --- TRADE TABLE --- */
.table-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.table-controls .form-input,
.table-controls .form-select {
  max-width: 200px;
}

.trades-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

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

.trades-table th {
  background: var(--bg-tertiary);
  padding: 0.75rem 0.6rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-color);
}

.trades-table th:hover {
  color: var(--text-primary);
}

.sort-indicator {
  font-size: 0.7rem;
}

.trades-table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.trades-table tr:hover td {
  background: rgba(88, 166, 255, 0.03);
}

.row-gain td { background: var(--green-bg); }
.row-loss td { background: var(--red-bg); }
.row-gain:hover td { background: rgba(46, 160, 67, 0.2) !important; }
.row-loss:hover td { background: rgba(218, 54, 51, 0.2) !important; }

.totals-row td {
  background: var(--bg-tertiary) !important;
  border-top: 2px solid var(--border-color);
  font-weight: 600;
}

.actions-cell {
  display: flex;
  gap: 0.25rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem !important;
  color: var(--text-muted);
  font-size: 1rem;
}

/* --- PAGINATION --- */
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.table-page-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pagination {
  display: flex;
  gap: 4px;
}

.btn-page {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-secondary);
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-page:hover:not(:disabled) {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-page.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.btn-page:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-dots {
  color: var(--text-muted);
  padding: 0 0.3rem;
}

/* --- TRADE PREVIEW --- */
.trade-preview {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
}

.price-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* --- CHARTS --- */
.chart-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.chart-period-btn {
  padding: 0.4rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all var(--transition);
}

.chart-period-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.chart-period-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.chart-card h4 {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.chart-wrapper {
  position: relative;
  height: 280px;
}

.chart-card.full-width {
  grid-column: 1 / -1;
}

/* --- REPORTS --- */
.report-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.report-nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-secondary);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
}

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

.report-period-btn {
  padding: 0.35rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all var(--transition);
}
.report-period-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.report-period-title {
  font-size: 1.1rem;
  font-weight: 600;
  flex: 1;
  text-align: center;
}

.report-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.report-section h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.report-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.report-stat {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}

.report-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.report-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.report-financial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.report-financial-card {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.gain-bg { background: var(--green-bg) !important; border-color: var(--green-border) !important; }
.loss-bg { background: var(--red-bg) !important; border-color: var(--red-border) !important; }
.gain-border { border-left: 3px solid var(--green); }
.loss-border { border-left: 3px solid var(--red); }

.financial-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.financial-value {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.financial-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.report-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.highlight-box {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.highlight-title { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.highlight-pair { font-size: 1.1rem; font-weight: 700; color: var(--blue); }
.highlight-pnl { font-size: 1.25rem; font-weight: 700; }
.highlight-meta { font-size: 0.8rem; color: var(--text-muted); }

.report-recommendation {
  padding: 1rem;
  border-radius: var(--radius);
  line-height: 1.7;
}

.rec-positive { background: var(--green-bg); border: 1px solid var(--green-border); }
.rec-negative { background: var(--red-bg); border: 1px solid var(--red-border); }

.report-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.report-empty p:first-child {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* --- NEWS --- */
.news-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.news-category-btn {
  padding: 0.35rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all var(--transition);
}
.news-category-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
.news-category-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.news-status {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.news-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.news-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.news-image {
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-tertiary);
}

.news-content {
  padding: 1rem;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.news-source { font-weight: 600; color: var(--blue); }

.news-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-title a {
  color: var(--text-primary);
}
.news-title a:hover { color: var(--blue); }

.news-body {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.news-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.news-tag {
  padding: 0.15rem 0.5rem;
  background: var(--bg-tertiary);
  border-radius: 20px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.news-error {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* --- SKELETON LOADING --- */
.skeleton {
  pointer-events: none;
}

.skeleton-image {
  height: 160px;
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 0.5rem;
}

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

/* --- SETTINGS --- */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.settings-card h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.storage-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 350px;
}

.toast-show {
  transform: translateX(0);
}

.toast-success { border-left: 3px solid var(--green); }
.toast-error { border-left: 3px solid var(--red); }
.toast-info { border-left: 3px solid var(--blue); }

.toast-icon { font-size: 1rem; }
.toast-success .toast-icon { color: var(--green); }
.toast-error .toast-icon { color: var(--red); }
.toast-info .toast-icon { color: var(--blue); }

/* --- FILE INPUTS (HIDDEN) --- */
.file-input-hidden {
  display: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .app-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
  }

  .nav-list {
    flex-direction: row;
    overflow-x: auto;
    gap: 0;
  }

  .nav-link {
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .nav-link.active {
    border-bottom-color: var(--blue);
    border-left-color: transparent;
  }

  .nav-text {
    display: none;
  }

  .main-content {
    max-height: none;
    padding: 1rem;
  }

  .charts-grid,
  .feedback-highlights,
  .report-highlights,
  .pairs-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .news-feed {
    grid-template-columns: 1fr;
  }

  .app-header {
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
  }

  .logo { font-size: 1.2rem; }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- SUBSECTION TITLES --- */
.subsection-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}
