/* ────────────────────────────────────────────────────────────────────────
 * ASCENT — Phase 10 CSS split (2026-08-20, PARALLEL_DEV_PLAN.md).
 *
 * WARNING -- READ BEFORE TOUCHING <link> TAGS IN Ascent_Dashboard.html --
 * This file is one of twelve pieces of what used to be a single 2,142-line
 * <style> block inside Ascent_Dashboard.html. The split is a byte-exact,
 * order-preserving cut -- verified by concatenating all twelve files back
 * together and diffing against the original block (identical, zero bytes
 * different). That means the CSS cascade today is unchanged from before
 * the split, PROVIDED the <link rel="stylesheet"> tags for these files
 * stay in the exact order listed in ARCHITECTURE.md's "File split in
 * Phase 10" section.
 *
 * Several rules across these files reuse the same class name with a
 * different definition in a different file (this was already true inside
 * the single original block -- see this repo's shell-duplicate-and-
 * agent-cards.css for the clearest example). Same-specificity CSS
 * resolves by *source order*: whichever rule loads last wins. Reordering
 * these <link> tags -- alphabetizing them, "cleaning up" the <head>,
 * inserting a new file in the middle -- can silently flip which rule
 * wins, with no error and no obvious symptom beyond something looking
 * subtly wrong on one tab. If you add new CSS, prefer appending a new
 * file at the END of the <link> list over inserting into this sequence.
 * ──────────────────────────────────────────────────────────────────────── */

/* Source: original Ascent_Dashboard.html lines 927-1139 (pre-split). */
/* IMPORTANT: the first ~110 lines of this file ("LAYOUT"/"SIDEBAR"/"MAIN") are a near-duplicate of shell-and-shared-ui.css's .app/.sidebar/.main rules, with slightly different hardcoded values in a few places (e.g. width: 220px here vs. width: var(--sidebar) there). This duplication predates this split -- it was already in the single-file <style> block, most likely left over from when the Photo Organizer's originally-standalone page (see photo-organizer-agentops.html at the repo root) was folded into this dashboard. It is NOT something this phase introduced or attempted to clean up (that would be a redesign, out of scope -- see ARCHITECTURE.md's "HTML structure -- Phase 9 finding" and this phase's own note for the full explanation). Because this file loads after shell-and-shared-ui.css, its rules currently win any same-specificity conflict with that file's shell rules -- exactly as they did before the split. Do not resolve this duplication without checking with Mark first; it may be intentional, dead, or genuinely redundant, but this phase did not investigate which. The remainder of this file ("AGENT GRID CARDS") is unrelated shared UI that happened to follow it in the original source. */

    /* ── LAYOUT ── */
  .app { display: flex; flex: 1; height: 100vh; overflow: hidden; }

  /* ── SIDEBAR ── */
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 220px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #d8d8dc;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
  }
  .sidebar-logo {
    padding: 10px 18px 8px;
    border-bottom: 1px solid #d8d8dc;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .logo-mark {
    width: 28px; height: 28px;
    background: #E8603A;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 900; color: white;
    flex-shrink: 0;
  }
  .logo-text { font-size: 14px; font-weight: 800; color: #111114; letter-spacing: 0.02em; }
  .logo-sub { font-size: 13px; color: #888890; font-weight: 500; }
  .agent-info {
    padding: 14px 18px;
    border-bottom: 1px solid #d8d8dc;
  }
  .agent-name { font-size: 15px; font-weight: 700; color: #111114; }
  .agent-brok { font-size: 14px; color: #404048; }
  .agent-plan {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #E8603A;
    background: rgba(232,96,60,0.1);
    border: 1px solid rgba(232,96,60,0.2);
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-block;
  }
  .po-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
  .nav-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #aaaaae;
    padding: 0 8px;
    margin: 14px 0 6px;
  }
  .nav-label:first-child { margin-top: 0; }
  .po-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 7px;
    cursor: pointer;
    color: #404048;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.55;
  }
  .po-nav-item:hover { background: #ebebee; color: #2a2a2e; }
  .po-nav-item.active { background: rgba(232,96,60,0.12); color: #E8603A; font-weight: 600; }
  .po-nav-icon { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
  .po-nav-badge {
    margin-left: auto;
    background: #E8603A;
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
  }
  .po-nav-sub { padding-left: 28px !important; font-size: 14px !important; }
  .po-nav-chevron { margin-left: auto; font-size: 13.5px; color: #aaaaae; transition: transform 0.2s ease; display: inline-block; }
  .po-nav-chevron.collapsed { transform: rotate(-90deg); }
  .po-agents-submenu { overflow: hidden; max-height: 520px; transition: max-height 0.25s ease; }
  .po-agents-submenu.collapsed { max-height: 0; }
  .sidebar-footer {
    padding: 12px 18px;
    border-top: 1px solid #d8d8dc;
    font-size: 13.5px;
    color: #aaaaae;
  }
  .status-dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #0A9E8A;
    margin-right: 5px;
    box-shadow: 0 0 6px #0A9E8A;
  }
  /* ── MAIN ── */
  .po-main { margin-left: 220px; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
  .po-topbar {
    background: #f3f3f5;
    border-bottom: 1px solid #d8d8dc;
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }
  .po-topbar-title { font-size: 15px; font-weight: 700; color: #111114; }
  .po-topbar-date { font-size: 14px; color: #404048; }
  .po-content { flex: 1; overflow-y: auto; }

  /* ── AGENT GRID CARDS ─────────────────────────────────── */
  .agent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .agent-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
  }
  .agent-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
  .agent-card-header {
    padding: 18px 16px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }
  .agent-card-icon { font-size: 26px; display: flex; align-items: center; }
  .agent-card-icon i { font-size: 26px; color: #fff !important; }
  .agent-card-icon svg { color:#fff; stroke:currentColor; }
  .agent-card-status {
    font-size: 13px;
    font-weight: 700;
    color: #fff !important;
    background: rgba(255,255,255,0.2) !important;
    padding: 3px 8px;
    border-radius: 100px;
  }
  .agent-card-body { padding: 14px 16px 16px; }
  .agent-card-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.01em;
    margin-bottom: 2px;
  }
  .agent-card-role {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 10px;
  }
  .agent-card-desc {
    font-size: 14px;
    color: var(--dim);
    line-height: 1.6;
    margin-bottom: 12px;
  }
  .agent-card-stats {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .agent-card-stat {
    font-size: 13.5px;
    color: var(--dim);
  }
  .agent-card-stat strong { color: var(--white); font-weight: 600; }

  @media (max-width: 1100px) { .agent-grid { grid-template-columns: repeat(2, 1fr); } }

  @media (max-width: 768px) {
    .sidebar { display: none; }
    /* .main's desktop margin-left:var(--sidebar) (220px, set in
       shell-and-shared-ui.css) is never cleared anywhere else once the
       sidebar itself is hidden -- without this, every page on a phone-width
       browser renders with a 220px blank gap on the left and all real
       content squeezed into whatever's left (found 2026-09-05, mobile
       optimization pass). */
    /* .main's desktop height:100vh (shell-and-shared-ui.css) also has to be
       cleared here. On mobile, showing .mobile-nav below .app shrinks .app's
       real flex-resolved height below 100vh (body is a flex column split
       between .app and .mobile-nav) -- but .main keeps forcing itself to the
       full 100vh regardless, and .app's overflow:hidden then clips off
       exactly the bottom slice of .main/.content equal to the mobile nav's
       own height. Every page's last ~70-90px of scrollable content was
       permanently unreachable (not just visually covered -- clipped, so no
       amount of scrolling could reveal it) until this was added (found
       2026-09-05, mobile optimization pass). height:auto lets .main go back
       to stretching to fill .app's actual box, same as align-items:stretch
       already does for it on desktop. */
    .main { margin-left: 0; height: auto; }
    .mobile-nav { display: block; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .agent-grid { grid-template-columns: 1fr; }
    .approval-actions { flex-direction: column; }
    .content { padding: 16px; }
    .topbar { padding: 0 16px; }
    /* Morgan's "Weekly Snapshot + Market Trends" side-by-side cards
       (Marketing > Market Research) are built with inline
       grid-template-columns in Ascent_Dashboard.html, which no external
       rule can beat without !important -- see the mm-weekly-split/
       mm-weekly-kpis comment there (found 2026-09-05, mobile optimization
       pass). Stack the two cards, and drop the 4-across KPI pod row to
       2x2 so each stat has room for its number and label. */
    .mm-weekly-split { grid-template-columns: 1fr !important; }
    .mm-weekly-kpis { grid-template-columns: repeat(2, 1fr) !important; }
    /* Same inline-style situation as mm-weekly-split above: Morgan's
       Median Price/Days on Market/Active Inventory 3-up row
       (#morgan-snapshot-grid, Marketing > Market Research) is
       grid-template-columns:1fr 1fr 1fr inline, squeezing each card's
       city-name/value rows down to a sliver and clipping values like
       "$1.52M" and "58d" (found 2026-09-05, mobile optimization pass). */
    .mm-snapshot-grid { grid-template-columns: 1fr !important; }
  }

