/* ==========================================================================
   pe-design.css — Unified ProAudit Visual Design System
   --------------------------------------------------------------------------
   Tokens + canonical class patterns shared across the ProEstimate web app.
   Pages opt in by adding the `.pe-surface` class to a layout root. Pages
   without `.pe-surface` keep their existing styling.

   Tokens are exposed at :root so any descendant can read them; class
   patterns are scoped to `.pe-surface` so unmigrated pages aren't affected.
   ========================================================================== */

:root {
    /* Surfaces */
    --pe-warm-bg:               #F5F2EC;
    --pe-warm-end:              #EDE8E0;
    --pe-card:                  #FFFFFF;
    --pe-card-dim:              #FAF8F2;
    --pe-card-border:           rgba(90, 74, 53, 0.08);
    --pe-card-border-strong:    rgba(90, 74, 53, 0.15);

    /* Brand */
    --pe-charcoal:              #323232;
    --pe-charcoal-2:            #1a1a1a;
    --pe-orange:                #DD9142;
    --pe-orange-tint:           rgba(221, 145, 66, 0.10);
    --pe-orange-soft:           rgba(221, 145, 66, 0.18);
    --pe-orange-edge:           rgba(221, 145, 66, 0.40);
    --pe-teal:                  #00A69C;
    --pe-teal-tint:             rgba(0, 166, 156, 0.10);
    --pe-teal-soft:             rgba(0, 166, 156, 0.18);
    --pe-red:                   #BF1A2A;
    --pe-red-tint:              rgba(191, 26, 42, 0.06);
    --pe-red-soft:              rgba(191, 26, 42, 0.14);
    --pe-gold:                  #B39332;
    --pe-green:                 #A4CD39;          /* legacy lime (Trial / chip --won) */
    --pe-green-deep:            #4A7C2C;          /* forest, used for audit-grade success states */
    --pe-green-tint:            rgba(74, 124, 44, 0.10);
    --pe-green-soft:            rgba(74, 124, 44, 0.18);

    /* Text */
    --pe-text:                  #323232;
    --pe-text-muted:            rgba(50, 50, 50, 0.78);
    --pe-text-dim:              rgba(50, 50, 50, 0.70);
    --pe-text-faint:            rgba(50, 50, 50, 0.40);

    /* Shadow */
    --pe-shadow:                0 2px 8px rgba(90, 74, 53, 0.08), 0 8px 24px rgba(90, 74, 53, 0.06);
    --pe-shadow-hover:          0 4px 12px rgba(90, 74, 53, 0.12), 0 12px 32px rgba(90, 74, 53, 0.08);
    --pe-shadow-card:           0 1px 3px rgba(90, 74, 53, 0.04);
    --pe-shadow-lg:             0 24px 60px rgba(90, 74, 53, 0.18), 0 8px 24px rgba(90, 74, 53, 0.10);

    /* Radius */
    --pe-radius-sm:             8px;
    --pe-radius:                12px;
    --pe-radius-lg:             14px;

    /* Type */
    --pe-font:                  Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --pe-font-mono:             'Roboto Mono', ui-monospace, SFMono-Regular, monospace;

    /* Motion */
    --pe-ease:                  cubic-bezier(0.2, 0.8, 0.2, 1);
    --pe-t-fast:                160ms;
    --pe-t-med:                 240ms;
}

/* ----- Filter row ----- */
.pe-filters {
    padding: 12px 32px;
    background: var(--pe-warm-bg);
    border-bottom: 1px solid var(--pe-card-border);
    display: flex; align-items: center; gap: 12px;
}
.pe-search {
    flex: 1; max-width: 380px;
    position: relative;
}
.pe-search input {
    width: 100%; padding: 9px 12px 9px 34px;
    border-radius: var(--pe-radius-sm);
    border: 1px solid var(--pe-card-border);
    background: var(--pe-card);
    font-family: inherit; font-size: 13px;
    color: var(--pe-text);
    transition: all var(--pe-t-fast) var(--pe-ease);
}
.pe-search input::placeholder {
    color: var(--pe-text-dim); font-style: italic;
}
.pe-search input:focus {
    outline: none;
    border-color: var(--pe-orange);
    box-shadow: 0 0 0 3px var(--pe-orange-tint);
}

/* ----- Activity ----- */
.pe-activity {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 14px;
}

/* ----- Editable values (inline-edit affordance) ----- */
.pe-editable {
    display: inline-block;
    cursor: pointer;
    border-bottom: 1px dashed var(--pe-orange-edge);
    padding-bottom: 1px;
    transition: all var(--pe-t-fast) var(--pe-ease);
    border-radius: 2px;
}
.pe-editable:hover,
.pe-editable:focus {
    background: var(--pe-orange-tint);
    border-bottom-color: var(--pe-orange);
    outline: none;
}
.pe-editable--editing {
    width: 100%;
    border: 1px solid var(--pe-orange);
    border-radius: var(--pe-radius-sm);
    background: var(--pe-card);
    box-shadow: 0 0 0 3px var(--pe-orange-tint);
    padding: 4px 8px;
    font: inherit; color: inherit;
    outline: none;
}
.pe-editable--saving {
    background: var(--pe-orange-tint);
}
