/* ============================================
   RESPONSIVE LAYOUTS - Mandate, Kunden, Modals
   Global responsive fixes for all views
   ============================================ */

/* ============================================
   GLOBAL MODAL STYLES
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.modal-container {
    background: white;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    border-radius: 8px;
    box-sizing: border-box;
}

.modal-lg { max-width: 700px; }
.modal-md { max-width: 600px; }
.modal-sm { max-width: 500px; }

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--fc-gray);
    padding: 8px;
    z-index: 1;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-right: 30px;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-form-full {
    grid-column: 1 / -1;
}

.modal-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fc-gray);
    margin-bottom: 6px;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    background: white;
    box-sizing: border-box;
    border-radius: 4px;
}

.modal-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    border-radius: 4px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.modal-btn-cancel {
    padding: 12px 24px;
    border: 1px solid #e5e7eb;
    background: white;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-container {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        padding: 24px 16px;
    }

    .modal-form-grid {
        grid-template-columns: 1fr;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions button {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   MANDATE LIST VIEW
   ============================================ */
.mandate-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 16px;
}

.mandate-page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--fc-primary);
}

.mandate-page-subtitle {
    color: var(--fc-gray);
    font-size: 14px;
    margin-top: 4px;
}

.mandate-header-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.mandate-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.mandate-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 350px;
}

.mandate-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 13px;
    pointer-events: none;
}

.mandate-search-input {
    width: 100%;
    padding: 10px 16px 10px 36px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    background: white;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.mandate-search-input:focus {
    outline: none;
    border-color: var(--fc-accent, #ff6101);
    box-shadow: 0 0 0 3px rgba(255, 97, 1, 0.1);
}

.mandate-filter-info {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.mandate-filter-select {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    background: white;
    min-width: 140px;
    border-radius: 4px;
}

.mandate-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

/* Desktop Table, Mobile Cards */
.mandate-table-desktop { display: block; }
.mandate-cards-mobile { display: none; }

.mandate-card-mobile {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s;
}

.mandate-card-mobile:hover { background: #fafafa; }
.mandate-card-mobile:last-child { border-bottom: none; }

.mandate-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.mandate-card-title {
    font-weight: 500;
    font-size: 15px;
    color: var(--fc-primary);
    flex: 1;
}

.mandate-card-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.mandate-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--fc-gray);
    margin-bottom: 8px;
}

.mandate-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mandate-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--fc-gray);
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.mandate-card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 768px) {
    .mandate-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mandate-page-title {
        font-size: 20px;
    }

    .mandate-table-desktop { display: none; }
    .mandate-cards-mobile { display: block; }

    .mandate-filter-select {
        flex: 1;
        min-width: 0;
    }

    .mandate-kpis {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ============================================
   MANDATE DETAIL VIEW
   ============================================ */
.mandate-back-btn {
    background: none;
    border: none;
    color: var(--fc-primary);
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.mandate-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 16px;
}

.mandate-detail-header-info { flex: 1; }

.mandate-detail-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--fc-primary);
}

.mandate-detail-meta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.mandate-meta-item {
    font-size: 13px;
    color: var(--fc-gray);
}

.mandate-meta-badge {
    font-size: 12px;
    background: #fff3e0;
    color: var(--fc-accent);
    padding: 2px 8px;
    border-radius: 2px;
}

.mandate-detail-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.mandate-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.mandate-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.mandate-section-card {
    padding: 24px;
    margin-bottom: 20px;
}

.mandate-section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fc-gray);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.mandate-section-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--fc-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mandate-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 13px;
}

.mandate-detail-label {
    color: var(--fc-gray);
}

/* Skills */
.mandate-skill-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.mandate-skills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mandate-skill-tag {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 2px;
}

.mandate-skill-required { background: #fef2f2; color: #dc2626; }
.mandate-skill-preferred { background: #fff7ed; color: var(--fc-accent); }
.mandate-skill-nice { background: #f3f4f6; color: var(--fc-gray); }

/* Matches & Candidates */
.mandate-matches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.mandate-refresh-btn {
    background: none;
    border: 1px solid var(--fc-accent);
    color: var(--fc-accent);
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 2px;
}

.mandate-match-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    gap: 12px;
}

.mandate-match-info { flex: 1; min-width: 0; }
.mandate-match-name { font-weight: 500; font-size: 14px; }
.mandate-match-title { font-size: 12px; color: var(--fc-gray); }
.mandate-match-score-area { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.mandate-match-score { font-size: 20px; font-weight: 600; text-align: right; }
.mandate-match-score-label { font-size: 10px; color: var(--fc-gray); text-align: right; }

.mandate-assign-btn {
    background: var(--fc-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    border-radius: 2px;
}

.mandate-candidate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 12px;
}

.mandate-candidate-info { cursor: pointer; flex: 1; min-width: 0; }
.mandate-candidate-name { font-weight: 500; font-size: 14px; }
.mandate-candidate-title { font-size: 12px; color: var(--fc-gray); }
.mandate-candidate-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.mandate-status-select {
    padding: 4px 8px;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    background: white;
    border-radius: 2px;
}

.mandate-remove-btn {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 4px;
}

.mandate-activity-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f9fafb;
    font-size: 13px;
}

@media (max-width: 768px) {
    .mandate-detail-header {
        flex-direction: column;
    }

    .mandate-detail-title {
        font-size: 20px;
    }

    .mandate-detail-actions {
        width: 100%;
    }

    .mandate-detail-actions .btn-primary {
        flex: 1;
        justify-content: center;
    }

    .mandate-detail-grid {
        grid-template-columns: 1fr;
    }

    .mandate-section-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .mandate-details-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .mandate-candidate-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .mandate-candidate-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .mandate-match-score {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .mandate-action-btn .btn-label {
        display: none;
    }
}

/* ============================================
   CLIENTS VIEW
   ============================================ */
.clients-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 16px;
}

.clients-page-title {
    font-size: 24px;
    font-weight: 300;
    color: var(--fc-primary);
}

.clients-filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    flex-wrap: wrap;
}

.clients-search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.clients-filter-btn {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    background: white;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 4px;
    transition: all 0.2s;
}

.clients-filter-btn.active {
    background: var(--fc-primary);
    color: white;
    border-color: var(--fc-primary);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Professional client URL display: prevents long tracking URLs from stretching rows/tables */
.client-company-cell,
.client-card-title-wrap,
.client-card-title-area,
.info-value--website {
    min-width: 0;
    max-width: 100%;
}

.client-company-name,
.client-card-company,
.client-card-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.client-website-chip {
    display: inline-flex;
    align-items: stretch;
    max-width: min(360px, 100%);
    margin-top: 6px;
    border: 1px solid #dbe3ea;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    vertical-align: middle;
}

.client-website-chip--list { max-width: min(280px, 100%); }
.client-website-chip--card { max-width: 100%; }
.client-website-chip--detail,
.client-website-chip--detail-header { max-width: min(420px, 100%); }
.client-website-chip--header {
    border-color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.16);
    color: #fff;
    box-shadow: none;
}

.client-website-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    padding: 5px 9px;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
}

.client-website-chip--header .client-website-link,
.client-website-chip--detail-header .client-website-link {
    color: inherit;
}

.client-website-link:hover {
    color: var(--fc-primary, #1e3c3c);
    background: #f1f5f9;
}

.client-website-chip--header .client-website-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.client-website-domain {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 210px;
}

.client-website-chip--list .client-website-domain { max-width: 170px; }
.client-website-chip--card .client-website-domain { max-width: 240px; }
.client-website-chip--detail .client-website-domain { max-width: 260px; }
.client-website-chip--header .client-website-domain { max-width: 220px; }

.client-website-open-label {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef2f7;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.client-website-chip--header .client-website-open-label,
.client-website-chip--detail-header .client-website-open-label {
    background: rgba(255,255,255,0.18);
    color: inherit;
}

.client-website-link .fa-globe,
.client-website-link .fa-external-link-alt {
    flex: 0 0 auto;
    font-size: 10px;
    opacity: 0.78;
}

.client-website-copy {
    flex: 0 0 34px;
    width: 34px;
    min-height: 30px;
    border: 0;
    border-left: 1px solid #dbe3ea;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.client-website-copy:hover {
    background: var(--fc-primary, #1e3c3c);
    color: #fff;
}

.client-website-chip--header .client-website-copy,
.client-website-chip--detail-header .client-website-copy {
    border-left-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    color: inherit;
}

.client-website-chip--header .client-website-copy:hover,
.client-website-chip--detail-header .client-website-copy:hover {
    background: rgba(255,255,255,0.26);
    color: #fff;
}

.info-row--website {
    align-items: flex-start;
    gap: 12px;
}

@media (max-width: 768px) {
    .client-website-chip,
    .client-website-chip--list,
    .client-website-chip--card,
    .client-website-chip--detail,
    .client-website-chip--header {
        max-width: 100%;
    }
    .client-website-domain,
    .client-website-chip--list .client-website-domain,
    .client-website-chip--card .client-website-domain,
    .client-website-chip--detail .client-website-domain,
    .client-website-chip--header .client-website-domain {
        max-width: 180px;
    }
    .client-website-open-label { display: none; }
}

.client-card-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.client-card-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.client-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.client-card-company {
    font-size: 17px;
    font-weight: 600;
    color: var(--fc-primary);
}

.client-card-industry {
    font-size: 13px;
    color: var(--fc-gray);
    margin-top: 2px;
}

.client-card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.client-card-details span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-card-details i {
    width: 16px;
    text-align: center;
    color: #9ca3af;
}

.client-card-footer {
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

@media (max-width: 768px) {
    .clients-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .clients-search-bar {
        flex-direction: column;
    }
    .clients-search-bar .search-input-wrap {
        max-width: 100% !important;
        width: 100%;
    }

    .clients-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .client-card-item {
        padding: 16px;
    }
}

/* Client Detail View */
.client-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 16px;
}

.client-detail-info h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--fc-primary);
}

.client-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.client-section-card {
    padding: 24px;
    margin-bottom: 20px;
}

.client-section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fc-gray);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.contact-person-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 12px;
}

.contact-person-info {
    flex: 1;
    min-width: 0;
}

.contact-person-name {
    font-weight: 500;
    font-size: 14px;
}

.contact-person-meta {
    font-size: 12px;
    color: var(--fc-gray);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .client-detail-header {
        flex-direction: column;
    }

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

    .client-section-card {
        padding: 16px;
    }

    .contact-person-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   CANDIDATES HEADER - Responsive
   ============================================ */
.candidates-header {
    flex-wrap: wrap !important;
    gap: 12px !important;
}

@media (max-width: 640px) {
    .candidates-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .candidates-header h1 {
        font-size: 22px !important;
    }

    .candidates-header .flex.gap-3 {
        display: flex !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .candidates-header .flex.gap-3 button {
        flex: 1 !important;
        font-size: 12px !important;
        padding: 10px 12px !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
        align-items: center !important;
    }
}

/* ============================================
   EVENTS VIEW - Responsive fixes
   ============================================ */
@media (max-width: 768px) {
    /* Event KPIs */
    .content-area div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Event detail grid */
    .content-area div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   GLOBAL TABLE RESPONSIVE
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}

.data-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fc-gray);
    font-weight: 600;
}

.data-table tbody tr:hover {
    background: #fafafa;
}


/* ============================================
   CONTACT QUICK SIDEBOARD
   Restores list-row quick preview while the eye icon opens the full contact overview.
   ============================================ */
.candidate-sideboard-root {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.candidate-sideboard-root.open {
    pointer-events: auto;
}

.candidate-sideboard-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.candidate-sideboard-root.open .candidate-sideboard-backdrop {
    opacity: 1;
}

.candidate-sideboard-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(480px, 100vw);
    height: 100%;
    background: #ffffff;
    box-shadow: -18px 0 45px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    transition: transform 0.24s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.candidate-sideboard-root.open .candidate-sideboard-panel {
    transform: translateX(0);
}

.csb-loading,
.csb-error {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #64748b;
    padding: 32px;
    text-align: center;
}

.csb-loading i {
    color: var(--fc-primary, #1e3c3c);
    font-size: 28px;
}

.csb-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.csb-close:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.04);
}

.csb-header {
    position: relative;
    padding: 32px 28px 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--fc-primary, #1e3c3c), var(--fc-primary-dark, #102626));
}

.csb-avatar-wrap {
    width: 78px;
    height: 78px;
    margin-bottom: 16px;
}

.csb-avatar-img,
.csb-avatar-fallback {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.78);
    object-fit: cover;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22);
}

.csb-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.csb-title-block h2 {
    font-size: 24px;
    line-height: 1.15;
    font-weight: 800;
    margin: 0;
    padding-right: 44px;
}

.csb-title-block p {
    margin: 7px 0 0;
    font-size: 14px;
    opacity: 0.82;
}

.csb-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.csb-rating {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.csb-section {
    padding: 20px 28px;
    border-bottom: 1px solid #eef2f7;
}

.csb-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.csb-section h3 i {
    color: var(--fc-primary, #1e3c3c);
}

.csb-contact-list {
    display: grid;
    gap: 10px;
}

.csb-contact-line {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e8eef5;
    border-radius: 12px;
    color: #334155;
    background: #ffffff;
    text-decoration: none;
    transition: all 0.18s ease;
}

.csb-contact-line:not(.disabled):hover {
    border-color: color-mix(in srgb, var(--fc-primary, #1e3c3c) 35%, #e8eef5);
    background: color-mix(in srgb, var(--fc-primary, #1e3c3c) 4%, white);
    color: var(--fc-primary, #1e3c3c);
}

.csb-contact-line i {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--fc-primary, #1e3c3c);
}

.csb-contact-line span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.csb-contact-line.disabled {
    color: #94a3b8;
    background: #f8fafc;
    cursor: default;
}

.csb-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.csb-mini-card {
    padding: 14px;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.csb-mini-card span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 5px;
}

.csb-mini-card strong {
    color: #0f172a;
    font-size: 14px;
}

.csb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.csb-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 6px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

.csb-tag i {
    color: var(--fc-primary, #1e3c3c);
    font-size: 10px;
}

.csb-empty-inline {
    color: #94a3b8;
    font-size: 13px;
}

.csb-activities {
    display: grid;
    gap: 10px;
}

.csb-activity-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px;
    border-radius: 12px;
    background: #f8fafc;
}

.csb-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #ffffff;
    color: var(--fc-primary, #1e3c3c);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.csb-activity-item strong {
    display: block;
    color: #1e293b;
    font-size: 13px;
    line-height: 1.3;
}

.csb-activity-item small {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 11px;
}

.csb-empty-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 13px;
}

.csb-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 10px;
    padding: 16px 28px;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e8eef5;
    backdrop-filter: blur(10px);
}

.csb-primary-btn,
.csb-secondary-btn {
    flex: 1;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.csb-primary-btn {
    color: #ffffff;
    background: var(--fc-primary, #1e3c3c);
}

.csb-primary-btn:hover {
    filter: brightness(0.94);
    transform: translateY(-1px);
}

.csb-secondary-btn {
    color: #475569;
    background: #ffffff;
    border-color: #dbe4ef;
}

.csb-secondary-btn:hover {
    background: #f8fafc;
    color: #0f172a;
}

@media (max-width: 640px) {
    .candidate-sideboard-panel {
        width: 100vw;
    }

    .csb-header,
    .csb-section,
    .csb-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .csb-grid-two {
        grid-template-columns: 1fr;
    }

    .csb-footer {
        flex-direction: column-reverse;
    }
}

/* ============================================
   CONTACT SIDEBOARD V2 - larger executive profile layout
   ============================================ */
.contact-list-person-cell,
.contact-list-email-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.contact-list-avatar-img,
.contact-list-avatar-fallback {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-list-avatar-img {
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.contact-list-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--fc-primary, #1e3c3c), var(--fc-primary-light, #2d5a5a));
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.contact-list-name-wrap,
.contact-list-email-cell {
    min-width: 0;
}

.contact-list-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.contact-list-name-text,
.contact-list-email-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-copy-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 10px;
    border: 1px solid #dbe4ef;
    background: #ffffff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.16s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.contact-copy-btn:hover {
    color: #ffffff;
    background: var(--fc-primary, #1e3c3c);
    border-color: var(--fc-primary, #1e3c3c);
    transform: translateY(-1px);
}

.contact-copy-btn i {
    font-size: 13px;
}

.contact-list-mini-badge {
    display: inline-flex;
    width: fit-content;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.contact-list-mini-badge.founder-confirmed {
    color: var(--fc-primary, #004B87);
    background: color-mix(in srgb, var(--fc-primary, #004B87) 12%, white);
}

.contact-list-mini-badge.founder-unconfirmed {
    color: #92400e;
    background: #fef3c7;
}

.dashboard-inline-board-section {
    margin-bottom: 28px;
}

.dashboard-overview-inline {
    display: block;
}

.dashboard-inline-section-title {
    margin: 4px 0 18px;
    padding: 18px 20px;
    border: 1px solid #e8eef5;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.dashboard-inline-section-title h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #1e293b;
    font-size: 20px;
    font-weight: 800;
}

.dashboard-inline-section-title h2 i {
    color: var(--fc-accent, #ff6101);
}

.dashboard-inline-section-title p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
}

/* Unified CI badges / tags across mandates, clients and contacts */
.ci-badge,
.status-badge,
.mb-status-badge,
.contact-list-mini-badge,
.primary-badge,
.csb-tag,
.skill-tag,
.interest-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 22px;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.ci-badge i,
.status-badge i,
.mb-status-badge i,
.contact-list-mini-badge i,
.primary-badge i,
.csb-tag i,
.skill-tag i,
.interest-tag i {
    font-size: 9px;
}

.ci-badge--open,
.ci-badge--info,
.status-open,
.status-prozess,
.status-contacted,
.status-shortlist {
    background: #d4e4e4;
    color: #1e3c3c;
    border-color: color-mix(in srgb, #1e3c3c 15%, #d4e4e4);
}

.ci-badge--progress,
.status-in_progress,
.status-interview,
.status-offer,
.status-partner_agreement {
    background: #ffe5d4;
    color: #ff6101;
    border-color: color-mix(in srgb, #ff6101 18%, #ffe5d4);
}

.ci-badge--filled,
.status-filled,
.status-placed,
.status-customer,
.status-kunde {
    background: #1e3c3c;
    color: #ffffff;
    border-color: #1e3c3c;
}

.ci-badge--success,
.ci-badge--industry,
.ci-badge--partner,
.status-current_customer {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.ci-badge--warning,
.ci-badge--lighthouse,
.status-lead,
.status-new {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.ci-badge--accent,
.ci-badge--lunch {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.ci-badge--danger,
.status-rejected,
.status-cancelled {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.ci-badge--muted,
.ci-badge--neutral,
.status-on_hold,
.status-paused {
    background: #f3f4f6;
    color: #64748b;
    border-color: #e5e7eb;
}

.ci-badge--purple,
.ci-badge--event {
    background: #f5f3ff;
    color: #6d28d9;
    border-color: #ddd6fe;
}

.ci-badge--blue,
.ci-badge--candidate-contact,
.ci-badge--mandate {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.ci-badge--dashed {
    background: #ffffff;
    color: #64748b;
    border-style: dashed;
    border-color: #cbd5e1;
}

.primary-badge,
.founder-confirmed {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.founder-unconfirmed {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.ci-badge--clickable {
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.ci-badge--clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.09);
}

.candidate-sideboard-panel {
    width: min(760px, calc(100vw - 72px));
    max-width: 760px;
}

.csb-header {
    padding: 34px 42px 28px;
}

.csb-header-main {
    display: flex;
    align-items: center;
    gap: 22px;
    padding-right: 56px;
}

.csb-avatar-wrap,
.csb-avatar-img,
.csb-avatar-fallback {
    width: 92px;
    height: 92px;
}

.csb-avatar-fallback {
    font-size: 28px;
}

.csb-title-block h2 {
    font-size: 30px;
    padding-right: 0;
}

.csb-title-block p {
    font-size: 15px;
    line-height: 1.45;
    max-width: 540px;
}

.csb-scroll-content {
    flex: 1;
    overflow-y: auto;
    background: #f8fafc;
}

.csb-section {
    margin: 14px 18px;
    padding: 22px 24px;
    border: 1px solid #e8eef5;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.csb-section-highlight {
    border-color: color-mix(in srgb, var(--fc-primary, #1e3c3c) 28%, #e8eef5);
    background: linear-gradient(180deg, color-mix(in srgb, var(--fc-primary, #1e3c3c) 4%, white), #ffffff);
}

.csb-section h3 {
    font-size: 15px;
    margin-bottom: 14px;
}

.csb-section h4 {
    margin: 0 0 10px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.45px;
}

.csb-quick-edit-section {
    border-color: color-mix(in srgb, var(--fc-accent, #ff6101) 25%, #e8eef5);
    background: linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--fc-accent, #ff6101) 4%, white));
}

.csb-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.csb-quick-field {
    display: grid;
    gap: 6px;
}

.csb-quick-field-wide {
    grid-column: 1 / -1;
}

.csb-quick-field > span {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.csb-quick-field select,
.csb-quick-field input,
.csb-add-note-box textarea {
    width: 100%;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    font-size: 13px;
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.csb-quick-field select:focus,
.csb-quick-field input:focus,
.csb-add-note-box textarea:focus {
    border-color: var(--fc-primary, #1e3c3c);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc-primary, #1e3c3c) 10%, transparent);
}

.csb-inline-save {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 6px;
}

.csb-inline-save button,
.csb-branch-edit-row button,
.csb-add-note-box button {
    border: 0;
    border-radius: 12px;
    background: var(--fc-primary, #1e3c3c);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.csb-inline-save button:hover,
.csb-branch-edit-row button:hover,
.csb-add-note-box button:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.csb-branch-edit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.csb-branch-preview {
    min-height: 42px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    background: #ffffff;
}

.csb-branch-preview span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    padding: 3px 9px;
    border-radius: 6px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.csb-branch-preview em {
    color: #94a3b8;
    font-size: 12px;
    font-style: normal;
}

.csb-branch-edit-row button {
    height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.csb-add-note-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    margin-bottom: 14px;
}

.csb-add-note-box textarea {
    min-height: 76px;
    resize: vertical;
}

.csb-add-note-box button {
    min-height: 44px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.csb-note-list,
.csb-card-list,
.csb-step-list,
.csb-timeline-compact,
.csb-ai-grid {
    display: grid;
    gap: 10px;
}

.csb-note-card,
.csb-card-list article,
.csb-timeline-compact article,
.csb-ai-grid article {
    padding: 13px 14px;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    background: #ffffff;
}

.csb-note-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 7px;
}

.csb-note-meta i {
    color: var(--fc-primary, #1e3c3c);
}

.csb-note-meta small {
    margin-left: auto;
    color: #94a3b8;
}

.csb-note-card p,
.csb-ai-summary p,
.csb-timeline-compact p {
    margin: 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.5;
}

.csb-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
    gap: 18px;
}

.csb-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.csb-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 3px 9px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #64748b;
    border: 1px solid #e5e7eb;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.csb-step-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    background: #ffffff;
}

.csb-step-number {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--fc-primary, #1e3c3c);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}

.csb-step-item strong,
.csb-card-list article strong,
.csb-timeline-compact article strong,
.csb-ai-grid article strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
}

.csb-step-item p,
.csb-card-list article span,
.csb-timeline-compact article span {
    display: block;
    margin: 3px 0 0;
    color: #475569;
    font-size: 13px;
}

.csb-step-item small,
.csb-card-list article small {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 11px;
}

.csb-highlight-stat {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--fc-primary, #1e3c3c) 8%, white);
    color: var(--fc-primary, #1e3c3c);
}

.csb-highlight-stat span {
    font-size: 12px;
    font-weight: 700;
}

.csb-highlight-stat strong {
    font-size: 16px;
}

.csb-ai-summary {
    grid-column: 1 / -1;
}

.csb-muted {
    color: #94a3b8;
}

.csb-footer {
    padding: 16px 28px;
    background: #ffffff;
}

@media (max-width: 900px) {
    .candidate-sideboard-panel {
        width: min(680px, calc(100vw - 32px));
    }

    .csb-two-col,
    .csb-quick-grid,
    .csb-add-note-box,
    .csb-branch-edit-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .candidate-sideboard-panel {
        width: 100vw;
        max-width: 100vw;
    }

    .csb-header-main {
        align-items: flex-start;
        gap: 16px;
    }

    .csb-avatar-wrap,
    .csb-avatar-img,
    .csb-avatar-fallback {
        width: 72px;
        height: 72px;
    }

    .csb-title-block h2 {
        font-size: 24px;
    }

    .csb-section {
        margin: 10px;
        padding: 18px 16px;
    }

    .contact-copy-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}
