/* ============================================================
   Mobile Homepage Styles (index_mobile.css)
   Clean, Optimized & Modular Stylesheet
   ============================================================ */

/* 1. Page Layout & Containers */
.mob-page {
  background-color: #f7f9fa;
  min-height: auto;
  padding-bottom: 0 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
  box-sizing: border-box;
}

.mob-content {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* 2. Section Cards & Headers */
.mob-section-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid #eef2f6;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.mob-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.mob-section-title {
  display: flex;
  flex-direction: column;
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.mob-section-title-sm {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.mob-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mob-link-arrow:hover {
  color: #1d4ed8;
}

/* 4. Tab Pills */
.mob-period-tabs {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 12px;
  gap: 2px;
  flex-shrink: 0;
}

.mob-pills-left {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
  margin: 10px 0 6px;
}

.mob-pill {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
}

.mob-pill.is-active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.mob-performance-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 12px;
  gap: 3px;
  margin: 12px 0 10px;
}

.mob-sub-pill {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 0;
  border-radius: 9px;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  line-height: 1;
}

.mob-sub-pill.is-active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* 5. Performance Lists & Stock Rows */
.mob-performance-list {
  display: flex;
  flex-direction: column;
  min-height: 120px;
}

.mob-performance-item,
.mob-stock-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  padding: 10px 0;
  border-bottom: 1px solid #f8fafc;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
}

.mob-performance-item:last-child,
.mob-stock-item:last-child {
  border-bottom: none;
}

.mob-item-left,
.mob-stock-left {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.mob-item-logo-box,
.mob-stock-avatar {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  padding: 4px;
  box-sizing: border-box;
}

.mob-item-logo,
.mob-stock-logo {
  width: 100% !important;
  height: 100% !important;
  max-width: 32px !important;
  max-height: 32px !important;
  object-fit: contain !important;
  display: block !important;
}

.mob-item-logo-fallback,
.mob-stock-fallback {
  font-size: 14px;
  font-weight: 800;
  color: #2563eb;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
}

.mob-item-info,
.mob-stock-info {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.mob-item-name,
.mob-stock-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mob-item-count,
.mob-stock-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
}

.mob-performance-value,
.mob-stock-price {
  font-size: 14.5px;
  font-weight: 800;
  text-align: right;
  flex-shrink: 0 !important;
  margin-left: 12px;
  white-space: nowrap;
}

.mob-stock-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  margin-left: 12px;
}

.mob-stock-change {
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.mob-performance-value.is-up,
.mob-stock-change.is-up,
.mob-grid-card-perf.is-up {
  color: #16a34a;
}

.mob-performance-value.is-down,
.mob-stock-change.is-down,
.mob-grid-card-perf.is-down {
  color: #dc2626;
}

/* 6. Action & Navigation Buttons */
.mob-view-all-wrap {
  margin-top: 10px;
  padding-top: 6px;
}

.mob-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1.5px solid #bfdbfe;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.mob-view-all:hover,
.mob-view-all:active {
  background: #eff6ff;
  border-color: #93c5fd;
}

.mob-commentary-wrap {
  width: 100%;
}

.mob-commentary-btn,
.mob-primary-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  background: #0052cc;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
  transition: background 0.15s ease, transform 0.1s ease;
  box-sizing: border-box;
}

.mob-commentary-btn:active,
.mob-primary-action-btn:active {
  transform: scale(0.99);
  background: #0047b3;
}

.mob-commentary-icon {
  font-size: 18px;
}

/* 7. Sector & Industry 2-Column Grid */
.mob-performance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
  min-height: 120px;
}

.mob-grid-card {
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  min-height: 105px;
  box-sizing: border-box;
}

.mob-grid-card:active {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.mob-grid-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mob-grid-card-logo-box {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  padding: 2px;
  box-sizing: border-box;
}

.mob-grid-card-logo {
  width: 100% !important;
  height: 100% !important;
  max-width: 28px !important;
  max-height: 28px !important;
  object-fit: contain !important;
  display: block !important;
}

.mob-grid-card-logo-fallback {
  font-size: 13px;
  font-weight: 800;
  color: #2563eb;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
}

.mob-grid-card-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mob-grid-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mob-grid-card-stocks {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

.mob-grid-card-perf {
  font-size: 13px;
  font-weight: 800;
}

/* 8. FII / DII Activity */
.mob-fiidii-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.mob-financial-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 12px;
  box-sizing: border-box;
}

.mob-financial-label {
  display: flex !important;
  align-items: center !important;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  min-width: 0;
  flex-shrink: 1;
  white-space: nowrap;
}

.mob-financial-label.is-total {
  font-weight: 800;
  color: #0f172a;
}

.mob-dot {
  width: 7.5px !important;
  height: 7.5px !important;
  border-radius: 2px !important;
  display: inline-block !important;
  margin-right: 8px !important;
  flex-shrink: 0 !important;
}

.mob-dot.is-fii {
  background-color: #3b82f6 !important;
}

.mob-dot.is-dii {
  background-color: #f97316 !important;
}

.mob-financial-val {
  font-size: 15px !important;
  font-weight: 800 !important;
  text-align: right !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.mob-financial-unit {
  font-size: 10.5px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  margin-left: 2px !important;
}

.mob-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 3px 0;
}

/* 9. Bulk & Block Deals */
.mob-deals-content {
  display: flex;
  flex-direction: column;
}

.mob-deal-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  gap: 12px;
}

.mob-deal-summary-text {
  font-size: 13px;
  color: #64748b;
  line-height: 1.35;
  max-width: 210px;
  margin: 0;
}

.mob-deal-summary-count {
  font-size: 32px;
  font-weight: 900;
  color: #2563eb;
  line-height: 1;
}

.mob-deal-section-title {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.05em;
  margin-top: 8px;
  margin-bottom: 8px;
}

.mob-deal-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mob-deal-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.mob-deal-company {
  font-size: 13.5px;
  font-weight: 800;
  color: #2563eb;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mob-deal-by {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mob-deal-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.mob-deal-price-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.mob-deal-price {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

/* 10. Superstar Investors */
.mob-investor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
  min-height: 110px;
}

.mob-investor-card {
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 16px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.mob-investor-card:active {
  background: #f1f5f9;
}

.mob-investor-logo-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto 8px;
  flex-shrink: 0;
  padding: 5px;
  box-sizing: border-box;
}

.mob-investor-logo {
  width: 100%;
  height: 100%;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  display: block;
}

.mob-investor-name {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mob-investor-value {
  font-size: 12px;
  font-weight: 800;
  color: #2563eb;
  margin-top: 3px;
}

/* 11. IPO Corner Horizontal Swipe */
.mob-ipo-cards-wrap {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 12px;
  margin-top: 6px;
  padding: 4px 2px 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mob-ipo-cards-wrap::-webkit-scrollbar {
  display: none;
}

.mob-ipo-card {
  flex: 0 0 85%;
  min-width: 85%;
  max-width: 85%;
  scroll-snap-align: start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #10b981;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.mob-ipo-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.mob-ipo-logo-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #2563eb;
  flex-shrink: 0;
  overflow: hidden;
}

.mob-ipo-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mob-ipo-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mob-ipo-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.mob-ipo-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mob-ipo-badge-status,
.mob-ipo-badge-upcoming,
.mob-ipo-badge-closed,
.mob-ipo-badge-type {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mob-ipo-badge-status { background: #dcfce7; color: #15803d; }
.mob-ipo-badge-upcoming { background: #dbeafe; color: #1d4ed8; }
.mob-ipo-badge-closed { background: #f1f5f9; color: #64748b; }
.mob-ipo-badge-type { background: #e0e7ff; color: #4338ca; }

.mob-ipo-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mob-ipo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.mob-ipo-row-label { color: #64748b; font-weight: 500; }
.mob-ipo-row-val { color: #0f172a; font-weight: 700; }

/* 12. Investletter Horizontal Swipe */
.mob-investletter-heading {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.mob-investletter-cards-wrap {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 14px;
  margin-top: 6px;
  padding: 6px calc((100% - 74%) / 2) 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mob-investletter-cards-wrap::-webkit-scrollbar {
  display: none;
}

.mob-investletter-card {
  flex: 0 0 74%;
  min-width: 74%;
  max-width: 74%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease;
}

.mob-investletter-card:active {
  transform: scale(0.98);
}

.mob-investletter-poster-box {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.mob-investletter-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mob-latest-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #f97316;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.4);
  z-index: 3;
}

.mob-investletter-card-body {
  margin-top: 10px;
  text-align: center;
  width: 100%;
}

.mob-investletter-card-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.mob-investletter-card-date {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
  font-weight: 500;
}

.mob-investletter-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 14px 0;
}

.mob-investletter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.25s ease;
}

.mob-investletter-dot.is-active {
  width: 18px;
  border-radius: 4px;
  background: #10b981;
}

/* 13. Navigation Link Cards */
.mob-link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.mob-link-card:active {
  transform: scale(0.985);
  background-color: #f8fafc;
}

.mob-link-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mob-link-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mob-link-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.mob-link-card-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  margin-top: 3px;
  margin-bottom: 0;
  line-height: 1.3;
}

.mob-link-card-arrow {
  color: #94a3b8;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.mob-link-card:hover .mob-link-card-arrow {
  color: #2563eb;
  transform: translateX(2px);
}

/* 14. Skeleton Loading & Empty States */
.mob-skeleton-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
}

.mob-skeleton-box {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: mobShimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes mobShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.mob-empty-state {
  text-align: center;
  padding: 24px 12px;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

/* Locked Card Section */
.mob-locked-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  margin: 4px 0;
  width: 100%;
  box-sizing: border-box;
}

.mob-locked-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fef3c7;
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 8px;
}

.mob-locked-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.mob-locked-text {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
  margin: 0 0 12px 0;
  max-width: 250px;
}

.mob-locked-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
  transition: transform 0.15s ease;
}

.mob-locked-btn:active {
  transform: scale(0.97);
}

