/* ============================================================
   Cigaal Wallet pages — shared 2026 fintech refresh
   Applies to wallet/*.html pages that use the cigaal-dark palette.
   Theme engine (static/js/script.js) writes inline colors on
   headings/paragraphs/spans/links — readability-critical colors
   below use !important. No markup contract is changed here.
   ============================================================ */

:root {
  --w-card: #1c1c33;
  --w-card-2: #232340;
  --w-line: rgba(255, 255, 255, .09);
  --w-glass: rgba(255, 255, 255, .045);
  --w-text: #f2f6fc;
  --w-muted: rgba(255, 255, 255, .62);
  --w-faint: rgba(255, 255, 255, .40);
  --w-blue: #3396ff;
  --w-green: #34d399;
  --w-red: #fb7185;
  --w-gold: #f8b24f;
  --w-violet: #a78bfa;
  --card-bg: #1c1c33;
  --card-border: rgba(255, 255, 255, .09);
}

/* ---------- surfaces ---------- */
.bg-cigaal-dark-600.rounded-2xl,
.bg-cigaal-dark-600.rounded-xl {
  border: 1px solid var(--w-line);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .32);
}
.bg-cigaal-dark-700.rounded-xl,
.bg-cigaal-dark-700.rounded-lg {
  border: 1px solid var(--w-line);
}

/* ---------- typography (beat inline theme colors) ---------- */
h1, h2, h3, h4 { color: var(--w-text) !important; }
.text-cigaal-dark-100, .text-cigaal-dark-200 { color: var(--w-muted) !important; }
p { color: var(--w-muted) !important; }
strong, b { color: inherit; }

/* white inside visually-white text already handled by tailwind;
   keep utility colors readable on dark surfaces */
.text-cigaal-blue-400 { color: var(--w-blue) !important; }
.text-zoo-coin-500    { color: var(--w-gold) !important; }

/* ---------- left wallet menu ---------- */
.vertical-menu-item { border-radius: 12px !important; text-decoration: none; transition: background .15s ease, color .15s ease; }
.vertical-menu-item:hover { background: rgba(255,255,255,.07) !important; }
.vertical-menu-item.active {
  background: linear-gradient(90deg, #0066ff, #0052cc) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(0, 102, 255, .35);
}
.vertical-menu-item:not(.active) { color: rgba(255,255,255,.66) !important; }
.vertical-menu-item:not(.active):hover { color: #fff !important; }

/* ---------- premium upsell ---------- */
.premium-plan {
  margin-top: 24px;
  background: linear-gradient(135deg, rgba(168,85,247,.22), rgba(51,150,255,.10));
  border: 1px solid rgba(168,85,247,.30);
  border-radius: 16px; padding: 16px;
}
.premium-plan h3 { color: #c4b5fd !important; font-size: 15px; font-weight: 700; }
.premium-plan p  { color: var(--w-muted) !important; font-size: 12.5px; }
.premium-plan .upgrade-btn {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
  color: #fff !important; border: none; border-radius: 11px;
  width: 100%; padding: 10px; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ---------- form fields ---------- */
.input-field {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input-field:focus {
  border-color: #0066ff;
  box-shadow: 0 0 0 3px rgba(0,102,255,.22);
  outline: none;
}
input::placeholder, textarea::placeholder { color: var(--w-faint); }

/* ---------- tiles / rows ---------- */
.method-card, .transaction-item, .filter-chip {
  border: 1px solid var(--w-line);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.method-card { color: var(--w-text) !important; }
.bg-zoo-coin-500 { color: #fff !important; }
.method-card:hover, .transaction-item:hover { border-color: rgba(51,150,255,.45); }
.transaction-item { background: var(--w-glass); border-radius: 12px; }

/* ---------- responsive ---------- */
.dash-cols > * { min-width: 0; }
.allmarket { overflow-x: hidden; }
@media (max-width: 900px) {
  body { overflow-x: hidden; }
}
@media (max-width: 1200px) {
  .dash-cols { flex-direction: column !important; }
  .dash-cols > .basis-1/6, .dash-cols > .basis-4/6,
  .dash-cols > .basis-5/6, .dash-cols > .basis-2/6 { width: 100%; flex-basis: auto; }
  .dash-cols > .basis-1/6 .sticky { height: auto !important; position: static; margin-top: 0 !important; }
  .dash-cols > .basis-1/6 ul.space-y-2 { display: flex; flex-wrap: wrap; gap: 8px; }
  .dash-cols > .basis-1/6 ul.space-y-2 > li { flex: 1 1 150px; }
  .dash-cols > .basis-1/6 nav { display: block !important; }
  .premium-plan { margin-top: 14px; }
}
@media (max-width: 900px) {
  .iconspanel { display: none; }
  .allmarket { flex-wrap: nowrap !important; }
  main.flex-1 { padding: 16px; }
}
@media (max-width: 640px) {
  .grid.grid-cols-2, .grid.grid-cols-3 { grid-template-columns: 1fr; }
  .transaction-item.grid.grid-cols-6 {
    grid-template-columns: 1fr 1fr;
    row-gap: 8px;
  }
  /* 6-col table header becomes meaningless once rows reflow — hide it */
  .dash-cols .grid.grid-cols-6:not(.transaction-item) { display: none; }
}

/* text safety inside narrow cards */
.text-center p { overflow-wrap: break-word; white-space: normal !important; }
.text-center { min-width: 0; max-width: 100%; }
