/* Client portal — light studio theme (homepage) + gray theme (inner pages) */

.client-body {
    --bg:              #f7f6f3;
    --surface:         #ffffff;
    --surface-raised:  #ffffff;
    --border:          #e2dfd8;
    --border-light:    #eceae4;
    --text:            #1a1a1a;
    --text-muted:      #5c5c5c;
    --text-faint:      #8a8a8a;
    --accent:          #0d6e6e;
    --accent-hover:    #0a5858;
    --accent-light:    rgba(13, 110, 110, 0.08);
    --shadow:          0 1px 2px rgba(26, 26, 26, 0.04);
    --shadow-md:       0 16px 48px rgba(26, 26, 26, 0.08);
    --landing-serif:   'Fraunces', Georgia, serif;
    --landing-sans:    'DM Sans', system-ui, sans-serif;
    --ink:             #12332f;
    --ink-2:           #0d5252;
    background: var(--bg);
    color: var(--text);
    font-family: var(--landing-sans);
    min-height: 100vh;
}

/* Homepage — warm light studio */
.client-body-home {
    --bg:              #f7f6f3;
    --surface:         #ffffff;
    --surface-raised:  #ffffff;
    --border:          #e2dfd8;
    --border-light:    #eceae4;
    --text:            #1a1a1a;
    --text-muted:      #5c5c5c;
    --text-faint:      #8a8a8a;
    --accent:          #0d6e6e;
    --accent-hover:    #0a5858;
    --accent-light:    rgba(13, 110, 110, 0.08);
    --shadow:          0 1px 2px rgba(26, 26, 26, 0.04);
    --shadow-md:       0 16px 48px rgba(26, 26, 26, 0.08);
    --landing-serif:   'Fraunces', Georgia, serif;
    --landing-sans:    'DM Sans', system-ui, sans-serif;
    background: var(--bg);
    font-family: var(--landing-sans);
}

.client-body-home .btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.client-body-home .btn-primary:hover,
.client-body-home .btn-primary:focus {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.client-body-home .btn-outline-secondary {
    color: var(--text);
    border-color: var(--border);
    background: transparent;
}

.client-body-home .btn-outline-secondary:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

.client-body .btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.client-body .btn-primary:hover,
.client-body .btn-primary:focus {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.client-body .btn-outline-secondary {
    color: var(--text-muted);
    border-color: var(--border);
    background: var(--surface-raised);
}

.client-body .btn-outline-secondary:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

/* Serif display headings on inner client pages (landing design language) */
.client-body .client-landing-title,
.client-body .client-dashboard-title,
.client-body .client-project-hero-title,
.client-body .portal-hero-title,
.client-body .portal-cta-band-inner h2,
.client-body .portal-access-card-title,
.client-body .portal-recent-title,
.client-body .inquiry-header h1,
.client-body .inquiry-flow-step-title,
.client-body .inquiry-hub-overview-title,
.client-body .inquiry-hub-title,
.client-body .inquiry-hub-reply-title {
    font-family: var(--landing-serif, Georgia, serif);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.client-main {
    padding: 20px 0 60px;
    width: 100%;
}

.client-main.client-main-home {
    padding: 0 0 60px;
}

.client-main .container,
.client-main .container-xl {
    max-width: none;
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
}

.client-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 246, 243, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.client-nav .container-xl {
    max-width: 1280px;
    padding-left: 24px;
    padding-right: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.client-brand {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.client-brand i {
    color: var(--accent);
}

.client-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.client-nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.client-nav-link:hover {
    background: var(--accent-light);
    color: var(--text);
}

.client-nav-link-cta {
    background: var(--accent);
    color: #fff;
    padding: 7px 16px;
}

.client-nav-link-cta:hover {
    background: var(--accent-hover);
    color: #fff;
}

.client-footer {
    background: rgba(248, 249, 251, 0.6);
    border-top: 1px solid var(--border);
    padding: 24px 0;
}

.client-footer .container-xl {
    max-width: 1280px;
    padding-left: 24px;
    padding-right: 24px;
}

.client-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-faint);
}

.client-footer-links {
    display: flex;
    gap: 20px;
}

.client-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
}

.client-footer-links a:hover {
    color: var(--text);
}

/* Landing */
.client-landing {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.client-landing-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: var(--shadow-md);
}

.client-landing-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 14px;
    font-size: 26px;
}

.client-landing-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 6px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.client-landing-sub {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 28px;
    line-height: 1.55;
}

.client-landing-foot {
    font-size: 12px;
    color: var(--text-faint);
    text-align: center;
    margin: 24px 0 0;
}

/* Project page */
.client-project-shell {
    max-width: none;
    margin: 0;
}

/* Unified dashboard card */
.client-project-dashboard {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.client-dashboard-head {
    padding: 16px 22px 18px;
    background:
        radial-gradient(ellipse 80% 120% at 100% 0%, rgba(13, 110, 110, 0.07), transparent 55%),
        linear-gradient(180deg, #fbfaf7 0%, var(--surface) 100%);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.client-dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.client-dashboard-toolbar .client-back-link {
    margin-bottom: 0;
    margin-left: -6px;
}

.client-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.client-dashboard-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.client-dashboard-action:hover {
    color: var(--accent);
    border-color: rgba(13, 110, 110, 0.35);
    background: var(--accent-light);
}

.client-dashboard-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 20px;
    align-items: end;
}

.client-dashboard-identity {
    min-width: 0;
}

.client-dashboard-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.client-dashboard-kicker {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.client-dashboard-title {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.client-dashboard-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin: 10px 0 0;
    line-height: 1.55;
    max-width: 640px;
}

.client-dashboard-review-cue {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.client-dashboard-review-cue:hover {
    color: #78350f;
    background: #fef3c7;
}

.client-dashboard-review-cue span {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
}

.client-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(88px, 110px));
    gap: 10px;
    flex-shrink: 0;
}

.client-dashboard-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    min-width: 0;
    box-shadow: var(--shadow);
}

.client-dashboard-stat strong {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text);
}

.client-dashboard-stat span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-faint);
}

.client-dashboard-stat.is-alert {
    background: #fffbeb;
    border-color: #fcd34d;
}

.client-dashboard-stat.is-alert strong {
    color: #b45309;
}

.client-dashboard-stat.is-alert span {
    color: #92400e;
}

.client-dashboard-stat.is-done strong {
    color: #0d6e6e;
}

.client-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 16px;
    padding: 6px 10px;
    margin-left: -10px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.client-back-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.45);
}

.client-body .project-breadcrumb {
    margin-bottom: 16px;
}

.client-body .project-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 10px;
    margin-left: -10px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.client-body .project-breadcrumb a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.45);
}

.client-body .task-detail-header,
.client-body .task-detail-page .card {
    background: var(--surface-raised);
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.client-body .task-detail-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 10px 0 12px;
}

.client-body .developer-proof-section {
    background: var(--surface-raised);
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.client-body .developer-proof-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.client-body .developer-proof-head h2 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-body .developer-proof-head h2 i {
    color: #b45309;
}

.client-body .developer-proof-head time {
    font-size: 11px;
    color: var(--text-faint);
    white-space: nowrap;
}

.client-body .developer-proof-body {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
}

.client-body .reopen-ai-section {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 18px;
}

.client-body .reopen-ai-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.client-body .reopen-ai-head i {
    color: var(--accent);
    margin-right: 4px;
}

.client-body .reopen-ai-intro {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 12px;
    line-height: 1.5;
}

.client-body .reopen-ai-window {
    max-height: 280px;
    min-height: 120px;
    margin-bottom: 10px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px;
    overflow-y: auto;
}

.client-body .reopen-ai-input {
    margin-bottom: 0;
}

.client-body .reopen-feedback-draft {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.client-body .reopen-feedback-draft-head {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.client-body .reopen-feedback-preview {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0 0 10px;
    white-space: pre-wrap;
}

/* ═══════════════════════════════════════════════════════════════
   Client task detail page
═══════════════════════════════════════════════════════════════ */

.client-task-page {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0 0 24px;
}

.client-task-dashboard {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.client-task-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    align-items: stretch;
    min-height: 0;
}

.client-task-primary {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-light);
}

.client-task-hero {
    background:
        radial-gradient(ellipse 80% 120% at 100% 0%, rgba(13, 110, 110, 0.07), transparent 55%),
        linear-gradient(180deg, #fbfaf7 0%, var(--surface) 100%);
    border: none;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    padding: 12px 16px 12px;
    margin-bottom: 0;
    box-shadow: none;
    flex-shrink: 0;
}

.client-task-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.client-task-toolbar .client-back-link {
    margin-bottom: 0;
    margin-left: -4px;
    font-size: 12px;
}

.client-task-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.client-task-code {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: var(--accent-light);
    border-radius: 5px;
    padding: 2px 7px;
}

.client-task-title {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
    margin: 0 0 6px;
    word-break: break-word;
}

.client-task-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 12px;
    color: var(--text-faint);
    margin-bottom: 10px;
}

.client-task-sub i {
    margin-right: 3px;
}

.client-task-page-link {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}

.client-task-page-link:hover {
    text-decoration: underline;
}

/* Progress track */
.client-task-track {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--border-light);
}

.client-task-track-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
    text-align: center;
}

.client-task-track-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 4px;
    left: calc(50% + 7px);
    right: calc(-50% + 7px);
    height: 2px;
    background: var(--border-light);
    z-index: 0;
}

.client-task-track-step.is-done:not(:last-child)::after,
.client-task-track-step.is-current:not(:last-child)::after {
    background: var(--accent);
}

.client-task-track-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--surface);
    position: relative;
    z-index: 1;
}

.client-task-track-step.is-done .client-task-track-dot,
.client-task-track-step.is-current .client-task-track-dot {
    background: var(--accent);
}

.client-task-track-step.is-current .client-task-track-dot {
    box-shadow: 0 0 0 2px var(--accent-light);
}

.client-task-track-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-faint);
}

.client-task-track-step.is-done .client-task-track-label,
.client-task-track-step.is-current .client-task-track-label {
    color: var(--text);
}

/* Main column */
.client-task-main {
    padding: 4px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.client-task-section {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.client-task-section:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.client-task-section-title,
.client-task-card-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.client-task-section-title i,
.client-task-card-label i {
    color: var(--accent);
    font-size: 12px;
}

/* Legacy card class kept for any stray references */
.client-task-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 12px 0;
    margin-bottom: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--border-light);
}

.client-task-count {
    font-size: 9px;
    font-weight: 700;
    background: var(--bg);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 1px 6px;
    letter-spacing: 0;
    text-transform: none;
}

.client-task-body {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px 12px;
}

.client-task-lede {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0 0 10px;
}

.client-task-empty {
    text-align: center;
    padding: 20px 12px;
    color: var(--text-muted);
}

.client-task-empty i {
    font-size: 20px;
    opacity: 0.4;
    display: block;
    margin-bottom: 6px;
}

.client-task-empty p {
    margin: 0;
    font-size: 13px;
}

/* Conversation bubbles — warm studio palette */
.client-task-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.client-task-bubble {
    display: flex;
    gap: 8px;
    max-width: 94%;
}

.client-task-bubble--you {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.client-task-bubble--dev {
    align-self: flex-start;
}

.client-task-avatar {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.client-task-bubble--you .client-task-avatar {
    background: var(--accent);
    color: #fff;
}

.client-task-bubble--dev .client-task-avatar {
    background: var(--accent-light);
    color: var(--accent);
}

.client-task-bubble-content {
    min-width: 0;
}

.client-task-bubble-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
    font-size: 11px;
}

.client-task-bubble--you .client-task-bubble-meta {
    flex-direction: row-reverse;
}

.client-task-bubble-meta strong {
    font-weight: 600;
    color: var(--text);
}

.client-task-bubble-meta time {
    color: var(--text-faint);
}

.client-task-bubble-body {
    font-size: 13px;
    line-height: 1.45;
    padding: 8px 11px;
    border-radius: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.client-task-bubble--you .client-task-bubble-body {
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.client-task-bubble--dev .client-task-bubble-body {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.client-task-bubble--proof .client-task-bubble-body {
    border-color: rgba(13, 110, 110, 0.28);
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--accent-light);
}

.client-task-proof-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 3px 8px;
    border-radius: 6px;
}

.client-task-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.client-task-attachments img {
    height: 56px;
    width: auto;
    border-radius: 6px;
    border: 1px solid var(--border);
    object-fit: cover;
}

/* Task page AI assistant */
.client-task-assist.is-collapsed {
    padding: 8px 0;
    overflow: hidden;
}

.client-task-assist.is-collapsed .client-task-assist-launch {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
}

.client-task-assist-launch {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.client-task-assist-launch:hover {
    background: rgba(13, 110, 110, 0.04);
}

.client-task-assist-launch-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(13, 110, 110, 0.1);
    color: #0d6e6e;
    font-size: 14px;
}

.client-task-assist-launch-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.client-task-assist-launch-copy strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.client-task-assist-launch-copy span {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.3;
}

.client-task-assist-launch-cta {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 600;
    color: #0d6e6e;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.client-task-assist.is-open .client-task-assist-launch {
    display: none;
}

.client-task-assist-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.client-task-assist-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.client-task-assist-close {
    color: var(--text-muted);
    padding: 4px 8px;
}

.client-task-assist-close:hover {
    color: var(--text);
}

.client-task-assist-head .client-task-card-label,
.client-task-assist-head .client-task-section-title {
    margin-bottom: 0;
}

.client-task-assist-lede {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0 0 12px;
}

.client-task-assist-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.client-task-assist-chip {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    padding: 5px 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.client-task-assist-chip:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.client-task-assist-window {
    max-height: 220px;
    min-height: 100px;
    overflow-y: auto;
    margin-bottom: 10px;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.client-task-assist-draft {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    padding: 12px;
    margin-bottom: 10px;
}

.client-task-assist-draft-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 650;
    color: var(--accent);
}

.client-task-assist-draft-intent {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 2px 8px;
}

.client-task-assist-deadline {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 12.5px;
}

.client-task-assist-deadline.is-ok {
    background: var(--accent-light);
    border: 1px solid rgba(13, 110, 110, 0.25);
}

.client-task-assist-deadline.is-tight {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(180, 83, 9, 0.25);
}

.client-task-assist-deadline-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 6px;
    color: var(--text);
}

.client-task-assist-deadline-title span {
    width: 100%;
    color: var(--text-muted);
    font-weight: 500;
}

.client-task-assist-deadline-reasons,
.client-task-assist-conflicts {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.client-task-assist-conflicts-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-faint);
    margin: 8px 0 4px;
}

.client-task-assist-draft-text {
    font-size: 13.5px;
    margin-bottom: 10px;
}

.client-task-assist-submit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.client-task-assist-submit-row .client-reopen-upload {
    flex: 1;
    min-width: 160px;
    margin: 0;
}

.client-task-assist-submit-row .btn {
    margin-left: auto;
    font-weight: 600;
}

.client-task-assist-input {
    margin-top: 0;
}

.client-task-reopen-form {
    margin-top: 0;
}

.client-task-review {
    padding: 12px 0;
}

.client-review-intro {
    margin-bottom: 10px;
}

.client-review-title {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 4px;
}

.client-review-lede {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.client-review-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.client-review-choice {
    margin: 0;
    width: 100%;
}

.client-review-choice-btn,
.client-review-choice--reopen {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.client-review-choice-btn:hover,
.client-review-choice--reopen:hover {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.client-review-choice--approve .client-review-choice-btn {
    border-color: rgba(13, 110, 110, 0.28);
    background: var(--accent-light);
}

.client-review-choice--approve .client-review-choice-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.client-review-choice--approve .client-review-choice-btn:hover .client-review-choice-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.client-review-choice--approve .client-review-choice-btn:hover .client-review-choice-copy small {
    color: rgba(255, 255, 255, 0.8);
}

/* Approve confirmation dialog */
body.client-approve-dialog-open {
    overflow: hidden;
}

.client-approve-dialog {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.client-approve-dialog[hidden] {
    display: none !important;
}

.client-approve-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.client-approve-dialog-card {
    position: relative;
    width: min(420px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(26, 26, 26, 0.18);
    padding: 28px 24px 22px;
    text-align: center;
}

.client-approve-dialog-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 110, 110, 0.12);
    color: #0d6e6e;
    font-size: 22px;
}

.client-approve-dialog-title {
    font-family: var(--font-display, Georgia, serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--text);
}

.client-approve-dialog-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0 0 20px;
}

.client-approve-dialog-text strong {
    color: var(--text);
    font-weight: 600;
}

.client-approve-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.client-approve-dialog-actions .btn {
    min-width: 120px;
}

.client-review-choice--reopen.is-open {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--accent-light);
}

.client-review-choice-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 16px;
}

.client-review-choice--approve .client-review-choice-icon {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.client-review-choice-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.client-review-choice-copy strong {
    font-size: 14px;
    font-weight: 650;
}

.client-review-choice-copy small {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.35;
}

.client-review-choice-chevron {
    color: var(--text-faint);
    font-size: 14px;
    transition: transform 0.2s;
}

.client-review-choice--reopen.is-open .client-review-choice-chevron {
    transform: rotate(180deg);
}

.client-reopen-panel {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.client-reopen-panel[hidden] {
    display: none !important;
}

.client-reopen-step {
    margin-bottom: 14px;
}

.client-reopen-step-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.client-reopen-step-label label {
    margin: 0;
}

.client-reopen-step-label em {
    font-style: normal;
    font-weight: 500;
    color: var(--text-faint);
}

.client-reopen-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.client-reopen-ai-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: -2px 0 8px;
    padding: 0;
    border: none;
    background: none;
    color: var(--accent);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.client-reopen-ai-link:hover {
    text-decoration: underline;
}

.client-reopen-ai-link.is-open {
    margin-bottom: 10px;
}

.client-reopen-comment {
    margin-bottom: 0;
    resize: vertical;
    min-height: 72px;
}

.client-reopen-ai {
    margin: 0 0 14px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg);
    padding: 12px;
}

.client-reopen-ai[hidden] {
    display: none !important;
}

.client-reopen-ai-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.client-reopen-ai-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.client-task-review .reopen-ai-window {
    max-height: 180px;
    min-height: 90px;
    margin-bottom: 8px;
    overflow-y: auto;
}

.client-task-review .reopen-feedback-draft {
    margin-bottom: 8px;
    padding: 10px 12px;
}

.client-reopen-attach {
    margin-bottom: 0;
}

.client-reopen-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px !important;
    text-align: left;
}

.client-reopen-upload i {
    font-size: 16px !important;
    margin: 0 !important;
    flex-shrink: 0;
}

.client-reopen-upload span {
    font-size: 12.5px;
    color: var(--text-muted);
}

.client-reopen-submit {
    width: 100%;
    font-weight: 600;
    margin-top: 4px;
}

@media (max-width: 640px) {
    .client-review-choices {
        grid-template-columns: 1fr;
    }
}

/* Sidebar */
.client-task-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #fafbfc;
    min-height: 100%;
}

.client-task-side-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    box-shadow: none;
}

.client-task-side-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 8px;
}

.client-task-side-title i {
    color: var(--accent);
    font-size: 12px;
}

.client-task-side-copy {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0 0 10px;
}

.client-task-approve-btn {
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.client-task-status-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
}

.client-task-status-banner i {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.client-task-status-banner strong {
    display: block;
    font-size: 13px;
    margin-bottom: 1px;
}

.client-task-status-banner span {
    display: block;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--text-muted);
}

.client-task-status-banner--done i {
    color: #15803d;
}

.client-task-status-banner--wait i {
    color: #b45309;
}

.client-task-meta-list {
    margin: 0;
}

.client-task-meta-list > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 12px;
}

.client-task-meta-list > div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.client-task-meta-list dt {
    margin: 0;
    color: var(--text-muted);
    font-weight: 500;
}

.client-task-meta-list dd {
    margin: 0;
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

.client-task-meta-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.client-task-meta-link:hover {
    text-decoration: underline;
}

.client-task-back-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.client-task-back-card:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-light);
}

@media (max-width: 900px) {
    .client-task-layout {
        grid-template-columns: 1fr;
    }

    .client-task-primary {
        border-right: none;
    }

    .client-task-sidebar {
        position: static;
        order: -1;
        border-bottom: 1px solid var(--border-light);
        min-height: 0;
        padding: 14px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .client-task-action-card {
        order: -1;
    }

    .client-task-back-card {
        order: 2;
    }
}

@media (max-width: 640px) {
    .client-task-dashboard {
        border-radius: 12px;
    }

    .client-task-hero {
        padding: 12px 12px 10px;
    }

    .client-task-main {
        padding: 2px 12px 14px;
    }

    .client-task-section {
        padding: 10px 0;
    }

    .client-task-title {
        font-size: clamp(17px, 5vw, 20px);
    }

    .client-task-track-label {
        font-size: 9px;
    }

    .client-task-bubble {
        max-width: 100%;
    }

    .client-review-choices {
        grid-template-columns: 1fr;
    }
}

.client-project-hero {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 24px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.client-project-hero-compact {
    padding: 16px 20px;
    margin-bottom: 16px;
}

.client-project-hero-compact .client-project-hero-row {
    margin-bottom: 0;
    align-items: center;
}

.client-project-hero-compact .client-project-hero-title {
    font-size: 20px;
}

.client-project-hero-compact .client-project-hero-desc {
    font-size: 13px;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.client-live-btn-inline {
    font-size: 12px;
    padding: 2px 10px;
}

.client-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.client-hero-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    white-space: nowrap;
}

.client-hero-stat strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.client-hero-stat-alert {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.client-hero-stat-alert strong {
    color: #b45309;
}

.client-project-hero-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.client-project-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.client-project-hero-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.client-project-hero-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin: 10px 0 0;
    line-height: 1.6;
    max-width: 560px;
}

.client-project-hero-actions {
    flex-shrink: 0;
    padding-top: 4px;
}

.client-live-btn {
    background: var(--surface);
}

.client-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

.client-stat-box {
    text-align: center;
    padding: 12px 10px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.client-stat-num {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
}

.client-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-faint);
}

.client-stat-box-highlight {
    background: var(--accent-light);
    border-color: var(--border);
}

.client-stat-box-highlight .client-stat-num {
    color: var(--accent);
}

/* Workspace — tasks + header left, full-height chat right */
.client-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
    min-height: 560px;
    align-items: stretch;
}

.client-workspace-mobile-nav {
    display: none;
}

.client-workspace-primary {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
}

.client-workspace-main {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1 1 auto;
    background: var(--surface);
}

.client-workspace-side {
    border-left: 1px solid var(--border-light);
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.client-workspace-side > .client-panel-chat,
.client-workspace-side > .ai-chat-section {
    flex: 1 1 auto;
    min-height: 0;
    padding-top: 20px;
}

.client-workspace-side-alert {
    margin: 16px;
}

.client-tasks-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 16px 20px 0;
    flex-shrink: 0;
}

.client-tasks-tab {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 10px;
    padding: 10px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.client-tasks-tab:hover {
    color: var(--text);
    background: rgba(26, 26, 26, 0.04);
}

.client-tasks-tab.is-active {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 1px 2px rgba(26, 26, 26, 0.04);
}

.client-tasks-tab-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e8e6e1;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.client-tasks-tab.is-active .client-tasks-tab-count {
    background: rgba(13, 110, 110, 0.12);
    color: #0d6e6e;
}

.client-tasks-tab-count--alert {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.client-tasks-tab.is-active .client-tasks-tab-count--alert {
    background: rgba(245, 158, 11, 0.25);
    color: #92400e;
}

.client-tasks-pane {
    display: none;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.client-tasks-pane.is-active {
    display: flex;
}

.client-tasks-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 56px 24px;
    color: var(--text-faint);
}

.client-tasks-empty i {
    font-size: 28px;
    opacity: 0.7;
}

.client-tasks-empty p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    max-width: 280px;
}

/* Panels inside dashboard */
.client-project-dashboard .client-panel {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.client-panel-chat {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 16px 16px 14px;
    height: 100%;
}

.client-chat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-shrink: 0;
    padding-top: 2px;
}

.client-chat-top-copy {
    min-width: 0;
}

.client-chat-title {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1.25;
    overflow: visible;
}

.client-chat-title i {
    color: var(--accent);
    font-size: 15px;
}

.client-panel-chat .ai-chat-intro {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

.client-chat-reset {
    flex-shrink: 0;
    margin-top: 2px;
}

.client-panel-chat .ai-chat-window {
    flex: 1 1 auto;
    min-height: 140px;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-bottom: 10px;
    padding: 12px;
    background:
        radial-gradient(ellipse 70% 80% at 0% 0%, rgba(13, 110, 110, 0.05), transparent 55%),
        var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.client-panel-chat .ai-chat-window:has(.ai-msg-welcome:only-child) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-panel-chat .ai-msg-welcome {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.client-panel-chat .ai-msg-welcome .ai-msg-bubble {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.client-panel-chat .ai-msg-welcome .ai-msg-bubble strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.client-panel-chat .ai-msg-welcome .ai-msg-bubble span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}

.client-body .ai-task-draft {
    border-color: var(--border);
    background: var(--surface);
}

.client-chat-composer .ai-chat-pending {
    margin-top: 0;
    margin-bottom: 8px;
    max-width: 100%;
}

.client-chat-composer {
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--shadow);
}

.client-chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.client-chat-chip {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    padding: 4px 10px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.client-chat-chip:hover {
    border-color: rgba(13, 110, 110, 0.35);
    color: var(--accent);
    background: var(--accent-light);
}

.client-chat-generate {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 8px;
}

.client-chat-generate-btn {
    width: 100%;
    border: 1px solid rgba(13, 110, 110, 0.35);
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
    font-size: 12px;
    border-radius: 8px;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.client-chat-generate-btn:hover:not(:disabled) {
    background: rgba(13, 110, 110, 0.16);
    border-color: var(--accent);
    color: var(--accent);
}

.client-chat-generate-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.client-chat-generate-hint {
    font-size: 10.5px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.3;
}

.client-panel-chat .ai-chat-input {
    margin-top: 0;
    flex-shrink: 0;
}

.client-panel-chat .client-chat-foot {
    flex-shrink: 0;
    margin-top: 10px;
    padding-top: 0;
    border-top: none;
}

.client-workspace-side .ai-msg {
    gap: 8px;
    max-width: 100%;
}

.client-workspace-side .ai-msg-avatar {
    display: none;
}

.client-workspace-side .ai-msg-bubble {
    font-size: 11.5px;
    line-height: 1.4;
    padding: 8px 10px;
    width: 100%;
    min-width: 0;
}

.client-workspace-side .ai-msg-options {
    gap: 5px;
    margin-top: 6px;
    padding-top: 6px;
}

.client-workspace-side .ai-msg-options-list {
    gap: 3px;
    max-height: 152px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
    margin: 0 -2px;
    padding-left: 2px;
}

.client-workspace-side .ai-msg-option,
.client-workspace-side .ai-msg-option-check {
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.3;
    border-radius: 7px;
}

.client-workspace-side .ai-msg-options-single .ai-msg-option {
    padding-left: 28px;
}

.client-workspace-side .ai-msg-options-single .ai-msg-option::before {
    left: 9px;
    width: 11px;
    height: 11px;
}

.client-workspace-side .ai-msg-options-hint {
    font-size: 10px;
    margin: 0;
    line-height: 1.3;
}

.client-workspace-side .ai-msg-option-check {
    gap: 7px;
}

.client-workspace-side .ai-msg-option-check input {
    margin-top: 1px;
    width: 13px;
    height: 13px;
}

.client-workspace-side .ai-msg-submit-selected {
    width: 100%;
    margin-top: 2px;
    font-size: 11px;
    padding: 6px 10px;
}

.client-workspace-side .ai-msg-option-all {
    flex-shrink: 0;
}

.client-workspace-side .ai-msg-option-other {
    margin-top: 0;
}

/* Prevent horizontal overflow across client pages */
.client-main,
.client-project-shell,
.client-project-dashboard,
.client-workspace,
.client-task-page {
    max-width: 100%;
}

.client-main img,
.client-task-attachments img,
.client-task-bubble-body img {
    max-width: 100%;
    height: auto;
}

.client-workspace-main .alert {
    margin: 20px 22px;
}

@media (min-width: 901px) {
    .client-workspace {
        height: clamp(620px, calc(100vh - 88px), 900px);
        min-height: 620px;
        max-height: 900px;
    }

    .client-workspace-primary .client-dashboard-title {
        font-size: clamp(22px, 2.4vw, 30px);
    }

    .client-workspace-primary .client-dashboard-toolbar {
        margin-bottom: 14px;
    }

    .client-workspace-primary .client-dashboard-stats {
        grid-template-columns: repeat(3, minmax(72px, 96px));
        gap: 8px;
    }

    .client-workspace-primary .client-dashboard-stat {
        padding: 10px 12px;
    }

    .client-workspace-primary .client-dashboard-stat strong {
        font-size: 22px;
    }

    .client-workspace-side .client-panel-chat .ai-chat-window {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }
}

@media (min-width: 901px) and (max-width: 1180px) {
    .client-workspace-primary .client-dashboard-banner {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .client-workspace-primary .client-dashboard-stats {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Chat (standalone / legacy) */
.client-chat-hero {
    margin-bottom: 0;
}

.client-project-dashboard .ai-chat-section {
    margin-bottom: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.client-project-dashboard .client-panel-chat {
    padding: 20px 16px 14px;
}

.client-project-dashboard .ai-chat-intro {
    margin-top: 0;
}

.client-chat-hero .ai-chat-section {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 24px 20px;
    margin-bottom: 0;
    box-shadow: var(--shadow-md);
}

.client-chat-hero .section-head {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 14px;
    margin-bottom: 12px;
}

.client-chat-hero .section-head h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-chat-hero .section-head h2 i {
    color: var(--accent);
}

.client-chat-hero .ai-chat-intro {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 16px;
    line-height: 1.55;
}

.client-chat-hero .ai-chat-window {
    max-height: min(520px, calc(100vh - 340px));
    min-height: 280px;
    background: var(--bg);
    border-color: var(--border-light);
    border-radius: 12px;
}

.client-body .ai-msg-assistant .ai-msg-avatar {
    background: var(--accent-light);
    color: var(--accent);
}

.client-body .ai-msg-user .ai-msg-bubble {
    background: var(--accent);
    color: #fff;
}

.client-body .ai-msg-assistant .ai-msg-bubble {
    background: var(--surface-raised);
    border-color: var(--border-light);
}

.client-body .ai-chat-input textarea,
.client-body .ai-chat-input .form-control {
    background: var(--surface-raised);
    border-color: var(--border);
}

.client-body .ai-chat-input textarea:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.15);
}

.client-chat-foot {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.client-chat-foot a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
}

.client-chat-foot a:hover {
    color: var(--accent-hover);
}

/* Tasks panel */
.client-tasks-panel,
.client-body .updates-collapse {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.client-tasks-panel {
    margin-bottom: 16px;
}

.client-tasks-panel-open {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.client-tasks-panel-open .task-list-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 20px 20px;
    display: flex;
    flex-direction: column;
}

.client-tasks-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: transparent;
    border-bottom: none;
    flex-shrink: 0;
}

.client-tasks-panel-head .badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    background: #e5e7eb !important;
    color: var(--text-muted) !important;
}

.client-tasks-priority {
    margin: 0 14px 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    flex-shrink: 0;
}

.client-tasks-priority-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-decoration: none;
    color: #92400e;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.client-tasks-priority-link:hover {
    background: #fde68a;
    border-color: #f59e0b;
    color: #78350f;
}

.client-tasks-priority-action {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.client-tasks-review-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.client-review-card {
    display: block;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.client-review-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
    transform: translateY(-1px);
    color: inherit;
}

.client-review-card-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #b45309;
    margin-bottom: 4px;
}

.client-review-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.35;
    color: var(--text);
}

.client-review-card-cta {
    font-size: 12px;
    font-weight: 600;
    color: #b45309;
}

.client-tasks-other-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin: 4px 0 8px;
}

.client-tasks-finished {
    margin-top: 12px;
    padding-top: 4px;
}

.client-tasks-finished-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    list-style: none;
    cursor: pointer;
    user-select: none;
    margin: 0 0 8px;
    padding: 4px 0;
}

.client-tasks-finished-summary::-webkit-details-marker {
    display: none;
}

.client-tasks-finished-summary::after {
    content: '\F282';
    font-family: 'bootstrap-icons';
    font-size: 12px;
    color: var(--text-faint);
    transition: transform 0.2s;
}

.client-tasks-finished[open] .client-tasks-finished-summary::after {
    transform: rotate(180deg);
}

.client-tasks-finished-count {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 1px 7px;
    margin-left: auto;
    margin-right: 6px;
}

.client-tasks-finished-list {
    opacity: 0.85;
}

.client-tasks-panel-open .task-card-item-finished {
    background: var(--bg);
}

.client-tasks-panel-open .task-card-item-finished h3 {
    color: var(--text-muted);
}

.client-tasks-priority i {
    margin-right: 4px;
}

.client-tasks-panel-open .task-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.client-tasks-panel-open .task-card-link {
    position: relative;
}

.client-tasks-panel-open .task-card-item {
    position: relative;
    padding: 16px 40px 16px 16px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    box-shadow:
        0 1px 2px rgba(26, 26, 26, 0.04),
        0 6px 16px rgba(26, 26, 26, 0.05);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
}

.client-tasks-panel-open .task-card-link:hover .task-card-item {
    border-color: rgba(13, 110, 110, 0.35);
    border-left-color: var(--accent);
    background: #fff;
    box-shadow:
        0 2px 4px rgba(26, 26, 26, 0.05),
        0 10px 24px rgba(13, 110, 110, 0.1);
    transform: translateY(-1px);
}

.client-tasks-panel-open .task-card-item h3 {
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
    letter-spacing: -0.01em;
    margin: 0;
}

.client-tasks-panel-open .task-card-top {
    margin-bottom: 10px;
}

.client-tasks-panel-open .task-card-top time {
    font-size: 11.5px;
    color: var(--text-faint);
}

.client-tasks-panel-open .task-card-url {
    margin-top: 6px;
    font-size: 12px;
}

.client-tasks-panel-open .task-card-item::after {
    content: '\F285';
    font-family: 'bootstrap-icons';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-faint);
    opacity: 0.45;
    transition: opacity 0.15s, color 0.15s;
}

.client-tasks-panel-open .task-card-link:hover .task-card-item::after {
    opacity: 1;
    color: var(--accent);
}

.client-tasks-panel-open .task-card-item-finished {
    background: #fafbfc;
    border-left-color: #c5c2bb;
    box-shadow: none;
}

.client-tasks-panel-open .task-card-item-finished h3 {
    color: var(--text-muted);
    font-weight: 600;
}

.client-tasks-panel-open .task-card-item-review {
    border-color: #fcd34d;
    border-left-color: #f59e0b;
    background: #fffbeb;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.1);
}

.client-body .task-card-item {
    background: var(--surface);
    border-color: var(--border);
}

.client-body .task-card-link:hover .task-card-item {
    border-color: rgba(13, 110, 110, 0.35);
    box-shadow:
        0 2px 4px rgba(26, 26, 26, 0.05),
        0 10px 24px rgba(13, 110, 110, 0.1);
    background: #fff;
}

.client-body .task-card-action-hint {
    color: var(--accent);
}

.client-body .updates-collapse {
    margin-top: 16px;
    border-radius: 14px;
    padding: 0;
}

.client-tasks-panel summary,
.client-body .updates-collapse summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: var(--surface);
}

.client-tasks-panel summary::-webkit-details-marker,
.client-body .updates-collapse summary::-webkit-details-marker {
    display: none;
}

.client-tasks-panel summary::after,
.client-body .updates-collapse summary::after {
    content: '\F282';
    font-family: 'bootstrap-icons';
    font-size: 14px;
    color: var(--text-faint);
    transition: transform 0.2s;
}

.client-tasks-panel[open] summary::after,
.client-body .updates-collapse[open] summary::after {
    transform: rotate(180deg);
}

.client-tasks-panel .task-list-inner {
    padding: 0 20px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--surface-raised);
}

.client-tasks-panel .section-head {
    display: none;
}

.client-tasks-panel .task-cards {
    margin-top: 16px;
}

.client-body .project-code-pill {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-muted);
}

.client-body .task-form-section {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.client-body .form-control,
.client-body .form-select {
    background: var(--surface-raised);
    border-color: var(--border);
}

.client-body .form-control:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
}

@media (max-width: 900px) {
    .client-project-dashboard {
        border-radius: 14px;
    }

    .client-workspace {
        grid-template-columns: 1fr;
        min-height: 0;
        height: auto;
        max-height: none;
    }

    .client-workspace-primary {
        min-height: 0;
    }

    .client-workspace-mobile-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 12px 12px 0;
        border-bottom: 1px solid var(--border-light);
        background: var(--surface);
        position: sticky;
        top: 60px;
        z-index: 20;
        flex-shrink: 0;
    }

    .client-workspace-mobile-btn {
        appearance: none;
        border: 1px solid transparent;
        background: transparent;
        border-radius: 10px;
        padding: 10px 12px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-muted);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        cursor: pointer;
        transition: background 0.15s, color 0.15s, border-color 0.15s;
    }

    .client-workspace-mobile-btn:hover {
        color: var(--text);
        background: rgba(26, 26, 26, 0.04);
    }

    .client-workspace-mobile-btn.is-active {
        color: var(--text);
        background: var(--bg);
        border-color: var(--border);
    }

    .client-workspace-main,
    .client-workspace-side {
        display: none;
        min-height: 420px;
    }

    .client-workspace[data-workspace-view="tasks"] .client-workspace-main,
    .client-workspace[data-workspace-view="chat"] .client-workspace-side {
        display: flex;
    }

    .client-workspace-side {
        border-left: none;
        border-top: none;
        background: var(--surface);
        min-height: min(70vh, 640px);
    }

    .client-tasks-tabs {
        padding: 12px 12px 0;
    }

    .client-tasks-panel-open .task-list-inner {
        padding: 12px 12px 16px;
        max-height: none;
    }

    .client-panel-chat {
        padding: 14px 12px 16px;
        min-height: 420px;
    }

    .client-panel-chat .ai-chat-window {
        min-height: 200px;
        max-height: min(360px, 45vh);
        flex: 1 1 auto;
        overflow-y: auto;
    }

    .client-dashboard-toolbar {
        flex-wrap: wrap;
    }

    .client-dashboard-banner {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .client-dashboard-stats {
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }

    .client-hero-stats {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .client-main {
        padding: 16px 0 40px;
    }

    .client-main.client-main-home {
        padding: 0 0 40px;
    }

    .client-main .container,
    .client-main .container-xl {
        padding-left: 12px;
        padding-right: 12px;
    }

    .client-nav .container-xl {
        padding-left: 12px;
        padding-right: 12px;
        height: 54px;
    }

    .client-workspace-mobile-nav {
        top: 54px;
        padding: 10px 10px 0;
    }

    .client-project-dashboard {
        border-radius: 12px;
    }

    .client-dashboard-head {
        padding: 14px 14px 16px;
    }

    .client-dashboard-title {
        font-size: 22px;
    }

    .client-dashboard-desc {
        font-size: 13px;
    }

    .client-dashboard-stat {
        padding: 10px 8px;
    }

    .client-dashboard-stat strong {
        font-size: 20px;
    }

    .client-dashboard-stat span {
        font-size: 11px;
    }

    .client-dashboard-review-cue {
        width: 100%;
    }

    .client-dashboard-review-cue span {
        width: 100%;
        margin-left: 0;
    }

    .client-dashboard-actions {
        width: 100%;
    }

    .client-dashboard-action {
        flex: 1 1 auto;
        justify-content: center;
    }

    .client-workspace {
        min-height: min(72vh, 560px);
    }

    .client-workspace-main,
    .client-workspace-side {
        min-height: 380px;
    }

    .client-tasks-tab {
        font-size: 11px;
        padding: 8px 4px;
        gap: 4px;
    }

    .client-tasks-panel-open .task-card-item {
        padding: 12px 12px;
    }

    .client-tasks-panel-open .task-card-item h3 {
        font-size: 14px;
    }

    .client-panel-chat .ai-chat-window {
        min-height: 180px;
        max-height: min(300px, 40vh);
        overflow-y: auto;
    }

    .client-chat-title {
        font-size: 16px;
    }

    .client-chat-reset {
        padding: 4px 8px;
        font-size: 12px;
    }

    .ai-chat-input {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .ai-chat-input textarea {
        font-size: 16px; /* prevent iOS zoom */
        min-height: 44px;
    }

    .client-landing-card {
        padding: 32px 24px;
    }

    .client-task-page {
        padding-bottom: 24px;
    }

    .client-task-title {
        font-size: clamp(22px, 6vw, 28px);
        word-break: break-word;
    }

    .client-task-sub {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .client-task-page-link {
        word-break: break-all;
    }

    .client-task-track {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .client-review-choices {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Portal Landing Page
═══════════════════════════════════════════════════════════════ */

/* Hero */
.portal-hero {
    position: relative;
    overflow: hidden;
    padding: 100px 24px 90px;
    text-align: center;
    background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, var(--accent) 100%);
}

.portal-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.portal-hero-content {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.portal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 6px 16px;
    margin-bottom: 28px;
}

.portal-hero-title {
    font-size: clamp(36px, 6vw, 58px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin: 0 0 20px;
}

.portal-hero-sub {
    font-size: clamp(15px, 2vw, 18px);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.65;
    max-width: 580px;
    margin: 0 auto 36px;
}

.portal-hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.portal-btn-primary {
    background: #fff;
    color: #1f2937;
    border-color: #fff;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 12px;
}

.portal-btn-primary:hover {
    background: #f3f4f6;
    border-color: #f3f4f6;
    color: #111827;
}

.portal-btn-outline {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 12px;
}

.portal-btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* Section label */
.portal-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    margin-bottom: 24px;
    text-align: center;
}

/* Services */
.portal-services {
    padding: 72px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.portal-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.portal-service-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.portal-service-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.portal-service-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.portal-service-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
}

.portal-service-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Recently opened */
.portal-recent {
    padding: 0 24px 48px;
    max-width: 1280px;
    margin: 0 auto;
}

.portal-recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.portal-recent-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s, border-color 0.15s;
}

.portal-recent-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.portal-recent-icon {
    width: 38px;
    height: 38px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.portal-recent-body {
    flex: 1;
    min-width: 0;
}

.portal-recent-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-recent-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.portal-recent-exp {
    color: var(--text-faint);
}

.portal-recent-open {
    flex-shrink: 0;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 8px;
}

/* Access section */
.portal-access {
    padding: 72px 24px;
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.4) 100%);
    scroll-margin-top: 70px;
}

.portal-access-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 460px;
    gap: 64px;
    align-items: center;
}

.portal-access-copy h2 {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}

.portal-access-copy p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0 0 24px;
}

.portal-access-hints {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-access-hints li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.portal-access-hints li i {
    color: var(--accent);
    font-size: 15px;
    flex-shrink: 0;
}

.portal-access-hints code {
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 12px;
}

.portal-access-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 20px 60px rgba(31, 41, 55, 0.1);
}

.portal-access-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-access-card-title i {
    color: var(--accent);
}

/* CTA band */
.portal-cta-band {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
    padding: 64px 24px;
}

.portal-cta-band-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.portal-cta-band-inner h2 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.portal-cta-band-inner p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.6;
}

.portal-cta-band .btn-primary {
    background: #fff;
    border-color: #fff;
    color: #1f2937;
    font-weight: 600;
    border-radius: 12px;
    padding: 12px 28px;
    white-space: nowrap;
    flex-shrink: 0;
}

.portal-cta-band .btn-primary:hover {
    background: #f3f4f6;
    border-color: #f3f4f6;
    color: #111827;
}

/* Inquiry page */
.inquiry-shell {
    max-width: 780px;
    margin: 48px auto;
    padding: 0 16px;
}

.inquiry-shell:has(.inquiry-hub) {
    max-width: 1200px;
    margin: 24px auto 48px;
    padding: 0 20px;
}

.client-body--inquiry-hub .client-main--inquiry-hub {
    padding-top: 0;
}

.inquiry-hub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.inquiry-header {
    text-align: center;
    margin-bottom: 40px;
}

.inquiry-header-icon {
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(75, 85, 99, 0.25);
}

.inquiry-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.inquiry-header p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.inquiry-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 36px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.inquiry-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.inquiry-card-title i {
    color: var(--accent);
}

.inquiry-username-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.inquiry-username-row .form-control {
    flex: 1;
    min-width: 0;
}

.inquiry-username-suggest-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.inquiry-username-suggest {
    margin-top: 12px;
    padding: 14px 16px;
    background: var(--accent-light);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.inquiry-username-suggest-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.inquiry-username-suggest-head i {
    color: var(--accent);
}

.inquiry-username-suggest-loading {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.inquiry-username-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.inquiry-username-chip {
    border: 1px solid var(--border);
    background: var(--surface-raised);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.inquiry-username-chip:hover,
.inquiry-username-chip.is-selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.inquiry-username-suggest-hint {
    font-size: 11.5px;
    color: var(--text-faint);
}

.inquiry-code-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-top: 8px;
}

/* Inquiry discovery flow (wizard) */
.inquiry-flow-intro {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 20px;
}

.inquiry-flow-seed {
    resize: vertical;
    min-height: 110px;
}

.inquiry-flow-ai-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(75, 85, 99, 0.08);
    border-radius: 999px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.inquiry-flow-progress-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inquiry-flow-restart {
    font-size: 12px;
    text-decoration: none;
    padding: 0;
}

.inquiry-flow-progress-track {
    height: 6px;
    background: var(--border-light);
    border-radius: 999px;
    overflow: hidden;
}

.inquiry-flow-progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.inquiry-flow-step-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.inquiry-flow-step-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

.inquiry-flow-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inquiry-flow-choice-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.inquiry-flow-choice-btn:hover {
    border-color: var(--accent);
    background: rgba(75, 85, 99, 0.04);
}

.inquiry-flow-choice-btn.is-selected {
    border-color: var(--accent);
    background: rgba(75, 85, 99, 0.08);
    box-shadow: 0 0 0 1px var(--accent);
}

.inquiry-flow-multi {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inquiry-flow-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    margin: 0;
    font-size: 14px;
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}

.inquiry-flow-check:has(input:checked) {
    border-color: var(--accent);
    background: rgba(75, 85, 99, 0.06);
}

.inquiry-flow-check input {
    margin-top: 3px;
    flex-shrink: 0;
}

.inquiry-flow-explain {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--border);
}

.inquiry-flow-explain-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.inquiry-flow-explain-hint {
    font-weight: 400;
    color: var(--text-muted);
}

.inquiry-flow-explain-input,
.inquiry-flow-other-input {
    resize: vertical;
    min-height: 76px;
}

.inquiry-flow-required-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
}

.inquiry-flow-nav .btn {
    min-height: 44px;
}

.inquiry-flow-loading .spinner-border {
    width: 2rem;
    height: 2rem;
}

.inquiry-access-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    margin: -8px 0 20px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text);
}

.inquiry-access-banner > i {
    color: #6366f1;
    font-size: 18px;
    margin-top: 2px;
}

.inquiry-access-banner strong {
    display: block;
    margin-bottom: 4px;
}

.inquiry-access-banner-meta {
    color: var(--text-muted);
    line-height: 1.5;
}

.inquiry-access-banner-meta code {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

/* Inquiry chat */
.inquiry-chat-window {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inquiry-msg {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.inquiry-msg-assistant {
    align-self: flex-start;
}

.inquiry-msg-client {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.inquiry-msg-developer {
    align-self: flex-start;
}

.inquiry-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.inquiry-msg-assistant .inquiry-msg-avatar {
    background: var(--accent-light);
    color: var(--accent);
}

.inquiry-msg-client .inquiry-msg-avatar {
    background: var(--accent);
    color: #fff;
}

.inquiry-msg-developer .inquiry-msg-avatar {
    background: #d1fae5;
    color: #065f46;
}

.inquiry-msg-bubble {
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 13.5px;
    line-height: 1.55;
}

.inquiry-msg-assistant .inquiry-msg-bubble,
.inquiry-msg-developer .inquiry-msg-bubble {
    background: var(--surface-raised);
    border: 1px solid var(--border-light);
    color: var(--text);
}

.inquiry-msg-client .inquiry-msg-bubble {
    background: var(--accent);
    color: #fff;
}

.inquiry-thread-developer {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.inquiry-thread-developer-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #065f46;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.inquiry-thread-developer-body {
    font-size: 14px;
    color: #1f2937;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Inquiry hub (client thread view) */
.inquiry-hub-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.inquiry-hub-toolbar-center {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inquiry-code-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.inquiry-hub-progress-dots {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
}

.inquiry-hub-progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
}

.inquiry-hub-progress-dot--done {
    background: var(--accent);
}

.inquiry-hub-progress-dot--current {
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.inquiry-hub-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.inquiry-hub-overview-text {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.inquiry-hub-overview-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inquiry-hub-budget-chip {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.inquiry-hub-title-compact {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 20px;
}

.inquiry-hub-hero {
    margin-bottom: 28px;
}

.inquiry-hub-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.inquiry-hub-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 10px;
    margin-left: -10px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.inquiry-hub-back:hover {
    color: var(--text);
    background: rgba(75, 85, 99, 0.06);
}

.inquiry-hub-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inquiry-hub-title {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text);
    margin: 0 0 10px;
}

.inquiry-hub-lead {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 24px;
    max-width: 640px;
}

.inquiry-status-track {
    list-style: none;
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}

.inquiry-status-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    position: relative;
    text-align: center;
}

.inquiry-status-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    right: 0;
    width: 50%;
    height: 2px;
    background: var(--border-light);
    z-index: 0;
}

.inquiry-status-step:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 0;
    width: 50%;
    height: 2px;
    background: var(--border-light);
    z-index: 0;
}

.inquiry-status-step--done:not(:first-child)::before,
.inquiry-status-step--done:not(:last-child)::after,
.inquiry-status-step--current:not(:first-child)::before {
    background: var(--accent);
}

.inquiry-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--surface-raised);
    position: relative;
    z-index: 1;
}

.inquiry-status-step--done .inquiry-status-dot,
.inquiry-status-step--current .inquiry-status-dot {
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.inquiry-status-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-faint);
}

.inquiry-status-step--current .inquiry-status-label,
.inquiry-status-step--done .inquiry-status-label {
    color: var(--text);
}

.inquiry-hub-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    gap: 20px;
    align-items: start;
}

.inquiry-hub-aside-sticky {
    position: sticky;
    top: calc(64px + 16px);
}

.inquiry-hub-conversation {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.inquiry-hub-thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 420px;
    max-height: min(65vh, 640px);
    overflow-y: auto;
    padding: 4px 4px 16px;
    margin-bottom: 16px;
    scroll-behavior: smooth;
}

.inquiry-hub-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
}

.inquiry-hub-card:last-child {
    margin-bottom: 0;
}

.inquiry-hub-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.inquiry-hub-card-head h2 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.inquiry-hub-card-head h2 i {
    color: var(--accent);
}

.inquiry-hub-msg-count {
    font-size: 12px;
    color: var(--text-faint);
}

.inquiry-hub-ai {
    border-top: 1px solid var(--border-light);
    padding: 16px 0;
    margin-bottom: 4px;
}

.inquiry-hub-ai-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.inquiry-hub-ai-head i {
    color: var(--accent);
}

.inquiry-hub-ai-hint {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-faint);
}

.inquiry-hub-ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.inquiry-hub-ai-result {
    font-size: 13.5px;
    line-height: 1.6;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text);
}

.inquiry-hub-ai-result ul {
    margin: 0;
    padding-left: 1.2rem;
}

.inquiry-hub-ai-result li {
    margin-bottom: 4px;
}

.inquiry-hub-ai-result li:last-child {
    margin-bottom: 0;
}

.inquiry-hub-ai-chat {
    margin-top: 8px;
    font-size: 13px;
}

.inquiry-hub-ai-chat summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    padding: 6px 0;
}

.inquiry-hub-ai-chat-window {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    margin: 10px 0;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.inquiry-hub-ai-chat-bubble {
    max-width: 88%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.inquiry-hub-ai-chat-bubble--user {
    align-self: flex-end;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #f9fafb;
    border-bottom-right-radius: 4px;
}

.inquiry-hub-ai-chat-bubble--assistant {
    align-self: flex-start;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-light);
    border-bottom-left-radius: 4px;
}

.inquiry-hub-ai-chat-input {
    margin-top: 4px;
}

.inquiry-hub-ai-loading {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.inquiry-hub-ai-off {
    border-top: 1px solid var(--border-light);
    padding-top: 14px;
}

.inquiry-hub-meta-inline {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.inquiry-hub-meta-inline div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 12px;
}

.inquiry-hub-meta-inline dt {
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
}

.inquiry-hub-meta-inline dd {
    margin: 0;
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

.inquiry-brief-modal-body {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-muted);
}

.inquiry-brief-modal-body h6 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    margin: 0 0 8px;
}

.inquiry-brief-modal-section {
    margin-bottom: 20px;
}

.inquiry-brief-modal-section:last-child {
    margin-bottom: 0;
}

.inquiry-hub-thread-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.inquiry-hub-thread-empty i {
    font-size: 32px;
    opacity: 0.4;
    display: block;
    margin-bottom: 12px;
}

.inquiry-hub-message {
    max-width: 92%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.inquiry-hub-message--developer {
    align-self: flex-start;
}

.inquiry-hub-message--client {
    align-self: flex-end;
    align-items: flex-end;
}

.inquiry-hub-message-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-faint);
}

.inquiry-hub-message-author {
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.inquiry-hub-message-body {
    font-size: 14px;
    line-height: 1.65;
    padding: 14px 16px;
    border-radius: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.inquiry-hub-message--developer .inquiry-hub-message-body {
    background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    color: #14532d;
    border-bottom-left-radius: 6px;
}

.inquiry-hub-message--client .inquiry-hub-message-body {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #f9fafb;
    border-bottom-right-radius: 6px;
}

.inquiry-hub-reply {
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
}

.inquiry-hub-reply-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text);
}

.inquiry-hub-reply-input {
    resize: vertical;
    min-height: 100px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.inquiry-hub-reply-actions {
    display: flex;
    justify-content: flex-end;
}

.inquiry-hub-credentials-note {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.inquiry-hub-credential {
    margin-bottom: 14px;
}

.inquiry-hub-credential-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    margin-bottom: 6px;
}

.inquiry-hub-credential-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inquiry-hub-credential-value {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
}

.inquiry-hub-copy.is-copied {
    border-color: #22c55e;
    color: #16a34a;
}

.inquiry-hub-email-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.inquiry-hub-brief-summary {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 12px;
}

.inquiry-hub-brief-detail {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 14px;
}

.inquiry-hub-budget {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.inquiry-hub-budget-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
}

.inquiry-hub-budget-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.inquiry-hub-meta-list {
    margin: 0;
}

.inquiry-hub-meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.inquiry-hub-meta-list div:last-child {
    border-bottom: none;
}

.inquiry-hub-meta-list dt {
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
}

.inquiry-hub-meta-list dd {
    margin: 0;
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

@media (max-width: 900px) {
    .inquiry-hub-grid {
        grid-template-columns: 1fr;
    }

    .inquiry-hub-aside-sticky {
        position: static;
    }

    .inquiry-hub-overview {
        flex-direction: column;
        align-items: stretch;
    }

    .inquiry-hub-overview-text {
        flex-direction: column;
        align-items: flex-start;
    }

    .inquiry-hub-overview-title {
        white-space: normal;
    }

    .inquiry-hub-toolbar {
        gap: 10px;
    }

    .inquiry-hub-progress-dots {
        width: 100%;
        justify-content: center;
        order: 3;
    }

    .inquiry-status-label {
        font-size: 9px;
    }
}

@media (max-width: 640px) {
    .inquiry-status-track {
        flex-direction: column;
    }

    .inquiry-status-step::before,
    .inquiry-status-step::after {
        display: none !important;
    }

    .inquiry-hub-message {
        max-width: 100%;
    }
}

/* Admin inquiry list */
.inquiry-status-badge { font-size: 11px; }

@media (max-width: 900px) {
    .portal-access-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .portal-cta-band-inner {
        flex-direction: column;
        text-align: center;
    }

    .client-nav .container-xl {
        height: 56px;
    }
}

@media (max-width: 640px) {
    .portal-hero {
        padding: 72px 20px 64px;
    }

    .portal-hero-title {
        font-size: 32px;
    }

    .portal-access-card {
        padding: 28px 20px;
    }

    .inquiry-card {
        padding: 24px 20px;
    }

    .client-nav-links {
        display: none;
    }

    .client-footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Landing Page (client-home)
═══════════════════════════════════════════════════════════════ */

.landing-container {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.client-main-home {
    padding: 0;
}

.landing-flash-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 24px 0;
}

/* ── Nav (homepage) ───────────────────────────────────────────── */
.client-body-home .client-nav {
    background: rgba(247, 246, 243, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.client-body-home .client-nav--scrolled {
    background: rgba(247, 246, 243, 0.95);
    border-bottom-color: var(--border);
    box-shadow: 0 4px 24px rgba(26, 26, 26, 0.04);
}

.client-nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    transition: height 0.25s;
}

.client-nav--scrolled .client-nav-inner {
    height: 60px;
}

.client-body-home .client-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.client-brand-mark {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--landing-serif, Georgia, serif);
    font-weight: 700;
    font-size: 15px;
}

.client-brand-text {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.client-nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
}

.client-body-home .client-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-body-home .client-nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.client-body-home .client-nav-link:hover {
    color: var(--text);
    background: var(--accent-light);
}

.client-body-home .client-nav-link-cta {
    background: var(--accent);
    color: #fff;
    padding: 8px 18px;
}

.client-body-home .client-nav-link-cta:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.landing-hero {
    position: relative;
    overflow: hidden;
    padding: 48px 0 64px;
}

.landing-hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(13, 110, 110, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    animation: landingGridDrift 40s linear infinite;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 85%);
    pointer-events: none;
}

@keyframes landingGridDrift {
    0%   { background-position: 0 0; }
    100% { background-position: 28px 28px; }
}

.landing-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px 64px;
    align-items: center;
    position: relative;
}

.landing-eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 16px;
}

.landing-hero-title {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text);
    margin: 0 0 20px;
}

.landing-hero-lead {
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0 0 32px;
    max-width: 480px;
}

.landing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.landing-btn-primary {
    border-radius: 10px;
    font-weight: 600;
    padding: 12px 24px;
}

.landing-btn-ghost {
    border-radius: 10px;
    font-weight: 600;
    padding: 12px 24px;
}

/* Hero entrance animations */
.landing-animate {
    opacity: 0;
    transform: translateY(20px);
    animation: landingFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.landing-animate-1 { animation-delay: 0.05s; }
.landing-animate-2 { animation-delay: 0.12s; }
.landing-animate-3 { animation-delay: 0.2s; }
.landing-animate-4 { animation-delay: 0.28s; }
.landing-animate-5 { animation-delay: 0.35s; }

@keyframes landingFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Portal mockup */
.landing-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.landing-mockup {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
    transition: transform 0.4s ease;
}

.landing-hero-visual:hover .landing-mockup {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.landing-mockup-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: #f0eeea;
    border-bottom: 1px solid var(--border);
}

.landing-mockup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d4d0c8;
}

.landing-mockup-dot:first-child { background: #e8a598; }
.landing-mockup-dot:nth-child(2) { background: #e8d498; }
.landing-mockup-dot:nth-child(3) { background: #98d4a8; }

.landing-mockup-url {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-faint);
    font-family: ui-monospace, monospace;
}

.landing-mockup-body {
    padding: 20px;
}

.landing-mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.landing-mockup-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin-bottom: 4px;
}

.landing-mockup-title {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}

.landing-mockup-code {
    font-size: 11px;
    font-family: ui-monospace, monospace;
    background: var(--accent-light);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 6px;
}

.landing-mockup-tasks {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.landing-mockup-tasks li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.landing-pill {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.landing-pill-review {
    background: rgba(13, 110, 110, 0.12);
    color: var(--accent);
    animation: landingPulse 2.5s ease-in-out infinite;
}

.landing-pill-progress {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.landing-pill-done {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

@keyframes landingPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.65; }
}

.landing-mockup-task-name {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.landing-mockup-footer {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--text-faint);
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.landing-mockup-footer i {
    margin-right: 4px;
    color: var(--accent);
}

/* ── Trust strip ──────────────────────────────────────────────── */
.landing-trust {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.landing-trust-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 28px 24px;
}

.landing-trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.landing-trust-item i {
    font-size: 18px;
    color: var(--accent);
}

/* ── Section headings ─────────────────────────────────────────── */
.landing-section-head {
    margin-bottom: 40px;
    max-width: 560px;
}

.landing-section-title {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 12px;
}

.landing-section-sub {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* ── Scroll reveal ────────────────────────────────────────────── */
.landing-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.landing-steps.landing-reveal.is-visible .landing-step {
    animation: landingFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.landing-steps.landing-reveal.is-visible .landing-step:nth-child(1) { animation-delay: 0.05s; }
.landing-steps.landing-reveal.is-visible .landing-step:nth-child(2) { animation-delay: 0.15s; }
.landing-steps.landing-reveal.is-visible .landing-step:nth-child(3) { animation-delay: 0.25s; }

/* ── How it works ─────────────────────────────────────────────── */
.landing-process {
    padding: 80px 0;
}

.landing-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    position: relative;
}

.landing-steps::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 16%;
    right: 16%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    pointer-events: none;
}

.landing-step {
    position: relative;
    padding-top: 8px;
}

.landing-step-num {
    display: block;
    font-family: var(--landing-serif, Georgia, serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
}

.landing-step h3 {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--text);
}

.landing-step p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

/* ── Bento services ───────────────────────────────────────────── */
.landing-services {
    padding: 0 0 80px;
}

.landing-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.landing-bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}

.landing-bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(13, 110, 110, 0.25);
}

.landing-bento-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 18px;
}

.landing-bento-card h3 {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--text);
}

.landing-bento-card p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

.landing-bento-large {
    min-height: 220px;
}

/* ── Recent projects ──────────────────────────────────────────── */
#recent-portal[hidden],
#recent-portal.is-empty,
.landing-recent.is-empty {
    display: none !important;
}

.landing-recent {
    padding: 8px 0 56px;
}

.landing-recent-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 40px 40px;
    box-shadow: 0 16px 48px rgba(26, 26, 26, 0.06);
    position: relative;
    overflow: hidden;
}

.landing-recent-panel::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, rgba(13, 110, 110, 0.25) 100%);
}

.landing-recent-head {
    margin-bottom: 28px;
}

.landing-recent-head .landing-eyebrow {
    margin-bottom: 8px;
}

.landing-recent-head .landing-section-title {
    margin-bottom: 8px;
}

.landing-recent-head .landing-section-sub {
    margin-bottom: 0;
    max-width: 520px;
}

.landing-recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.landing-recent-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 22px;
    min-height: 112px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.landing-recent-card:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 28px rgba(13, 110, 110, 0.1);
    transform: translateY(-2px);
}

.landing-recent-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
}

.landing-recent-body {
    flex: 1;
    min-width: 0;
}

.landing-recent-title {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.landing-recent-type {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 6px;
}

.landing-recent-status {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 3px 8px;
}

.landing-recent-card--inquiry .landing-recent-icon {
    background: rgba(13, 110, 110, 0.08);
    color: var(--accent);
}

.landing-recent-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 13px;
    color: var(--text-faint);
    margin-top: 8px;
}

.landing-recent-meta .code-display {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.landing-recent-exp {
    color: var(--text-faint);
}

.landing-recent-open {
    flex-shrink: 0;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
}

@media (max-width: 720px) {
    .landing-recent-panel {
        padding: 24px 18px 28px;
        border-radius: 16px;
    }

    .landing-recent-grid {
        grid-template-columns: 1fr;
    }

    .landing-recent-card {
        padding: 16px;
        min-height: 0;
        gap: 14px;
    }

    .landing-recent-icon {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .landing-recent-title {
        font-size: 17px;
    }
}

/* ── Access section ───────────────────────────────────────────── */
.landing-access {
    padding: 80px 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.landing-access-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.landing-access-copy p {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0 0 24px;
}

.landing-access-hints {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.landing-access-hints li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.landing-access-hints i {
    color: var(--accent);
    font-size: 16px;
}

.landing-access-hints code {
    font-size: 12px;
    background: var(--accent-light);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
}

.landing-access-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: var(--shadow-md);
}

.landing-access-card-title {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 24px;
    color: var(--text);
}

/* ── CTA ──────────────────────────────────────────────────────── */
.landing-cta {
    padding: 48px 0 72px;
}

.landing-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.landing-cta-text {
    font-family: var(--landing-serif, Georgia, serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

/* ── Footer (homepage) ──────────────────────────────────────── */
.client-footer-home {
    border-top: 1px solid var(--border);
    background: var(--bg);
    padding: 28px 0;
}

.client-footer-home .client-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.client-footer-brand {
    font-size: 13px;
    color: var(--text-faint);
}

.client-footer-home .client-footer-links a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 20px;
}

.client-footer-home .client-footer-links a:hover {
    color: var(--accent);
}

/* ── Page enter animations (client pages) ─────────────────────── */
@keyframes clientPageEnter {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* Whole-page content fade-up on load (every client page except the
   animated home hero, which has its own entrance system). */
.client-main:not(.client-main-home) > .container-xl,
.client-main--inquiry-hub > .inquiry-hub-container {
    animation: clientPageEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Inquiry / questionnaire — layered stagger on top of the page enter */
.inquiry-header {
    animation: clientFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.08s;
}

.inquiry-shell > .inquiry-card {
    animation: clientFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.16s;
}

/* Wizard phase changes re-run this each time the element leaves d-none */
.inquiry-flow-phase:not(.d-none) {
    animation: clientFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Each freshly rendered question fades in */
.inquiry-flow-step {
    animation: clientFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Stagger the choice / checkbox options as the question appears */
.inquiry-flow-step .inquiry-flow-choice-btn,
.inquiry-flow-step .inquiry-flow-check {
    animation: clientFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.inquiry-flow-step .inquiry-flow-choice-btn:nth-child(1),
.inquiry-flow-step .inquiry-flow-check:nth-child(1) { animation-delay: 0.06s; }
.inquiry-flow-step .inquiry-flow-choice-btn:nth-child(2),
.inquiry-flow-step .inquiry-flow-check:nth-child(2) { animation-delay: 0.12s; }
.inquiry-flow-step .inquiry-flow-choice-btn:nth-child(3),
.inquiry-flow-step .inquiry-flow-check:nth-child(3) { animation-delay: 0.18s; }
.inquiry-flow-step .inquiry-flow-choice-btn:nth-child(4),
.inquiry-flow-step .inquiry-flow-check:nth-child(4) { animation-delay: 0.24s; }
.inquiry-flow-step .inquiry-flow-choice-btn:nth-child(5),
.inquiry-flow-step .inquiry-flow-check:nth-child(5) { animation-delay: 0.30s; }
.inquiry-flow-step .inquiry-flow-choice-btn:nth-child(n+6),
.inquiry-flow-step .inquiry-flow-check:nth-child(n+6) { animation-delay: 0.34s; }

/* Client nav slides down on load */
.client-nav {
    animation: clientNavDrop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes clientNavDrop {
    from { opacity: 0; transform: translateY(-100%); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   Enhanced landing animations
   ═══════════════════════════════════════════════════════════════ */

/* Directional & scale scroll reveals */
.landing-reveal-left,
.landing-reveal-right,
.landing-reveal-scale {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.landing-reveal-left  { transform: translateX(-40px); }
.landing-reveal-right { transform: translateX(40px); }
.landing-reveal-scale { transform: scale(0.94) translateY(20px); }

.landing-reveal-left.is-visible,
.landing-reveal-right.is-visible,
.landing-reveal-scale.is-visible {
    opacity: 1;
    transform: none;
}

/* Stagger the trust strip items as they reveal */
.landing-trust-item.landing-reveal:nth-child(2) { transition-delay: 0.1s; }
.landing-trust-item.landing-reveal:nth-child(3) { transition-delay: 0.2s; }

.landing-trust-item i {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.landing-trust-item:hover i {
    transform: scale(1.25) translateY(-2px);
}

/* Stagger service cards as the bento grid reveals */
.landing-bento.landing-reveal.is-visible .landing-bento-card {
    animation: landingFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.landing-bento.landing-reveal.is-visible .landing-bento-card:nth-child(1) { animation-delay: 0.05s; }
.landing-bento.landing-reveal.is-visible .landing-bento-card:nth-child(2) { animation-delay: 0.13s; }
.landing-bento.landing-reveal.is-visible .landing-bento-card:nth-child(3) { animation-delay: 0.21s; }
.landing-bento.landing-reveal.is-visible .landing-bento-card:nth-child(4) { animation-delay: 0.29s; }

/* Service card icon reacts to hover */
.landing-bento-icon {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.3s ease, color 0.3s ease;
}

.landing-bento-card:hover .landing-bento-icon {
    transform: scale(1.12) rotate(-6deg);
    background: var(--accent);
    color: #fff;
}

/* "How it works" step hover */
.landing-step {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-step:hover {
    transform: translateY(-5px);
}

.landing-step-num {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.landing-step:hover .landing-step-num {
    transform: scale(1.18);
}

/* Button micro-interactions */
.landing-btn-primary,
.landing-btn-ghost,
.client-body-home .client-nav-link-cta {
    transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease;
}

.landing-btn-primary:hover,
.client-body-home .client-nav-link-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(13, 110, 110, 0.28);
}

.landing-btn-ghost:hover {
    transform: translateY(-2px);
}

.landing-btn-primary:active,
.landing-btn-ghost:active {
    transform: translateY(0);
}

/* Access card lift */
.landing-access-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.landing-access-card:focus-within,
.landing-access-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(26, 26, 26, 0.1);
}

/* CTA panel lift */
.landing-cta-inner {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.landing-cta-inner:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Interactive tilt on the hero mockup (JS-driven) */
.landing-mockup.is-tilting {
    transition: transform 0.12s ease-out;
    box-shadow: var(--shadow-lg, 0 30px 60px rgba(26, 26, 26, 0.18));
}

/* Hero mockup task rows animate in after the hero settles */
.landing-mockup-tasks li {
    animation: landingTaskIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.landing-mockup-tasks li:nth-child(1) { animation-delay: 0.55s; }
.landing-mockup-tasks li:nth-child(2) { animation-delay: 0.68s; }
.landing-mockup-tasks li:nth-child(3) { animation-delay: 0.81s; }

.landing-mockup-tasks li:hover {
    transform: translateX(4px);
    border-color: rgba(13, 110, 110, 0.25);
    background: var(--surface);
}

@keyframes landingTaskIn {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .landing-animate,
    .landing-reveal,
    .landing-reveal-left,
    .landing-reveal-right,
    .landing-reveal-scale,
    .landing-mockup,
    .landing-mockup-tasks li,
    .landing-bento.landing-reveal.is-visible .landing-bento-card,
    .landing-pill-review,
    .client-main:not(.client-main-home) > .container-xl,
    .client-main--inquiry-hub > .inquiry-hub-container,
    .client-nav,
    .inquiry-header,
    .inquiry-shell > .inquiry-card,
    .inquiry-flow-phase:not(.d-none),
    .inquiry-flow-step,
    .inquiry-flow-step .inquiry-flow-choice-btn,
    .inquiry-flow-step .inquiry-flow-check {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .landing-hero-grid-bg {
        animation: none;
    }

    .landing-bento-card:hover,
    .landing-step:hover,
    .landing-step:hover .landing-step-num,
    .landing-bento-card:hover .landing-bento-icon,
    .landing-btn-primary:hover,
    .landing-btn-ghost:hover,
    .landing-access-card:hover,
    .landing-cta-inner:hover,
    .landing-mockup-tasks li:hover,
    .landing-trust-item:hover i {
        transform: none;
    }
}

/* ── Landing responsive ─────────────────────────────────────── */
@media (max-width: 960px) {
    .landing-hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .landing-hero-visual {
        order: -1;
    }

    .landing-mockup {
        max-width: 360px;
        transform: none;
    }

    .landing-hero-visual:hover .landing-mockup {
        transform: none;
    }

    .landing-steps {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .landing-steps::before {
        display: none;
    }

    .landing-access-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .landing-trust-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .landing-cta-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .client-nav-inner {
        position: relative;
    }

    .client-nav-toggle {
        display: flex;
    }

    .client-body-home .client-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 12px 16px 16px;
        box-shadow: var(--shadow-md);
        z-index: 50;
    }

    .client-body-home .client-nav-links.is-open {
        display: flex;
    }

    .client-body-home .client-nav-link {
        width: 100%;
        text-align: center;
    }

    .landing-bento {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        padding: 32px 0 48px;
    }

    .landing-process,
    .landing-access {
        padding: 56px 0;
    }

    .landing-access-card {
        padding: 24px 20px;
    }
}
