/* CryptoAbsorber 1s PRO - Estilo Apex (dark) */

:root {
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-sidebar: #14161d;
  --bg-hover: #232733;
  --border: #2a2e3d;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --green: #10b981;
  --blue: #3b82f6;
  --yellow: #f59e0b;
  --red: #ef4444;
  --sidebar-width: 250px;
}

* { box-sizing: border-box; }

body {
  background: var(--bg) !important;
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
  font-size: 14px;
}

/* APP WRAPPER */
.app-wrapper { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 20px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.nav-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 12px 6px;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.sidebar-nav .nav-link {
  color: var(--text-muted);
  padding: 9px 12px;
  border-radius: 6px;
  margin-bottom: 2px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.15s;
}

.sidebar-nav .nav-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.sidebar-nav .nav-link.active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
}

.sidebar-nav .nav-link i { font-size: 1rem; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.avatar {
  width: 36px; height: 36px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #000;
}

/* MAIN */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* TOPBAR */
.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar h5 { color: var(--text); font-weight: 600; }

/* CONTENT */
.content { padding: 24px; flex: 1; }

/* CARDS */
.card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px;
  color: var(--text);
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 16px 20px;
  color: var(--text);
}

.card-body { padding: 20px; }

/* STAT CARDS */
.stat-card { transition: transform 0.15s; }
.stat-card:hover { transform: translateY(-2px); }

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}

.stat-value { font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-trend { font-size: 0.75rem; font-weight: 600; }
.stat-trend .text-secondary { font-weight: 400; }

.bg-success-subtle { background: rgba(16, 185, 129, 0.15) !important; }
.bg-info-subtle { background: rgba(59, 130, 246, 0.15) !important; }
.bg-warning-subtle { background: rgba(245, 158, 11, 0.15) !important; }
.bg-danger-subtle { background: rgba(239, 68, 68, 0.15) !important; }

/* TABLES */
.table { color: var(--text); margin-bottom: 0; }
.table thead th {
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 12px 20px;
}
.table tbody td {
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  vertical-align: middle;
  font-size: 0.85rem;
}
.table tbody tr:hover { background: var(--bg-hover); }
.table tbody tr:last-child td { border-bottom: none; }

/* ACTIVITY */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

/* DOT (legenda) */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* PROGRESS */
.progress { background: var(--bg-hover); border-radius: 4px; }

/* FORMS */
.form-control, .form-select, .input-group-text {
  background: var(--bg) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.form-control:focus, .form-select:focus {
  background: var(--bg) !important;
  color: var(--text) !important;
  border-color: var(--green) !important;
  box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.15);
}
.form-check-input {
  background-color: var(--bg);
  border-color: var(--border);
}
.form-check-input:checked {
  background-color: var(--green);
  border-color: var(--green);
}

/* BUTTONS */
.btn-outline-secondary {
  border-color: var(--border);
  color: var(--text-muted);
}
.btn-outline-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text);
}
.btn-success { background: var(--green); border-color: var(--green); }
.btn-success:hover { background: #0ea371; border-color: #0ea371; }

/* BADGES */
.badge.bg-success-subtle { color: var(--green) !important; }
.badge.bg-danger-subtle { color: var(--red) !important; }
.badge.bg-warning-subtle { color: var(--yellow) !important; }
.badge.bg-info-subtle { color: var(--blue) !important; }

/* ALERTS */
.alert { border-radius: 8px; border: 1px solid var(--border); }

/* LOGIN */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px;
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-logo {
  width: 64px; height: 64px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 2rem;
  color: var(--green);
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-sidebar); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3e4d; }

/* RESPONSIVE */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
}

/* ============ PULSE DOT (status do robo) ============ */
.pulse-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.pulse-dot.bg-success::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

#log-feed {
  max-height: 400px;
  overflow-y: auto;
}

/* ============ PULSE DOT (status do robo) ============ */
.pulse-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.pulse-dot.bg-success::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

#log-feed {
  max-height: 400px;
  overflow-y: auto;
}

/* ============ PULSE DOT (status do robo) ============ */
.pulse-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.pulse-dot.bg-success::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

#log-feed {
  max-height: 400px;
  overflow-y: auto;
}
