/*
  Global base styles (shared across pages).
  Many HTML files reference this stylesheet; it was missing previously.
  Keep it light to avoid overriding page-specific CSS.
*/

:root {
    color-scheme: dark;

    --ts-bg: #070b16;
    --ts-surface: rgba(255, 255, 255, 0.06);
    --ts-surface-2: rgba(255, 255, 255, 0.09);
    --ts-border: rgba(255, 255, 255, 0.12);
    --ts-text: rgba(255, 255, 255, 0.92);
    --ts-muted: rgba(255, 255, 255, 0.66);

    --ts-success: #34d399;
    --ts-warn: #fbbf24;
    --ts-danger: #fb7185;
    --ts-accent: #22c55e;

    /* Trading Dashboard Theme */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: rgba(22, 27, 34, 0.85);
    --bg-card-hover: rgba(30, 37, 46, 0.9);
    --border-color: rgba(48, 54, 61, 0.6);
    --border-accent: rgba(16, 185, 129, 0.2);
    --text-primary: #e6edf3;
    --text-secondary: rgba(230, 237, 243, 0.7);
    --text-muted: rgba(139, 148, 158, 0.8);
    --accent-green: #10b981;
    --accent-cyan: #06b6d4;
    --accent-blue: #3b82f6;
    --accent-red: #ef4444;
    --glow-green: rgba(16, 185, 129, 0.4);
    --glow-blue: rgba(59, 130, 246, 0.3);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

html {
    background: #070b16 !important;
    background-color: #070b16 !important;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #0d1117 !important;
    background-color: #0d1117 !important;
    color: var(--ts-text, #e6edf3);
}

a {
    color: inherit;
}

/* basic helpers */
.muted {
    color: var(--ts-muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Global Bottom Navigation ===== */
[data-bottom-nav] {
    background: rgba(13, 17, 23, 0.98) !important;
    background-color: #0d1117 !important;
    border-top: 1px solid var(--border-color) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Add padding to body to prevent content from hiding under fixed bottom nav */
body[data-active-nav] {
    padding-bottom: 80px !important;
}

[data-bottom-nav] a[data-nav] {
    color: var(--text-muted) !important;
    transition: all 0.2s ease !important;
}

[data-bottom-nav] a[data-nav]:hover {
    color: var(--accent-cyan) !important;
}

[data-bottom-nav] a[data-nav].is-active {
    color: var(--accent-green) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.1)) !important;
    border-radius: 12px !important;
}

[data-bottom-nav] a[data-nav].is-active::after {
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan)) !important;
}

[data-bottom-nav] a[data-nav] svg {
    stroke: currentColor;
    transition: all 0.2s ease;
}

[data-bottom-nav] a[data-nav].is-active svg {
    filter: drop-shadow(0 0 4px var(--glow-green));
}

/* ===== Missing Tailwind Size Utilities =====
   These were not generated by Tailwind v4 purge.
   Adding manually to fix oversized icons.
*/
.h-3 {
    height: 0.75rem;
}

.h-4 {
    height: 1rem;
}

.h-5 {
    height: 1.25rem;
}

.h-6 {
    height: 1.5rem;
}

.h-7 {
    height: 1.75rem;
}

.h-8 {
    height: 2rem;
}

.h-9 {
    height: 2.25rem;
}

.h-10 {
    height: 2.5rem;
}

.h-12 {
    height: 3rem;
}

.h-16 {
    height: 4rem;
}

.h-20 {
    height: 5rem;
}

.h-24 {
    height: 6rem;
}

.w-3 {
    width: 0.75rem;
}

.w-4 {
    width: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.w-7 {
    width: 1.75rem;
}

.w-8 {
    width: 2rem;
}

.w-9 {
    width: 2.25rem;
}

.w-10 {
    width: 2.5rem;
}

.w-12 {
    width: 3rem;
}

.w-16 {
    width: 4rem;
}

.w-20 {
    width: 5rem;
}

.w-24 {
    width: 6rem;
}

.max-w-sm {
    max-width: 24rem;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-lg {
    max-width: 32rem;
}

.max-w-xl {
    max-width: 36rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.my-4 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.space-y-1>*+* {
    margin-top: 0.25rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.text-white {
    color: #fff;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-700 {
    color: #374151;
}

.text-blue-400 {
    color: #60a5fa;
}

.text-amber-400 {
    color: #fbbf24;
}

.text-amber-300 {
    color: #fcd34d;
}

.bg-gray-700 {
    background-color: #374151;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

@media (min-width: 768px) {
    .md\:flex-row {
        flex-direction: row;
    }

    .md\:w-1\/2 {
        width: 50%;
    }
}