/* ===================================================================
   m3j-theme.css — Estilo padrão M3J (inspirado Binance)
   Compartilhado entre todas as telas do painel.
   =================================================================== */

:root {
  --bg: #0b0e11;
  --bg-gradient: #0b0e11;
  --card-bg: #1e2329;
  --card-gradient: #1e2329;
  --text: #eaecef;
  --muted: #848e9c;
  --border: #2b3139;
  --accent: #f0b90b;
  --shadow: 0 8px 24px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-gradient);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.muted { color: var(--muted); !important }

/* ===== HEADER (ESTILO BINANCE) ===== */
.header-box {
  position: relative;
  padding: 14px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e2329 0%, #181a20 100%);
  border: 1px solid #2b3139;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  color: #eaecef;
  overflow: visible;
  margin-bottom: 16px;
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 992px) {
  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.header-text-block { max-width: 520px; }

.header-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.header-title {
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f9fafb;
}

.header-title i { color: var(--accent); }

.header-subtitle {
  font-size: 0.78rem;
  color: rgba(148, 152, 160, 0.85);
  line-height: 1.4;
}

.chip {
  background: #181a20;
  border: 1px solid rgba(240, 185, 11, 0.45);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== FILTROS CARD ===== */
.filters-area .form-select,
.filters-area .form-control {
  font-size: 0.8rem;
  background-color: #181a20;
  border: 1px solid #2b3139;
  color: #eaecef;
}

.filters-area .form-select:focus,
.filters-area .form-control:focus {
  box-shadow: 0 0 0 1px var(--accent);
  border-color: var(--accent);
  background-color: #181a20;
  color: #eaecef;
}

.filters-card {
  max-width: 260px;
  background: #1e2329;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  border: 1px solid #2b3139;
}

.filters-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(248, 250, 252, 0.7);
  margin-bottom: 3px;
}

/* ===== FORMULÁRIOS ===== */
.form-control, .form-control:focus {
  background-color: #181a20;
  border-color: #2b3139;
  color: #eaecef;
  font-size: 0.9rem;
}

.form-control:focus {
  box-shadow: 0 0 0 1px var(--accent);
}

.form-check-input {
  background-color: #2b3139;
  border-color: #3b4353;
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

/* ===== BOTÕES ===== */
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #181a20;
  font-weight: 600;
}

.btn-accent:hover {
  background: #d6a50a;
  border-color: #d6a50a;
  color: #181a20;
}

.btn-outline-accent {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline-accent:hover {
  background: var(--accent);
  color: #181a20;
}

/* ===== MODAL (DARK) ===== */
.modal-content.bg-dark-custom {
  background: #1e2329;
  border: 1px solid #2b3139;
}

.modal-content.bg-dark-custom .modal-header,
.modal-content.bg-dark-custom .modal-footer {
  border-color: #2b3139;
}

.modal-content.bg-dark-custom .btn-close {
  filter: invert(0.8);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 8px 0 12px;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid #2b3139;
  background: #181a20;
}

/* ===== TOAST NOTIFICATION (ESTILO BINANCE) ===== */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.m3j-toast {
  pointer-events: auto;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: toastIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
  max-width: 420px;
}

.m3j-toast.success { background: rgba(14, 203, 129, 0.95); color: #052e16; }
.m3j-toast.error { background: rgba(246, 70, 93, 0.95); color: #fff; }
.m3j-toast.info { background: rgba(59, 130, 246, 0.95); color: #fff; }
.m3j-toast.warning { background: rgba(240, 185, 11, 0.95); color: #181a20; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.m3j-toast.removing {
  animation: toastOut 0.25s ease-in forwards;
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

/* ===== SKELETON LOADING ===== */
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-card {
  height: 200px;
  margin-bottom: 16px;
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  width: 80%;
}

.skeleton-text-sm {
  height: 10px;
  margin-bottom: 6px;
  width: 60%;
}

.skeleton-row {
  height: 48px;
  margin-bottom: 8px;
  width: 100%;
}

/* ===== SCROLLBAR DARK ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0b0e11; }
::-webkit-scrollbar-thumb { background: #3b4353; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4a5568; }
