/* ==========================================================================
   FOREMAN TRADER ANALYST - BASE STYLES & LAYOUT
   Pure Vanilla CSS
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  width: 100%;
}

/* Preload state to prevent initial render transition animations */
body.preload,
body.preload * {
  transition: none !important;
  -webkit-transition: none !important;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Tipografi */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 1.85rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p {
  color: var(--text-muted);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

/* Düzen (Layout Containers) */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.content-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
  flex: 1;
}

.content-container.container-full-dashboard {
  max-width: 100%;
  padding: 0;
  overflow-x: hidden;
}

.content-container.container-terminal-wide {
  max-width: 1720px;
  padding: 1.25rem 1.75rem;
}

/* Navigasyon / Header */
/* Navigasyon / Header */
.top-navbar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  padding: 0.6rem 1.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all var(--transition-normal);
}

[data-theme="dark"] .top-navbar {
  background: rgba(15, 23, 42, 0.90);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
}

.navbar-inner {
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.brand-wrapper:hover {
  transform: translateY(-1px);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.brand-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-25deg);
}

.brand-details {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  line-height: 1.15;
}

.brand-title .highlight {
  color: #10B981;
  background: linear-gradient(90deg, #10B981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.brand-subtitle .dot-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulse 1.8s infinite;
}

/* Menü Linkleri (Modern Pill Tabs) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: var(--radius-full);
  flex-shrink: 1;
}

[data-theme="dark"] .nav-links {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.83rem;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--transition-fast);
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.85;
  transition: transform var(--transition-fast);
}

.nav-link:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-main);
}

.nav-link:hover svg {
  transform: translateY(-1px);
}

.nav-link.active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-primary-dark);
  font-weight: 700;
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] .nav-link.active {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

/* Açılır Menü (Dropdown Menu) */
.nav-dropdown {
  position: relative;
  list-style: none;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 35px -5px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.03);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

[data-theme="dark"] .nav-dropdown-menu {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 35px -5px rgba(0, 0, 0, 0.6);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-chevron {
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .dropdown-chevron,
.nav-dropdown:focus-within .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-main);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-dropdown-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
}

.nav-dropdown-item:hover {
  background: var(--bg-surface-hover);
  color: var(--color-primary);
  transform: translateX(3px);
}

.nav-dropdown-item.active {
  background: var(--color-primary-subtle);
  color: var(--color-primary-dark);
  font-weight: 700;
}

/* Nav Aksiyonları & Canlı Arama */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.nav-clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

[data-theme="dark"] .nav-clock-badge {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.global-search-container {
  position: relative;
  width: 190px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.global-search-container:focus-within {
  width: 250px;
}

.search-input {
  width: 100%;
  padding: 0.45rem 2.2rem 0.45rem 2.1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  font-size: 0.83rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: #10B981;
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.search-icon-svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
  width: 15px;
  height: 15px;
}

.search-shortcut-badge {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-subtle);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  pointer-events: none;
}

.btn-icon-theme {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-theme:hover {
  background: var(--bg-surface-hover);
  border-color: #10B981;
  color: #10B981;
  transform: rotate(15deg);
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.2);
  max-height: 380px;
  overflow-y: auto;
  z-index: 200;
  display: none;
  padding: 0.4rem;
}

.search-results-dropdown.show {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color-light);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.search-result-item:hover {
  background-color: var(--bg-surface-hover);
}

/* Footer */
.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   INTERACTIVE & ANIMATION UTILITIES
   ========================================================================== */
@keyframes floatSmooth {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(-0.5deg);
  }
}

@keyframes floatSmoothReverse {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(8px) rotate(0.5deg);
  }
}

@keyframes heroGlow {
  0% {
    opacity: 0.35;
    transform: scale(1) translate(0, 0);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.15) translate(15px, -10px);
  }
  100% {
    opacity: 0.4;
    transform: scale(0.92) translate(-10px, 15px);
  }
}

@keyframes pulseLiveDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.animate-float-slow {
  animation: floatSmooth 6s ease-in-out infinite;
}

.animate-float-reverse {
  animation: floatSmoothReverse 7s ease-in-out infinite;
}

.animate-hero-glow {
  animation: heroGlow 9s ease-in-out infinite alternate;
}

/* Global Text Alignment & Font Utilities */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.font-mono { font-family: var(--font-mono) !important; font-variant-numeric: tabular-nums; }

