/* Client crew-viewer card design */

.cv-wrap {
    background: #f7f8fa;
    min-height: 100%;
    padding-bottom: 40px;
}

/* Header */
.cv-header {
    padding: 28px 32px 0 32px;
}

.cv-header .cv-eyebrow {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .06em;
    color: #6b7280;
    font-weight: 600;
    margin: 0;
}

.cv-header h1 {
    color: #2f6fed;
    font-size: 26px;
    font-weight: 800;
    margin: 4px 0 6px 0;
    line-height: 1.2;
}

.cv-header .cv-validity {
    color: #6b7280;
    font-size: 13px;
    margin: 0 0 18px 0;
}

/* Carousel */
.cv-carousel-outer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 32px 8px 32px;
    background: #eef0f4;
    border-radius: 18px;
    padding: 14px;
}

.cv-carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-behavior: smooth;
    flex: 1;
    padding: 2px;
}

.cv-carousel::-webkit-scrollbar { height: 6px; }
.cv-carousel::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

.cv-card {
    flex: 0 0 auto;
    width: 112px;
    text-align: center;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 12px 6px;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}

.cv-card:hover { background: #ffffff; }

.cv-card.active {
    background: #ffffff;
    border-color: #2f6fed;
    box-shadow: 0 2px 10px rgba(47,111,237,.18);
}

.cv-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #d1d5db;
    display: block;
    margin: 0 auto 8px auto;
    background: #fff;
}

.cv-card.active .cv-avatar { border-color: #2f6fed; }

.cv-name {
    font-weight: 700;
    font-size: 12px;
    color: #111827;
    text-transform: uppercase;
    line-height: 1.25;
}

.cv-rank {
    font-size: 10.5px;
    color: #8a93a3;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.cv-arrow {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #dfe2e8;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    font-size: 14px;
    user-select: none;
}

.cv-arrow:hover { background: #f3f4f6; }

/* Panels */
.cv-panel {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef0f3;
    box-shadow: 0 1px 3px rgba(17,24,39,.04);
    padding: 22px 26px;
    margin: 18px 32px;
}

.cv-panel-title {
    color: #2f6fed;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin: 0 0 16px 0;
}

.cv-profile-row {
    display: flex;
    gap: 22px;
    align-items: center;
    margin-bottom: 4px;
}

.cv-profile-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #eaf1ff;
    flex: 0 0 auto;
}

.cv-profile-meta .cv-profile-name {
    font-size: 19px;
    font-weight: 800;
    color: #111827;
}

.cv-profile-meta .cv-profile-rank {
    font-size: 13px;
    color: #2f6fed;
    font-weight: 600;
    margin-top: 2px;
}

/* Info grid (personal info / education / family) */
.cv-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
}

.cv-info-item.full { grid-column: 1 / -1; }

.cv-info-item label {
    display: block;
    font-size: 10.5px;
    color: #9aa1ad;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
    margin-bottom: 3px;
}

.cv-info-item .cv-val {
    font-size: 14px;
    color: #1f2430;
    font-weight: 500;
    min-height: 18px;
}

/* Document card grid */
.cv-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.cv-doc-card {
    border: 1px solid #eef0f3;
    border-radius: 12px;
    overflow: hidden;
    background: #fbfbfc;
    display: flex;
    flex-direction: column;
}

.cv-doc-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    background: #e9ecf1;
}

.cv-doc-thumb-empty {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c2c7d0;
    font-size: 30px;
    background: #e9ecf1;
}

.cv-doc-body { padding: 10px 12px 12px 12px; }

.cv-doc-name {
    font-weight: 700;
    font-size: 12px;
    color: #1f2430;
    text-transform: uppercase;
    margin-bottom: 5px;
    line-height: 1.3;
}

.cv-doc-status {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 3px;
}

.cv-doc-status.verified { color: #16a34a; }
.cv-doc-status.notverified { color: #b45309; }

.cv-doc-valid { font-size: 11px; color: #9aa1ad; }

.cv-empty-note {
    color: #9aa1ad;
    font-size: 13px;
    padding: 6px 0;
}

/* Clean table (dependents / sea service) */
.cv-table-wrap { overflow-x: auto; }

.cv-table {
    width: 100%;
    border-collapse: collapse;
}

.cv-table th {
    text-align: left;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #9aa1ad;
    font-weight: 700;
    padding: 8px 10px;
    border-bottom: 1px solid #eef0f3;
    white-space: nowrap;
}

.cv-table td {
    padding: 10px;
    font-size: 13px;
    color: #1f2430;
    border-bottom: 1px solid #f3f4f6;
    white-space: nowrap;
}

.cv-table tr:last-child td { border-bottom: none; }

@media (max-width: 768px) {
    .cv-info-grid { grid-template-columns: repeat(2, 1fr); }
    .cv-header, .cv-carousel-outer, .cv-panel { margin-left: 14px; margin-right: 14px; }
}

/* Document click targets */
.cv-doc-thumb, .cv-doc-thumb-empty { cursor: default; }
.cv-doc-thumb[data-cv-doc], .cv-doc-thumb-empty[data-cv-doc] { cursor: pointer; }

/* Document viewer modal */
.cv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .78);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.cv-modal-box {
    background: #ffffff;
    border-radius: 14px;
    max-width: 900px;
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cv-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #eef0f3;
}

.cv-modal-title {
    font-weight: 700;
    font-size: 13px;
    color: #1f2430;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.cv-modal-counter {
    font-size: 12px;
    color: #9aa1ad;
    white-space: nowrap;
}

.cv-modal-close {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    padding: 0 4px;
}

.cv-modal-close:hover { color: #111827; }

.cv-modal-body {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0f4;
    padding: 12px;
    min-height: 200px;
}

.cv-modal-body img {
    max-width: 100%;
    max-height: 76vh;
    display: block;
    margin: auto;
    border-radius: 4px;
}

.cv-modal-body iframe {
    width: 100%;
    height: 76vh;
    border: 0;
    background: #fff;
}

.cv-modal-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    color: #1f2430;
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
    z-index: 1001;
    user-select: none;
}

.cv-modal-arrow:hover { background: #ffffff; }

.cv-modal-prev { left: 24px; }
.cv-modal-next { right: 24px; }

@media (max-width: 600px) {
    .cv-modal-arrow { width: 36px; height: 36px; font-size: 18px; }
    .cv-modal-prev { left: 8px; }
    .cv-modal-next { right: 8px; }
}
