/* Concentus Adviser — Components: header, nav, card-specific styles, panels */

  .pipeline-tab {
    padding: 10px 18px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
    user-select: none;
  }
  .pipeline-tab.active {
    color: var(--navy);
    border-bottom-color: var(--blue);
  }
  .pipeline-tab:hover:not(.active) { color: var(--navy); }

  .pipeline-pane { display: none; }
  .pipeline-pane.active { display: block; }

  .pipeline-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
  }
  .pipeline-table thead tr {
    background: #f4f5f8;
    border-bottom: 1px solid var(--border);
  }
  .pipeline-table th {
    padding: 9px 14px;
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-mid);
  }
  .pipeline-table th:last-child { text-align: right; }
  .pipeline-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
  }
  .pipeline-table tbody tr:last-child { border-bottom: none; }
  .pipeline-table tbody tr:hover { background: #f9f9fb; }
  .pipeline-table td {
    padding: 11px 14px;
    color: var(--text-dark);
    vertical-align: middle;
  }
  .pipeline-table td:last-child { text-align: right; }
  .hh-name { font-weight: 600; color: var(--navy); }
  .hh-sub { font-size: 11px; color: var(--text-light); margin-top: 1px; }
  .aum-val { font-weight: 600; font-family: 'Noto Serif', serif; font-size: 13px; color: var(--text-dark); }
  .fee-val { font-weight: 600; color: var(--navy); font-size: 12.5px; }

  /* Status badges */
  .status-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
  }
  .s-initial { background: #e8edf8; color: var(--navy); }
  .s-proposal { background: #fff3db; color: #8a5a00; }
  .s-negotiation { background: #fff8e0; color: #7a4f00; }
  .s-committed { background: #e0f0e8; color: #1a5c36; }
  .s-docs { background: #e8f2ff; color: #1a4fa0; }
  .s-funding { background: #fde8c0; color: #8a4400; }
  .s-review { background: #ede8f8; color: #4a2a8a; }
  .s-active { background: #d6f0e0; color: #155a30; }

  .pipeline-summary {
    display: flex;
    gap: 24px;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    background: #f9f9fb;
  }
  .ps-stat .ps-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-light); }
  .ps-stat .ps-val { font-size: 15px; font-weight: 700; font-family: 'Noto Serif', serif; color: var(--navy); margin-top: 1px; }
  .ps-stat .ps-val.accent { color: var(--blue); }
  .ps-divider { width: 1px; background: var(--border); align-self: stretch; }

  /* BIRTHDAYS / ANNIVERSARIES TABS */
  .bday-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: #f9f9fb;
  }
  .bday-tab {
    padding: 7px 16px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
  }
  .bday-tab.active { color: var(--navy); border-bottom-color: var(--navy); }
  .bday-tab:hover:not(.active) { color: var(--navy); background: #f0f2f8; }
  .bday-pane { display: none; }
  .bday-pane.active { display: block; }
  body.dark .bday-tabs { background: #1a2244; }

  .date-list { list-style: none; }
  .date-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .date-item:last-child { border-bottom: none; }
  .date-badge { width: 38px; flex-shrink: 0; text-align: center; }
  .date-badge .month {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    line-height: 1;
  }
  .date-badge .day {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Noto Serif', serif;
    color: var(--navy);
    line-height: 1.1;
  }
  .date-badge.today .day { color: var(--gold); }
  .date-info .label { font-size: 13px; font-weight: 500; color: var(--text-dark); }
  .date-info .sub { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }
  .event-type {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 6px;
  }
  .type-review { background: #e8edf8; color: var(--navy); }
  .type-deadline { background: #fce8e8; color: var(--alert-red); }
  .type-meeting { background: #e0f0e8; color: #1a5c36; }

  /* BIRTHDAY ITEMS */
  .bday-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
  }
  .bday-item:last-child { border-bottom: none; }
  .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    color: white;
  }
  .av-1 { background: linear-gradient(135deg, var(--navy), var(--blue)); }
  .av-2 { background: linear-gradient(135deg, #6a4fa5, #8b6fba); }
  .av-3 { background: linear-gradient(135deg, var(--gold), var(--gold-light)); }
  .av-4 { background: linear-gradient(135deg, #2e7d4f, #4fa56a); }
  .av-5 { background: linear-gradient(135deg, #a54f6f, #ba6f8b); }
  .bday-info { flex: 1; }
  .bday-name { font-size: 13px; font-weight: 500; }
  .bday-detail { font-size: 11.5px; color: var(--text-light); }
  .bday-when { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; }
  .bday-today { background: #fff3db; color: #8a5a00; }
  .bday-soon { background: #e8edf8; color: var(--navy); }
  /* ── IMPORTANT DATES — unified item + type badges ─────── */
  .idate-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid var(--border);
  }
  .idate-item:last-child { border-bottom: none; }
  .idate-info { flex: 1; min-width: 0; }
  .idate-name {
    font-size: 12.5px; font-weight: 600; color: var(--text-dark);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .idate-role { font-size: 10.5px; color: var(--text-light); font-weight: 400; }
  .idate-sub  { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 11.5px; color: var(--text-mid); }
  .idate-badge {
    display: inline-flex; align-items: center;
    padding: 1px 6px; border-radius: 4px;
    font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    white-space: nowrap; flex-shrink: 0;
  }
  .badge-bday     { background: rgba(219,149,35,0.12); color: #a07010; }
  .badge-client   { background: rgba(0,36,127,0.09);   color: var(--navy); }
  .badge-wedding  { background: rgba(180,80,160,0.1);  color: #8b3a8b; }
  .badge-milestone{ background: rgba(46,125,79,0.1);   color: var(--green); }
  body.dark .idate-name { color: #c8d3f0; }
  body.dark .idate-sub  { color: #8a9ac8; }
  body.dark .idate-item { border-color: rgba(255,255,255,0.07); }


  /* INSUFFICIENT FUNDS */
  .alert-item { padding: 11px 0; border-bottom: 1px solid var(--border); }
  .alert-item:last-child { border-bottom: none; }
  .alert-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
  .alert-client { font-size: 13px; font-weight: 600; color: var(--text-dark); }
  .alert-account { font-size: 11px; color: var(--text-light); margin-top: 1px; }
  .severity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
  .sev-high { background: var(--alert-red); }
  .sev-med { background: var(--alert-amber); }
  .funds-bar-wrap { margin-bottom: 5px; }
  .funds-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-light); margin-bottom: 4px; }
  .funds-bar { height: 6px; background: var(--taupe); border-radius: 3px; overflow: hidden; }
  .funds-fill { height: 100%; border-radius: 3px; }
  .fill-red { background: var(--alert-red); }
  .fill-amber { background: var(--alert-amber); }
  .alert-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; }
  .gap-label { font-size: 11px; font-weight: 600; color: var(--alert-red); }
  .gap-label.amber { color: var(--alert-amber); }
  .details-link {
    font-size: 11px;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border: 1px solid var(--blue);
    border-radius: 4px;
    transition: all 0.15s;
    white-space: nowrap;
  }
  .details-link:hover { background: var(--blue); color: white; }

  /* MONEY MOVEMENT TABLE */
  .mm-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
  .mm-table thead tr { background: #f4f5f8; border-bottom: 1px solid var(--border); }
  .mm-table th { padding: 7px 10px; text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-mid); white-space: nowrap; }
  .mm-table th:nth-child(3) { text-align: right; }
  .mm-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; cursor: pointer; }
  .mm-table tbody tr:last-child { border-bottom: none; }
  .mm-table tbody tr:hover { background: #f9f9fb; }
  .mm-table td { padding: 8px 10px; vertical-align: middle; }
  .mm-table td:nth-child(3) { text-align: right; }
  .mm-dir-cell { width: 24px; }
  .mm-status-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
  }
  .st-new { background: #e8edf8; color: var(--navy); }
  .st-reviewing { background: #fff3db; color: #8a5a00; }
  .st-complete { background: #d6f0e0; color: #155a30; }
  .mm-action-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    background: #f4f5f8;
    color: var(--text-mid);
    border: 1px solid var(--border);
    white-space: nowrap;
  }
  .mm-note { font-size: 11px; color: var(--text-light); font-style: italic; max-width: 140px; }

  /* MONEY MOVEMENT CARD */
  .mm-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 14px; }
  .mm-stat { background: #f4f5f8; border-radius: 8px; padding: 12px 14px; }
  .mm-stat .label { font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
  .mm-stat .value { font-size: 18px; font-weight: 700; font-family: 'Noto Serif', serif; color: var(--navy); }
  .mm-stat .sub { font-size: 11px; margin-top: 2px; }
  .positive { color: var(--green); }
  .negative { color: var(--alert-red); }
  .mm-direction { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
  .in { background: #e0f0e8; color: var(--green); }
  .out { background: #fce8e8; color: var(--alert-red); }

  /* QUICK LINKS */
  .links-card { grid-column: 3; grid-row: 1; }
  .links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .link-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    background: #f4f5f8;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    color: var(--navy);
    text-decoration: none;
    transition: all 0.15s;
  }
  .link-chip:hover { background: white; border-color: var(--blue); box-shadow: var(--shadow); }
  .link-chip .lc-icon { display: flex; align-items: center; flex-shrink: 0; }

  /* POLICY ALERTS */
  .policy-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .policy-item:last-child { border-bottom: none; }
  .policy-title { font-size: 13px; font-weight: 500; color: var(--text-dark); margin-bottom: 3px; }
  .policy-meta { font-size: 11.5px; color: var(--text-light); display: flex; align-items: center; gap: 8px; }
  .policy-new { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; background: var(--navy); color: white; padding: 1px 5px; border-radius: 3px; }
  .policy-updated { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; background: var(--gold); color: white; padding: 1px 5px; border-radius: 3px; }

  /* P&P CARD */
  .pp-cta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--navy) 0%, #1a3a8f 100%);
    border-radius: 0 0 10px 10px;
    position: relative;
    overflow: hidden;
  }
  .pp-cta::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 90px;
    background: rgba(49,133,252,0.15);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border-radius: 4px;
  }
  .pp-icon { font-size: 24px; position: relative; flex-shrink: 0; }
  .pp-text { flex: 1; position: relative; }
  .pp-title { font-family: 'Noto Serif', serif; font-size: 13px; color: white; line-height: 1.3; }
  .pp-sub { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 2px; }
  .pp-btn {
    background: var(--gold);
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Noto Sans', sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .pp-btn:hover { background: var(--gold-light); }

  /* PAPERWORK OUTSTANDING */
  .pw-summary {
    display: flex;
    gap: 12px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--border);
    background: #fafbfd;
  }
  .pw-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    min-width: 90px;
  }
  .pw-stat .pw-count { font-size: 22px; font-weight: 700; font-family: 'Noto Serif', serif; color: var(--navy); line-height: 1; }
  .pw-stat .pw-label { font-size: 10px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 3px; text-align: center; }
  .pw-stat.urgent .pw-count { color: var(--alert-red); }
  .pw-stat.warn .pw-count { color: var(--alert-amber); }
  .pw-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .pw-table thead tr { background: #f4f5f8; border-bottom: 1px solid var(--border); }
  .pw-table th { padding: 7px 14px; text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-mid); white-space: nowrap; }
  .pw-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; cursor: pointer; }
  .pw-table tbody tr:last-child { border-bottom: none; }
  .pw-table tbody tr:hover { background: #f9f9fb; }
  .pw-table td { padding: 9px 14px; vertical-align: middle; }
  .pw-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 600;
    background: #e8edf8;
    color: var(--navy);
    white-space: nowrap;
  }
  .pw-type-pill.docusign { background: #fff0f8; color: #8c0050; }
  .pw-type-pill.custodian { background: #e8f5ff; color: #005fa3; }
  .pw-type-pill.compliance { background: #fff3db; color: #8a5a00; }
  .pw-type-pill.internal { background: #e8edf8; color: var(--navy); }
  .pw-age { font-size: 11.5px; font-weight: 600; }
  .pw-age.overdue { color: var(--alert-red); }
  .pw-age.warn { color: var(--alert-amber); }
  .pw-age.ok { color: var(--text-light); }
  .pw-assignee { font-size: 11.5px; color: var(--text-mid); }
  .pw-action-btn {
    font-size: 11px;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    padding: 3px 9px;
    border: 1px solid var(--blue);
    border-radius: 4px;
    transition: all 0.15s;
    white-space: nowrap;
  }
  .pw-action-btn:hover { background: var(--blue); color: white; }

  .sortable th[data-sort] {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 22px;
  }
  .sortable th[data-sort]:hover { background: #e8edf8; color: var(--navy); }
  .sortable th[data-sort]::after {
    content: '⇅';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    opacity: 0.4;
  }
  .sortable th[data-sort].asc::after  { content: '↑'; opacity: 0.9; color: var(--navy); }
  .sortable th[data-sort].desc::after { content: '↓'; opacity: 0.9; color: var(--navy); }

  .export-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-mid);
    background: white;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 3px 9px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    font-family: 'Noto Sans', sans-serif;
  }
  .export-btn:hover { border-color: var(--blue); color: var(--blue); background: #f0f4ff; }
  .card-header-actions { display: flex; align-items: center; gap: 8px; }

  /* ── ADVISER FILTER ─────────────────────────────────────── */
  .adviser-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 32px;
    height: 36px;
    background: white;
    border-bottom: 1px solid var(--border);
    justify-content: space-between;
  }
  .adviser-filter-label {
    font-size: 11.5px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
  }
  .filter-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    height: 24px;
  }
  .filter-toggle-btn {
    padding: 0 14px;
    font-size: 11.5px;
    font-weight: 600;
    font-family: 'Noto Sans', sans-serif;
    background: white;
    border: none;
    cursor: pointer;
    color: var(--text-mid);
    border-right: 1px solid var(--border);
    transition: all 0.15s;
    white-space: nowrap;
  }
  .filter-toggle-btn:last-child { border-right: none; }
  .filter-toggle-btn.active { background: var(--navy); color: white; }
  .filter-toggle-btn:hover:not(.active) { background: #f0f2f8; color: var(--navy); }
  .filter-adviser-select {
    font-size: 11.5px;
    font-family: 'Noto Sans', sans-serif;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 10px;
    height: 24px;
    color: var(--text-dark);
    background: white;
    cursor: pointer;
    outline: none;
  }

  /* ── AUM SNAPSHOT ──────────────────────────────────────── */
  .aum-body {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .aum-chart-wrap {
    padding: 14px 20px 10px;
    position: relative;
    border-bottom: 1px solid var(--border);
  }
  .aum-chart-wrap canvas { width: 100% !important; height: 100px !important; }
  .aum-period-btns {
    display: flex;
    gap: 4px;
    position: absolute;
    top: 14px;
    right: 20px;
  }
  .aum-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 4px 0;
  }
  .aum-stat-row {
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  .aum-stat-row:nth-child(even) { border-right: none; }
  .aum-stat-row:nth-last-child(-n+2) { border-bottom: none; }
  .aum-stat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); margin-bottom: 2px; }
  .aum-stat-value { font-size: 20px; font-weight: 700; font-family: 'Noto Serif', serif; color: var(--navy); line-height: 1; }
  .aum-stat-sub { font-size: 11px; margin-top: 2px; }
  .aum-period-btn {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-mid);
    cursor: pointer;
    font-family: 'Noto Sans', sans-serif;
    transition: all 0.15s;
  }
  .aum-period-btn.active, .aum-period-btn:hover { background: var(--navy); color: white; border-color: var(--navy); }

  /* ── MY TASKS ──────────────────────────────────────────── */
  .tasks-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    background: #fafbfd;
  }
  .tasks-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 13px;
    font-family: 'Noto Sans', sans-serif;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.15s;
  }
  .tasks-input:focus { border-color: var(--blue); }
  .tasks-select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 12px;
    font-family: 'Noto Sans', sans-serif;
    color: var(--text-dark);
    background: white;
    outline: none;
    cursor: pointer;
  }
  .tasks-add-btn {
    background: var(--navy);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: 'Noto Sans', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
  }
  .tasks-add-btn:hover { background: var(--navy-mid); }
  .tasks-list { list-style: none; }
  .task-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
  }
  .task-item:last-child { border-bottom: none; }
  .task-item:hover { background: #fafbfd; }
  .task-check {
    width: 16px; height: 16px;
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.15s;
    position: relative;
  }
  .task-check:checked { background: var(--navy); border-color: var(--navy); }
  .task-check:checked::after {
    content: '';
    position: absolute;
    left: 3px; top: 1px;
    width: 6px; height: 9px;
    border: 2px solid white;
    border-top: none; border-left: none;
    transform: rotate(45deg);
  }
  .task-text { flex: 1; font-size: 13px; color: var(--text-dark); }
  .task-item.done .task-text { text-decoration: line-through; color: var(--text-light); }
  .task-priority {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
  }
  .pri-high { background: #fce8e8; color: var(--alert-red); }
  .pri-med  { background: #fff3db; color: #8a5a00; }
  .pri-low  { background: #e8edf8; color: var(--navy); }
  .task-client { font-size: 11px; color: var(--text-light); white-space: nowrap; }
  .task-due { font-size: 11px; color: var(--text-light); white-space: nowrap; }
  .task-due.overdue { color: var(--alert-red); font-weight: 600; }
  .task-del {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 14px;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
  }
  .task-del:hover { color: var(--alert-red); }
  .tasks-empty {
    padding: 20px 18px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    display: none;
  }

  /* ── SLIDE-IN DETAIL PANEL ─────────────────────────────── */
  .detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 500;
    backdrop-filter: blur(2px);
  }
  .detail-overlay.open { display: block; }
  .detail-panel {
    position: fixed;
    top: 0; right: -520px;
    width: 500px;
    height: 100vh;
    background: white;
    box-shadow: -8px 0 40px rgba(0,36,127,0.18);
    z-index: 501;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
  }
  .detail-panel.open { right: 0; }
  .detail-panel-header {
    background: linear-gradient(135deg, var(--navy), var(--navy-mid));
    color: white;
    padding: 20px 24px 16px;
    flex-shrink: 0;
  }
  .detail-panel-close {
    position: absolute;
    top: 16px; right: 20px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
    font-family: sans-serif;
    line-height: 1;
  }
  .detail-panel-close:hover { background: rgba(255,255,255,0.25); }
  .detail-panel-tag {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 4px;
  }
  .detail-panel-name {
    font-family: 'Noto Serif', serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
  }
  .detail-panel-sub { font-size: 12px; color: rgba(255,255,255,0.65); }
  .detail-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
  }
  .detail-section { margin-bottom: 20px; }
  .detail-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }
  .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f4f5f8;
  }
  .detail-row:last-child { border-bottom: none; }
  .detail-row .dl { color: var(--text-light); font-size: 11.5px; }
  .detail-row .dv { font-weight: 500; color: var(--text-dark); text-align: right; }
  .detail-actions {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: #fafbfd;
    flex-shrink: 0;
    flex-wrap: wrap;
  }
  .detail-action-btn {
    flex: 1;
    min-width: 100px;
    padding: 9px 14px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: 'Noto Sans', sans-serif;
    cursor: pointer;
    text-align: center;
    border: 1px solid var(--border);
    background: white;
    color: var(--navy);
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
  }
  .detail-action-btn:hover { border-color: var(--blue); background: #f0f4ff; color: var(--blue); }
  .detail-action-btn.primary { background: var(--navy); color: white; border-color: var(--navy); }
  .detail-action-btn.primary:hover { background: var(--navy-mid); }
  tr.clickable-row { cursor: pointer; }
  tr.clickable-row:hover td { background: #f0f4ff !important; }

  /* PANEL NOTES LOG */
  .panel-notes-log {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 4px;
  }
  .panel-note-entry {
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 11.5px;
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 6px;
    align-items: baseline;
  }
  .panel-note-date { color: rgba(255,255,255,0.45); font-size: 10.5px; white-space: nowrap; }
  .panel-note-author { color: var(--gold-light); font-weight: 600; font-size: 10.5px; white-space: nowrap; }
  .panel-note-text { color: rgba(255,255,255,0.85); line-height: 1.4; }

  /* FOOTER */
  footer {
    text-align: center;
    padding: 16px;
    font-size: 11px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    margin-top: 8px;
  }

  @media (max-width: 1100px) {
    .main { grid-template-columns: 1fr 1fr; padding: 20px; }
    .pipeline-card, .money-card, .funds-card { grid-column: 1 / -1; grid-row: auto; }
    .calendar-card { grid-column: 1; grid-row: auto; }
    .birthdays-card { grid-column: 2; grid-row: auto; }
    .aum-card { grid-column: 1 / -1; grid-row: auto; }
    .pp-card, .policy-card { grid-column: 1 / -1; grid-row: auto; }
    .col3-row2-stack { grid-column: 1 / -1; grid-row: auto; }
  }
  @media (max-width: 860px) {
    .search-section { flex-wrap: wrap; }
    .app-bar { flex-wrap: wrap; }
  }
  @media (max-width: 680px) {
    .announcement-banner { padding: 10px 16px; font-size: 12px; flex-wrap: wrap; }
    .announcement-banner .nav-right { display: none; }
    header { padding: 0 16px; height: 52px; }
    .search-section { padding: 12px 16px; gap: 10px; }
    .app-bar-divider { display: none; }
    .app-bar { flex-wrap: wrap; gap: 6px; width: 100%; }
    .main { grid-template-columns: 1fr; padding: 14px 12px; gap: 14px; }
    .pipeline-card, .calendar-card, .birthdays-card, .funds-card, .money-card, .aum-card, .pp-card, .policy-card, .col3-row2-stack { grid-column: 1 !important; grid-row: auto !important; }
    .pipeline-table { font-size: 11.5px; }
    .mm-grid { grid-template-columns: 1fr 1fr; }
  }

  /* ── CUSTOMIZE LAYOUT CONTROLS ─────────────────────────── */
  .adviser-filter { display: flex !important; align-items: center !important; }

  .customize-btn, .customize-done-btn, .customize-reset-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 13px; border-radius: 6px; font-size: 12.5px;
    font-family: 'Noto Sans', sans-serif; font-weight: 600;
    cursor: pointer; transition: all 0.15s; border: 1.5px solid transparent;
  }
  .customize-btn { background: white; color: var(--navy); border-color: var(--border); box-shadow: 0 1px 4px rgba(0,36,127,0.07); }
  .customize-btn:hover { border-color: var(--navy); background: #f0f4ff; }
  .customize-done-btn { background: var(--navy); color: white; border-color: var(--navy); }
  .customize-done-btn:hover { background: #1a3a8f; }
  .customize-reset-btn { background: transparent; color: var(--text-mid); border-color: var(--border); }
  .customize-reset-btn:hover { color: var(--alert-red); border-color: var(--alert-red); }
  body.dark .customize-btn { background: #1e2a52; color: #c8d3f0; border-color: rgba(255,255,255,0.12); }
  body.dark .customize-btn:hover { background: #243060; }

  /* ── GRID-SNAP DRAG AND RESIZE ──────────────────────────── */
  .main.customize-mode {
    background-image: linear-gradient(rgba(0,36,127,0.06) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0,36,127,0.06) 1px, transparent 1px);
    background-size: calc((100% - 40px) / 3 + 20px) 20px;
  }

  .drag-unit { box-sizing: border-box; display: flex; flex-direction: column; }
  .drag-unit > .card, .drag-unit > .col3-row2-stack { flex: 1 1 auto; min-height: 0; }

  .drag-handle {
    display: none; align-items: center; justify-content: center;
    width: 24px; height: 24px; cursor: grab;
    border-radius: 5px; transition: background 0.12s; flex-shrink: 0;
    color: rgba(255,255,255,0.65); touch-action: none;
  }
  .drag-handle svg { pointer-events: none; }
  .drag-handle:hover { background: rgba(255,255,255,0.2); color: white; }
  .customize-mode .drag-unit .drag-handle { display: inline-flex; }
  .customize-mode .drag-unit .card-header:not([style*="background"]) .drag-handle { color: rgba(0,36,127,0.35); }
  .customize-mode .drag-unit .card-header:not([style*="background"]) .drag-handle:hover { background: rgba(0,36,127,0.08); color: var(--navy); }

  .resize-handle {
    display: none; position: absolute; bottom: 6px; right: 6px;
    width: 20px; height: 20px; cursor: se-resize; z-index: 20;
    opacity: 0; transition: opacity 0.15s; color: var(--blue);
  }
  .resize-handle svg { pointer-events: none; }
  .customize-mode .drag-unit .resize-handle { display: block; }
  .customize-mode .drag-unit:hover .resize-handle,
  .customize-mode .drag-unit.resizing .resize-handle { opacity: 1; }

  #dnd-ghost {
    display: none; position: absolute; z-index: 200; pointer-events: none;
    background: rgba(49,133,252,0.1); border: 2.5px dashed var(--blue);
    border-radius: 10px; box-sizing: border-box;
  }
  #dnd-ghost.visible { display: block; }

  .drag-unit.is-dragging { opacity: 0.3; }
  .customize-mode .drag-unit .card,
  .customize-mode .drag-unit .col3-row2-stack .card { transition: box-shadow 0.18s, transform 0.12s; }
  .customize-mode .drag-unit:not(.is-dragging):hover .card { box-shadow: 0 6px 28px rgba(0,36,127,0.14); transform: translateY(-1px); }

  #customizeBanner { display:none; background:var(--navy); color:white; text-align:center; padding:7px 16px; font-size:12px; font-weight:500; }
  #customizeBanner.visible { display:block; animation: cBannerIn 0.2s ease; }
  @keyframes cBannerIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }


/* =============================================================
   APP CENTER COMPONENT
   Dropdown launcher in the search/nav strip.
   ============================================================= */

/* Wrapper + button */
.ac-wrap { position: relative; }
.ac-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  color: white; font-size: 12.5px; font-family: inherit; font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.ac-btn:hover { background: rgba(255,255,255,0.26); }

/* Dropdown panel */
.ac-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: white;
  border: 1px solid rgba(0,36,127,0.12);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,36,127,0.2);
  z-index: 500;
  width: 440px; max-height: 82vh;
  display: none; flex-direction: column;
  animation: acDropIn 0.18s ease;
  overflow: hidden;
}
.ac-dropdown.open { display: flex; }

@keyframes acDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Customize banner */
.ac-customize-banner {
  display: none; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px;
  background: #eef2ff; border-bottom: 1px solid rgba(49,133,252,0.18);
  font-size: 10.5px; font-weight: 600; color: #3185fc;
  flex-shrink: 0;
}

/* Scrollable content */
.ac-scroll { overflow-y: auto; overflow-x: hidden; flex: 1; padding-bottom: 4px; }

/* Sections */
.ac-section-block { display: block; }
.ac-section-block.section-dragging { opacity: 0.3; }
.ac-section-block.drop-above { border-top: 2px solid #3185fc; }
.ac-section-block.drop-below { border-bottom: 2px solid #3185fc; }
.ac-section-block.collapsed .ac-grid { display: none; }
.ac-section-block.collapsed .chevron-icon { transform: rotate(-90deg); }
.ac-sep { height: 1px; background: rgba(0,36,127,0.1); margin: 8px 0; }

/* Section labels */
.ac-section-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: #8a8aaa;
  padding: 8px 14px 5px;
  display: flex; align-items: center; justify-content: space-between;
}
.label-left { display: flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.label-left:hover .label-text { color: #00247f; }
.chevron-btn { display: flex; align-items: center; color: #8a8aaa; transition: color 0.15s; }
.label-left:hover .chevron-btn { color: #00247f; }
.chevron-icon { transition: transform 0.2s ease; flex-shrink: 0; }

/* Section drag handle */
.section-drag-handle {
  display: none; align-items: center; gap: 3px;
  cursor: grab; color: #8a8aaa; font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.04em; padding: 2px 6px; border-radius: 4px;
  border: 1px solid transparent; transition: all 0.15s;
}
.section-drag-handle:hover { color: #00247f; border-color: rgba(0,36,127,0.1); background: #f0f4ff; }

/* Grid */
.ac-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px; padding: 0 8px;
}

/* Favorites empty state */
.fav-empty {
  grid-column: 1 / -1; text-align: center;
  padding: 10px 14px; font-size: 11px; color: #8a8aaa; font-style: italic;
}

/* Tiles */
.ac-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 8px 9px; border-radius: 8px;
  color: #1a1a2e; font-size: 11.5px; font-weight: 500;
  text-align: center; line-height: 1.3;
  user-select: none; cursor: pointer; position: relative;
  transition: background 0.12s; min-width: 0;
}
.ac-tile:hover { background: #eef2ff; color: #00247f; }
.ac-tile:hover .tile-tooltip { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.ac-tile.dragging { opacity: 0.3; }
.ac-tile.drop-target { background: #dde6ff; outline: 2px dashed #3185fc; outline-offset: -2px; }
.ac-tile.is-hidden { display: none; }
.ac-tile.is-fav .tile-star-btn { color: #db9523; opacity: 1; }

/* Tile icon */
.tile-icon-wrap { position: relative; width: 36px; height: 36px; flex-shrink: 0; }
.ac-tile-logo {
  width: 36px; height: 36px; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.ac-tile-logo svg, .ac-tile-logo img { width: 36px; height: 36px; display: block; border-radius: 8px; }
.ac-tile-logo img { object-fit: contain; }

/* SSO shield */
.sso-shield { position: absolute; bottom: -5px; right: -6px; width: 16px; height: 16px; z-index: 2; pointer-events: none; }
.sso-shield svg { width: 16px; height: 16px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3)); }

.tile-label { word-break: break-word; }

/* Star button */
.tile-star-btn {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; border: 1px solid rgba(0,36,127,0.1);
  color: #8a8aaa; font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
  opacity: 0; transition: opacity 0.15s, color 0.15s, box-shadow 0.15s;
  z-index: 4; box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.ac-tile:hover .tile-star-btn { opacity: 1; }
.ac-tile.is-fav .tile-star-btn { opacity: 1; color: #db9523; }
.tile-star-btn:hover { color: #db9523; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

/* Hide button */
.tile-hide-btn {
  display: none; position: absolute; top: -6px; left: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #6a6a8a; color: white; border: none;
  font-size: 9px; cursor: pointer;
  align-items: center; justify-content: center;
  line-height: 1; padding: 0; transition: background 0.15s; z-index: 4;
}
.tile-hide-btn:hover { background: #b34040; }

/* Edit button */
.tile-edit-btn {
  display: none; position: absolute; bottom: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #3185fc; color: white; border: none;
  font-size: 9px; cursor: pointer;
  align-items: center; justify-content: center;
  line-height: 1; padding: 0; transition: background 0.15s; z-index: 4;
}
.tile-edit-btn:hover { background: #1a3a8f; }

/* Tooltip */
.tile-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1a1a2e; color: white;
  border-radius: 7px; padding: 7px 10px;
  font-size: 10.5px; line-height: 1.45; text-align: left;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 600; box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  min-width: 100px; max-width: 200px; white-space: normal;
}
.tile-tooltip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #1a1a2e;
}
.tile-tooltip-label { font-weight: 700; font-size: 11px; margin-bottom: 3px; }
.tile-tooltip-url {
  font-size: 9.5px; color: rgba(255,255,255,0.5);
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 180px;
}
.tile-tooltip-desc {
  font-size: 10px; color: rgba(255,255,255,0.65);
  margin-top: 4px; line-height: 1.4;
  white-space: normal; max-width: 180px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 4px;
}

/* Add personal tile */
.add-personal-tile {
  display: none; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 8px 9px; border-radius: 8px;
  border: 1.5px dashed rgba(0,36,127,0.2);
  color: #8a8aaa; font-size: 11px; cursor: pointer;
  transition: all 0.15s; text-align: center;
}
.add-personal-tile:hover { border-color: #3185fc; color: #3185fc; background: #f0f4ff; }
.add-personal-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: #f0f2f8; display: flex; align-items: center; justify-content: center;
}

/* Restore strip */
.restore-strip { display: none; padding: 6px 14px; background: #f8f9fd; border-top: 1px solid rgba(0,36,127,0.1); flex-shrink: 0; }
.restore-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #8a8aaa; margin-bottom: 5px; }
.restore-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.restore-chip {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 12px;
  background: #e8edf8; color: #00247f; font-size: 11px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.restore-chip:hover { background: #00247f; color: white; }

/* Footer */
.ac-footer { border-top: 1px solid rgba(0,36,127,0.1); padding: 8px 14px; flex-shrink: 0; }
.ac-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sso-legend { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: #8a8aaa; }
.sso-legend svg { width: 14px; height: 14px; flex-shrink: 0; }
.footer-btns { display: flex; gap: 6px; }
.footer-btn {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: #4a4a6a;
  background: none; border: 1px solid rgba(0,36,127,0.1);
  border-radius: 6px; padding: 4px 9px;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.footer-btn:hover { color: #00247f; border-color: #00247f; background: #f0f4ff; }
.footer-btn.active { color: #3185fc; border-color: #3185fc; background: #eef2ff; }
.footer-btn.danger { color: #b34040; border-color: rgba(179,64,64,0.3); }
.footer-btn.danger:hover { background: #fdf0f0; border-color: #b34040; }

/* Resize handle (bottom-left corner) */
.ac-resize-handle {
  position: absolute; bottom: 0; left: 0;
  width: 20px; height: 20px; cursor: sw-resize; z-index: 10;
  border-radius: 0 0 0 10px;
}
.ac-resize-handle::before {
  content: ''; position: absolute; bottom: 5px; left: 5px;
  width: 9px; height: 9px;
  border-left: 2px solid rgba(0,36,127,0.1);
  border-bottom: 2px solid rgba(0,36,127,0.1);
  border-radius: 0 0 0 2px;
}
.ac-resize-handle:hover::before { border-color: #3185fc; }

/* Modals */
.ac-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 999;
  backdrop-filter: blur(2px);
  align-items: center; justify-content: center;
}
.ac-modal-overlay.open { display: flex; }
.ac-modal-box {
  background: white; border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,36,127,0.22);
  width: 360px; max-width: 95vw; padding: 24px;
  animation: acModalIn 0.2s ease;
}
@keyframes acModalIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.ac-modal-title {
  font-size: 15px; font-weight: 700; color: #00247f;
  font-family: 'Noto Serif', serif; margin-bottom: 3px;
}
.ac-modal-sub { font-size: 11.5px; color: #8a8aaa; margin-bottom: 16px; }
.ac-modal-field { margin-bottom: 12px; }
.ac-modal-label {
  display: block; font-size: 11px; font-weight: 700; color: #4a4a6a;
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 5px;
}
.ac-modal-input {
  width: 100%; padding: 8px 11px;
  border: 1px solid rgba(0,36,127,0.18); border-radius: 7px;
  font-size: 13px; font-family: inherit; color: #1a1a2e;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.ac-modal-input:focus { border-color: #3185fc; box-shadow: 0 0 0 3px rgba(49,133,252,0.1); }
.ac-modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.ac-btn-cancel {
  flex: 1; padding: 9px; border-radius: 8px; font-size: 13px; font-weight: 600;
  font-family: inherit; background: white; color: #4a4a6a;
  border: 1px solid rgba(0,36,127,0.1); cursor: pointer;
}
.ac-btn-submit {
  flex: 2; padding: 9px; border-radius: 8px; font-size: 13px; font-weight: 700;
  font-family: inherit; background: #00247f; color: white; border: none;
  cursor: pointer; transition: background 0.15s;
}
.ac-btn-submit:hover { background: #1a3a8f; }


/* =============================================================
   APP CENTER MODAL STYLES
   ============================================================= */
.ac-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 999;
  backdrop-filter: blur(2px);
  align-items: center; justify-content: center;
}
.ac-modal-overlay.open { display: flex; }
.ac-modal-box {
  background: white; border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,36,127,0.22);
  width: 360px; max-width: 95vw; padding: 24px;
  animation: acModalIn 0.2s ease;
}
@keyframes acModalIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.ac-modal-title {
  font-size: 15px; font-weight: 700; color: #00247f;
  font-family: 'Noto Serif', serif; margin-bottom: 3px;
}
.ac-modal-sub { font-size: 11.5px; color: #8a8aaa; margin-bottom: 16px; }
.ac-modal-field { margin-bottom: 12px; }
.ac-modal-label {
  display: block; font-size: 11px; font-weight: 700; color: #4a4a6a;
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 5px;
}
.ac-modal-input {
  width: 100%; padding: 8px 11px;
  border: 1px solid rgba(0,36,127,0.18); border-radius: 7px;
  font-size: 13px; font-family: inherit; color: #1a1a2e;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.ac-modal-input:focus { border-color: #3185fc; box-shadow: 0 0 0 3px rgba(49,133,252,0.1); }
.ac-modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.ac-btn-cancel {
  flex: 1; padding: 9px; border-radius: 8px; font-size: 13px; font-weight: 600;
  font-family: inherit; background: white; color: #4a4a6a;
  border: 1px solid rgba(0,36,127,0.1); cursor: pointer;
}
.ac-btn-submit {
  flex: 2; padding: 9px; border-radius: 8px; font-size: 13px; font-weight: 700;
  font-family: inherit; background: #00247f; color: white; border: none;
  cursor: pointer; transition: background 0.15s;
}
.ac-btn-submit:hover { background: #1a3a8f; }

/* =============================================================
   COMING SOON CARD STYLES
   ============================================================= */
.card--coming-soon {
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
}
.card--coming-soon .card-header {
  filter: saturate(0.3) brightness(1.1);
}
.cs-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 24px;
  text-align: center;
  min-height: 140px;
}
.cs-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  background: rgba(0,36,127,0.06);
  border-radius: 14px;
  opacity: 0.5;
}
.cs-icon-wrap svg {
  width: 24px; height: 24px;
  stroke: var(--navy, #00247f);
}
.cs-badge-soon {
  position: absolute;
  top: -8px; right: -10px;
  background: var(--gold, #C8922A);
  color: white;
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 20px;
  line-height: 1.4;
}
.cs-title {
  font-size: 14px; font-weight: 700;
  color: var(--navy, #00247f);
  font-family: 'Noto Serif', serif;
}
.cs-desc {
  font-size: 12px;
  color: var(--text-mid, #4a4a6a);
  max-width: 260px;
  line-height: 1.5;
  margin-top: 2px;
}
.cs-launch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px; font-weight: 600;
  color: var(--text-mid, #4a4a6a);
  background: rgba(0,36,127,0.06);
  border: 1px solid rgba(0,36,127,0.12);
  border-radius: 20px;
  padding: 4px 10px;
  margin-top: 4px;
}
.cs-launch svg { opacity: 0.6; }

/* =============================================================
   BETA STRIP STYLES
   ============================================================= */
.beta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(90deg, rgba(49,133,252,0.08) 0%, rgba(49,133,252,0.04) 100%);
  border-bottom: 1px solid rgba(49,133,252,0.15);
}
.beta-strip-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.beta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #3185fc;
  color: white;
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.beta-strip-msg {
  font-size: 11px;
  color: var(--text-mid, #4a4a6a);
  line-height: 1.4;
}
.beta-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px; font-weight: 600;
  font-family: inherit;
  color: #3185fc;
  background: white;
  border: 1px solid rgba(49,133,252,0.3);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.beta-feedback-btn:hover {
  background: #3185fc;
  color: white;
}

/* ══════════════════════════════════════
   TWO-ROW HEADER (index.html)
══════════════════════════════════════ */
  .hdr-shell {
    background: linear-gradient(135deg, #080f2e 0%, #00247f 100%);
    display: flex;
    flex-direction: column;
    border-bottom: 2px solid #db9523;
    box-shadow: 0 2px 16px rgba(0,0,0,0.25);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .hrow1 {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; height: 50px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .hrow1 .logo-text { color: white; }
  .hrow1 .logo-text span { color: rgba(255,255,255,0.4); }
  .hrow1-right { display: flex; align-items: center; gap: 12px; }
  .hrow1-sep { width: 1px; height: 16px; background: rgba(255,255,255,0.15); }
  .hdr-greeting { font-size: 12.5px; color: rgba(255,255,255,0.6); }
  .hdr-greeting strong { color: white; font-weight: 600; }
  .hdr-date { font-size: 12px; color: rgba(255,255,255,0.45); }

  /* Market pill */
  .market-status-pill {
    display: flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 7px; padding: 5px 10px;
  }
  .market-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; transition: background 0.4s; }
  .market-dot.open { background: #4caf7d; animation: mktOpen 2s infinite; }
  .market-dot.warning { background: #e8b050; animation: mktWarn 1.5s infinite; }
  .market-dot.closed { background: #d25555; }
  @keyframes mktOpen { 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 mktWarn { 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);} }
  .market-label { font-size: 10px; color: rgba(255,255,255,0.45); line-height: 1; }
  .market-time { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.85); line-height: 1.3; font-variant-numeric: tabular-nums; }
  .market-time.closed { font-weight: 400; color: rgba(255,255,255,0.4); }
  .market-time.warning { color: #e8c06a; }

  /* Dark toggle (header version) */
  .hrow1 .dark-toggle {
    display: flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px; padding: 3px 7px;
    cursor: pointer; color: rgba(255,255,255,0.6);
    font-size: 11px; font-family: 'Noto Sans', sans-serif;
    transition: background 0.15s;
  }
  .hrow1 .dark-toggle:hover { background: rgba(255,255,255,0.14); }
  .hrow1 .dark-toggle-track { width: 26px; height: 14px; background: rgba(255,255,255,0.2); border-radius: 7px; position: relative; }
  .hrow1 .dark-toggle-thumb { width: 10px; height: 10px; background: white; border-radius: 50%; position: absolute; top: 2px; left: 2px; }

  /* User dropdown */
  .user-menu-wrap { position: relative; }
  .user-name-btn {
    display: flex; align-items: center; gap: 5px;
    background: none; border: none;
    color: rgba(255,255,255,0.75);
    font-family: 'Noto Sans', sans-serif; font-size: 13px;
    cursor: pointer; padding: 5px 7px; border-radius: 6px;
    transition: all 0.15s;
  }
  .user-name-btn:hover { background: rgba(255,255,255,0.1); color: white; }
  .chevron { opacity: 0.4; transition: transform 0.2s; }
  .user-menu-wrap.open .chevron { transform: rotate(180deg); opacity: 0.7; }

  /* User avatar circle */
  .user-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--gold); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; border: 1.5px solid rgba(255,255,255,0.25);
  }
  .user-avatar-img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  }
  .user-avatar-initials {
    font-size: 10px; font-weight: 700; color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; line-height: 1;
  }
  .user-dropdown {
    display: none; position: fixed;
    background: white; border: 1px solid #dde3f0;
    border-radius: 10px; box-shadow: 0 8px 32px rgba(0,36,127,0.15);
    min-width: 210px; z-index: 9999; overflow: hidden;
  }
  .user-menu-wrap.open .user-dropdown { display: block; animation: ddIn 0.15s ease; }
  @keyframes ddIn { from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:translateY(0);} }
  .user-dd-header { padding: 12px 14px 10px; border-bottom: 1px solid #eef0f6; }
  .user-dd-name { font-size: 13px; font-weight: 700; color: #00247f; }
  .user-dd-email { font-size: 11px; color: #8a8aaa; margin-top: 2px; }
  .user-dd-role {
    display: inline-block; margin-top: 6px;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    background: #eef2ff; color: #3185fc; padding: 1px 7px; border-radius: 4px;
  }
  .dd-item {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 14px; font-size: 13px; color: #1a1a2e;
    cursor: pointer; border: none; background: none;
    width: 100%; text-align: left; font-family: 'Noto Sans', sans-serif;
    transition: background 0.1s;
  }
  .dd-item:hover { background: #f4f6fb; }
  .dd-item svg { opacity: 0.45; }
  .dd-sep { border: none; border-top: 1px solid #eef0f6; margin: 3px 0; }
  .dd-danger { color: #b34040; }
  .dd-danger:hover { background: #fff5f5 !important; }

/* ══════════════════════════════════════
   SEARCH SUGGESTIONS
══════════════════════════════════════ */
  .search-suggestions {
    display: none; position: absolute;
    top: calc(100% + 2px); left: 0; right: 0;
    background: white; border: 1px solid #dde3f0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,36,127,0.12);
    z-index: 500; overflow: hidden;
  }
  .search-suggestions.open { display: block; }
  .search-sugg-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 14px; font-size: 13px; color: #1a1a2e;
    cursor: pointer; transition: background 0.1s;
  }
  .search-sugg-item:hover, .search-sugg-item.active { background: #f0f4ff; }
  .search-sugg-item svg { opacity: 0.35; flex-shrink: 0; }

/* ══════════════════════════════════════
   FEEDBACK BUTTON + MODAL
══════════════════════════════════════ */
  .fb-btn {
    display: flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 7px; padding: 0 14px; height: 36px;
    font-family: 'Noto Sans', sans-serif; font-size: 12.5px; font-weight: 600;
    color: rgba(255,255,255,0.8); cursor: pointer; white-space: nowrap;
    transition: all 0.15s;
  }
  .fb-btn:hover { background: rgba(255,255,255,0.16); color: white; }
  .fb-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,15,40,0.4); z-index: 8999;
    backdrop-filter: blur(2px);
  }
  .fb-modal {
    display: none; position: fixed;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: white; border-radius: 14px;
    width: 480px; max-width: 94vw;
    box-shadow: 0 16px 48px rgba(0,36,127,0.18);
    z-index: 9000; overflow: hidden;
  }
  .fb-modal.open { display: block; animation: fbIn 0.18s ease; }
  @keyframes fbIn { from{opacity:0;transform:translate(-50%,-52%);}to{opacity:1;transform:translate(-50%,-50%);} }
  .fb-modal-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 20px 22px 14px;
    border-bottom: 1px solid #eef0f6;
  }
  .fb-modal-title { font-family: 'Noto Serif', serif; font-size: 17px; font-weight: 700; color: #00247f; }
  .fb-modal-sub { font-size: 11.5px; color: #8a8aaa; margin-top: 3px; }
  .fb-modal-close {
    background: none; border: none; font-size: 16px; color: #aaa;
    cursor: pointer; padding: 2px 6px; border-radius: 4px;
    transition: all 0.15s; line-height: 1;
  }
  .fb-modal-close:hover { background: #f0f0f5; color: #333; }
  .fb-modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
  .fb-field { display: flex; flex-direction: column; gap: 5px; }
  .fb-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #4a4a6a; }
  .fb-input {
    padding: 8px 11px; border: 1.5px solid #dde3f0; border-radius: 7px;
    font-size: 13px; font-family: 'Noto Sans', sans-serif; color: #1a1a2e;
    outline: none; transition: border-color 0.15s; background: white;
  }
  .fb-input:focus { border-color: #3185fc; }
  .fb-input[readonly] { background: #f7f8fb; color: #8a8aaa; }
  .fb-textarea { resize: vertical; min-height: 90px; }
  .fb-modal-actions {
    display: flex; gap: 8px; padding: 14px 22px 18px;
    border-top: 1px solid #eef0f6;
  }
  .fb-cancel {
    padding: 8px 16px; border-radius: 7px; font-size: 13px; font-weight: 600;
    font-family: 'Noto Sans', sans-serif; cursor: pointer;
    background: white; color: #4a4a6a; border: 1.5px solid #dde3f0;
    transition: all 0.15s;
  }
  .fb-cancel:hover { border-color: #4a4a6a; }
  .fb-submit {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; border-radius: 7px; font-size: 13px; font-weight: 600;
    font-family: 'Noto Sans', sans-serif; cursor: pointer;
    background: #00247f; color: white; border: none; transition: background 0.15s;
  }
  .fb-submit:hover { background: #1a3a8f; }

/* ══════════════════════════════════════
   CARD CONTROLS (collapse / maximize)
══════════════════════════════════════ */
  .card-controls {
    display: flex; align-items: center; gap: 3px;
    margin-left: auto; flex-shrink: 0;
  }
  .card-ctrl-btn {
    width: 22px; height: 22px; border-radius: 5px;
    border: none; background: transparent;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light); cursor: pointer;
    transition: all 0.15s; flex-shrink: 0;
  }
  .card-ctrl-btn:hover { background: rgba(0,36,127,0.07); color: var(--navy); }

  /* Collapsed card — show header only */
  .card.card-collapsed > *:not(.card-header) { display: none !important; }
  .card.card-collapsed { min-height: 0; }

  /* Maximized card */
  .card-max-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(10,15,40,0.5); z-index: 8000;
    backdrop-filter: blur(3px);
  }
  .card-max-overlay.open { display: block; }
  .card.card-maximized {
    position: fixed !important;
    top: 5vh !important; left: 3vw !important;
    width: 94vw !important; height: 90vh !important;
    z-index: 8500 !important;
    border-radius: 12px !important;
    overflow: auto;
    box-shadow: 0 24px 64px rgba(0,36,127,0.3) !important;
  }

  /* Light mode name pill fix */
  .user-name-btn { color: rgba(255,255,255,0.75); }

