/* public/css/style.css */

:root {
  --bg-color: #050505;
  --card-bg: #111;
  --text-main: #e0e0e0;
  --bingx-blue: #29b6f6;
  --mexc-red: #ff5252;
  --long-green: #00e676;
  --short-red: #ff1744;
  --border-color: #222;
  --gold-star: #ffca28;

  /* Layout Sizes */
  --filters-h: 74px;
  --col-ticker-min: 320px;
  --col-ticker-max: 320px;
  --col-strategy-min: 670px;
  --col-strategy-max: none;

  /* Colors */
  --spot-c: #4fc3f7;
  --fut-c: #ffca28;

  /* Layers */
  --z-base: 1;
  --z-sticky: 20;
  --z-row-hover: 10;
  --z-dropdown: 60;
  --z-tooltip: 120;
  --z-modal: 1000;
}

/* Reset Básico */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  background: radial-gradient(circle at top, #101010, #050505 70%);
  color: var(--text-main);
  font-family: "Segoe UI", "Roboto", sans-serif;
  margin: 0;
  font-size: 13px;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  justify-content: center;
}

.dashboard-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 5px;
  width: 100%;
  max-width: 1600px;
  min-width: 1100px;
  margin: 0 auto;
}

/* --- HEADER --- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.title-section h1 {
  font-size: 20px;
  margin: 0;
  letter-spacing: 2px;
  font-weight: 900;
  color: #fff;
}

.title-pro-tag {
  font-size: 12px;
  color: #666;
}

.header-meta-row {
  display: flex;
  gap: 15px;
  align-items: center;
}

.updated-time-value {
  color: #fff;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #8a8a8a;
  letter-spacing: 0.4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #666;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.logout-btn {
  margin-left: 20px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #222;
  color: #eee;
  cursor: pointer;
  transition: 0.15s;
}

.logout-btn:hover {
  border-color: #666;
  color: #fff;
}

.update-info {
  font-size: 10px;
  color: #666;
  font-weight: bold;
  margin-top: 2px;
  font-family: monospace;
}

.search-box input {
  background: #111;
  border: 1px solid #333;
  color: #fff;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 14px;
  width: 250px;
  outline: none;
  text-transform: uppercase;
  font-weight: bold;
  transition: border 0.3s;
}
.search-box input:focus {
  border-color: var(--bingx-blue);
}

/* --- USER DISPLAY --- */
.user-display {
  margin-left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
/* (Styles das tags de user ficam aqui ou no modal.css? Vamos manter aqui pois é do header) */
.user-display .tag {
  margin-left: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.6px;
}
.user-display .tag-user {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}
.user-display .tag-level-vip {
  color: #50a0ff;
  border: 1px solid rgba(80, 160, 255, 0.4);
  background: rgba(80, 160, 255, 0.15);
}
.user-display .tag-level-master,
.user-display .tag-level-MASTER {
  color: var(--fut-c);
  border: 1px solid rgba(255, 202, 40, 0.65);
  background: rgba(255, 202, 40, 0.12);
}
.user-display .tag-admin {
  cursor: pointer;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}
.user-display .tag-admin:hover {
  filter: brightness(1.15);
}

/* --- WRAPPER DA TABELA --- */
.table-wrapper {
  flex-grow: 1;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  background: linear-gradient(180deg, #111, #070707);
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.8);
}

/* --- BARRA DE FILTROS --- */
.table-filters {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: linear-gradient(180deg, #111, #080808);
  padding: 10px 20px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modern-filter-bar {
  display: flex;
  gap: 15px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.filter-group-relative {
  position: relative;
}

.filter-group-push-right {
  margin-left: auto;
}

.filter-group label {
  font-size: 9px;
  font-weight: bold;
  color: #777;
  letter-spacing: 0.5px;
}
.filter-group input {
  background: linear-gradient(180deg, #050505, #000);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  outline: none;
  width: 110px;
  transition: all 0.2s;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.9);
}
.filter-group input:focus {
  border-color: var(--bingx-blue);
  background: #02060a;
}

.filter-divider {
  width: 1px;
  height: 32px;
  background: #222;
  margin: 0 5px;
}

/* Select de Ordenação */
#sortSelect {
  background: linear-gradient(180deg, #151515, #090909);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ccc;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  outline: none;
  height: 30px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
#sortSelect option {
  background: #111;
  color: #eee;
}

/* Botões de Filtro */
.filter-btn {
  background: linear-gradient(180deg, #151515, #090909);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #aaa;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  height: 30px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
  transition: 0.15s;
}
.filter-btn:hover {
  background: linear-gradient(180deg, #1e1e1e, #101010);
  color: #fff;
}
.filter-btn.filter-active {
  background: linear-gradient(180deg, #39d98a, #18a85e);
  color: #001b0c;
  border-color: #39d98a;
}
.exchange-filter-btn {
  min-width: 180px;
  justify-content: space-between;
}

.filter-caret {
  font-size: 10px;
}

.checkbox-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11px;
  color: #ccc;
  background: #1a1a1a;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #333;
  transition: all 0.2s;
}

.checkbox-btn:hover {
  border-color: #555;
  color: #fff;
}

.checkbox-btn input:checked + span {
  color: #4caf50;
  font-weight: bold;
}

.input-w-80 {
  width: 80px;
}

.input-w-60 {
  width: 60px;
}

.input-w-50 {
  width: 50px;
}

.select-w-70 {
  width: 70px;
}

.select-w-110 {
  width: 110px;
}

.filter-btn.reset {
  background: #111;
  border-color: #222;
  color: #666;
  width: 100%;
}
.filter-btn.reset:hover {
  background: #cc3333;
  border-color: #ff5252;
  color: #fff;
}

/* Responsivo Mobile Simples */
@media (max-width: 768px) {
  body {
    overflow: auto;
  }
  .modern-filter-bar {
    flex-wrap: wrap;
  }
  .dashboard-container .table-wrapper {
    overflow: auto;
  }
}
