@font-face {
  font-family: 'Lora';
  src: url('/static/fonts/Lora-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: url('/static/fonts/Lora-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: url('/static/fonts/Lora-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: url('/static/fonts/Lora-SemiBoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

.header-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.header-row h2{margin:0}


.input-with-icon > .icon-btn{
  all: unset;
  position: absolute;
  left: .5rem;               /* same as portfolio */
  top: 50%;
  transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; line-height: 0;
  cursor: pointer; z-index: 2;
  color: #6b7280;
}
.input-with-icon > .icon-btn:hover{ color:#111827; }

/* make sure the dropdown can float over the header */
.ticker-dd{ z-index: 2000; }


/* dropdown */
.ticker-dd{
  position:absolute; top:100%; left:0; right:0;
  background:#fff; border:1px solid #e5e7eb; border-radius:10px;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  max-height:240px; overflow:auto; z-index:2000; /* above header */
  margin-top:4px; padding:0; list-style:none;
}
.ticker-dd .opt{ padding:8px 12px; cursor:pointer; display:flex; gap:8px; align-items:baseline; }
.ticker-dd .opt:hover, .ticker-dd .opt[aria-selected="true"]{ background:#f7f7f7; }
.ticker-dd .no-results{ opacity:.7; cursor:default; }



:root {
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --panel: #ffffff;
  --rule: #e2e8f0;
  --ink: #1e293b;
  --muted: #64748b;
  --accent: #FF7C48;
  --accent-2: #FF6217;
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  --button-height: 9px;
  --il-watermark-url: url("/static/logo-mark.svg");
  --il-marker-ink: #111827;        /* unified marker color */
  --il-target: var(--il-marker-ink);
  --il-target: #06b6d4; /* target marker color (accessible cyan) */
}


/* Two columns: title | search. Search is right-aligned. */
/* Base: keep title left, search right */
.title-bar{
  display:grid;
  grid-template-columns: 1fr max-content;
  align-items:center;
  column-gap:.75rem;
  width:100%;
}
.title-bar .title{ 
  margin:0; 
  display:flex; 
  align-items:center; 
  gap:.5rem; 
  min-width:0;
  justify-self:start;         /* LEFT */
  text-align:left;
}
.title-bar .search-form{
    display: flex;          /* was inline-flex */
  align-items: center;    /* <-- new */
  gap:.5rem;
}

.title-bar .search-form input{
  flex: 0 0 19ch;           /* stop stretching, fix basis */
  width: 19ch;              /* (optional redundancy) */
}

/* a11y helper */
.sr-only{
  position:absolute !important;
  width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* Autocomplete container anchors the dropdown */
.autocomplete{ position: relative; display: inline-block; width: auto; }

/* Suggestions panel */
.suggestions{
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
  border-radius: 8px;
  margin: 6px 0 0;
  padding: 4px 0;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  z-index: 1200;
}

.suggestions[hidden]{ display: none; }

.suggestions li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.suggestions li:hover,
.suggestions li[aria-selected="true"]{
  background: #f8fafc;
}

.sugg-left{ display:flex; gap:.5rem; align-items:center; }
.sugg-ticker{ font-weight: 700; letter-spacing:.2px; }
.sugg-name{ color: #64748b; font-size: .92em; overflow: hidden; text-overflow: ellipsis; }
.sugg-type{ color: #64748b; font-size: .85em; }

/* Mobile: dropdown fills the row width cleanly */
@media (max-width: 26.25em){
  .title-bar .search-form{ width: 100%; }
  .title-bar .search-form .autocomplete{ width: 100%; }
  .title-bar .search-form input{ width: 100%; }
  .suggestions{ max-height: 50vh; }
}




* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Lato', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
  line-height: 1.55;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ----------------- Navigation ----------------- */
.menu-toggle{display: none}

.nav {
  position: static;         /* was sticky/absolute before */
  z-index: auto;
  background: #fff;         /* keep simple solid bg */
  border-bottom: 1px solid var(--rule);
  /* you can keep padding/min-height etc. as-is */
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  height: auto;
  padding: 8px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-name .accent {
  color: var(--accent);
}

.brand-byline {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 8px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

/* ----------------- Header Buttons ----------------- */

header.nav .nav-cta .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--button-height) 1rem;
  min-width: 120px;
  border-radius: 100px;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
}


/* Gradient **background** + white text */
header.nav .nav-cta .button--gradient {
  background-image: linear-gradient(90deg, #60A5FA, #3B82F6);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  background-size: 200% 100%;         /* allows a nice hover shift */
  transition: background-position .25s ease, box-shadow .2s ease, transform .02s ease;
}

header.nav .nav-cta .button--gradient:hover {
  background-position: 100% 0;        /* subtle sweep on hover */
  box-shadow: 0 4px 12px rgba(0,0,0,.16);
}

header.nav .nav-cta .button--gradient:active {
  transform: translateY(1px);
}

/* Optional focus ring */
header.nav .nav-cta .button--gradient:focus-visible {
  outline: 2px solid rgba(96,165,250,.6);
  outline-offset: 2px;
}







.page-wrapper {
  display: flex;
  margin-left: 211px; 
}

.side-frame-left,
.side-frame-right {
   flex: 0 0 60px;
  background-color: #f8f9fa; 
   min-width: 60px;
  max-width: 60px;
}


/*Restricted*/

/* announcement */
.overlay {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 325px;
  max-height: 70vh; /* changed from invalid auto */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 2000;
}


.msg-box {
  background: white;
  border-radius: 12px;
  padding: 20px 30px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
}  

.close-announcement-btn {
 margin-top: 12px;
}



  /*Maintenance*/
  .maintenance-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    min-height: 65vh;
  }

  .maintenance-box {
    max-width: 500px;
    padding: 2rem 2.5rem;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-family: 'Lora', Georgia, serif;
    text-align: center;
  }

  .maintenance-box h1 {
    font-size: 2rem;
    color: #cc3300;
    margin-bottom: 1rem;
  }

  .maintenance-box p {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
  }


/* Base page styles */

html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.centered {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}


/* context menu */
.custom-menu {
  display: none;
  position: absolute;
  z-index: 1000;
  background: white;
  border: 1px solid #ccc;
  list-style: none;
  padding: 0;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.custom-menu li {
  padding: 8px 12px;
  cursor: pointer;
}

.custom-menu li:hover {
  background-color: #f0f0f0;
}



/* confirm */
.confirm-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.confirm-box {
  background: white;
  border-radius: 12px;
  padding: 20px 30px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
}

.confirm-actions {
  margin-top: 20px;
  --button-height: 6px;
}

/* Scope smaller buttons only inside the confirm box */


.msg-box button,
.msg-box button.transparent-orange {
  font-size: 0.9rem !important;
  padding: 6px 12px !important;
  min-width: 0 !important;
}





.hidden {
  display: none;
}

/* table */
/* === Portfolio Table Styles === */

.ai-hint {
  font-size: 0.9rem;
  color: #666;
}

.footer-bar {
  margin-top: 20px;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.95rem;
}

.footer-controls {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
  gap: 10px;
  align-items: center;
}

.pagination-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.paging-form {
  display: flex;
  align-items: center;
}

.paging-form select {
  border-radius: 4px;
  border: 1px solid #aaa;
  background-color: #fff;
  align-items: center;
}


.paging-form label {
  margin: 0;
}


.pagination-links a {
  margin: 0 0.25em;
  text-decoration: none;
  color: #0066cc;
  align-items: center;
}

.pagination-links a:hover {
  text-decoration: underline;
}


.portfolio-name {
  cursor: pointer;
  color: #007bff; /* A standard link blue */
  text-decoration: underline;
}

.portfolio-name:hover {
  color: #0056b3; /* Darker blue on hover */
  background-color: #f2f2f2; /* Optional: subtle hover effect */
}


.portfolio-table.view td.col-description {
  text-align: left;
}

.portfolio-table, .asset-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 15px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.portfolio-table th,
.portfolio-table td,
 .asset-table th,
 .asset-table td{
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
}

.portfolio-table th,
 .asset-table th{
  background-color: #f4f4f4;
  color: #333;
  text-transform: uppercase;
  font-weight: 600;
}

.portfolio-table tr:hover,
 .asset-table tr:hover{
  background-color: #f9f9f9;
}

.portfolio-table a ,
.asset-table a{
   color: inherit;
  text-decoration: none;
}

.portfolio-table tbody td a,
.asset-table tbody td a {
  cursor: pointer;
  color: #007bff; /* A standard link blue */
  text-decoration: underline;
}

.portfolio-table tbody td a:hover,
.asset-table tbody td a:hover {
  text-decoration: underline;
}

.portfolio-table a:hover,
 .asset-table a:hover{
  text-decoration: underline;
}

/* Make column headers look clickable */
.portfolio-table th,
.asset-table th {
  cursor: pointer;
  position: relative;
  padding-right: 24px; /* space for arrow */
}

/* On hover, show subtle underline */
.portfolio-table th:hover,
.asset-table th:hover {
  text-decoration: underline;
  background-color: #f0f0f0;
}


/* Default sort arrows (neutral gray) */
.portfolio-table th::after,
.asset-table th::after {
  content: "⇅";  /* neutral icon */
  position: absolute;
  right: 10px;
  font-size: 12px;
  color: #bbb;
}

/* Active ascending */
.portfolio-table th.sort-asc::after,
.asset-table th.sort-asc::after {
  content: "▲";
  color: #333;
}

/* Active descending */
.portfolio-table th.sort-desc::after,
.asset-table th.sort-desc::after {
  content: "▼";
  color: #333;
}


.portfolio-table .action-icons a,
asset-table .action-icons a {
  margin-right: 8px;
  text-decoration: none;
  font-size: 1.2em;
  transition: transform 0.2s;
}

.portfolio-table .action-icons a:hover,
 .asset-table .action-icons a:hover{
  transform: scale(1.2);
}

.portfolio-table td:nth-child(2),
.portfolio-table th:nth-child(2),
.portfolio-table:not(.view) td:nth-child(3),
.portfolio-table:not(.view) th:nth-child(3),
.asset-table:not(.list) td:nth-child(2),
.asset-table:not(.list) th:nth-child(2),
.asset-table:not(.list) td:nth-child(3),
.asset-table:not(.list) th:nth-child(3) {
  text-align: left !important;
}



/* Sidebar */
.close-sidebar {
  position: absolute;
  top: 0px;
  right: 0px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #333;
  cursor: pointer;
  z-index: 30;
  display: none;
}

.close-sidebar:hover {
  background-color: #e0e0e0; 
}


.sidebar li.active > a,
.sidebar li.active > button {
  background-color: #F0F1EF;
  font-weight: bold;
  border-left: 4px solid #007bff;
}

.sidebar {
  width: 211px;
  background-color: #f9f9f9;
  border-right: 1px solid #ddd;
  padding: 0px 0px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  overflow-y: auto;
}


.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 12px;
}

.sidebar ul li {
  margin: 12px 0px;
}


.sidebar ul li a,
.sidebar ul li button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
  box-sizing: border-box;
}

.sidebar ul li.has-submenu {
  margin: 12px 0;
  padding: 0;
}

.sidebar ul li.has-submenu .submenu-items {
  margin: 0;
  padding: 0;
}

.sidebar ul li.has-submenu .submenu-items li a {
  padding: 10px 64px;
}

.submenu-items a{
  display: block;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.2s;
}

.submenu-items li {
  margin: 0; 
}

.submenu-items li a {
  font-size: 0.95em;
}

.has-submenu .submenu-indicator {
  display: inline-block;
  font-size: 1em;
  margin-left: 5px;
  transition: transform 160ms ease-out;
  transform-origin: center;
}

/* rotate when click-opened OR hover-opened */
.has-submenu.open > button .submenu-indicator,
.has-submenu.hover > button .submenu-indicator {
  transform: rotate(180deg);
}


.sidebar ul li > button:hover,
.sidebar ul li > a:hover {
   background-color: #072857;
  color: #d4dee2;
}

.sidebar ul li.has-submenu.hover > .submenu-items {
    display: block;
}


.sidebar ul li button {
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}


.sidebar ul li .submenu-items li > a:hover {
  background-color: #7da7e1 !important;
  color: #ffffff !important;
}

.button-shape {
  border-radius: 0 !important;       
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease;
}

.sidebar ul li.has-submenu.active > .submenu-items {
  display: block !important;
}


/*submenu appear on hover*/
/* Hidden by default */
.sidebar ul li.has-submenu .submenu-items {
  display: none;
  margin: 0;
  padding: 0;
}

/* Click/touch open */
.sidebar ul li.has-submenu.open > .submenu-items {
  display: block;
}



/* Main content */
#main-content {
  margin-left: 0px;
   flex: 1 0 auto; 
  padding: 20px;
}


.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin: 0 auto;
}

/* Logo and title */
.site-title {
  font-size: 34px;
  font-weight: 700;
  color: #222;
  letter-spacing: 0.5px;
  font-family: 'Montserrat', sans-serif;
  margin: 0;
}

.byline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #777;
  margin-top: 4px;
}

.site-logo {
  height: 14px;
  opacity: 0.85;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center; /* centers title and byline */
  text-align: center; /* ensures text is centered too */
}

.site-title svg {
  height: 1.1em;
  width: auto;
  vertical-align: middle;
}

.accent-text{
  background: linear-gradient(90deg, #60A5FA, #3B82F6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}
.site-title span:first-child { color: #FF7C48; }  /* Invest */

.site-title span {
  color: #ff6600; /* keep Alpha in strong orange */
}

.site-title svg path,
.site-title svg circle {
  stroke: #222222; /* matches Lens text */
}


#site-title {
  font-size: 34px; /* a bit larger for stronger presence */
  font-weight: 700; /* same as bold but more explicit */
  color: #222; /* slightly darker for better contrast */
  letter-spacing: 0.5px; /* subtle spacing for modern look */
  font-family: 'Montserrat', sans-serif; /* or another clean sans-serif */
}

/* Form rows */
.admin-settings-row,
.settings-row,
.form-row,
.profile-row {
  display: flex;
  justify-content: space-between; /* spread label and input apart */
   margin-bottom: 1rem;
}

/* Right-hand side of the row should flex and align nicely */
.profile-row .input-wrapper {
  flex: 1;                    /* take remaining width next to the label */
  max-width: 480px;           /* or whatever your other inputs effectively are */
  position: relative;
}

/* Wrap input + eye */
.profile-row .password-wrapper {
  position: relative;
  width: 100%;
}

/* Let the input fill the available width and reserve room for the eye */
.profile-row .password-wrapper .text-item.profile {
  width: 100%;
  box-sizing: border-box;
}

/* Position the eye inside the field, vertically centered */
.profile-row .password-toggle {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.1rem;
}


.login-row.forgot-password{
  justify-content: center;
}

.login-row{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
   margin-bottom: 1rem;
}

.asset-index {
  display: flex;
  align-items: center;
  font-weight: bold;
}


 .asset-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}




.portfolio_name,
.asset-weight,
.asset-weight-min,
.asset-weight-max,
.asset-type {
  width: 4em;
  box-sizing: border-box;
}

.asset-row > .tooltip-wrapper:has(> .asset-type) {
  flex: 0 0 7.5em;      /* fixed 12em column for description */
  max-width: 7.5em;
}
.asset-row .tooltip-wrapper .asset-type { width: 100%; }  /* fill that column */

.asset-row > .tooltip-wrapper:has(> .input-with-icon > .asset-ticker) {
  flex: 0 0 11.5em;
  max-width: 11.5em;
}

.asset-row > .tooltip-wrapper:has(> .asset-name) {
  flex: 0 0 6.5em;      /* fixed 12em column for description */
  max-width: 6.5em;
}
.asset-row .tooltip-wrapper .asset-name { width: 100%; }  /* fill that column */

.asset-row input {
  flex: 1;
  min-width: 0;
}

/* Login layout */


.login-container.register-page {
  display: flex;           /* still flexbox */
  justify-content: center; /* keep horizontal centering */
  align-items: flex-start; /* stop vertical centering */
  padding-top: 0px;      /* push it down */
}

.login-container {
  min-height: 65vh;
  display: flex;
  justify-content: center;
  align-items: center; 
  padding: 40px 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto; 
}

.login-form-wrapper {
  max-width: 32em;
  min-width: 0;
  width: 100%;
  padding: 0 20px;
}

.captcha-wrapper {
  display: flex;
  justify-content: center;
  margin: 5px 0;
  transform: scale(0.7);         /* shrink to 85% size */
  transform-origin: center center;/* keep centered */
}

.login-form-wrapper form {
  min-width: 0;
  width: 100%;
}

 .error-msg,
.success-msg {
  display: block;           /* make them full-width block elements */
  white-space: normal;      /* allow line breaks */
  word-wrap: break-word;     /* older support */
  max-width: 100%;          /* don’t overflow parent */
  overflow-wrap: anywhere;   /* strongest: break wherever needed */
  word-break: break-word;    /* extra safety for long tokens */
}

.login-footer {
  margin-top: 15px;
  text-align: center;
  font-size: 0.95rem;
}

.password-wrapper {
  position: relative;
  width: 15.625em; 
  display: flex;
  justify-content: space-between;
  flex: 0 0 auto;
}

/* Inputs and labels */
input, select {
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 4px;
  font-size: 1rem;
  /* width: 100%; */
  flex: 1;
  transition: border-color 0.2s;
}


input:focus, select:focus {
  border-color: #005b8c;
  outline: none;
}


#qt_token{
  max-width: 100%; 
  width: 100%;     
}


label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 100px;
  font-weight: 500;
  color: #444;
  flex-shrink: 0;
  white-space: nowrap;
}

.admin-settings-wrapper,
.settings-wrapper {
  min-width: 100%;
}

.admin-settings-container,
.settings-container {
  display: flex;
  justify-content: center;
  width: 100%;
  text-align: left;
}

.settings-page label {
  min-width: 170px; /* or whatever width you want */
}

.qt-link-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.qt-link-row input[type="checkbox"] {
  vertical-align: middle;
  position: relative;
  top: 1px; /* slight upward nudge */
}



.tooltip-wrapper {
  position: relative;
  display: inline-block; /* default — but change to block for full width */
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  background-color: #072857; /* pleasant dark blue */
  color: #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3); /* subtle shadow */
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  position: absolute;
  overflow: hidden;
  bottom: 125%; /* place above button */
  left: auto;
  right: 0;
  max-width: 270px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  z-index: 1;
   transition: opacity 0.3s ease-in-out, visibility 0s linear 0.3s;
}


/* Show on hover (desktop) and focus/tap (mobile) */
.tooltip-wrapper:hover .tooltip-text,
.tooltip-wrapper:focus-within .tooltip-text {
  visibility: visible;
  opacity: 1;
  transition-delay: 0.5s, 0s; /* delay opacity on show, no delay on visibility */
}

.asset-row .tooltip-wrapper select,
.asset-row .tooltip-wrapper input {
  width: 100%; /* keep full width inside wrapper */
}

.asset-row .tooltip-wrapper select,
.asset-row .tooltip-wrapper input[type="text"],
.asset-row .tooltip-wrapper input[type="number"] {
  width: 100%;
}

.input-wrapper {
  display: flex;
  justify-content: space-between;  /* or use flex-end if needed */
  align-items: center;             /* keep label/input aligned vertically */
}

.set-item {
  width: 4em !important;
  flex: 0 0 auto !important;
  text-align: center;
}

.wider-select {
    width: 18.75em;
     flex: 0 0 auto !important;
  }

.profile {
  width: stretch !important;
}

.text-item {
  width: 28em !important;
  flex: 0 0 auto !important;
  text-align: left;
}




.reset_password{
    flex: 1;
}


label .required {
  color: #c00;          /* Red color for the asterisk */
  font-size: 1.1em;     /* Slightly larger size for emphasis */
  margin-left: 170px;     /* Space between label and asterisk */
  vertical-align: middle; /* Align vertically with text */
}

/* left icon like Google */
.input-with-icon { position: relative; display: inline-block; width: 100%; }
.input-with-icon input {
  width: 100%;
  padding-left: 2.25rem;   /* make room for the icon on the left */
  padding-right: .5rem;    /* was 2.25rem */
}

.asset-row .input-with-icon > .icon-btn {
  all: unset;
  position: absolute !important;
  left: .5rem;             /* moved left */
  right: auto;             /* stop anchoring right */
  top: 50%;
  transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; line-height: 0;
  cursor: pointer; z-index: 2;
  color: #6b7280;
}
.asset-row .input-with-icon > .icon-btn:hover { color: #111827; }

/* nice focus effect */
.input-with-icon:focus-within .icon-btn { color: #111827; }


/* (optional) dropdown header style you added */
.ticker-dd .opt:first-child { background:#fafafa; cursor:default; }

.ticker-dd .opt small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Buttons */
.checkbox-row {
  justify-content: center;
  gap: 8px;            /* space between checkbox and label */
  align-items: center; /* vertical alignment */
}








button.login-btn.logged-in {
  background-color: #0a8a0a;
  color: white;
  border: none;
}

button.login-btn.logged-in:hover {
  background-color: #0b7b0b;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
   justify-content: center;
  width: 100%;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--button-height) 1rem;
  font-size: 0.95rem;
  background-color: #FF7C48;     /* not pressed */
  color: #fff;
  border: solid #FF7C48;
  border-radius: 100px;          /* pill shape */
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease;
  min-width: 120px;
}

button:hover,
button:active {
  background-color: #FF6217;     /* pressed/hovered */
}

button:disabled {
  background-color: #bbb;
  cursor: not-allowed;
}

.delete-btn,
button.transparent-orange {
  background-color: transparent;
  color: #FF7C48;
  border: solid #FF7C48;
  border-radius: 100px;
  padding: 8px 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: none;
}

.delete-btn:hover,
button.transparent-orange:hover {
  background-color: #FF6217;
  color: #fff;
  border-color: #FF6217;
}

.delete-btn {
  color: #c00;
  border-color: #c00;
}

button.delete-btn:hover {
  background-color: #c00;
  color: #fff;
  border-color: #c00;
}

.toggle-password {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8em;
  margin-left: 0;
  color: #666;
}

/* Toggle icon (eye) */
.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1rem; /* optional for consistent sizing */
}




/* Report output */

.report-loading {
  display: flex;
  justify-content: center;
}

.transaction-advice {
  font-weight: bold;
  color: green;
}

.error-input {
  border: 2px solid red !important;
  background-color: #ffe5e5 !important;
  border-radius: 4px;
}

#report-output {
  font-family: 'Courier New', monospace;
  background: #F0F1EF;
  padding: 15px;
  border-radius: 4px;
  border-left: 4px solid #005b8c;
  white-space: pre-wrap;
  margin-top: 25px;
}

#report-output.error {
  color: #c00;
  border-left-color: #c00;
}

/* Image gallery */
#images-output {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  padding: 10px 15px;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}
#images-output img {
  max-width: 48%;
  height: auto;
}

/* AI */

#explain-btn {
  position: absolute;
  display: none;
  z-index: 1000;
  padding: 4px 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

#interpret-overlay {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 325px;
  max-height: 70vh; /* changed from invalid auto */
  overflow-y: auto;
  padding: 16px;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: none;
  z-index: 2000;
}



#interpret-text {
  white-space: pre-wrap;
  line-height: 1.5;
}

#interpret-overlay .close-container {
  text-align: center;
  margin-top: 12px;
}

#chart-container {
  width: 100%;
  height: 0;
  overflow: hidden;
}


.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 60vh;
  flex: 1 0 auto;
  margin: 0 auto;
  max-width: 57.8125em;
  width: 100%;
}







@media (prefers-reduced-motion: reduce) {
  .has-submenu .submenu-indicator { transition: none; }
}


@media screen and (max-width: 64em) {   

  header.nav {
    padding-left: 0.75rem;  /* adjust as needed */
    padding-right: 0.75rem;
  }

#site-logo {
  width: 64px;
  height: 64px;
}

  .qt-link-row input[type="checkbox"] {
    top: -3px;
  }

.login-container,.maintenance-wrapper {
  min-height: 48vh;
}

    .page-wrapper {
    display: block !important;
    margin-left: 0 !important;
  }
  
    .side-frame-left,
  .side-frame-right {
    display: none !important;
  }

.paging-form label {
  display: flex;
  max-width: 7.5em;
  align-items: center;
}

  .admin-settings-page label ,
  .settings-page label {
  flex: 0 0 10.625em !important;
  min-width: 10.625em !important;
  max-width: 10.625em !important;
}

.app-shell {
  display: flex;
  flex-direction: column;
  position: relative;
   max-width: 960px;
  margin: 0 auto;
}


.form-row,
.login-row {
  flex-direction: column;  
  width: 100%;
}

.qt_token{
    width: 100% !important;
  }

.qt-token-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}


.portfolio-table td[data-label="Action"],
.asset-table td[data-label="Action"] {
    text-align: center;
    padding-top: 0.9375em;
  }

.portfolio-table td[data-label="Action"] a,
.asset-table td[data-label="Action"] a {
    margin-right: 0.75em;
  }

.asset-row {
    flex-direction: column;
    gap: 0.75em;
  }

  .asset-row > .tooltip-wrapper:has(> .asset-type),
  .asset-row > .tooltip-wrapper:has(> .asset-name),
  .asset-row > .tooltip-wrapper:has(> .input-with-icon > .asset-ticker){
    flex: 1 1 auto;    /* allow to grow/shrink */
    max-width: none;   /* remove fixed cap */
  }

.portfolio_name,
.asset-name,
.asset-ticker,
.asset-weight,
.asset-weight-min,
.asset-weight-max,
.asset-type {
  width: 100%;
}



  .asset-index{
    justify-content: center;
  }

  #images-output img {
    max-width: 100%;
  }

  .password-wrapper {
    position: relative;
    max-width: 25em;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
  }

    /* Override only on settings/profile page */
  .settings-page .profile-row .password-wrapper {
    max-width: none;       /* remove 25em cap */
    margin: 0;             /* no centering */
    display: block;        /* behave like a normal container */
    justify-content: flex-start;
  }

  .settings-page .profile-row .password-wrapper .text-item.profile {
    width: 100%;
    box-sizing: border-box;
  }

  .settings-page .profile-row .password-toggle {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.1rem;
  }


label {
  width: 100%;
  margin-bottom: 0.375em;
  font-size: 1rem;
  text-align: left;
  align-items: center;
}


.sidebar {
  position: absolute;            /* overlays content */
  top: 0;
  left: 0;
  width: 13em;                  /* or 100% if you prefer */
  height: auto;
  background: #f9f9f9;
  transform: translateX(-300%);  /* hidden to the left */
  transition: transform 0.3s ease;
  z-index: 10;
}

.sidebar.active {
  transform: translateX(0);      /* slide into view */
}

.menu-toggle{
  all: unset;
  position: absolute;              /* stick with the header */
  top: -35px;
  left: 16px;                   /* nudge from the left edge */
  z-index: 2100;                /* above header (header is 2000) */
  height: var(--toggle-h);
  padding: 0 12px;
  background: var(--panel);
  border-radius: 8px;
  font: 700 1rem/var(--toggle-h) system-ui, sans-serif;
  cursor: pointer;
  color: #333;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}


.menu-toggle:hover {
   background-color: transparent; 
}

.menu-toggle.border-active {
  border: 0.125em solid #333;
  border-radius: 4px;
}



  .close-sidebar {
    display: block;
  }

.sidebar.active ~ .menu-toggle {
    display: none !important;
  }


/* keep it in one row */
#ir-compare-row {
  display: flex;
  flex-wrap: nowrap;     /* <— no wrapping */
  align-items: center;
}

#ir-compare-row label {
  flex: 0 0 90px;        /* small fixed label */
}

}

/* Extra-small screens: phones */
@media screen and (max-width: 26.25em) {

    .settings-page .profile-row .password-toggle {
    right: 10px;
  }

  .asset-table th.col-daterange,
  .asset-table td.col-daterange {
    display: none !important;
  }

  .asset-table th.col-uptodate,
  .asset-table td.col-uptodate {
    display: none !important;
  }

  .portfolio-table th.col-daterange,
  .portfolio-table td.col-daterange,
  .portfolio-table th.col-created,
  .portfolio-table td.col-created,
  .portfolio-table th.col-uptodate,
  .portfolio-table td.col-uptodate,
  .portfolio-table th.col-description,
  .portfolio-table td.col-description {
    display: none !important;
  }

.portfolio-table.invitations th.inv_expire,
.portfolio-table.invitations td.inv_expire,
.portfolio-table.invitations th.inv_link,
.portfolio-table.invitations td.inv_link,
.portfolio-table.invitations th.inv_id,
.portfolio-table.invitations td.inv_id,
.portfolio-table.invitations th.inv_created,
.portfolio-table.invitations td.inv_created, 
.portfolio-table.invitations th.inv_act,
.portfolio-table.invitations td.inv_act {
  display: none !important;
}

.portfolio-table.ideas th.idea_created,
.portfolio-table.ideas td.idea_created {
  display: none !important;
}

    .title-bar{
    display: grid !important;
    grid-template-columns: 1fr;   /* single column */
    grid-auto-rows: auto;
    row-gap: .5rem;
    width: 100%;
  }

  .title-bar .title{
    justify-self: start;
    margin: 0;
    text-align: left;
  }

  /* Search row spans full width */
  .title-bar .search-form{
    justify-self: stretch;        /* fill the line */
    width: 100%;
    display: flex;                 /* keep input + button on one row */
    align-items: center;
    gap: .5rem;
    margin: 0;
  }

  /* Override desktop input sizing (you had flex:0 0 12ch; width:12ch) */
  .title-bar .search-form input{
    flex: 1 1 auto;               /* stretch */
    min-width: 0;                 /* allow shrinking without overflow */
    width: 100%;
  }

  /* Let the button size naturally and avoid your global min-width:120px */
  .title-bar .search-form button{
    flex: 0 0 auto;
    min-width: auto;
    padding: 8px 12px;
  }

  /* Optional: hide the label to save space */
  .title-bar .search-form label{ display: none !important; }


  .footer-cols {
    grid-template-columns: 1fr;  /* one column */
    column-gap: 8px;             /* small horizontal gap if any */
    row-gap: 10px;               /* fix invalid 'px' */
  }

  .footer-cols > div:last-child { justify-self: stretch; } /* CTA aligns full width */
      .nav-inner{
    flex-wrap: wrap;      /* allow brand, links, CTAs to drop to new lines */
    row-gap: 10px;
  }
  .brand{ order:1; }

  .nav-links{
    order:2;
    width:100%;
    justify-content:center;
    display:flex;
    flex-wrap:wrap;
    column-gap:16px;
  }

  .nav-cta{
    order:3;
    width:100%;
    display:flex;
    justify-content:center;
    gap:8px;              /* distance between the two buttons */
    flex-wrap:wrap;       /* allow buttons to break to next line if needed */
  }

  .nav-cta .btn{
    padding:10px 14px;    /* smaller pills on mobile */
    font-size:.95rem;
  }

  .menu-toggle{
      top: -34px;
  }
  .qt-link-row{
     gap: 0px;
  }
  .login-container, .maintenance-wrapper {
  min-height: 57vh;
}
    .pagination-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: nowrap;
  width: 100%;
}

  .admin-settings-page label,
  .settings-page label {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    margin-bottom: 0.375em;   
  }

.admin-settings-wrapper,
.settings-wrapper {
  max-width: 25em;
  width: 100%;
}


  #report-output {
  overflow-x: auto;     /* single horizontal scrollbar */
  padding-top: 35px;
}



.profile-row{
  flex-direction: column;
  align-items: stretch; /* optional: make children fill width */
  text-align: left;
}

.form-row,
.login-row,
.admin-settings-row,
.settings-row{
  flex-direction: column;
  align-items: stretch; /* optional: make children fill width */
  text-align: left;
}

  .password-wrapper {
  position: relative;
  max-width: 25em;
  width: 100%;
  display: flex;
   justify-content: center;
}



.input-wrapper {
  display: flex;
  width: 100%;
}

.text-item {
  width: stretch !important;
  flex: 1 !important;
  text-align: left;
}

.set-item{
  flex: 1 !important;
  text-align: right;
  }

  .wider-select {
    width: 100%;
  }

  label {
    display: block;
    width: 100%;
    margin-bottom: 0.375em;
    font-size: 1rem;
    text-align: left;
  }


  .button-row {
    flex-direction: column;
    align-items: stretch; /* make them fill the width of the container */
  }

  .button-row button {
    width: 100%; /* optional: make each button full width */
  }

.asset-row {
  display: flex;
  flex-direction: column;   /* keep stacking */
  gap: 0.75em;
  margin-bottom: 1em;
}

/* style the label inside the row */
.form-row label,
.asset-row label {
  display: block;
  width: 100%;           /* or set a fixed width like 180px if you want label column */
  margin-bottom: 0.375em;
  font-size: 1rem;
  text-align: left;
}
  input,
  select,
  button,
  textarea {
    box-sizing: border-box;
    font-size: 1rem;
  }


button.login-btn.logged-in {
  background-color: #0a8a0a !important;
  color: white !important;
  border: none;
}

button.login-btn.logged-in:hover {
  background-color: #0b7b0b !important;
}

  #images-output {
    padding: 0.625em 0.313em;
    gap: 0.625em;
  }

  #images-output img {
    max-width: 100%;
    flex: 1 1 100%;
    height: auto;
  }

  #site-title {
    font-size: 22px;
  }



.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1rem;
}


  #ir-compare-row label {
    flex: 1 1 100%;
  }


}



















/* Apply the same toggle styling to Admin Settings rows as well */
:is(.settings-row, .admin-settings-row) .input-wrapper {
  display: flex;
  align-items: center;
  gap: .5rem;
}

:is(.settings-row, .admin-settings-row) .input-wrapper .toggle {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
  flex: 0 0 44px;
  min-width: 44px;
  vertical-align: middle;
}

:is(.settings-row, .admin-settings-row) .input-wrapper .toggle > input {
  all: unset;                 /* prevents global input flex/width rules */
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
}

:is(.settings-row, .admin-settings-row) .input-wrapper .toggle > .slider {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #d1d5db;
  transition: background .2s ease;
}

:is(.settings-row, .admin-settings-row) .input-wrapper .toggle > .slider::before {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  transition: transform .2s ease;
}

:is(.settings-row, .admin-settings-row) .input-wrapper .toggle > input:checked + .slider { 
  background: #ff7a1a;  /* your orange */
}
:is(.settings-row, .admin-settings-row) .input-wrapper .toggle > input:checked + .slider::before { 
  transform: translateX(20px);
}
:is(.settings-row, .admin-settings-row) .input-wrapper .toggle > input:focus-visible + .slider { 
  outline: 2px solid #2563eb; 
  outline-offset: 2px; 
}

/* Keep toggle compact on mobile despite global label rules */
:is(.settings-row, .admin-settings-row) .input-wrapper label.toggle {
  display: inline-flex !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  flex: 0 0 44px !important;
}


/* ================= FOOTER ================= */
/* ===== Footer (dark) ===== */
.footer {
  background: #0c2340;
  color: #fff;
  border-top: none;
  padding: 2.5em 2.5em 0.5em;
}

.footer-inner { 
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 0 20px; 
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.9fr auto;
  column-gap: 16px;
  row-gap: 12px;
  align-items: start;
}

.footer h4,
.footer h5 { 
  margin: 0 0 10px; 
  color: #fff; 
}

.footer ul { 
  list-style: none; 
  margin: 0; 
  padding: 0; 
}

.footer a { 
  color: #e6edf5; 
  text-decoration: none; 
}
.footer a:hover { 
  color: #FF7C48; 
}
.footer .muted { 
  color: #d4dee2; 
}
.footer .brand-row .accent { 
  color: #FF7C48; 
}

.footer-cols > div:last-child { 
  justify-self: end; 
}

.footer .copyright {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 30px;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* ===== Brand + badge scaling ===== */
.footer { --footer-badge-h: clamp(48px, 5vw, 68px); }

.footer .brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.footer .partner-badge { 
  display: inline-flex; 
  align-items: center; 
  line-height: 0; 
}
.footer .partner-badge img,
.footer .partner-badge svg {
  display: block;
  height: var(--footer-badge-h);
  width: auto;
  border: 0;
  box-shadow: none;
  outline: 0;
}

.footer .brand-row > svg {
  height: calc(var(--footer-badge-h) * 0.95);
  width: auto;
  flex: 0 0 auto;
}
.footer .brand-row strong {
  font-size: calc(var(--footer-badge-h) * 0.42);
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: .2px;
}

/* Responsive footer grid */
@media (max-width: 26.25em) {
  .footer-cols {
    grid-template-columns: 1fr;
    column-gap: 8px;
    row-gap: 10px;
  }
  .footer-cols > div:last-child { 
    justify-self: stretch; 
  }
}

/* Small screens: allow wrap but keep readable sizes for brand/badge */
@media (max-width: 640px) {
  .footer { --footer-badge-h: 44px; }
  .footer .brand-row { flex-wrap: wrap; }
  .footer .partner-badge { margin-top: 6px; margin-left: 36px; }
}

















/* Snapshot question-mark icon (no impact on search icon styles) */
.asset-row .input-with-icon.has-snapshot .snapshot-btn {
  position: absolute;
  right: 8px;            /* park it on the right edge */
  top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  color: #6b7280;
}
.asset-row .input-with-icon.has-snapshot .snapshot-btn:hover { color: #111827; }
.asset-row .input-with-icon.has-snapshot .snapshot-btn svg { width: 18px; height: 18px; pointer-events: none; }

/* Make room for the right-side icon only when it exists */
.asset-row .input-with-icon.has-snapshot > .asset-ticker {
  padding-right: 2.25rem;
}


/* Prevent the ticker field wrapper from showing any descendant tooltips */
.no-field-tooltip:hover .tooltip-text,
.no-field-tooltip:focus-within .tooltip-text {
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Re-enable tooltips when hovering/focusing the icons themselves */
.no-field-tooltip .icon-btn:hover + .tooltip-text,
.no-field-tooltip .icon-btn:focus-visible + .tooltip-text,
.no-field-tooltip .snapshot-btn:hover + .tooltip-text,
.no-field-tooltip .snapshot-btn:focus-visible + .tooltip-text {
  visibility: visible !important;
  opacity: 1 !important;
  transition-delay: 0.5s, 0s;
}

/* Position each icon’s tooltip near its own edge */
.input-with-icon > .icon-btn + .tooltip-text { 
  left: .5rem; right: auto; bottom: 125%;
}
.input-with-icon > .snapshot-btn + .tooltip-text { 
  right: .5rem; left: auto; bottom: 125%;
}

/* Prevent layout shift when the vertical scrollbar appears/disappears */
.sidebar {
  overflow-y: auto;                /* you already have this */
  scrollbar-gutter: stable;        /* reserve space for the scrollbar */
}

/* Fallback for older browsers (forces scrollbar so width is constant) */
@supports not (scrollbar-gutter: stable) {
  .sidebar { overflow-y: scroll; }
}















/* ==================== SNAPSHOT OVERLAY (all styles grouped) ==================== */

/* ---- Tokens (geometry) ---- */
:root{
  --il-bar-top: 10px;
  --il-bar-h: 12px;
  --il-tri-h: 8px;
  --il-gap-above: 4px;
  --il-gap-below: 4px;
  --il-footer-h: 56px;
  --il-watermark-w: 220px;
  --il-watermark-h: 76px;
  --il-outside-offset: 0px; /* target arrow nudge when off-scale */
}

/* ---- Backdrop & Drawer ---- */
.il-snap-backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,.35);
  opacity:0; pointer-events:none;
  transition:opacity .18s ease;
  z-index:5000;
}
.il-snap-backdrop.open{ opacity:1; pointer-events:auto; }

.il-snap-drawer{
  --il-tint:0,0,0;
  background:
    linear-gradient(0deg, rgba(var(--il-tint),.07), rgba(var(--il-tint),.07)),
    #fff;
  position:fixed; top:0; right:0;
  height:100%; width:360px; max-width:88vw;
  box-shadow:-2px 0 20px rgba(0,0,0,.2);
  transform:translateX(100%);
  transition:transform .18s ease;
  display:flex; flex-direction:column;
  overflow:hidden; z-index:5001;
}
.il-snap-drawer.open{ transform:translateX(0); }
.il-snap-drawer.sb      { --il-tint:16,185,129; }
.il-snap-drawer.neutral { --il-tint:250,204,21; }
.il-snap-drawer.bear    { --il-tint:239,68,68; }

.il-snap-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; border-bottom:1px solid #eee;
}
.il-snap-title{ display:flex; align-items:center; gap:8px; font-weight:700; }
.il-snap-badge{ background:#f5f5f5; color:#334; padding:2px 8px; border-radius:9999px; font-size:12px; }
.il-snap-close{ --il-close-size: 36px; width:var(--il-close-size); height:var(--il-close-size); padding:0; display:inline-flex; align-items:center; justify-content:center; line-height:1; }

.il-snap-body{ padding:8px 14px 14px; overflow-y:auto; overflow-x:hidden; flex:1; -webkit-overflow-scrolling:touch; }
.il-snap-footer{ padding:10px 14px; border-top:1px solid #eee; color:#666; font-size:12px; min-height:var(--il-footer-h); display:flex; align-items:center; }

.il-snap-hero .headline{ font-weight:800; font-size:22px; letter-spacing:.2px; }
.il-snap-drawer.neutral .il-snap-hero .headline{ color:#0f172a; }

/* ---- Watermark ---- */
.il-snap-drawer::after{
  content:"";
  position:absolute;
  right:16px; bottom:15px;
  width:var(--il-watermark-w); height:var(--il-watermark-h);
  -webkit-mask-image: var(--il-watermark-url);
  mask-image: var(--il-watermark-url);
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
  -webkit-mask-position:right bottom; mask-position:right bottom;
  -webkit-mask-size:contain; mask-size:contain;
  background-color: rgba(17,24,39,.12);
  pointer-events:none; z-index:1;
}
@supports not ((-webkit-mask-image: url("")) or (mask-image: url(""))){
  .il-snap-drawer::after{
    background-image: var(--il-watermark-url);
    background-repeat:no-repeat;
    background-position:right bottom;
    background-size:contain;
    opacity:.08; filter:grayscale(100%) contrast(115%);
  }
}
.il-snap-header, .il-snap-body, .il-snap-footer{ position:relative; z-index:2; }

@media (max-width:480px){
  .il-snap-drawer{ width:100%; max-width:none; }
}

/* ---- Donut + legend ---- */
.il-snap-chart{ margin:8px 0 6px; display:flex; align-items:center; justify-content:center; }
.il-snap-legend3{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px 16px; margin:10px 0 0;
}
.il-snap-legend3 .col{ display:flex; flex-direction:column; gap:6px; align-items:flex-start; }
.il-snap-legend3 .item{ display:inline-flex; align-items:center; gap:6px; }
.il-snap-legend3 .swatch{ width:10px; height:10px; border-radius:2px; display:inline-block; }

/* ---- Section spacing ---- */
.il-snap-ratings{ margin-bottom:14px; }
.il-snap-price h4,
.il-snap-tone  h4{ --heat-gap:25px; margin:0 0 var(--heat-gap); line-height:1.2; }
.il-snap-price .il-heat,
.il-snap-tone  .il-heat{ margin-top:0; }

/* ================== HEAT / TONE BAR ================== */
.il-heat{ margin-top:8px; }
.il-heat-wrap{ position:relative; height:52px; overflow:visible; }
.il-heat-bar{
  position:absolute; left:0; right:0;
  top:var(--il-bar-top); height:var(--il-bar-h);
  border-radius:999px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

/* Markers (triangles by default, up from bottom area) */
.il-heat-marker{
  position:absolute; transform:translateX(-50%); pointer-events:none;
  /* default shape: ▲ up */
  width:0; height:0;
  border-left:6px solid transparent;
  border-right:6px solid transparent;
  border-bottom:8px solid var(--il-marker-ink);
}
.il-heat-marker.at-top   { top: calc(var(--il-bar-top) - var(--il-tri-h) - var(--il-gap-above)); }
.il-heat-marker.at-bottom{ top: calc(var(--il-bar-top) + var(--il-bar-h) + var(--il-gap-below)); }

/* Target color (in-range) */
.il-heat-marker[data-key="target"]{ border-bottom-color:var(--il-marker-ink); }



/* Let JS-controlled `left:` land exactly at the bar edge + --il-outside-offset */
.il-heat-marker[data-extend="right"]{
  top: calc(var(--il-bar-top) + (var(--il-bar-h) / 2)) !important;
  right:auto;                     /* don't override inline left */
  transform: translateY(-50%);    /* no extra horizontal gap */
  border:0; width:0; height:0;
  border-top:6px solid transparent;
  border-bottom:6px solid transparent;
  border-left:10px solid var(--il-marker-ink); /* ▶ */
}

.il-heat-marker[data-extend="left"]{
  top: calc(var(--il-bar-top) + (var(--il-bar-h) / 2)) !important;
  left:auto;                      /* keep inline left */
  transform: translateY(-50%);    /* no extra horizontal gap */
  border:0; width:0; height:0;
  border-top:6px solid transparent;
  border-bottom:6px solid transparent;
  border-right:10px solid var(--il-marker-ink); /* ◀ */
}



/* Labels */
.il-heat-label{
  position:absolute; transform:translate(-50%,0);
  font-size:12px; color:#111; pointer-events:none;
}
.il-heat-label.at-top   { top: calc(var(--il-bar-top) - var(--il-tri-h) - var(--il-gap-above) - 14px); transform:translate(-50%,-100%); }
.il-heat-label.at-bottom{ top: calc(var(--il-bar-top) + var(--il-bar-h) + var(--il-gap-below) + 14px); }
.il-heat .il-heat-label[data-key="target"][data-extend]{ display:none !important; }



/* Price bullseye line */
.il-price{
  position:absolute; transform:translateX(-50%);
  top: calc(var(--il-bar-top) - 8px);
  height: calc(var(--il-bar-h) + 16px);
  overflow:visible; pointer-events:none; z-index:3;
}
.il-price-line{
  position:absolute; left:50%; transform:translateX(-50%);
  top:0; bottom:0; width:6px; border-radius:3px;
  background:#22d3ee;
  box-shadow:0 0 0 2px #fff, 0 0 0 5px rgba(34,211,238,.25);
}
.il-price-ring{
  position:absolute; left:50%; top:50%;
  width:14px; height:14px; transform:translate(-50%,-50%);
  border:3px solid #22d3ee; border-radius:50%;
  background:#fff; box-shadow:0 0 0 2px #fff;
}

/* Tone helpers */
.il-tone-zero{
  position:absolute;
  top: calc(var(--il-bar-top) - 2px);
  height: calc(var(--il-bar-h) + 4px);
  width:1px; background:#0f172a22;
}
.il-tone-range{
  position:absolute; top:var(--il-bar-top); height:var(--il-bar-h);
  background: rgba(15,23,42,.12);
  border-radius:999px;
}
.il-heat-muted{ color:#64748b; font-style:italic; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .il-snap-backdrop, .il-snap-drawer{ transition:none; }
}





/* spacing between heading and icon */
.il-snap-body h4 .il-tip { margin-left: 2px; }

/* keep wrapper from stretching the line */
.il-tip { line-height: 1; color: inherit; }

/* tooltip text inside the drawer should not be bold */
.il-snap-drawer .il-tip-bubble { font-weight: 400; }




/* base icon look */
.il-help-ic {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  transform: translateY(3.5px);        /* nudge to visually center on your font */
  transition: transform .16s ease, color .16s ease, filter .16s ease;
}
.il-help-ic circle,
.il-help-ic path {
  transition: stroke-width .16s ease, transform .16s ease;
  transform-box: fill-box;
  transform-origin: center;
}

/* hover/focus effect (tint + slight pop) */
.il-tip:hover .il-help-ic,
.il-tip:focus-visible .il-help-ic {
  color: var(--il-help-accent);
  transform: translateY(3.5px) scale(1.08);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.12));
}
/* thicken ring + nudge dot */
.il-tip:hover .il-help-ic circle:first-of-type,
.il-tip:focus-visible .il-help-ic circle:first-of-type { stroke-width: 2.4; }
.il-tip:hover .il-help-ic circle:last-of-type,
.il-tip:focus-visible .il-help-ic circle:last-of-type { transform: scale(1.15); }

/* touch/click feedback */
.il-tip:active .il-help-ic { transform: translateY(3.5px) scale(1.04); }












/* Ideas Overlay — full CSS (two-row constraints, snapshot widths) */

/* keep same width as snapshot drawer */
#il-ideas-drawer.il-snap-drawer{
  width: var(--il-snap-width, 560px);
  max-width: min(var(--il-snap-width, 560px), 92vw);
}

.il-ideas-desc{ margin:.25rem 0 1rem; color:#475569; }

.il-ideas .button-row {
  margin-top: 16px;
}


/* Constraint rows rendered as compact folder cards */
.il-rows{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }

/* ===== Two-line grid for each constraint card =====
   Line 1: AssetType | Country | Count
   Line 2: BucketType | BucketName (spans) */
.il-row{
  position:relative;
  display:grid;
  align-items:center;
  gap:8px 6px;
  grid-template-columns: 1fr 1fr 72px 1fr;
  grid-template-areas:
    "asset country count ."
    "bucket name    name  name";
  padding:14px 12px 12px 52px;  /* room for legacy tab */
  border-radius:16px;
  border:1px solid #f1f5f9;
  background:linear-gradient(180deg,#fff7f1 0%, #ffffff 22%);
  box-shadow:0 1px 0 rgba(15,23,42,.04);
}

/* map controls to grid areas */
.il-row .asset-type   { grid-area: asset; }
.il-row .country      { grid-area: country; }
.il-row .row-count    { grid-area: count; }
.il-row .bucket-type  { grid-area: bucket; }
.il-row .bucket-name  { grid-area: name; }


/* inputs */
.il-row select,
.il-row input[type="number"]{
  width:100%; height:30px; padding:2px 8px;
  font-size:13px; border:1px solid #e5e7eb; border-radius:8px; background:#fff;
}
.il-row input[type="number"]{ text-align:center; }

/* Make constraint rows span full editor width */
#il-ideas-drawer .il-tabpane .il-row {
  width: 100%;
}

/* Row 2: benchmark select fills the row */
#il-ideas-drawer .il-row.il-row-2 .benchmark {
  width: 100%;
  flex: 1 1 100%;
  min-width: 0;
}

/* Row 3: STOCK – sector + industry share 50/50 */
#il-ideas-drawer .il-row.il-row-3.il-stock-only select.sector,
#il-ideas-drawer .il-row.il-row-3.il-stock-only select.industry {
  flex: 1 1 0;
  min-width: 0;
}

/* Row 3: ETF – category takes full width */
#il-ideas-drawer .il-row.il-row-3.il-etf-only select.etf_category {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}

.il-row-metrics {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;          /* soft pill bar */
  border: 1px solid #e5e7eb;    /* instead of dashed top */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;      /* or flex-start if you prefer */
  gap: 10px;
  font-size: 13px;
  color: #0f172a;
}

.bucket-metrics-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;        /* space between "Slice stats" and ? */
  margin-top: 0px;
}

.bucket-metrics-label .il-tip {
  position: relative;
  top: -4px;     
}



.il-row-metrics .bucket-stat {
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffffff;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.il-row-metrics .bucket-stat-label {
  font-weight: 500;
  color: #64748b;
}

.il-row-metrics .bucket-stat-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;             /* numbers feel more “hero” */
}



/* toolbar & buttons */
.il-btn{ background:#ff6d3a; color:#fff; border:0; border-radius:14px; padding:9px 14px; cursor:pointer; }
.il-btn.ghost{ background:transparent; color:#ff6d3a; border:2px solid #ff6d3a; }
.il-muted{ color:#64748b; }

/* result cards */
.il-cards{ display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); margin-top:14px; }
.il-card{ border:1px solid #e5e7eb; border-radius:14px; padding:12px; background:#fff; }
.il-card h5{ margin:0 0 .5rem; font-size:14px; color:#0f172a; }
.il-list{ display:grid; gap:8px; }
.il-item{ display:flex; align-items:baseline; gap:6px; }
.il-ticker{ font-weight:700; font-variant-numeric:tabular-nums; }
.il-sub{ color:#64748b; font-size:12px; }

/* errors & skeletons */
.il-err{
  color:#b91c1c; background:#fee2e2; border:1px solid #fecaca;
  border-radius:10px; padding:6px 8px; margin:.5rem 0; display:none;
}
.il-err.show{ display:block; }

.il-skel{
  height:10px; border-radius:6px;
  background:linear-gradient(90deg,#f1f5f9,#e2e8f0,#f1f5f9);
  background-size:200% 100%; animation:il-shim 1.2s infinite;
}
@keyframes il-shim { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.il-variants-title{ margin-top:18px; }
.il-card .il-skel + .il-skel{ margin-top:8px; }
.il-w-70{ width:70% } .il-w-45{ width:45% }
.il-w-60{ width:60% } .il-w-50{ width:50% }
.il-w-55{ width:55% } .il-w-40{ width:40% }
.il-w-68{ width:68% } .il-w-42{ width:42% }
.il-w-62{ width:62% } .il-w-58{ width:58% }

/* ---------- Tabs UI for Constraints ---------- */
.il-tabs { margin-top: 10px; }

.il-tabbar, .il-theme-tabbar{
  display:flex;
  flex-wrap: nowrap;          /* single line */
  gap:8px;
  overflow: hidden;           /* never scroll; force shrink */
  align-items: stretch;
}
.il-tabbar.right, .il-theme-tabbar.right{ justify-content:flex-start; }

.il-tab{
  position: relative;
  display: inline-flex;
  align-items: center;

  /* Shrinkable tabs: start at 100px, may shrink, never grow */
  flex: 0 1 100px;
  max-width: 100px;
  min-width: 44px;

  padding: 6px 28px 6px 10px;
  background: #ffd7c2;
  border: 1px solid #fec9b4;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15,23,42,.06) inset;
}

.il-tab:hover{ filter:brightness(0.98); }
.il-tab.active{ background:#fff7f1; border-color:#fec9b4; z-index:2; }

/* title with ellipsis */
.il-tab .tab-title{
  display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:100%; padding-right:4px;
}

/* close button pinned right, no circle */
.il-tab .tab-close{
  position: absolute !important;

  /* physical offsets */
  top: 6px !important;
  right: 6px !important;

  /* logical (optional) */
  inset-block-start: 6px;
  inset-inline-end: 6px;

  width: 18px !important;
  height: 18px !important;
  min-width: 0 !important;
  padding: 0 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;

  line-height: 1 !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  color: #fb923c !important;
  cursor: pointer !important;
  z-index: 3;
}
.il-tab .tab-close::before { content: "×"; }
.il-tab .tab-close:hover { color: #ff6d3a; }

/* hide legacy folder tab + X in editor when in tabs mode */
.tabs-mode #il-tabcontent .il-row::before,
.tabs-mode #il-tabcontent .row-close{ display:none !important; }

.tabs-mode #il-theme-tabcontent .il-row::before,
.tabs-mode #il-theme-tabcontent .row-close{ display:none !important; }

/* editor panel styling */
#il-tabcontent,#il-theme-tabcontent{
  border:1px solid #f1f5f9;
  border-radius:0 16px 16px 16px;
  background:linear-gradient(180deg,#fff7f1 0%, #ffffff 22%);
  padding:14px 12px;
  box-shadow:0 1px 0 rgba(15,23,42,.04);
}
/* remove left pad/border from row when inside tab content */
#il-tabcontent .il-row, #il-theme-tabcontent .il-row{ border:0; background:transparent; padding:0; }

/* Ideas overlay: card tints */
.il-card.idea-a{ background:#f0fdf4; border-color:#bbf7d0; }
.il-card.idea-b{ background:#eff6ff; border-color:#bfdbfe; }
.il-card.idea-a h5, .il-card.idea-b h5{ color:#0f172a; }

/* list items in result cards: proper ellipsis */
.il-card .il-list { min-width: 0; }
.il-card .il-item{ display:flex; align-items:baseline; gap:6px; width:100%; min-width:0; }
.il-card .il-ticker{ font-weight:700; font-variant-numeric:tabular-nums; flex:0 0 auto; }
.il-card .il-sub{
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;     /* allow wrapping */
  overflow: visible;       /* don’t hide */
  text-overflow: clip;     /* no ellipsis */
}


/* tooltips */
:root { --il-tip-max-w: 200px; }
:root { --il-tip-max-w-rank: 200px; }







/* Mobile: keep two-line layout; tighten spacing */
@media (max-width: 520px){
  .il-row{
    gap:6px 6px;
    padding-left:48px;
    grid-template-columns: 1fr 1fr 64px 1fr;
    grid-template-areas:
      "asset country count ."
      "bucket name    name  name";
  }
  .il-row select, .il-row input[type="number"]{ height:28px; font-size:12.5px; }
}

/* Mobile: drawer = full width (match snapshot) */
@media (max-width: 480px){
  #il-ideas-drawer.il-snap-drawer{
    width: 100%;
    max-width: none;
  }
}

/* purely optional */
.button.is-busy,
.transparent-orange.is-busy {
  pointer-events: none;
  opacity: .8;
}

/* tiny action buttons inside idea cards */
/* add to your CSS */
.il-mini-btn { min-height: 36px; padding: 8px 14px; display:inline-flex; align-items:center; gap:6px; }

.button.il-mini-btn,.transparent-orange.il-mini-btn{min-width:auto;}

/* ===== Ranking drawer CSS — override heights everywhere ===== */

/* drawer itself */
#idea-rank-drawer { 
  z-index: 5001;
}





/* match Ideas drawer width on desktop */
#idea-rank-drawer.il-snap-drawer {
  width: var(--il-snap-width, 560px);
  max-width: min(var(--il-snap-width, 560px), 92vw);
}

/* section look (same as ideas overlay) */
#ir-body .section {
  margin: 10px 12px 16px;
  padding: 12px;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  background: linear-gradient(180deg,#fff7f1 0%, #ffffff 22%);
  box-shadow: 0 1px 0 rgba(15,23,42,.04);
}
#ir-body .section h4 {
  margin: 0 0 8px;
  font-weight: 600;
}

/* chart box: force fixed height */
#ir-body .chart-box {
  width: 100%;
  max-width: 640px;
  height: 160px !important;
  min-height: 160px !important;
  margin: 0px auto;
}





/* mobile: drawer full width (height stays 220px) */
@media (max-width: 64em) {
  #idea-rank-drawer.il-snap-drawer {
    width: 100%;
    max-width: none;
  }
}

/* scroll lock while overlay active */
body.il-overlay-open {
  overflow: hidden;
  overscroll-behavior: none;
}

/* smaller canvas for ranking plots */
#ir-body .chart-box.chart-box--sm {
  max-width: 480px;     /* was 640px */
  height: 180px !important;
  min-height: 180px !important;
}

/* make Plotly itself follow that height */
#ir-body .chart-box.chart-box--sm .plot-container,
#ir-body .chart-box.chart-box--sm .svg-container {
      transform: scale(0.8);
  transform-origin: top center;
  margin: 0 auto;
}

/* keep the ranking drawer row tidy on tablet */
#idea-rank-drawer .settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
}






/* keep the "View as Bar Plot" row horizontal everywhere */
#ir-view-toggle-row .ir-view-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* label text shrinks if narrow */
#ir-view-toggle-row .ir-view-toggle-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* toggle stays tight on the right */
#ir-view-toggle-row .ir-view-toggle-wrap .toggle {
  flex: 0 0 auto;
}




/* make room at the bottom of each card */
.il-card {
  position: relative;
  padding-bottom: 56px;   /* room for the buttons */
}

/* pin the buttons to the bottom, full width, same level for all cards */
.il-card .il-actions {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}


/* ------------------------------------
   Admin Email page
   ------------------------------------ */
/* Admin email page overrides */
.settings-page.admin-email-page .settings-wrapper {
  max-width: 1000px;
}

/* make audience/subject/body actually wide */
.settings-page.admin-email-page .settings-row .input-wrapper {
  max-width: 720px;
  width: 100%;
}

/* force inputs to use that width */
.settings-page.admin-email-page .settings-row .input-wrapper .set-item,
.settings-page.admin-email-page .settings-row .input-wrapper select,
.settings-page.admin-email-page .settings-row .input-wrapper input[type="text"],
.settings-page.admin-email-page .settings-row .input-wrapper input[type="email"] {
  width: 100% !important;
  max-width: 720px !important;
}

/* textarea wider + taller */
.settings-page.admin-email-page .settings-row .input-wrapper textarea {
  width: 100% !important;
  max-width: 720px !important;
  min-height: 320px;
}

/* keep label width the same as settings page */
.settings-page.admin-email-page .settings-row label {
  width: 180px;
  padding-top: 6px;
}

/* give flashed message some breathing room */
.settings-page.admin-email-page .alert {
  margin-bottom: 18px;
}



.settings-page.admin-email-page .settings-row .input-wrapper input[type="text"],
.settings-page.admin-email-page .settings-row .input-wrapper input[type="email"],
.settings-page.admin-email-page .settings-row .input-wrapper textarea {
  text-align: left !important;
    line-height: 1.4;              /* nicer typing */
}


/* registration dictonary */
.rules-panel{
  border: 1px solid #fca5a5;       /* light red */
  background: #fef2f2;             /* very light red */
  border-radius: 12px;
  padding: 16px 18px 10px;
  margin-bottom: 18px;
}
.rules-panel h3{
  margin: 0 0 10px;
  font-size: 1rem;
  color: #b91c1c;
}
.rule-group{
  margin-bottom: 10px;
}
.rule-title{
  margin: 0 0 4px;
  font-weight: 600;
  color: #1f2937;
}
.rule-group ul{
  list-style: none;
  padding: 0;
  margin: 0;
}
.rule-group li{
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: .9rem;
  padding: 2px 0;
  color: #4b5563;
}
.rule-group li .icon{
  width: 18px;
  text-align: center;
  font-weight: 600;
}
.rule-ok{
  color: #166534; /* green text */
}
.rule-ok .icon{
  color: #16a34a;
}
.rule-bad .icon{
  color: #b91c1c;
}

/* ✅ when ALL rules are satisfied, add .all-good in JS */
.rules-panel.all-good {
  background: #ecfdf3;      /* soft green */
  border-color: #86efac;
}
.rules-panel.all-good h3 {
  color: #166534;
}


 .contact-message-row {
    margin-bottom: 0;   /* kill the big gap under the textarea row */
  }


  .il-card.idea-a h5 {
  color: #0f5a3a; /* dark green */
  font-weight: 700;
}

.il-card.idea-b h5 {
  color: #0f3e7a; /* dark blue */
  font-weight: 700;
}

.il-card.idea-a h5 span,
.il-card.idea-b h5 span {
  color: inherit;
}

.il-beta-row {
  display: flex;
  align-items: center;
  gap: 16px;            /* space between title and field */
  overflow: visible;    /* let the tooltip spill */
}

.il-beta-row h4 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;             /* space between text and ? icon */
  overflow: visible;
}

.il-beta-input {
  margin-left: auto;    /* push input to the right */
  flex: 0 0 auto;
}

.il-beta-input input {
  display: block;
}

.il-beta-row h4 .il-tip {
  position: relative;
  top: -3px; /* try -3px or -4px if you want more */
}

.idea-title,
.portfolio-title{
  display: flex;
  align-items: center;
  gap: 0.5rem;          /* space between text and actions */
  margin: 0;
}

.idea-title .title-text,
.portfolio-title .title-text
  {
  display: inline-flex;
  align-items: center;
}

.idea-title .title-actions,
.portfolio-title .title-actions {
  display: inline-flex;
  align-items: center;
  gap: 0rem;
  transform: translateY(-3px);
}

.idea-title .title-actions a,
.portfolio-title .title-actions a {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 0.9rem;
  color: inherit;
}

.idea-title .title-actions a:hover,
.portfolio-title .title-actions a:hover {
  background: rgba(15, 23, 42, 0.06);
}

/* Reuse the circle icon look for action icons in tables */
.portfolio-table td.action-icons,
.asset-table td.action-icons {
  text-align: center;
}

/* shared pill + hover for ALL icons */
.portfolio-table td.action-icons a,
.asset-table td.action-icons a {
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 0.9rem;
  color: inherit;
  transition: background-color .16s ease, transform .06s ease;
  transform: translateY(-2px);  /* pull all icons up a bit */
}

.portfolio-table td.action-icons a:hover,
.asset-table td.action-icons a:hover {
  background: rgba(15, 23, 42, 0.06);
}







/* or, if the table itself has a top margin, nudge it up */
.table-wrapper,
.portfolio-table,
.asset-table {
  margin-top: 0.6rem;     /* or 0 */
}


.il-earn-inline {
  display: flex;
  gap: .35rem;
  margin-top: .5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.il-earn-label {
  display: block;              /* behave like the other titles */
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.2;
  color: #0f172a;              /* same ink */
  letter-spacing: -.01em;
}



.il-earn-val {
  margin-left: auto;           /* push to the right */
  margin-top: 3px;             /* drop it slightly */
  display: inline-flex;
  gap: .35rem;
  flex-wrap: wrap;
  font-size: .78rem;
}

.il-earn-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  white-space: nowrap;
}

.il-earn-badge.up { color: #166534; }
.il-earn-badge.dn { color: #b91c1c; }

.il-earn-arrow {
  font-size: .72rem;
  line-height: 1;
}

.il-earn-count {
  font-weight: 600;
  line-height: 1;
}

.il-earn-pct {
  opacity: .85;
}

.il-snap-earn .il-tip {
  position: relative;
  top: -3px;
}

#idea-rank-drawer {
    display: flex !important;
    flex-direction: column !important;
}



.action-icons a.icon-share {
  color: #777;          /* grey */
}

.action-icons a.icon-share svg {
  width: 22px;          /* slightly bigger */
  height: 22px;
  vertical-align: middle;
}


/* Share Idea dialog: tighten layout, label above input */
.confirm-box.share-idea-box {
  max-width: 420px;        /* was wider; shrink for desktop */
  width: 90%;
}

/* Stack label and input vertically just in this dialog */
.share-idea-box .settings-row {
  display: block;
  margin-bottom: 0.75rem;
}

.share-idea-box .settings-row label {
  display: block;
  margin-bottom: 0.25rem;
}

.share-idea-box .settings-row .input-wrapper {
  width: 100%;
}

.share-idea-box input[type="text"],
.share-idea-box input[type="email"],
.share-idea-box input[type="password"],
.share-idea-box select {
  width: 100%;
  box-sizing: border-box;
}

/* Fix label + star alignment only inside Share Idea box */
.share-idea-box .settings-row label {
  display: flex;              /* text + star on one line */
  align-items: center;
  gap: 0.25rem;               /* small space between text and * */
  margin-bottom: 0.25rem;
}

/* Make sure the star sits next to the text, not on the far right */
.share-idea-box .settings-row label .required {
  margin-left: 0;             /* override any margin-left:auto etc. */
}

  .status-pill {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.85em;
    text-transform: lowercase;
  }
  .status-pending {
    background: rgba(234, 179, 8, 0.08);   /* soft yellow bg */
    color: #a16207;                         /* amber-700 */
  }
  .status-good {
    background: rgba(22, 163, 74, 0.08);    /* soft green bg */
    color: #15803d;                         /* green-700 */
  }
  .status-bad {
    background: rgba(220, 38, 38, 0.08);    /* soft red bg */
    color: #b91c1c;                         /* red-700 */
  }

/* Make all columns in invitations table use minimal width */
.portfolio-table.invitations {
  table-layout: auto;          /* default, but be explicit */
}

.portfolio-table.invitations td.inv_type .tooltip-inv-email .tooltip-text {
  right: -50px;      /* move bubble 8px to the right; tweak as needed */
}


/* Multi-mode pill toggle for idea modes */
.il-mode-switch {
  --il-mode-count: 3;      /* JS overwrites */
  --il-mode-active: 0;     /* JS overwrites */

  position: relative;
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  margin: 0 0 1rem 0;
  border-radius: 999px;
  background: #ffe1cf;          /* light orange track */
  gap: 0;
}

/* sliding thumb */
.il-mode-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px) / var(--il-mode-count));
  border-radius: 999px;
  background: #ff7c48;          /* InvestLens orange */
  transform: translateX(calc(var(--il-mode-active) * 100%));
  transition: transform 0.18s ease;
}

/* each mode “segment” */
button.il-mode-btn {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  color: #1f2933;
  white-space: nowrap;
  min-width: auto;  
}

/* active text sits on the orange thumb */
.il-mode-btn.is-active {
  color: #ffffff;
}

/* focus outline for keyboard users */
.il-mode-btn:focus-visible {
  outline: 2px solid #ff7c48;
  outline-offset: 2px;
}

.il-theme-desc {
  margin: 4px 2px 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12.5px;
  color: #0f172a;
  display: flex;
  gap: 6px;
  line-height: 1.4;
}

.il-theme-desc-label {
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.il-theme-desc-text {
  flex: 1 1 auto;
  min-width: 0;
}

/* When showing N/A, make it look intentionally muted */
.il-theme-desc.is-empty .il-theme-desc-text {
  color: #94a3b8;
  font-style: italic;
}


.deleted-label {
  color: #94a3b8;
  cursor: default;
}

.inv-action-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  text-align: center;
}

.opt-portfolio-title {
  display: inline-block;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 999px;              /* full pill */
  background-color: #e7f0ff;         /* soft blue background */
  color: #2D7FF9;                    /* InvestLens blue text */
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.2;
  border: 1px solid #c2d7ff;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.opt-portfolio-title:hover {
  background-color: #2D7FF9;
  color: #ffffff;
  border-color: #2D7FF9;
  text-decoration: none;
  box-shadow: 0 0 0 2px rgba(45, 127, 249, 0.18);
}


