/* User Dashboard Plugin Styles (v2.2) */
:root {
  --bg: #ffffff;
  --bg-2: #f7f8fc;
  --card: #ffffff;
  --muted: #6b7280;
  --accent: #2563eb; /* primary */
  --accent-2: #16a34a; /* positive */
  --accent-3: #ea580c; /* accent */
  --text: #1f2937;     /* dark text */
  --border: rgba(0,0,0,0.08);
  --shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Scoped reset for better responsive behavior */
.udp-wrapper *,
.udp-wrapper *::before,
.udp-wrapper *::after { box-sizing: border-box; }

.udp-wrapper,
.udp-guest {
  color: var(--text);
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

.udp-navigation {
  display: flex;
  gap: 10px;
  background: var(--bg-2);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.udp-tab-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform .05s ease, background .2s ease, border-color .2s ease;
}
.udp-tab-btn:hover { background: #f3f4f6; border-color: rgba(0,0,0,.12); }
.udp-tab-btn[aria-selected="true"] { background: #e8eefc; border-color: #c7d2fe; }

/* Sections */
.udp-section { display: none; margin-top: 16px; }
.udp-section.active { display: block; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
}
.card-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: 8px; }

/* Tables */
.kv { width: 100%; border-collapse: collapse; }
.kv td { padding: 10px 8px; border-bottom: 1px dashed var(--border); }

.table-wrap { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; }
.data th, .data td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
.data tr:hover { background: rgba(0,0,0,0.03); }

/* Smaller font for table rows */
.data tr, .kv tr { font-size: 13px; }

/* Badges / Highlights */
.badge { background: #eef2ff; padding: 6px 10px; border-radius: 6px; color: #1f2937; font-weight: 600; border: 1px solid #e5e7eb; }
.highlight { background: #e5f3ff; padding: 6px 10px; border-radius: 6px; font-weight: 700; color: #111827; border: 1px solid #dbeafe; }
.value-highlight { background: #f3f4f6; padding: 8px 12px; border-radius: 8px; font-weight: 700; display: inline-block; color: #111827; border: 1px solid #e5e7eb; }
.value-highlight.pos { color: var(--accent-2); }
.value-highlight.accent { color: var(--accent-3); }

.wallet-row { display:flex; gap: 10px; align-items:center; flex-wrap: wrap; }

/* Buttons */
.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  transition: background .2s ease, transform .05s ease;
}
.btn:hover { background: #1d4ed8; }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 8px 10px; font-size: 13px; }
.btn.link { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.link:hover { background: rgba(37,99,235,.08); }

.muted { color: var(--muted); }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* Embeds */
.embed-wrap iframe {
  width: 100%;
  height: 536px;
  border: none;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Docs */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-item { display:flex; align-items:center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.doc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }

/* Grid */
.udp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* Responsive */
@media (max-width: 900px) {
  .udp-grid { grid-template-columns: 1fr; }
}

/* Tablet */
@media (max-width: 768px) {
  .container { margin: 16px auto; padding: 0 12px; }
  .udp-navigation { overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 8px; }
  .udp-navigation::-webkit-scrollbar { display: none; }
  .udp-tab-btn { flex: 0 0 auto; padding: 10px 12px; }
  .embed-wrap iframe { height: 420px; }
  .doc-item { flex-direction: column; align-items: flex-start; }
  .doc-name { max-width: 100%; white-space: normal; }
}

/* Mobile */
@media (max-width: 600px) {
  .udp-navigation { padding: 8px; }
  .btn { padding: 10px 12px; }
  .kv td { padding: 8px 6px; }

  /* Keep transaction table in one line with horizontal scroll */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data { min-width: 560px; border-collapse: collapse; }
  .data thead { display: table-header-group; }
  .data tr { display: table-row; }
  .data td, .data th { display: table-cell; white-space: nowrap; }

  /* Inside Account/Portfolio, keep row on one line; allow inner scroll */
  .kv { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .kv td { white-space: nowrap; }
  .wallet-row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .embed-wrap iframe { height: 320px; }
}

@media (max-width: 400px) {
  .udp-tab-btn { font-size: 14px; }
  .card { padding: 14px; }
}


/* Neutralize theme/page background when dashboard is active */
body.udp-no-gradient {
  background: #ffffff !important;
  background-image: none !important;
}

