.sgmm-wrap { max-width: 1100px; margin: 40px auto; padding: 0 16px; }
.sgmm-header { margin-bottom: 14px; text-align: center; }
.sgmm-title { font-size: 28px; font-weight: 700; }
.sgmm-sub { margin-top: 6px; color: #666; }

.sgmm-tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 18px 0 22px; }
.sgmm-tab { display: inline-block; padding: 8px 14px; border: 1px solid #d8dee6; border-radius: 10px; text-decoration: none; color: #111; background: #fff; }
.sgmm-tab.is-active { border-color: #111; box-shadow: 0 1px 0 rgba(0,0,0,0.06); font-weight: 700; }

.sgmm-panel { margin-top: 6px; }
.sgmm-h2 { font-size: 22px; margin: 0 0 14px; }

.sgmm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .sgmm-cards { grid-template-columns: 1fr; } }

.sgmm-card { border: 1px solid #edf0f4; border-radius: 14px; background: #fff; overflow: hidden; }
.sgmm-card-title { padding: 12px 14px; font-weight: 700; border-bottom: 1px solid #f0f3f7; }
.sgmm-card-body { padding: 12px 14px; color: #222; white-space: pre-wrap; }

.sgmm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sgmm-table th, .sgmm-table td { padding: 10px 12px; border-bottom: 1px solid #f0f3f7; text-align: left; }
.sgmm-table th { font-weight: 700; color: #333; background: #fafbfd; }

.sgmm-btn { padding: 8px 12px; border: 1px solid #d8dee6; border-radius: 10px; background: #fff; cursor: pointer; margin-right: 8px; }
.sgmm-btn:hover { border-color: #111; }

.sgmm-note { margin-top: 10px; color: #666; font-size: 13px; }
.sgmm-pre { margin: 0; padding: 12px 14px; background: #0b1220; color: #e7eefc; border-radius: 12px; overflow: auto; }



/* Minimal fallback styles for CoinStore MM dashboard.
   If you already have a richer sg-mm-dashboard.css on server, keep using it. */
body .sgmm-wrap { max-width: 1200px; margin: 0 auto; padding: 16px; }
body .sgmm-nav a { margin-right: 10px; text-decoration: none; }
body .sgmm-card { border: 1px solid rgba(0,0,0,.15); border-radius: 10px; padding: 12px; margin: 10px 0; }
body .sgmm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
table.sgmm-table { width: 100%; border-collapse: collapse; }
table.sgmm-table th, table.sgmm-table td { border-bottom: 1px solid rgba(0,0,0,.12); padding: 8px; text-align: left; }

/* ==============================
   Dark theme overrides (match Overview)
   ============================== */

html, body {
  background: #0b0f13 !important;
  color: #e8e8e8;
}

.sgmm-wrap,
.sgmm-page,
.sgmm-panel,
.sgmm-content {
  background: transparent !important;
  color: inherit;
}

.sgmm-card,
.sgmm-box,
.sgmm-section,
.sgmm-table-wrap,
.sgmm-marketwatch,
.sgmm-market-watch {
  background: #1e2327 !important;
  border: 1px solid #2b3238 !important;
  color: #e8e8e8 !important;
}

table,
.sgmm-table {
  background: transparent !important;
  color: #e8e8e8 !important;
}

table thead th,
.sgmm-table thead th {
  background: #171b1f !important;
  color: #f0f0f0 !important;
  border-color: #2b3238 !important;
}

table tbody td,
.sgmm-table tbody td {
  border-color: #2b3238 !important;
}

table tbody tr:hover,
.sgmm-table tbody tr:hover {
  background: rgba(255,255,255,0.04) !important;
}

input, select, textarea {
  background: #11161b !important;
  color: #e8e8e8 !important;
  border: 1px solid #2b3238 !important;
}

input::placeholder, textarea::placeholder {
  color: rgba(232,232,232,0.55);
}

button,
.sgmm-btn,
.sgmm-button,
input[type="button"],
input[type="submit"] {
  background: #ffffff !important;
  color: #111 !important;
  border: 1px solid rgba(255,255,255,0.7) !important;
}

button:hover,
.sgmm-btn:hover,
.sgmm-button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  filter: brightness(0.92);
}

/* Open Orders: kill bright wrappers if any */
#sgmm-orders,
#sgmm-orders .sgmm-box,
#sgmm-orders .sgmm-card,
#sgmm-orders .sgmm-section,
#sgmm-orders .sgmm-panel,
#sgmm-orders .sgmm-content {
  background: transparent !important;
}

/* Keep the top nav buttons readable */
.sgmm-tabs a,
.sgmm-tabs button {
  background: #ffffff !important;
  color: #111 !important;
}

.sgmm-mw-alert {
  color: #ffdddd !important;
}