/* CoreMineInvest shared styles (dark only). */
:root { color-scheme: dark; --bg: #05080F; --panel: rgba(14, 22, 40, .72); --line: rgba(255, 255, 255, .07); --primary: #C9A227; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: #E6EDF7; font-family: Inter, ui-sans-serif, system-ui, sans-serif; overflow-x: hidden; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(900px 500px at 85% -10%, rgba(201,162,39,.10), transparent 60%), radial-gradient(700px 480px at -10% 10%, rgba(139,105,20,.06), transparent 60%); background-attachment: fixed; }
img, svg, canvas { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* surfaces */
.glass { background: var(--panel); border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(255,255,255,.03) inset; }
.glass-strong { background: rgba(10, 16, 32, .88); border: 1px solid var(--line); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.glow { box-shadow: 0 0 48px -10px rgba(201,162,39,.28); }
.hairline { border-color: var(--line); }

/* controls (44px minimum touch height) */
.tap { min-height: 44px; min-width: 44px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: 0 1.1rem; border-radius: .85rem; font-weight: 600; font-size: .9rem; transition: transform .12s, background .15s, border-color .15s; cursor: pointer; }
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(180deg, #E8D48B, #C9A227); color: #1a1208; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary[disabled], .btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.btn-ghost { background: rgba(255,255,255,.04); border: 1px solid var(--line); color: #D5DEEC; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.field { width: 100%; min-height: 48px; background: rgba(5,8,15,.7); border: 1px solid var(--line); border-radius: .85rem; padding: .7rem .9rem; color: #fff; font-size: 16px; /* 16px stops iOS zoom */ }
.field:focus { outline: none; border-color: rgba(201,162,39,.7); box-shadow: 0 0 0 3px rgba(201,162,39,.15); }
select.field option { background: #0E1628; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .85rem; border-radius: 999px; border: 1px solid var(--line); font-size: .8rem; color: #AAB6CA; cursor: pointer; background: rgba(255,255,255,.03); }
.chip[aria-pressed="true"], .chip.on { color: #E8D48B; border-color: rgba(201,162,39,.5); background: rgba(201,162,39,.1); }

/* skeleton loaders */
.skeleton { position: relative; overflow: hidden; background: rgba(255,255,255,.05); border-radius: .6rem; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; } html { scroll-behavior: auto; } }

/* progress */
.bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #A67C00, #E8D48B); }

/* safe areas (iPhone notch + home indicator) */
.pt-safe { padding-top: env(safe-area-inset-top); }
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }

/* app shell */
.shell-main { padding-left: 0; }
@media (min-width: 768px) { .shell-main { padding-left: 76px; } }
@media (min-width: 1024px) { .shell-main { padding-left: 256px; } }
.nav-item { display: flex; align-items: center; gap: .85rem; min-height: 44px; padding: 0 .9rem; border-radius: .8rem; color: #93A1B8; font-size: .9rem; font-weight: 500; transition: background .15s, color .15s; white-space: nowrap; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active { background: rgba(201,162,39,.12); color: #E8D48B; }
.nav-item i { width: 1.25rem; text-align: center; }
/* tablet rail (768-1023): icons only; toggle expands to a full drawer; desktop (1024+): always full */
.side { width: 76px; }
.side .nav-label, .side .brand-text { display: none; }
.side.expanded { width: 256px; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
.side.expanded .nav-label, .side.expanded .brand-text { display: inline; }
@media (min-width: 1024px) { .side { width: 256px; } .side .nav-label, .side .brand-text { display: inline; } .side.expanded { box-shadow: none; } }
/* phone bottom nav */
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; font-size: 11px; color: #8A98AF; }
.bottom-nav a.active { color: #E8D48B; }
.bottom-nav a i { font-size: 18px; }
/* prevent long labels from blowing the 5-col grid on very narrow phones */
.bottom-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }

/* tables become card lists on phones: pages render both and toggle with these helpers */
.only-mobile { display: block; } .only-desktop { display: none; }
@media (min-width: 768px) { .only-mobile { display: none; } .only-desktop { display: block; } }
table.data { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data th { text-align: left; font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #7C8AA3; padding: .6rem .75rem; }
table.data td { padding: .85rem .75rem; border-top: 1px solid var(--line); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #1B2740; border-radius: 10px; }

/* admin mobile helpers */
.admin-tabs { -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab { flex: 0 0 auto; min-height: 40px; padding: 0 .9rem; border-radius: 999px; font-size: .8rem; white-space: nowrap; color: #93A1B8; border: 1px solid transparent; }
.admin-tab.active { color: #E8D48B; background: rgba(201,162,39,.12); border-color: rgba(201,162,39,.28); }
.admin-card-row { display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 768px) { .admin-card-row { display: none; } .admin-table-wrap { display: block; } }
@media (max-width: 767px) { .admin-table-wrap { display: none; } }

/* —— light polish —— */
::selection { background: rgba(201,162,39,.28); color: #fff; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid rgba(232,212,139,.7); outline-offset: 2px; }
.btn:focus-visible, .field:focus-visible, .chip:focus-visible, .nav-item:focus-visible { outline: 2px solid rgba(232,212,139,.7); outline-offset: 2px; }

/* cards that can lift slightly on desktop */
@media (hover: hover) {
  .card-hover { transition: border-color .15s, transform .15s, box-shadow .15s; }
  .card-hover:hover { border-color: rgba(201,162,39,.28); transform: translateY(-2px); box-shadow: 0 12px 40px -16px rgba(0,0,0,.5); }
}

/* page fade-in (respect reduced motion) */
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .page-in { animation: pageIn .28s ease-out both; }
}

/* status badges */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.4; }
.badge-ok { background: rgba(201,162,39,.15); color: #E8D48B; }
.badge-warn { background: rgba(245,158,11,.15); color: #FBBF24; }
.badge-bad { background: rgba(239,68,68,.15); color: #FCA5A5; }
.badge-info { background: rgba(56,189,248,.15); color: #7DD3FC; }

/* bottom nav active indicator */
.bottom-nav a.active i { transform: translateY(-1px); }
.bottom-nav a { transition: color .15s; }

/* hide scrollbar on admin tabs but keep scroll */
.admin-tabs { scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab { display: inline-flex; align-items: center; white-space: nowrap; min-height: 36px; padding: 0 .9rem; border-radius: 999px; font-size: .8rem; color: #AAB6CA; border: 1px solid transparent; }
.admin-tab.active { color: #E8D48B; background: rgba(201,162,39,.12); border-color: rgba(201,162,39,.28); }
.admin-tab:hover { color: #fff; }

/* mobile card vs table (admin + lists) */
@media (max-width: 767px) {
  .admin-table-wrap { display: none; }
  .admin-card-row { display: block; }
}
@media (min-width: 768px) {
  .admin-card-row { display: none; }
  .admin-table-wrap { display: block; }
}
