/* stock-filter.css — page-specific styles for /ftf/app/stock-filter/ */
/* Re-uses the dark fintech tokens established by dashboard.css. */

body.ftf-body {
  background: #0a0a0a;
  color: rgba(255, 255, 255, 0.85);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 13px;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* ==== Header ==== */
.ftf-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid #1a1a1a;
  background: #0a0a0a;
}
.ftf-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.ftf-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.85);
}
.ftf-brand-line1 { font-size: 11px; color: rgba(255,255,255,0.55); }
.ftf-brand-line2 { font-size: 11px; color: rgba(255,255,255,0.55); }
.ftf-page-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-left: 12px;
}
.ftf-header-action {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: rgba(20, 20, 20, 0.7);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 140ms ease;
}
.ftf-header-action:hover {
  background: rgba(125, 211, 252, 0.08);
  border-color: rgba(125, 211, 252, 0.45);
  color: #fff;
}

/* ==== Freshness badge (Task 4) ==== */
.ftf-freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 12px;
  padding: 4px 10px;
  background: rgba(20, 20, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}
.ftf-freshness-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7dd3fc;
}
.ftf-freshness-badge.is-stale::before { background: #f59e0b; }
.ftf-freshness-badge.is-missing::before { background: #6b7280; }
.ftf-freshness-badge.is-missing { color: rgba(255,255,255,0.35); }
#ftf-freshness-date { color: rgba(255,255,255,0.78); }

/* ==== Shell ==== */
.ftf-sf-shell {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 14px 16px;
}

/* ==== Filter bar ==== */
.ftf-sf-filters {
  background: #0f0f0f;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.ftf-sf-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.ftf-sf-filter-row:last-child { margin-bottom: 0; }
.ftf-sf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ftf-sf-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ftf-sf-field input,
.ftf-sf-field select {
  background: #141414;
  color: rgba(255,255,255,0.9);
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color 140ms;
}
.ftf-sf-field input:focus,
.ftf-sf-field select:focus {
  border-color: rgba(125, 211, 252, 0.6);
}
.ftf-sf-field input::placeholder { color: rgba(255,255,255,0.25); }
.ftf-sf-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0 0 0 8px;
  padding: 7px 12px;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  user-select: none;
  font-size: 12px;
}
.ftf-sf-checkbox:hover {
  border-color: rgba(125,211,252,0.45);
  color: rgba(255,255,255,0.95);
}
.ftf-sf-checkbox input { margin: 0; }
.ftf-sf-filter-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid #1a1a1a;
}
.ftf-sf-btn {
  background: #141414;
  color: rgba(255,255,255,0.85);
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms ease;
}
.ftf-sf-btn:hover {
  background: rgba(125, 211, 252, 0.08);
  border-color: rgba(125, 211, 252, 0.45);
}
.ftf-sf-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ftf-sf-btn-primary {
  background: rgba(125, 211, 252, 0.15);
  border-color: rgba(125, 211, 252, 0.45);
  color: #fff;
}
.ftf-sf-btn-primary:hover {
  background: rgba(125, 211, 252, 0.25);
}
.ftf-sf-meta {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  font-family: ui-monospace, Menlo, monospace;
}

/* ==== Inline chart panel ==== */
.ftf-sf-chart-panel {
  position: relative;  /* containing block for absolutely-positioned #ticker-chart from chart-subsystem */
  background: #0f0f0f;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: max-height 220ms ease;
  max-height: 360px;
}
.ftf-sf-chart-panel.ftf-sf-chart-collapsed {
  max-height: 60px;
}
.ftf-sf-chart-panel.ftf-sf-chart-collapsed .ftf-sf-chart-host {
  display: none;
}
.ftf-sf-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #1a1a1a;
  position: relative;
  z-index: 10;
}
.ftf-sf-chart-collapsed .ftf-sf-chart-header {
  border-bottom: none;
}
.ftf-sf-chart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
}
.ftf-sf-chart-icon {
  color: rgba(125,211,252,0.6);
  transition: transform 220ms ease;
}
.ftf-sf-chart-panel:not(.ftf-sf-chart-collapsed) .ftf-sf-chart-icon {
  transform: rotate(90deg);
}
.ftf-sf-chart-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ftf-sf-chart-link {
  font-size: 11px;
  color: rgba(125,211,252,0.85);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.ftf-sf-chart-link:hover { color: #fff; }
.ftf-sf-chart-close {
  background: transparent;
  color: rgba(255,255,255,0.55);
  border: 1px solid transparent;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ftf-sf-chart-close:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.ftf-sf-chart-host {
  height: 290px;
  position: relative;
}

/* ==== Results table ==== */
.ftf-sf-results {
  background: #0f0f0f;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
}
.ftf-sf-table-wrap {
  max-height: calc(100vh - 410px);
  min-height: 220px;
  overflow-y: auto;
  overflow-x: auto;
}
.ftf-sf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ftf-sf-table th {
  background: #141414;
  color: rgba(255,255,255,0.55);
  text-align: left;
  padding: 10px 14px;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid #1a1a1a;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.ftf-sf-table th[data-sort] {
  cursor: pointer;
  user-select: none;
}
.ftf-sf-table th[data-sort]:hover {
  color: rgba(255,255,255,0.85);
}
.ftf-sf-table th.ftf-sf-num {
  text-align: right;
}
.ftf-sf-table tbody tr {
  border-bottom: 1px solid #1a1a1a;
  cursor: pointer;
  transition: background 100ms;
  border-left: 3px solid transparent;
}
.ftf-sf-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}
.ftf-sf-table tbody tr.ftf-sf-active {
  background: rgba(125, 211, 252, 0.05);
  border-left-color: #7dd3fc;
}
.ftf-sf-table td {
  padding: 9px 14px;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
}
.ftf-sf-table td.ftf-sf-num {
  text-align: right;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
}
.ftf-sf-ticker {
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}
.ftf-sf-company {
  color: rgba(255,255,255,0.7);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ftf-sf-muted { color: rgba(255,255,255,0.35); }
.ftf-sf-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.ftf-sf-pill-data {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.ftf-sf-pill-no-data {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.35);
}
.ftf-sf-loading,
.ftf-sf-empty,
.ftf-sf-error {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
}
.ftf-sf-error { color: #fca5a5; }

/* ==== Pagination ==== */
.ftf-sf-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid #1a1a1a;
  background: #0f0f0f;
}
.ftf-sf-page-info {
  font-size: 12px;
  font-family: ui-monospace, Menlo, monospace;
  color: rgba(255,255,255,0.55);
  min-width: 120px;
  text-align: center;
}
