/* PBO Invest — Components
   Buttons, cards, forms, tables, badges, timeline, market strip,
   calendar, manager card, stats, account cards, signal badges, audio */

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn:hover { border-color: var(--border-light); color: var(--text-primary); }
.btn i { font-size: 14px; }

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #0A1F0A;
  font-weight: 600;
}

.btn-primary:hover { opacity: 0.9; color: #0A1F0A; }

.btn-call { border-color: var(--green); color: var(--green); }
.btn-call:hover { background: var(--green-dim); color: var(--green); }

.btn-icon {
  padding: 7px 10px;
  position: relative;
}

.notification-dot::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ===================== STATUS ===================== */
.status-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
}

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

/* ===================== STATS ROW ===================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.stat-card { padding: 20px 24px; }
.theme-tr .stat-card { background: var(--bg-card); }
.theme-crm .stat-card { background: var(--crm-bg-card); }

.stat-label {
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 24px; font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 6px;
  padding: 2px 6px;
  border-radius: 2px;
}

.stat-change.positive { color: var(--green); background: var(--green-dim); }
.stat-change.negative { color: var(--red); background: var(--red-dim); }

.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===================== ACCOUNT CARDS ===================== */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.account-card {
  padding: 20px;
  cursor: pointer;
  transition: background 0.15s;
}

.theme-tr .account-card { background: var(--bg-card); }
.theme-tr .account-card:hover { background: var(--bg-hover); }
.theme-crm .account-card { background: var(--crm-bg-card); }
.theme-crm .account-card:hover { background: var(--crm-bg-hover); }

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.account-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.tier-badge {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 3px 8px; border-radius: 2px;
  color: #fff;
}

.tier-mini { background: linear-gradient(135deg, #6B1D34, #B84D6A); }
.tier-standard { background: linear-gradient(135deg, #245E4A, #4CA882); }
.tier-classic { background: linear-gradient(135deg, #1A3C34, #2E7D5E); }
.tier-pro { background: linear-gradient(135deg, #A3832B, #D4B968); color: #1A1400; }
.tier-quantum { background: linear-gradient(135deg, #0A1F1A, #C9A84C); }

.account-balance {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.account-pnl { font-family: var(--font-mono); font-size: 12px; }
.account-pnl.positive { color: var(--green); }
.account-pnl.negative { color: var(--red); }

.account-meta {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-muted);
}

.account-meta-value {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.account-card-new {
  padding: 20px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; min-height: 160px;
  transition: background 0.15s;
}

.theme-tr .account-card-new { background: var(--bg-card); }
.theme-tr .account-card-new:hover { background: var(--bg-hover); }
.theme-crm .account-card-new { background: var(--crm-bg-card); }
.theme-crm .account-card-new:hover { background: var(--crm-bg-hover); }

.account-card-new-icon {
  width: 40px; height: 40px;
  border: 1px dashed var(--border-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 20px;
  margin-bottom: 10px;
}

.account-card-new-text { font-size: 12px; color: var(--text-muted); }

/* ===================== MARKET STRIP ===================== */
.market-strip {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.market-strip-header, .panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted);
}

.theme-tr .market-strip-header, .theme-tr .panel-header { background: var(--bg-card); }
.theme-crm .market-strip-header, .theme-crm .panel-header { background: var(--crm-bg-card); }

.market-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.market-item:last-child { border-bottom: none; }
.theme-tr .market-item { background: var(--bg-card); }
.theme-tr .market-item:hover { background: var(--bg-hover); }
.theme-crm .market-item { background: var(--crm-bg-card); }
.theme-crm .market-item:hover { background: var(--crm-bg-hover); }

.market-symbol {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
}

.market-name { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.market-price {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  text-align: right;
}

.market-change {
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: right;
  margin-top: 1px;
}

.market-change.positive { color: var(--green); }
.market-change.negative { color: var(--red); }

/* ===================== MANAGER CARD ===================== */
.manager-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.theme-tr .manager-card { background: var(--bg-card); }
.theme-crm .manager-card { background: var(--crm-bg-card); }

.manager-card-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.manager-info { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.manager-avatar {
  width: 40px; height: 40px;
  border-radius: 50%; background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  color: var(--text-secondary);
  position: relative;
}

.manager-online {
  position: absolute; bottom: 0; right: 0;
  width: 10px; height: 10px;
  border-radius: 50%; background: var(--green);
}

.theme-tr .manager-online { border: 2px solid var(--bg-card); }
.theme-crm .manager-online { border: 2px solid var(--crm-bg-card); }

.manager-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.manager-email { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.manager-btn {
  width: 100%; padding: 9px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  cursor: pointer;
}

.manager-btn:hover { border-color: var(--border-light); color: var(--text-primary); }

/* ===================== CALENDAR ===================== */
.calendar-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.calendar-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.calendar-item:last-child { border-bottom: none; }
.theme-tr .calendar-item { background: var(--bg-card); }
.theme-crm .calendar-item { background: var(--crm-bg-card); }

.calendar-time {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; padding-top: 1px;
}

.calendar-event-name { font-size: 12px; color: var(--text-primary); font-weight: 500; }
.calendar-event-country { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.calendar-impact { margin-left: auto; display: flex; gap: 2px; padding-top: 3px; }
.calendar-impact-dot { width: 6px; height: 6px; border-radius: 1px; background: var(--border-light); }
.calendar-impact-dot.active { background: var(--gold); }

/* ===================== STATUS TAGS ===================== */
.status-tag {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: 2px;
  display: inline-block;
}

.status-deposited { background: var(--green-dim); color: var(--green); }
.status-kyc-verified { background: var(--blue-dim); color: var(--blue); }
.status-active { background: var(--green-dim); color: var(--green); }
.status-pending { background: var(--gold-dim); color: var(--gold); }

/* ===================== SIGNAL BADGES ===================== */
.signal-badges {
  display: flex; gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.signal-badge {
  font-size: 10px; font-weight: 500;
  padding: 4px 8px; border-radius: 2px;
  border: 1px solid;
}

.signal-hot { border-color: var(--green); color: var(--green); background: var(--green-dim); }
.signal-warm { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }

/* ===================== TABLES ===================== */
table { width: 100%; border-collapse: collapse; }

thead th {
  position: sticky; top: 0;
  padding: 8px 16px; text-align: left;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.theme-tr thead th { background: var(--bg-card); }
.theme-crm thead th { background: var(--crm-bg-card); }

thead th:last-child { text-align: right; }

tbody td {
  padding: 8px 16px; font-size: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tbody td:last-child { text-align: right; }

.theme-tr tbody tr:hover { background: var(--bg-hover); }
.theme-crm tbody tr:hover { background: var(--crm-bg-hover); }

.td-symbol { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); }
.td-mono { font-family: var(--font-mono); }
.td-buy { color: var(--green); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.td-sell { color: var(--red); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.td-pnl-pos { font-family: var(--font-mono); color: var(--green); font-weight: 600; }
.td-pnl-neg { font-family: var(--font-mono); color: var(--red); font-weight: 600; }

/* ===================== FORM ELEMENTS ===================== */
.form-input {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  width: 100%;
}

.form-input:focus { border-color: var(--border-light); }

.form-label {
  font-size: 11px; color: var(--text-muted);
  font-weight: 500; margin-bottom: 4px;
}

/* ===================== TIMELINE ===================== */
.timeline-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
}

.timeline-filters {
  display: flex; gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.timeline-filter-btn {
  padding: 5px 12px;
  color: var(--text-muted);
  font-size: 11px; cursor: pointer;
  border: none;
  font-family: var(--font-body); font-weight: 500;
}

.theme-tr .timeline-filter-btn { background: var(--bg-card); }
.theme-crm .timeline-filter-btn { background: var(--crm-bg-card); }
.timeline-filter-btn:hover { color: var(--text-secondary); }
.timeline-filter-btn.active { color: var(--text-primary); }
.theme-tr .timeline-filter-btn.active { background: var(--bg-hover); }
.theme-crm .timeline-filter-btn.active { background: var(--crm-bg-hover); }

.timeline-date {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.timeline-entry {
  display: flex; gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-entry:last-child { border-bottom: none; }

.timeline-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
  font-size: 14px;
}

.timeline-icon.deposit { background: var(--green-dim); color: var(--green); }
.timeline-icon.withdrawal { background: var(--red-dim); color: var(--red); }
.timeline-icon.trade { background: var(--blue-dim); color: var(--blue); }
.timeline-icon.call { background: var(--purple-dim); color: var(--purple); }
.timeline-icon.email { background: var(--gold-dim); color: var(--gold); }
.timeline-icon.note { background: rgba(138,148,144,0.12); color: var(--text-secondary); }
.timeline-icon.login { background: rgba(138,148,144,0.08); color: var(--text-muted); }
.timeline-icon.kyc { background: var(--blue-dim); color: var(--blue); }
.timeline-icon.status-change { background: var(--gold-dim); color: var(--gold); }

.timeline-body { flex: 1; min-width: 0; }

.timeline-entry-header {
  display: flex; align-items: baseline;
  gap: 8px; margin-bottom: 3px;
}

.timeline-entry-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.timeline-entry-time {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted);
  margin-left: auto; flex-shrink: 0;
}

.timeline-entry-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

.timeline-entry-meta {
  margin-top: 6px;
  display: flex; gap: 16px; flex-wrap: wrap;
}

.timeline-meta-item { font-size: 11px; color: var(--text-muted); }
.timeline-meta-item span { font-family: var(--font-mono); color: var(--text-secondary); }
.timeline-meta-item span.green { color: var(--green); }
.timeline-meta-item span.red { color: var(--red); }

.timeline-entry-tag {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 6px; border-radius: 2px;
  margin-top: 6px;
}

.tag-interested { background: var(--green-dim); color: var(--green); }
.tag-callback { background: var(--gold-dim); color: var(--gold); }
.tag-important { background: var(--red-dim); color: var(--red); }
.tag-general { background: rgba(138,148,144,0.12); color: var(--text-secondary); }
.tag-opened { background: var(--green-dim); color: var(--green); }

/* Audio mini player */
.audio-mini {
  margin-top: 6px;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
}

.theme-tr .audio-mini { background: var(--bg-card); }
.theme-crm .audio-mini { background: var(--crm-bg-card); }

.audio-play-btn {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  font-size: 10px;
}

.audio-bar {
  width: 120px; height: 3px;
  background: var(--border); border-radius: 2px;
  position: relative;
}

.audio-bar-fill {
  position: absolute; left: 0; top: 0;
  height: 100%; width: 35%;
  background: var(--text-secondary); border-radius: 2px;
}

.audio-duration {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--text-muted);
}
