/* ============================================
   BORSA NOTUM — V25 AGENTIC TERMINAL
   Design Token System v25.0
   ============================================
   Referanslar:
   R1: Agentic UI — Glitch Spin
   R2: Linear — Blur Scale Glow
   R3: Visitors — 3D Globe
   R9: Evervault — 3D Card Swirl
   ============================================ */

:root {
  /* ============================================
     V25 BACKGROUND SYSTEM — Deeper Void
     ============================================ */
  --v25-void: #06080C;
  --v25-base: #0A0E14;
  --v25-surface: #0D1117;
  --v25-elevated: #0D1117;
  --v25-interactive: #1E1E35;
  --v25-overlay: rgba(5, 5, 8, 0.85);

  /* ============================================
     V25 BRAND COLORS — Vivid Spectrum
     ============================================ */
  --v25-amber: #FFB800;
  --v25-amber-dim: #CC9300;
  --v25-amber-bright: #FFD54F;
  --v25-cyan: #00E5FF;
  --v25-cyan-dim: #00B8CC;
  --v25-cyan-bright: #4DF0FF;
  --v25-purple: #A855F7;
  --v25-purple-dim: #8B3FD9;
  --v25-purple-bright: #C084FC;
  --v25-blue: #3B82F6;

  /* ============================================
     V25 SEMANTIC COLORS — Neon Trading
     ============================================ */
  --v25-profit: #00FF88;
  --v25-profit-dim: #00CC6D;
  --v25-loss: #FF2D55;
  --v25-loss-dim: #CC2444;
  --v25-warning: #FFAA00;
  --v25-info: #3B82F6;

  /* ============================================
     V25 TEXT HIERARCHY
     ============================================ */
  --v25-text-primary: #F5F5F7;
  --v25-text-secondary: #8892A5;
  --v25-text-tertiary: #5E6478;
  --v25-text-muted: #4A5568;
  --v25-text-brand: #FFB800;
  --v25-text-inverse: #050508;

  /* ============================================
     V25 GLASS SYSTEM — Depth-Aware Frost
     ============================================ */
  --v25-glass-void: rgba(5, 5, 8, 0.92);
  --v25-glass-card: rgba(13, 17, 23, 1);
  --v25-glass-surface: rgba(13, 17, 23, 0.9);
  --v25-glass-hover: rgba(255, 184, 0, 0.04);
  --v25-glass-active: rgba(255, 184, 0, 0.06);
  --v25-glass-blur: 0px;
  --v25-glass-blur-heavy: 0px;
  --v25-glass-blur-light: 0px;

  /* Glass — color tints */
  --v25-glass-amber: rgba(255, 184, 0, 0.04);
  --v25-glass-amber-hover: rgba(255, 184, 0, 0.07);
  --v25-glass-cyan: rgba(0, 229, 255, 0.04);
  --v25-glass-cyan-hover: rgba(0, 229, 255, 0.07);
  --v25-glass-purple: rgba(168, 85, 247, 0.04);
  --v25-glass-purple-hover: rgba(168, 85, 247, 0.07);
  --v25-glass-profit: rgba(0, 255, 136, 0.04);
  --v25-glass-loss: rgba(255, 45, 85, 0.04);

  /* ============================================
     V25 GLOW SYSTEM — R2 Linear Ambient Light
     ============================================ */
  --v25-glow-brand: 0 0 60px rgba(255, 184, 0, 0.08), 0 0 120px rgba(255, 184, 0, 0.04);
  --v25-glow-brand-hover: 0 0 80px rgba(255, 184, 0, 0.15), 0 0 160px rgba(255, 184, 0, 0.06);
  --v25-glow-brand-intense: 0 0 100px rgba(255, 184, 0, 0.2), 0 0 200px rgba(255, 184, 0, 0.08);
  --v25-glow-cyan: 0 0 60px rgba(0, 229, 255, 0.06), 0 0 120px rgba(0, 229, 255, 0.03);
  --v25-glow-cyan-hover: 0 0 80px rgba(0, 229, 255, 0.12), 0 0 160px rgba(0, 229, 255, 0.05);
  --v25-glow-purple: 0 0 60px rgba(168, 85, 247, 0.06), 0 0 120px rgba(168, 85, 247, 0.03);
  --v25-glow-purple-hover: 0 0 80px rgba(168, 85, 247, 0.12), 0 0 160px rgba(168, 85, 247, 0.05);
  --v25-glow-profit: 0 0 40px rgba(0, 255, 136, 0.1), 0 0 80px rgba(0, 255, 136, 0.05);
  --v25-glow-loss: 0 0 40px rgba(255, 45, 85, 0.1), 0 0 80px rgba(255, 45, 85, 0.05);

  /* ============================================
     V25 BORDER SYSTEM
     ============================================ */
  --v25-border-glass: 1px solid rgba(245, 158, 11, 0.06);
  --v25-border-subtle: 1px solid rgba(245, 158, 11, 0.05);
  --v25-border-default: 1px solid rgba(245, 158, 11, 0.10);
  --v25-border-strong: 1px solid rgba(245, 158, 11, 0.20);
  --v25-border-glow: 1px solid rgba(255, 184, 0, 0.12);
  --v25-border-glow-hover: 1px solid rgba(255, 184, 0, 0.25);
  --v25-border-active: 1px solid rgba(255, 184, 0, 0.3);
  --v25-border-cyan: 1px solid rgba(0, 229, 255, 0.12);
  --v25-border-purple: 1px solid rgba(168, 85, 247, 0.12);
  --v25-border-profit: 1px solid rgba(0, 255, 136, 0.15);
  --v25-border-loss: 1px solid rgba(255, 45, 85, 0.15);

  /* ============================================
     V25 SHADOW SYSTEM
     ============================================ */
  --v25-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --v25-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --v25-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.2);
  --v25-shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
  --v25-shadow-card: 0 0 20px rgba(245, 158, 11, 0.05);
  --v25-shadow-card-hover: 0 0 20px rgba(245, 158, 11, 0.08);
  --v25-shadow-dropdown: 0 12px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 158, 11, 0.05);
  --v25-shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(245, 158, 11, 0.10);

  /* ============================================
     V25 TYPOGRAPHY
     ============================================ */
  --v25-font-sans: 'Satoshi', 'General Sans', 'Inter', -apple-system, sans-serif;
  --v25-font-mono: 'DM Mono', 'JetBrains Mono', 'SF Mono', monospace;
  --v25-font-data: 'DM Mono', 'JetBrains Mono', monospace;

  --v25-text-hero: 4rem;
  --v25-text-display: 3rem;
  --v25-text-h1: 2.25rem;
  --v25-text-h2: 1.75rem;
  --v25-text-h3: 1.375rem;
  --v25-text-body: 0.9375rem;
  --v25-text-small: 0.8125rem;
  --v25-text-micro: 0.6875rem;
  --v25-text-data: 0.8125rem;

  /* ============================================
     V25 RADIUS
     ============================================ */
  --v25-radius-sm: 2px;
  --v25-radius-md: 2px;
  --v25-radius-lg: 2px;
  --v25-radius-xl: 2px;
  --v25-radius-2xl: 2px;
  --v25-radius-full: 2px;

  /* ============================================
     V25 SPACING
     ============================================ */
  --v25-sidebar-width: 280px;
  --v25-sidebar-collapsed: 72px;
  --v25-header-height: 56px;
  --v25-content-max-width: 1440px;

  /* ============================================
     V25 EASING — R1-R9 Motion Curves
     ============================================ */
  --v25-ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --v25-ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --v25-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --v25-ease-glitch: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --v25-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* ============================================
     V25 TRANSITION DURATIONS
     ============================================ */
  --v25-duration-fast: 150ms;
  --v25-duration-normal: 250ms;
  --v25-duration-slow: 400ms;
  --v25-duration-morph: 600ms;
  --v25-duration-entrance: 800ms;

  /* ============================================
     V25 GRADIENT SYSTEM
     ============================================ */
  --v25-gradient-hero: linear-gradient(145deg, #050508 0%, #0A0A1A 40%, #12081F 60%, #050508 100%);
  --v25-gradient-hero-mesh:
    radial-gradient(ellipse at 20% 30%, rgba(255, 184, 0, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 229, 255, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
  --v25-gradient-card-premium: linear-gradient(145deg, rgba(255, 184, 0, 0.03) 0%, transparent 50%, rgba(0, 229, 255, 0.02) 100%);
  --v25-gradient-text-brand: linear-gradient(135deg, #FFB800 0%, #FFD54F 50%, #FFB800 100%);
  --v25-gradient-text-premium: linear-gradient(135deg, #A855F7 0%, #00E5FF 100%);
  --v25-gradient-border-glow: linear-gradient(135deg, rgba(255, 184, 0, 0.2), rgba(0, 229, 255, 0.1), rgba(168, 85, 247, 0.15));

  /* ============================================
     V25 Z-INDEX
     ============================================ */
  --v25-z-background: -1;
  --v25-z-base: 0;
  --v25-z-card: 1;
  --v25-z-sticky: 10;
  --v25-z-header: 20;
  --v25-z-sidebar: 30;
  --v25-z-dropdown: 40;
  --v25-z-overlay: 50;
  --v25-z-modal: 60;
  --v25-z-tooltip: 70;
  --v25-z-notification: 80;
  --v25-z-max: 9999;
}

/* ============================================
   V26 FIX — Widget Image Constraints
   HTMX-loaded widgets need explicit sizing
   because TailwindCSS v4 utility classes
   may not compile for dynamic content
   ============================================ */

/* Prevent oversized protocol logos in widgets */
.n-grid-widgets img,
.n-widget img,
[data-widget-id] img {
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: cover;
}

/* Explicit sizing for Tailwind w/h classes in widgets */
.n-grid-widgets .w-5, .n-widget .w-5, [data-widget-id] .w-5 { width: 20px !important; min-width: 20px !important; max-width: 20px !important; }
.n-grid-widgets .h-5, .n-widget .h-5, [data-widget-id] .h-5 { height: 20px !important; min-height: 20px !important; max-height: 20px !important; }
.n-grid-widgets .w-6, [data-widget-id] .w-6 { width: 24px !important; min-width: 24px !important; }
.n-grid-widgets .h-6, [data-widget-id] .h-6 { height: 24px !important; min-height: 24px !important; }
.n-grid-widgets .w-8, [data-widget-id] .w-8 { width: 32px !important; }
.n-grid-widgets .h-8, [data-widget-id] .h-8 { height: 32px !important; }
.n-grid-widgets .w-4, [data-widget-id] .w-4 { width: 16px !important; }
.n-grid-widgets .h-4, [data-widget-id] .h-4 { height: 16px !important; }

/* Common Tailwind utilities for HTMX-loaded widget content */
.text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
.text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
.text-\[10px\] { font-size: 10px !important; }
.text-\[11px\] { font-size: 11px !important; }
.text-\[9px\] { font-size: 9px !important; }
.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.truncate { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.rounded-full { border-radius: 9999px !important; }
.object-cover { object-fit: cover !important; }
.flex { display: flex !important; }
.items-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-center { justify-content: center !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem !important; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem !important; }
.min-w-0 { min-width: 0 !important; }
.flex-1 { flex: 1 1 0% !important; }
.shrink-0 { flex-shrink: 0 !important; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-0\.5 { margin-top: 0.125rem !important; }
.pt-3 { padding-top: 0.75rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-5 { padding: 1.25rem !important; }
.rounded-lg { border-radius: 2px !important; }
.rounded-xl { border-radius: 2px !important; }
.rounded-2xl { border-radius: 2px !important; }
.rounded-md { border-radius: 2px !important; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite !important; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.animate-spin { animation: spin 1s linear infinite !important; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Widget color utilities */
.text-brand-400 { color: #F59E0B !important; }
.text-brand-300 { color: #FBBF24 !important; }
.text-text-primary { color: #FAFAFA !important; }
.text-text-secondary { color: #A1A1AA !important; }
.text-text-muted { color: #71717A !important; }
.text-profit-green { color: #22C55E !important; }
.text-loss-red { color: #EF4444 !important; }
.text-blue-400 { color: #60A5FA !important; }
.text-purple-400 { color: #A78BFA !important; }
.bg-glass-light { background: rgba(255,255,255,0.03) !important; }
.border-border-subtle { border-color: rgba(245,158,11,0.06) !important; }
.hover\:bg-glass-light:hover { background: rgba(245,158,11,0.05) !important; }
.bg-profit-green\/10 { background: rgba(34,197,94,0.1) !important; }
.bg-loss-red\/10 { background: rgba(239,68,68,0.1) !important; }
.bg-blue-500\/5 { background: rgba(59,130,246,0.05) !important; }
.bg-purple-500\/5 { background: rgba(168,85,247,0.05) !important; }
.border-blue-500\/10 { border-color: rgba(59,130,246,0.1) !important; }
.border-purple-500\/10 { border-color: rgba(168,85,247,0.1) !important; }
.border-border-subtle\/50 { border-color: rgba(255,255,255,0.03) !important; }
.bg-white\/\[0\.02\] { background: rgba(255,255,255,0.02) !important; }
.transition-colors { transition: color 0.15s, background-color 0.15s, border-color 0.15s !important; }
.block { display: block !important; }
.inline-flex { display: inline-flex !important; }
.border-b { border-bottom-width: 1px !important; }
.border { border-width: 1px !important; }
.last\:border-0:last-child { border-width: 0 !important; }
.uppercase { text-transform: uppercase !important; }
.tracking-wider { letter-spacing: 0.05em !important; }

/* Skeleton loader */
.v25-skeleton {
    background: linear-gradient(90deg, rgba(245,158,11,0.03) 25%, rgba(245,158,11,0.06) 50%, rgba(245,158,11,0.03) 75%);
    background-size: 200% 100%;
    animation: v25-skeleton-shimmer 1.5s infinite;
    border-radius: 0.375rem;
}
.v25-skeleton-heading { height: 20px; width: 60%; }
.v25-skeleton-text { height: 14px; width: 80%; margin-top: 8px; }
@keyframes v25-skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Sidebar fixes */
@media (min-width: 1024px) {
    aside.fixed.inset-y-0.left-0 { translate: 0 !important; transform: none !important; }
}
aside.fixed { background: rgba(5,5,8,0.92) !important; backdrop-filter: blur(40px) saturate(1.4) !important; -webkit-backdrop-filter: blur(40px) saturate(1.4) !important; }
