.wide .container,
.wide .topbar-inner { max-width: 1180px; }

.cand-empty { max-width: 34rem; }

.cand-empty .employer-card-title { display: block; margin-bottom: 10px; }

.cand-toolbar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.cand-toolbar .menu { flex: 0 0 auto; }

.cand-toolbar .cand-pills {
    flex: 1;
    margin-bottom: 0;
}

.cand-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.cand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
    border-radius: 980px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.cand-pill:hover { background: var(--surface-soft); }

.cand-pill.active {
    background: var(--text);
    box-shadow: none;
    color: #fff;
}

.cand-pills-small .cand-pill { padding: 5px 12px; }

.cand-count {
    flex: 0 0 auto;
    min-width: 20px;
    padding: 1px 7px;
    border-radius: 980px;
    background: var(--fill);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.cand-pill.active .cand-count { background: rgba(255, 255, 255, 0.22); }

.cand-count.new,
.cand-pill.active .cand-count.new {
    background: var(--blue);
    color: #fff;
}

.cand-count.warn,
.cand-pill.active .cand-count.warn {
    background: var(--orange);
    color: #fff;
}

.cand-flag {
    align-self: flex-start;
    padding: 1px 8px;
    border-radius: 980px;
    background: var(--orange-tint);
    color: var(--orange-text);
    font-size: 12px;
    font-weight: 600;
}

.chat-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 8px 8px 8px 14px;
    border-radius: var(--radius-control);
    background: var(--surface-soft);
    font-size: 14px;
}

.chat-control-handoff {
    background: var(--orange-tint);
    color: var(--orange-text);
}

.chat-control-text { font-weight: 500; }

.chat-control button {
    flex: 0 0 auto;
    padding: 6px 14px;
    font-size: 13px;
}

.chat-control-handoff button { background: rgba(255, 255, 255, 0.7); }

.cand-refresh { flex: 0 0 auto; }

.cand-split {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 16px;
    height: calc(100vh - 262px);
    min-height: 480px;
}

.cand-list,
.cand-detail {
    background: var(--surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    min-height: 0;
}

.cand-list { overflow-y: auto; }

.cand-row {
    display: flex;
    gap: 10px;
    padding: 13px 16px 13px 12px;
    border-bottom: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
    transition: background 0.2s;
}

.cand-row:last-child { border-bottom: none; }
.cand-row:hover { background: var(--surface-soft); }
.cand-row.active { background: var(--blue-tint); }

.cand-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: 50%;
}

.cand-dot.on { background: var(--blue); }

.cand-row-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.cand-row-top,
.cand-row-bottom {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.cand-name {
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cand-time {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--text-3);
}

.cand-row-title {
    font-size: 13px;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cand-row-meta {
    font-size: 14px;
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cand-detail {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-head {
    flex: 0 0 auto;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--line);
}

.chat-head-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.chat-head-main { min-width: 0; }

.cand-back {
    display: none;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    color: var(--blue-text);
    text-decoration: none;
    font-size: 15px;
}

.cand-back svg {
    width: 16px;
    height: 16px;
}

.cand-title {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cand-sub {
    margin-top: 3px;
    font-size: 14px;
    color: var(--text-2);
}

.cand-resume { flex: 0 0 auto; }

.chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.chat-chip {
    padding: 3px 10px;
    border-radius: 980px;
    background: var(--surface-soft);
    font-size: 13px;
    font-weight: 500;
}

.chat-about { margin-top: 12px; }

.chat-about summary {
    font-size: 14px;
    color: var(--blue-text);
    cursor: pointer;
}

.chat-about[open] {
    max-height: 38vh;
    overflow-y: auto;
}

.cand-section {
    margin: 14px 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.cand-jobs,
.cand-survey { list-style: none; }

.cand-jobs li,
.cand-survey li {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}

.cand-jobs li:last-child,
.cand-survey li:last-child { border-bottom: none; }

.cand-job-title,
.cand-answer {
    font-size: 14px;
    font-weight: 500;
}

.cand-job-meta,
.cand-question {
    font-size: 13px;
    color: var(--text-2);
}

.chat {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 18px 22px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 78%;
}

.chat-msg.mine {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-bubble {
    padding: 9px 14px;
    border-radius: 18px;
    background: #e9e9eb;
    font-size: 15px;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-msg.mine .chat-bubble {
    background: var(--blue);
    color: #fff;
}

.chat-file {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--blue-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: normal;
}

.chat-file:hover { background: #fff; }

.chat-file svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
}

.chat-msg.mine .chat-file {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.chat-image {
    display: block;
    margin-top: 6px;
}

.chat-image img {
    display: block;
    max-width: 260px;
    max-height: 220px;
    border-radius: 12px;
}

.chat-meta {
    margin-top: 3px;
    padding: 0 6px;
    font-size: 11px;
    color: var(--text-3);
}

.chat-event {
    align-self: center;
    font-size: 12px;
    color: var(--text-3);
    text-align: center;
}

.chat-empty {
    margin: auto;
    padding: 36px 20px;
    color: var(--text-3);
    text-align: center;
}

.chat-compose {
    flex: 0 0 auto;
    padding: 12px 22px 14px;
    border-top: 1px solid var(--line);
}

.quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.quick-btn {
    padding: 5px 12px;
    background: var(--blue-tint);
    color: var(--blue-text);
    font-size: 13px;
}

.quick-btn:hover { background: rgba(0, 113, 227, 0.18); }

.chat-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.chat-form textarea {
    flex: 1;
    min-height: 40px;
    max-height: 180px;
    border-radius: 20px;
    resize: none;
}

.chat-form button { flex: 0 0 auto; }

.chat-hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-3);
}

.chat-error {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--red-text);
}

@media (max-width: 860px) {
    .cand-toolbar { flex-wrap: wrap; }
    .cand-toolbar .cand-pills {
        order: 3;
        flex: 1 1 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .cand-toolbar .cand-pill {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .cand-refresh { margin-left: auto; }
    .cand-split {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }
    .cand-split.has-detail .cand-list { display: none; }
    .cand-split:not(.has-detail) .cand-detail { display: none; }
    .chat-open .subbar,
    .chat-open .cand-toolbar,
    .chat-open .cand-pills-small { display: none; }
    .chat-open.container { padding-top: 12px; padding-bottom: 12px; }
    .cand-detail {
        height: calc(100vh - 78px);
        height: calc(100dvh - 78px);
        min-height: 420px;
    }
    .cand-back { display: inline-flex; }
    .chat-head { padding: 14px 16px 12px; }
    .chat-head-row { flex-direction: column; gap: 10px; }
    .chat { padding: 14px 16px; }
    .chat-compose { padding: 10px 16px 12px; }
    .chat-msg { max-width: 90%; }
    .chat-hint { display: none; }
    .quick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
    .quick-btn { flex: 0 0 auto; }
}

.chat-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chat-tools form { display: contents; }

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    background: var(--fill);
    border: none;
    border-radius: 980px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tool-btn:hover { background: var(--fill-hover); }

.tool-btn svg {
    width: 15px;
    height: 15px;
    flex: none;
}

.tool-btn-on {
    background: var(--orange-tint);
    color: var(--orange-text);
}

.tool-btn-on:hover { background: rgba(255, 159, 10, 0.26); }

.cand-star {
    width: 13px;
    height: 13px;
    margin-right: 5px;
    vertical-align: -1px;
    color: var(--orange);
}

.assist {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.assist input {
    flex: 1;
    min-width: 0;
    border-radius: 20px;
    background: var(--surface-soft);
}

.assist button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.assist button svg {
    width: 15px;
    height: 15px;
}

.assist-note {
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--orange-text);
}

@media (max-width: 860px) {
    .assist { gap: 8px; }
    .assist button span { display: none; }
    .assist button { padding: 9px 12px; }
}
