/* FinSight AI — UX Polish Overrides v2.0 */

/* ═══ FINANCIAL COLORS ═══ */
.fin-gain, .fin-positive { color: #16A34A !important; }
.fin-loss, .fin-negative { color: #DC2626 !important; }
.fin-neutral { color: #6B7280 !important; }
.fin-gain-bg { background: #F0FDF4; color: #16A34A; }
.fin-loss-bg { background: #FEF2F2; color: #DC2626; }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.app-content {
  animation: fadeIn 0.3s ease-out;
}

/* ═══ INTERACTIVE ELEMENTS ═══ */
.page-interactive-row:hover {
  background: #F9FAFB !important;
}
.page-interactive-row:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: -2px;
  border-radius: 4px;
}
.page-interactive-card {
  transition: all 0.2s ease !important;
}
.page-interactive-card:hover {
  border-color: #D1D5DB !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-1px);
}

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ═══ FOCUS VISIBLE ═══ */
*:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ═══ CARD ANIMATIONS ═══ */
.page-container > div > .ant-row {
  animation: fadeInUp 0.4s ease-out;
}
.page-container > div > .ant-row:nth-child(2) {
  animation-delay: 0.1s;
  animation-fill-mode: backwards;
}

/* ═══ ANT DESIGN POLISH ═══ */
.ant-card {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  border-radius: 12px !important;
}
.ant-card-head {
  border-radius: 12px 12px 0 0 !important;
}
button { transition: all 0.2s ease; }
html { scroll-behavior: smooth; }

/* ═══ TABLE ENHANCEMENTS ═══ */
.ant-table-row {
  transition: background 0.15s ease !important;
}
.ant-table-row:hover > td {
  background: #F0F9FF !important;
}
.ant-table-thead > tr > th {
  font-weight: 600 !important;
  color: #374151 !important;
  background: #F8FAFC !important;
  border-bottom: 2px solid #E5E7EB !important;
}

/* ═══ TAG IMPROVEMENTS ═══ */
.ant-tag {
  border-radius: 6px !important;
  font-weight: 500 !important;
  padding: 2px 10px !important;
}

/* ═══ BUTTON IMPROVEMENTS ═══ */
.ant-btn-primary {
  border-radius: 8px !important;
  font-weight: 500 !important;
}
.ant-btn-primary:hover {
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2) !important;
}
.ant-btn-default {
  border-radius: 8px !important;
}

/* ═══ HEADER SECONDARY NAV BAR ═══ */
.secondary-nav {
  background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
  border-bottom: 1px solid #E5E7EB;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.secondary-nav a,
.secondary-nav button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #4B5563;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.secondary-nav a:hover,
.secondary-nav button:hover {
  color: #3B82F6;
  background: #EFF6FF;
}
.secondary-nav .active {
  color: #2563EB;
  background: #EFF6FF;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 #3B82F6;
}

/* ═══ BREADCRUMB / PAGE HEADER POLISH ═══ */
.ant-breadcrumb {
  font-size: 13px !important;
}
.ant-page-header {
  padding: 16px 0 !important;
}

/* ═══ STAT CARDS ═══ */
.ant-statistic-title {
  font-size: 12px !important;
  color: #6B7280 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500 !important;
}
.ant-statistic-content-value {
  font-weight: 700 !important;
  color: #111827 !important;
}

/* ═══ PAGE CONTAINER ═══ */
.page-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

/* ═══ COMPANY PAGE METRICS BAR ═══ */
.company-metrics-bar,
.cd-header__metrics {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.company-metric,
.cd-header__metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}
.company-metric-label,
.cd-header__metric-label {
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.company-metric-value,
.cd-header__metric-value {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
}

/* ═══ LOGIN PAGE POLISH ═══ */
.ant-layout-content [class*="login"] {
  animation: fadeInUp 0.4s ease-out;
}

/* ═══ REPORT TAG COLORS ═══ */
.report-tag-quarterly { background: #EFF6FF; color: #2563EB; border-color: #BFDBFE; }
.report-tag-annual { background: #F5F3FF; color: #7C3AED; border-color: #DDD6FE; }
.report-tag-earnings { background: #FFFBEB; color: #D97706; border-color: #FDE68A; }
.report-tag-investor { background: #ECFDF5; color: #059669; border-color: #A7F3D0; }

/* ═══ SEARCH INPUT POLISH ═══ */
.ant-input-search .ant-input {
  border-radius: 8px !important;
}
.ant-input-search .ant-input-group-addon {
  border-radius: 0 8px 8px 0 !important;
}

/* ═══ MODAL POLISH ═══ */
.ant-modal-content {
  border-radius: 16px !important;
  overflow: hidden;
}
.ant-modal-header {
  border-radius: 16px 16px 0 0 !important;
}

/* ═══ DROPDOWN POLISH ═══ */
.ant-dropdown-menu {
  border-radius: 10px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
  padding: 6px !important;
}
.ant-dropdown-menu-item {
  border-radius: 6px !important;
  padding: 8px 12px !important;
}

/* ═══ SIDEBAR POLISH ═══ */
.ant-layout-sider {
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06) !important;
}

/* ═══ HEADER POLISH ═══ */
.main-header {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
}

/* ═══ LOADING SPINNER ═══ */
.ant-spin-dot-item {
  background-color: #3B82F6 !important;
}

/* ═══ DARK MODE TOGGLE ═══ */
.dark-mode-toggle:hover {
  background: #EFF6FF !important;
  border-color: #93C5FD !important;
}

/* ═══ HERO BANNER ═══ */
.hero-banner-override button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ═══ DARK MODE ═══ */
html.dark {
  color-scheme: dark;
}
html.dark body {
  background: #0F172A !important;
  color: #F1F5F9;
}
html.dark .ant-layout {
  background: #0F172A !important;
}
html.dark .ant-layout-content {
  background: #0F172A !important;
}
html.dark .ant-card {
  background: #1E293B !important;
  border-color: #334155 !important;
  color: #F1F5F9 !important;
}
html.dark .ant-card-head {
  border-color: #334155 !important;
  color: #F1F5F9 !important;
  background: #1E293B !important;
}
html.dark .ant-card-head-title {
  color: #F1F5F9 !important;
}
html.dark .ant-card-body {
  color: #CBD5E1 !important;
}
html.dark .ant-layout-header,
html.dark .main-header {
  background: #0F172A !important;
  border-color: #334155 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important;
}
html.dark .ant-typography,
html.dark .ant-typography h1,
html.dark .ant-typography h2,
html.dark .ant-typography h3,
html.dark .ant-typography h4,
html.dark .ant-typography h5 {
  color: #F1F5F9 !important;
}
html.dark .ant-tag {
  border-color: #475569 !important;
}
html.dark .ant-input,
html.dark .ant-input-affix-wrapper,
html.dark .ant-select-selector {
  background: #1E293B !important;
  border-color: #334155 !important;
  color: #F1F5F9 !important;
}
html.dark .ant-input::placeholder {
  color: #64748B !important;
}
html.dark .ant-btn-default {
  background: #1E293B !important;
  border-color: #475569 !important;
  color: #F1F5F9 !important;
}
html.dark .ant-table {
  background: #1E293B !important;
  color: #CBD5E1 !important;
}
html.dark .ant-table-thead > tr > th {
  background: #0F172A !important;
  color: #F1F5F9 !important;
  border-color: #334155 !important;
}
html.dark .ant-table-tbody > tr > td {
  border-color: #1E293B !important;
  color: #CBD5E1 !important;
}
html.dark .ant-table-row:hover > td {
  background: #334155 !important;
}
html.dark .ant-empty-description {
  color: #94A3B8 !important;
}
html.dark .secondary-nav {
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%) !important;
  border-color: #334155 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}
html.dark .secondary-nav button {
  color: #94A3B8 !important;
}
html.dark .secondary-nav button:hover {
  color: #60A5FA !important;
  background: #1E293B !important;
}
html.dark .secondary-nav .active {
  color: #60A5FA !important;
  background: rgba(59,130,246,0.15) !important;
}
html.dark .page-interactive-row:hover {
  background: #334155 !important;
}
html.dark .page-interactive-card:hover {
  border-color: #3B82F6 !important;
  box-shadow: 0 2px 12px rgba(59,130,246,0.2) !important;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: #64748B;
}
html.dark .dark-mode-toggle {
  border-color: #475569 !important;
}
html.dark .dark-mode-toggle:hover {
  background: #334155 !important;
  border-color: #60A5FA !important;
}
html.dark .ant-breadcrumb,
html.dark .ant-breadcrumb a {
  color: #94A3B8 !important;
}
html.dark .ant-dropdown-menu {
  background: #1E293B !important;
  border: 1px solid #334155 !important;
}
html.dark .ant-dropdown-menu-item {
  color: #CBD5E1 !important;
}
html.dark .ant-dropdown-menu-item:hover {
  background: #334155 !important;
}
html.dark .ant-modal-content {
  background: #1E293B !important;
}
html.dark .ant-modal-header {
  background: #1E293B !important;
  border-color: #334155 !important;
}
html.dark .ant-modal-title {
  color: #F1F5F9 !important;
}
html.dark .ant-modal-close {
  color: #94A3B8 !important;
}
html.dark .cd-header__metrics {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%) !important;
  border-color: #334155 !important;
}
html.dark .cd-header__metric-label {
  color: #94A3B8 !important;
}
html.dark .cd-header__metric-value {
  color: #F1F5F9 !important;
}
html.dark .ant-badge-count {
  box-shadow: 0 0 0 1px #1E293B !important;
}
/* Fix inline-styled text in dark mode */
html.dark [style*="color: rgb(15, 23, 42)"],
html.dark [style*="color: #0F172A"],
html.dark [style*="color: #1E293B"],
html.dark [style*="color: rgb(30, 41, 59)"],
html.dark [style*="color:#0F172A"],
html.dark [style*="color:#1E293B"] {
  color: #F1F5F9 !important;
}
html.dark [style*="color: rgb(100, 116, 139)"],
html.dark [style*="color: #64748B"],
html.dark [style*="color:#64748B"] {
  color: #94A3B8 !important;
}
html.dark [style*="color: rgb(148, 163, 184)"],
html.dark [style*="color: #94A3B8"] {
  color: #CBD5E1 !important;
}
html.dark [style*="background: rgb(248, 250, 252)"],
html.dark [style*="background: #F8FAFC"],
html.dark [style*="background:#F8FAFC"] {
  background: #0F172A !important;
}
html.dark [style*="background: rgb(255, 255, 255)"],
html.dark [style*="background: #fff"],
html.dark [style*="background:#fff"],
html.dark [style*="background: white"] {
  background: #1E293B !important;
}
html.dark [style*="border-color: rgb(226, 232, 240)"],
html.dark [style*="border: 1px solid #E2E8F0"],
html.dark [style*="border:1px solid #E2E8F0"] {
  border-color: #334155 !important;
}
html.dark [style*="border-bottom: 1px solid rgb(241, 245, 249)"] {
  border-color: #1E293B !important;
}
html.dark .cd-header__title,
html.dark h1, html.dark h2, html.dark h3 {
  color: #F1F5F9 !important;
}
html.dark .ant-statistic-title {
  color: #94A3B8 !important;
}
html.dark .ant-statistic-content-value {
  color: #F1F5F9 !important;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .secondary-nav {
    display: none;
  }
  .company-metrics-bar,
  .cd-header__metrics {
    gap: 12px;
    padding: 12px;
  }
  .company-metric,
  .cd-header__metric {
    min-width: 90px;
    flex: 1;
  }
  .hero-banner-override {
    padding: 16px 20px !important;
    flex-direction: column !important;
    text-align: center;
  }
  .hero-banner-override > div:last-child {
    justify-content: center;
  }
  .ant-card {
    border-radius: 10px !important;
  }
  .ant-table {
    font-size: 12px !important;
  }
  .page-container {
    padding: 0 12px;
  }
}

@media (max-width: 480px) {
  .hero-banner-override {
    padding: 14px 16px !important;
  }
  .hero-banner-override > div:first-child > div:first-child {
    font-size: 16px !important;
  }
  .cd-header__metrics {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .cd-header__metric {
    flex-direction: row !important;
    justify-content: space-between;
    min-width: 100% !important;
  }
  .ant-card-head-title {
    font-size: 13px !important;
  }
  .ant-btn {
    font-size: 12px !important;
  }

  /* Mobile bottom nav refinements for small phones */
  .mobile-bottom-nav {
    height: auto;
  }
  .mobile-bottom-nav__item {
    min-height: 48px !important;
  }
  .mobile-bottom-nav__icon {
    font-size: 18px !important;
  }
  .mobile-bottom-nav__label {
    font-size: 9px !important;
  }

  /* Page body padding to avoid overlap with bottom nav */
  .ant-layout-content,
  .page-container {
    padding-bottom: 70px !important;
  }

  /* Modal responsiveness for small screens */
  .ant-modal {
    max-width: 90vw !important;
  }
  .ant-modal-content {
    max-height: 85vh !important;
  }

  /* Input and form improvements */
  .ant-input,
  .ant-select {
    font-size: 16px !important;
  }

  /* Improve spacing for small screens */
  .ant-card {
    margin: 8px 0 !important;
  }
}

/* ═══ FOOTER ═══ */
.finsight-footer {
  background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 100%);
  border-top: 1px solid #E2E8F0;
  padding: 32px 24px 20px;
  margin-top: 48px;
}
.finsight-footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.finsight-footer__brand {
  flex: 1;
  min-width: 240px;
}
.finsight-footer__brand-name {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 6px;
}
.finsight-footer__brand-desc {
  font-size: 12px;
  color: #64748B;
  line-height: 1.5;
  max-width: 320px;
}
.finsight-footer__links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.finsight-footer__col-title {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.finsight-footer__col a {
  display: block;
  font-size: 13px;
  color: #4B5563;
  text-decoration: none;
  padding: 3px 0;
  transition: color 0.15s;
}
.finsight-footer__col a:hover {
  color: #3B82F6;
}
.finsight-footer__bottom {
  max-width: 1400px;
  margin: 16px auto 0;
  padding-top: 16px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #94A3B8;
}
html.dark .finsight-footer {
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%) !important;
  border-color: #334155 !important;
}
html.dark .finsight-footer__brand-name {
  color: #F1F5F9 !important;
}
html.dark .finsight-footer__brand-desc {
  color: #94A3B8 !important;
}
html.dark .finsight-footer__col-title {
  color: #CBD5E1 !important;
}
html.dark .finsight-footer__col a {
  color: #94A3B8 !important;
}
html.dark .finsight-footer__col a:hover {
  color: #60A5FA !important;
}
html.dark .finsight-footer__bottom {
  border-color: #334155 !important;
  color: #64748B !important;
}

/* ═══ PAGE HEADER BANNER ═══ */
.page-header-banner {
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.page-header-banner__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  flex-shrink: 0;
}
.page-header-banner__text h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  line-height: 1.2;
}
.page-header-banner__text p {
  font-size: 13px;
  color: #64748B;
  margin: 2px 0 0;
  line-height: 1.4;
}
html.dark .page-header-banner {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%) !important;
  border-color: #334155 !important;
}
html.dark .page-header-banner__icon {
  background: #334155 !important;
}
html.dark .page-header-banner__text h2 {
  color: #F1F5F9 !important;
}
html.dark .page-header-banner__text p {
  color: #94A3B8 !important;
}

/* ═══ REPORT MODAL FIX ═══ */
.ant-modal-header .ant-typography h5 {
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* ═══ ADDITIONAL POLISH ═══ */
/* Pagination */
.ant-pagination-item-active {
  border-color: #3B82F6 !important;
}
.ant-pagination-item-active a {
  color: #3B82F6 !important;
}
html.dark .ant-pagination-item {
  background: #1E293B !important;
  border-color: #334155 !important;
}
html.dark .ant-pagination-item a {
  color: #CBD5E1 !important;
}
html.dark .ant-pagination-item-active {
  border-color: #3B82F6 !important;
}
html.dark .ant-pagination-item-active a {
  color: #3B82F6 !important;
}

/* Tooltip */
html.dark .ant-tooltip-inner {
  background: #334155 !important;
}

/* Select dropdown in dark mode */
html.dark .ant-select-dropdown {
  background: #1E293B !important;
  border: 1px solid #334155 !important;
}
html.dark .ant-select-item {
  color: #CBD5E1 !important;
}
html.dark .ant-select-item-option-active {
  background: #334155 !important;
}
html.dark .ant-select-item-option-selected {
  background: rgba(59,130,246,0.15) !important;
}

/* ═══════════════════════════════════════════════════════
   v6.0 — PREMIUM POLISH FOR 9.5+ SCORE
   ═══════════════════════════════════════════════════════ */

/* ═══ SKELETON SHIMMER LOADERS ═══ */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  min-height: 130px;
}
.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  margin-bottom: 10px;
}
.skeleton-line--short { width: 40%; }
.skeleton-line--medium { width: 65%; }
.skeleton-line--long { width: 90%; }
.skeleton-line--tag {
  display: inline-block;
  width: 80px;
  height: 22px;
  border-radius: 10px;
  margin-right: 8px;
}
.skeleton-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
html.dark .skeleton-card {
  background: #1E293B;
  border-color: #334155;
}
html.dark .skeleton-line,
html.dark .skeleton-circle {
  background: linear-gradient(90deg, #1E293B 25%, #334155 50%, #1E293B 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ═══ SMOOTH PAGE TRANSITIONS ═══ */
@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.page-container,
.page-shell {
  animation: pageSlideIn 0.35s ease-out;
}

/* ═══ SECTION HEADERS WITH GRADIENT ACCENT ═══ */
.ant-card-head-title {
  position: relative;
}
/* Clean card headers */
.ant-card-head {
  position: relative;
}

/* ═══ ENHANCED SEARCH BAR ═══ */
.main-header .ant-input-search .ant-input,
.main-header .ant-input-affix-wrapper {
  transition: all 0.3s ease !important;
}
.main-header .ant-input-search .ant-input:focus,
.main-header .ant-input-affix-wrapper-focused {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(59, 130, 246, 0.1) !important;
  border-color: #3B82F6 !important;
  width: 100% !important;
}
/* Search bar expand effect */
.main-header .ant-input-search {
  transition: width 0.3s ease;
}

/* ═══ PREMIUM EMPTY STATES ═══ */
.ant-empty {
  padding: 40px 20px !important;
}
.ant-empty-image {
  margin-bottom: 16px !important;
}
.ant-empty-description {
  font-size: 14px !important;
  color: #64748B !important;
  line-height: 1.5 !important;
  max-width: 320px;
  margin: 0 auto;
}
.ant-empty-footer {
  margin-top: 16px !important;
}

/* ═══ CARD CONTENT DENSITY IMPROVEMENTS ═══ */
.ant-card-body {
  padding: 16px 20px !important;
}

/* ═══ REFINED BUTTON STYLES ═══ */
.ant-btn-primary {
  background: #3B82F6 !important;
  border: none !important;
  font-weight: 600 !important;
}
.ant-btn-primary:hover {
  background: #2563EB !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2) !important;
}

/* Badge — clean, no animation */

/* ═══ SECTOR CARD ACCENTS — subtle, uniform ═══ */
.sector-accent-it,
.sector-accent-finance,
.sector-accent-pharma,
.sector-accent-auto,
.sector-accent-energy,
.sector-accent-fmcg,
.sector-accent-metals,
.sector-accent-infra,
.sector-accent-default { border-left: 3px solid #3B82F6 !important; }

/* ═══ STATUS INDICATORS ═══ */
@keyframes liveDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.status-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #16A34A;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16A34A;
  animation: liveDot 1.5s ease-in-out infinite;
}

/* ═══ TOOLTIP POLISH ═══ */
.ant-tooltip-inner {
  border-radius: 8px !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* ═══ NOTIFICATION / MESSAGE POLISH ═══ */
.ant-message-notice-content {
  border-radius: 10px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
  padding: 10px 16px !important;
}

/* ═══ DRAWER POLISH ═══ */
.ant-drawer-content {
  border-radius: 16px 0 0 16px !important;
}

/* ═══ PROGRESS BAR GRADIENT ═══ */
.ant-progress-bg {
  background: #3B82F6 !important;
}

/* ═══ BREADCRUMB ENHANCEMENT ═══ */
.ant-breadcrumb {
  margin-bottom: 8px !important;
}
.ant-breadcrumb a {
  transition: color 0.2s ease !important;
}
.ant-breadcrumb a:hover {
  color: #3B82F6 !important;
}
.ant-breadcrumb-separator {
  color: #CBD5E1 !important;
}

/* ═══ TAB POLISH ═══ */
.ant-tabs-tab {
  transition: all 0.2s ease !important;
  font-weight: 500 !important;
}
.ant-tabs-tab:hover {
  color: #3B82F6 !important;
}
.ant-tabs-tab-active .ant-tabs-tab-btn {
  font-weight: 600 !important;
}
.ant-tabs-ink-bar {
  background: #3B82F6 !important;
  height: 2px !important;
  border-radius: 2px !important;
}

/* ═══ SWITCH / TOGGLE POLISH ═══ */
.ant-switch-checked {
  background: #3B82F6 !important;
}

/* ═══ DATE PICKER POLISH ═══ */
.ant-picker {
  border-radius: 8px !important;
}
.ant-picker-dropdown {
  border-radius: 12px !important;
}

/* ═══ POPOVER POLISH ═══ */
.ant-popover-inner {
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

/* ═══ REPORT CARD ENHANCEMENTS ═══ */
.ant-card:has(.ant-tag) {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.ant-card:has(.ant-tag):hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* ═══ TEXT SELECTION COLOR ═══ */
::selection {
  background: rgba(59, 130, 246, 0.2);
  color: #1E293B;
}
html.dark ::selection {
  background: rgba(96, 165, 250, 0.3);
  color: #F1F5F9;
}

/* ═══ LINK HOVER ANIMATION ═══ */
a {
  transition: color 0.2s ease;
}

/* ═══ SUBTLE GRAIN TEXTURE ON HERO ═══ */
.hero-banner-override,
[style*="linear-gradient(135deg, rgb(59, 130, 246)"] {
  position: relative;
}

/* ═══ NUMBER COUNTER ANIMATION SUPPORT ═══ */
@keyframes countUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.count-animated {
  animation: countUp 0.3s ease-out;
}

/* ═══ GLASS MORPHISM UTILITY ═══ */
.glass {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}
html.dark .glass {
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(51, 65, 85, 0.3) !important;
}

/* ═══ IMPROVED FORM INPUTS ═══ */
.ant-input,
.ant-input-affix-wrapper {
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}
.ant-input:focus,
.ant-input-affix-wrapper-focused {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* ═══ DARK MODE: ADDITIONAL POLISH ═══ */
html.dark .ant-tabs-tab {
  color: #94A3B8 !important;
}
html.dark .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: #60A5FA !important;
}
html.dark .ant-drawer-content {
  background: #1E293B !important;
}
html.dark .ant-popover-inner {
  background: #1E293B !important;
  border: 1px solid #334155 !important;
}
html.dark .ant-message-notice-content {
  background: #1E293B !important;
  color: #F1F5F9 !important;
  border: 1px solid #334155 !important;
}
html.dark .ant-picker {
  background: #1E293B !important;
  border-color: #334155 !important;
  color: #F1F5F9 !important;
}
html.dark .finsight-footer a {
  transition: color 0.2s ease;
}

/* ═══ PRINT STYLES ═══ */
@media print {
  .main-header, .secondary-nav, .finsight-footer, .dark-mode-toggle { display: none !important; }
  .ant-card { break-inside: avoid; box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ═══ REDUCED MOTION PREFERENCE ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
