/*
 * CUSTOMER PORTAL v4.0 — Luxury Premium
 * DEV MODE: customer.css
 *
 * DESIGN DNA:
 * 1. SHARP 90deg CORNERS EVERYWHERE — matches rest of Infinite Renovations site
 * 2. Luxury warm cream palette — linen background, terracotta accents, navy headers
 * 3. SOLID surfaces — NO glass/blur on main content
 * 4. Premium typography — Inter, high contrast, generous spacing
 * 5. Apple-grade animation — subtle, no bounce, no generic
 *
 * V4 Luxury Premium Design DNA — Palette Preview Reference
 */

/* ========================================
   1. DESIGN TOKENS + BODY
   ======================================== */

body.customer-portal {
    /* Core palette */
    --linen: #FAF3E1;
    --card-white: #FFFDF8;
    --ivory: #F0E6D3;
    --terracotta: #D4845A;
    --terracotta-hover: #C07248;
    --peach-cream: #F5D5B8;
    --espresso: #2B2520;
    --navy: #0F2A4A;
    --navy-light: #153558;
    --heading: #1E1B18;
    --body-text: #4A443D;
    --muted: #8A8078;

    /* Functional colors */
    --green: #22C55E;
    --green-light: rgba(34, 197, 94, 0.08);
    --red: #E85A6B;

    /* Glow colors per section — unified terracotta brand */
    --glow-project-overview: #D4845A;
    --glow-timeline: #D4845A;
    --glow-estimate: #D4845A;
    --glow-messages: #D4845A;
    --glow-photos: #D4845A;
    --glow-documents: #D4845A;
    --glow-faq: #D4845A;
    --glow-emergency: #E85A6B;

    /* Easing */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* Separator */
    --separator: rgba(30, 27, 24, 0.08);

    /* Luxury linen background */
    background: #FAF3E1 !important;
    color: var(--body-text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background — Warm aurora gradient on cream */
body.customer-portal::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 800px 600px at 15% 10%, rgba(212, 132, 90, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 600px 700px at 85% 20%, rgba(212, 132, 90, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 700px 500px at 50% 80%, rgba(245, 213, 184, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 500px 500px at 25% 60%, rgba(212, 132, 90, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 400px 400px at 70% 65%, rgba(245, 213, 184, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Noise overlay */
body.customer-portal::after {
    content: "";
    position: fixed;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   2. APP CONTAINER
   ======================================== */

body.customer-portal .app-container {
    max-width: 660px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 80px;
    position: relative;
    z-index: 1;
}

/* ========================================
   3. DEV BANNER
   ======================================== */

body.customer-portal .dev-banner {
    background: rgba(212, 132, 90, 0.08);
    color: var(--terracotta);
    text-align: center;
    padding: 5px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ========================================
   4. HEADER — Navy premium bar
   ======================================== */

body.customer-portal .app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px;
    background: var(--navy);
    border: none;
    border-bottom: 3px solid var(--terracotta);
    position: relative;
    box-shadow: 0 4px 24px rgba(43, 37, 32, 0.12);
}

body.customer-portal .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.customer-portal .logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #FFFFFF;
    text-shadow: none;
}

body.customer-portal .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.customer-portal .greeting {
    font-size: 17px;
    color: rgba(250, 243, 225, 0.7);
    font-weight: 400;
    text-shadow: none;
}

body.customer-portal .greeting strong {
    color: #FAF3E1;
    -webkit-text-fill-color: #FAF3E1;
    font-weight: 700;
    text-shadow: none;
}

/* Sign Out Button */
body.customer-portal .sign-out-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(250, 243, 225, 0.1);
    border: 1px solid rgba(250, 243, 225, 0.15);
    color: rgba(250, 243, 225, 0.6);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    flex-shrink: 0;
}

body.customer-portal .sign-out-btn:hover {
    background: rgba(232, 90, 107, 0.15);
    border-color: rgba(232, 90, 107, 0.3);
    color: #E85A6B;
}

/* Licensed & Insured badge */
body.customer-portal .licensed-badge {
    background: var(--terracotta);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 0;
}

/* ========================================
   5. PORTAL SUBTITLE — Terracotta eyebrow
   ======================================== */

body.customer-portal .portal-subtitle {
    padding: 20px 28px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--terracotta);
    text-shadow: none;
}

/* ========================================
   6. GLASS MENU — Premium solid card
   ======================================== */

body.customer-portal .glass-menu {
    margin: 8px 12px 0;
    background: var(--card-white);
    border-radius: 0;
    border: 1px solid rgba(30, 27, 24, 0.08);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(43, 37, 32, 0.08);
    position: relative;
}

/* Remove pseudo elements — no glass effects */
body.customer-portal .glass-menu::before,
body.customer-portal .glass-menu::after {
    display: none;
}

/* ========================================
   7. MENU ITEMS — Rows
   ======================================== */

body.customer-portal .menu-item {
    --menu-glow-color: var(--terracotta);
    border-bottom: 1px solid rgba(30, 27, 24, 0.06);
    position: relative;
}

/* Remove the pseudo element refraction line */
body.customer-portal .menu-item::after {
    display: none;
}

body.customer-portal .menu-item:last-child {
    border-bottom: none;
}

/* Per-section glow colors */
body.customer-portal .menu-item[data-section="project-overview"] { --menu-glow-color: var(--glow-project-overview); }
body.customer-portal .menu-item[data-section="timeline"] { --menu-glow-color: var(--glow-timeline); }
body.customer-portal .menu-item[data-section="estimate"] { --menu-glow-color: var(--glow-estimate); }
body.customer-portal .menu-item[data-section="messages"] { --menu-glow-color: var(--glow-messages); }
body.customer-portal .menu-item[data-section="photos"] { --menu-glow-color: var(--glow-photos); }
body.customer-portal .menu-item[data-section="documents"] { --menu-glow-color: var(--glow-documents); }
body.customer-portal .menu-item[data-section="faq"] { --menu-glow-color: var(--glow-faq); }
body.customer-portal .menu-item[data-section="emergency"] { --menu-glow-color: var(--glow-emergency); }

/* ========================================
   8. MENU ITEM HEADER — Premium clickable row
   ======================================== */

body.customer-portal .menu-item-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 28px;
    cursor: pointer;
    transition: all 0.35s var(--ease);
    position: relative;
    border-left: 3px solid transparent;
}

/* HOVER — terracotta left accent */
body.customer-portal .menu-item-header:hover {
    background: rgba(212, 132, 90, 0.04);
    border-left: 3px solid var(--terracotta);
}

/* EXPANDED — Navy background with white text */
body.customer-portal .menu-item.expanded .menu-item-header {
    background: var(--navy);
    border-bottom: 1px solid rgba(30, 27, 24, 0.06);
    border-left: 3px solid transparent;
}

/* ========================================
   9. MENU ICON — Terracotta accent
   ======================================== */

body.customer-portal .menu-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--terracotta);
    stroke-width: 1.8;
    transition: all 0.35s var(--ease);
    filter: none;
}

body.customer-portal .menu-item-header:hover .menu-icon {
    color: var(--terracotta-hover);
    filter: none;
}

body.customer-portal .menu-item.expanded .menu-icon {
    color: var(--peach-cream);
    filter: drop-shadow(0 0 10px rgba(245, 213, 184, 0.4));
}

/* ========================================
   10. MENU LABEL — Premium typography
   ======================================== */

body.customer-portal .menu-label {
    flex: 1;
    font-size: 20px;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.3px;
    transition: all 0.35s var(--ease);
    text-shadow: none;
}

body.customer-portal .menu-item-header:hover .menu-label {
    text-shadow: none;
}

body.customer-portal .menu-item.expanded .menu-label {
    color: #FAF3E1;
    font-weight: 800;
    text-shadow: none;
}

/* ========================================
   11. MENU BADGE (Messages count)
   ======================================== */

body.customer-portal .menu-badge {
    background: var(--terracotta);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 800;
    min-width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 0;
    box-shadow: 0 0 12px rgba(212, 132, 90, 0.4);
}

/* ========================================
   12. CHEVRON
   ======================================== */

body.customer-portal .menu-chevron {
    width: 20px;
    height: 20px;
    color: var(--muted);
    flex-shrink: 0;
    transition: all 0.35s var(--ease);
}

body.customer-portal .menu-item-header:hover .menu-chevron {
    color: var(--terracotta);
}

body.customer-portal .menu-item.expanded .menu-chevron {
    transform: rotate(180deg);
    color: #FAF3E1;
}

/* ========================================
   13. MENU ITEM CONTENT — Accordion body
   ======================================== */

body.customer-portal .menu-item-content {
    height: 0;
    overflow: hidden;
    transition: height 0.4s var(--ease);
}

body.customer-portal .content-inner {
    padding: 24px 28px;
    background: var(--card-white);
    opacity: 0;
    transform: translateY(-4px);
    transition:
        opacity 0.35s var(--ease) 0.06s,
        transform 0.35s var(--ease) 0.06s;
}

body.customer-portal .menu-item.expanded .content-inner {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   14. PROJECT OVERVIEW — Expanded content
   ======================================== */

body.customer-portal .project-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--heading);
    margin: 0 0 6px;
    line-height: 1.15;
    text-shadow: none;
}

body.customer-portal .project-address {
    font-size: 16px;
    color: var(--muted);
    margin: 0 0 18px;
    font-weight: 400;
    text-shadow: none;
}

/* ========================================
   15. STATUS CHIP — Premium bordered
   ======================================== */

body.customer-portal .status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    border-radius: 0;
    margin-bottom: 20px;
}

body.customer-portal .status-chip.in-progress {
    background: rgba(34, 197, 94, 0.08);
    color: var(--green);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ========================================
   16. PROGRESS SECTION — Premium bar
   ======================================== */

body.customer-portal .progress-section {
    margin-bottom: 18px;
}

body.customer-portal .progress-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 10px;
    letter-spacing: 0.2px;
    text-shadow: none;
}

body.customer-portal .progress-bar {
    height: 8px;
    background: var(--ivory);
    border-radius: 0;
    overflow: visible;
    position: relative;
}

body.customer-portal .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--terracotta), var(--green));
    border-radius: 0;
    transition: width 1s var(--ease);
    position: relative;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.4), 0 0 4px rgba(34, 197, 94, 0.6);
}

/* Glowing endpoint */
body.customer-portal .progress-bar-fill::after {
    content: "";
    position: absolute;
    right: -5px;
    top: -4px;
    width: 14px;
    height: 14px;
    background: var(--green);
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.7), 0 0 6px rgba(34, 197, 94, 0.9);
}

/* ========================================
   17. NEXT STEP CARD — Solid luxury inner card
   ======================================== */

body.customer-portal .next-step {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    margin-bottom: 22px;
    background: var(--ivory);
    border: 1px solid rgba(30, 27, 24, 0.06);
    border-radius: 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(43, 37, 32, 0.06);
}

body.customer-portal .next-step-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #D4845A, #F5D5B8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    border-radius: 0;
    filter: drop-shadow(0 4px 16px rgba(212, 132, 90, 0.3));
}

body.customer-portal .next-step-content {
    flex: 1;
}

body.customer-portal .next-step-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.3px;
    text-shadow: none;
}

body.customer-portal .next-step-date {
    font-size: 16px;
    color: var(--muted);
    margin-top: 4px;
    text-shadow: none;
}

body.customer-portal .next-step-countdown {
    font-size: 16px;
    font-weight: 700;
    color: var(--green);
    margin-top: 4px;
    text-shadow: none;
}

/* ========================================
   18. TRUST INLINE
   ======================================== */

body.customer-portal .trust-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    font-size: 16px;
    color: var(--muted);
    border-top: 1px solid rgba(30, 27, 24, 0.06);
    margin-bottom: 16px;
    text-shadow: none;
}

body.customer-portal .trust-inline-icon {
    font-size: 20px;
    opacity: 0.6;
}

/* ========================================
   19. TIMELINE
   ======================================== */

body.customer-portal .timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 28px;
}

/* Vertical connector line */
body.customer-portal .timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: rgba(30, 27, 24, 0.10);
}

body.customer-portal .timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    position: relative;
}

body.customer-portal .timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 0;
    flex-shrink: 0;
    margin-top: 4px;
    position: absolute;
    left: -24px;
}

body.customer-portal .timeline-dot.complete {
    background: var(--green);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

body.customer-portal .timeline-dot.current {
    background: var(--terracotta);
    box-shadow: 0 0 0 3px rgba(212, 132, 90, 0.2), 0 0 8px rgba(212, 132, 90, 0.35);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(212, 132, 90, 0.2), 0 0 8px rgba(212, 132, 90, 0.35); }
    50% { box-shadow: 0 0 0 5px rgba(212, 132, 90, 0.08), 0 0 16px rgba(212, 132, 90, 0.45); }
}

body.customer-portal .timeline-dot.pending {
    background: transparent;
    border: 1.5px solid rgba(30, 27, 24, 0.15);
}

body.customer-portal .timeline-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--body-text);
    text-shadow: none;
}

body.customer-portal .timeline-date {
    font-size: 16px;
    color: var(--muted);
    margin-top: 3px;
    text-shadow: none;
}

/* ========================================
   20. ESTIMATE SECTION
   ======================================== */

body.customer-portal .type-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 0;
    margin-bottom: 18px;
}

body.customer-portal .type-chip.roofing {
    background: rgba(245, 137, 42, 0.10);
    color: #F5892A;
    border: 1px solid rgba(245, 137, 42, 0.2);
}

body.customer-portal .estimate-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

body.customer-portal .estimate-list li {
    padding: 10px 0;
    font-size: 20px;
    font-weight: 500;
    color: var(--body-text);
    border-bottom: 1px solid rgba(30, 27, 24, 0.04);
    text-shadow: none;
}

body.customer-portal .estimate-list li:last-child {
    border-bottom: none;
}

body.customer-portal .estimate-total {
    text-align: center;
    margin-bottom: 20px;
    padding: 22px 0;
    border-top: 1px solid rgba(30, 27, 24, 0.06);
    border-bottom: 1px solid rgba(30, 27, 24, 0.06);
}

body.customer-portal .estimate-range {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--terracotta);
    text-shadow: none;
}

body.customer-portal .estimate-note {
    font-size: 16px;
    color: var(--muted);
    margin-top: 6px;
    text-shadow: none;
}

/* ========================================
   21. MESSAGES SECTION
   ======================================== */

body.customer-portal .chat-subtitle {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 14px;
    letter-spacing: 0.2px;
    text-shadow: none;
}

body.customer-portal .chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 200px;
    padding-right: 4px;
}

body.customer-portal .chat-message {
    display: flex;
    flex-direction: column;
}

body.customer-portal .chat-message.sent {
    align-items: flex-end;
}

body.customer-portal .chat-message.received {
    align-items: flex-start;
}

body.customer-portal .chat-bubble {
    padding: 14px 18px;
    font-size: 18px;
    line-height: 1.5;
    max-width: 85%;
    border-radius: 0;
    text-shadow: none;
}

body.customer-portal .chat-message.sent .chat-bubble {
    background: rgba(212, 132, 90, 0.15);
    color: var(--heading);
    border: 1px solid rgba(212, 132, 90, 0.2);
}

body.customer-portal .chat-message.received .chat-bubble {
    background: rgba(30, 27, 24, 0.03);
    color: var(--body-text);
    border: 1px solid rgba(30, 27, 24, 0.06);
}

body.customer-portal .chat-time {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
    padding: 0 2px;
}

body.customer-portal .ai-disclaimer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(30, 27, 24, 0.04);
    font-size: 14px;
    color: var(--muted);
}

/* ========================================
   22. PHOTO TABS — Sharp tabs
   ======================================== */

body.customer-portal .photo-tabs {
    display: flex;
    gap: 1px;
    margin-bottom: 14px;
    background: rgba(30, 27, 24, 0.03);
    border: 1px solid rgba(30, 27, 24, 0.06);
}

body.customer-portal .photo-tab {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    border-radius: 0;
    text-shadow: none;
}

body.customer-portal .photo-tab:hover {
    background: rgba(30, 27, 24, 0.03);
    color: var(--body-text);
}

body.customer-portal .photo-tab.active {
    background: rgba(212, 132, 90, 0.10);
    color: var(--heading);
    border-bottom: 2px solid var(--terracotta);
}

/* ========================================
   23. MEDIA GRID
   ======================================== */

body.customer-portal .media-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

body.customer-portal .media-item {
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    border: 1px solid rgba(30, 27, 24, 0.06);
    border-radius: 0;
}

body.customer-portal .media-item:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 4px 16px rgba(43, 37, 32, 0.15));
}

/* ========================================
   23b. CUSTOMER PHOTO CARDS
   ======================================== */

body.customer-portal .customer-photo-card {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(250, 243, 225, 0.02);
    border: 1px solid rgba(30, 27, 24, 0.06);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    margin-bottom: 2px;
}

body.customer-portal .customer-photo-card:hover {
    background: rgba(212, 132, 90, 0.04);
    border-color: rgba(212, 132, 90, 0.15);
}

body.customer-portal .customer-photo-thumb {
    width: 64px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

body.customer-portal .customer-photo-info {
    flex: 1;
    min-width: 0;
}

body.customer-portal .customer-photo-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.customer-portal .customer-photo-meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

body.customer-portal .photo-shared-badge {
    display: inline-block;
    padding: 1px 6px;
    font-size: 9px;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

body.customer-portal .customer-upload-status {
    display: inline-block;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

body.customer-portal .customer-upload-status.status-pending {
    background: rgba(234, 179, 8, 0.08);
    color: #ca8a04;
    border: 1px solid rgba(234, 179, 8, 0.15);
}

body.customer-portal .customer-upload-status.status-approved {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

/* ========================================
   24. DOCUMENTS
   ======================================== */

body.customer-portal .documents-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.customer-portal .doc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(30, 27, 24, 0.02);
    border: 1px solid rgba(30, 27, 24, 0.06);
    border-radius: 0;
    transition: background 0.2s var(--ease);
}

body.customer-portal .doc-item:hover {
    background: rgba(30, 27, 24, 0.04);
}

body.customer-portal .doc-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 132, 90, 0.12);
    color: var(--terracotta);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    border-radius: 0;
}

body.customer-portal .doc-info {
    flex: 1;
    min-width: 0;
}

body.customer-portal .doc-name {
    font-size: 19px;
    font-weight: 600;
    color: var(--body-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: none;
}

body.customer-portal .doc-size {
    font-size: 15px;
    color: var(--muted);
    margin-top: 2px;
}

body.customer-portal .doc-item .btn-sm {
    padding: 8px 14px;
    font-size: 14px;
    flex-shrink: 0;
}

/* ========================================
   25. FAQ SECTION
   ======================================== */

body.customer-portal .help-subtitle {
    font-size: 18px;
    color: var(--muted);
    margin: 0 0 16px;
    text-shadow: none;
}

body.customer-portal .faq-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-bottom: 16px;
}

body.customer-portal .faq-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

body.customer-portal .faq-category-label {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    text-shadow: none;
}

body.customer-portal .faq-category-line {
    flex: 1;
    height: 1px;
    background: rgba(30, 27, 24, 0.06);
}

body.customer-portal .faq-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    background: rgba(30, 27, 24, 0.02);
    border: 1px solid rgba(30, 27, 24, 0.04);
    border-radius: 0;
    transition: background 0.2s var(--ease);
}

body.customer-portal .faq-item:hover {
    background: rgba(30, 27, 24, 0.04);
}

body.customer-portal .faq-question {
    font-size: 19px;
    font-weight: 500;
    color: var(--body-text);
    text-shadow: none;
}

body.customer-portal .faq-arrow {
    font-size: 14px;
    color: var(--muted);
    transition: transform 0.2s var(--ease);
}

body.customer-portal .faq-item.expanded .faq-arrow {
    transform: rotate(180deg);
}

body.customer-portal .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
}

body.customer-portal .faq-answer.open {
    max-height: 200px;
}

body.customer-portal .faq-answer-text {
    padding: 14px 16px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--body-text);
    background: rgba(30, 27, 24, 0.02);
    border: 1px solid rgba(30, 27, 24, 0.04);
    border-top: none;
    text-shadow: none;
}

body.customer-portal .faq-answer-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 15px;
    color: var(--muted);
}

body.customer-portal .faq-feedback-btn {
    background: rgba(30, 27, 24, 0.03);
    border: 1px solid rgba(30, 27, 24, 0.06);
    color: var(--muted);
    padding: 6px 12px;
    font-size: 15px;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.15s var(--ease);
}

body.customer-portal .faq-feedback-btn:hover {
    background: rgba(30, 27, 24, 0.06);
}

/* ========================================
   26. HELP INPUT
   ======================================== */

body.customer-portal .help-input-area {
    display: flex;
    gap: 6px;
}

body.customer-portal .help-input-area .form-input {
    flex: 1;
}

/* ========================================
   27. EMERGENCY CONTACT
   ======================================== */

body.customer-portal .emergency-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.customer-portal .footer-phone {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: var(--heading);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.2s var(--ease);
    text-shadow: none;
}

body.customer-portal .footer-phone:hover {
    color: var(--terracotta);
}

body.customer-portal .footer-email {
    font-size: 20px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s var(--ease);
    text-shadow: none;
}

body.customer-portal .footer-email:hover {
    color: var(--terracotta);
}

body.customer-portal .footer-notes {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

body.customer-portal .footer-notes li {
    padding: 6px 0;
    font-size: 17px;
    color: var(--muted);
    text-shadow: none;
}

/* ========================================
   28. TRUST BADGES — Premium bordered terracotta
   ======================================== */

body.customer-portal .trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 16px 12px;
}

body.customer-portal .trust-badge {
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 0;
    background: transparent;
    color: var(--terracotta);
    border: 1px solid var(--terracotta);
    text-shadow: none;
}

/* Override color variants — all badges are terracotta now */
body.customer-portal .trust-badge.green,
body.customer-portal .trust-badge.blue,
body.customer-portal .trust-badge.purple {
    background: transparent;
    color: var(--terracotta);
    border: 1px solid var(--terracotta);
}

/* ========================================
   29. BUTTONS — Solid luxury
   ======================================== */

body.customer-portal .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.4;
    text-decoration: none;
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    border-radius: 0;
}

body.customer-portal .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

body.customer-portal .btn-primary {
    background: var(--terracotta);
    color: var(--card-white);
    border: none;
    padding: 16px 28px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 0;
    text-shadow: none;
    position: relative;
}

/* Remove glass shine pseudo element */
body.customer-portal .btn-primary::before {
    display: none;
}

body.customer-portal .btn-primary:hover:not(:disabled) {
    background: var(--terracotta-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(212, 132, 90, 0.25);
}

body.customer-portal .btn-secondary {
    background: transparent;
    color: var(--terracotta);
    border: 2px solid var(--terracotta);
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 0;
    position: relative;
    text-shadow: none;
}

/* Remove glass shine pseudo element */
body.customer-portal .btn-secondary::before {
    display: none;
}

body.customer-portal .btn-secondary:hover:not(:disabled) {
    background: rgba(212, 132, 90, 0.08);
    transform: translateY(-2px);
}

body.customer-portal .btn-full {
    width: 100%;
}

body.customer-portal .btn-lg {
    padding: 18px 28px;
    font-size: 16px;
}

body.customer-portal .btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

/* ========================================
   30. REVIEW BUTTON — Solid espresso
   ======================================== */

body.customer-portal .review-btn {
    display: block;
    margin: 0 auto 28px;
    padding: 18px 40px;
    background: var(--espresso);
    color: #FAF3E1;
    border: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    border-radius: 0;
    position: relative;
    text-shadow: none;
}

/* Remove glass shine pseudo element */
body.customer-portal .review-btn::before {
    display: none;
}

body.customer-portal .review-btn:hover {
    background: #3D352E;
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(43, 37, 32, 0.25);
}

/* ========================================
   31. FORM INPUTS — Solid luxury
   ======================================== */

body.customer-portal .form-input {
    background: var(--card-white);
    border: 1px solid rgba(30, 27, 24, 0.10);
    color: var(--heading);
    padding: 14px 18px;
    font-family: inherit;
    font-size: 18px;
    outline: none;
    transition: border-color 0.2s var(--ease);
    border-radius: 0;
}

body.customer-portal .form-input:focus {
    border-color: var(--terracotta);
}

body.customer-portal .form-input::placeholder {
    color: var(--muted);
}

/* ========================================
   32. SEND BUTTON (Help section)
   ======================================== */

body.customer-portal .send-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--terracotta);
    border: none;
    color: #FFFFFF;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    flex-shrink: 0;
    border-radius: 0;
    padding: 0;
}

body.customer-portal .send-btn:hover {
    background: var(--terracotta-hover);
}

/* ========================================
   33. CHAT WIDGET — Floating panel
   ======================================== */

/* Trigger button — solid terracotta */
body.customer-portal .chat-widget-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    background: var(--terracotta);
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s var(--ease);
    box-shadow: 0 8px 24px rgba(212, 132, 90, 0.30);
}

body.customer-portal .chat-widget-trigger:hover {
    background: var(--terracotta-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(212, 132, 90, 0.3);
}

body.customer-portal .chat-widget-trigger.open {
    background: var(--espresso);
    box-shadow: 0 8px 24px rgba(43, 37, 32, 0.3);
}

body.customer-portal .widget-chat-icon,
body.customer-portal .widget-close-icon {
    width: 22px;
    height: 22px;
    fill: #FFFFFF;
    position: absolute;
    transition: opacity 0.2s, transform 0.2s;
}

body.customer-portal .widget-close-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
}

body.customer-portal .chat-widget-trigger.open .widget-chat-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
}

body.customer-portal .chat-widget-trigger.open .widget-close-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Badge */
body.customer-portal .chat-widget-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--red);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.2s var(--ease);
}

body.customer-portal .chat-widget-badge.visible {
    opacity: 1;
    transform: scale(1);
}

/* Chat Panel — Solid luxury */
body.customer-portal .chat-widget-panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 360px;
    max-height: 520px;
    background: var(--card-white);
    border: 1px solid rgba(30, 27, 24, 0.10);
    z-index: 999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
    border-radius: 0;
    box-shadow: 0 24px 64px rgba(43, 37, 32, 0.15);
}

body.customer-portal .chat-widget-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Widget Header — Navy */
body.customer-portal .widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--navy);
    border-bottom: none;
}

body.customer-portal .widget-avatar {
    width: 32px;
    height: 32px;
    background: rgba(250, 243, 225, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 0;
}

body.customer-portal .widget-header-info {
    flex: 1;
}

body.customer-portal .widget-header-title {
    font-size: 13px;
    font-weight: 600;
    color: #FAF3E1;
}

body.customer-portal .widget-header-status {
    font-size: 11px;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 4px;
}

body.customer-portal .widget-header-status::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 0;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

body.customer-portal .widget-minimize {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 243, 225, 0.08);
    border: 1px solid rgba(250, 243, 225, 0.12);
    color: rgba(250, 243, 225, 0.6);
    font-size: 18px;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.15s var(--ease);
}

body.customer-portal .widget-minimize:hover {
    background: rgba(250, 243, 225, 0.15);
}

/* Quick Replies */
body.customer-portal .widget-quick-replies {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    overflow-x: auto;
    border-bottom: 1px solid rgba(30, 27, 24, 0.04);
}

body.customer-portal .widget-quick-reply {
    white-space: nowrap;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    background: rgba(30, 27, 24, 0.03);
    border: 1px solid rgba(30, 27, 24, 0.06);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

body.customer-portal .widget-quick-reply:hover {
    background: rgba(30, 27, 24, 0.06);
    color: var(--heading);
}

/* Widget Messages */
body.customer-portal .widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 180px;
    max-height: 300px;
}

body.customer-portal .widget-message {
    display: flex;
    flex-direction: column;
}

body.customer-portal .widget-message.sent {
    align-items: flex-end;
}

body.customer-portal .widget-message.received {
    align-items: flex-start;
}

body.customer-portal .widget-bubble {
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 85%;
    border-radius: 0;
}

body.customer-portal .widget-message.sent .widget-bubble {
    background: rgba(212, 132, 90, 0.12);
    color: var(--heading);
    border: 1px solid rgba(212, 132, 90, 0.2);
}

body.customer-portal .widget-message.received .widget-bubble {
    background: rgba(30, 27, 24, 0.03);
    color: var(--body-text);
    border: 1px solid rgba(30, 27, 24, 0.06);
}

body.customer-portal .widget-time {
    font-size: 10px;
    color: var(--muted);
    margin-top: 3px;
    padding: 0 2px;
}

/* Typing indicator */
body.customer-portal .widget-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

body.customer-portal .widget-typing-dot {
    width: 6px;
    height: 6px;
    background: rgba(30, 27, 24, 0.20);
    border-radius: 0;
    animation: widget-typing-bounce 1.2s infinite ease-in-out;
}

body.customer-portal .widget-typing-dot:nth-child(2) { animation-delay: 0.15s; }
body.customer-portal .widget-typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes widget-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-4px); opacity: 0.7; }
}

/* Widget Input */
body.customer-portal .widget-input-area {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    border-top: 1px solid rgba(30, 27, 24, 0.06);
    background: rgba(30, 27, 24, 0.02);
}

body.customer-portal .widget-input {
    flex: 1;
    background: var(--card-white);
    border: 1px solid rgba(30, 27, 24, 0.08);
    color: var(--heading);
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    border-radius: 0;
    transition: border-color 0.2s var(--ease);
}

body.customer-portal .widget-input:focus {
    border-color: var(--terracotta);
}

body.customer-portal .widget-input::placeholder {
    color: var(--muted);
}

body.customer-portal .widget-send-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--terracotta);
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    flex-shrink: 0;
    padding: 0;
}

body.customer-portal .widget-send-btn svg {
    width: 16px;
    height: 16px;
    fill: #FFFFFF;
}

body.customer-portal .widget-send-btn:hover {
    background: var(--terracotta-hover);
}

/* Widget Disclaimer */
body.customer-portal .widget-disclaimer {
    padding: 8px 16px;
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid rgba(30, 27, 24, 0.04);
}

/* ========================================
   34. SCROLLBAR
   ======================================== */

body.customer-portal ::-webkit-scrollbar {
    width: 3px;
}

body.customer-portal ::-webkit-scrollbar-track {
    background: transparent;
}

body.customer-portal ::-webkit-scrollbar-thumb {
    background: rgba(30, 27, 24, 0.10);
    border-radius: 0;
}

body.customer-portal ::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 27, 24, 0.20);
}

/* ========================================
   35. RESPONSIVE
   ======================================== */

@media (max-width: 480px) {
    body.customer-portal .app-container {
        max-width: 100%;
    }

    body.customer-portal .glass-menu {
        margin: 8px 0 0;
        border-left: none;
        border-right: none;
    }

    body.customer-portal .menu-item-header {
        padding: 22px 20px;
        gap: 14px;
    }

    body.customer-portal .menu-label {
        font-size: 17px;
    }

    body.customer-portal .menu-icon {
        width: 24px;
        height: 24px;
    }

    body.customer-portal .content-inner {
        padding: 20px 20px;
    }

    body.customer-portal .project-title {
        font-size: 24px;
    }

    body.customer-portal .estimate-range {
        font-size: 30px;
    }

    body.customer-portal .footer-phone {
        font-size: 22px;
    }

    body.customer-portal .chat-widget-panel {
        width: calc(100% - 16px);
        right: 8px;
        bottom: 84px;
        max-height: 60vh;
    }

    body.customer-portal .trust-badges {
        flex-wrap: wrap;
        gap: 6px;
    }

    body.customer-portal .trust-badge {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* ========================================
   36. ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.customer-portal .glass-menu {
    animation: fadeInUp 0.5s var(--ease) both;
    animation-delay: 0.1s;
}

body.customer-portal .trust-badges {
    animation: fadeInUp 0.5s var(--ease) both;
    animation-delay: 0.2s;
}

body.customer-portal .review-btn {
    animation: fadeInUp 0.5s var(--ease) both;
    animation-delay: 0.3s;
}

/* ========================================
   37. PORTAL FOOTER — Espresso bottom bar
   ======================================== */

body.customer-portal .portal-footer {
    background: var(--espresso);
    padding: 40px 28px;
    text-align: center;
}

body.customer-portal .footer-brand {
    font-size: 18px;
    font-weight: 800;
    color: #FAF3E1;
}

body.customer-portal .footer-tagline {
    font-size: 14px;
    color: rgba(250, 243, 225, 0.6);
    margin-top: 8px;
}

body.customer-portal .footer-badges-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

body.customer-portal .footer-badge {
    border: 1px solid var(--terracotta);
    color: var(--terracotta);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 0;
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
