/* Concentus Adviser — Base: CSS variables, typography, reset, dark mode */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;600;700&family=Noto+Serif:wght@400;700&display=swap');


  :root {
    --navy: #00247f;
    --navy-mid: #1a3a8f;
    --blue: #3185fc;
    --gold: #db9523;
    --gold-light: #e8b050;
    --gray-blue: #c8cddb;
    --taupe: #e2e2d9;
    --alert-red: #b34040;
    --alert-amber: #c97b2a;
    --green: #2e7d4f;
    --text-dark: #1a1a2e;
    --text-mid: #4a4a6a;
    --text-light: #8a8aaa;
    --border: rgba(0,36,127,0.1);
    --shadow: 0 2px 16px rgba(0,36,127,0.07);
    --shadow-lg: 0 8px 40px rgba(0,36,127,0.13);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: 'Noto Sans', sans-serif;
    background: #f4f5f8;
    color: var(--text-dark);
    min-height: 100vh;
  }

  /* ANNOUNCEMENT BANNER */
  .announcement-banner {
    background: var(--navy);
    color: white;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    letter-spacing: 0.01em;
  }
  .announcement-banner .tag {
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .announcement-banner .message { flex: 1; opacity: 0.92; }
  .announcement-banner .message strong { color: var(--gold-light); }
  .announcement-banner .nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    font-size: 12px;
  }
  .announcement-banner .nav-right a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 0.2s;
  }
  .announcement-banner .nav-right a:hover { color: white; }

  /* HEADER */
  /* Header base — two-row dark shell; full styles in styles--components.css */
  header {
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .logo-text {
    font-family: 'Noto Serif', serif;
    font-size: 15px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.01em;
    line-height: 1.1;
  }
  .logo-text span {
    display: block;
    font-family: 'Noto Sans', sans-serif;
    font-size: 9px;
    font-weight: 400;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 1px;
  }

  /* SEARCH + APP LAUNCHER BAR */
  .search-section {
    background: var(--navy);
    padding: 12px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .search-group {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0;
  }
  /* CUSTOM ENGINE PICKER */
  .engine-picker {
    position: relative;
    flex-shrink: 0;
  }
  .engine-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 28px 9px 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: white;
    font-size: 13px;
    font-family: 'Noto Sans', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    min-width: 148px;
    position: relative;
  }
  .engine-btn::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255,255,255,0.6);
  }
  .engine-logo {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    flex-shrink: 0;
  }
  .engine-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 200;
    min-width: 170px;
  }
  .engine-picker.open .engine-dropdown { display: block; }
  .engine-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Noto Sans', sans-serif;
    color: var(--text-dark);
    transition: background 0.1s;
    white-space: nowrap;
  }
  .engine-option:hover { background: #f0f2f8; }
  .engine-option.selected { background: #e8edf8; font-weight: 600; color: var(--navy); }
  .search-input {
    flex: 1;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-left: none;
    border-right: none;
    color: white;
    padding: 9px 16px;
    font-size: 14px;
    font-family: 'Noto Sans', sans-serif;
    outline: none;
  }
  .search-input::placeholder { color: rgba(255,255,255,0.4); }
  .search-btn {
    background: var(--gold);
    border: none;
    color: white;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Noto Sans', sans-serif;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    transition: background 0.2s;
    flex-shrink: 0;
  }
  .search-btn:hover { background: var(--gold-light); }

  /* APP CENTER BUTTON + DROPDOWN */
  .ac-wrap { position: relative; flex-shrink: 0; }
  .ac-btn {
    display: flex; align-items: center; gap: 7px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px; color: white;
    font-size: 12.5px; font-family: 'Noto Sans', sans-serif;
    font-weight: 500; cursor: pointer; white-space: nowrap;
    transition: background 0.15s;
  }
  .ac-btn:hover { background: rgba(255,255,255,0.2); }
  .ac-dropdown {
    display: none; position: absolute;
    top: calc(100% + 8px); right: 0;
    background: white; border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0,36,127,0.15);
    z-index: 500; width: 220px; padding: 6px 0;
  }
  .ac-wrap.open .ac-dropdown { display: block; }
  .ac-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 14px; font-size: 13px;
    color: var(--text-dark); text-decoration: none;
    transition: background 0.1s;
  }
  .ac-item:hover { background: #f0f4ff; color: var(--navy); }
  .ac-item-logo {
    width: 22px; height: 22px; border-radius: 5px;
    flex-shrink: 0; overflow: hidden;
  }
  .ac-item-logo svg { width: 22px; height: 22px; }
  body.dark .ac-dropdown { background: #1e2a52; border-color: rgba(255,255,255,0.1); }
  body.dark .ac-item { color: #c8d3f0; }
  body.dark .ac-item:hover { background: #243060; color: white; }

  /* APP LAUNCHER IN SEARCH BAR */
  .app-bar-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
  }
  .app-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .app-bar-tile {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px 6px 7px;
    border-radius: 8px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.15);
    text-decoration: none;
    color: white;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    position: relative;
  }
  .app-bar-tile:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.3);
  }
  .app-bar-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
  }
  .app-bar-logo svg, .app-bar-logo-svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 4px;
  }
  .app-bar-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--alert-red);
    color: white;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    min-width: 14px;
    text-align: center;
    line-height: 1.4;
  }

  .ticker-up   { color: #4ade80; }
  .ticker-down { color: #f87171; }
  .ticker-flat { color: rgba(255,255,255,0.4); }

  /* DARK MODE */
  body.dark {
    --navy: #4a8af4;
    --blue: #6aa9ff;
    --gold: #e8b050;
    --gold-light: #f0c87a;
    --border: rgba(255,255,255,0.1);
    --shadow: 0 2px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
    --text-dark: #e8eaf0;
    --text-mid: #9aa0b8;
    --text-light: #6a7090;
    background: #0f1322;
    color: #e8eaf0;
  }
  body.dark .card { background: #151c38; border-color: rgba(255,255,255,0.08); }
  body.dark .card-header { background: linear-gradient(135deg, #1e2a52 0%, #192244 100%); border-bottom-color: rgba(255,255,255,0.08); }
  body.dark .card-body { background: #151c38; }
  body.dark .mm-table thead tr,
  body.dark .pw-table thead tr,
  body.dark .pipeline-table thead tr { background: #1e2a52; }
  body.dark .mm-table tbody tr:hover,
  body.dark .pw-table tbody tr:hover,
  body.dark .pipeline-table tbody tr:hover { background: #1a2444; }
  body.dark .mm-stat,
  body.dark .link-chip,
  body.dark .pw-summary { background: #1e2a52; border-color: rgba(255,255,255,0.08); }
  body.dark .link-chip { color: #c8d3f0; }
  body.dark .link-chip:hover { background: #243060; border-color: var(--blue); }
  body.dark .search-section { background: #080f2e; }
  body.dark .pipeline-tabs { background: #1a2244; }
  body.dark .pipeline-tab { color: #9aa0b8; }
  body.dark .pp-cta { background: linear-gradient(135deg, #101830 0%, #1a2444 100%); }
  body.dark .aum-body { background: #151c38; }
  body.dark .date-badge { background: #1e2a52; color: #c8d3f0; }
  body.dark .date-badge.today { background: var(--navy); }
  body.dark .announcement-banner { background: #080f2e; }
  body.dark .footer { color: #6a7090; border-top-color: rgba(255,255,255,0.08); }
  body.dark .adviser-filter { background: #151c38; border-bottom-color: rgba(255,255,255,0.08); }
  body.dark .tasks-card .card-body { background: #151c38; }
  body.dark .task-item { border-bottom-color: rgba(255,255,255,0.07); }
  body.dark .engine-btn { background: rgba(255,255,255,0.08); }
  body.dark .mm-table td, body.dark .pw-table td { color: #c8d3f0; }

  /* DARK MODE TOGGLE */
  .dark-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    font-family: 'Noto Sans', sans-serif;
    font-size: 12px;
    color: var(--text-mid);
    transition: all 0.2s;
  }
  .dark-toggle:hover { background: #f0f4ff; border-color: var(--blue); color: var(--navy); }
  body.dark .dark-toggle { color: #9aa0b8; border-color: rgba(255,255,255,0.15); }
  body.dark .dark-toggle:hover { background: #1e2a52; color: white; }
  .dark-toggle-track {
    width: 28px; height: 16px;
    background: #d0d4e0;
    border-radius: 8px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
  }
  body.dark .dark-toggle-track { background: var(--navy); }
  .dark-toggle-thumb {
    width: 12px; height: 12px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px; left: 2px;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  }
  body.dark .dark-toggle-thumb { left: 14px; }

  /* QUICK LINKS BUTTON + DROPDOWN */
  .ql-wrap { position: relative; flex-shrink: 0; }
  .ql-btn {
    display: flex; align-items: center; gap: 7px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px; color: white;
    font-size: 12.5px; font-family: 'Noto Sans', sans-serif;
    font-weight: 500; cursor: pointer; white-space: nowrap;
    transition: background 0.15s;
  }
  .ql-btn:hover { background: rgba(255,255,255,0.2); }
  .ql-dropdown {
    display: none; position: absolute;
    top: calc(100% + 8px); right: 0;
    background: white; border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0,36,127,0.15);
    z-index: 500; width: 240px; padding: 6px 0;
  }
  .ql-wrap.open .ql-dropdown { display: block; }
  .ql-section-label {
    font-size: 9.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-light); padding: 7px 14px 3px;
  }
  .ql-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px; font-size: 13px;
    color: var(--text-dark); text-decoration: none;
    transition: background 0.1s;
  }
  .ql-item:hover { background: #f0f4ff; color: var(--navy); }
  .ql-item svg { flex-shrink: 0; opacity: 0.65; }
  .ql-item:hover svg { opacity: 1; }
  .ql-sep { height: 1px; background: var(--border); margin: 5px 0; }
  body.dark .ql-dropdown { background: #1e2a52; border-color: rgba(255,255,255,0.1); }
  body.dark .ql-item { color: #c8d3f0; }
  body.dark .ql-item:hover { background: #243060; color: white; }


/* ── SHARED KEYFRAMES (used by signin pages and dashboard) ── */
@keyframes pg { 0%,100%{box-shadow:0 0 0 2px rgba(76,175,125,0.2);}50%{box-shadow:0 0 0 4px rgba(76,175,125,0.06);} }
@keyframes py { 0%,100%{box-shadow:0 0 0 2px rgba(232,176,80,0.25);}50%{box-shadow:0 0 0 4px rgba(232,176,80,0.07);} }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn { from { transform:scale(0.6); opacity:0; } to { transform:scale(1); opacity:1; } }
