/* Customer facing pages only. Keep these styles away from the staff workspace. */
.customer-shell {
    min-height: 100vh;
    padding: clamp(14px, 4vw, 52px);
    color: #172842;
    background:
        radial-gradient(ellipse at 8% 4%, rgba(219, 231, 255, .9), transparent 32rem),
        radial-gradient(ellipse at 95% 18%, rgba(231, 240, 255, .72), transparent 28rem),
        #f5f7fb;
}

.customer-wrap {
    width: min(100%, 1080px);
    max-width: 1080px;
    margin: 0 auto;
}

.customer-topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    padding: 12px 17px;
    border: 1px solid rgba(221, 229, 241, .9);
    border-radius: 19px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 12px 38px rgba(34, 58, 97, .06);
    backdrop-filter: blur(12px);
}

.customer-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 0;
    color: #182b49;
    text-decoration: none;
}

.customer-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, #175dff, #8194ff);
    box-shadow: 0 7px 15px rgba(22, 93, 255, .2);
    font-family: Manrope, 'DM Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
}

.customer-brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.customer-brand-copy strong {
    overflow: hidden;
    max-width: 260px;
    color: #1c2c46;
    font-family: Manrope, 'DM Sans', sans-serif;
    font-size: .94rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-brand-copy small {
    color: #8290a6;
    font-size: .72rem;
    font-weight: 600;
}

.customer-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-width: 0;
}

.customer-nav a,
.customer-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 11px;
    color: #5f6f88;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.customer-nav a:hover,
.customer-nav-link:hover {
    color: #1554e8;
    background: #f0f4ff;
}

.customer-nav-link {
    border: 1px solid #e7ecf4;
    background: #fff;
}

.nav-count {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    place-items: center;
    border-radius: 20px;
    color: #fff;
    background: #245dff;
    font-size: .68rem;
}

.customer-shell .demo-brand { display: none; }
.customer-shell .demo-wrap > .brand { display: none; }
.customer-shell .demo-wrap > .panel { margin-top: 0 !important; }
.customer-shell .demo-wrap > .button:first-child { margin-bottom: 15px; }

.customer-shell .demo-hero {
    position: relative;
    max-width: none;
    overflow: hidden;
    padding: clamp(28px, 6vw, 64px);
    border: 1px solid #e2e9f4;
    border-radius: 28px;
    background: linear-gradient(130deg, rgba(255,255,255,.98), rgba(249,251,255,.95));
    box-shadow: 0 24px 65px rgba(34, 58, 97, .075);
}

.customer-shell .demo-hero::after {
    position: absolute;
    top: -120px;
    right: -90px;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(43, 100, 255, .08);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(43, 100, 255, .025), 0 0 0 68px rgba(43, 100, 255, .018);
    content: '';
    pointer-events: none;
}

.customer-shell .demo-hero > * { position: relative; z-index: 1; }
.customer-shell .eyebrow { color: #5472ad; font-size: .76rem; font-weight: 800; letter-spacing: .105em; text-transform: uppercase; }
.customer-shell .demo-hero .eyebrow { margin-bottom: 15px; }
.customer-shell .demo-hero h1 { max-width: 760px; color: #172842; font-size: clamp(2.35rem, 6vw, 4.45rem); letter-spacing: -.055em; }
.customer-shell .demo-hero > p { max-width: 680px; color: #63738d; font-size: clamp(1rem, 2vw, 1.12rem); line-height: 1.75; }
.customer-shell .demo-hero > p strong { color: #253a5e; }

.customer-shell .panel {
    padding: clamp(21px, 4vw, 38px);
    border: 1px solid #e2e9f4;
    border-radius: 24px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 20px 55px rgba(34, 58, 97, .065);
}

.customer-shell .panel h1 { margin-top: 0; color: #172842; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.045em; }
.customer-shell .panel > p { color: #66758d; line-height: 1.65; }
.customer-shell .panel > .eyebrow { margin: 0 0 8px; color: #5472ad; }
.customer-shell .panel > .eyebrow + h1 { margin-bottom: 12px; }

.customer-shell .button {
    min-height: 43px;
    padding: 10px 15px;
    border: 1px solid #e1e7f0;
    border-radius: 12px;
    background: #fff;
    color: #263957;
    font-weight: 750;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.customer-shell .button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(33, 61, 110, .09); }
.customer-shell .button-primary { border-color: #245dff; background: linear-gradient(135deg, #1c5cff, #3976ff); color: #fff; box-shadow: 0 9px 20px rgba(36, 93, 255, .2); }
.customer-shell .button-primary:hover { background: #174fe2; }
.customer-shell .button.small { min-height: 34px; padding: 7px 11px; border-radius: 10px; font-size: .78rem; }

.customer-shell .quick-list { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.customer-shell .quick-list .button { min-height: 48px; padding: 12px 18px; }
.customer-shell .support-hero { max-width: none; }
.customer-shell .support-hero > p:not(.eyebrow):not(.small) { max-width: 690px; }
.customer-shell .support-hero .support-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 15px; }
.customer-shell .support-hero .support-guest-note { margin: 0 0 18px; font-size: .88rem; }
.customer-shell .company-logo { display: block; width: auto; max-width: min(180px, 45vw); height: auto; max-height: 78px; margin: 0 0 18px; object-fit: contain; }

.customer-page-heading,
.ticket-detail-heading,
.section-heading,
.customer-account-strip,
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.customer-page-heading { margin-bottom: 24px; align-items: flex-start; }
.customer-page-heading h1 { margin: 0 0 8px; }
.customer-page-heading p { margin: 0; color: #738199; line-height: 1.6; }
.customer-page-heading .eyebrow { margin-bottom: 7px; }
.customer-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.customer-account-strip { justify-content: flex-start; margin: 0 0 24px; padding: 14px 16px; border: 1px solid #edf1f7; border-radius: 16px; background: #f9fbff; }
.customer-account-strip .account-identity { display: grid; gap: 3px; flex: 1; min-width: 0; }
.customer-account-strip .account-identity strong { color: #253956; font-size: .88rem; }
.customer-account-strip .account-identity span { color: #7b899e; font-size: .79rem; overflow-wrap: anywhere; }
.customer-avatar { width: 39px; height: 39px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #2458d6; background: #e7efff; font-weight: 800; }

.customer-details { margin: 14px 0 27px; border: 1px solid #e7ecf4; border-radius: 15px; background: #fff; }
.customer-details summary { padding: 15px 17px; color: #394d6d; cursor: pointer; font-size: .88rem; font-weight: 750; }
.customer-details[open] summary { border-bottom: 1px solid #edf1f6; }
.customer-details .stack-form { padding: 18px; }
.customer-details > p { margin: 0; padding: 0 18px 17px; }
.ticket-section { margin-top: 25px; }
.section-heading { align-items: flex-end; margin: 0 0 12px; }
.section-heading h2 { margin: 0; color: #213552; font-size: 1.15rem; }
.section-heading p { margin: 4px 0 0; color: #8591a4; font-size: .82rem; }
.ticket-list { display: grid; gap: 10px; }
.customer-ticket-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 18px 19px; border: 1px solid #e8edf5; border-radius: 16px; background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.customer-ticket-link:hover { transform: translateY(-1px); border-color: #cddaff; box-shadow: 0 10px 24px rgba(34, 58, 97, .07); }
.ticket-main { display: grid; gap: 7px; min-width: 0; }
.ticket-main strong { color: #263a59; font-size: .95rem; line-height: 1.4; overflow-wrap: anywhere; }
.ticket-number { color: #6079aa; font-size: .73rem; font-weight: 800; letter-spacing: .055em; }
.ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #8490a3; font-size: .77rem; }
.ticket-state { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 30px; color: #4d6386; background: #f0f3f8; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.ticket-state-open,.ticket-state-in_progress { color: #1559bc; background: #eaf2ff; }
.ticket-state-pending { color: #81560a; background: #fff5dc; }
.ticket-state-resolved,.ticket-state-closed { color: #087350; background: #e7f7ef; }
.ticket-priority { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 20px; color: #536b96; background: #edf3ff; font-size: .71rem; font-weight: 800; white-space: nowrap; }
.ticket-priority-low { color: #167345; background: #e8f7ee; }
.ticket-priority-normal { color: #2859b8; background: #eaf1ff; }
.ticket-priority-high { color: #b42318; background: #fff0ee; }
.ticket-priority-urgent { color: #9d1732; background: #ffe8ed; }
.ticket-open-hint { color: #245dff; font-size: .81rem; font-weight: 750; white-space: nowrap; }
.customer-empty { display: grid; justify-items: center; gap: 8px; padding: 34px 20px; border: 1px dashed #d7e0ef; border-radius: 17px; background: #fafcff; text-align: center; }
.customer-empty strong { color: #304564; }
.customer-empty p { max-width: 430px; margin: 0; color: #77859b; font-size: .87rem; line-height: 1.6; }

.notification-list { display: grid; gap: 10px; }
.notification-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 17px 18px; border: 1px solid #e8edf5; border-radius: 16px; background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.notification-row:hover { transform: translateY(-1px); border-color: #cddaff; box-shadow: 0 10px 24px rgba(34, 58, 97, .07); }
.notification-row.is-unread { border-color: #cfdcff; background: linear-gradient(110deg, #f6f8ff, #fff 52%); }
.notification-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #d0d8e6; }
.notification-row.is-unread .notification-dot { background: #245dff; box-shadow: 0 0 0 4px #e7edff; }
.notification-copy { display: grid; gap: 7px; min-width: 0; }
.notification-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #263a59; font-size: .92rem; }
.notification-copy p { margin: 0; color: #5f6f88; font-size: .87rem; line-height: 1.55; overflow-wrap: anywhere; }
.notification-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; color: #8793a6; font-size: .74rem; }
.notification-new { padding: 4px 8px; border-radius: 20px; color: #245dff; background: #eaf0ff; font-size: .68rem; font-weight: 800; }
.notification-open { align-self: center; color: #245dff; font-size: .79rem; font-weight: 750; white-space: nowrap; }
.customer-panel-heading { margin-bottom: 22px; }
.customer-panel-heading h1 { margin-bottom: 0 !important; }
.customer-panel-heading form { flex: 0 0 auto; }

.ticket-detail-heading { align-items: flex-start; margin-bottom: 24px; }
.ticket-detail-heading h1 { margin: 6px 0 12px; overflow-wrap: anywhere; }
.ticket-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: #8290a6; font-size: .8rem; }
.ticket-ref { color: #647da9; font-size: .74rem; font-weight: 800; letter-spacing: .07em; }
.conversation-card { margin-top: 18px; padding: clamp(17px, 3vw, 25px); border: 1px solid #e6ecf5; border-radius: 19px; background: #fbfcff; }
.conversation-card .section-heading { align-items: center; margin-bottom: 15px; }
.conversation-card .section-heading h2 { font-size: 1rem; }
.message-thread { max-height: none; overflow: visible; padding: 0; }
.customer-shell .message { width: fit-content; max-width: min(88%, 720px); padding: 15px 17px; border: 1px solid #e6ebf3; border-radius: 17px 17px 17px 5px; background: #fff; box-shadow: 0 4px 12px rgba(32, 52, 84, .035); }
.customer-shell .message.customer-message { justify-self: end; border-color: #dce6ff; border-radius: 17px 17px 5px 17px; background: #edf3ff; }
.customer-shell .message-meta { align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 9px; color: #6a7d9e; font-size: .75rem; }
.customer-shell .message-meta .support-sender { color: #254a91; font-weight: 800; }
.customer-shell .message-meta time { color: #8996aa; font-size: .68rem; font-weight: 600; }
.customer-shell .message-body { color: #2d3d58; font-size: .91rem; line-height: 1.65; }
.customer-shell .message a { color: #1d59e8; font-weight: 700; }
.reply-composer { margin-top: 18px; padding: clamp(17px, 3vw, 25px); border: 1px solid #e1e8f3; border-radius: 19px; background: #fff; }
.reply-composer h2 { margin: 0 0 5px; color: #223652; font-size: 1.05rem; }
.reply-composer > p { margin: 0 0 17px; color: #7c899d; font-size: .82rem; }
.reply-composer .stack-form { gap: 13px; }
.reply-composer textarea { min-height: 125px; }
.customer-note { padding: 12px 14px; border-radius: 12px; color: #62748f; background: #f3f6fb; font-size: .79rem; line-height: 1.55; }
.customer-ticket-detail > .customer-note { margin-top: 16px; }

.customer-form-page { max-width: 800px; margin: 0 auto; }
.customer-form-intro { margin-bottom: 23px; }
.customer-form-intro h1 { margin: 0 0 8px; }
.customer-form-intro p { margin: 0; color: #738199; line-height: 1.65; }
.customer-form-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin: 0 0 23px; padding: 20px; border: 1px solid #e9edf4; border-radius: 17px; }
.customer-form-section legend { padding: 0 7px; color: #334b70; font-size: .87rem; font-weight: 800; }
.customer-form-section .full { grid-column: 1 / -1; }
.customer-form-section textarea { min-height: 145px; }
.customer-form-submit { width: 100%; min-height: 49px !important; }
.customer-form-summary { padding: 12px 14px; border-radius: 12px; color: #536884; background: #f4f7fc; font-size: .85rem; line-height: 1.55; }

.customer-shell .conversation-list { gap: 10px; }
.customer-shell .conversation-link { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 15px; padding: 17px 18px; border: 1px solid #e8edf5; border-radius: 15px; background: #fff; text-decoration: none; }
.customer-shell .conversation-link:hover { border-color: #cad8fb; background: #fbfcff; }
.customer-shell .conversation-link strong { color: #293d5d; font-size: .93rem; }
.customer-shell .conversation-link strong .secondary-cell { color: #687991; font-size: .83rem; line-height: 1.55; }
.customer-shell .conversation-link > span { color: #70809a; font-size: .78rem; }
.customer-shell .conversation-link > span:last-child { grid-column: 1 / -1; }
.customer-shell .article-content { color: #354763; font-size: 1rem; line-height: 1.85; }
.customer-help-page > p:not(.eyebrow) { margin: 0 0 24px; color: #74829a; line-height: 1.6; }
.customer-article-page { max-width: 900px; margin: 0 auto; }
.customer-article-page .quick-list { padding-top: 19px; border-top: 1px solid #edf1f6; }
.customer-success-page { max-width: 760px; margin: clamp(20px, 8vh, 80px) auto; }
.customer-success-page h1 { max-width: 620px; }
.customer-success-ref { display: inline-flex; padding: 8px 11px; border-radius: 10px; color: #365ca9 !important; background: #eef3ff; font-size: .82rem; font-weight: 800; }
.customer-success-page .customer-note { margin-top: 23px; }
.customer-shell .stack-form { gap: 17px; }
.customer-shell label { color: #354763; font-size: .83rem; }
.customer-shell input,
.customer-shell textarea,
.customer-shell select { border-color: #dbe3ef; border-radius: 11px; background: #fff; }
.customer-shell input:focus,
.customer-shell textarea:focus,
.customer-shell select:focus { border-color: #83a3ff; box-shadow: 0 0 0 4px rgba(36, 93, 255, .09); }
.customer-shell .flash { border: 1px solid transparent; border-radius: 13px; padding: 14px 17px; }
.customer-shell .flash-success { border-color: #c9eddc; }
.customer-shell .flash-error { border-color: #f2d1d6; }

@media (max-width: 700px) {
    .customer-shell { padding: 12px; }
    .customer-topbar { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 17px; padding: 12px; border-radius: 16px; }
    .customer-nav { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
    .customer-nav a { padding: 7px 10px; font-size: .77rem; }
    .customer-nav-link { align-self: flex-end; }
    .customer-shell .demo-hero { padding: 27px 22px; border-radius: 21px; }
    .customer-shell .demo-hero::after { top: -200px; right: -180px; }
    .customer-shell .demo-hero h1 { font-size: clamp(2.15rem, 11vw, 3.25rem); }
    .customer-shell .quick-list { display: grid; grid-template-columns: 1fr; }
    .customer-shell .quick-list .button { justify-content: center; width: 100%; text-align: center; }
    .customer-shell .panel { padding: 21px 17px; border-radius: 19px; }
    .customer-page-heading,
    .ticket-detail-heading { flex-direction: column; align-items: stretch; }
    .customer-heading-actions { width: 100%; }
    .customer-heading-actions .button { flex: 1 1 auto; justify-content: center; }
    .customer-account-strip { align-items: flex-start; flex-wrap: wrap; }
    .customer-account-strip .button { margin-left: auto; }
    .customer-ticket-link { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .ticket-open-hint { display: none; }
    .notification-row { grid-template-columns: 10px minmax(0, 1fr); gap: 11px; padding: 15px; }
    .notification-open { grid-column: 2; align-self: start; }
    .customer-panel-heading { align-items: flex-start; flex-direction: column; }
    .customer-panel-heading form { width: 100%; }
    .customer-panel-heading form .button { width: 100%; }
    .customer-shell .message { max-width: 96%; }
    .customer-form-section { grid-template-columns: 1fr; gap: 15px; padding: 16px 13px; }
    .customer-form-section .full { grid-column: auto; }
}

@media (max-width: 390px) {
    .customer-brand-copy strong { max-width: 220px; }
    .customer-nav { gap: 1px; }
    .customer-nav a { padding: 7px 8px; font-size: .72rem; }
    .customer-shell .message-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
}
