/* =========================
   Investor Dark Theme
   ========================= */

:root{
  /* Brand */
  --inv-banner: #3F5A45;          /* deep green banner */
  --inv-banner-2: #2F4335;        /* darker gradient base */
  --inv-gold: #D4AF37;            /* brand gold */

  /* Core */
  --inv-bg: #0B1010;              /* app background */
  --inv-bg2:#0F1516;              /* subtle variation */
  --inv-panel:#121A1C;            /* card surface */
  --inv-panel2:#0F1718;           /* nested surface */
  --inv-text:#E8EEF0;             /* primary text */
  --inv-muted:#A9B6BA;            /* muted text */
  --inv-border: rgba(255,255,255,0.10);

  /* States */
  --inv-shadow: 0 12px 30px rgba(0,0,0,0.45);
  --inv-shadow2: 0 16px 40px rgba(0,0,0,0.55);
  --inv-focus: 0 0 0 3px rgba(212,175,55,0.25);

  /* Pills */
  --inv-pill-bg: rgba(255,255,255,0.04);
  --inv-pill-border: rgba(255,255,255,0.10);

  /* Success */
  --inv-success: #2F8F5B;
  --inv-success-bg: rgba(47,143,91,0.18);
}

/* Override body background for investor view */
body:has(.inv-shell){
  background: var(--inv-bg) !important;
}

/* Page shell */
.inv-shell{
  background: radial-gradient(1200px 600px at 20% 0%, rgba(63,90,69,0.18), transparent 60%),
              radial-gradient(900px 500px at 90% 10%, rgba(212,175,55,0.08), transparent 55%),
              linear-gradient(180deg, var(--inv-bg2), var(--inv-bg));
  color: var(--inv-text);
  min-height: 100vh;
}

/* Top banner - Glassmorphism Style */
.inv-navbar{
  background: linear-gradient(180deg, rgba(63,90,69,0.40), rgba(15,22,23,0.65));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  position: relative;
}

.inv-navbar::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-1px;
  height:2px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.55), transparent);
  opacity: 0.7;
}

.inv-navbar a,
.inv-navbar .nav-link{
  color: rgba(255,255,255,0.88);
  text-decoration: none;
}

.inv-navbar a:hover,
.inv-navbar .nav-link:hover{
  color: #ffffff;
}

.inv-navbar .brand-sub{
  color: rgba(255,255,255,0.70);
}

.inv-navbar .brand-accent{
  color: var(--inv-gold);
}

/* Headings */
.inv-h1, .inv-h2, .inv-h3{
  color: var(--inv-text);
}

.inv-muted{
  color: var(--inv-muted);
}

/* Cards / panels */
.inv-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 40%), var(--inv-panel);
  border: 1px solid var(--inv-border);
  border-radius: 16px;
  box-shadow: var(--inv-shadow);
}

.inv-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--inv-shadow2);
  border-color: rgba(212,175,55,0.18);
  transition: 180ms ease;
}

.inv-card-static{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 55%), var(--inv-panel);
  border: 1px solid var(--inv-border);
  border-radius: 16px;
  box-shadow: var(--inv-shadow);
}

/* Buttons */
.inv-btn{
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 160ms ease;
}

.inv-btn-primary{
  background: var(--inv-gold);
  color: #101214;
  border-color: rgba(0,0,0,0.15);
}

.inv-btn-primary:hover{
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.inv-btn-secondary{
  background: rgba(255,255,255,0.04);
  color: var(--inv-text);
  border-color: var(--inv-border);
}

.inv-btn-secondary:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.16);
}

.inv-btn-ghost{
  background: transparent;
  color: var(--inv-muted);
  border-color: transparent;
}

.inv-btn-ghost:hover{
  color: var(--inv-text);
  background: rgba(255,255,255,0.04);
}

/* Pills / tags */
.inv-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--inv-pill-bg);
  border: 1px solid var(--inv-pill-border);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 600;
}

/* Status badge */
.inv-status{
  background: var(--inv-success-bg);
  border: 1px solid rgba(47,143,91,0.35);
  color: #BFF2D6;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

/* Inputs / selects */
.inv-input, .inv-select{
  background: rgba(255,255,255,0.04);
  color: var(--inv-text);
  border: 1px solid var(--inv-border);
  border-radius: 12px;
  padding: 10px 12px;
}

.inv-input:focus, .inv-select:focus{
  outline: none;
  box-shadow: var(--inv-focus);
  border-color: rgba(212,175,55,0.35);
}

/* Links */
.inv-link{
  color: rgba(212,175,55,0.95);
  text-decoration: none;
}
.inv-link:hover{
  color: #ffd76a;
  text-decoration: underline;
}

/* Table styling for deal detail pages */
.inv-shell table,
.inv-card-static table{
  color: var(--inv-text);
}

.inv-shell table td,
.inv-card-static table td{
  color: var(--inv-text);
}

.inv-shell table strong,
.inv-card-static table strong{
  color: var(--inv-text);
  font-weight: 600;
}

/* Paragraph text in cards */
.inv-card-static p,
.inv-shell .inv-card-static p{
  color: var(--inv-text);
}

/* Tab navigation for investor view */
.inv-shell .tab-nav{
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  padding: 0.5rem;
  margin-bottom: 1.5rem;
}

.inv-shell .tab-button{
  background: transparent;
  color: var(--inv-muted);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.inv-shell .tab-button.active{
  background: rgba(212,175,55,0.15);
  color: var(--inv-gold);
  font-weight: 600;
}

.inv-shell .tab-button:hover{
  background: rgba(255,255,255,0.05);
  color: var(--inv-text);
}

/* Ensure all text in inv-shell is readable */
.inv-shell{
  color: var(--inv-text);
}

.inv-shell strong{
  color: var(--inv-text);
}

/* Deal detail specific overrides */
.inv-shell .deal-tabs{
  background: transparent;
}

.inv-shell .tab-content{
  color: var(--inv-text);
}

/* Header actions styling */
.inv-shell .header-actions{
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Ensure h1 is visible */
.inv-h1{
  color: var(--inv-text);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Deal overview grid styling */
.inv-shell .card h3{
  color: var(--inv-text);
}

/* Override any hardcoded dark colors */
.inv-shell .card p{
  color: var(--inv-text);
}

/* Tab content background */
.inv-shell .tab-content.active{
  display: block;
}

/* Footer styling to match header */
body:has(.inv-shell) footer{
  background: linear-gradient(180deg, var(--inv-banner), var(--inv-banner-2));
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Deal list card overrides - remove white backgrounds */
.inv-shell .deal-card.compact{
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 40%), var(--inv-panel);
  border: 1px solid var(--inv-border);
  box-shadow: var(--inv-shadow);
}

.inv-shell .deal-card.compact:hover{
  transform: translateY(-2px);
  box-shadow: var(--inv-shadow2);
  border-color: rgba(212,175,55,0.18);
}

.inv-shell .deal-card.compact h3{
  color: var(--inv-text);
}

/* Deal room document table styling */
.inv-shell table,
.inv-card-static table{
  border: 1px solid var(--inv-border) !important;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}

.inv-shell table thead tr,
.inv-card-static table thead tr{
  background: linear-gradient(180deg, rgba(63,90,69,0.25), rgba(63,90,69,0.15)) !important;
  border-bottom: 1px solid rgba(212,175,55,0.25) !important;
}

.inv-shell table thead th,
.inv-card-static table thead th{
  padding: 1rem 0.75rem !important;
  text-align: left !important;
  color: var(--inv-gold) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(212,175,55,0.3) !important;
}

.inv-shell table tbody tr,
.inv-card-static table tbody tr{
  border-bottom: 1px solid var(--inv-border) !important;
  transition: background 0.2s ease;
}

.inv-shell table tbody tr:hover,
.inv-card-static table tbody tr:hover{
  background: rgba(255,255,255,0.03);
}

.inv-shell table tbody tr:last-child,
.inv-card-static table tbody tr:last-child{
  border-bottom: none !important;
}

.inv-shell table tbody td,
.inv-card-static table tbody td{
  padding: 0.875rem 0.75rem !important;
  color: var(--inv-text) !important;
  vertical-align: middle;
}

.inv-shell table tbody td a.btn,
.inv-card-static table tbody td a.btn{
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.04);
  color: var(--inv-text);
  border: 1px solid var(--inv-border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
}

.inv-shell table tbody td a.btn:hover,
.inv-card-static table tbody td a.btn:hover{
  background: rgba(212,175,55,0.15);
  border-color: rgba(212,175,55,0.3);
  color: var(--inv-gold);
  transform: translateY(-1px);
}

/* Deal room folder items */
.inv-shell .folder-item,
.inv-card-static .folder-item{
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--inv-border);
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

.inv-shell .folder-item:hover,
.inv-card-static .folder-item:hover{
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(212,175,55,0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.inv-shell .folder-item h4,
.inv-card-static .folder-item h4{
  color: var(--inv-text) !important;
}

.inv-shell .folder-item small,
.inv-card-static .folder-item small{
  color: var(--inv-muted) !important;
}

/* Gabe Chat Styling */
.inv-shell #chat-messages,
.inv-card-static #chat-messages{
  background: rgba(255,255,255,0.02) !important;
  border: 1px solid var(--inv-border);
}

.inv-shell .chat-welcome,
.inv-card-static .chat-welcome{
  color: var(--inv-text) !important;
}

.inv-shell .chat-welcome p,
.inv-card-static .chat-welcome p{
  color: var(--inv-text) !important;
}

.inv-shell .chat-welcome strong,
.inv-card-static .chat-welcome strong{
  color: var(--inv-gold);
}

.inv-shell .chat-welcome li,
.inv-card-static .chat-welcome li{
  color: var(--inv-muted);
}

/* Chat messages */
.inv-shell .user-message{
  background: rgba(212,175,55,0.12) !important;
  border: 1px solid rgba(212,175,55,0.25);
  color: var(--inv-text) !important;
  padding: 1rem;
  border-radius: 12px;
  margin-left: 20%;
}

.inv-shell .ai-message{
  background: rgba(63,90,69,0.15) !important;
  border: 1px solid rgba(63,90,69,0.3);
  color: var(--inv-text) !important;
  padding: 1rem;
  border-radius: 12px;
  margin-right: 20%;
}

.inv-shell .ai-message p,
.inv-shell .user-message p{
  color: var(--inv-text) !important;
  margin: 0;
}

/* Recommended questions dropdown */
.inv-shell #recommended-questions-toggle{
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--inv-border) !important;
  color: var(--inv-text) !important;
}

.inv-shell #recommended-questions-toggle:hover{
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(212,175,55,0.25) !important;
}

.inv-shell #recommended-questions-list{
  background: var(--inv-panel) !important;
  border: 1px solid var(--inv-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
}

.inv-shell .recommended-question{
  color: var(--inv-text) !important;
  padding: 0.875rem 1rem !important;
  border-bottom: 1px solid var(--inv-border) !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.inv-shell .recommended-question:hover{
  background: rgba(212,175,55,0.08) !important;
  color: var(--inv-gold) !important;
}

.inv-shell .recommended-question:last-child{
  border-bottom: none !important;
}

/* Chat input */
.inv-shell #chat-input{
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--inv-border) !important;
  color: var(--inv-text) !important;
  border-radius: 12px;
  padding: 0.875rem 1rem;
}

.inv-shell #chat-input:focus{
  outline: none;
  box-shadow: var(--inv-focus);
  border-color: rgba(212,175,55,0.35);
}

.inv-shell #chat-input::placeholder{
  color: var(--inv-muted);
}

/* Send button */
.inv-shell #chat-send-btn{
  background: var(--inv-gold) !important;
  color: #101214 !important;
  border: none !important;
  border-radius: 12px;
  padding: 0.875rem 2rem;
  font-weight: 600;
}

.inv-shell #chat-send-btn:hover{
  filter: brightness(1.1);
  transform: translateY(-1px);
}
