/* ── Crew Connect Public Styles ─────────────────────────────────────────────── */

/* Search app */
.cc-search-app { font-family: inherit; }

.cc-filters {
    display: flex; flex-wrap: wrap; gap: 10px; padding: 16px;
    background: #f5f7fa; border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 20px;
}
.cc-filter-input, .cc-filter-select {
    flex: 1; min-width: 160px; padding: 9px 12px;
    border: 1px solid #ccc; border-radius: 6px; font-size: 14px; background: #fff;
}
.cc-advanced-filters {
    display: flex; flex-wrap: wrap; gap: 12px; padding: 14px;
    background: #f0f4f8; border: 1px solid #d0d8e4; border-radius: 8px; margin-bottom: 16px;
}
.cc-adv-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cc-adv-row label { font-weight: 600; color: #555; min-width: 160px; }
.cc-adv-row input, .cc-adv-row select { padding: 6px 10px; border: 1px solid #ccc; border-radius: 5px; }

.cc-btn-primary  { background: #0f4c81; color: #fff; border: none; padding: 9px 20px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s; }
.cc-btn-primary:hover { background: #0a3a60; }
.cc-btn-secondary { background: #e0e0e0; color: #333; border: none; padding: 9px 16px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.cc-btn-secondary:hover { background: #ccc; }

.cc-results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 14px; color: #666; }
.cc-view-btns { display: flex; gap: 6px; }
.cc-view-btn { padding: 4px 12px; border: 1px solid #ccc; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.cc-view-btn.active { background: #0f4c81; color: #fff; border-color: #0f4c81; }

.cc-loading { text-align: center; padding: 40px; color: #999; display: flex; align-items: center; justify-content: center; gap: 12px; }
.cc-spinner { width: 24px; height: 24px; border: 3px solid #ddd; border-top-color: #0f4c81; border-radius: 50%; animation: cc-spin .7s linear infinite; }
@keyframes cc-spin { to { transform: rotate(360deg); } }

.cc-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 20px; }
.cc-results.list { grid-template-columns: 1fr; }

.cc-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.06); transition: transform .15s, box-shadow .15s; }
.cc-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.cc-card-body { padding: 14px 16px; }
.cc-card-name { font-size: 16px; font-weight: 700; color: #0f4c81; margin: 0 0 4px; }
.cc-card-rank { font-size: 13px; color: #777; margin: 0 0 10px; }
.cc-card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; color: #777; }
.cc-card-actions { margin-top: 10px; display: flex; gap: 6px; }
.cc-card-actions a { font-size: 12px; padding: 4px 10px; border: 1px solid #0f4c81; color: #0f4c81; border-radius: 4px; text-decoration: none; }

.cc-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.cc-pg-btn { padding: 6px 14px; border: 1px solid #ccc; border-radius: 6px; background: #fff; cursor: pointer; font-size: 14px; transition: all .15s; }
.cc-pg-btn.active, .cc-pg-btn:hover { background: #0f4c81; color: #fff; border-color: #0f4c81; }

/* ── Seafarer Portal ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700&family=Source+Serif+4:wght@300;400;600&display=swap');

.cc-portal {
    font-family: 'Source Serif 4', Georgia, serif;
    background: #0B1929;
    color: #F5F5F0;
    border-radius: 12px;
    overflow: hidden;
    min-height: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
}

.cc-portal-nav {
    display: flex; background: #112236; border-bottom: 1px solid rgba(200,146,42,.2);
    padding: 0; overflow-x: auto; flex-wrap: wrap;
}
/* Two-row nav break */
.cc-nav-break {
    flex-basis: 100%; height: 1px;
    background: rgba(200,146,42,.12);
    display: block;
}
.cc-ptab {
    font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 600;
    letter-spacing: .8px; text-transform: uppercase; color: #8A9BB0;
    background: none; border: none; border-bottom: 3px solid transparent;
    padding: 14px 18px; cursor: pointer; transition: color .2s, border-color .2s; white-space: nowrap;
}
.cc-ptab:hover { color: #F5F5F0; }
.cc-ptab.active { color: #C8922A; border-bottom-color: #C8922A; }

.cc-ppanel { display: none; padding: 28px 32px; }
.cc-ppanel.active { display: block; }
.cc-ppanel h2, .cc-ppanel h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 20px; color: #F5F5F0; border-bottom: 1px solid rgba(200,146,42,.2); padding-bottom: 10px; }
.cc-ppanel h3 { font-size: 17px; }

.cc-portal-welcome { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.cc-portal-welcome h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 700; margin: 0 0 4px; border: none; padding: 0; }
.cc-portal-rank { font-family: monospace; font-size: 12px; color: #C8922A; letter-spacing: 1px; text-transform: uppercase; margin: 0; }

.cc-portal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 14px; margin-bottom: 24px; }
.cc-pcard { background: rgba(17,34,54,.8); border: 1px solid rgba(200,146,42,.2); border-radius: 6px; padding: 18px; }
.cc-pcard-label { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #8A9BB0; margin-bottom: 8px; }
.cc-pcard-value { font-family: 'Barlow Condensed', sans-serif; font-size: 32px; font-weight: 700; color: #F5F5F0; }
.cc-pbar-track { background: rgba(255,255,255,.1); border-radius: 3px; height: 6px; margin-top: 8px; }
.cc-pbar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #C8922A, #E0B05A); transition: width .4s; }

.cc-portal-field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 14px; margin-bottom: 20px; }
.cc-pfield { display: flex; flex-direction: column; gap: 5px; }
.cc-pfield label { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #D5E2EB; font-weight: 700; }
.cc-pfield input, .cc-pfield select, .cc-pfield textarea {
    background: #1A3350; border: 1px solid rgba(200,146,42,.2); border-radius: 6px;
    padding: 9px 12px; color: #F5F5F0; font-size: 14px; transition: border-color .2s;
}
.cc-pfield input:focus, .cc-pfield select:focus, .cc-pfield textarea:focus { outline: none; border-color: #C8922A; }
.cc-pfield select option { background: #112236; }

.cc-portal-btn {
    font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase; background: #C8922A; color: #0B1929;
    border: none; border-radius: 6px; padding: 10px 22px; cursor: pointer;
    transition: background .2s; display: inline-block; text-decoration: none;
}
.cc-portal-btn:hover { background: #E0B05A; }
.cc-portal-btn-sec {
    font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 600;
    letter-spacing: .8px; text-transform: uppercase; background: transparent;
    color: #8A9BB0; border: 1px solid rgba(200,146,42,.2); border-radius: 6px;
    padding: 10px 18px; cursor: pointer;
}

.cc-portal-alert { background: rgba(224,82,82,.12); border: 1px solid rgba(192,57,43,.5); border-radius: 6px; padding: 12px 16px; margin-bottom: 8px; font-size: 14px; color: #c0392b; }
.cc-portal-alert-warn { background: rgba(240,168,48,.12); border-color: rgba(200,120,20,.5); color: #7a4a00; }

.cc-cert-row, .cc-visa-row, .cc-avail-row, .cc-doc-row {
    background: rgba(17,34,54,.8); border: 1px solid rgba(200,146,42,.15); border-radius: 6px;
    padding: 12px 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 14px;
}
.cc-cert-row:hover { border-color: rgba(200,146,42,.4); }

.cc-position-card { background: rgba(17,34,54,.8); border: 1px solid rgba(200,146,42,.15); border-radius: 6px; padding: 18px; margin-bottom: 12px; }
.cc-position-title { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.cc-position-meta { font-family: monospace; font-size: 11px; color: #8A9BB0; margin-bottom: 8px; }

.cc-app-row { background: rgba(17,34,54,.8); border: 1px solid rgba(200,146,42,.15); border-radius: 6px; padding: 16px; margin-bottom: 10px; }
.cc-app-status { font-family: monospace; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; border-radius: 4px; }

@media (max-width: 680px) {
    .cc-ppanel { padding: 16px; }
    .cc-portal-cards { grid-template-columns: 1fr 1fr; }
    .cc-portal-field-grid { grid-template-columns: 1fr; }
    .cc-ptab { padding: 10px 12px; font-size: 11px; }
    .cc-results { grid-template-columns: 1fr; }
    /* On mobile: single scrollable row, hide the break */
    .cc-portal-nav { flex-wrap: nowrap; }
    .cc-nav-break { display: none; }
    .cc-rdash-nav { flex-wrap: nowrap !important; }
}

/* ── Light Mode overrides ─────────────────────────────────────────────────── */
/* Applied when the site or a wrapper element uses light mode */
body.cc-light .cc-portal,
.cc-light-mode .cc-portal,
[data-theme="light"] .cc-portal {
    background: #f4f6f9;
    color: #1a1a1a;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

body.cc-light .cc-portal-nav,
.cc-light-mode .cc-portal-nav,
[data-theme="light"] .cc-portal-nav {
    background: #e8ecf1;
    border-bottom-color: rgba(11,25,41,.15);
}

body.cc-light .cc-ptab,
.cc-light-mode .cc-ptab,
[data-theme="light"] .cc-ptab { color: #555; }

body.cc-light .cc-ptab:hover,
.cc-light-mode .cc-ptab:hover,
[data-theme="light"] .cc-ptab:hover { color: #0B1929; }

body.cc-light .cc-ptab.active,
.cc-light-mode .cc-ptab.active,
[data-theme="light"] .cc-ptab.active { color: #0B1929; border-bottom-color: #C8922A; }

body.cc-light .cc-ppanel h2,
body.cc-light .cc-ppanel h3,
.cc-light-mode .cc-ppanel h2,
.cc-light-mode .cc-ppanel h3,
[data-theme="light"] .cc-ppanel h2,
[data-theme="light"] .cc-ppanel h3 { color: #0B1929; border-bottom-color: rgba(11,25,41,.15); }

body.cc-light .cc-pcard,
.cc-light-mode .cc-pcard,
[data-theme="light"] .cc-pcard { background: #fff; border-color: rgba(11,25,41,.15); }

body.cc-light .cc-pcard-label,
.cc-light-mode .cc-pcard-label,
[data-theme="light"] .cc-pcard-label { color: #555; }

body.cc-light .cc-pcard-value,
.cc-light-mode .cc-pcard-value,
[data-theme="light"] .cc-pcard-value { color: #0B1929; }

body.cc-light .cc-pfield label,
.cc-light-mode .cc-pfield label,
[data-theme="light"] .cc-pfield label { color: #555; }

body.cc-light .cc-pfield input,
body.cc-light .cc-pfield select,
body.cc-light .cc-pfield textarea,
.cc-light-mode .cc-pfield input,
.cc-light-mode .cc-pfield select,
.cc-light-mode .cc-pfield textarea,
[data-theme="light"] .cc-pfield input,
[data-theme="light"] .cc-pfield select,
[data-theme="light"] .cc-pfield textarea {
    background: #fff;
    border-color: #ccc;
    color: #1a1a1a;
}

body.cc-light .cc-cert-row,
body.cc-light .cc-visa-row,
body.cc-light .cc-avail-row,
body.cc-light .cc-doc-row,
body.cc-light .cc-position-card,
body.cc-light .cc-app-row,
.cc-light-mode .cc-cert-row,
.cc-light-mode .cc-visa-row,
.cc-light-mode .cc-avail-row,
.cc-light-mode .cc-doc-row,
.cc-light-mode .cc-position-card,
.cc-light-mode .cc-app-row,
[data-theme="light"] .cc-cert-row,
[data-theme="light"] .cc-position-card {
    background: #fff;
    border-color: rgba(11,25,41,.12);
    color: #1a1a1a;
}

body.cc-light .cc-position-meta,
.cc-light-mode .cc-position-meta,
[data-theme="light"] .cc-position-meta { color: #555; }

/* Portal alerts in light mode */
body.cc-light .cc-portal-alert,
.cc-light-mode .cc-portal-alert,
[data-theme="light"] .cc-portal-alert {
    background: rgba(224,82,82,.12);
    border-color: rgba(192,57,43,.5);
    color: #c0392b;
}

body.cc-light .cc-portal-alert-warn,
.cc-light-mode .cc-portal-alert-warn,
[data-theme="light"] .cc-portal-alert-warn {
    background: rgba(240,168,48,.12);
    border-color: rgba(200,120,20,.5);
    color: #8a5600;
}

/* Jobs board in light mode */
body.cc-light .cc-card,
.cc-light-mode .cc-card,
[data-theme="light"] .cc-card {
    background: #fff;
    color: #1a1a1a;
}

body.cc-light .cc-card-name,
.cc-light-mode .cc-card-name,
[data-theme="light"] .cc-card-name { color: #0f4c81; }

body.cc-light .cc-card-rank,
body.cc-light .cc-card-meta,
.cc-light-mode .cc-card-rank,
.cc-light-mode .cc-card-meta,
[data-theme="light"] .cc-card-rank,
[data-theme="light"] .cc-card-meta { color: #444; }

/* ── Light Mode — Recruiter Dashboard (.cc-rdash) ────────────────────────── */
.cc-light-mode .cc-rdash,
[data-theme="light"] .cc-rdash {
    background: #f4f6f9;
    color: #1a1a1a;
}
.cc-light-mode .cc-rdash-topbar,
[data-theme="light"] .cc-rdash-topbar {
    background: #e0e6ef;
    border-bottom-color: rgba(11,25,41,.15);
}
.cc-light-mode .cc-rdash-nav,
[data-theme="light"] .cc-rdash-nav {
    background: #e8ecf1;
    border-bottom-color: rgba(11,25,41,.12);
}
.cc-light-mode .cc-rdtab,
[data-theme="light"] .cc-rdtab { color: #555; }
.cc-light-mode .cc-rdtab:hover,
[data-theme="light"] .cc-rdtab:hover { color: #0B1929; }
.cc-light-mode .cc-rdtab.active,
[data-theme="light"] .cc-rdtab.active { color: #0B1929; border-bottom-color: #C8922A; }
.cc-light-mode .cc-rdpanel,
[data-theme="light"] .cc-rdpanel { color: #1a1a1a; }
.cc-light-mode .cc-rdpanel h2,
.cc-light-mode .cc-rdpanel h3,
[data-theme="light"] .cc-rdpanel h2,
[data-theme="light"] .cc-rdpanel h3 { color: #0B1929; border-bottom-color: rgba(11,25,41,.15); }
.cc-light-mode .cc-rd-panel-box,
[data-theme="light"] .cc-rd-panel-box {
    background: #fff;
    border-color: rgba(11,25,41,.12);
    color: #1a1a1a;
}
.cc-light-mode .cc-rdash .cc-pfield input,
.cc-light-mode .cc-rdash .cc-pfield select,
[data-theme="light"] .cc-rdash .cc-pfield input,
[data-theme="light"] .cc-rdash .cc-pfield select {
    background: #fff;
    border-color: #ccc;
    color: #1a1a1a;
}
.cc-light-mode .cc-nav-break,
[data-theme="light"] .cc-nav-break {
    background: rgba(11,25,41,.1);
}

/* ── Analytics stat grid ─────────────────────────────────────────────────── */
/* Analytics stat grid (also used in recruiter dashboard frontend) */
.cc-stat-grid { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.cc-stat { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 20px 28px; text-align: center; min-width: 130px; box-shadow: 0 1px 4px rgba(0,0,0,.06); flex: 0 0 auto; }
.cc-stat-green  { border-top: 4px solid #2ECC8A; }
.cc-stat-blue   { border-top: 4px solid #1565c0; }
.cc-stat-orange { border-top: 4px solid #C8922A; }
.cc-stat-num    { font-size: 36px; font-weight: 700; color: #0B1929; line-height: 1; }
.cc-stat-label  { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: .5px; margin-top: 6px; }
