/* ==========================================================================
   AnyJob Client Interface - Role 4 Users
   Modern design based on 人才库修改页面
   ========================================================================== */

/* --- 1. 系统基础布局 (System & Layout) --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
}

.sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
    padding: 0; width: 260px;
    /* Flex column so the menu area scrolls and the user block sits at the
       bottom WITHOUT overlapping the menu on short viewports. */
    display: flex; flex-direction: column;
    background-color: #fff; border-right: 1px solid #e2e8f0;
}
.sidebar-menu-scroll {
    flex: 1 1 auto;
    min-height: 0;          /* let the flex item actually shrink */
    overflow-y: auto;
    padding-bottom: 12px;
}

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 64px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 99;
    gap: 12px;
}
/* Breadcrumb area — never wrap. Without nowrap the asset pill on the right
   squeezes the breadcrumb until each Chinese char wraps onto its own line. */
.topbar > div:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Mobile: tighter padding, hide the "AnyJob ›" prefix, shrink the asset pill,
   and reduce the 发布新职位 button to icon-only so the page name has room. */
@media (max-width: 640px) {
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar > div:first-child { flex: 1 1 auto; }       /* let breadcrumb claim free space */
    .topbar > div:first-child .text-emerald,
    .topbar > div:first-child .text-emerald + .mx-2,
    .topbar > div:first-child [data-lucide="chevron-right"] { display: none; }
    .topbar > div:last-child { flex: 0 0 auto; gap: 8px !important; }
    .asset-group-pill { padding: 4px 6px; gap: 2px; }
    .asset-mini-item { padding: 2px 6px; font-size: 11px; }
    /* 发布新职位 → icon-only on mobile (text hidden) */
    .topbar a.btn.btn-success {
        padding: 8px !important;
        margin-left: 0 !important;
        min-width: 32px; justify-content: center;
        font-size: 0 !important;       /* hide any inline text node */
    }
    .topbar a.btn.btn-success .mr-1 { margin-right: 0 !important; }
}

/* --- 2. 工具类 (Utility Classes) --- */
.text-emerald { color: #059669 !important; }
.bg-emerald { background-color: #059669 !important; }
.text-amber-500 { color: #f59e0b !important; }
.fill-current { fill: currentColor; }
.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important; }

/* Asset Pills */
.asset-group-pill {
    display: flex; align-items: center; gap: 4px; padding: 4px 10px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 50px;
    cursor: pointer; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.asset-mini-item {
    display: flex; align-items: center; padding: 2px 10px; border-radius: 40px;
    font-size: 13px; font-weight: 800; transition: all 0.2s;
}
.asset-mini-item.gold { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.asset-mini-item.blue { background: #eff6ff; color: #2563eb; border: 1px solid #dbeafe; }
.asset-mini-item.green { background: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }

/* --- 3. 侧边栏导航 (Sidebar Navigation) --- */
.nav-link-sidebar {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}
.nav-link-sidebar:hover {
    color: #0f172a;
    background-color: #f8fafc;
    text-decoration: none;
}
.nav-link-sidebar.active {
    color: #059669;
    background-color: #ecfdf5;
    border-right: 4px solid #059669;
}
.new-badge-sidebar {
    background-color: #dc2626;
    color: white;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
/* BETA variant — same shape, different color so it reads as a stage marker
   rather than a freshness flag. */
.beta-badge-sidebar {
    background-color: #f59e0b;
}

/* --- 4. 筛选栏 (Filter Section) --- */
.filter-section {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}
.filter-content-wrapper {
    width: 100%;
    max-width: 1140px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 992px) {
    .filter-content-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
.search-container { position: relative; flex-grow: 1; max-width: 400px; }
.search-input {
    width: 100%; height: 40px; padding-left: 40px; padding-right: 16px;
    border-radius: 8px; border: 1px solid #e2e8f0;
    background-color: #f8fafc; color: #334155; font-size: 14px;
    transition: all 0.2s ease;
}
.search-input:focus {
    background-color: #fff;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
    outline: none;
}
.search-icon {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%); color: #94a3b8;
    pointer-events: none;
}
.filter-group { display: flex; gap: 10px; flex-wrap: wrap; }
.select-wrapper { position: relative; }
.custom-select-style {
    appearance: none; -webkit-appearance: none;
    background-color: #fff; border: 1px solid #e2e8f0;
    padding: 0 32px 0 12px; height: 40px; line-height: 38px;
    border-radius: 8px; font-size: 13px; color: #475569;
    font-weight: 500; cursor: pointer; transition: all 0.2s ease;
    min-width: 130px;
}
.custom-select-style:hover { border-color: #cbd5e1; background-color: #f8fafc; }
.custom-select-style:focus { border-color: #059669; outline: none; }
.select-arrow {
    position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%); color: #94a3b8;
    pointer-events: none;
}

/* --- 5. 人才卡片 (Talent Cards) --- */
.content-container { max-width: 1140px; margin: 0 auto; }
.ref-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    position: relative; margin-bottom: 1.5rem; transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02); overflow: hidden;
}
.ref-card:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}
.ref-card::before { content: ""; display: block; height: 4px; width: 100%; }
.ref-card.theme-blue::before { background: linear-gradient(to right, #3b82f6, #60a5fa); }
.ref-card.theme-orange::before { background: linear-gradient(to right, #f59e0b, #fbbf24); }
.ref-card.theme-purple::before { background: linear-gradient(to right, #a855f7, #c084fc); }

.rc-header {
    padding: 12px 24px 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rc-body {
    padding: 16px 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.rc-footer {
    padding: 12px 24px;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.rc-avatar {
    width: 68px; height: 68px;
    background: #eff6ff; color: #2563eb;
    font-weight: bold; font-size: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.recommend-badge {
    font-size: 12px; font-weight: bold;
    padding: 4px 12px; border-radius: 20px;
    display: flex; align-items: center; gap: 4px;
}
.theme-blue .recommend-badge {
    background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe;
}
.theme-orange .recommend-badge {
    background: #fffbeb; color: #d97706; border: 1px solid #fcd34d;
}
.theme-purple .recommend-badge {
    background: #faf5ff; color: #a855f7; border: 1px solid #e9d5ff;
}

.tag-item {
    background: #f1f5f9; color: #64748b;
    font-size: 11px; padding: 3px 10px;
    border-radius: 4px; margin-right: 8px;
    font-weight: 600;
}
.status-select {
    font-size: 11px; font-weight: 800;
    padding: 2px 8px; border-radius: 20px;
    border: 1px solid #e2e8f0; background: #fff;
    color: #475569; outline: none; cursor: pointer;
    height: 26px;
}

.unlocked-badge-green {
    font-size: 11px; background: #ecfdf5;
    color: #059669; border: 1px solid #10b981;
    border-radius: 4px; padding: 1px 8px;
    font-weight: 800; display: inline-flex;
    align-items: center;
}
.locked-badge-gray {
    font-size: 11px; background: #f1f5f9;
    color: #94a3b8; border: 1px solid #e2e8f0;
    border-radius: 4px; padding: 1px 8px;
    font-weight: 800; display: inline-flex;
    align-items: center;
}

/* Screening card badges */
.rc-header .screening-badge-star {
    font-size: 12px !important; font-weight: bold !important;
    padding: 4px 12px !important; border-radius: 20px !important;
    display: inline-flex !important; align-items: center !important;
    background: linear-gradient(135deg, #fb923c, #f97316) !important;
    color: #ffffff !important; border: 1px solid #f97316 !important;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.25) !important;
}
.rc-header .screening-badge-star i { color: #ffffff !important; }
.screening-badge-match {
    font-size: 11px; background: #ecfdf5;
    color: #059669; border: 1px solid #a7f3d0;
    border-radius: 4px; padding: 1px 8px;
    font-weight: 800; display: inline-flex;
    align-items: center;
}

/* Status pill tabs */
.status-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700;
    background: #f8fafc; border: 1px solid #e2e8f0; color: #64748b;
    text-decoration: none; transition: all 0.2s; cursor: pointer;
}
.status-pill:hover { background: #f1f5f9; border-color: #cbd5e1; text-decoration: none; color: #334155; }
.status-pill.active { background: #059669; border-color: #059669; color: #fff; }
.status-pill.active:hover { background: #047857; text-decoration: none; color: #fff; }
.status-pill-count {
    font-size: 10px; font-weight: 800; min-width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px; padding: 0 5px;
    background: #e2e8f0; color: #475569;
}
.status-pill-count.active { background: rgba(255,255,255,0.3); color: #fff; }

/* AI Reason Box */
.ai-box-img {
    background: #f0f9ff; border: 1px solid #e0f2fe;
    border-radius: 8px; padding: 14px 18px;
    font-size: 13px; color: #475569;
    line-height: 1.6; margin-bottom: 16px;
    cursor: pointer;
}
.ai-title-blue {
    color: #2563eb; font-weight: 800;
    display: flex; align-items: center;
    gap: 6px; margin-bottom: 6px;
}
.ai-box-orange {
    background: #fff7ed; border: 1px solid #ffedd5;
    border-radius: 8px; padding: 14px 18px;
    font-size: 13px; color: #475569;
    line-height: 1.6; margin-bottom: 16px;
    cursor: pointer;
}
.ai-title-orange {
    color: #d97706; font-weight: 800;
    display: flex; align-items: center;
    gap: 6px; margin-bottom: 6px;
}

/* Communication Box */
.comm-box-img {
    background: #f8fafc; border-left: 3px solid #3b82f6;
    padding: 12px 16px; font-size: 12px;
    color: #64748b; line-height: 1.6;
    border-radius: 4px; cursor: pointer;
    transition: background 0.2s;
}
.comm-box-img:hover { background: #f1f5f9; }
.comm-label {
    color: #2563eb; font-weight: 800;
    display: flex; align-items: center;
    gap: 4px; margin-bottom: 4px;
}

/* Orange Communication Box */
.comm-box-orange {
    background: #fffbeb; border-left: 3px solid #d97706;
    padding: 12px 16px; font-size: 12px;
    color: #64748b; line-height: 1.6;
    border-radius: 4px; cursor: pointer;
    transition: background 0.2s;
}
.comm-box-orange:hover { background: #fef3c7; }
.comm-label-orange {
    color: #d97706; font-weight: 800;
    display: flex; align-items: center;
    gap: 4px; margin-bottom: 4px;
}

/* Action Buttons */
.action-box-btn {
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 8px; padding: 6px 16px;
    font-size: 13px; color: #475569;
    font-weight: 600; display: flex;
    align-items: center; gap: 8px;
    cursor: pointer; transition: all 0.2s;
}
.action-box-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    text-decoration: none;
    color: #1e293b;
}
.action-box-btn.primary {
    background: #059669;
    border-color: #059669;
    color: white;
}

/* Stats Grid */
.stats-grid {
    display: flex; gap: 0px; font-size: 13px;
    color: #64748b; margin-top: 8px;
    margin-bottom: 16px; background: #f8fafc;
    padding: 8px 12px; border-radius: 6px;
    display: inline-flex; align-items: center;
}
.stat-item {
    display: flex; align-items: center;
    gap: 6px; font-weight: 500;
}
.stat-salary { font-weight: 800; color: #0f172a; }
.theme-blue .stat-salary { color: #2563eb; }
.theme-orange .stat-salary { color: #d97706; }
.pipe-divider {
    width: 1px; height: 12px;
    background: #cbd5e1; margin: 0 15px;
}

/* --- 6. 弹窗样式 (Modals) --- */
.modal-content-rounded {
    border-radius: 20px; border: none;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.modal-header-custom {
    padding: 20px 28px;
    border-bottom: 1px solid #f1f5f9;
}
.modal-body-custom { padding: 28px; }

/* Timeline (resume detail modal) */
.timeline { border-left: 2px solid #f1f5f9; padding-left: 24px; position: relative; margin-left: 8px; }
.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-item::before { content: ""; position: absolute; left: -33px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: white; border: 3px solid #cbd5e1; }
.timeline-item.active::before { border-color: #059669; }
.time-period { font-size: 12px; color: #94a3b8; font-weight: 600; margin-bottom: 4px; }
.work-desc { font-size: 13px; color: #64748b; line-height: 1.8; white-space: pre-wrap; }

.chat-text-log {
    padding: 10px 0;
    max-height: 400px;
    overflow-y: auto;
}
.chat-log-item { margin-bottom: 20px; }
.chat-log-date {
    font-size: 11px; color: #94a3b8;
    font-family: monospace; display: block;
    margin-bottom: 4px;
}
.chat-log-msg {
    font-size: 13px; line-height: 1.6;
    color: #334155;
}
.chat-log-role { font-weight: 800; }
.chat-log-role.ai { color: #059669; }
.chat-log-role.user { color: #2563eb; }
.chat-log-role.system { color: #d97706; }

/* --- 7. 动画 (Animations) --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translate3d(0, 20px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.animate-up { animation: fadeInUp 0.5s ease-out both; }

/* --- 8. 资产弹窗样式 (Asset Modal) --- */
.asset-card-row {
    display: flex; align-items: center; justify-content: space-between;
    background: #f8fafc; border-radius: 16px; padding: 16px 24px; margin-bottom: 12px;
    border: 1px solid #f1f5f9;
}
.asset-info-left { display: flex; align-items: center; gap: 16px; }
.asset-icon-box {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.asset-icon-box.gold { background: #fffbeb; color: #d97706; }
.asset-icon-box.blue { background: #eff6ff; color: #2563eb; }
.asset-icon-box.green { background: #ecfdf5; color: #059669; }
.asset-label-text { font-size: 16px; font-weight: 700; color: #475569; }
.asset-value-text { font-size: 24px; font-weight: 800; color: #1e293b; letter-spacing: -0.5px; }

.asset-footer-desc { font-size: 13px; color: #94a3b8; line-height: 1.6; margin-top: 24px; margin-bottom: 32px; padding: 0 4px; }

/* --- 9. 定向邀约弹窗样式 (Invitation Modal) --- */
.modal-invite .modal-dialog { max-width: 850px; }
.modal-invite .modal-content {
    border-radius: 20px; border: none; overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal-invite .modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 20px 28px;
}
.modal-invite .modal-title {
    font-weight: 800; font-size: 18px;
    color: #1e293b;
}
.modal-invite .modal-body { padding: 28px; }

.invite-notice-box {
    background: #f0f9ff; border: 1px solid #bae6fd;
    border-radius: 12px; padding: 16px; margin-bottom: 24px;
    color: #0369a1; font-size: 13px; line-height: 1.6;
}

.question-input-group { margin-bottom: 24px; }
.question-textarea {
    width: 100%; border-radius: 12px; border: 1px solid #e2e8f0;
    padding: 16px; font-size: 14px; color: #334155;
    transition: all 0.2s; min-height: 120px; line-height: 1.6;
}
.question-textarea:focus {
    border-color: #059669; outline: none;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.remarks-label {
    font-size: 13px; font-weight: 700; color: #475569;
    margin-bottom: 8px; display: block;
}
.remarks-textarea {
    width: 100%; border-radius: 10px; border: 1px solid #e2e8f0;
    padding: 12px 16px; font-size: 14px; min-height: 80px; resize: none;
}
.remarks-textarea:focus { border-color: #059669; outline: none; }

.settlement-rules-box {
    background: #f8fafc; border-radius: 12px; padding: 16px;
    margin-top: 24px; border: 1px solid #f1f5f9;
}
.rule-title {
    font-size: 12px; font-weight: 800; color: #64748b;
    text-transform: uppercase; margin-bottom: 8px; display: block;
}
.rule-item {
    font-size: 12px; color: #94a3b8; line-height: 1.6;
    margin-bottom: 4px; display: block;
}

.privacy-warning-note {
    display: flex; align-items: flex-start; gap: 6px;
    margin: 16px 0 20px; color: #94a3b8;
    font-size: 11.5px; line-height: 1.5; padding: 0 4px;
}
.privacy-warning-note i {
    flex-shrink: 0; color: #f59e0b; margin-top: 2px;
}

.btn-invite-confirm {
    background: #059669; color: white; border: none;
    font-weight: 800; padding: 12px 32px;
    border-radius: 12px; transition: all 0.2s; font-size: 14px;
}
.btn-invite-confirm:hover {
    background: #047857; color: white;
    transform: translateY(-1px);
}

.btn-asset-action {
    height: 48px; border-radius: 12px; font-weight: 800; font-size: 15px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.2s; border: none; flex: 1;
}
.btn-asset-action.secondary { background: #f1f5f9; color: #475569; }
.btn-asset-action.secondary:hover { background: #e2e8f0; color: #1e293b; text-decoration: none; }
.btn-asset-action.primary { background: #059669; color: white; }
.btn-asset-action.primary:hover { background: #047857; text-decoration: none; color: white; }

/* --- 10. 分页样式 (Pagination) --- */
.page-item.active .page-link { background-color: #3b82f6; border-color: #3b82f6; color: #fff; }
.page-link { color: #3b82f6; }
.page-link:hover { color: #2563eb; }

/* --- 9. 提示框 (Alerts) --- */
.alert {
    border: none;
    border-left: 4px solid transparent;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    line-height: 1.5;
}
.alert svg,
.alert [data-lucide] {
    flex-shrink: 0;
    vertical-align: middle;
}
.alert .close,
.alert [data-dismiss="alert"] {
    margin-left: auto;
    padding: 0;
    opacity: 0.4;
    font-size: 18px;
    text-shadow: none;
    color: inherit;
    line-height: 1;
}
.alert .close:hover,
.alert [data-dismiss="alert"]:hover {
    opacity: 0.7;
}
.alert-success {
    background-color: #eff6ff !important;
    border-color: transparent !important;
    border-left-color: #1e40af !important;
    color: #1e3a5f !important;
}
.alert-danger {
    background-color: #fef2f2 !important;
    border-color: transparent !important;
    border-left-color: #ef4444 !important;
    color: #b91c1c !important;
}
.alert-warning {
    background-color: #fffbeb !important;
    border-color: transparent !important;
    border-left-color: #f59e0b !important;
    color: #92400e !important;
}
.alert-info {
    background-color: #eff6ff !important;
    border-color: transparent !important;
    border-left-color: #1e40af !important;
    color: #1e3a5f !important;
}

/* --- AI Smart Sort Button --- */
.top-analysis-btn {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: #059669;
    background-color: #ecfdf5;
    border: 1px solid #10b981;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
}
.top-analysis-btn:hover,
.top-analysis-btn.active {
    background-color: #059669;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
    transform: translateY(-1px);
}

/* --- 10. 响应式设计 (Responsive) --- */
/* Hamburger button — only visible on mobile. */
.topbar-hamburger {
    display: none;
    align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0;
    background: transparent; border: 0;
    color: #475569; border-radius: 8px;
    cursor: pointer; margin-right: 4px;
    transition: background .15s;
    flex-shrink: 0;
}
.topbar-hamburger:hover { background: #f1f5f9; color: #0f172a; }

/* Sidebar slide-out drawer on mobile + backdrop overlay. */
.sidebar { transition: transform .25s ease; }
.sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.45);
    z-index: 95;
}
.sidebar-backdrop[hidden] { display: none; }

@media (max-width: 768px) {
    .topbar-hamburger { display: inline-flex; }
    .sidebar { transform: translateX(-100%); width: 280px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
    .sidebar.is-open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}
/* Desktop: backdrop must never show (in case JS forgot to hide it). */
@media (min-width: 769px) {
    .sidebar-backdrop { display: none !important; }
}
