/* ==========================================================================
   GBX MOBILE TERMINAL - IONIC THEME & CUSTOM STYLES
   Golden Bazaar %100 Yerel Mobil PWA Deneyimi (Zero Emoji & Pure Human Ergonomics)
   ========================================================================== */

:root {
  --ion-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ion-background-color: #0b0e14;
  --ion-background-color-rgb: 11, 14, 20;
  --ion-text-color: #e7e9ea;
  --ion-text-color-rgb: 231, 233, 234;

  --ion-color-primary: #1d9bf0;
  --ion-color-primary-rgb: 29, 155, 240;
  --ion-color-primary-contrast: #ffffff;
  --ion-color-primary-shade: #1a8cd8;
  --ion-color-primary-tint: #3da8f2;

  --ion-toolbar-background: rgba(15, 19, 26, 0.95);
  --ion-toolbar-color: #ffffff;
  --ion-toolbar-border-color: rgba(255, 255, 255, 0.08);

  --ion-tab-bar-background: rgba(11, 14, 20, 0.96);
  --ion-tab-bar-color: #71767b;
  --ion-tab-bar-color-selected: #1d9bf0;
  --ion-tab-bar-border-color: rgba(255, 255, 255, 0.08);

  --ion-card-background: #141923;
  --ion-item-background: #141923;
}

body {
  font-family: var(--ion-font-family);
  background: #0b0e14;
  color: #e7e9ea;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

/* Header & Top Bar */
.gbx-mobile-header ion-toolbar {
  --background: rgba(15, 19, 26, 0.95);
  --border-width: 0 0 1px 0;
  --border-color: rgba(255, 255, 255, 0.08);
  padding: 0 12px;
  min-height: calc(56px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.m-nav-logo {
  height: 36px;
  max-height: 38px;
  width: auto;
  vertical-align: middle;
  margin-right: 10px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
  transition: transform 0.15s ease;
  display: inline-block;
}
.m-nav-logo:active {
  transform: scale(0.97);
}

.m-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 200, 83, 0.12);
  border: 1px solid rgba(0, 200, 83, 0.35);
  color: #00e676;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.5px;
}

.m-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 6px #00e676;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

.m-icon-btn {
  --color: #8b949e;
  --padding-start: 6px;
  --padding-end: 6px;
  height: 34px;
}
.m-icon-btn svg {
  stroke: currentColor;
}

.m-pwa-pill-btn {
  --background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(29, 155, 240, 0.22));
  --border-color: rgba(212, 175, 55, 0.65);
  --border-width: 1px;
  --border-style: solid;
  --color: #f5c542;
  --border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  height: 28px;
  margin: 0 4px;
  letter-spacing: 0.2px;
}

/* Bottom Tab Bar */
.gbx-mobile-tabbar {
  --background: rgba(11, 14, 20, 0.96);
  --border-color: rgba(255, 255, 255, 0.08);
  height: calc(54px + env(safe-area-inset-bottom, 8px));
  padding-bottom: env(safe-area-inset-bottom, 8px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.gbx-mobile-tabbar ion-tab-button {
  --color: #71767b;
  --color-selected: #1d9bf0;
  gap: 2px;
}

.gbx-mobile-tabbar ion-tab-button svg {
  stroke: currentColor;
  transition: transform 0.18s ease, stroke 0.18s ease;
}

.gbx-mobile-tabbar ion-tab-button.tab-selected svg {
  stroke: #1d9bf0;
  transform: translateY(-1px);
  filter: drop-shadow(0 0 6px rgba(29, 155, 240, 0.45));
}

.gbx-mobile-tabbar ion-tab-button ion-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.gbx-mobile-tabbar ion-tab-button.tab-selected ion-label {
  color: #ffffff;
  font-weight: 800;
}

/* Macro KPI Horizontal Strip */
.macro-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.macro-strip::-webkit-scrollbar { display: none; }

.macro-chip {
  flex: 0 0 auto;
  background: #141923;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 120px;
}
.macro-chip-label {
  font-size: 10px;
  color: #71767b;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}
.macro-chip-val {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
}
.macro-chip-val.c-blue { color: #1d9bf0; }
.macro-chip-val.c-green { color: #00e676; }
.macro-chip-val.c-gold { color: #f5c542; }

/* Ensure tabs sit strictly below native header and fill viewport */
ion-tabs#mTabs {
  position: absolute !important;
  top: calc(50px + env(safe-area-inset-top, 0px)) !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: calc(100% - 50px - env(safe-area-inset-top, 0px)) !important;
}

/* Custom Segment Tabs */
ion-segment {
  --background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 3px;
  margin: 6px 14px;
}
ion-segment-button {
  --background-checked: #1d9bf0;
  --color: #8b949e;
  --color-checked: #ffffff;
  --indicator-color: transparent;
  font-size: 11.5px;
  font-weight: 700;
  min-height: 32px;
  border-radius: 8px;
}

/* Fluid Scrollable Segment Tabs */
ion-segment[scrollable="true"] {
  --background: transparent;
  border: none;
  border-radius: 0;
  padding: 2px 14px 8px;
  margin: 0;
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 6px;
}
ion-segment[scrollable="true"]::-webkit-scrollbar {
  display: none;
}
ion-segment[scrollable="true"] ion-segment-button {
  flex: 0 0 auto;
  min-width: auto;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: #141923;
  color: #8b949e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  --background-checked: #1d9bf0;
  --color-checked: #ffffff;
  transition: all 0.15s ease;
}
ion-segment[scrollable="true"] ion-segment-button.segment-button-checked {
  background: #1d9bf0 !important;
  color: #ffffff !important;
  border-color: #1d9bf0 !important;
  box-shadow: 0 2px 8px rgba(29, 155, 240, 0.3);
}

/* Financial Cards & Lists */
.fin-card {
  background: #141923;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin: 8px 14px;
  padding: 13px 15px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.fin-card:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(29, 155, 240, 0.4);
}

.fin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.fin-card-code {
  font-size: 14px;
  font-weight: 800;
  color: #1d9bf0;
  letter-spacing: 0.2px;
}
.fin-card-time {
  font-size: 11.5px;
  color: #8b949e;
  font-weight: 500;
}

.fin-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.42;
  margin-bottom: 6px;
}

.fin-card-summary {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 8px;
}

.m-news-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
  margin-top: 4px;
}
.m-news-source {
  font-size: 11px;
  font-weight: 600;
  color: #71767b;
}
.m-news-read-more {
  font-size: 11.5px;
  font-weight: 700;
  color: #1d9bf0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fin-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fin-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #8b949e;
}
.fin-badge-accent {
  background: rgba(29, 155, 240, 0.15);
  color: #1d9bf0;
  border: 1px solid rgba(29, 155, 240, 0.3);
}

/* Modals */
ion-modal {
  --background: #0d1117;
  --border-radius: 20px 20px 0 0;
}
ion-modal ion-toolbar {
  --background: #0d1117;
  --border-color: rgba(255, 255, 255, 0.08);
}

.modal-sheet-content {
  padding: 16px;
  color: #e7e9ea;
}

/* Search bar styling */
ion-searchbar {
  --background: #141923;
  --color: #ffffff;
  --placeholder-color: #8b949e;
  --icon-color: #8b949e;
  --clear-button-color: #8b949e;
  --border-radius: 12px;
  --box-shadow: none;
  padding: 6px 14px 2px;
}
ion-searchbar .searchbar-input-container {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
ion-searchbar input.searchbar-input {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: #ffffff !important;
}

/* Search stats count */
.m-search-stats {
  font-size: 12px;
  font-weight: 600;
  color: #8b949e;
  padding: 2px 16px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.m-search-stats b {
  color: #1d9bf0;
  font-weight: 800;
}

/* Empty state & loader */
.empty-msg {
  text-align: center;
  padding: 40px 20px;
  color: #71767b;
  font-size: 13px;
  line-height: 1.5;
}

/* ==========================================================================
   KAP BİLDİRİMLERİ (MİDAS / BLOOMBERG FEED STANDARD)
   ========================================================================== */

.m-kap-card {
  background: #141923;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  margin: 7px 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.m-kap-card:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(29, 155, 240, 0.4);
}

.m-kap-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.m-kap-company {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.m-kap-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.m-kap-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
}
.m-kap-logo-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #8b949e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.m-kap-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.m-kap-symbol {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
  line-height: 1.2;
}
.m-kap-time {
  font-size: 11px;
  color: #8b949e;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 2px;
}
.m-kap-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-left: 8px;
}
.m-kap-badge-devre {
  background: rgba(255, 82, 82, 0.15);
  color: #ff5252;
  border: 1px solid rgba(255, 82, 82, 0.3);
}
.m-kap-badge-financial {
  background: rgba(29, 155, 240, 0.15);
  color: #1d9bf0;
  border: 1px solid rgba(29, 155, 240, 0.3);
}
.m-kap-badge-sermaye {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.m-kap-badge-ozel {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.m-kap-badge-fund {
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.3);
}
.m-kap-badge-default {
  background: rgba(255, 255, 255, 0.08);
  color: #8b949e;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.m-kap-title {
  font-size: 13px;
  font-weight: 600;
  color: #e7e9ea;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.m-kap-summary {
  font-size: 12px;
  color: #8b949e;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.m-kap-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.m-kap-doc-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #1d9bf0;
  font-weight: 600;
}

/* KAP Modal Rich Elements */
.m-kap-modal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.m-kap-meta-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
}
.m-kap-meta-label {
  font-size: 10.5px;
  color: #8b949e;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.m-kap-meta-val {
  font-size: 12.5px;
  color: #ffffff;
  font-weight: 700;
}
.m-kap-body-text {
  font-size: 13px;
  color: #c9d1d9;
  line-height: 1.6;
  white-space: pre-wrap;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}
.m-kap-btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: #1d9bf0;
  color: #ffffff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  transition: background 0.15s ease;
}
.m-kap-btn-action:active {
  background: #1a8cd8;
}

/* ==========================================================================
   MIDAS-TIER MOBILE EXPERIENCE (SPARKLINES, FAVORITES, INTERACTIVE CHARTS)
   ========================================================================== */

.m-stock-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #141923;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  margin: 6px 14px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  position: relative;
}
.m-stock-card:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(29, 155, 240, 0.4);
}

.m-stock-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: none;
}
.m-stock-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  display: block;
}
.m-stock-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: rgba(29, 155, 240, 0.12);
  border: 1px solid rgba(29, 155, 240, 0.25);
  font-size: 12px;
  font-weight: 800;
  color: #1d9bf0;
  letter-spacing: 0.5px;
}

.m-stock-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.m-stock-code-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.m-stock-code {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}
.m-stock-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #8b949e;
}
.m-stock-name {
  font-size: 11.5px;
  color: #8b949e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

/* Sparkline wrap */
.m-sparkline-wrap {
  width: 66px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m-sparkline-wrap svg {
  display: block;
  overflow: visible;
}

/* Right price block */
.m-stock-price-block {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 68px;
}
.m-stock-price {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
}
.m-pct-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}
.m-pct-pill.up {
  background: rgba(0, 230, 118, 0.14);
  color: #00e676;
}
.m-pct-pill.down {
  background: rgba(255, 82, 82, 0.14);
  color: #ff5252;
}

/* Favorite Star Button */
.m-fav-btn {
  background: transparent;
  border: none;
  padding: 6px 2px 6px 6px;
  cursor: pointer;
  color: #484f58;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s ease, transform 0.15s ease;
}
.m-fav-btn:active {
  transform: scale(1.25);
}
.m-fav-btn.is-favorite {
  color: #f5c542;
}
.m-fav-btn svg {
  fill: currentColor;
  stroke: currentColor;
}

/* Interactive Detail Modal Chart & Hero */
.m-detail-hero {
  padding: 4px 4px 12px;
}
.m-detail-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.m-detail-sym {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
}
.m-detail-company {
  font-size: 13px;
  color: #8b949e;
  margin-top: 2px;
}
.m-detail-price-num {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.1;
  transition: color 0.1s ease;
}
.m-detail-change-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.m-detail-delta {
  font-size: 13.5px;
  font-weight: 800;
}
.m-detail-time-hint {
  font-size: 11px;
  color: #71767b;
}

/* Time range pills */
.m-time-pill-bar {
  display: flex;
  gap: 6px;
  margin: 10px 0 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 3px;
}
.m-time-pill {
  flex: 1;
  background: transparent;
  border: none;
  color: #8b949e;
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.m-time-pill.active {
  background: #1d9bf0;
  color: #ffffff;
}

/* KPI Multiplier Grid */
.m-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}
.m-kpi-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
}
.m-kpi-label {
  font-size: 10px;
  font-weight: 700;
  color: #71767b;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.m-kpi-val {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

/* In-App Document / PDF Viewer Modal */
#mDocViewerModal ion-content {
  --background: #0b0e14;
}
.m-doc-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0b0e14;
  z-index: 10;
  pointer-events: none;
}

/* Model Portfolio Cards & Institutional Analytics */
.m-model-filter-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 14px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.m-model-filter-strip::-webkit-scrollbar {
  display: none;
}
.m-model-pill {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 16px;
  background: #141923;
  color: #8b949e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
}
.m-model-pill.active {
  background: #1d9bf0;
  color: #ffffff;
  border-color: #1d9bf0;
}

.m-model-card {
  background: #141923;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin: 10px 14px 16px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.m-model-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.m-model-brokerage {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.m-model-brokerage-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(29, 155, 240, 0.15);
  color: #1d9bf0;
  border: 1px solid rgba(29, 155, 240, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.m-model-date {
  font-size: 11px;
  color: #71767b;
  font-weight: 600;
}
.m-model-strategy {
  font-size: 12px;
  color: #8b949e;
  margin-bottom: 12px;
  line-height: 1.4;
}
.m-model-kpis {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.m-model-kpi {
  flex: 1;
  min-width: 0;
}
.m-model-kpi-label {
  font-size: 10px;
  color: #71767b;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}
.m-model-kpi-val {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
}
.m-model-kpi-val.c-green {
  color: #00e676;
}
.m-model-stock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.m-model-stock-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.m-model-stock-row:active {
  opacity: 0.7;
}
.m-model-stock-info {
  flex: 1;
  min-width: 0;
}
.m-model-stock-code-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.m-model-stock-code {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}
.m-model-stock-weight {
  font-size: 10px;
  font-weight: 700;
  color: #8b949e;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}
.m-model-stock-name {
  font-size: 11px;
  color: #71767b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-model-stock-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.m-model-stock-target {
  font-size: 11px;
  color: #8b949e;
  font-weight: 600;
}
.m-model-stock-target strong {
  color: #ffffff;
  font-weight: 800;
}
.m-model-stock-pot {
  font-size: 11.5px;
  font-weight: 800;
  color: #00e676;
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

/* Fund Detail Modal Upgrades (Midas/Robinhood Style) */
.m-fund-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.m-fund-hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.m-fund-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px;
  line-height: 1.35;
}
.m-fund-founder {
  font-size: 11.5px;
  color: #8b949e;
  font-weight: 500;
}
.m-fund-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.m-fund-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.m-fund-badge-accent {
  background: rgba(29, 155, 240, 0.15);
  color: #1d9bf0;
  border: 1px solid rgba(29, 155, 240, 0.3);
}
.m-fund-badge-gold {
  background: rgba(245, 197, 66, 0.15);
  color: #f5c542;
  border: 1px solid rgba(245, 197, 66, 0.3);
}
.m-fund-badge-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #8b949e;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.m-returns-table {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.m-returns-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
}
.m-returns-row:last-child {
  border-bottom: none;
}
.m-returns-period {
  color: #8b949e;
  font-weight: 600;
}
.m-returns-val {
  font-weight: 800;
}
.m-returns-val.up { color: #00e676; }
.m-returns-val.down { color: #f43f5e; }
.m-returns-val.neutral { color: #8b949e; }

.m-alloc-list {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.m-alloc-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.m-alloc-item:last-child {
  border-bottom: none;
}
.m-alloc-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}
.m-alloc-title {
  color: #c9d1d9;
  font-weight: 600;
}
.m-alloc-pct {
  color: #1d9bf0;
  font-weight: 800;
}
.m-alloc-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.m-alloc-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* IPO Card & Detail Modal */
.m-ipo-card {
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.m-ipo-card:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.04);
}
.m-ipo-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.m-ipo-hero-info {
  flex: 1;
  min-width: 0;
}
.m-ipo-title {
  font-size: 17px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 2px;
}
.m-ipo-info-sub {
  font-size: 12px;
  color: #8b949e;
  line-height: 1.35;
}
.m-ipo-section-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 16px 0 8px;
}
.m-ipo-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.m-ipo-prop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}
.m-ipo-prop-item:last-child {
  border-bottom: none;
}
.m-ipo-usage-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: #c9d1d9;
}
.m-ipo-usage-item:last-child {
  border-bottom: none;
}
.m-ipo-usage-pct {
  font-weight: 800;
  color: #1d9bf0;
  flex-shrink: 0;
  min-width: 60px;
}
.m-ipo-commitment-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 11.5px;
  color: #8b949e;
  line-height: 1.4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.m-modal-doc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: rgba(29, 155, 240, 0.12);
  border: 1px solid rgba(29, 155, 240, 0.3);
  border-radius: 12px;
  color: #1d9bf0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  text-decoration: none;
  box-sizing: border-box;
}
.m-modal-doc-btn:active {
  background: rgba(29, 155, 240, 0.22);
  border-color: #1d9bf0;
  transform: scale(0.985);
}

/* ==========================================================================
   ENHANCED STOCK MODAL WORKSTATION (FINANCIALS, PEERS, DIVIDENDS, SHAREHOLDERS)
   ========================================================================== */

.m-stock-tabs-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.m-stock-tabs-strip::-webkit-scrollbar {
  display: none;
}
.m-stock-tab-btn {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #8b949e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.m-stock-tab-btn.active {
  background: #1d9bf0;
  color: #ffffff;
  border-color: #1d9bf0;
}

.m-fin-card-block {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.m-fin-card-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.m-fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.m-fin-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: #71767b;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.m-fin-table td {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #c9d1d9;
}
.m-fin-table tr:last-child td {
  border-bottom: none;
}
.m-val-up {
  color: #00e676;
  font-weight: 700;
}
.m-val-down {
  color: #ff5252;
  font-weight: 700;
}

/* Peer Companies Cards */
.m-peer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.m-peer-card:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.06);
}
.m-peer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.m-peer-info {
  min-width: 0;
  flex: 1;
}
.m-peer-code {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
}
.m-peer-name {
  font-size: 11px;
  color: #8b949e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.m-peer-right {
  text-align: right;
  flex-shrink: 0;
}
.m-peer-price {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}
.m-peer-sub {
  font-size: 10.5px;
  color: #71767b;
  margin-top: 1px;
}

/* Macro Subtabs and Full View Styling */
.m-macro-filter-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.m-macro-filter-strip::-webkit-scrollbar {
  display: none;
}
.m-macro-tab-btn {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 16px;
  background: #141923;
  color: #8b949e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.m-macro-tab-btn.active {
  background: #1d9bf0;
  color: #ffffff;
  border-color: #1d9bf0;
}
.m-macro-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.m-macro-kpi-card {
  background: #141923;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 11px 12px;
}
.m-macro-kpi-title {
  font-size: 10px;
  color: #71767b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.m-macro-kpi-val {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin: 3px 0 2px;
}
.m-macro-kpi-sub {
  font-size: 10.5px;
  color: #8b949e;
}
.m-macro-bulletin-card {
  background: #141923;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}
.m-macro-bulletin-date {
  font-size: 10.5px;
  color: #1d9bf0;
  font-weight: 700;
  margin-bottom: 4px;
}
.m-macro-bulletin-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
}

/* Stock Modal KAP Cards & Ratios */
.m-stock-kap-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.m-stock-kap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.m-stock-kap-date {
  font-size: 11px;
  color: #71767b;
}
.m-stock-kap-type {
  font-size: 10px;
  font-weight: 700;
  color: #1d9bf0;
  background: rgba(29, 155, 240, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
}
.m-stock-kap-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.35;
}
.m-stock-kap-subject {
  font-size: 11.5px;
  color: #c9d1d9;
  margin-bottom: 6px;
  font-weight: 600;
}
.m-stock-kap-summary {
  font-size: 11.5px;
  color: #8b949e;
  line-height: 1.45;
  margin-bottom: 8px;
}
.m-stock-kap-details {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 6px;
}
.m-stock-kap-details li {
  font-size: 11px;
  color: #8b949e;
  position: relative;
  padding-left: 12px;
  margin-bottom: 4px;
  line-height: 1.35;
}
.m-stock-kap-details li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: #1d9bf0;
}
