/* Capital Markets module — scoped to the IR Command Center page */
.cm-dashboard{
  --cm-purple:#6c4cf5;
  --cm-purple-2:#8b73ff;
  --cm-line:#e9e8f1;
  --cm-muted:#77798c;
  --cm-text:#222236;
  min-width:0;
  width:100%;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--cm-text);
}
.cm-dashboard *{box-sizing:border-box;}
.cm-dashboard .font-mono-num{font-family:"Space Grotesk",Inter,sans-serif;}
/* Compact Capital Market header — clean, minimal, purple theme */
.cm-page-heading{
  width:100%;
  min-height:58px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin:0 0 16px;
  padding:5px 0 10px;
}
.cm-page-title-wrap{
  min-width:250px;
  flex:0 0 auto;
}
.cm-brand-title{
  display:flex;
  align-items:baseline;
  margin:0;
  white-space:nowrap;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size:27px;
  line-height:30px;
  font-weight:800;
  letter-spacing:-1.1px;
  color:#202334;
  text-rendering:optimizeLegibility;
  font-synthesis:none;
}
.cm-brand-capital{color:#202334;}
.cm-brand-market{color:var(--cm-purple);}
.cm-brand-subtitle{
  margin-top:2px;
  padding-left:4px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  color:#9198ad;
  font-size:9px;
  line-height:11px;
  font-weight:700;
  letter-spacing:2.6px;
  white-space:nowrap;
  text-rendering:optimizeLegibility;
  font-synthesis:none;
}
.cm-page-tools{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  padding-top:3px;
}
.cm-compact-company-switcher{
  position:relative;
  display:flex;
  align-items:center;
  width:min(340px,34vw);
  min-width:260px;
  height:34px;
  border:1px solid #e1e4ee;
  border-radius:999px;
  background:#f5f7fb;
  overflow:visible;
  box-shadow:inset 0 1px 2px rgba(42,47,67,.02);
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.cm-compact-company-switcher:focus-within{
  border-color:#cfc5ff;
  background:#fff;
  box-shadow:0 0 0 3px rgba(108,76,245,.07);
}
.cm-company-search-form{
  position:relative;
  flex:1;
  min-width:0;
  width:100%;
  height:100%;
}
.cm-company-search-form>i{
  position:absolute;
  left:13px;
  top:50%;
  transform:translateY(-50%);
  z-index:2;
  color:#8fa0bb;
  font-size:12px;
}
.cm-company-search-form>input{
  width:100%;
  height:100%;
  border:0;
  border-radius:999px;
  background:transparent;
  padding:0 15px 0 36px;
  color:#2e3245;
  outline:none;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size:11px;
  font-weight:600;
}
.cm-company-search-form>input::placeholder{color:#a2a9b8;}
.cm-company-dropdown{
  position:absolute;
  right:0;
  top:calc(100% + 7px);
  z-index:90;
  width:100%;
  max-height:260px;
  overflow-y:auto;
  overflow-x:hidden;
  background:#fff;
  border:1px solid #e8e6f0;
  border-radius:12px;
  box-shadow:0 18px 40px rgba(36,31,65,.14);
  padding:5px;
  scrollbar-width:thin;
  scrollbar-color:rgba(97,78,174,.20) transparent;
}
.cm-company-dropdown.hidden{display:none;}
.cm-company-dropdown ul{list-style:none;padding:0;margin:0;}
.cm-company-dropdown li{
  display:flex;
  align-items:center;
  gap:9px;
  padding:8px 9px;
  border-radius:8px;
  color:#55566a;
  font-size:10.5px;
  font-weight:600;
  cursor:pointer;
}
.cm-company-dropdown li i{width:14px;color:#9183df;}
.cm-company-dropdown li:hover{background:#f7f5ff;color:#5f4bc9;}
.cm-company-dropdown::-webkit-scrollbar{width:4px;}
.cm-company-dropdown::-webkit-scrollbar-track{background:transparent;}
.cm-company-dropdown::-webkit-scrollbar-thumb{background:rgba(97,78,174,.20);border-radius:999px;}

.cm-market-status{
  flex:0 0 auto;
  height:34px;
  border-radius:999px;
  border:1px solid #ded7ff;
  background:#f7f4ff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 14px;
  color:#6550d7;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size:9px;
  line-height:1;
  font-weight:800;
  letter-spacing:.15px;
  white-space:nowrap;
}
.cm-market-status span{
  width:6px;
  height:6px;
  flex:0 0 6px;
  border-radius:50%;
  background:#8b73ff;
}
.cm-market-status.is-open{
  color:#6550d7;
  background:#f7f4ff;
  border-color:#dcd4ff;
}
.cm-market-status.is-open span{
  background:#7a61ee;
  box-shadow:0 0 0 3px rgba(122,97,238,.10);
  animation:cmPulse 1.7s infinite;
}
.cm-market-status.is-holiday{
  color:#8a6c27;
  background:#fffaf0;
  border-color:#efe2bd;
}
.cm-market-status.is-holiday span{background:#d6a43c;}
.cm-market-status.is-closed{
  color:#737487;
  background:#f8f8fb;
  border-color:#e5e5ec;
}
.cm-market-status.is-closed span{background:#a6a7b5;}
@keyframes cmPulse{0%,100%{opacity:1}50%{opacity:.45}}

.cm-dashboard .premium-card{background:#fff;border:1px solid #e7e7ef;border-radius:1.25rem;box-shadow:0 5px 18px rgba(42,37,72,.045);transition:all .25s ease;}
.cm-dashboard .hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none;}.cm-dashboard .hide-scrollbar::-webkit-scrollbar{display:none;}
.cm-dashboard .price-action-scroll{scrollbar-width:thin;scrollbar-color:rgba(107,91,176,.26) transparent;scroll-behavior:smooth;}.cm-dashboard .price-action-scroll::-webkit-scrollbar{height:5px;}.cm-dashboard .price-action-scroll::-webkit-scrollbar-track{background:transparent;}.cm-dashboard .price-action-scroll::-webkit-scrollbar-thumb{background:rgba(107,91,176,.24);border-radius:999px;}.cm-dashboard .price-action-scroll::-webkit-scrollbar-thumb:hover{background:rgba(91,70,189,.45);}
@keyframes cmFadeInUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
.cm-dashboard .animate-stagger{opacity:0;animation:cmFadeInUp .42s cubic-bezier(.16,1,.3,1) forwards;}.cm-dashboard .delay-100{animation-delay:80ms;}.cm-dashboard .delay-200{animation-delay:140ms;}.cm-dashboard .delay-300{animation-delay:200ms;}
.apexcharts-tooltip{background:#fff!important;border:1px solid #e7e7ef!important;box-shadow:0 12px 28px rgba(28,25,48,.12)!important;color:#36364b!important;border-radius:10px!important;}.apexcharts-tooltip-title{background:#f8f8fc!important;border-bottom:1px solid #ecebf3!important;font:800 10px Inter,sans-serif!important;text-transform:uppercase!important;}.cm-dashboard .format-percent{display:flex;align-items:center;justify-content:flex-end;gap:.25rem;}
.cm-dashboard .card-perspective{perspective:1500px;}.cm-dashboard .card-inner{position:relative;width:100%;height:100%;transition:transform .7s cubic-bezier(.34,1.56,.64,1);transform-style:preserve-3d;}.cm-dashboard .card-front,.cm-dashboard .card-back{position:absolute;width:100%;height:100%;backface-visibility:hidden;-webkit-backface-visibility:hidden;border-radius:1.25rem;overflow:hidden;}.cm-dashboard .card-back{transform:rotateY(180deg);background:#fafafd;}.cm-dashboard .is-flipped{transform:rotateY(180deg);}
.cm-dashboard .price-action-scroll .card-perspective{height:362px;}.cm-dashboard .price-action-scroll .card-front,.cm-dashboard .price-action-scroll .card-back{box-sizing:border-box;}.cm-dashboard .price-action-scroll .format-percent{gap:.2rem;}
@media(min-width:640px){.cm-dashboard .price-action-scroll .card-perspective{width:304px;min-width:304px;}}@media(max-width:639px){.cm-dashboard .price-action-scroll .card-perspective{height:362px;width:82vw;min-width:82vw;}}
.cm-dashboard .tv-checkbox:checked+div{background:#6c4cf5;border-color:#6c4cf5;}.cm-dashboard .tv-checkbox:checked+div i{color:#fff;}.apexcharts-svg title,.apexcharts-svg desc{display:none!important;}
.cm-dashboard .news-premium-card{border-radius:1rem;background:#fff;border:1px solid rgba(226,232,240,.85);box-shadow:0 4px 10px rgba(0,0,0,.025);transition:all .3s cubic-bezier(.16,1,.3,1);position:relative;overflow:hidden;}.cm-dashboard .news-premium-card:hover{transform:translateY(-3px);box-shadow:0 12px 22px -10px rgba(46,39,82,.14);border-color:rgba(108,76,245,.28);}.cm-dashboard .news-pattern-bg{position:absolute;inset:0;opacity:.32;background-image:radial-gradient(#e8e4fb 1.1px,transparent 1.1px);background-size:12px 12px;pointer-events:none;z-index:1;}.cm-dashboard .news-card-content{position:relative;z-index:2;height:100%;display:flex;flex-direction:column;justify-content:space-between;}

/* Keep every horizontal scroller inside the module instead of expanding the app shell. */
.cm-dashboard .overflow-x-auto{max-width:100%;}.cm-dashboard table{max-width:none;}


@media(max-width:900px){
  .cm-page-heading{gap:16px;}
  .cm-page-tools{gap:8px;}
  .cm-compact-company-switcher{width:min(310px,40vw);min-width:210px;}
}
@media(max-width:700px){
  .cm-page-heading{flex-direction:column;align-items:stretch;gap:10px;}
  .cm-page-title-wrap{min-width:0;}
  .cm-page-tools{width:100%;padding-top:0;justify-content:space-between;}
  .cm-compact-company-switcher{flex:1;width:auto;min-width:0;}
}
@media(max-width:480px){
  .cm-brand-title{font-size:23px;line-height:26px;letter-spacing:-.9px;}
  .cm-brand-subtitle{font-size:8px;letter-spacing:2.2px;}
  .cm-page-tools{gap:7px;}
  .cm-market-status{height:31px;padding:0 10px;font-size:8px;}
  .cm-compact-company-switcher{height:31px;}
}



.cm-dashboard .tf-btn,
.cm-dashboard .chart-mode-btn,
.cm-dashboard .cm-card-flip-btn,
.cm-dashboard .cm-fin-tab,
.cm-dashboard .cm-fin-close {
  -webkit-appearance: none !important;
  appearance: none !important;
  outline: 0 !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Shared segmented-control surfaces */
.cm-dashboard #timeframe-container {
  border-color: #e5e1f3 !important;
  background: rgba(250,249,253,.94) !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 8px rgba(53,45,92,.04) !important;
}

.cm-dashboard .tf-btn,
.cm-dashboard .chart-mode-btn {
  min-height: 32px;
  padding: 0 13px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #687086 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

.cm-dashboard .tf-btn:hover,
.cm-dashboard .chart-mode-btn:hover {
  background: #f7f4ff !important;
  border-color: #ebe5ff !important;
  color: #654ae8 !important;
}

.cm-dashboard .tf-btn:focus-visible,
.cm-dashboard .chart-mode-btn:focus-visible,
.cm-dashboard .cm-fin-tab:focus-visible,
.cm-dashboard .cm-fin-close:focus-visible,
.cm-dashboard .cm-card-flip-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(108,76,245,.12) !important;
}

/* Existing JS adds these violet text classes to the selected button. */
.cm-dashboard .tf-btn.text-violet-500,
.cm-dashboard .chart-mode-btn.text-violet-600 {
  background: #f1edff !important;
  border-color: #d8ceff !important;
  color: #6547ed !important;
  box-shadow: 0 1px 3px rgba(78,57,178,.10) !important;
}

/* Financial statement modal tabs */
.cm-dashboard .cm-fin-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px !important;
  border: 1px solid #e5e1f3;
  border-radius: 13px !important;
  background: #f8f7fc !important;
  box-shadow: inset 0 1px 1px rgba(46,39,82,.02);
}

.cm-dashboard .cm-fin-tab {
  min-height: 34px;
  padding: 0 14px !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #73798c !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease !important;
}

.cm-dashboard .cm-fin-tab:hover {
  background: #f3efff !important;
  color: #6547ed !important;
}

/* switchFinTab() keeps bg-white only on the active tab. */
.cm-dashboard .cm-fin-tab.bg-white {
  background: #f1edff !important;
  border-color: #d8ceff !important;
  color: #5f43dc !important;
  box-shadow: 0 1px 3px rgba(78,57,178,.10) !important;
}

/* Financial modal close: soft control, never native browser button */
.cm-dashboard .cm-fin-close {
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  border: 1px solid #e4e5ed !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(38,34,61,.05) !important;
  color: #8c93a5 !important;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease !important;
}
.cm-dashboard .cm-fin-close:hover {
  background: #fff7f8 !important;
  border-color: #f0d6dc !important;
  color: #d65a70 !important;
  transform: rotate(3deg);
}

/* Small flip control on price cards */
.cm-dashboard .cm-card-flip-btn {
  border: 1px solid #e7e7ef !important;
  background: #f7f7fb !important;
  box-shadow: none !important;
  color: #8b91a3 !important;
}
.cm-dashboard .cm-card-flip-btn:hover {
  border-color: #d9d0ff !important;
  background: #f3efff !important;
  color: #6547ed !important;
}

/* Dark-mode equivalents */
.dark .cm-dashboard #timeframe-container,
.dark .cm-dashboard .cm-fin-tabs {
  border-color: #2d2d34 !important;
  background: rgba(24,24,27,.92) !important;
}
.dark .cm-dashboard .tf-btn,
.dark .cm-dashboard .chart-mode-btn,
.dark .cm-dashboard .cm-fin-tab {
  color: #a1a1aa !important;
}
.dark .cm-dashboard .tf-btn:hover,
.dark .cm-dashboard .chart-mode-btn:hover,
.dark .cm-dashboard .cm-fin-tab:hover {
  background: rgba(108,76,245,.12) !important;
  border-color: rgba(139,115,255,.22) !important;
  color: #b8a8ff !important;
}
.dark .cm-dashboard .tf-btn.text-violet-500,
.dark .cm-dashboard .chart-mode-btn.text-violet-600,
.dark .cm-dashboard .cm-fin-tab.bg-white {
  background: rgba(108,76,245,.16) !important;
  border-color: rgba(139,115,255,.30) !important;
  color: #b8a8ff !important;
}
.dark .cm-dashboard .cm-fin-close,
.dark .cm-dashboard .cm-card-flip-btn {
  border-color: #303038 !important;
  background: #1b1b20 !important;
  color: #a1a1aa !important;
}



/* =========================================================
   1. FINANCIAL MODAL — TRUE ROUNDED TOP CORNERS
   ========================================================= */

#fin-modal-card {
    border-radius: 28px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    background-clip: padding-box !important;
    isolation: isolate;
}

/*
 * The first direct child is the modal header.
 * Give the header its own radius as well so its background
 * can never visually square-off the outer top corners.
 */
#fin-modal-card > div:first-child {
    border-top-left-radius: 28px !important;
    border-top-right-radius: 28px !important;
    overflow: hidden !important;

    background: #fbfbfe !important;
    background-image: none !important;
}

/* Body always stays solid */
#fin-modal-card #modal-body {
    background: #ffffff !important;
}


/* =========================================================
   2. FINANCIAL TABLE — SOLID STICKY LINE ITEM COLUMN
   ========================================================= */

#fin-table-scroll {
    position: relative;
    isolation: isolate;

    background: #ffffff !important;

    border-radius: 16px !important;

    /*
     * Keep horizontal scrolling but ensure children respect
     * the rounded table container.
     */
    overflow-x: auto;
}

/*
 * Separate borders work much more reliably with sticky
 * columns than border-collapse:collapse.
 */
#fin-table-scroll table {
    border-collapse: separate !important;
    border-spacing: 0 !important;

    background: #ffffff !important;
}


/* ---------------------------------------------------------
   Sticky first-column geometry
   --------------------------------------------------------- */

#fin-table-scroll th:first-child,
#fin-table-scroll td:first-child {
    position: sticky !important;
    left: 0 !important;

    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;

    background-clip: padding-box !important;

    /*
     * Remove transparency/backdrop effects from the sticky
     * surface. This is what prevents numbers behind it from
     * becoming visible.
     */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    opacity: 1 !important;
}


/* ---------------------------------------------------------
   Header first column
   --------------------------------------------------------- */

#fin-table-scroll thead th:first-child {
    z-index: 60 !important;

    background: #f3f5f9 !important;
    background-color: #f3f5f9 !important;
    background-image: none !important;

    box-shadow:
        inset -1px 0 0 rgba(80, 87, 110, 0.08),
        8px 0 15px -14px rgba(29, 35, 55, 0.32) !important;
}


/* ---------------------------------------------------------
   Normal body first column
   --------------------------------------------------------- */

#fin-table-scroll tbody td:first-child {
    z-index: 40 !important;

    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;

    box-shadow:
        inset -1px 0 0 rgba(80, 87, 110, 0.07),
        8px 0 15px -14px rgba(29, 35, 55, 0.24) !important;
}


/* ---------------------------------------------------------
   Hover state remains SOLID
   --------------------------------------------------------- */

#fin-table-scroll tbody tr:hover > td:first-child {
    background: #f8f9fc !important;
    background-color: #f8f9fc !important;
}


/* ---------------------------------------------------------
   PAT / violet highlighted rows
   Preserve their purple appearance without transparency.
   --------------------------------------------------------- */

#fin-table-scroll tbody tr[class*="bg-violet"] > td:first-child {
    background: #f5f2ff !important;
    background-color: #f5f2ff !important;
}

#fin-table-scroll tbody tr[class*="bg-violet"]:hover > td:first-child {
    background: #f1edff !important;
    background-color: #f1edff !important;
}


/* ---------------------------------------------------------
   Expanded child/group rows
   --------------------------------------------------------- */

#fin-table-scroll tbody tr[class*="bg-slate-50"] > td:first-child {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
}


/* =========================================================
   3. TABLE TOP CORNERS
   ========================================================= */

#fin-table-scroll thead tr:first-child th:first-child {
    border-top-left-radius: 15px;
}

#fin-table-scroll thead tr:first-child th:last-child {
    border-top-right-radius: 15px;
}


/* =========================================================
   4. DARK MODE
   ========================================================= */

.dark #fin-modal-card {
    background: #09090b !important;
}

.dark #fin-modal-card > div:first-child {
    background: #121214 !important;
}

.dark #fin-modal-card #modal-body,
.dark #fin-table-scroll,
.dark #fin-table-scroll table {
    background: #09090b !important;
}

.dark #fin-table-scroll thead th:first-child {
    background: #121214 !important;
    background-color: #121214 !important;
}

.dark #fin-table-scroll tbody td:first-child {
    background: #09090b !important;
    background-color: #09090b !important;
}

.dark #fin-table-scroll tbody tr:hover > td:first-child {
    background: #131316 !important;
    background-color: #131316 !important;
}

.dark #fin-table-scroll tbody tr[class*="bg-violet"] > td:first-child {
    background: #161224 !important;
    background-color: #161224 !important;
}

.dark #fin-table-scroll tbody tr[class*="bg-slate-50"] > td:first-child {
    background: #0c0c0f !important;
    background-color: #0c0c0f !important;
}



