/* =====================================================
   HUDUD ALAFAKAR RECRUITMENT
   CUSTOMER CV PORTAL — V4.0
   File: css/cvs.css
===================================================== */

/* 01 — DESIGN TOKENS */

:root {
    --navy-950: #081b2d;
    --navy-900: #102b45;
    --navy-800: #173b59;
    --navy-700: #245575;
    --blue-600: #34749a;

    --gold-600: #a87a36;
    --gold-500: #c39a58;
    --gold-400: #e0bc7b;
    --gold-100: #fbf4e7;

    --white: #ffffff;
    --background: #f5f7fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;

    --text: #1c3041;
    --text-muted: #68798a;
    --border: #e1e8ee;

    --success: #18794e;
    --success-soft: #e8f6ee;
    --danger: #b42318;
    --danger-soft: #fff0ee;

    --shadow-sm: 0 4px 16px rgba(16, 43, 69, .05);
    --shadow-md: 0 12px 32px rgba(16, 43, 69, .09);
    --shadow-lg: 0 24px 65px rgba(16, 43, 69, .15);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --container: 1200px;
    --transition: .22s ease;

    --font-main: "Cairo", sans-serif;
}

/* 02 — GLOBAL */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
    overflow: hidden;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg,
canvas {
    max-width: 100%;
}

svg {
    display: block;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid var(--gold-500);
    outline-offset: 3px;
}

::selection {
    background: var(--gold-400);
    color: var(--navy-950);
}

.container {
    width: min(
        calc(100% - 36px),
        var(--container)
    );
    margin-inline: auto;
}

.page-content {
    padding-top: 42px;
    padding-bottom: 100px;
}

.section-heading {
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0;
    color: var(--navy-900);
    font-size: clamp(20px, 2.4vw, 27px);
    font-weight: 900;
}

.section-heading p {
    margin: 3px 0 0;
    color: var(--text-muted);
}

/* 03 — TOP NAVIGATION */

.topbar {
    position: relative;
    z-index: 20;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    color: var(--navy-900);
    font-size: clamp(15px, 2vw, 19px);
    font-weight: 900;
    letter-spacing: -.3px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--navy-700);
    font-weight: 800;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--gold-600);
}

/* 04 — HERO */

.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 75px 0 80px;
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(195, 154, 88, .16),
            transparent 34%
        ),
        linear-gradient(
            125deg,
            #081b2d 0%,
            #102b45 48%,
            #1b4667 100%
        );
    color: var(--white);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .35;
    background-image:
        linear-gradient(
            rgba(255,255,255,.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.035) 1px,
            transparent 1px
        );
    background-size: 45px 45px;
}

.hero::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    left: -180px;
    bottom: -260px;
    border: 1px solid rgba(224,188,123,.2);
    border-radius: 50%;
    box-shadow:
        0 0 0 55px rgba(224,188,123,.025),
        0 0 0 110px rgba(224,188,123,.025);
    pointer-events: none;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 15px;
    color: var(--gold-400);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .2px;
}

.hero h1 {
    max-width: 750px;
    margin: 0;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: -.8px;
}

.hero h1 #catalog-headline-accent {
    color: var(--gold-400);
}

.hero p {
    max-width: 620px;
    margin: 15px 0 0;
    color: #d7e2eb;
    font-size: clamp(14px, 1.8vw, 18px);
    line-height: 2;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 29px;
}

.hero-points span {
    padding: 7px 13px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 30px;
    background: rgba(255,255,255,.06);
    color: #e7edf3;
    font-size: 12px;
    font-weight: 700;
}

/* 05 — SERVICE TABS */

.service-section {
    margin-bottom: 42px;
}

.service-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.service-tab {
    display: flex;
    align-items: center;
    gap: 17px;
    min-width: 0;
    padding: 23px;
    text-align: right;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.service-tab:hover {
    transform: translateY(-3px);
    border-color: var(--gold-400);
    box-shadow: var(--shadow-md);
}

.service-tab.active {
    border-color: var(--gold-500);
    background:
        linear-gradient(
            145deg,
            #ffffff,
            #fcf8f0
        );
    box-shadow:
        inset 0 0 0 1px rgba(195,154,88,.15),
        var(--shadow-sm);
}

.service-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #edf3f7;
    color: var(--navy-800);
}

.service-tab.active .service-icon {
    background: var(--gold-100);
    color: var(--gold-600);
}

.service-icon svg {
    width: 28px;
    height: 28px;
}

.service-tab strong,
.service-tab small {
    display: block;
}

.service-tab strong {
    font-size: 17px;
    font-weight: 900;
}

.service-tab small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}

/* 06 — COUNTRY DIRECTORY */

.country-section {
    margin-bottom: 35px;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(
        4,
        minmax(0, 1fr)
    );
    gap: 13px;
}

.country-button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 82px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    text-align: right;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.country-button:hover {
    transform: translateY(-2px);
    border-color: var(--gold-500);
    box-shadow: var(--shadow-md);
}

.country-button.active {
    border-color: var(--gold-500);
    background: var(--gold-100);
    box-shadow:
        inset 0 0 0 1px rgba(195,154,88,.16);
}

.country-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 27px;
    line-height: 1;
}

.country-name {
    min-width: 0;
    flex: 1;
    font-weight: 800;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.country-count {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

/* 07 — STATISTICS */

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 36px;
}

.stats > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stats strong {
    color: var(--navy-800);
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 900;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

.stats span {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

/* 08 — FILTERS */

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    padding: 23px;
    margin-bottom: 23px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 175px;
}

.filter-field label {
    color: var(--navy-900);
    font-size: 12px;
    font-weight: 800;
}

.search-field {
    flex: 1 1 280px;
}

.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #d5dfe7;
    border-radius: var(--radius-sm);
    outline: none;
    background: #fff;
    color: var(--text);
    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(52,116,154,.12);
}

.search-wrapper {
    position: relative;
}

.search-wrapper svg {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-wrapper input {
    padding-right: 43px;
}

.advanced-filters {
    flex: 1 1 230px;
    min-width: 230px;
}

.advanced-filters summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: var(--navy-800);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.advanced-filters summary::-webkit-details-marker {
    display: none;
}

.advanced-filters summary::after {
    content: "⌄";
    font-size: 20px;
    line-height: 1;
    transition: transform var(--transition);
}

.advanced-filters[open] summary::after {
    transform: rotate(180deg);
}

.advanced-filter-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    padding-top: 16px;
}

.text-button {
    min-height: 48px;
    padding: 10px 15px;
    border: none;
    background: transparent;
    color: var(--navy-700);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.text-button:hover {
    color: var(--gold-600);
}

/* 09 — SMART GUIDE */

.smart-help {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 37px;
    padding: 21px 24px;
    border: 1px solid #d7e4ed;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(
            120deg,
            #eaf2f8,
            #ffffff
        );
    transition: all var(--transition);
}

.smart-help:hover {
    border-color: var(--gold-500);
    box-shadow: var(--shadow-md);
}

.smart-help-icon {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    border-radius: 14px;
    background: var(--navy-900);
    color: var(--gold-400);
    font-size: 25px;
}

.smart-help > div {
    flex: 1;
}

.smart-help strong,
.smart-help small {
    display: block;
}

.smart-help strong {
    color: var(--navy-900);
    font-size: 15px;
    font-weight: 900;
}

.smart-help small {
    color: var(--text-muted);
    font-size: 12px;
}

.smart-help-arrow {
    color: var(--gold-600);
    font-size: 25px;
}

/* 10 — RESULTS TOOLBAR */

.results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.results-heading h2 {
    margin: 0;
    color: var(--navy-900);
    font-size: clamp(19px, 2.5vw, 25px);
    font-weight: 900;
}

#results-count {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
}

.results-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
}

.view-button {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text-muted);
    transition: all var(--transition);
}

.view-button svg {
    width: 20px;
    height: 20px;
}

.view-button.active,
.view-button:hover {
    border-color: var(--navy-800);
    background: var(--navy-900);
    color: var(--white);
}

#cv-status {
    min-height: 25px;
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 12px;
}

#cv-status.error {
    color: var(--danger);
    font-weight: 800;
}

/* 11 — BUTTON SYSTEM */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 43px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
    text-align: center;
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--navy-900);
    color: var(--white);
    border-color: var(--navy-900);
}

.btn-primary:hover:not(:disabled) {
    background: var(--navy-700);
}

.btn-outline {
    background: var(--white);
    color: var(--navy-800);
    border-color: #d4e0e8;
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--navy-800);
    background: #f1f6f9;
}

.btn-gold {
    background: var(--gold-500);
    border-color: var(--gold-500);
    color: var(--navy-950);
}

.btn-gold:hover:not(:disabled) {
    background: var(--gold-400);
}

.btn-selected {
    background: var(--success-soft);
    border-color: #a9d8bd;
    color: var(--success);
}

/* 12 — CV GRID */

.cv-grid {
    display: grid;
    grid-template-columns: repeat(
        3,
        minmax(0, 1fr)
    );
    gap: 20px;
    align-items: start;
}

.cv-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.cv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #c9d9e5;
}

.cv-card.selected {
    border-color: var(--gold-500);
    box-shadow:
        0 0 0 1px rgba(195,154,88,.18),
        var(--shadow-md);
}

.card-top {
    padding: 17px 19px 19px;
    background:
        linear-gradient(
            145deg,
            #f7fafc,
            #eef4f8
        );
    border-bottom: 1px solid var(--border);
}

.card-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 17px;
}

.card-label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 25px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 10px;
    font-weight: 900;
}

.availability::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.profile-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.profile-symbol {
    display: grid;
    place-items: center;
    width: 90px;
    height: 115px;
    flex: 0 0 90px;
    padding: 20px;
    border: 1px solid #d7e2eb;
    border-radius: 14px;
    background: var(--white);
    color: #7693aa;
}

.profile-symbol svg {
    width: 100%;
    height: 100%;
}

.profile-title {
    min-width: 0;
    flex: 1;
}

.cv-name {
    margin: 0 0 9px;
    color: var(--navy-900);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.cv-nationality {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--navy-700);
    font-size: 12px;
    font-weight: 800;
}

.cv-nationality .country-flag {
    font-size: 22px;
}

.cv-number {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 10px;
    direction: ltr;
    text-align: right;
    overflow-wrap: anywhere;
}

.cv-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 19px 17px;
}

.cv-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-item {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #e8edf1;
    border-radius: 10px;
    background: var(--surface-soft);
}

.detail-label {
    display: block;
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
}

.detail-value {
    display: block;
    color: var(--navy-900);
    font-size: 12px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.cv-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: auto;
    padding-top: 19px;
}

.cv-actions .btn {
    width: 100%;
    min-width: 0;
}

.card-note {
    margin: 13px 0 0;
    color: var(--text-muted);
    font-size: 10px;
    text-align: center;
}

/* 13 — PDF THUMBNAIL */

.pdf-cover {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 108px;
    height: 143px;
    flex: 0 0 108px;
    overflow: hidden;
    padding: 5px;
    border: 1px solid #d5e0e8;
    border-radius: 11px;
    background: var(--white);
    color: var(--text-muted);
    box-shadow: 0 5px 15px rgba(16,43,69,.07);
    transition:
        transform var(--transition),
        border-color var(--transition);
}

.pdf-cover:hover {
    transform: translateY(-3px);
    border-color: var(--gold-500);
}

.pdf-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 111px;
    overflow: hidden;
    background: #f5f7f9;
    border-radius: 6px;
    font-size: 9px;
    text-align: center;
}

.pdf-thumb canvas,
.pdf-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pdf-caption {
    display: block;
    width: 100%;
    padding-top: 4px;
    color: var(--navy-700);
    font-size: 8px;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}

/* 14 — LIST VIEW */

.cv-grid.list-mode {
    grid-template-columns: 1fr;
}

.cv-grid.list-mode .cv-card {
    flex-direction: row;
}

.cv-grid.list-mode .card-top {
    width: 37%;
    flex: 0 0 37%;
    border-bottom: 0;
    border-left: 1px solid var(--border);
}

.cv-grid.list-mode .cv-info {
    flex: 1;
    justify-content: center;
}

.cv-grid.list-mode .cv-details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cv-grid.list-mode .cv-actions {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0;
}

.cv-grid.list-mode .cv-actions .btn {
    width: auto;
    min-width: 115px;
}

/* 15 — EMPTY / LOADING STATES */

.empty-state {
    grid-column: 1 / -1;
    padding: 55px 25px;
    border: 1px dashed #ccd9e3;
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
}

.empty-state h3 {
    margin: 0 0 9px;
    color: var(--navy-900);
    font-size: 19px;
}

.empty-state p {
    max-width: 440px;
    margin: 0 auto 23px;
    color: var(--text-muted);
    font-size: 13px;
}

.skeleton {
    height: 345px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(
            100deg,
            #e9eef2 20%,
            #f8fafb 40%,
            #e9eef2 60%
        );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    to {
        background-position-x: -200%;
    }
}

.load-more {
    display: flex;
    justify-content: center;
    padding: 33px 0 10px;
}

.load-more .btn {
    min-width: 180px;
}

/* 16 — CUSTOMER ASSURANCE */

.assurance {
    margin-top: 55px;
    padding: 38px 25px;
    border: 1px solid #d7e3eb;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(
            135deg,
            #edf4f8,
            #ffffff
        );
    text-align: center;
}

.assurance h3 {
    margin: 0 0 9px;
    color: var(--navy-900);
    font-size: 22px;
    font-weight: 900;
}

.assurance p {
    max-width: 650px;
    margin: 0 auto 23px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 2;
}

/* 17 — FLOATING SELECTION BAR */

.selection-bar {
    position: fixed;
    z-index: 60;
    right: 50%;
    bottom: 22px;
    transform: translateX(50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    width: min(calc(100% - 30px), 650px);
    padding: 16px 20px;
    border: 1px solid rgba(224,188,123,.4);
    border-radius: 18px;
    background: var(--navy-900);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.selection-bar strong,
.selection-bar small {
    display: block;
}

.selection-bar strong {
    font-size: 15px;
    font-weight: 900;
}

.selection-bar small {
    color: #d1dce5;
    font-size: 10px;
}

.selection-bar .btn {
    flex: 0 0 auto;
}

/* 18 — DIALOG */

#cv-dialog {
    position: fixed;
    width: min(calc(100% - 28px), 1000px);
    max-width: 1000px;
    max-height: min(90vh, 900px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 1px solid #d8e3eb;
    border-radius: var(--radius-xl);
    background: var(--white);
    color: var(--text);
    box-shadow: var(--shadow-lg);
}

#cv-dialog::backdrop {
    background: rgba(5, 18, 31, .76);
    backdrop-filter: blur(5px);
}

.dialog-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 76px;
    padding: 17px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
}

.dialog-header h2 {
    margin: 0;
    color: var(--navy-900);
    font-size: clamp(15px, 2.3vw, 20px);
    font-weight: 900;
}

#close-dialog {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--navy-900);
    font-size: 26px;
    line-height: 1;
}

#close-dialog:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

#dialog-content {
    padding: 23px;
}

.dialog-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 11px;
    margin-top: 22px;
}

/* 19 — PROFESSIONAL PROFILE SHEET */

.professional-sheet {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
}

.sheet-header {
    padding: 22px 25px;
    background:
        linear-gradient(
            125deg,
            var(--navy-900),
            var(--navy-700)
        );
    color: var(--white);
}

.sheet-header h3 {
    margin: 0;
    font-size: 21px;
    font-weight: 900;
}

.sheet-header small {
    display: block;
    margin-top: 4px;
    color: #d5e1eb;
    font-size: 11px;
    direction: ltr;
    text-align: right;
}

.sheet-body {
    padding: 23px;
}

.sheet-body > .profile-symbol {
    margin: 0 auto 20px;
}

.sheet-body .cv-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sheet-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

/* 20 — PDF VIEWER */

.pdf-viewer {
    width: 100%;
    min-width: 0;
    margin-bottom: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #e8edf2;
}

.pdf-controls {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
}

.pdf-controls button {
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--navy-900);
    font-size: 12px;
    font-weight: 800;
}

.pdf-controls button:hover:not(:disabled) {
    border-color: var(--gold-500);
    background: var(--gold-100);
}

.pdf-controls button:disabled {
    opacity: .4;
}

.pdf-controls span {
    color: var(--navy-900);
    font-size: 12px;
    font-weight: 800;
}

.pdf-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 200px;
    padding: 18px;
    overflow: auto;
}

.pdf-page canvas {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    background: var(--white);
    box-shadow: 0 6px 25px rgba(0,0,0,.14);
}

.pdf-viewer p {
    padding: 15px;
    text-align: center;
    color: var(--text-muted);
}

/* 21 — COMPARISON TABLE */

.compare-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.compare-table {
    width: 100%;
    min-width: 550px;
    border-collapse: collapse;
    background: var(--white);
    text-align: right;
}

.compare-table th,
.compare-table td {
    min-width: 125px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
    font-size: 12px;
    vertical-align: middle;
}

.compare-table th {
    background: var(--surface-soft);
    color: var(--navy-900);
    font-weight: 900;
}

.compare-table thead th {
    background: var(--navy-900);
    color: var(--white);
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
    border-bottom: none;
}

.compare-table .btn {
    min-height: 36px;
    padding: 7px 12px;
}

/* 22 — FOOTER */

.footer {
    padding: 32px 0;
    background: var(--navy-950);
    color: #d4e0e9;
    text-align: center;
}

.footer strong {
    display: block;
    margin-bottom: 5px;
    color: var(--white);
    font-size: 16px;
    font-weight: 900;
}

.footer p {
    margin: 0 0 8px;
    font-size: 12px;
}

.footer a {
    color: var(--gold-400);
    font-size: 12px;
    font-weight: 700;
}

.footer a:hover {
    text-decoration: underline;
}

/* 23 — TABLET */

@media (max-width: 1050px) {

    .country-grid {
        grid-template-columns: repeat(
            3,
            minmax(0, 1fr)
        );
    }

    .cv-grid {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }

    .filters {
        align-items: stretch;
    }

    .advanced-filters {
        flex-basis: 100%;
    }

    .cv-grid.list-mode .card-top {
        width: 43%;
        flex-basis: 43%;
    }
}

/* 24 — SMALL TABLET */

@media (max-width: 760px) {

    .container {
        width: min(
            calc(100% - 28px),
            var(--container)
        );
    }

    .nav-inner {
        min-height: 67px;
    }

    .hero {
        padding: 55px 0 60px;
    }

    .page-content {
        padding-top: 30px;
    }

    .service-tabs {
        gap: 12px;
    }

    .service-tab {
        padding: 16px;
        gap: 11px;
    }

    .service-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border-radius: 12px;
    }

    .service-icon svg {
        width: 23px;
        height: 23px;
    }

    .service-tab strong {
        font-size: 13px;
    }

    .service-tab small {
        font-size: 10px;
    }

    .country-grid {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }

    .stats {
        gap: 10px;
    }

    .stats > div {
        min-height: 100px;
        padding: 13px 8px;
    }

    .filters {
        padding: 17px;
    }

    .filter-field {
        flex: 1 1 100%;
        min-width: 0;
    }

    .advanced-filters {
        min-width: 0;
    }

    .cv-grid {
        gap: 14px;
    }

    .card-top {
        padding: 15px;
    }

    .cv-info {
        padding: 15px;
    }

    .profile-heading {
        gap: 10px;
    }

    .pdf-cover {
        width: 88px;
        height: 124px;
        flex-basis: 88px;
    }

    .pdf-thumb {
        height: 94px;
    }

    .profile-symbol {
        width: 75px;
        height: 100px;
        flex-basis: 75px;
    }

    .cv-name {
        font-size: 14px;
    }

    .cv-grid.list-mode .card-top {
        width: 45%;
        flex-basis: 45%;
    }

    .cv-grid.list-mode .cv-details {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }
}

/* 25 — MOBILE */

@media (max-width: 560px) {

    body {
        font-size: 13px;
    }

    .brand {
        font-size: 13px;
    }

    .back-link {
        font-size: 11px;
    }

    .hero {
        padding: 45px 0 52px;
    }

    .hero h1 {
        font-size: clamp(29px, 8vw, 37px);
    }

    .hero p {
        font-size: 13px;
    }

    .hero-points {
        gap: 7px;
        margin-top: 22px;
    }

    .hero-points span {
        padding: 5px 9px;
        font-size: 10px;
    }

    .service-section,
    .country-section {
        margin-bottom: 29px;
    }

    .service-tabs {
        grid-template-columns: 1fr;
    }

    .service-tab {
        min-height: 80px;
    }

    .country-grid {
        gap: 9px;
    }

    .country-button {
        min-height: 70px;
        padding: 10px;
        gap: 7px;
    }

    .country-flag {
        font-size: 22px;
    }

    .country-name {
        font-size: 11px;
    }

    .country-count {
        font-size: 9px;
    }

    .stats {
        margin-bottom: 26px;
    }

    .stats strong {
        font-size: 24px;
    }

    .stats span {
        font-size: 10px;
    }

    .advanced-filter-content {
        grid-template-columns: 1fr;
    }

    .smart-help {
        padding: 15px;
        gap: 10px;
    }

    .smart-help-icon {
        width: 39px;
        height: 39px;
        flex-basis: 39px;
    }

    .smart-help strong {
        font-size: 13px;
    }

    .smart-help small {
        font-size: 10px;
    }

    .results-heading {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    .results-toolbar {
        width: 100%;
    }

    .results-toolbar #refresh-cvs {
        margin-right: auto;
    }

    .cv-grid,
    .cv-grid.list-mode {
        grid-template-columns: 1fr;
    }

    .cv-grid.list-mode .cv-card {
        flex-direction: column;
    }

    .cv-grid.list-mode .card-top {
        width: 100%;
        flex-basis: auto;
        border-left: none;
        border-bottom: 1px solid var(--border);
    }

    .cv-grid.list-mode .cv-info {
        width: 100%;
    }

    .cv-grid.list-mode .cv-actions {
        display: grid;
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }

    .cv-grid.list-mode .cv-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .cv-card {
        border-radius: 18px;
    }

    .profile-heading {
        gap: 17px;
    }

    .pdf-cover {
        width: 108px;
        height: 143px;
        flex-basis: 108px;
    }

    .pdf-thumb {
        height: 111px;
    }

    .profile-symbol {
        width: 90px;
        height: 115px;
        flex-basis: 90px;
    }

    .cv-name {
        font-size: 16px;
    }

    .cv-details {
        gap: 9px;
    }

    .cv-actions {
        gap: 8px;
    }

    .selection-bar {
        bottom: 10px;
        padding: 12px;
        gap: 10px;
    }

    .selection-bar strong {
        font-size: 12px;
    }

    .selection-bar small {
        font-size: 9px;
    }

    .selection-bar .btn {
        padding: 9px 12px;
        font-size: 10px;
    }

    #cv-dialog {
        width: calc(100% - 12px);
        max-height: 94vh;
        border-radius: 17px;
    }

    .dialog-header {
        min-height: 65px;
        padding: 12px 15px;
    }

    #dialog-content {
        padding: 13px;
    }

    .sheet-header {
        padding: 16px;
    }

    .sheet-header h3 {
        font-size: 17px;
    }

    .sheet-body {
        padding: 14px;
    }

    .sheet-body .cv-details {
        grid-template-columns: 1fr;
    }

    .dialog-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .dialog-actions .btn {
        width: 100%;
    }

    .pdf-page {
        padding: 8px;
    }

    .pdf-controls {
        gap: 5px;
        padding: 9px;
    }

    .pdf-controls button {
        padding: 6px 8px;
        font-size: 10px;
    }

    .assurance {
        margin-top: 40px;
        padding: 28px 18px;
    }

    .assurance h3 {
        font-size: 19px;
    }

    .footer {
        padding-bottom: 35px;
    }
}

/* 26 — ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* 27 — PRINT */

@media print {

    .topbar,
    .hero,
    .service-section,
    .filters,
    .smart-help,
    .results-toolbar,
    .selection-bar,
    .load-more,
    .footer,
    .dialog-actions {
        display: none !important;
    }

    body {
        background: white;
    }

    .cv-card,
    .professional-sheet {
        box-shadow: none;
        break-inside: avoid;
    }

    .cv-grid {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }
}

/* =====================================================
   END OF CUSTOMER CV PORTAL CSS V4.0
===================================================== */

/* ==================================================
   PREMIUM CV CARD V1
   Independent design layer
   ================================================== */

.cv-card.cv-card-premium {
    --premium-navy: #102c49;
    --premium-blue: #17486f;
    --premium-gold: #d8a74d;

    position: relative;
    overflow: hidden;
    border: 1px solid #d8e3ed;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(16, 44, 73, .09);
    transition: transform .25s ease, box-shadow .25s ease;
}

.cv-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(16, 44, 73, .15);
}

.cv-card-premium.selected {
    border-color: var(--premium-gold);
}

/* Navy header */

.cv-card-premium .premium-top {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 20px;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 15% 5%,
            rgba(216, 167, 77, .25),
            transparent 45%
        ),
        linear-gradient(
            135deg,
            #17486f,
            #102c49 75%
        );
}

/* Subtle decorative watermark */

.cv-card-premium .premium-top::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    left: -65px;
    bottom: -85px;
    border: 1px solid rgba(216, 167, 77, .25);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.cv-card-premium .premium-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.cv-card-premium .availability {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #b6f3d0;
    background: rgba(8, 95, 67, .35);
    border: 1px solid rgba(112, 230, 172, .3);
    font-size: 12px;
    font-weight: 700;
}

.cv-card-premium .premium-code {
    direction: ltr;
    unicode-bidi: isolate;
    font-size: 10px;
    color: rgba(255, 255, 255, .68);
    overflow-wrap: anywhere;
}

/* Preview + identity */

.cv-card-premium .premium-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    direction: ltr;
}

.cv-card-premium .premium-cover {
    min-width: 0;
}

.cv-card-premium .premium-cover .pdf-cover {
    width: 100%;
    margin: 0;
}

.cv-card-premium .premium-cover .pdf-thumb {
    width: 100%;
}

.cv-card-premium .premium-title {
    min-width: 0;
    direction: rtl;
    text-align: right;
}

.cv-card-premium .cv-name {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(17px, 1.5vw, 22px);
    line-height: 1.5;
    font-weight: 800;
}

.cv-card-premium .premium-nationality {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f4d18d;
    font-size: 15px;
    font-weight: 700;
}

/* Information area */

.cv-card-premium .premium-info {
    padding: 18px;
    background: #ffffff;
}

.cv-card-premium .premium-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.cv-card-premium .premium-details .detail-item {
    min-width: 0;
    border: 1px solid #e7edf3;
    border-radius: 12px;
    padding: 12px;
    background: #f6f9fc;
}

/* Actions */

.cv-card-premium .premium-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cv-card-premium .premium-actions .btn {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
}

.cv-card-premium .premium-actions [data-action="details"] {
    background: linear-gradient(
        135deg,
        #eac77e,
        #c99535
    );
    color: #102c49;
    border-color: #d4a347;
}

.cv-card-premium .premium-actions [data-action="details"]:hover {
    filter: brightness(1.05);
}

.cv-card-premium .card-note {
    margin-top: 14px;
    text-align: center;
    color: #718399;
    font-size: 11px;
}

/* Mobile */

@media (max-width: 560px) {
    .cv-card-premium .premium-top {
        padding: 17px;
    }

    .cv-card-premium .premium-heading {
        gap: 12px;
    }

    .cv-card-premium .cv-name {
        font-size: 18px;
    }

    .cv-card-premium .premium-info {
        padding: 14px;
    }

    .cv-card-premium .premium-actions {
        gap: 8px;
    }

    .cv-card-premium .premium-actions .btn {
        font-size: 11px;
        padding: 10px 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cv-card-premium {
        transition: none;
    }

    .cv-card-premium:hover {
        transform: none;
    }
}

/* Keep the published CV page visible before opening the dossier. */
.cv-card-premium .premium-title {
    position: relative;
    min-block-size: 46px;
    padding-inline-end: 56px;
}

.cv-card-premium .premium-title::after {
    content: "";
    position: absolute;
    inset-inline-end: 0;
    inset-block-start: 0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f2f6fa var(--studio-logo, url("../images/company-logo-mark.png")) center / 34px auto no-repeat;
    display: var(--studio-logo-display, block);
}

.cv-card-premium.has-document-cover .premium-cover .pdf-cover {
    display: grid;
    height: auto;
    padding: 7px;
    border-radius: 12px;
    background: #f4f7fa;
}

.cv-card-premium.has-document-cover .premium-cover .pdf-thumb {
    aspect-ratio: 210 / 297;
    height: auto;
    background: #ffffff;
}

.cv-card-premium.has-document-cover .premium-cover .pdf-thumb canvas,
.cv-card-premium.has-document-cover .premium-cover .pdf-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cv-card-premium.has-document-cover .premium-cover .pdf-caption {
    padding: 6px 4px 2px;
    font-size: 12px;
}

.cv-card-premium.has-document-cover .premium-cover .pdf-cover:focus-visible {
    outline: 3px solid #f4d18d;
    outline-offset: 3px;
}

.country-flag img {
    width: 1.15em;
    height: .8em;
    display: block;
    object-fit: cover;
    border-radius: 3px;
}


/* =====================================================
   طبقة القراءة على الجوال (2026-11-28)
   الهدف: لا يقل أي نص عن 12px، والأزرار والروابط سهلة اللمس (44px).
   مكانها آخر الملف عمدًا لتعلو على ما قبلها دون تعديل التصميم الأصلي.
   للتراجع: احذف هذه الكتلة فقط.
===================================================== */
@media (max-width: 640px) {
    .back-link { font-size: 13px; display: inline-flex; align-items: center; min-height: 44px; }
    .hero-points span { font-size: 12px; }
    .country-button .country-name { font-size: 12.5px; }
    .country-button .country-count { font-size: 11px; }
    .stats span, .stats small { font-size: 12px; }
    .cv-card-premium .premium-code { font-size: 11px; }
    .service-tab small,
    .smart-help small { font-size: 12px; }
    .detail-item .detail-label { font-size: 12px; }
    .cv-info .card-note { font-size: 12.5px; }
    .cv-actions .btn,
    .cv-card-premium .premium-actions .btn { font-size: 14px; min-height: 46px; }
    a.brand { min-height: 44px; display: inline-flex; align-items: center; }
}


/* =====================================================
   بطاقة السيرة المختصرة على الجوال (2026-11-29)
   الفكرة: مثل متاجر الإعلانات المبوبة، العميل يشوف أكثر من سيرة في الشاشة.
   - المعاينة تعرض الجزء العلوي من الملف (الصورة والبيانات الأساسية)
     بارتفاع ثابت مع تلاشٍ، والملف الكامل يفتح بالضغط كما هو.
   - التفاصيل خانات مدمجة، والمسافات أقل.
   الكمبيوتر لا يتأثر. للتراجع: احذف هذه الكتلة فقط.
===================================================== */
@media (max-width: 640px) {
    .cv-card-premium .premium-top { padding: 14px 14px 12px; }
    .cv-card-premium .premium-topline { margin-bottom: 8px; }
    .cv-card-premium .premium-heading { gap: 10px; }
    .cv-card-premium .premium-title { min-block-size: 40px; padding-inline-end: 48px; }
    .cv-card-premium .premium-title::after { width: 38px; height: 38px; background-size: 30px auto; }
    .cv-card-premium .cv-name { margin-bottom: 4px; font-size: 17px; }
    .cv-card-premium .premium-nationality { font-size: 14px; }

    /* معاينة مقصوصة من أعلى الملف */
    .cv-card-premium.has-document-cover .premium-cover .pdf-cover { padding: 5px; }
    .cv-card-premium.has-document-cover .premium-cover .pdf-cover {
        position: relative;
        display: block;
    }
    .cv-card-premium.has-document-cover .premium-cover .pdf-thumb {
        position: relative;
        display: block;
        aspect-ratio: auto;
        height: clamp(165px, 48vw, 215px);
        overflow: hidden;
        border-radius: 8px;
    }
    .cv-card-premium.has-document-cover .premium-cover .pdf-thumb canvas,
    .cv-card-premium.has-document-cover .premium-cover .pdf-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top center;
    }
    .cv-card-premium.has-document-cover .premium-cover .pdf-thumb::after {
        content: "";
        position: absolute;
        inset: auto 0 0 0;
        height: 45%;
        background: linear-gradient(to bottom, rgba(16, 44, 73, 0), rgba(16, 44, 73, .55));
        pointer-events: none;
    }
    /* زر التكبير فوق المعاينة */
    .cv-card-premium.has-document-cover .premium-cover .pdf-caption {
        position: absolute;
        z-index: 1;
        bottom: 14px;
        left: 50%;
        right: auto;
        width: auto;
        transform: translateX(-50%);
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 36px;
        padding: 0 14px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .95);
        box-shadow: 0 6px 18px rgba(16, 44, 73, .25);
        color: #102c49;
        font-size: 13px;
        font-weight: 800;
        white-space: nowrap;
    }
    .cv-card-premium.has-document-cover .premium-cover .pdf-caption::before {
        content: "⤢";
        font-size: 15px;
        line-height: 1;
    }

    /* تفاصيل مدمجة */
    .cv-card-premium .premium-info { padding: 12px; }
    .cv-card-premium .premium-details { gap: 6px; margin-bottom: 12px; }
    .cv-card-premium .premium-details .detail-item { padding: 7px 10px; border-radius: 10px; }
    .cv-card-premium .premium-details .detail-label { margin-bottom: 1px; font-size: 11.5px; }
    .cv-card-premium .premium-details .detail-value { font-size: 13px; line-height: 1.5; }
    .cv-card-premium .card-note { margin-top: 8px; }

    /* دول العمل السابقة: سطر واحد بعرض البطاقة */
    .cv-card-premium .premium-details .cv-work-experience { grid-column: 1 / -1; }
    .cv-card-premium .premium-details .cv-work-experience .detail-value {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 14px;
    }
    .cv-card-premium .premium-details .cv-work-experience-row { display: inline-flex; gap: 6px; }
}


/* =====================================================
   بطاقة التعريف المختصرة (cardStyle: "profile") — 2026-11-29
   نفس ألوان الشركة (الكحلي والذهبي) وشعارها.
   للرجوع للشكل السابق: في js/cvs.js غيّر cardStyle إلى "classic"،
   أو استخدم نسخة backups/restore-2026-11-29-before-profile-card.
===================================================== */
.cv-card.cv-card-profile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e3eaf2;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(16, 44, 73, .08);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cv-card-profile:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(16, 44, 73, .13); }
.cv-card-profile.selected { border-color: #d8a74d; box-shadow: 0 0 0 2px rgba(216, 167, 77, .35), 0 12px 30px rgba(16, 44, 73, .1); }

.cv-card-profile .profile-top { display: flex; gap: 12px; align-items: stretch; }

.cv-card-profile .profile-media {
    flex: 0 0 132px;
    width: 132px;
    height: 178px;
    align-self: flex-start;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #17486f, #102c49 75%);
}
.cv-card-profile .profile-cover {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: #f4f7fa;
    cursor: zoom-in;
}
.cv-card-profile .profile-cover .pdf-thumb {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: #ffffff;
    font-size: 10px;
    color: #61778b;
}
.cv-card-profile .profile-cover .pdf-thumb canvas,
.cv-card-profile .profile-cover .pdf-thumb img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: top center;
}
.cv-card-profile .profile-cover .pdf-caption {
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(16, 44, 73, .88);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.cv-card-profile .profile-cover .pdf-caption::before { content: "⤢"; font-size: 12px; }
.cv-card-profile .profile-cover:focus-visible { outline: 3px solid #d8a74d; outline-offset: 2px; }

.cv-card-profile .profile-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #f4d18d;
    font-size: 12px;
    font-weight: 800;
}
.cv-card-profile .profile-placeholder .country-flag { font-size: 34px; }
.cv-card-profile .profile-placeholder .country-flag img { width: 46px; height: 31px; border-radius: 5px; }

.cv-card-profile .profile-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cv-card-profile .profile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cv-card-profile .profile-name { margin: 0; color: #102c49; font-size: 17px; font-weight: 900; line-height: 1.4; }
.cv-card-profile .profile-status {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 11px;
    font-weight: 900;
}
.cv-card-profile .profile-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cv-card-profile .profile-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; color: #385671; font-size: 14px; font-weight: 700; }
.cv-card-profile .profile-meta .country-flag img { width: 1.25em; height: .85em; }
.cv-card-profile .profile-age { margin: 0; color: #475e73; font-size: 13px; font-weight: 600; }
.cv-card-profile .profile-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.cv-card-profile .profile-price strong { color: #b07d22; font-size: 16px; font-weight: 900; }
.cv-card-profile .profile-price span { color: #61778b; font-size: 12px; font-weight: 700; }
.cv-card-profile .profile-arrival { margin: 0; color: #17486f; font-size: 12.5px; font-weight: 700; }

.cv-card-profile .profile-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-card-profile .profile-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 11px;
    border-radius: 999px;
    background: #f2f6fa;
    color: #385671;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.5;
}
.cv-card-profile .profile-chip.is-strong { background: #e8f0f8; color: #102c49; }

.cv-card-profile .profile-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cv-card-profile .profile-actions .btn { width: 100%; min-height: 46px; border-radius: 12px; font-size: 14px; font-weight: 800; }
.cv-card-profile .profile-actions [data-action="details"] { background: linear-gradient(135deg, #eac77e, #c99535); border-color: #d4a347; color: #102c49; }
.cv-card-profile .profile-actions [data-action="details"]:hover { filter: brightness(1.05); }

.cv-card-profile .profile-foot { display: flex; align-items: center; gap: 8px; color: #8597a8; font-size: 11px; }
.cv-card-profile .profile-logo {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #f2f6fa var(--studio-logo, url("../images/company-logo-mark.png")) center / 18px auto no-repeat;
    display: var(--studio-logo-display, block);
}
.cv-card-profile .profile-note { flex: 1; }
.cv-card-profile .profile-code { direction: ltr; font-size: 10.5px; letter-spacing: .02em; }

.cv-grid.list-mode .cv-card-profile { flex-direction: column; }

@media (max-width: 640px) {
    .cv-card.cv-card-profile { padding: 12px; gap: 10px; border-radius: 16px; }
    .cv-card-profile .profile-media { flex-basis: clamp(108px, 32%, 148px); width: clamp(108px, 32%, 148px); height: clamp(148px, 42vw, 192px); }
    .cv-card-profile .profile-cover,
    .cv-card-profile .profile-placeholder { min-height: 0; height: 100%; }
    .cv-card-profile .profile-name { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .cv-card-profile, .cv-card-profile:hover { transition: none; transform: none; }
}


/* بطاقة التعريف: زر واتساب وسطر الطمأنة (يُتحكم بهما من «عرض السير الذاتية») */
.cv-card-profile .profile-actions.has-whatsapp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 46px; }
.cv-card-profile .profile-actions .profile-whatsapp {
    width: 46px;
    min-width: 46px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #25d366 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2Zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2Zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8-.2-.1-.4-.1-.6.1l-.8 1c-.1.2-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.2-.4.7-1.4.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.7 11.9 11.9 0 0 0 4.6 4c1.7.7 2.4.8 3.2.7.5-.1 1.5-.6 1.8-1.2.2-.6.2-1.1.1-1.2l-.5-.3Z'/%3E%3C/svg%3E") center / 24px no-repeat;
}
.cv-card-profile .profile-actions .profile-whatsapp:hover { filter: brightness(.95); }
.cv-card-profile .profile-trust {
    margin: 0;
    padding: 7px 10px;
    border: 1px solid #dbe6f1;
    border-radius: 10px;
    background: #f5f9fd;
    color: #17486f;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
}

/* مساحة تمرير إضافية عند ظهور شريط الاختيارات على الجوال. */
@media (max-width: 640px) {
    .cv-grid,
    .cv-grid.list-mode {
        grid-template-columns: minmax(0, 1fr);
    }

    .cv-card-profile .profile-actions .btn {
        padding-inline: 6px;
        line-height: 1.35;
    }

    body:has(.selection-bar:not([hidden])) {
        padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
    }
    .selection-bar { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
    .cv-card-profile .profile-actions .profile-whatsapp { min-height: 44px; }
}