@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

/* Content area */
.content {
    padding-top: 20px;
    transition: margin-left 0.3s;
}


/* Smaller screens (e.g., devices with a max width of 768px) */
@media (max-width: 768px) {
    h3 {
      font-size: 20px;
    }
  
    p l {
      font-size: 5px;
    }

    h1.text-center {
        font-size: 30px;
    }

    p.text-center {
        font-size: 14px;
    }
}

/* Even smaller screens (e.g., max width of 480px) */
@media (max-width: 480px) {
    h3 {
        font-size: 18px;
    }

    p l {
        font-size: 5px;
    }


}


/* ========================================================= */
/* ===================== Information Boxes ==================== */
/* ========================================================= */


.box .top-left-text {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 14px;
    color: #555;
}

.box .top-right-text {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 14px;
    color: #555;
}

.box .main-text {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-top: 30px;
}
.box {
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    height: 100%;
    text-align: center;
    color: #333;
    overflow: hidden; /* Prevents background overflow */
}

/* Green Up Graph with Pale Lines and No Unwanted Borders */
.green-graph {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 50" preserveAspectRatio="none"><path d=\'M0 45 L10 35 L20 40 L30 30 L40 35 L50 25 L60 30 L70 20 L80 25 L90 15 L100 5 L100 50 L0 50 Z\' fill=\'rgba(0,200,0,0.15)\' stroke=\'rgba(0,128,0,0.6)\' stroke-width=\'1\'/></svg>');
    background-size: 100% 100%; /* Ensures full width coverage */
}

/* Red Down Graph with Pale Lines and No Unwanted Borders */
.red-graph {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 50" preserveAspectRatio="none"><path d=\'M0 5 L10 15 L20 10 L30 20 L40 15 L50 25 L60 20 L70 30 L80 25 L90 35 L100 45 L100 50 L0 50 Z\' fill=\'rgba(255,0,0,0.15)\' stroke=\'rgba(255,0,0,0.6)\' stroke-width=\'1\'/></svg>');
    background-size: 100% 100%; /* Ensures full width coverage */
}


/* ========================================================= */
/* ===================== Sidebar ==================== */
/* ========================================================= */


/* ========================================================= */
/* ===================== Top Banner ==================== */
/* ========================================================= */

/* ========================================================= */
/* ===================== Stock Search Bar ==================== */
/* ========================================================= */


/* Enhanced styles for search bar */
.search-bar-container {
    display: flex;
    justify-content: center; /* Center the search bar horizontally */
    margin-bottom: 50px;
    padding: 10px;
}

.search-bar {
    display: flex;
    width: 100%;
    max-width: 800px; /* Set a max width for the search bar */
    position: relative;
    align-items: center;
}

.search-input-container {
    flex-grow: 1;
    position: relative; /* Relative positioning to place suggestions below */
    display: flex;
    flex-direction: column;
    width: 100%;
}

.search-input-container .form-control {
    border: 1px solid #ddd; /* Lighter border */
    border-radius: 30px; /* Rounded corners for modern look */
    padding: 12px 20px; /* Larger padding for a better touch experience */
    font-size: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); /* Subtle inset shadow */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%; /* Ensure the input takes up full width */
}

.search-input-container .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.3); /* Glowing shadow on focus */
    outline: none;
}

.search-bar .btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px; /* Rounded button */
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px; /* Space between the button and input */
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    text-wrap: nowrap;
}

@media (max-width: 768px) {
    .search-bar .btn {
        padding: 8px 16px; /* Smaller padding */
        font-size: 14px;   /* Smaller font size */
        border-radius: 20px; /* Adjusted border-radius for smaller button */
        margin-left: 8px;   /* Reduced space between button and input */
    }

    .search-bar .btn {
        font-size: 10px;
        padding: 8px 10px;
    }
}

.search-bar .btn:hover {
    background-color: #0056b3;
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
}

.search-bar .btn:active {
    background-color: #003d7a;
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.2);
    transform: translateY(1px); /* Slight button press effect */
}

/* Styles for suggestions */
#suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 100%; 
    max-height: 300px;
    overflow-y: auto;
}

#suggestions a.list-group-item {
    padding: 12px 18px; /* Increased padding for better spacing */
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 16px; /* Larger font size */
}

#suggestions a.list-group-item:hover,
#suggestions a.list-group-item.highlighted {
    background-color: #f1f1f1; /* Light gray background on hover or highlight */
    cursor: pointer; /* Change cursor to pointer */
}

/* Formatting for ticker and name */
#suggestions .ticker {
    font-weight: bold;
    margin-right: 10px;
    color: #666;
    font-size: 16px; /* Match font size */
}

#suggestions .name {
    color: #666;
    font-size: 16px; /* Match font size */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Styling for highlighted text */
#suggestions strong {
    font-weight: bold; /* Make highlighted text bold */
    color: #007bff; /* Use the same color as the ticker symbol */
}

@media (max-width: 768px) {
    #suggestions a.list-group-item {
        padding: 6px 12px; /* Reduce padding for a more compact layout */
        font-size: 12px; /* Slightly smaller font */
    }

    #suggestions .ticker,
    #suggestions .name,
    .search-input-container .form-control {
        font-size: 12px; /* Ensure both ticker and name are smaller */
    }
}

/* ========================================================= */
/* ===================== Optimize/Settings Button ==================== */
/* ========================================================= */

#optimize-btn {
    background-color: #4a90e2; /* Subtle, modern blue */
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px; /* Slightly rounded edges */
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
}

#optimize-btn:hover {
    background-color: #357abd; /* Slightly darker blue on hover */
    transform: translateY(-2px); /* Subtle lift on hover */
}

#optimize-btn:active {
    background-color: #2c6397; /* Even darker for active state */
    transform: translateY(0); /* Button presses down */
}


/* Right-aligned nav container */
.ef-nav-right {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Disabled state: same button, muted */
.ef-button.ef-button-disabled,
.ef-button:disabled {
  background: #007bff;                 /* keep primary blue */
  opacity: 0.55;                       /* muted look */
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* No hover effects when disabled */
.ef-button.ef-button-disabled:hover,
.ef-button:disabled:hover {
  background: #007bff;                 /* do not darken */
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

/* Keep the button + hint right aligned as a block */
.ef-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* right align hint to match button */
  gap: 0.35rem;
}



.portfolio-name-form {
    padding: 5px;
    font-size: 14px;
}

#save-portfolio-btn {
    background-color: #4a90e2; /* Subtle, modern blue */
    color: white;
    padding: 9px 10px;
    font-size: 13px;
    border: none;
    border-radius: 5px; /* Slightly rounded edges */
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
}

#save-portfolio-btn:hover {
    background-color: #357abd; /* Slightly darker blue on hover */
    transform: translateY(-2px); /* Subtle lift on hover */
}

#save-portfolio-btn:active {
    background-color: #2c6397; /* Even darker for active state */
    transform: translateY(0); /* Button presses down */
}


@media (max-width: 768px) {
    #save-portfolio-btn,
    .portfolio-name-form {
        font-size: 10px;
    }
}

/* Styles for the Configuration Settings Box */
.settings-box {
    border: 1px solid #007bff; /* Border color */
    border-radius: 5px; /* Rounded corners */
    background-color: #f8f9fa; /* Light background for contrast */
    padding: 20px; /* Padding inside the box */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.settings-title {
    margin-bottom: 15px; /* Space below the title */
    font-weight: bold; /* Make title bold */
    color: #007bff; /* Title color */
}

.settings-box label {
    font-weight: normal; /* Regular weight for labels */
    color: #333; /* Label color */
}

.settings-box input[type="text"],
.settings-box input[type="number"] {
    border: 1px solid #ced4da; /* Border color for inputs */
    border-radius: 4px; /* Rounded corners for inputs */
}

.settings-box input[type="checkbox"] {
    margin-right: 5px; /* Space between checkbox and label */
}


/* Styles for the Settings Toggle Button */
.settings-toggle {
    background-color: transparent; /* No background color */
    border: none; /* Remove border */
    color: #007bff; /* Use the same color as the title */
    font-size: 16px; /* Font size */
    padding: 10px; /* Padding around the button */
    cursor: pointer; /* Pointer cursor on hover */
    transition: color 0.3s ease; /* Smooth transition for hover effect */
}

.settings-toggle:hover {
    color: #0056b3; /* Darker shade on hover */
    text-decoration: underline; /* Underline on hover */
}

@media (max-width: 768px) {
    #optimize-btn {
        font-size: 10px;
        padding: 8px 12px;
    }

    .settings-toggle {
        font-size: 12px; /* Reduce font size */
        padding: 5px 10px;/* Reduce padding */
    }

    .settings-toggle i {
        font-size: 12px; /* Reduce icon size */
    }

    .settings-title {
        font-size: 13px;
    }

    .settings-box {
        font-size: 12px;
    }

    .settings-box input[type="text"],
    .settings-box input[type="number"] {
        font-size: 12px !important;  /* Smaller font */
        padding: 5px 8px !important; /* Less padding to reduce height */
        height: 30px !important;     /* Set a smaller height */
    }
    
    
}
/* ========================================================= */
/* ===================== Portfolio Table ==================== */
/* ========================================================= */


/* Table container */
.table-container {
    overflow-x: auto;
}

/* Clean white table, only horizontal row lines */

/* Scrollable wrapper with fixed height */
.table-wrapper-scroll {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
  }
  
  /* Clean table */
  table {
    width: 100%;
    border-collapse: collapse;     /* ← removes vertical gridlines */
    background-color: #fff;
    font-size: 14px;
  }
  
  /* Header row */
  thead {
    background-color: #fff;
  }
  
  th {
    position: sticky;
    top: 0;
    background-color: #fff;        /* white header */
    color: #000;                   /* black text */
    font-weight: 600;
    padding: 8px 12px;
    text-align: left;
    z-index: 2;
    border-bottom: 1px solid #ccc; /* bottom divider only */
  }
  
  /* Table body */
  td {
    padding: 8px 12px;
    white-space: nowrap;
    color: #444;
    border: none;                  /* no vertical lines */
  }
  
  tbody tr {
    border-bottom: 1px solid #eee; /* horizontal lines only */
  }
  
  tbody tr:hover {
    background-color: #f7f7f7;
  }
  
  @media (max-width: 768px) {
    th, td {
      font-size: 12px;
      padding: 6px 8px;
    }
  }
  

/* Table should take 35% of the container space */
.sector-table-wrapper {
    flex: 0 0 35%; /* Fixed 35% width for the table */
    min-width: 250px; /* Ensure it doesn't shrink below this width */
    max-width: 400px; /* Optional: max width for table if needed */
    margin-right: 20px; /* Add some spacing to the right of the table */
}



.sector-allocation-description {
    margin-top: 30px;
}


/* Additional styles */
.sector-table-container {
    margin-left: 20px;
    margin-top: 20px;
}




.hidden-table {
    display: none;
}


/*---------- Layout & Card basics ----------*/
.ef-layout       { display:grid; grid-template-columns:1fr; gap:2rem; margin-top:2rem; }
@media (min-width:768px){ .ef-layout{ grid-template-columns:1fr 1fr; } }

.ef-card         { background:#fff; border-radius:0.75rem; box-shadow:0 2px 10px rgba(0,0,0,.08);
                   padding:1.5rem; min-height:400px; display:flex; flex-direction:column; overflow:hidden; }

.ef-section-title{ font-size:1.25rem; font-weight:600; margin-bottom:1rem; color:#333; }

/*---------- Plot wrapper (new) ----------*/
.ef-plot-container {
    position: relative;
    width: 100%;
    flex-grow: 1;
    min-height: 320px;
    overflow: hidden;
  }
  
#ef-plot           { width:100%; height:100%; }   /* element passed to Plotly */

/*---------- Table ----------*/
/* Card stays a fixed height */
#weights-section {
    /* max-height: 400px;  or adjust as needed */
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  /* Table scrolls *inside* the card */
  .ef-table-scroll {
    overflow-y: auto;
    flex-grow: 1;
  }
  
  /* Tighter, smaller table */
  .ef-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;     /* smaller font */
    line-height: 1.2;      /* tighter rows */
  }
  
  .ef-table th,
  .ef-table td {
    padding: 0.4rem 0.6rem; /* tighter spacing */
    white-space: nowrap;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .ef-table thead {
    background-color: #f9f9f9;
    position: sticky;
    top: 0;
    z-index: 1;
  }
  
/*---------- Button ----------*/
/* Container to align back + next buttons */
.ef-nav {
    display: flex;
    justify-content: space-between; /* back left, next right */
    align-items: center;
    margin-top: 1.5rem;
  }
  
/* ----------------------------
   Unified nav button styling
----------------------------- */
/* If a nav is marked as right-aligned, override the default nav layout */
.ef-nav.ef-nav-right {
  justify-content: flex-end !important;
}

/* Base: keep existing .ef-button as your primary */
.ef-button {
  background: #007bff;
  color: #fff;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background-color .2s, transform .15s, box-shadow .2s;
}
.ef-button:hover {
  background: #0056b3;
  transform: translateX(2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

/* Secondary: Back button becomes "pill + outline" but same sizing/feel */
.back-button {
  background: #fff;
  color: #007bff;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid rgba(0, 123, 255, 0.35);
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
  transition: background-color .2s, transform .15s, box-shadow .2s, border-color .2s;
  text-decoration: none; /* in case you use <a> */
}

.back-button:hover {
  background: rgba(0, 123, 255, 0.06);
  border-color: rgba(0, 123, 255, 0.55);
  transform: translateX(-2px); /* subtle "back" motion */
  box-shadow: 0 4px 10px rgba(0,0,0,0.14);
  text-decoration: none; /* overrides your previous underline hover */
}

.back-button:active,
.ef-button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.back-button:focus-visible,
.ef-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.18), 0 2px 6px rgba(0,0,0,0.12);
}

/* Small screens: keep both buttons compact */
@media (max-width: 768px) {
  .ef-button,
  .back-button {
    font-size: 0.9rem;
    padding: 0.6rem 1.1rem;
  }
}

/* Optional: if you ever need a "danger back" or muted style later */
.back-button.muted {
  color: #555;
  border-color: #ddd;
}
.back-button.muted:hover {
  background: #f7f7f7;
  border-color: #ccc;
}


  
  .ef-nav.single {
    justify-content: center;
  }
  

  

/*---------- Show / hide weights ----------*/
.weights-hidden  { display:none; }

/*---------- Optional flash animation on new weights ----------*/
@keyframes flash { 0%{background:#ffe8a6;} 100%{background:transparent;} }
.flash-cell      { animation:flash .8s ease-in-out; }

  
#portfolio-overview {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    max-height: 1000px;             /* optional: a sane max for the open state */
    overflow: hidden;               /* so content doesn’t poke out while animating */
    transition: max-height .25s ease, opacity .25s ease, padding .25s ease;
}

  
  /* Flex row for the 3 columns */
  .overview-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;          /* top-align headers */
  }
  
  /* Generic column */
  .overview-col {
    flex: 1 1 260px;                  /* same min width for each */
    min-height: 200px;
    padding-right: 1rem;
    border-right: 1px solid #eee;     /* vertical divider */
  }
  
  /* Remove divider from last column */
  .overview-col:last-child {
    border-right: none;
    padding-right: 0;
  }
  
  /* Chart containers keep previous rules */
  /* .overview-histogram { height: 160px; }   /* shrink a bit for header */
  /* .overview-chart     { height: 160px; } */ */
  
  /* Metrics column specifics */
  .overview-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
  }
  
  /* Header style */
  .overview-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
  }
  
  /* Badge & legend unchanged */
  .overview-badge  { margin-top: auto; padding-top: 0.75rem; border-top: 1px solid #eee;
                     background:#fffbe6; border-left:4px solid #ffcc00; border-radius:0 0 4px 4px;
                     font-size:0.85rem; }
  .sector-legend   { list-style:none; padding:0; margin:0.25rem 0 0; display:flex;
                     flex-direction:column; gap:0.25rem; }
  .sector-legend li{ display:flex; align-items:center; gap:0.5rem; font-size:0.8rem; }
  .sector-swatch   { width:10px; height:10px; border-radius:2px; flex:0 0 10px; }
  
  /* Responsive: stack columns on small screens */
  @media (max-width: 650px) {
    .overview-col { flex: 1 1 100%; border-right: none !important; padding-right: 0; }
  }
  
  
  .ef-overview-toggle {
    font-size: 1rem;
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    margin-bottom: 0.5rem;
    text-align: left;
    width: 100%;
  }

.overview-hidden {
    max-height: 0 !important;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0;               /* optional: remove the gap when hidden */
    pointer-events: none;           /* 🔑 let clicks go through */
}


  .risk-low {
    color: #28a745; /* Bootstrap green */
    font-weight: 600;
  }
  
  .risk-moderate {
    color: #333;
  }
  
  .risk-high {
    color: #dc3545; /* Bootstrap red */
    font-weight: 600;
  }
  
/* Scoped specifically to the stock info table */
.stock-table {
    min-width: max-content;
    border-collapse: separate;
    border-spacing: 0px;
    border: 1px solid black;
    margin-top: 10px;
    background-color: #fff;
}

.stock-table thead {
    background-color: #fff;
}

.stock-table th {
    position: sticky;
    top: 0px;
    background-color: #f5f5f5;
    color: rgb(98, 98, 98);
    padding: 10px;
    font-size: 15px;
}

.stock-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    font-size: 15px;
}

.stock-table tbody td {
    padding: 12px;
    color: #555;
    white-space: nowrap;
}

.stock-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.stock-table tbody tr:hover {
    background-color: #dedede;
}

/* Scroll wrapper stays the same */
.table-wrapper-scroll {
    max-height: 400px;
    overflow-y: auto;
    margin-left: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .stock-table th,
    .stock-table tbody tr {
        font-size: 10px;
    }
}

.delete-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;      /* ← makes the hand appear */
    font-size: 1rem;
    padding: 0;           /* zero‐out extra space */
  }
  
  .delete-btn:hover {
    color: #c62828;       /* red on hover */
  }
  

  th.sortable {
    cursor: pointer;
    /* color: #007BFF; */
  }
  

/* stepper */
.progress-wrapper{display:flex;justify-content:center;align-items:center;margin:30px auto;max-width:500px}
.progress-step{flex:1;display:flex;text-align: center;flex-direction:column;align-items:center;position:relative}
.step-circle{width:30px;height:30px;border-radius:50%;background:#ccc;color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center}
.progress-step.active .step-circle{background:#3f80ff}
.progress-step p{margin-top:6px;font-size:13px}
.progress-line{height:2px;background:#ccc;flex:1;margin:0 5px}

.progress-line.active {
  background: #3f80ff;
}

/* sections */
/* base state: invisible & slid down */
.step-section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
  margin-bottom: 100px;
}

/* visible state */
.step-section.active {
  opacity: 1;
  transform: none;            /* ✅ IMPORTANT: was translateY(0) */
  pointer-events: auto;
}

/* keep the old hard-hide for initial load / accessibility */
.step-section.hidden { display:none !important; }
  
.hidden{display:none!important;opacity:0}

/* nav buttons */
/* .back-button{margin-top:1rem;padding:.5rem 1rem;background:#f0f0f0;border:none;border-radius:6px;font-weight:500;cursor:pointer}
.back-button:hover{background:#e0e0e0} */
  


  


  .spotlight.hidden{ display:none; }
  
  /* Keep charts responsive */
  .mini-chart, .full-chart{ width:100%; height:220px; }
  .full-chart{ height:380px; }
  
  /* Simple stats box */
  .spot-stats{ margin-top:.75rem; font-size:.9rem; line-height:1.4; }
  
  


/* Container holds everything centrally */
.report-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    position: relative;
  }
  
  /* Grid wraps tightly to card area */
  .report-grid-wrapper {
    position: relative;
    min-height: 500px;
  }
  
  /* Spotlight overlay stays inside the grid, below header */
  .spotlight {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.35s ease;
    overflow-y: auto;
    z-index: 5;
  }
  
  .spotlight.active {
    opacity: 1;
    transform: scale(1);
  }
  
  .spotlight.hidden {
    display: none;
  }
  
.spotlight-insight,
.spotlight-action {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e6edf5;
}

.spotlight-insight h4,
.spotlight-action h4 {
  margin: 0 0 0.35rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4b5b6a;
}

.spotlight-insight p,
.spotlight-action p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #2f3e4e;
}
  
  /* grid stays 2 columns (desktop) and 1 column (mobile) */
/* 3×2 grid by default, collapses to 2×3 on tablets, 1×6 on phones */
.grid-3x2{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:1rem;
    width:100%;
    box-sizing:border-box;
}
@media (max-width: 960px){ .grid-3x2{ grid-template-columns:repeat(2,1fr); } }
@media (max-width: 600px){ .grid-3x2{ grid-template-columns:1fr;           } }

  
  /* cards can now shrink without forcing min-width overflow */
  .report-card{
    min-width:0;               /* critical! allows shrink inside grid */
    background:#fff;
    border-radius:12px;
    box-shadow:0 2px 6px rgba(0,0,0,.08);
    padding:1rem;
    cursor:pointer;
    transition:transform .2s ease;
  }
  
/* mini-chart always fits card */
.mini-chart {
    position: relative;   /* ✅ anchor spinner inside */
    width: 100%;
    height: 220px;        /* or 180px if you want shorter */
    overflow: hidden;     /* keep spinner/plots clipped */
  }
  
  
 /* clone that animates */
.expanding-clone{
    position:fixed;
    box-shadow:0 4px 16px rgba(0,0,0,.14);
    border-radius:12px;
    background:#fff;
    overflow:hidden;
    transition:top .45s cubic-bezier(.2,.8,.2,1),
               left .45s cubic-bezier(.2,.8,.2,1),
               width .45s cubic-bezier(.2,.8,.2,1),
               height .45s cubic-bezier(.2,.8,.2,1);
    z-index:1000;
  }
  
  /* dim grid when spotlighting */
  .grid-dim{
    opacity:.15;
    pointer-events:none;
    transition:opacity .25s ease;
  }
  
  /* fade-in chart in spotlight */
  .full-chart{opacity:0;transition:opacity .3s ease;}
  .full-chart.visible{opacity:1;}

  
  .mini-chart.fade-out {
    opacity: 0;
    transition: opacity 0.2s ease-out;
  }
  
  .report-card h4.fade-out {
    opacity: 0;
    transition: opacity 0.2s ease-out;
  }

  .spotlight-footer {
    margin-top: 1.5rem;
    text-align: left;
  }
  

  
  .spotlight-heading {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
  }
  



  .mini-stats {
    position: relative;   /* anchor spinner */
    min-height: 220px;    /* or a smaller value if you want stress card shorter */
    overflow: hidden;     /* keeps spinner/contents clipped */
  }
  

  .mini-stats ul {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
  }
  .mini-stats li {
    white-space: nowrap;
    line-height: 1.4;
  }
  

  .stress-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 0.75rem;
  }
  .stress-table th,
  .stress-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
    text-align: center;
  }
  .stress-table th {
    background-color: #f9f9f9;
  }
  .stress-table td:first-child {
    text-align: left;
  }
  
  #mini-stress {
    padding: 0.5rem 0;
  }
  
  .stress-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
    font-size: 0.95rem;
  }
  
  .stress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .stress-label {
    color: #333;
  }
  
  .stress-value {
    font-weight: 600;
    color: #E15759;
  }
  



  .risk-bars {
    font-size: 0.85rem;
  }
  .risk-bar {
    margin-bottom: 0.5rem;
  }
  .risk-bar .label {
    font-weight: 500;
    margin-bottom: 0.2rem;
  }
  .bar-container {
    position: relative;
    height: 12px;
    background: #f0f0f0;
    border-radius: 4px;
  }
  .bar {
    height: 100%;
    background: #4e79a7;
    border-radius: 4px;
  }
  .value {
    position: absolute;
    right: 6px;
    top: -18px;
    font-size: 0.75rem;
    color: #333;
  }
  
  .risk-table {
    margin-top: 1rem;
  }
  
  .risk-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 0.5rem;
  }
  
  .risk-table th,
  .risk-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #ddd;
    text-align: right;
  }
  
  .risk-table th:first-child,
  .risk-table td:first-child {
    text-align: left;
  }
  
  .risk-table thead {
    background-color: #f8f8f8;
    font-weight: bold;
  }
  



  .rsi-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    margin-top: 14px;
    font-size: 0.95rem;
    table-layout: fixed;
  }
  
  .rsi-table th,
  .rsi-table td {
    padding: 6px 10px;
    background: #f9f9f9;
    border-radius: 6px;
    vertical-align: middle;
  }
  
  .rsi-table th {
    text-align: left;
    font-weight: 600;
    color: #555;
    background: transparent;
    border-bottom: 1px solid #ccc;
  }
  
  .rsi-table td:nth-child(1) {
    width: 40%;    /* Ticker */
  }
  
  .rsi-table td:nth-child(2) {
    width: 20%;    /* RSI */
    text-align: right;
    font-weight: 500;
  }
  
  .rsi-table td:nth-child(3) {
    width: 40%;    /* Zone */
    text-align: left;
  }
  

  
  .bench-stats {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-top: 12px;
  }
  .bench-stats td {
    padding: 4px 8px;
    vertical-align: top;
  }
  .bench-stats td:first-child {
    font-weight: 500;
    color: #444;
  }
  .bench-stats td:last-child {
    text-align: right;
  }

  

  .diversify-stats {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;           /* Spacing between rows */
    font-size: 0.95rem;
    margin-top: 16px;
  }
  
  .diversify-stats td {
    padding: 6px 10px;
    vertical-align: middle;
    background-color: #f9f9f9;       /* subtle row background */
    border-radius: 6px;
  }
  
  .diversify-stats tr td:first-child {
    font-weight: 500;
    color: #333;
    width: 60%;
  }
  
  .diversify-stats tr td:last-child {
    font-weight: 600;
    text-align: right;
    color: #222;
  }
  
  

/* ===========================
   Next Action Cards
=========================== */
.next-action-card {
    border: 1px solid #e0e4ef;
    border-radius: 16px;
    padding: 25px 20px;
    background-color: #fff;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.next-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border-color: rgb(70, 95, 169);
}

.action-icon {
    font-size: 2.2rem;
    color: rgb(70, 95, 169);
    margin-bottom: 15px;
}

.action-title {
    color: #2d2f3a;
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.action-desc {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 15px;
    min-height: 40px;
}

.action-btn {
    background-color: rgb(70, 95, 169);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.action-btn:hover {
    background-color: rgb(60, 85, 155);
    transform: scale(1.03);
}

/* Section title */
.section-title {
    color: rgb(70, 95, 169);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 40px;
}

/* Responsive Layout */
@media (max-width: 768px) {
    .next-action-card {
        padding: 20px;
    }

    .action-icon {
        font-size: 1.8rem;
    }

    .action-btn {
        width: 100%;
    }
}































/* Adjust Min/Max input box sizes */
.filter-container input[type="number"] {
    width: 100px; /* Set smaller width */
}

/* Shorten the labels for Min/Max */
.filter-container label {
    font-size: 14px; /* Adjust text size if needed */
    margin-right: 5px; /* Add small space between label and input */
}

/* Adjust the toggle and labels */
.filter-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.total-money-container {
    margin-right: auto; /* Push the total money input to the left */
}

.toggle-label {
    font-size: 14px; /* Make the label text smaller */
    margin-right: 10px; /* Add space between the label and the toggle */
}

.switch {
    margin-right: 15px; /* Space between the switch and the input boxes */
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
}

/* Hide the default checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider (the toggle switch) */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 25px;
}

/* The round circle inside the slider */
.slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

/* When the checkbox is checked, move the slider */
input:checked + .slider {
    background-color: #007bff; /* Blue when enabled (same as submit button) */
}



input:checked + .slider:before {
    transform: translateX(24px); /* Move the circle */
}

/* Rounded slider (for a more modern look) */
.slider.round {
    border-radius: 25px;
}

.slider.round:before {
    border-radius: 50%;
}


/* Styles for the toggle and min/max labels */
.toggle-label, .input-label {
    font-size: 14px;
    font-weight: 600; /* Bold for emphasis */
    color: #333;
    margin-right: 10px;
    transition: color 0.3s ease, transform 0.3s ease; /* Smooth transition for color and transform */
    cursor: pointer; /* Changes cursor to indicate interactivity */
}

.toggle-label:hover, .input-label:hover {
    color: #007bff; /* Change color on hover to the same blue as the submit button */
    transform: scale(1.05); /* Slight scale effect on hover */
}

/* Transition for input fields to make it snappy */
.form-control {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.form-control:focus {
    border-color: #007bff; /* Blue border when focused */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Blue glow on focus */
}


.bar {
    height: 20px;
    background-color: rgb(0, 123, 255); /* Default bar color */
    width: 0px;
}


/* Default (for larger screens) */
.form-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start; /* Align left on larger screens */
    width: 100%-200px;
}

.form-inline-money-input {
    max-width: 20%;
}

.search-form{
    min-width: 80%;
}

.form-group {
    display: flex;
    align-items: center;
    margin-right: 20px; /* Add spacing between groups */
}

/* For screens smaller than 700px */
@media (max-width: 950px) {
    .form-inline {
        justify-content: flex-end; /* Align right on small screens */
        width: 100%;
    }

    /* Ensure each label and input stays together in a row */
    .form-group {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-bottom: 10px; /* Optional: Add some space between rows on small screens */
    }

    .form-inline input {
        width: auto; /* Ensure the input doesn't take too much space */
    }
}






/* Portfolio Analysis Header Styling */
.portfolio-analysis-header {
    font-size: 1.8rem;   /* Smaller font size than welcome */
    font-weight: 400;    /* Light font weight for sleek look */
    color: #333;         /* Subtle dark gray color */
    position: relative;
}

/* Horizontal line under the header */
.custom-divider {
    width: 100px;
    height: 4px;
    background-color: teal;   /* Accent color to match your theme */
    margin: 0 auto;
    border-radius: 2px;
}

/* Portfolio Analysis Description Styling */
.portfolio-analysis-description {
    font-size: 1rem;    /* Slightly smaller font size for the description */
    color: #666;        /* Lighter gray for sleek look */
    line-height: 1.5;   /* Line height for readability */
}




/* Risk Analysis Header Styling */
.risk-analysis-header {
    font-size: 1.8rem;   /* Same size as portfolio analysis */
    font-weight: 400;    /* Light font weight for sleek look */
    color: #333;         /* Same subtle dark gray color */
    position: relative;
}

/* Risk Analysis Description Styling */
.risk-analysis-description {
    font-size: 1rem;    /* Slightly smaller font size */
    color: #666;        /* Lighter gray for sleek look */
    line-height: 1.5;   /* Line height for readability */
}

/* Risk Box Styling */
.risk-box {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
}



.efficient-frontier-section {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    border: 1px solid #ccc; /* Border around the container */
    border-radius: 8px; /* Rounded corners for a refined look */
    padding: 20px; /* Padding for content spacing */
    margin-bottom: 20px; /* Space below the container */
    background-color: #fff; /* Background color for contrast (optional) */
}

.efficient-frontier-graph {
    flex: 2;
    min-width: 60%; /* Takes majority of the space */
    padding-right: 20px; /* Padding to give spacing from the border */
}

.cvar-info-section {
    flex: 1;
    max-width: 35%;
    padding: 20px;
    position: relative; /* Allows use of pseudo-elements */
}

/* Custom vertical line with padding on top and bottom */
.cvar-info-section::before {
    content: '';
    position: absolute;
    left: -10px; /* Distance from the content edge */
    top: 10%; /* Start a bit lower than the top */
    bottom: 10%; /* End a bit higher than the bottom */
    width: 2px; /* Thickness of the line */
    background-color: #ccc; /* Line color */
}

@media (max-width: 768px) {
    .efficient-frontier-section {
        flex-direction: column; /* Stack the children vertically */
        align-items: stretch; /* Ensure children take full width */
    }

    .efficient-frontier-graph {
        position: relative;
        width: 100%;
        height: 0;
        padding-top: 85.25%; /* Aspect ratio: 16:9 (9/16 * 100 = 56.25%) */
    }
    
    .efficient-frontier-graph > * {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    .cvar-info-section {
        flex: unset; /* Remove the flex growth/shrink properties */
        max-width: 100%; /* Ensure full width */
        min-width: unset; /* Remove any minimum width restrictions */
        width: 100%; /* Take the full width of the container */
        padding-right: 10px; /* Optional: Adjust padding for better spacing */
        padding-left: 0px;
        text-align: left;
        font-size: 10.5px;
    }

    .cvar-info-section::before {
        content: none; /* Remove the vertical line in smaller layouts */
    }

}













.stress-section {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    border: 1px solid #ccc; /* Border around the container */
    border-radius: 8px; /* Rounded corners for a refined look */
    padding: 20px; /* Padding for content spacing */
    margin-bottom: 20px; /* Space below the container */
    background-color: #fff; /* Background color for contrast (optional) */
}

.historical-stress-graph {
    flex: 2;
    min-width: 60%; /* Takes majority of the space */
    padding-right: 20px; /* Padding to give spacing from the border */
}

@media (max-width: 1024px) {
    .historical-stress-graph {
        height: 400px; /* Adjust height for tablets */
    }
}

@media (max-width: 768px) {
    .historical-stress-graph {
        height: 300px; /* Adjust height for mobile */
    }
}


.stress-info-section {
    flex: 1;
    max-width: 35%;
    padding: 20px;
    position: relative; /* Allows use of pseudo-elements */
}

/* Custom vertical line with padding on top and bottom */
.stress-info-section::before {
    content: '';
    position: absolute;
    left: -10px; /* Distance from the content edge */
    top: 10%; /* Start a bit lower than the top */
    bottom: 10%; /* End a bit higher than the bottom */
    width: 2px; /* Thickness of the line */
    background-color: #ccc; /* Line color */
}



@media (max-width: 768px) {
    .stress-section {
        flex-direction: column; /* Stack the children vertically */
        align-items: stretch; /* Ensure children take full width */
    }
    
    .stress-info-section {
        flex: unset; /* Remove the flex growth/shrink properties */
        max-width: 100%; /* Ensure full width */
        min-width: unset; /* Remove any minimum width restrictions */
        width: 100%; /* Take the full width of the container */
        padding-right: 10px; /* Optional: Adjust padding for better spacing */
        padding-left: 0px;
        text-align: left;
        font-size: 10.5px;
    }

    .stress-info-section::before {
        content: none; /* Remove the vertical line in smaller layouts */
    }
}





/* General styles remain unchanged */
.historical-returns-section {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    border: 1px solid #ccc; /* Border around the container */
    border-radius: 8px; /* Rounded corners for a refined look */
    padding: 20px; /* Padding for content spacing */
    margin-bottom: 20px; /* Space below the container */
    background-color: #fff; /* Background color for contrast (optional) */
}

.historical-portfolio-graph {
    flex: 2;
    min-width: 60%; /* Takes majority of the space */
    padding-right: 20px; /* Padding to separate from the border */
}

@media (max-width: 1024px) {
    .historical-portfolio-graph {
        height: 500px; /* Reduce height for tablets */
    }
}

@media (max-width: 768px) {
    .historical-portfolio-graph {
        height: 400px; /* Reduce height for mobile */
    }
}


.historical-info-section {
    flex: 1;
    max-width: 35%;
    padding: 20px;
    position: relative; /* Allows use of pseudo-elements */
}

/* Custom vertical line with padding on top and bottom */
.historical-info-section::before {
    content: '';
    position: absolute;
    right: -10px; /* Distance from the content edge */
    top: 10%; /* Start a bit lower than the top */
    bottom: 10%; /* End a bit higher than the bottom */
    width: 2px; /* Thickness of the line */
    background-color: #ccc; /* Line color */
}

/* Responsive styles for screens 768px or smaller */
@media (max-width: 768px) {
    .historical-returns-section {
        flex-direction: column; /* Stack the sections vertically */
        align-items: stretch; /* Ensure full-width elements */
    }

    .historical-info-section {
        max-width: 100%; /* Allow the info section to take full width */
        padding-right: 0; /* Remove unnecessary padding */
        flex: none; /* Prevent it from shrinking */
        font-size: 10.5px;
    }

    .historical-info-section::before {
        display: none; /* Hide the vertical line */
    }
}







.matrix-section-cov{
    display: flex;
    align-items: flex-start; /* Align items to the top */
    border: 1px solid #ccc; /* Border around the container */
    border-radius: 8px; /* Rounded corners for a refined look */
    padding: 20px; /* Padding for content spacing */
    margin-bottom: 20px; /* Space below the container */
    background-color: #fff; /* Background color for contrast (optional) */
}

.matrix-info-section-cov {
    flex: 1;
    max-width: 35%;
    padding: 20px;
    position: relative; /* Allows use of pseudo-elements */
}

.matrix-info-section-cov::before {
    content: '';
    position: absolute;
    left: -10px; /* Distance from the content edge */
    top: 10%; /* Start a bit lower than the top */
    bottom: 10%; /* End a bit higher than the bottom */
    width: 2px; /* Thickness of the line */
    background-color: #ccc; /* Line color */
}

.matrix-plot-cov {
    flex: 2;
    min-width: 60%; /* Takes majority of the space */
    padding-right: 20px; /* Padding to give spacing from the border */
}

@media (max-width: 768px) {
    .matrix-section-cov {
        flex-direction: column; /* Stack the children vertically */
        align-items: stretch; /* Ensure children take full width */
    }
    
    .matrix-info-section-cov {
        flex: unset; /* Remove the flex growth/shrink properties */
        max-width: 100%; /* Ensure full width */
        min-width: unset; /* Remove any minimum width restrictions */
        width: 100%; /* Take the full width of the container */
        padding-right: 10px; /* Optional: Adjust padding for better spacing */
        padding-left: 0px;
        text-align: left;
        font-size: 10.5px;
    }

    .matrix-info-section-cov::before {
        content: none; /* Remove the vertical line in smaller layouts */
    }
}







.matrix-section-corr{
    display: flex;
    align-items: flex-start; /* Align items to the top */
    border: 1px solid #ccc; /* Border around the container */
    border-radius: 8px; /* Rounded corners for a refined look */
    padding: 20px; /* Padding for content spacing */
    margin-bottom: 20px; /* Space below the container */
    background-color: #fff; /* Background color for contrast (optional) */
}

.matrix-info-section-corr {
    flex: 1;
    max-width: 35%;
    padding: 20px;
    position: relative; /* Allows use of pseudo-elements */
}

.matrix-info-section-corr::before {
    content: '';
    position: absolute;
    right: -10px; /* Distance from the content edge */
    top: 10%; /* Start a bit lower than the top */
    bottom: 10%; /* End a bit higher than the bottom */
    width: 2px; /* Thickness of the line */
    background-color: #ccc; /* Line color */
}

.matrix-plot-corr {
    flex: 2;
    min-width: 60%; /* Takes majority of the space */
    padding-right: 20px; /* Padding to separate from the border */
}

@media (max-width: 768px) {
    .matrix-section-corr {
        flex-direction: column; /* Stack the sections vertically */
        align-items: stretch; /* Ensure full-width elements */
    }

    .matrix-info-section-corr {
        max-width: 100%; /* Allow the info section to take full width */
        padding-right: 0; /* Remove unnecessary padding */
        flex: none; /* Prevent it from shrinking */
        font-size: 10.5px;
    }

    .matrix-info-section-corr::before {
        display: none; /* Hide the vertical line */
    }
}











.sector-info-section {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    border: 1px solid #ccc; /* Border around the container */
    border-radius: 8px; /* Rounded corners */
    padding: 20px; /* Padding for content spacing */
    margin-top: 20px; /* Space above the container */
    background-color: #fff; /* Optional background color for contrast */
}

.sector-allocation-graph {
    flex: 2;
    min-width: 60%; /* Takes majority of the space */
    padding-right: 20px; /* Padding to separate from the border */
}

.sector-diversification-gauge {
    flex: 2;
    min-width: 30%; /* Takes majority of the space */
    padding-right: 20px; /* Padding to separate from the border */
}

.sector-description-section {
    flex: 1;
    max-width: 35%;
    padding: 20px;
    position: relative; /* Allows use of pseudo-elements */
}

.sector-allocation-gauge {
    flex: 1;
    max-width: 35%;
    padding: 20px;
    position: relative; /* Allows use of pseudo-elements */
}

/* Custom vertical line with padding on top and bottom */
.sector-description-section::before {
    content: '';
    position: absolute;
    right: -10px; /* Distance from the content edge */
    top: 10%; /* Start a bit lower than the top */
    bottom: 10%; /* End a bit higher than the bottom */
    width: 2px; /* Thickness of the line */
    background-color: #ccc; /* Line color */
}


.sector-allocation-description {
    flex: 1;
    max-width: 65%;
    padding: 20px;
    position: relative; /* Allows use of pseudo-elements */
}

/* Custom vertical line with padding on top and bottom */
.sector-allocation-description::before {
    content: '';
    position: absolute;
    right: -10px; /* Distance from the content edge */
    top: 10%; /* Start a bit lower than the top */
    bottom: 10%; /* End a bit higher than the bottom */
    width: 2px; /* Thickness of the line */
    background-color: #ccc; /* Line color */
}



/* Responsive styles for screens 768px or smaller */
@media (max-width: 768px) {
    .sector-info-section {
        flex-direction: column; /* Stack the sections vertically */
        align-items: stretch; /* Ensure full-width elements */
        font-size: 10.5px;
    }

    .sector-description-section {
        max-width: 100%; /* Allow the info section to take full width */
        padding-right: 0; /* Remove unnecessary padding */
        flex: none; /* Prevent it from shrinking */
    }

    .sector-description-section::before {
        display: none; /* Hide the vertical line */
    }

    .sector-allocation-graph {
        position: relative;
        width: 100%;
        height: 0;
        padding-top: 85.25%; /* Aspect ratio: 16:9 (9/16 * 100 = 56.25%) */
    }
    
    .sector-allocation-graph > * {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

}

@media (max-width: 1200px) {
    .hide-on-small-screens{
        display: none;
    }
}

#company-info-table th {
    font-family: "Roboto", Arial, sans-serif; /* Modern, clean font */
    font-size: 13px; /* Compact font size for dense data */
    font-weight: 600; /* Slightly bold for emphasis */
    color: #444; /* Neutral dark gray for readability */
    background-color: #f5f5f5; /* Very light gray for subtle differentiation */
    border-bottom: 1px solid #ccc; /* Thin and neutral line for structure */
    text-align: left; /* Clean alignment */
    padding: 6px 10px; /* Balanced padding for readability */
    letter-spacing: 0.02em; /* Slightly wider for clarity */
    white-space: nowrap; /* Prevents wrapping, essential for stock data */
}



.section-bg {
    /* background-color: #eaf5fb; Light gray for contrast */
    padding: 20px;
    border-radius: 8px; /* Soft rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}


/* Section Header Styling */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 1rem; /* Space between the title and lines */
}

.header-title {
    font-size: 1.5rem; /* Slightly smaller font size */
    font-weight: 600; /* Medium-bold for a professional touch */
    color: #003f8c; /* Refined blue for a corporate style */
    margin: 0;
}

.header-line {
    flex-grow: 1;
    height: 1px;
    background-color: #0074d9; /* A clean, professional blue tone */
    max-width: 100px; /* Limit the length for balance */
}

/* Analysis Intro Styling */
.analysis-intro {
    text-align: center;
    margin-bottom: 2rem;
    color: #333; /* Neutral, professional text color */
    font-size: 1rem; /* Standard font size for readability */
    line-height: 1.6; /* Balanced line height */
    max-width: 700px; /* Restrict width for better focus */
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem; /* Padding for smaller screens */
}

.analysis-intro p {
    margin: 0; /* No extra margin for the paragraph */
}

/* Optional Hover/Focus Effects */
.header-line {
    transition: background-color 0.2s ease;
}

.header-line:hover {
    background-color: #0056b3; /* Slightly darker blue for interactivity */
}

.header-title:hover {
    color: #0056b3; /* Subtle hover color change for professionalism */
    transition: color 0.2s ease;
}







/* Styles for the Small Title Section */
.analysis-title-section {
    display: flex;
    align-items: center;
    margin-bottom: 1rem; /* Space below the section */
}

.analysis-small-title {
    font-size: 1.25rem; /* Slightly smaller than main titles */
    font-weight: 600; /* Medium bold for a refined look */
    color: #003f8c; /* Consistent blue for titles */
    margin-right: 1rem; /* Space between the title and the line */
    margin-bottom: 0; /* Ensure alignment with the line */
    white-space: nowrap; /* Prevent wrapping */
}

.analysis-title-line {
    height: 1px;
    background-color: #0074d9; /* Light blue for the line */
    flex-grow: 1;
    margin-left: 1rem; /* Adjust spacing between the line and the edge */
}

/* Styles for the Small Title Section */
.analysis-title-section-right {
    display: flex;
    align-items: center;
    margin-bottom: 1rem; /* Space below the section */
    justify-content: flex-end; /* Align items to the right */
}

.analysis-small-title-right {
    font-size: 1.25rem; /* Slightly smaller than main titles */
    font-weight: 600; /* Medium bold for a refined look */
    color: #003f8c; /* Consistent blue for titles */
    margin-left: 1rem; /* Space between the line and the title */
    margin-bottom: 0; /* Ensure alignment with the line */
    white-space: nowrap; /* Prevent wrapping */
}

.analysis-title-line-right {
    height: 1px;
    background-color: #0074d9; /* Light blue for the line */
    flex-grow: 1;
    margin-right: 1rem; /* Adjust spacing between the line and the edge */
}



/* Main container for analysis */
.sector-analysis {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Space text and apart */
    gap: 1rem; /* Optional spacing between elements */
    margin: 1rem 0; /* Space around the section */
}

/* Description styling (left text) */
.sector-allocation-description {
    flex: 1; /* Take up remaining space */
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

/* Gauge container (right visual) */
.sector-diversification-gauge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px; /* Set size for the gauge container */
}

/* Gauge styling */
.gauge {
    position: relative;
    width: 150px;
    height: 75px;
    background: conic-gradient(#e74c3c 0%, #f1c40f 50%, #2ecc71 100%);
    border-radius: 150px 150px 0 0;
    overflow: hidden;
    margin: 0;
}

/* Needle */
.gauge-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 70px;
    background-color: #333;
    transform-origin: bottom;
    transform: rotate(0deg); /* Initial position */
    transition: transform 0.5s ease-out;
}

/* Scale Labels */
.gauge-scale {
    position: absolute;
    bottom: -15px;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    color: #333;
}

.see-report-btn {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background-color: #e0e0e0;
    color: #777;
    cursor: not-allowed;
    transition: all 0.3s ease;
    box-shadow: none;
    opacity: 0.8;
  }
  
  /* Enabled state */
  .see-report-btn.enabled {
    background-color: #1e88e5;
    color: #fff;
    cursor: pointer;
    opacity: 1;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.2);
  }
  
  /* Hover effect when active */
  .see-report-btn.enabled:hover {
    background-color: #1565c0;
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(21, 101, 192, 0.3);
  }

  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(30, 136, 229, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(30, 136, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 136, 229, 0); }
  }
  
  .see-report-btn.enabled {
    animation: pulse 2s infinite;
  }
  


  /* ===== Step 2 mode toggle / simple mode UI ===== */

.ef-header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:0.5rem;
}

.mode-toggle{
  display:flex;
  background:#f1f5ff;
  border:1px solid rgba(0,123,255,0.18);
  border-radius:9999px;
  overflow:hidden;
}

.mode-tab{
  border:none;
  background:transparent;
  padding:0.45rem 0.9rem;
  font-weight:600;
  cursor:pointer;
  color:#3b4a66;
  font-size:0.95rem;
}

.mode-tab.active{
  background:#007bff;
  color:white;
}

.mode-panel{ margin-top:0.75rem; }
.mode-subtitle{ margin:0.25rem 0 0.9rem; color:#667; }

.preset-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:0.75rem;
  margin-bottom:1rem;
}

.preset-card{
  text-align:left;
  background:#fff;
  border:1px solid #e6eaf2;
  border-radius:14px;
  padding:0.9rem;
  cursor:pointer;
  box-shadow:0 1px 4px rgba(0,0,0,0.05);
  transition:transform .15s, box-shadow .2s, border-color .2s;
}

.preset-card:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
  border-color:rgba(0,123,255,0.25);
}

.preset-card.active{
  border-color:rgba(0,123,255,0.45);
  box-shadow:0 6px 16px rgba(0,123,255,0.12);
}

.preset-title{ font-weight:700; color:#1f2a44; }
.preset-desc{ font-size:0.9rem; color:#667; margin-top:0.25rem; }

.risk-slider-wrap{
  background:#f7f9ff;
  border:1px solid #e6eaf2;
  border-radius:14px;
  padding:0.9rem;
}

.risk-slider-labels{
  display:flex;
  justify-content:space-between;
  font-size:0.85rem;
  color:#667;
  margin-bottom:0.4rem;
}

.risk-slider{ width:100%; }

.risk-hint{
  margin-top:0.6rem;
  font-size:0.9rem;
  color:#2c3a55;
}

.ef-apply-btn{
  margin-top:0.9rem;
  width:100%;
  justify-content:center;
}

.mode-footnote{
  margin-top:0.75rem;
  font-size:0.9rem;
  color:#667;
  text-align:center;
}

.link-like{
  background:none;
  border:none;
  color:#007bff;
  cursor:pointer;
  font-weight:600;
  padding:0;
}

@media (max-width:768px){
  .preset-grid{ grid-template-columns:1fr; }
  .mode-tab{ font-size:0.9rem; }
}


/* Spacer below search bar when there are no stocks yet */
.stock-placeholder {
  height: 300px;         /* tweak this height to taste */
}

/* Hidden when we have stocks in the table */
.stock-placeholder.hidden {
  display: none;
}


/* === EF SELECTION PANEL LOADING STATE === */

.ef-selection-panel {
  position: relative;
  border-radius: 16px; /* matches .ef-card rounding */
}

/* Dim / shimmer while loading */
.ef-selection-panel.ef-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.6) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: translateX(-100%);
  animation: ef-shimmer 1.2s ease-in-out infinite;
  z-index: 6;
  pointer-events: none;
}

/* Overlay that sits on top of the Simple/Advanced area */
.ef-loading-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(3px);
  display: none;               /* toggled via .show */
  align-items: center;
  justify-content: center;
  z-index: 7;
}

.ef-loading-overlay.show {
  display: flex;
}

.ef-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.ef-spinner {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 3px solid rgba(0,0,0,0.12);
  border-top-color: rgba(0,0,0,0.6);
  animation: ef-spin 0.9s linear infinite;
}

.ef-loading-text {
  font-weight: 600;
  color: #333;
}

.ef-loading-subtext {
  font-size: 0.9rem;
  color: #666;
}

/* Avoid accidental clicks while overlay is visible */
.ef-selection-panel.ef-loading {
  pointer-events: none;
}

/* Keep child overlay clickable for accessibility if needed */
.ef-selection-panel.ef-loading .ef-loading-overlay {
  pointer-events: auto;
}

@keyframes ef-spin {
  to { transform: rotate(360deg); }
}

@keyframes ef-shimmer {
  100% { transform: translateX(100%); }
}


/* Mobile-only behaviour */
@media (max-width: 768px) {

  /* ✅ Hide ALL cards... */
  body.spotlight-open #report-grid .report-card {
    display: none !important;
  }

  /* ✅ ...except the one we clicked */
  body.spotlight-open #report-grid .report-card.is-selected {
    display: block !important;
  }

  /* Optional: stop clicking the grid behind */
  body.spotlight-open #report-grid {
    pointer-events: none;
  }
  body.spotlight-open #report-grid .report-card.is-selected {
    pointer-events: auto;
  }

  /* ─────────────────────────────────────────────
     Spotlight overlay + WHITE sheet that scrolls
     (fixes: grey background + content getting cut)
     ───────────────────────────────────────────── */

  /* Overlay */
  #spotlight {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 12, 16, 0.55);

    display: flex;
    align-items: flex-end;        /* "bottom sheet" feel */
    justify-content: center;
    padding: 12px;

    overflow: hidden;            /* the sheet scrolls, not the overlay */
    -webkit-overflow-scrolling: touch;
  }

  /* The actual white card/sheet */
  #spotlight .spotlight-inner {
    width: 100%;
    max-width: 720px;

    background: #ffffff;         /* ✅ force white background */
    color: #111;

    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.35);

    /* ✅ Make it take (almost) full height and allow scrolling */
    max-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;            /* header/footer fixed, body scrolls */
  }

  /* Keep title visible */
  #spotlight .spotlight-header {
    padding: 14px 16px 8px;
    background: #ffffff;         /* ✅ keep header white too */
    border-bottom: 1px solid rgba(0,0,0,0.08);
    flex: 0 0 auto;
  }

  /* This is the scrolling area (prevents trimming) */
  #spotlight .spotlight-body {
    padding: 12px 16px 16px;
    overflow-y: auto;            /* ✅ content scrolls */
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    background: #ffffff;         /* ✅ prevent grey bleed-through */
  }

  /* Footer stays at bottom, button always visible */
  #spotlight .spotlight-footer {
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,0.08);
    flex: 0 0 auto;
  }

  /* Ensure chart/table areas can grow and don't get clipped */
  #spotlight #spotlight-chart {
    width: 100%;
    min-height: 320px;           /* gives Plotly room on mobile */
  }

  /* If any inner containers are accidentally clipping */
  #spotlight .full-chart,
  #spotlight #spotlight-stats {
    overflow: visible;
  }

  /* Your clone is desktop-only */
  .expanding-clone { display: none !important; }
}

/* body lock */
html.no-scroll,
body.no-scroll { overflow: hidden; }

/* ===== Step 2 improvements ===== */

.preset-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.preset-check {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9eef8;
  color: transparent;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.preset-card.active .preset-check {
  background: #007bff;
  color: #fff;
}

.preset-meta {
  margin-top: 0.7rem;
  font-size: 0.88rem;
  color: #5f6f8b;
  line-height: 1.45;
}

.preset-card.active {
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  border-color: rgba(0,123,255,0.5);
  box-shadow: 0 8px 18px rgba(0,123,255,0.12);
}

/* What this means card */
.risk-summary-card {
  margin-top: 1rem;
  border: 1px solid #e6eaf2;
  background: #f8fbff;
  border-radius: 16px;
  padding: 1rem;
}

.risk-summary-header {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.risk-summary-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  background: #e8f1ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.risk-summary-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2a44;
}

.risk-summary-subtitle {
  margin-top: 0.15rem;
  font-size: 0.9rem;
  color: #61708d;
}

.risk-summary-grid {
  display: grid;
  gap: 0.55rem;
}

.risk-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0;
}

.risk-summary-label {
  color: #51607d;
  font-size: 0.92rem;
}

.risk-summary-value {
  color: #1e2a42;
  font-weight: 600;
  text-align: right;
  font-size: 0.92rem;
}

.risk-social-proof {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e1e8f5;
  color: #5a6884;
  font-size: 0.92rem;
}

/* Right-hand preview card */
.weights-preview-visible {
  display: flex;
}

.weights-header-block {
  margin-bottom: 0.75rem;
}

.weights-subtitle {
  margin: -0.35rem 0 0;
  color: #62708a;
  font-size: 0.95rem;
  line-height: 1.45;
}

.weights-preview-note {
  background: #f6f8fc;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  color: #61708d;
  margin-bottom: 0.9rem;
}

.weights-empty-state {
  margin-top: 0.9rem;
  background: #fbfcfe;
  border: 1px dashed #d8e0ec;
  border-radius: 12px;
  padding: 1rem;
  color: #66768f;
  font-size: 0.92rem;
  text-align: center;
}

#weights-section.has-allocation .weights-empty-state {
  display: none;
}

#weights-section.has-allocation .weights-preview-note {
  background: #f4f9ff;
  border-color: #dceafe;
  color: #46607f;
}

@media (max-width: 768px) {
  .risk-summary-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
  }

  .risk-summary-value {
    text-align: left;
  }
}

/* ===========================
   Portfolio verdict strip
=========================== */

.portfolio-verdict-strip {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: #f7f9fc;
  border: 1px solid #e3e8f1;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.25rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.verdict-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.verdict-item-wide {
  flex: 1 1 260px;
}

.verdict-label {
  font-size: 0.95rem;
  color: #5f6b7a;
  white-space: nowrap;
}

.verdict-value {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.verdict-divider {
  width: 1px;
  align-self: stretch;
  background: #dde4ee;
}

.verdict-good {
  color: #1f7a3d;
}

.verdict-mixed {
  color: #9a6b00;
}

.verdict-bad {
  color: #c23b3b;
}

.verdict-neutral {
  color: #6c7a89;
}

@media (max-width: 900px) {
  .portfolio-verdict-strip {
    gap: 0.75rem;
  }

  .verdict-divider {
    display: none;
  }

  .verdict-item,
  .verdict-item-wide {
    flex: 1 1 100%;
  }
}

/* ===========================
   Report card mini summaries
=========================== */

.report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.report-card-head h4 {
  margin: 0;
}

.report-card-summary {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #5f6b7a;
  margin-bottom: 0.9rem;
  min-height: 2.6em;
}

.report-card-footer {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #edf1f6;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.report-card-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #2f6f8d;
  transition: color 0.2s ease, transform 0.2s ease;
}

.report-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.report-tag-good {
  background: #e8f5ec;
  color: #256c3a;
}

.report-tag-mixed {
  background: #fff1de;
  color: #8a5716;
}

.report-tag-bad {
  background: #f9dede;
  color: #b54747;
}

.report-tag-neutral {
  background: #ececf1;
  color: #666f7a;
}
