﻿/* ============================================
   packHQ Design System
   ============================================ */

:root {
    --phq-blue: #0A5FAD;
    --phq-blue-dark: #062E54;
    --phq-blue-darker: #041C35;
    --phq-blue-light: #E3EFF9;
    --phq-orange: #FBAD48;
    --phq-orange-dark: #E89420;
    --phq-orange-light: #FFF4E5;
    --phq-coral: #E8475F;
    --phq-bg: #FFFFFF;
    --phq-bg-alt: #F7F9FC;
    --phq-text: #1A1A2E;
    --phq-text-muted: #5A6578;
    --phq-border: #DDE3ED;
    --phq-gradient-hero: linear-gradient(135deg, #0A5FAD 0%, #062E54 100%);
    --phq-gradient-cta: linear-gradient(135deg, #0A5FAD 0%, #1477CC 100%);
    --phq-radius: 8px;
    --phq-radius-lg: 12px;
    --phq-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --phq-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --phq-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --phq-transition: 0.2s ease;
    --phq-nav-height: 90px;
}

* { box-sizing: border-box; }

/* Screen reader only */
.phq-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--phq-text);
    background: var(--phq-bg);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

body:has(.phq-sandbox-page) {
    overflow-y: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

code, pre, .phq-code {
    font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
}

a { color: var(--phq-blue); }

/* ============================================
   Buttons
   ============================================ */
.phq-btn-primary {
    background: var(--phq-blue);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--phq-radius);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all var(--phq-transition);
}
.phq-btn-primary:hover { background: var(--phq-blue-dark); transform: translateY(-1px); box-shadow: var(--phq-shadow-md); }

.phq-btn-accent {
    background: var(--phq-orange);
    color: var(--phq-text);
    border: none;
    padding: 12px 28px;
    border-radius: var(--phq-radius);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all var(--phq-transition);
}
.phq-btn-accent:hover { background: var(--phq-orange-dark); transform: translateY(-1px); box-shadow: var(--phq-shadow-md); }

.phq-btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 10px 26px;
    border-radius: var(--phq-radius);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all var(--phq-transition);
}
.phq-btn-outline:hover { background: rgba(255,255,255,0.15); transform: translateY(-1px); }

.phq-btn-outline-blue {
    background: transparent;
    color: var(--phq-blue);
    border: 2px solid var(--phq-blue);
    padding: 10px 26px;
    border-radius: var(--phq-radius);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all var(--phq-transition);
}
.phq-btn-outline-blue:hover { background: var(--phq-blue); color: white; transform: translateY(-1px); }
.phq-btn-outline-blue.disabled { opacity: 0.4; pointer-events: none; cursor: default; }

.phq-btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.phq-btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

/* ============================================
   NavBar -- Frosted Glass
   ============================================ */
.phq-navbar {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--phq-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s;
}
.phq-navbar.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.phq-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--phq-nav-height);
    padding: 0 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.phq-navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.phq-navbar-logo img { max-height: 70px; width: auto; }

.phq-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 16px;
}

.phq-nav-item {
    position: relative;
}

.phq-nav-label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    color: var(--phq-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--phq-radius);
    transition: all var(--phq-transition);
    white-space: nowrap;
    cursor: pointer;
}
.phq-nav-label:hover { background: var(--phq-bg-alt); color: var(--phq-blue); }
.phq-nav-label svg { opacity: 0.5; }

.phq-nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    color: var(--phq-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--phq-radius);
    transition: all var(--phq-transition);
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}
.phq-nav-link:hover { background: var(--phq-bg-alt); color: var(--phq-blue); }
.phq-nav-link.active { color: var(--phq-blue); }

/* Dropdown */
.phq-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: white;
    border: 1px solid var(--phq-border);
    border-radius: var(--phq-radius-lg);
    box-shadow: var(--phq-shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 1001;
}
.phq-has-dropdown:hover > .phq-dropdown,
.phq-has-dropdown:focus-within > .phq-dropdown,
.phq-nav-item:hover > .phq-dropdown,
.phq-nav-item:focus-within > .phq-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.phq-dropdown-link {
    display: block;
    padding: 10px 14px;
    color: var(--phq-text);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: var(--phq-radius);
    transition: background var(--phq-transition);
}
.phq-dropdown-link:hover { background: var(--phq-bg-alt); color: var(--phq-blue); }
.phq-dropdown-label {
    font-weight: 600;
    display: block;
}
.phq-dropdown-desc {
    font-size: 0.78rem;
    color: var(--phq-text-muted);
    margin-top: 2px;
    display: block;
}

/* Nav right-side actions */
.phq-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.phq-nav-cta {
    background: var(--phq-orange);
    color: var(--phq-blue-darker) !important;
    padding: 9px 22px;
    border-radius: var(--phq-radius);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--phq-transition);
    white-space: nowrap;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(251, 173, 72, 0.3);
}
.phq-nav-cta:hover {
    background: var(--phq-orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(251, 173, 72, 0.4);
}

.phq-nav-lang {
    background: none;
    border: 1px solid var(--phq-border);
    color: var(--phq-text-muted);
    padding: 4px 10px;
    border-radius: var(--phq-radius);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--phq-transition);
}
.phq-nav-lang:hover { border-color: var(--phq-blue); color: var(--phq-blue); }

/* Hamburger -- hidden on desktop */
.phq-nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--phq-text);
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}
.phq-nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--phq-text);
    border-radius: 2px;
    transition: all 0.2s;
}

/* Mobile nav -- slide-out panel */
.phq-mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    background: white;
    z-index: 3000;
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}
.phq-mobile-nav--open { transform: translateX(0); }

.phq-mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2999;
}

.phq-mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--phq-border);
}
.phq-mobile-nav-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--phq-text-muted);
    padding: 4px;
}

.phq-mobile-nav-body {
    padding: 16px 20px;
}
.phq-mobile-nav-section {
    margin-bottom: 20px;
}
.phq-mobile-nav-section h4 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--phq-text-muted);
    margin: 0 0 8px;
    font-weight: 700;
}
.phq-mobile-nav-section a {
    display: block;
    padding: 10px 0;
    color: var(--phq-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--phq-border);
}
.phq-mobile-nav-section a:last-child { border-bottom: none; }

.phq-mobile-nav-footer {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--phq-border);
    margin-top: 8px;
}

/* ============================================
   Footer -- Dark Multi-Column
   ============================================ */
.phq-footer-cta {
    background: var(--phq-gradient-cta);
    color: white;
    text-align: center;
    padding: 48px 32px;
}
.phq-footer-cta h2 {
    font-size: 2rem;
    margin: 0 0 8px;
    color: white;
}
.phq-footer-cta p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0 0 24px;
}
.phq-footer-cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.phq-footer {
    background: var(--phq-blue-darker);
    color: rgba(255,255,255,0.8);
    padding: 48px 32px 24px;
}

.phq-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1fr;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.phq-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.phq-footer-brand img { height: 36px; align-self: flex-start; }
.phq-footer-brand p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

.phq-footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}
.phq-footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all var(--phq-transition);
    font-size: 0.85rem;
}
.phq-footer-social:hover { background: var(--phq-blue); color: white; }

.phq-footer-col h4 {
    color: white;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px;
    font-weight: 700;
}
.phq-footer-col a {
    display: block;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 3px 0;
    transition: color var(--phq-transition);
}
.phq-footer-col a:hover { color: white; }

.phq-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding-top: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}
.phq-footer-bottom a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    margin-left: 20px;
}
.phq-footer-bottom a:hover { color: white; }

/* ============================================
   Sections
   ============================================ */
.phq-section { padding: 80px 32px; max-width: 1200px; margin: 0 auto; }
.phq-section-alt { background: var(--phq-bg-alt); }
.phq-section-full { padding: 80px 32px; }
.phq-section-dark { background: var(--phq-blue-dark); color: white; }
.phq-section-center { text-align: center; }

.phq-section-header {
    text-align: center;
    margin-bottom: 48px;
}
.phq-section-header h2 {
    font-size: 2.2rem;
    margin: 0 0 12px;
}
.phq-section-header p {
    color: var(--phq-text-muted);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
}
.phq-section-dark .phq-section-header p { color: rgba(255,255,255,0.7); }

.phq-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--phq-blue);
    margin-bottom: 8px;
}
.phq-section-dark .phq-eyebrow { color: var(--phq-orange); }

/* ============================================
   Hero
   ============================================ */
.phq-hero {
    background: var(--phq-gradient-hero);
    color: white;
    text-align: center;
    padding: 100px 32px 80px;
    position: relative;
    overflow: hidden;
}
.phq-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(251,173,72,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 40%);
    pointer-events: none;
}
.phq-hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.phq-hero h1 {
    font-size: 3.2rem;
    margin: 0 0 16px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.phq-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0 0 36px;
    line-height: 1.6;
}
.phq-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.phq-hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 56px;
    flex-wrap: wrap;
}
.phq-hero-stat {
    text-align: center;
}
.phq-hero-stat-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--phq-orange);
}
.phq-hero-stat-label {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* Animated grid pattern for hero */
.phq-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: phq-grid-drift 20s linear infinite;
    pointer-events: none;
}
@keyframes phq-grid-drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* ============================================
   Page Hero (inner pages -- split layout with image)
   ============================================ */
.phq-page-hero {
    background: var(--phq-gradient-hero);
    color: white;
    padding: 100px 32px 80px;
    position: relative;
    overflow: hidden;
}
.phq-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(251,173,72,0.06) 0%, transparent 50%),
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 100% 100%, 48px 48px, 48px 48px;
    pointer-events: none;
}
.phq-page-hero-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    position: relative;
}
.phq-page-hero-text { position: relative; }
.phq-page-hero-text h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 12px 0 16px;
}
.phq-page-hero-text p {
    font-size: 1.15rem;
    line-height: 1.7;
    opacity: 0.85;
    margin: 0;
}
.phq-page-hero-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.phq-page-hero-image img {
    display: block;
    width: 100%;
    height: 320px;
    object-fit: cover;
}
.phq-page-hero-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(4,28,53,0.4) 100%);
    pointer-events: none;
}

/* ============================================
   Cards
   ============================================ */
.phq-card {
    border: 1px solid var(--phq-border);
    border-radius: var(--phq-radius-lg);
    padding: 28px;
    background: white;
    transition: all var(--phq-transition);
}
.phq-card:hover { box-shadow: var(--phq-shadow-md); transform: translateY(-4px); }

.phq-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--phq-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.4rem;
}
.phq-card-icon-blue { background: var(--phq-blue-light); color: var(--phq-blue); }
.phq-card-icon-orange { background: var(--phq-orange-light); color: var(--phq-orange-dark); }

.phq-card h3 {
    font-size: 1.1rem;
    margin: 0 0 8px;
    color: var(--phq-text);
}
.phq-card p {
    margin: 0;
    color: var(--phq-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.phq-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--phq-blue);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    margin-top: 12px;
    transition: gap var(--phq-transition);
}
.phq-card-link:hover { gap: 8px; }

.phq-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.phq-cards-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.phq-cards-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ============================================
   Stat Cards
   ============================================ */
.phq-stat-card {
    text-align: center;
    padding: 32px;
}
.phq-stat-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--phq-coral);
    line-height: 1;
    margin-bottom: 8px;
}
.phq-stat-label {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
}

/* ============================================
   Steps / Timeline
   ============================================ */
.phq-steps { display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; }
.phq-step {
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 260px;
    position: relative;
}
.phq-step-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--phq-blue-light);
    color: var(--phq-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 16px;
}
.phq-step-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--phq-orange);
    color: var(--phq-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

/* ============================================
   Logo Marquee
   ============================================ */
.phq-marquee-section {
    padding: 40px 0;
    overflow: hidden;
    background: var(--phq-bg-alt);
    border-top: 1px solid var(--phq-border);
    border-bottom: 1px solid var(--phq-border);
}
.phq-marquee-label {
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--phq-text-muted);
    margin-bottom: 24px;
    font-weight: 600;
}
.phq-marquee-track {
    display: flex;
    gap: 64px;
    animation: phq-marquee 30s linear infinite;
    width: max-content;
}
.phq-marquee-track span {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--phq-text-muted);
    opacity: 0.5;
    white-space: nowrap;
}
@keyframes phq-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   Code Block
   ============================================ */
.phq-code-block {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: var(--phq-radius-lg);
    padding: 24px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto;
}
.phq-code-block .keyword { color: #cba6f7; }
.phq-code-block .string { color: #a6e3a1; }
.phq-code-block .number { color: #fab387; }
.phq-code-block .comment { color: #6c7086; }

.phq-code-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   CTA Banner (reusable)
   ============================================ */
.phq-cta-banner {
    background: var(--phq-gradient-cta);
    color: white;
    text-align: center;
    padding: 56px 32px;
    border-radius: 0;
}
.phq-cta-banner h2 {
    font-size: 2rem;
    margin: 0 0 12px;
    color: white;
}
.phq-cta-banner p {
    font-size: 1.05rem;
    opacity: 0.9;
    margin: 0 0 24px;
}
.phq-cta-banner-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Testimonial Carousel
   ============================================ */
.phq-testimonial {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}
.phq-testimonial-quote {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--phq-text);
    margin: 0 0 20px;
}
.phq-testimonial-author {
    font-weight: 600;
    color: var(--phq-text);
}
.phq-testimonial-role {
    font-size: 0.85rem;
    color: var(--phq-text-muted);
}
.phq-testimonial-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}
.phq-testimonial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--phq-border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background var(--phq-transition);
}
.phq-testimonial-dot.active { background: var(--phq-blue); width: 24px; border-radius: 4px; }

/* ============================================
   Accordion (FAQ)
   ============================================ */
.phq-accordion-item {
    border: 1px solid var(--phq-border);
    border-radius: var(--phq-radius);
    margin-bottom: 8px;
    overflow: hidden;
}
.phq-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    background: white;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    color: var(--phq-text);
    transition: background var(--phq-transition);
}
.phq-accordion-header:hover { background: var(--phq-bg-alt); }
.phq-accordion-chevron {
    transition: transform 0.2s;
    font-size: 0.8rem;
}
.phq-accordion-item.open .phq-accordion-chevron { transform: rotate(180deg); }
.phq-accordion-body {
    display: none;
    padding: 0 20px 16px;
    font-size: 0.9rem;
    color: var(--phq-text-muted);
    line-height: 1.6;
}
.phq-accordion-item.open .phq-accordion-body { display: block; }

/* ============================================
   Pricing -- Hero
   ============================================ */
.phq-pricing-hero {
    background: var(--phq-gradient-hero);
    color: white;
    padding: 100px 32px 80px;
    position: relative;
    overflow: hidden;
}
.phq-pricing-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(251,173,72,0.06) 0%, transparent 50%),
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 100% 100%, 60px 60px, 60px 60px;
    pointer-events: none;
}
.phq-pricing-hero-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
}
.phq-pricing-hero-text {
    position: relative;
}
.phq-pricing-hero-text h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 12px 0 20px;
}
.phq-pricing-hero-text p {
    font-size: 1.15rem;
    line-height: 1.7;
    opacity: 0.88;
    margin: 0 0 32px;
}
.phq-pricing-hero-stats {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.phq-pricing-hero-stat {
    display: flex;
    flex-direction: column;
}
.phq-pricing-hero-stat-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--phq-orange);
}
.phq-pricing-hero-stat-text {
    font-size: 0.82rem;
    opacity: 0.6;
    margin-top: 2px;
}
.phq-pricing-hero-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.15);
}
.phq-pricing-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.phq-pricing-hero-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}
.phq-pricing-hero-image img {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: cover;
}
.phq-pricing-hero-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(4,28,53,0.5) 100%);
    pointer-events: none;
}
.phq-pricing-hero-image-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10,95,173,0.9);
    backdrop-filter: blur(8px);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
}

/* Pricing -- Trust Bar */
.phq-pricing-trust {
    background: var(--phq-blue-darker);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 16px 32px;
}
.phq-pricing-trust-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}
.phq-pricing-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    font-weight: 500;
}
.phq-pricing-trust-item svg { stroke: var(--phq-orange); flex-shrink: 0; }

/* ============================================
   Pricing -- Cards
   ============================================ */
.phq-pricing-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1140px;
    margin: 0 auto;
}
.phq-pricing-card {
    border: 1px solid var(--phq-border);
    border-radius: var(--phq-radius-lg);
    padding: 40px;
    background: white;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
}
.phq-pricing-card:hover {
    box-shadow: var(--phq-shadow-lg);
    transform: translateY(-4px);
}
.phq-pricing-card.featured {
    border-color: var(--phq-blue);
    box-shadow: 0 0 0 1px var(--phq-blue), var(--phq-shadow-lg);
}
.phq-pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--phq-blue) 0%, #1477CC 100%);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.phq-pricing-card-header {
    margin-bottom: 16px;
    text-align: center;
}
.phq-pricing-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--phq-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 8px;
}
.phq-pricing-price {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--phq-text);
    line-height: 1;
    margin: 0;
}
.phq-pricing-period {
    font-size: 0.85rem;
    color: var(--phq-text-muted);
    margin-top: 4px;
}
.phq-pricing-desc {
    color: var(--phq-text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 24px;
    text-align: center;
}
.phq-pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    text-align: left;
}
.phq-pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--phq-border);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}
.phq-pricing-features li:last-child { border-bottom: none; }
.phq-pricing-check {
    color: var(--phq-blue);
    flex-shrink: 0;
    margin-top: 2px;
}
.phq-pricing-card-note {
    text-align: center;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--phq-text-muted);
}

/* ============================================
   ROI Calculator Section
   ============================================ */
.phq-roi-section {
    background: var(--phq-blue-dark);
    position: relative;
    overflow: hidden;
}
.phq-roi-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 90%, rgba(251,173,72,0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(255,255,255,0.04) 0%, transparent 40%),
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    pointer-events: none;
}
.phq-roi-calculator {
    max-width: 880px;
    margin: 0 auto;
}

/* ROI Input Card */
.phq-roi-input-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 32px;
    backdrop-filter: blur(8px);
}
.phq-roi-input-label {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 24px;
    font-weight: 500;
}
.phq-roi-shipment-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}
.phq-roi-shipment-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--phq-orange);
    letter-spacing: -0.02em;
    line-height: 1;
}
.phq-roi-shipment-unit {
    font-size: 1rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

/* Slider */
.phq-roi-slider-wrapper { margin-bottom: 20px; }

.phq-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.12) 0%,
        rgba(251,173,72,0.25) 50%,
        rgba(251,173,72,0.4) 100%
    );
    outline: none;
    cursor: pointer;
    position: relative;
}
.phq-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--phq-orange);
    border: 4px solid white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35), 0 0 0 4px rgba(251,173,72,0.2);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.phq-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 0 8px rgba(251,173,72,0.15);
}
.phq-range-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--phq-orange);
    border: 4px solid white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35), 0 0 0 4px rgba(251,173,72,0.2);
    cursor: pointer;
}
.phq-range-slider::-moz-range-track {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.12) 0%,
        rgba(251,173,72,0.25) 50%,
        rgba(251,173,72,0.4) 100%
    );
    border: none;
}

.phq-roi-slider-range {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    font-weight: 500;
}

.phq-roi-monthly-cost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.92rem;
    color: rgba(255,255,255,0.5);
}
.phq-roi-monthly-cost strong {
    color: white;
    font-weight: 700;
}

/* ROI Results */
.phq-roi-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.phq-roi-result-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}
.phq-roi-result-card:hover {
    background: rgba(255,255,255,0.09);
    transform: translateY(-2px);
}
.phq-roi-result-transport { border-top: 3px solid var(--phq-orange); }
.phq-roi-result-corrugate { border-top: 3px solid #22C55E; }

.phq-roi-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 16px;
}
.phq-roi-result-transport .phq-roi-result-icon { color: var(--phq-orange); }
.phq-roi-result-corrugate .phq-roi-result-icon { color: #22C55E; }

.phq-roi-result-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 8px;
}
.phq-roi-result-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    margin-bottom: 8px;
}
.phq-roi-result-detail {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.5;
}

/* ROI Total Bar */
.phq-roi-total {
    background: linear-gradient(135deg, var(--phq-orange) 0%, var(--phq-orange-dark) 100%);
    border-radius: 16px;
    padding: 4px;
}
.phq-roi-total-inner {
    background: rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 24px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.phq-roi-total-left { display: flex; flex-direction: column; }
.phq-roi-total-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}
.phq-roi-total-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
}
.phq-roi-total-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.phq-roi-total-roi-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.phq-roi-total-roi-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
}

/* ============================================
   Optimize Cards with Images
   ============================================ */
.phq-optimize-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.phq-optimize-card {
    border: 1px solid var(--phq-border);
    border-radius: 16px;
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
}
.phq-optimize-card:hover {
    box-shadow: var(--phq-shadow-lg);
    transform: translateY(-6px);
}
.phq-optimize-card-image {
    height: 200px;
    overflow: hidden;
}
.phq-optimize-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.phq-optimize-card:hover .phq-optimize-card-image img {
    transform: scale(1.05);
}
.phq-optimize-card-content {
    padding: 24px;
}
.phq-optimize-card-content h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 10px;
}
.phq-optimize-card-content p {
    font-size: 0.9rem;
    color: var(--phq-text-muted);
    line-height: 1.65;
    margin: 0 0 16px;
}
.phq-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--phq-blue);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s ease;
}
.phq-link-arrow:hover { gap: 8px; }
.phq-link-arrow::after {
    content: '\2192';
    transition: transform 0.2s ease;
}

/* ============================================
   Comparison Table
   ============================================ */
.phq-comparison-table-wrapper {
    max-width: 780px;
    margin: 0 auto;
    overflow-x: auto;
}
.phq-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.phq-comparison-table thead th {
    padding: 14px 20px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 2px solid var(--phq-blue);
    color: var(--phq-text);
}
.phq-comparison-table thead th:first-child {
    text-align: left;
}
.phq-comparison-table tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--phq-border);
    text-align: center;
    color: var(--phq-text);
}
.phq-comparison-table tbody td:first-child {
    text-align: left;
    color: var(--phq-text-muted);
    font-weight: 500;
}
.phq-comparison-table tbody tr:hover {
    background: var(--phq-bg-alt);
}
.phq-check-green {
    color: #22C55E;
    font-weight: 700;
    font-size: 1.1rem;
}
.phq-check-muted {
    color: var(--phq-border);
    font-size: 1.1rem;
}

/* Button variants */
.phq-btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}
.phq-btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: var(--phq-radius);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--phq-transition);
    background: transparent;
}
.phq-btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* ============================================
   Pricing Responsive
   ============================================ */
@media (max-width: 992px) {
    .phq-pricing-hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .phq-pricing-hero-text h1 { font-size: 2.4rem; }
    .phq-pricing-hero-image img { height: 320px; }
    .phq-optimize-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .phq-pricing-cards-row { grid-template-columns: 1fr 1fr; max-width: 680px; }
}

@media (max-width: 768px) {
    .phq-pricing-hero { padding: 60px 16px 48px; }
    .phq-pricing-hero-text h1 { font-size: 2rem; }
    .phq-pricing-hero-image { display: none; }
    .phq-pricing-cards-row { grid-template-columns: 1fr; max-width: 440px; }
    .phq-pricing-card.featured { transform: none; }
    .phq-roi-results { grid-template-columns: 1fr; }
    .phq-roi-result-value { font-size: 2.2rem; }
    .phq-roi-shipment-number { font-size: 2.5rem; }
    .phq-roi-total-inner { flex-direction: column; text-align: center; }
    .phq-roi-total-right { align-items: center; }
    .phq-pricing-trust-inner { gap: 24px; }
    .phq-comparison-table { font-size: 0.82rem; }
    .phq-comparison-table thead th,
    .phq-comparison-table tbody td { padding: 10px 12px; }
}
@media (max-width: 480px) {
    .phq-pricing-hero-stats { gap: 16px; }
    .phq-pricing-hero-stat-divider { display: none; }
    .phq-roi-input-card { padding: 24px 16px; }
    .phq-roi-result-card { padding: 24px 16px; }
}

/* ============================================
   Animations
   ============================================ */
@keyframes phq-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.phq-animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.phq-animate-in.phq-visible {
    opacity: 1;
    transform: translateY(0);
}
.phq-animate-delay-1 { transition-delay: 0.1s; }
.phq-animate-delay-2 { transition-delay: 0.2s; }
.phq-animate-delay-3 { transition-delay: 0.3s; }
.phq-animate-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Modal
   ============================================ */
.phq-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.phq-modal {
    background: white;
    border-radius: var(--phq-radius-lg);
    padding: 40px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: var(--phq-shadow-lg);
}
.phq-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--phq-text-muted);
}

/* ============================================
   Form Inputs
   ============================================ */
.phq-input {
    padding: 10px 14px;
    border: 1px solid var(--phq-border);
    border-radius: var(--phq-radius);
    font-size: 0.9rem;
    width: 100%;
    font-family: inherit;
    transition: border-color var(--phq-transition), box-shadow var(--phq-transition);
}
.phq-input:focus {
    outline: none;
    border-color: var(--phq-blue);
    box-shadow: 0 0 0 3px rgba(10,95,173,0.1);
}

/* ============================================
   Sandbox
   ============================================ */
.phq-sandbox-auth-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(10, 95, 173, 0.08);
    border-bottom: 1px solid rgba(10, 95, 173, 0.2);
    font-size: 0.85rem;
    color: var(--phq-text-muted);
}

.phq-sandbox-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--phq-nav-height));
    overflow: hidden;
}

.phq-sandbox-layout {
    display: grid;
    grid-template-columns: 45% 1fr;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.phq-sandbox-panel {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    border-right: 1px solid var(--phq-border);
}
.phq-sandbox-viewer {
    position: relative;
    background: #1a1a2e;
}
.phq-sandbox-viewer canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Sandbox quota CTA overlay ── */
.phq-quota-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.phq-quota-card {
    background: #ffffff;
    border: 1px solid var(--phq-border);
    border-radius: 12px;
    padding: 40px 36px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.phq-quota-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--phq-text);
    margin: 0 0 12px;
}
.phq-quota-sub {
    font-size: 0.95rem;
    color: var(--phq-text-muted);
    margin: 0 0 28px;
    line-height: 1.5;
}
.phq-quota-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.phq-quota-btn {
    min-width: 140px;
    text-align: center;
    text-decoration: none;
}
.phq-quota-login {
    font-size: 0.85rem;
    color: var(--phq-text-muted);
    margin: 0;
}
.phq-quota-login a {
    color: var(--phq-blue);
    text-decoration: none;
}
.phq-quota-login a:hover { text-decoration: underline; }

/* ============================================
   Tabs
   ============================================ */
.phq-tabs { display: flex; border-bottom: 2px solid var(--phq-border); margin-bottom: 16px; }
.phq-tab {
    padding: 8px 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--phq-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-size: 0.9rem;
    font-family: inherit;
    transition: color var(--phq-transition);
}
.phq-tab.active { color: var(--phq-blue); border-bottom-color: var(--phq-blue); }

/* ============================================
   Presets
   ============================================ */
.phq-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.phq-preset-btn {
    padding: 6px 14px;
    border: 1px solid var(--phq-border);
    border-radius: var(--phq-radius);
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--phq-transition);
    font-family: inherit;
}
.phq-preset-btn:hover { background: var(--phq-blue-light); border-color: var(--phq-blue); }

/* ============================================
   Social Icons
   ============================================ */
.phq-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--phq-blue);
    color: white;
    text-decoration: none;
    transition: background var(--phq-transition);
}
.phq-social-icon:hover { background: var(--phq-blue-dark); }

/* ============================================
   Tables
   ============================================ */
.phq-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.phq-table th {
    text-align: left;
    padding: 6px 4px;
    border-bottom: 2px solid var(--phq-border);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--phq-text-muted);
}
.phq-table td {
    padding: 4px;
    border-bottom: 1px solid var(--phq-border);
    vertical-align: middle;
}
.phq-table input {
    border: 1px solid var(--phq-border);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 0.8rem;
    width: 100%;
}
.phq-table input[type="number"] { width: 48px; }
.phq-table input[type="checkbox"] { width: auto; }

/* Sandbox editor tables: tighter cells to accommodate new columns within the ~45% panel */
.phq-sandbox-panel .phq-table td { padding: 3px; }
.phq-sandbox-panel .phq-table input[type="number"] { width: 44px; }

/* ============================================
   Color Swatch
   ============================================ */
.phq-color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.15);
    display: inline-block;
}

/* ============================================
   Docs Hero
   ============================================ */
.phq-docs-hero {
    background: var(--phq-gradient-hero);
    color: white;
    padding: 100px 32px 80px;
    position: relative;
    overflow: hidden;
}
.phq-docs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(251,173,72,0.06) 0%, transparent 50%),
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 100% 100%, 48px 48px, 48px 48px;
    pointer-events: none;
}
.phq-docs-hero-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    position: relative;
}
.phq-docs-hero-text { position: relative; }
.phq-docs-hero-text h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 12px 0 16px;
}
.phq-docs-hero-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.85;
    margin: 0 0 24px;
}
.phq-docs-hero-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.phq-docs-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}
.phq-docs-hero-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.phq-docs-hero-image img {
    display: block;
    width: 100%;
    height: 320px;
    object-fit: cover;
}
.phq-docs-hero-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(4,28,53,0.4) 100%);
    pointer-events: none;
}

/* ============================================
   Docs Layout
   ============================================ */
.phq-docs-layout {
    display: grid;
    grid-template-columns: 260px 1fr 380px;
    min-height: calc(100vh - var(--phq-nav-height) - 200px);
}
.phq-docs-sidebar {
    border-right: 1px solid var(--phq-border);
    padding: 0;
    background: var(--phq-bg-alt);
}
.phq-docs-sidebar-sticky {
    position: sticky;
    top: 0;
    padding: 24px 20px;
}
.phq-docs-sidebar-title {
    margin: 0 0 16px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--phq-text-muted);
    font-weight: 700;
}
.phq-docs-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.phq-docs-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--phq-radius);
    text-decoration: none;
    font-size: 0.82rem;
    color: var(--phq-text);
    font-weight: 500;
    transition: all 0.15s ease;
}
.phq-docs-nav-link:hover { background: white; }
.phq-docs-nav-link.active {
    background: white;
    box-shadow: var(--phq-shadow);
    font-weight: 600;
}
.phq-docs-sidebar-info {
    margin-top: 24px;
    padding: 16px;
    background: white;
    border-radius: var(--phq-radius-lg);
    border: 1px solid var(--phq-border);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.phq-docs-sidebar-info-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.phq-docs-sidebar-info-row svg { flex-shrink: 0; margin-top: 2px; }
.phq-docs-sidebar-info-row strong {
    display: block;
    font-size: 0.82rem;
    color: var(--phq-text);
}
.phq-docs-sidebar-info-row span {
    font-size: 0.78rem;
    color: var(--phq-text-muted);
    line-height: 1.5;
}

/* Docs Content */
.phq-docs-content {
    padding: 40px 48px;
    overflow-y: auto;
}
.phq-docs-endpoint {
    margin-bottom: 56px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--phq-border);
}
.phq-docs-endpoint:last-child { border-bottom: none; }
.phq-docs-endpoint-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.phq-docs-endpoint-path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--phq-text);
}
.phq-docs-endpoint-desc {
    font-size: 1rem;
    color: var(--phq-text-muted);
    line-height: 1.7;
    margin: 0 0 28px;
}
.phq-docs-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--phq-text);
    margin: 28px 0 12px;
}
.phq-docs-section-title svg { color: var(--phq-blue); flex-shrink: 0; }
.phq-docs-muted { font-weight: 400; color: var(--phq-text-muted); }

/* Docs Tables */
.phq-docs-table-wrap {
    border: 1px solid var(--phq-border);
    border-radius: var(--phq-radius-lg);
    overflow: hidden;
    margin-bottom: 4px;
}
.phq-docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.phq-docs-table th {
    text-align: left;
    padding: 10px 16px;
    background: var(--phq-bg-alt);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--phq-text-muted);
    border-bottom: 1px solid var(--phq-border);
}
.phq-docs-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--phq-border);
    vertical-align: middle;
}
.phq-docs-table tr:last-child td { border-bottom: none; }
.phq-docs-table tr:hover td { background: rgba(10,95,173,0.02); }
.phq-docs-table code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--phq-blue);
    font-weight: 600;
}
.phq-docs-type {
    display: inline-block;
    padding: 2px 8px;
    background: var(--phq-blue-light);
    color: var(--phq-blue);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}
.phq-docs-tag-required {
    display: inline-block;
    padding: 2px 8px;
    background: #DCFCE7;
    color: #16A34A;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}
.phq-docs-tag-optional {
    display: inline-block;
    padding: 2px 8px;
    background: var(--phq-orange-light);
    color: var(--phq-orange-dark);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Docs info boxes */
.phq-docs-info-box {
    padding: 12px 16px;
    background: var(--phq-blue-light);
    border-radius: var(--phq-radius);
    border-left: 3px solid var(--phq-blue);
    font-size: 0.88rem;
    margin: 12px 0;
}
.phq-docs-info-box code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    background: rgba(10,95,173,0.08);
    padding: 1px 5px;
    border-radius: 3px;
}
.phq-docs-info-box-warn {
    background: #FEF3C7;
    border-left-color: #F59E0B;
}

/* Docs Try-It Panel */
.phq-docs-tryit {
    border-left: 1px solid var(--phq-border);
    padding: 0;
    background: var(--phq-blue-darker);
    color: white;
}
.phq-docs-tryit-sticky {
    position: sticky;
    top: 0;
    padding: 24px 20px;
}
.phq-docs-tryit-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.phq-docs-tryit-header h4 {
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}
.phq-docs-tryit-header svg { color: var(--phq-orange); }

.phq-docs-tryit-field {
    margin-bottom: 16px;
}
.phq-docs-tryit-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
}
.phq-docs-tryit .phq-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: white;
}
.phq-docs-tryit .phq-input:focus {
    border-color: var(--phq-orange);
    box-shadow: 0 0 0 3px rgba(251,173,72,0.15);
}
.phq-docs-tryit .phq-input option { color: var(--phq-text); background: white; }

.phq-docs-tryit-readonly-badge {
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.4);
}

.phq-docs-code-textarea {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.72rem !important;
    line-height: 1.6 !important;
    resize: vertical;
    cursor: default;
}
.phq-docs-code-textarea.has-content {
    border-color: rgba(34,197,94,0.3);
}

/* Send Button */
.phq-docs-send-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--phq-orange);
    color: var(--phq-blue-darker);
    border: none;
    border-radius: var(--phq-radius);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}
.phq-docs-send-btn:hover:not(:disabled) {
    background: var(--phq-orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251,173,72,0.3);
}
.phq-docs-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner */
.phq-docs-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(4,28,53,0.2);
    border-top-color: var(--phq-blue-darker);
    border-radius: 50%;
    animation: phq-spin 0.6s linear infinite;
}
@keyframes phq-spin {
    to { transform: rotate(360deg); }
}

/* Response status badges */
.phq-docs-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.phq-docs-status-ok { background: rgba(34,197,94,0.15); color: #22C55E; }
.phq-docs-status-err { background: rgba(239,68,68,0.15); color: #EF4444; }

/* Badge size variant */
.phq-badge-lg { padding: 4px 12px; font-size: 0.78rem; }

/* Docs responsive */
@media (max-width: 1200px) {
    .phq-docs-layout { grid-template-columns: 1fr 340px; }
    .phq-docs-sidebar { display: none; }
}
@media (max-width: 992px) {
    .phq-docs-hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .phq-docs-hero-text h1 { font-size: 2rem; }
    .phq-docs-hero-image { display: none; }
}
@media (max-width: 768px) {
    .phq-docs-layout { grid-template-columns: 1fr; }
    .phq-docs-tryit { border-left: none; border-top: 1px solid rgba(255,255,255,0.1); }
    .phq-docs-content { padding: 24px 16px; }
    .phq-docs-hero { padding: 60px 16px 48px; }
}

/* ============================================
   Badges
   ============================================ */
.phq-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}
.phq-badge-post { background: #2ecc71; color: white; }
.phq-badge-get { background: #1abc9c; color: white; }
.phq-badge-ai {
    background: var(--phq-orange-light);
    color: var(--phq-orange-dark);
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
}
.phq-badge-soon {
    background: var(--phq-blue-light);
    color: var(--phq-blue);
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
}

/* ============================================
   Content Prose
   ============================================ */
.phq-prose { max-width: 720px; margin: 0 auto; }
.phq-prose h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.phq-prose h3 { font-size: 1.2rem; margin: 28px 0 8px; }
.phq-prose p { margin: 0 0 16px; line-height: 1.7; }
.phq-prose ul, .phq-prose ol { padding-left: 24px; margin: 0 0 16px; }
.phq-prose li { margin-bottom: 8px; line-height: 1.6; }

/* ============================================
   Two-column layout
   ============================================ */
.phq-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

/* ============================================
   Contact Page
   ============================================ */
.phq-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 960px;
    margin: 0 auto;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .phq-footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
    .phq-footer-brand { grid-column: span 3; }
    .phq-cards-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .phq-code-split { grid-template-columns: 1fr; }
    .phq-split { grid-template-columns: 1fr; }
    .phq-contact-grid { grid-template-columns: 1fr; }
    .phq-page-hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .phq-page-hero-text h1 { font-size: 2.4rem; }
    .phq-page-hero-image { display: none; }
}

@media (max-width: 768px) {
    .phq-navbar-inner { padding: 0 16px; }
    .phq-nav-links { display: none; }
    .phq-nav-hamburger { display: flex; }
    .phq-nav-cta { display: none; }

    .phq-hero { padding: 60px 16px 48px; }
    .phq-hero h1 { font-size: 2.2rem; }
    .phq-hero p { font-size: 1rem; }
    .phq-hero-stats { gap: 24px; }

    .phq-page-hero { padding: 60px 16px 48px; }
    .phq-page-hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .phq-page-hero-text h1 { font-size: 2.2rem; }
    .phq-page-hero-image { display: none; }

    .phq-section { padding: 48px 16px; }
    .phq-section-header h2 { font-size: 1.6rem; }

    .phq-footer-grid { grid-template-columns: 1fr 1fr; }
    .phq-footer-brand { grid-column: span 2; }

    .phq-cards-grid-3 { grid-template-columns: 1fr; }
    .phq-cards-grid-2 { grid-template-columns: 1fr; }

    .phq-docs-layout { grid-template-columns: 1fr; }
    .phq-docs-sidebar, .phq-docs-tryit { display: none; }

    .phq-sandbox-layout { grid-template-columns: 1fr; height: auto; }

    .phq-pricing-card.featured { transform: none; }
}

@media (max-width: 480px) {
    .phq-hero h1 { font-size: 1.8rem; }
    .phq-footer-grid { grid-template-columns: 1fr; }
    .phq-footer-brand { grid-column: span 1; }
    .phq-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .phq-footer-bottom a { margin-left: 0; margin: 0 8px; }
}

/* ============================================
   Toast Notifications
   ============================================ */
.phq-toast-container {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
}
.phq-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: 360px;
    padding: 12px 16px;
    background: white;
    border-radius: var(--phq-radius);
    box-shadow: var(--phq-shadow-lg);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--phq-text);
    border-left: 4px solid var(--phq-blue);
    pointer-events: auto;
    animation: phq-toast-in 0.3s ease forwards;
}
.phq-toast-success { border-left-color: #16A34A; }
.phq-toast-error { border-left-color: #DC2626; }
.phq-toast-info { border-left-color: var(--phq-blue); }
.phq-toast-icon {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 1rem;
}
.phq-toast-success .phq-toast-icon { color: #16A34A; }
.phq-toast-error .phq-toast-icon { color: #DC2626; }
.phq-toast-info .phq-toast-icon { color: var(--phq-blue); }
.phq-toast-message { flex: 1; }
.phq-toast-out {
    animation: phq-toast-out 0.3s ease forwards;
}
@keyframes phq-toast-in {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes phq-toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* ============================================
   Blog
   ============================================ */

.phq-blog-card {
    display: flex;
    flex-direction: column;
    background: var(--phq-bg);
    border-radius: var(--phq-radius-lg);
    border: 1px solid var(--phq-border);
    overflow: hidden;
    transition: box-shadow var(--phq-transition), transform var(--phq-transition);
    text-decoration: none;
    color: inherit;
}
.phq-blog-card:hover {
    box-shadow: var(--phq-shadow-lg);
    transform: translateY(-2px);
}

.phq-blog-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.phq-blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--phq-transition);
}
.phq-blog-card:hover .phq-blog-card-image img {
    transform: scale(1.05);
}

.phq-blog-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.phq-blog-card-body h3 {
    margin: 0.5rem 0;
    font-size: 1.15rem;
    line-height: 1.4;
    color: var(--phq-text);
}
.phq-blog-card-body p {
    color: var(--phq-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 1rem;
    flex: 1;
}

.phq-blog-card-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--phq-text-muted);
    border-top: 1px solid var(--phq-border);
    padding-top: 0.75rem;
    margin-top: auto;
}

.phq-blog-category-badge {
    display: inline-block;
    background: var(--phq-blue-light);
    color: var(--phq-blue);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Blog Filters */
.phq-blog-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.phq-blog-filter-pill {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--phq-border);
    background: var(--phq-bg);
    color: var(--phq-text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--phq-transition);
}
.phq-blog-filter-pill:hover,
.phq-blog-filter-pill.active {
    background: var(--phq-blue);
    color: #fff;
    border-color: var(--phq-blue);
}

.phq-blog-search {
    margin-bottom: 2rem;
}
.phq-blog-search input {
    width: 100%;
    max-width: 400px;
    padding: 0.6rem 1rem;
    border: 1px solid var(--phq-border);
    border-radius: var(--phq-radius);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--phq-transition);
}
.phq-blog-search input:focus {
    border-color: var(--phq-blue);
}

/* Blog Post Detail */
.phq-blog-header {
    margin-bottom: 2rem;
}
.phq-blog-header h1 {
    margin: 0.75rem 0;
    font-size: 2.2rem;
    line-height: 1.3;
}

.phq-blog-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--phq-text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}
.phq-blog-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.phq-blog-featured-image {
    margin-bottom: 2rem;
    border-radius: var(--phq-radius-lg);
    overflow: hidden;
}
.phq-blog-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Blog Content Prose */
.phq-blog-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--phq-text);
}
.phq-blog-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--phq-blue-dark);
}
.phq-blog-content h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
}
.phq-blog-content p {
    margin: 0 0 1.25rem;
}
.phq-blog-content ul, .phq-blog-content ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}
.phq-blog-content li {
    margin-bottom: 0.5rem;
}
.phq-blog-content blockquote {
    border-left: 4px solid var(--phq-orange);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--phq-bg-alt);
    border-radius: 0 var(--phq-radius) var(--phq-radius) 0;
    font-style: italic;
    color: var(--phq-text-muted);
}
.phq-blog-content img {
    max-width: 100%;
    border-radius: var(--phq-radius);
    margin: 1rem 0;
}

/* Blog Tags */
.phq-blog-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--phq-border);
}
.phq-blog-tag {
    padding: 0.3rem 0.75rem;
    background: var(--phq-bg-alt);
    border: 1px solid var(--phq-border);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--phq-text-muted);
    text-decoration: none;
    transition: all var(--phq-transition);
}
.phq-blog-tag:hover {
    background: var(--phq-blue-light);
    color: var(--phq-blue);
    border-color: var(--phq-blue);
}

/* Admin Table */
.phq-admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.phq-admin-toolbar h1 {
    margin: 0;
    font-size: 1.5rem;
}

.phq-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.phq-admin-table th,
.phq-admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--phq-border);
}
.phq-admin-table th {
    font-weight: 600;
    color: var(--phq-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.phq-admin-table tr:hover {
    background: var(--phq-bg-alt);
}

.phq-badge-published {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: #DCFCE7;
    color: #16A34A;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}
.phq-badge-draft {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--phq-orange-light);
    color: var(--phq-orange-dark);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.phq-btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--phq-border);
    background: var(--phq-bg);
    color: var(--phq-text);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--phq-transition);
}
.phq-btn-sm:hover {
    background: var(--phq-bg-alt);
}
.phq-btn-danger {
    color: #DC2626;
    border-color: #DC2626;
}
.phq-btn-danger:hover {
    background: #FEF2F2;
}

/* Admin Form */
.phq-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 768px) {
    .phq-form-grid { grid-template-columns: 1fr; }
}
.phq-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.phq-form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--phq-text);
}
.phq-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 768px) {
    .phq-blog-header h1 { font-size: 1.5rem; }
    .phq-blog-content { font-size: 1rem; }
    .phq-admin-toolbar { flex-direction: column; gap: 1rem; align-items: flex-start; }
}

/* ═══════════════════════════════════════════
   CUSTOMER PORTAL
   ═══════════════════════════════════════════ */

.phq-customer-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}

.phq-customer-sidebar {
    width: 260px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.phq-customer-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0.75rem;
}

.phq-customer-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    transition: all 0.15s;
}

.phq-customer-sidebar-link:hover {
    background: #e2e8f0;
    color: #0A5FAD;
}

.phq-customer-sidebar-link.active {
    background: #0A5FAD;
    color: #fff;
}

.phq-customer-sidebar-link.active svg {
    stroke: #fff;
}

.phq-customer-content {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 1100px;
}

.phq-customer-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.phq-customer-page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.phq-customer-page-header p {
    color: #64748b;
    margin: 0.25rem 0 0;
}

/* Portal Stat Cards */
.phq-portal-stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.phq-portal-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.phq-portal-stat-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.phq-portal-stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

/* Quick Links */
.phq-customer-quick-links h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.phq-quick-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.phq-quick-link-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    transition: all 0.15s;
}

.phq-quick-link-card:hover {
    border-color: #0A5FAD;
    color: #0A5FAD;
    box-shadow: 0 2px 8px rgba(10, 95, 173, 0.1);
}

/* Status Badges */
.phq-status-active { color: #16a34a; font-weight: 600; }
.phq-status-past_due { color: #ea580c; font-weight: 600; }
.phq-status-canceled { color: #dc2626; font-weight: 600; }
.phq-status-open { color: #0A5FAD; }
.phq-status-in_progress { color: #FBAD48; }
.phq-status-resolved { color: #16a34a; }
.phq-status-closed { color: #94a3b8; }

.phq-status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.phq-status-badge.phq-status-open { background: #eff6ff; }
.phq-status-badge.phq-status-in_progress { background: #fffbeb; }
.phq-status-badge.phq-status-resolved { background: #f0fdf4; }
.phq-status-badge.phq-status-closed { background: #f1f5f9; }

/* API Key Styles */
.phq-key-masked {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #64748b;
}

.phq-key-reveal {
    background: #1e293b;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.phq-key-reveal code {
    color: #22d3ee;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Tables */
.phq-table-wrapper {
    overflow-x: auto;
}

.phq-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.phq-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    border-bottom: 2px solid #e2e8f0;
}

.phq-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.phq-table tbody tr:hover {
    background: #f8fafc;
}

.phq-table-row-clickable {
    cursor: pointer;
}

/* ═══════════════════════════════════════════
   AUTH PAGES -- Split Panel Design
   ═══════════════════════════════════════════ */

.phq-auth-shell {
    display: flex;
    min-height: 100vh;
}

/* Visual Panel (Left) */
.phq-auth-visual {
    position: relative;
    flex: 0 0 45%;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.phq-auth-visual-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
}

.phq-auth-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(4, 28, 53, 0.7) 0%,
        rgba(6, 46, 84, 0.85) 50%,
        rgba(4, 28, 53, 0.95) 100%
    );
}

.phq-auth-visual-content {
    position: relative;
    z-index: 1;
    padding: 3rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.phq-auth-logo {
    display: inline-block;
    margin-bottom: auto;
}

.phq-auth-logo img {
    height: 32px;
    opacity: 0.9;
}

.phq-auth-visual-text {
    margin-bottom: 2.5rem;
}

.phq-auth-visual-text h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

.phq-auth-visual-text p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
    max-width: 380px;
}

.phq-auth-visual-stats {
    display: flex;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.phq-auth-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.phq-auth-stat-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--phq-orange);
}

.phq-auth-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.phq-auth-stat-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Form Panel (Right) */
.phq-auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: #fff;
    position: relative;
    overflow-y: auto;
}

.phq-auth-form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(10, 95, 173, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.phq-auth-form-inner {
    width: 100%;
    max-width: 420px;
}

.phq-auth-form-inner--register {
    max-width: 480px;
}

.phq-auth-mobile-logo {
    display: none;
}

.phq-auth-mobile-logo img {
    height: 36px;
}

.phq-auth-form-header {
    margin-bottom: 2rem;
}

.phq-auth-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--phq-orange);
    margin-bottom: 0.75rem;
}

.phq-auth-form-header h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--phq-blue-dark);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.phq-auth-form-header p {
    font-size: 0.95rem;
    color: var(--phq-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Error Alert */
.phq-auth-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--phq-radius);
    color: #991b1b;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Form */
.phq-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.phq-auth-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.phq-auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.phq-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.phq-auth-input-wrap svg {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
    flex-shrink: 0;
}

.phq-auth-input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--phq-radius);
    font-size: 0.9rem;
    color: var(--phq-text);
    background: #f8fafc;
    transition: all 0.2s;
    outline: none;
}

.phq-auth-input-wrap input:only-child {
    padding-left: 14px;
}

.phq-auth-input-wrap input:focus {
    border-color: var(--phq-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(10, 95, 173, 0.08);
}

.phq-auth-input-wrap input::placeholder {
    color: #b0bec5;
}

/* Submit Button */
.phq-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    background: var(--phq-gradient-cta);
    color: #fff;
    border: none;
    border-radius: var(--phq-radius);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(10, 95, 173, 0.25);
    margin-top: 0.25rem;
}

.phq-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(10, 95, 173, 0.35);
}

.phq-auth-submit:active {
    transform: translateY(0);
}

.phq-auth-note {
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.5;
    margin: 0;
}

/* Divider */
.phq-auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.phq-auth-divider::before,
.phq-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.phq-auth-divider span {
    font-size: 0.8rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* Alt Action Link */
.phq-auth-alt-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px 24px;
    background: transparent;
    color: var(--phq-blue);
    border: 1.5px solid var(--phq-blue);
    border-radius: var(--phq-radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.phq-auth-alt-action:hover {
    background: rgba(10, 95, 173, 0.04);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 900px) {
    .phq-auth-shell {
        flex-direction: column;
    }

    .phq-auth-visual {
        flex: none;
        min-height: 240px;
    }

    .phq-auth-visual-content {
        padding: 2rem;
        height: auto;
    }

    .phq-auth-logo {
        margin-bottom: 1.5rem;
    }

    .phq-auth-visual-text h2 {
        font-size: 1.5rem;
    }

    .phq-auth-visual-stats {
        gap: 1.5rem;
    }

    .phq-auth-form-panel {
        padding: 2rem;
    }

    .phq-auth-mobile-logo {
        display: none;
    }
}

@media (max-width: 600px) {
    .phq-auth-visual {
        display: none;
    }

    .phq-auth-mobile-logo {
        display: block;
        margin-bottom: 1.5rem;
    }

    .phq-auth-form-panel {
        padding: 1.5rem;
        align-items: flex-start;
        padding-top: 2.5rem;
    }

    .phq-auth-field-row {
        grid-template-columns: 1fr;
    }

    .phq-auth-form-header h1 {
        font-size: 1.5rem;
    }
}

.phq-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.phq-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.phq-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.phq-input {
    padding: 0.65rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e293b;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.phq-input:focus {
    outline: none;
    border-color: #0A5FAD;
    box-shadow: 0 0 0 3px rgba(10, 95, 173, 0.1);
}

.phq-input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
}

textarea.phq-input {
    resize: vertical;
}

select.phq-input {
    appearance: auto;
}

.phq-btn-full {
    width: 100%;
    text-align: center;
}

.phq-btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s;
}

.phq-btn-sm:hover {
    background: #f1f5f9;
}

.phq-btn-outline {
    padding: 0.55rem 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.phq-btn-outline:hover {
    background: #f1f5f9;
}

.phq-btn-danger {
    border-color: #fca5a5;
    color: #dc2626;
}

.phq-btn-danger:hover {
    background: #fef2f2;
}

.phq-form-note {
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
    margin-top: 0.5rem;
}

.phq-account-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #64748b;
}

.phq-account-footer a {
    color: #0A5FAD;
    font-weight: 600;
    text-decoration: none;
}

/* Alerts */
.phq-alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.phq-alert h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.phq-alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.phq-alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Modal */
.phq-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.phq-modal {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.phq-modal h3 {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    color: #1e293b;
}

.phq-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* NavBar Avatar */
.phq-nav-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--phq-blue) 0%, #1477CC 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(10, 95, 173, 0.3);
    transition: all 0.2s;
}

.phq-nav-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(10, 95, 173, 0.4);
}

.phq-nav-login {
    color: var(--phq-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 8px 18px;
    border-radius: var(--phq-radius);
    border: 1.5px solid var(--phq-border);
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.phq-nav-login:hover {
    color: var(--phq-blue);
    border-color: var(--phq-blue);
    background: rgba(10, 95, 173, 0.04);
}

.phq-dropdown-right {
    right: 0;
    left: auto;
}

/* Invite Form */
.phq-invite-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.phq-invite-form .phq-form-group {
    flex: 1;
    min-width: 200px;
}

/* Ticket Thread */
.phq-ticket-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #64748b;
}

.phq-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.phq-ticket-message {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
}

.phq-ticket-message.phq-ticket-staff {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.phq-ticket-message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.phq-ticket-message-time {
    color: #94a3b8;
    margin-left: auto;
}

.phq-badge-staff {
    background: #0A5FAD;
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.phq-ticket-message-body {
    color: #334155;
    line-height: 1.6;
}
.phq-ticket-message-body p { margin: 0.4em 0; }
.phq-ticket-message-body ul,
.phq-ticket-message-body ol { padding-left: 1.4em; margin: 0.4em 0; }
.phq-ticket-message-body h3,
.phq-ticket-message-body h4 { margin: 0.6em 0 0.2em; font-size: 1em; }
.phq-ticket-message-body a { color: var(--phq-blue); text-decoration: underline; }
.phq-ticket-html-body { /* admin view alias */ }

.phq-ticket-reply {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

.phq-ticket-reply-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.phq-back-link {
    color: #64748b;
    font-size: 0.85rem;
    text-decoration: none;
}

.phq-back-link:hover {
    color: #0A5FAD;
}

/* Responsive */
@media (max-width: 768px) {
    .phq-customer-layout {
        flex-direction: column;
    }

    .phq-customer-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 0.75rem 0;
    }

    .phq-customer-sidebar nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 0.5rem;
    }

    .phq-customer-sidebar-link {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .phq-customer-content {
        padding: 1.5rem;
    }

    .phq-form-row {
        grid-template-columns: 1fr;
    }

    .phq-invite-form {
        flex-direction: column;
    }

    .phq-portal-stat-cards {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===================================================
   Admin Layout (phq-admin-*)
   -- Structural layout rules only; colors now in sd- system
   =================================================== */

:root {
    --adm-sidebar-w:  232px;
    --adm-radius:     8px;
    --adm-radius-lg:  12px;
    --adm-tr:         all 0.16s ease;
}

/* ── Layout shell ──────────────────────────────────── */

.phq-admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────── */

.phq-admin-sidebar {
    width: var(--adm-sidebar-w);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.phq-admin-sidebar-header {
    padding: 1.375rem 1.25rem 1rem;
}

.phq-admin-sidebar-header span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phq-admin-sidebar-header span::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.phq-admin-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0.875rem 0.625rem;
    flex: 1;
}

.phq-admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--adm-radius);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: var(--adm-tr);
    border: 1px solid transparent;
}

.phq-admin-sidebar-link svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.16s;
}

.phq-admin-sidebar-link:hover svg { opacity: 1; }

.phq-admin-sidebar-link.active svg { opacity: 1; }

.phq-admin-sidebar-footer {
    padding: 0.875rem 0.625rem;
}

.phq-admin-logout-btn {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--adm-radius);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: var(--adm-tr);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phq-admin-logout-btn::before {
    content: '↩';
    font-size: 0.8rem;
    opacity: 0.5;
}

/* ── Content area ──────────────────────────────────── */

.phq-admin-content {
    flex: 1;
    padding: 2rem 2.25rem;
    overflow-y: auto;
    min-width: 0;
}

/* ── Page header ───────────────────────────────────── */

.phq-admin-page-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
}

.phq-admin-page-header h1 {
    font-size: 1.45rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
    letter-spacing: -0.01em;
}

.phq-admin-page-header p {
    margin: 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.phq-admin-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.625rem;
    transition: color 0.15s;
}

/* ── Filters bar ───────────────────────────────────── */

.phq-admin-filters {
    display: flex;
    gap: 0.625rem;
    margin-bottom: 1.125rem;
    flex-wrap: wrap;
    align-items: center;
}

.phq-admin-search {
    min-width: 200px;
    flex: 1;
}

.phq-admin-filter-select {
    min-width: 150px;
}

/* Input/select styles inside admin are handled by sd-* classes */

/* ── Admin button overrides ────────────────────────── */
/* Button styling inside admin is handled by sd-btn-* classes */

/* ── Pagination ────────────────────────────────────── */

.phq-admin-pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    font-size: 0.8rem;
}

/* ── Stat cards ────────────────────────────────────── */

.phq-admin-stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Stat card overrides inside admin handled by sd-stat-card classes */

/* ── Tables ────────────────────────────────────────── */

.phq-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.phq-admin-table th {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 0.875rem 0.625rem;
    text-align: left;
    font-weight: 500;
}

.phq-admin-table td {
    padding: 0.75rem 0.875rem;
    vertical-align: middle;
}

.phq-admin-table tbody tr {
    transition: background 0.12s;
}

.phq-admin-table tbody tr:last-child td {
    border-bottom: none;
}

.phq-admin-table a {
    text-decoration: none;
}
.phq-admin-table a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Panel row (dashboard two-col) ────────────────── */

.phq-admin-panel-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.phq-admin-panel {
    border-radius: var(--adm-radius-lg);
    padding: 1.375rem 1.5rem;
}

.phq-admin-panel-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 1rem;
}

.sd-admin-see-all,
.phq-admin-see-all {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.15s;
}

.phq-admin-empty {
    font-size: 0.875rem;
    font-style: italic;
    padding: 1rem 0;
}

/* ── Detail grid ───────────────────────────────────── */

.phq-admin-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.phq-admin-card {
    border-radius: var(--adm-radius-lg);
    padding: 1.375rem 1.5rem;
}

.phq-admin-card-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 1.125rem;
}

.phq-admin-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5625rem 0;
    font-size: 0.875rem;
}

.phq-admin-detail-row:last-of-type {
    border-bottom: none;
}

.phq-admin-detail-label {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.phq-admin-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
}

.phq-admin-inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Alerts ────────────────────────────────────────── */

.phq-admin-alert-success {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: var(--adm-radius);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.phq-admin-alert-success::before { content: '✓'; font-weight: 700; }

.phq-admin-alert-error {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: var(--adm-radius);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.phq-admin-alert-error::before { content: '✕'; font-weight: 700; }

/* ── Ticket detail layout ──────────────────────────── */

.phq-admin-ticket-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.25rem;
    align-items: start;
}

.phq-admin-ticket-controls {
    position: sticky;
    top: 1.5rem;
}

.phq-admin-ticket-messages {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.phq-admin-message {
    border-radius: var(--adm-radius-lg);
    padding: 1rem 1.125rem;
    font-size: 0.875rem;
    position: relative;
}

.phq-admin-message-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    margin-bottom: 0.625rem;
    letter-spacing: 0.02em;
}

.phq-admin-message-time {
    margin-left: auto;
    font-size: 0.7rem;
}

.phq-admin-message-body {
    line-height: 1.65;
    white-space: pre-wrap;
}

/* ── Status badges -- use sd-badge-* classes from phq-stripe-ui.css ── */

/* ── Priority badge ────────────────────────────────── */

.phq-admin-priority {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── Admin toolbar (list pages) ────────────────────── */

.phq-admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.phq-admin-toolbar h1 {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0;
}

/* ── Admin table action button -- use sd-btn-* classes ── */

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 1280px) {
    .phq-admin-stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .phq-admin-panel-row,
    .phq-admin-detail-grid,
    .phq-admin-ticket-layout {
        grid-template-columns: 1fr;
    }
    .phq-admin-ticket-controls {
        position: static;
    }
}

@media (max-width: 768px) {
    :root { --adm-sidebar-w: 100%; }
    .phq-admin-layout { flex-direction: column; }

    .phq-admin-sidebar {
        position: static;
        height: auto;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(10,37,64,0.08);
    }
    .phq-admin-sidebar nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0.5rem;
        gap: 2px;
    }
    .phq-admin-sidebar-link { white-space: nowrap; }
    .phq-admin-content { padding: 1.25rem; }
    .phq-admin-stat-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .phq-admin-layout {
        flex-direction: column;
    }
    .phq-admin-sidebar {
        width: 100%;
    }
    .phq-admin-sidebar nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0.5rem;
    }
    .phq-admin-sidebar-link {
        white-space: nowrap;
    }
    .phq-admin-content {
        padding: 1.25rem;
    }
}

/* ============================================
   Packer Workspace
   ============================================ */
.phq-packer-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--phq-border);
    flex-wrap: wrap;
}

.phq-packer-topbar-left {
    flex: 1;
    min-width: 0;
}

.phq-packer-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.phq-packer-name-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--phq-border);
    color: var(--phq-dark, #1a1a2e);
    font-size: 1rem;
    font-weight: 600;
    padding: 4px 2px;
    width: 100%;
    max-width: 280px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s;
}

.phq-packer-name-input:focus {
    border-bottom-color: var(--phq-blue);
}

.phq-packer-name-input::placeholder {
    color: rgba(0,0,0,0.35);
    font-weight: 400;
}

/* Topbar buttons: light-context overrides */
.phq-packer-topbar .phq-btn-sm,
.phq-packer-topbar a.phq-btn-sm {
    background: transparent;
    color: var(--phq-blue);
    border: 1px solid var(--phq-border);
}
.phq-packer-topbar .phq-btn-sm:hover,
.phq-packer-topbar a.phq-btn-sm:hover {
    background: var(--phq-blue-light, #e8f0fb);
    color: var(--phq-blue);
    border-color: var(--phq-blue);
    transform: none;
}

.phq-packer-batch {
    padding: 1.25rem 1.5rem;
}

/* Enterprise badge (used in BatchPackPanel) */
.phq-badge-enterprise {
    background: var(--phq-blue-light, #e8f0fb);
    color: var(--phq-blue, #0A5FAD);
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
}

/* ───── Result page (shared pack viewer) ───── */
.phq-result-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    flex: 1;
    min-height: 0;
    height: 100%;
}
.phq-result-layout--collapsed {
    grid-template-columns: 1fr 40px;
}

.phq-result-viewer {
    position: relative;
    background: #1a1a2e;
    min-height: 0;
    overflow: hidden;
}
.phq-result-viewer canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.phq-result-sidebar {
    overflow-y: auto;
    padding: 14px 16px;
    border-left: 1px solid var(--phq-border);
    background: var(--phq-bg, #fff);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.phq-result-section-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--phq-text-muted);
    margin: 0 0 6px;
}

/* stat cards */
.phq-result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.phq-result-stat {
    background: var(--phq-bg-alt, #F7F9FC);
    border: 1px solid var(--phq-border);
    border-radius: 6px;
    padding: 10px 12px;
}
.phq-result-stat--wide {
    grid-column: 1 / -1;
}
.phq-result-stat-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--phq-blue, #0A5FAD);
    line-height: 1.1;
}
.phq-result-stat-label {
    font-size: 0.72rem;
    color: var(--phq-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 2px;
}

/* container navigator */
.phq-result-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--phq-bg-alt, #F7F9FC);
    border: 1px solid var(--phq-border);
    border-radius: 6px;
}
.phq-result-nav-label {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
}
.phq-result-nav-embed {
    margin-left: 4px;
    font-family: monospace;
}

.phq-result-container-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 4px 0 2px;
}

.phq-result-items .phq-table {
    font-size: 0.78rem;
}

/* collapsed sidebar -- hide all content except the toggle button */
.phq-result-layout--collapsed .phq-result-sidebar > *:not(.phq-result-collapse-toggle) {
    display: none;
}
.phq-result-layout--collapsed .phq-result-sidebar {
    padding: 8px 4px;
}

/* ============================================
   Accessibility
   ============================================ */

/* Skip-to-content link -- visually hidden until focused */
.phq-skip-link {
    position: absolute;
    top: -100%;
    left: 8px;
    z-index: 9999;
    background: var(--phq-blue);
    color: #fff;
    padding: 8px 16px;
    border-radius: 0 0 var(--phq-radius) var(--phq-radius);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: top 0.15s;
}
.phq-skip-link:focus {
    top: 0;
}

/* Focus-visible rings -- applies after any outline:none on :focus */
.phq-btn-primary:focus-visible,
.phq-btn-secondary:focus-visible,
.phq-btn-accent:focus-visible,
.phq-btn-ghost:focus-visible,
.phq-btn-outline:focus-visible,
.phq-btn-outline-blue:focus-visible,
.phq-btn-outline-white:focus-visible,
.phq-preset-btn:focus-visible,
.phq-input:focus-visible,
.phq-customer-sidebar-link:focus-visible,
.phq-nav-link:focus-visible,
.phq-auth-submit:focus-visible,
.phq-modal-close:focus-visible,
.phq-verify-banner-btn:focus-visible {
    outline: 2px solid var(--phq-orange);
    outline-offset: 2px;
}

/* 44px touch targets for interactive table controls on touch devices */
@media (hover: none) and (pointer: coarse) {
    .phq-preset-btn {
        min-height: 44px;
    }
    .phq-row-remove-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Table horizontal scroll on narrow viewports */
.phq-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Row remove button -- visual is compact but tap target is full 44×44 */
.phq-row-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
}
.phq-row-remove-btn:hover { color: #c0392b; }
@media (hover: none) and (pointer: coarse) {
    .phq-row-remove-btn {
        min-width: 44px;
        min-height: 44px;
    }
}
.phq-cell-invalid input, input.phq-cell-invalid {
    border-color: #e74c3c !important;
    background: rgba(231, 76, 60, 0.07);
}
.phq-utilization-tooltip { position: relative; cursor: default; }
.phq-utilization-tooltip::after {
    content: attr(data-tip);
    display: none;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 0.72rem;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 100;
}
.phq-utilization-tooltip:hover::after { display: block; }

/* ============================================
   Customer Portal Utility Classes (Batch 1)
   ============================================ */

/* Page header */
.phq-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.phq-page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--phq-text, #1a1a1a);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.phq-page-subtitle {
    font-size: 0.8125rem;
    color: var(--phq-text-muted, #6b7280);
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Empty state */
.phq-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}
.phq-empty-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--phq-text, #1a1a1a);
    margin-bottom: 0.5rem;
    margin-top: 0;
}
.phq-empty-text {
    font-size: 0.8125rem;
    max-width: 28rem;
    color: var(--phq-text-muted, #6b7280);
    margin: 0;
}

/* Secondary button -- white/neutral, same sizing as phq-btn-primary */
.phq-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: #fff;
    color: var(--phq-text, #1a1a1a);
    border: 1px solid var(--phq-border, #e5e7eb);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.phq-btn-secondary:hover:not(:disabled) {
    background: var(--phq-bg-alt, #f9fafb);
    border-color: #d1d5db;
    text-decoration: none;
}
.phq-btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Alert variants (extends existing .phq-alert base) */
.phq-alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.phq-alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* Subscription status badges (extends existing .phq-badge base) */
.phq-badge-active, .phq-badge-paid {
    background: rgba(48, 182, 114, 0.12);
    color: #0d6638;
    border: 1px solid rgba(48, 182, 114, 0.3);
}
.phq-badge-past_due {
    background: rgba(205, 61, 100, 0.1);
    color: #a0203d;
    border: 1px solid rgba(205, 61, 100, 0.25);
}
.phq-badge-canceled {
    background: rgba(66, 84, 102, 0.08);
    color: #425466;
    border: 1px solid rgba(66, 84, 102, 0.18);
}
.phq-badge-trialing {
    background: rgba(99, 91, 255, 0.1);
    color: #3730a3;
    border: 1px solid rgba(99, 91, 255, 0.25);
}
.phq-badge-incomplete {
    background: rgba(232, 131, 58, 0.1);
    color: #8c4a12;
    border: 1px solid rgba(232, 131, 58, 0.3);
}

/* Structured card -- header/body/title pattern (used by Billing, Support) */
.phq-card {
    background: var(--phq-bg-card, #fff);
    border: 1px solid var(--phq-border, #e5e7eb);
    border-radius: 10px;
}
.phq-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--phq-border, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.phq-card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--phq-text-muted, #6b7280);
    margin: 0;
}
.phq-card-body { padding: 1.5rem; }

/* Portal card -- promoted from Dashboard/Usage inline styles */
.phq-portal-card {
    background: var(--phq-bg-card, #fff);
    border: 1px solid var(--phq-border, #e5e7eb);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}
.phq-portal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.phq-portal-card-title { font-weight: 600; font-size: 0.9rem; color: var(--phq-text, #1a1a1a); }
.phq-portal-card-link { font-size: 0.82rem; color: var(--phq-blue, #0A5FAD); text-decoration: none; }
.phq-portal-card-link:hover { text-decoration: underline; }

/* Portal stat card limit hint -- promoted from Dashboard/Usage inline styles */
.phq-portal-stat-card-limit {
    font-size: 0.75rem;
    color: var(--phq-text-muted, #6b7280);
    margin-left: 0.25rem;
    font-weight: 400;
}

/* Text and font utilities */
.phq-text-sm { font-size: 0.875rem; }
.phq-text-muted { color: var(--phq-text-muted, #6b7280); }
.phq-mono { font-family: ui-monospace, SFMono-Regular, 'JetBrains Mono', monospace; }

/* Utilization bar -- lightweight, no JS, used in SharedResult */
.phq-utilization-bar-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}
.phq-utilization-bar {
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    flex: 1;
    overflow: hidden;
}
.phq-utilization-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}
.phq-utilization-bar-fill--high  { background: #22c55e; }
.phq-utilization-bar-fill--mid   { background: #f59e0b; }
.phq-utilization-bar-fill--low   { background: #ef4444; }
.phq-utilization-bar-label { font-size: 0.75rem; color: var(--phq-text-muted, #6b7280); white-space: nowrap; }

/* SVG hero on SharedResult -- scales with container width */
.phq-shared-svg-hero {
    display: block;
    max-width: 480px;
    width: 100%;
    height: auto;
    margin: 0 auto 1.5rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--phq-border, #e5e7eb);
    padding: 0.5rem;
}
@media (max-width: 600px) {
    .phq-shared-svg-hero { max-width: 100%; }
}

/* Skeleton loaders (Batch 4) */
@keyframes phq-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}
.phq-skeleton {
    background: linear-gradient(90deg, #e8ecf0 25%, #f4f6f8 50%, #e8ecf0 75%);
    background-size: 800px 100%;
    border-radius: 6px;
}
@media (prefers-reduced-motion: no-preference) {
    .phq-skeleton { animation: phq-shimmer 1.4s ease-in-out infinite; }
}
.phq-skeleton-text {
    height: 0.85rem;
    border-radius: 4px;
    margin-bottom: 0.4rem;
}
.phq-skeleton-card {
    height: 120px;
    border-radius: 10px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .phq-animate-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .phq-animate-in.phq-visible {
        opacity: 1;
        transform: none;
    }
    .phq-animate-delay-1,
    .phq-animate-delay-2,
    .phq-animate-delay-3,
    .phq-animate-delay-4 {
        transition-delay: 0s;
    }
}

/* Help icon & CSS-only tooltip */
.phq-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 5px;
    color: var(--phq-text-muted);
    cursor: help;
    vertical-align: middle;
    border-radius: 50%;
    flex-shrink: 0;
    transition: color .12s ease, background .12s ease;
    position: relative;
}
.phq-help-icon:hover,
.phq-help-icon:focus-visible {
    color: var(--phq-blue);
    outline: none;
    background: rgba(10, 95, 173, .08);
}
.phq-help-icon:focus-visible {
    box-shadow: 0 0 0 2px rgba(10, 95, 173, .25);
}

/* Shared tooltip host (works on any element with data-tip) */
.phq-tip-host {
    position: relative;
}

/* Tooltip bubble rendered via CSS ::after */
.phq-help-icon::after,
.phq-tip-host::after {
    content: attr(data-tip);
    display: none;
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, .96);
    color: #fff;
    font-size: .74rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    pointer-events: none;
    z-index: 10000;
    text-align: left;
}
.phq-help-icon:hover::after,
.phq-help-icon:focus-visible::after,
.phq-tip-host:hover::after,
.phq-tip-host:focus-visible::after {
    display: block;
}

/* Position variants */
.phq-tip-bottom::after {
    bottom: auto;
    top: calc(100% + 7px);
}
.phq-tip-right::after {
    left: calc(100% + 7px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}
.phq-tip-left::after {
    left: auto;
    right: calc(100% + 7px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

@media (max-width: 640px) {
    .phq-help-icon::after,
    .phq-tip-host::after {
        max-width: 220px;
        font-size: .71rem;
    }
}

/* Pallet load-order badge in 3D viewer */
.phq-pallet-load-badge {
    background: #0A5FAD;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-family: Segoe UI, sans-serif;
    padding: 2px 9px;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* Load-sequence strip in result panel */
.phq-load-sequence-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}
.phq-load-sequence-chip {
    background: #0A5FAD;
    border: 1px solid #084d8c;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s ease;
}
.phq-load-sequence-chip:hover { background: #084d8c; }
.phq-load-sequence-chip-arrow {
    color: var(--phq-text-muted);
    font-size: 0.7rem;
}
