/* ─────────────────────────────────────────────────────────────
   Paradise Pools CRM — theme.css
      ─────────────────────────────────────────────────────────────
         Warm-stone palette with slate-teal accent and deep teal-navy sidebar.
            This file loads AFTER app.css and overrides the colour scheme only.
               No layout, spacing, or behaviour changes.

                  To revert: remove the <link> tag for theme.css from index.html.
                     ───────────────────────────────────────────────────────────── */


/* ─── Root palette overrides ─────────────────────────────── */
:root {
    /* Warm shadcn-stone foundation */
    --bg:          #FAF8F3;   /* warm off-white page background */
    --border:      #E5E2D8;   /* warm hairline border */
    --text:        #1A1A1A;   /* primary text */
    --text-muted:  #6B6960;   /* secondary text — warm grey */

    /* Slate-teal accent system */
    --ocean:       #0F766E;   /* primary accent — buttons, links, focus */
    --ocean-deep:  #0F2E2C;   /* deep teal-navy — sidebar background */
    --aqua:        #5EEAD4;   /* bright teal — active nav on dark sidebar */
    --aqua-light:  #E1F5EE;   /* soft teal tint */
    --sand:        #FAF8F3;
}


/* ─── Logo mark: solid teal block (was gradient) ─────────── */
.logo-mark {
    background: #14B8A6;
}


/* ─── Sidebar active states ──────────────────────────────── */
/* On the dark teal-navy sidebar, the active nav and active stage
   filter need a BRIGHT teal so they pop against the dark background.
      Original used dark aqua which would disappear on the new sidebar. */
.nav-item.active {
    background: rgba(94, 234, 212, 0.10);
    color: #5EEAD4;
}
.nav-item.active:hover {
    background: rgba(94, 234, 212, 0.14);
}

.stage-filter.active {
    background: rgba(94, 234, 212, 0.10);
    color: #5EEAD4;
}


/* ─── KPI stat cards ─────────────────────────────────────── */
/* Kill the four colour-gradient top stripes (aqua/green/gold/red).
   Cards become uniform white-on-warm-stone with hairline borders.
      The hierarchy comes from one teal hero number, not stripes. */
.stat-card::before {
    display: none;
}
.stat-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
}

/* Pipeline Value — the single teal hero number on the dashboard.
   accent-green is the class the HTML uses on the Pipeline Value tile. */
.stat-card.accent-green .stat-value {
    color: #0F766E;
}


/* ─── Buttons ────────────────────────────────────────────── */
/* Primary button stays teal (via --ocean override above).
   Hover transitions to deeper teal-navy for a darker press feel. */
.btn-primary:hover {
    background: var(--ocean-deep);
}


/* ─── Form focus rings — teal instead of ocean-blue ──────── */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #0F766E;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.search-box:focus-within {
    border-color: #0F766E;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}


/* ─── Follow-up tabs ─────────────────────────────────────── */
.fu-tab:hover {
    border-color: #0F766E;
    color: #0F766E;
}
.fu-tab.active {
    background: #0F766E;
    border-color: #0F766E;
}


/* ─── Hover shadows: teal-tinted instead of blue-tinted ──── */
/* Original used rgba(0,119,182, …) which was the old ocean blue.
   Update to match the new accent so coloured shadows look right. */
.kanban-card:hover {
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.10);
}
.funnel-item:hover {
    box-shadow: 0 2px 12px rgba(15, 118, 110, 0.08);
}
.lead-card:hover {
    box-shadow: 0 2px 12px rgba(15, 118, 110, 0.06);
}


/* ─── Small accent details ───────────────────────────────── */
/* History arrow in the stage-history list */
.history-arrow {
    color: #0F766E;
}

/* Kanban card quote amount */
.kanban-card-quote {
    color: #0F766E;
}


/* ─── Success toast — match the teal accent ──────────────── */
.toast.success {
    background: #0F766E;
}


/* ─── Mobile header — match new sidebar colour ───────────── */
/* .mobile-header uses var(--ocean-deep) so it picks up the deep
   teal-navy automatically. No override needed. Listed here for clarity. */


/* ─── End of theme.css ───────────────────────────────────── */


/* === Phase 1.5 additions =============================== */

/* Desktop scale-up for 27" screens (1600px+ viewport).
   Laptop and mobile sizes are unaffected. */
@media (min-width: 1600px) {
     html, body { font-size: 16px; }
     .view-title { font-size: 2rem; }
     .stat-label { font-size: 0.78rem; }
     .stat-value { font-size: 2.2rem; }
     .filter-label { font-size: 0.75rem; }
     .nav-item { font-size: 0.95rem; }
     .stage-filter { font-size: 0.88rem; }
     .funnel-stage-name { font-size: 0.82rem; }
     .funnel-count { font-size: 1.9rem; }
     .section-title { font-size: 1.1rem; }
     .lead-card-name { font-size: 1rem; }
     .lead-card-meta { font-size: 0.85rem; }
     .leads-table { font-size: 0.9rem; }
     .leads-table th { font-size: 0.75rem; }
     .kanban-card-name { font-size: 0.9rem; }
     .kanban-card-suburb { font-size: 0.8rem; }
     .form-group label { font-size: 0.82rem; }
     .form-group input,
     .form-group select,
     .form-group textarea { font-size: 0.92rem; }
}

/* Calendar chip rework — soft tinted backgrounds with dark text.
   Same pattern that's already working in the iPhone agenda view.
   !important needed because Phase 5c/5d inject styles after this loads. */
.ph5c-chip-followup {
     background: #DBEAFE !important;
     color: #1E3A8A !important;
}
.ph5c-chip-sitevisit {
     background: #EDE9FE !important;
     color: #4C1D95 !important;
}
.ph5c-chip-personal {
     background: #D1FAE5 !important;
     color: #064E3B !important;
}
.ph5c-agenda-entry.ph5c-chip-followup {
     background: #DBEAFE !important;
     border-left-color: #1E3A8A !important;
}
.ph5c-agenda-entry.ph5c-chip-sitevisit {
     background: #EDE9FE !important;
     border-left-color: #6B21A8 !important;
}
.ph5c-agenda-entry.ph5c-chip-personal {
     background: #D1FAE5 !important;
     border-left-color: #064E3B !important;
}

/* Sage-tinted calendar — scoped to calendar view only.
   So pale it almost reads off-white, but enough hue to make
   white event cards pop forward and signal calendar context. */
#view-calendar { background: #F1F6EE; }
.ph5c-day-cell.ph5c-weekend { background: #F8FAF6 !important; }
.ph5c-day-cell.ph5c-pad-day { background: #ECF1E8 !important; }
.ph5c-month-grid {
     background: #DCE8D6 !important;
     border-color: #DCE8D6 !important;
}
.ph5c-agenda-group {
     background: #FFFFFF !important;
     border-color: #E5E2D8 !important;
}


/* Phase 1.5 v2: calendar refinement — subtle sage tint on cells +
   stronger grid lines so the structure reads. Today (.ph5c-today)
   keeps its amber pill via :not() selector. */
.ph5c-day-cell:not(.ph5c-today) { background: #F7FAF4 !important; }
.ph5c-day-cell.ph5c-weekend { background: #F1F6EC !important; }
.ph5c-day-cell.ph5c-pad-day { background: #E2EBD9 !important; }
.ph5c-month-grid {
     background: #BFD2B7 !important;
     border-color: #A7BD9D !important;
}


/* Phase 1.5 v3: bolder calendar chips for desktop visibility.
   Black text + medium-tinted backgrounds + saturated accent left stripe.
   Mimics the iPhone agenda card pattern. */
.ph5c-chip-followup {
     background: #BFDBFE !important;
     color: #0F172A !important;
     box-shadow: inset 3px 0 0 #1D4ED8 !important;
     padding-left: 0.6rem !important;
}
.ph5c-chip-sitevisit {
     background: #DDD6FE !important;
     color: #0F172A !important;
     box-shadow: inset 3px 0 0 #6D28D9 !important;
     padding-left: 0.6rem !important;
}
.ph5c-chip-personal {
     background: #A7F3D0 !important;
     color: #064E3B !important;
     box-shadow: inset 3px 0 0 #047857 !important;
     padding-left: 0.6rem !important;
}


/* Phase 1.5 v4: calendar cells get a real sage tint.
   v2's near-white (#F7FAF4) still read as white and felt glary.
   Cells are now clearly sage — calm green-toned surface with
   the chips as the bright spots. */
.ph5c-day-cell:not(.ph5c-today) { background: #E5EEDC !important; }
.ph5c-day-cell.ph5c-weekend { background: #DDE7D1 !important; }
.ph5c-day-cell.ph5c-pad-day { background: #D2E0C5 !important; }
#view-calendar { background: #E5EEDC !important; }
.ph5c-month-grid {
     background: #ABC29D !important;
     border-color: #9DB690 !important;
}


/* Phase 1.5 v5: calendar legibility pass.
   Prominent weekday headers, clearer date numbers, defined grid
   lines, sharper event text, full-height calendar (no white band). */
.ph5c-weekday-label {
     color: #0F2E2C !important;
     font-weight: 700 !important;
     font-size: 0.8rem !important;
     background: #C3D4B8 !important;
}
.ph5c-day-cell:not(.ph5c-today):not(.ph5c-pad-day) .ph5c-day-number {
     color: #1A2332 !important;
     font-weight: 700 !important;
}
.ph5c-month-grid {
     background: #6E8862 !important;
     border-color: #5E7853 !important;
}
.ph5c-event-chip {
     font-size: 0.8rem !important;
     padding: 0.3rem 0.5rem 0.3rem 0.6rem !important;
}
.ph5c-day-cell { min-height: 150px !important; }
#view-calendar { min-height: 100vh !important; }


/* Phase 1.5 v6: calendar filter chips (Follow-ups / Site visits /
   Personal) had mid-grey normal-weight text — a squint to read.
   Darker, bolder text on the inactive chips; active chip untouched. */
.ph5c-filter-chip:not(.ph5c-filter-active) {
     color: #1A2332 !important;
     font-weight: 600 !important;
     border-color: #C9CFC0 !important;
}


/* Phase 1.5 v7: nudge the calendar green a little darker. */
.ph5c-day-cell:not(.ph5c-today) { background: #D7E3C6 !important; }
.ph5c-day-cell.ph5c-weekend { background: #CEDCBC !important; }
.ph5c-day-cell.ph5c-pad-day { background: #C2D3AE !important; }
#view-calendar { background: #D7E3C6 !important; }


/* === Agenda view: centred layout, white cards, deepened event colours (2026-05-16) === */
.ph5c-agenda,.ph5c-header:has(+ .ph5c-agenda){max-width:1000px !important;margin-left:auto !important;margin-right:auto !important;}.ph5c-agenda{gap:1.25rem !important;}.ph5c-agenda-group{background:#FFFFFF !important;border:1px solid #E5E2D8 !important;border-radius:8px !important;box-shadow:0 1px 3px rgba(30,45,25,0.1) !important;padding:0.85rem !important;}.ph5c-agenda-section-label{display:inline-block !important;background:#0F766E !important;color:#FFFFFF !important;padding:0.22rem 0.7rem !important;border-radius:5px !important;border-bottom:none !important;margin-bottom:0.6rem !important;font-size:0.72rem !important;letter-spacing:0.04em !important;}.ph5c-agenda-entry{border:1px solid rgba(15,23,42,0.2) !important;}.ph5c-agenda-entry.ph5c-chip-followup{background:#BFDBFE !important;}.ph5c-agenda-entry.ph5c-chip-sitevisit{background:#DDD6FE !important;}.ph5c-agenda-entry.ph5c-chip-personal{background:#A7F3D0 !important;}
