/*! JobsPost UI - Bootstrap 5.3 theme layer (layout from the SmartHRM template) */
:root {
    --jp-primary: #0f5c4d;
    --jp-primary-dark: #0a4238;
    --jp-accent: #f59f00;
    --jp-sidebar-w: 248px;
    --jp-navbar-h: 56px;
    --jp-tabbar-h: 62px;
    --bs-primary: #0f5c4d;
    --bs-primary-rgb: 15, 92, 77;
    --bs-primary-bg-subtle: #dcefe9;
    --bs-primary-text-emphasis: #0a4238;
    --bs-link-color: #0f5c4d;
    --bs-link-color-rgb: 15, 92, 77;
    --bs-link-hover-color-rgb: 10, 66, 56;
    --bs-body-font-family: "Inter", "Noto Sans Lao", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-bg: #f4f6f8;
}
.lang-lao { --bs-body-font-family: "Noto Sans Lao", "Inter", system-ui, sans-serif; line-height: 1.6; }
body { font-family: var(--bs-body-font-family); background: var(--bs-body-bg); }

.btn-primary { --bs-btn-bg: var(--jp-primary); --bs-btn-border-color: var(--jp-primary); --bs-btn-hover-bg: var(--jp-primary-dark); --bs-btn-hover-border-color: var(--jp-primary-dark); --bs-btn-active-bg: var(--jp-primary-dark); --bs-btn-active-border-color: var(--jp-primary-dark); --bs-btn-disabled-bg: var(--jp-primary); --bs-btn-disabled-border-color: var(--jp-primary); }
.btn-outline-primary { --bs-btn-color: var(--jp-primary); --bs-btn-border-color: var(--jp-primary); --bs-btn-hover-bg: var(--jp-primary); --bs-btn-hover-border-color: var(--jp-primary); --bs-btn-active-bg: var(--jp-primary); --bs-btn-active-border-color: var(--jp-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--jp-primary); --bs-nav-link-color: #3b4351; --bs-nav-link-hover-color: var(--jp-primary); }
.pagination { --bs-pagination-active-bg: var(--jp-primary); --bs-pagination-active-border-color: var(--jp-primary); --bs-pagination-color: var(--jp-primary); }
.form-control:focus, .form-select:focus { border-color: #7fb8ab; box-shadow: 0 0 0 .2rem rgba(15, 92, 77, .18); }
.card { border-radius: .85rem; --bs-card-bg: #fff; }
.form-control, .form-select { background-color: #fff; }
.form-control:disabled, .form-control[readonly] { background-color: #f1f3f5; }

/* ---------- navbar ---------- */
.jp-navbar { height: var(--jp-navbar-h); background: linear-gradient(90deg, var(--jp-primary-dark), var(--jp-primary)); box-shadow: 0 2px 8px rgba(0,0,0,.12); z-index: 1040; }
.jp-navbar .navbar-brand { color: #fff; }
.jp-logo { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--jp-primary); font-size: 1.05rem; }
.jp-logo-lg { width: 64px; height: 64px; border-radius: 18px; font-size: 2rem; background: var(--jp-primary); color: #fff; }
.jp-avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }
.jp-avatar-sm { width: 36px; height: 36px; background: var(--bs-primary-bg-subtle); color: var(--jp-primary); }

/* ---------- layout ---------- */
.jp-layout { display: flex; padding-top: var(--jp-navbar-h); min-height: 100vh; }
.jp-main { flex: 1; min-width: 0; padding: 1.25rem; padding-bottom: calc(var(--jp-tabbar-h) + 1.25rem); }
@media (min-width: 992px) {
    .jp-main { padding: 1.75rem 2rem; margin-left: var(--jp-sidebar-w); }
    .jp-sidebar { position: fixed; top: var(--jp-navbar-h); bottom: 0; left: 0; width: var(--jp-sidebar-w); overflow-y: auto; }
}
.jp-sidebar { background: #fff; border-right: 1px solid rgba(0,0,0,.06); }
.jp-sidebar .nav-link { display: flex; align-items: center; gap: .75rem; color: #3b4351; padding: .55rem 1.25rem; margin: 1px .6rem; border-radius: .5rem; font-weight: 500; font-size: .925rem; }
.jp-sidebar .nav-link i { font-size: 1.1rem; opacity: .75; }
.jp-sidebar .nav-link:hover { background: #f1f5f4; color: var(--jp-primary); }
.jp-sidebar .nav-link.active { background: var(--bs-primary-bg-subtle); color: var(--jp-primary); }
.jp-sidebar .nav-link.active i { opacity: 1; }
.jp-nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8a94a6; padding: 1rem 1.6rem .35rem; font-weight: 600; }

/* bottom tab bar (mobile) */
.jp-tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: var(--jp-tabbar-h); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid rgba(0,0,0,.08); display: flex; z-index: 1030; }
.jp-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: #7b8494; font-size: .7rem; gap: 2px; }
.jp-tabbar a i { font-size: 1.3rem; }
.jp-tabbar a.active { color: var(--jp-primary); font-weight: 600; }
.jp-toasts { z-index: 1090; margin-top: var(--jp-navbar-h); }

/* ---------- KPIs ---------- */
.jp-kpi { background: #fff; border-radius: .85rem; padding: 1rem 1.1rem; box-shadow: 0 1px 2px rgba(16,24,40,.06); height: 100%; color: inherit; }
.jp-kpi-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
.jp-kpi-value { font-size: 1.45rem; font-weight: 700; color: #111827; }
.jp-icon-pill { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; flex: none; }
.jp-hover { transition: transform .15s, box-shadow .15s; }
.jp-hover:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.25rem rgba(16,24,40,.1) !important; }
.jp-stat-label { font-size: .7rem; text-transform: uppercase; color: #8a94a6; letter-spacing: .04em; }
.jp-stat-value { font-size: 1rem; font-weight: 600; }

/* ---------- jobs ---------- */
.jp-badge-ft { background: var(--bs-primary-bg-subtle); color: var(--jp-primary-dark); }
.jp-badge-gig { background: #fff3d6; color: #8a5a00; }
.jp-job-card { border-top: 3px solid transparent !important; }
.jp-job-card.is-ft { border-top-color: var(--jp-primary) !important; }
.jp-job-card.is-gig { border-top-color: var(--jp-accent) !important; }
.jp-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jp-skill { display: inline-block; font-size: .75rem; padding: .15rem .55rem; margin: 0 .25rem .25rem 0; border-radius: 1rem; background: #eef2f1; color: #364152; border: 1px solid #dfe5e3; }
.jp-description { white-space: normal; line-height: 1.65; }
.jp-note { background: #f8faf9; border-radius: .5rem; padding: .6rem .75rem; max-height: 9.5rem; overflow-y: auto; }
.jp-search { min-width: 260px; }
.jp-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; font-weight: 600; }
.jp-code { background: #1f2933; color: #e4e7eb; padding: .75rem 1rem; border-radius: .5rem; white-space: pre-wrap; word-break: break-all; }

/* job type picker (posting form) */
.jp-type-card { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem; border: 2px solid #e3e8e6; border-radius: .85rem; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; height: 100%; }
.jp-type-card i { font-size: 1.6rem; color: var(--jp-primary); line-height: 1; }
.jp-type-card small { display: block; color: #6b7280; margin-top: .15rem; }
.btn-check:checked + .jp-type-card { border-color: var(--jp-primary); background: #f1f8f6; }
.btn-check:focus-visible + .jp-type-card { box-shadow: 0 0 0 .2rem rgba(15, 92, 77, .25); }
#pickGig + .jp-type-card i { color: #c47f00; }
.btn-check:checked#pickGig + .jp-type-card { border-color: var(--jp-accent); background: #fffaf0; }

/* ---------- developer credit ---------- */
.jp-credit { text-align: center; font-size: .8rem; padding: 1.5rem 0 .75rem; }
.jp-credit a { color: #7b8494; text-decoration: none; }
.jp-credit a:hover { color: #25d366; }

/* ---------- auth ---------- */
.auth-page { background: radial-gradient(1200px 600px at 10% -10%, #d6ece5 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #fff0cc 0, transparent 55%), #f4f6f8; }
.auth-wrap { min-height: calc(100vh - 3.5rem); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-card { width: 100%; max-width: 420px; border-radius: 1.25rem; }
.auth-card-wide { max-width: 560px; }
.jp-type-pick { line-height: 1.3; }
.btn-check:checked + .jp-type-pick small { color: rgba(255,255,255,.8) !important; }

@media (max-width: 575.98px) {
    .jp-search { min-width: 0; width: 100%; }
}
@media print { .jp-sidebar, .jp-navbar, .jp-tabbar, .no-print { display: none !important; } .jp-main { padding: 0 !important; margin: 0 !important; } }

/* ---------- maps (Leaflet) ---------- */
.jp-map { width: 100%; height: 260px; background: #e8eeec; z-index: 0; }
.jp-map-lg { height: calc(100vh - 290px); min-height: 420px; }
.jp-map-sm { height: 200px; }
.jp-map-picker { height: 300px; cursor: crosshair; }
.jp-coord { max-width: 150px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.jp-map-list { max-height: calc(100vh - 340px); min-height: 200px; overflow-y: auto; }
.jp-map-item.active-pin { background: var(--bs-primary-bg-subtle); border-left: 3px solid var(--jp-primary); }
.jp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .4rem; vertical-align: middle; }
.jp-dot-ft { background: var(--jp-primary); }
.jp-dot-gig { background: var(--jp-accent); }

.jp-pin-wrap { background: none; border: 0; }
.jp-pin { position: relative; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.jp-pin i { transform: rotate(45deg); font-size: .95rem; }
.jp-pin.is-ft { background: var(--jp-primary); }
.jp-pin.is-gig { background: var(--jp-accent); color: #3d2a00; }
.jp-me { display: block; width: 18px; height: 18px; border-radius: 50%; background: #1c7ed6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(28,126,214,.25); }
.jp-popup { min-width: 200px; }
.jp-popup a.fw-semibold { color: #111827; text-decoration: none; }
.leaflet-popup-content { margin: .75rem .9rem; font-family: var(--bs-body-font-family); }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background-color: rgba(15, 92, 77, .25); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background-color: rgba(15, 92, 77, .85); color: #fff; font-weight: 600; }
@media (max-width: 991.98px) {
    .jp-map-lg { height: 60vh; min-height: 320px; }
    .jp-map-list { max-height: none; }
}

/* ---------- featured (paid) postings ---------- */
.jp-badge-featured { background: #fff3bf; color: #7a5900; border: 1px solid #ffe066; }
.jp-job-card.is-featured { box-shadow: 0 0 0 2px #ffd43b, 0 1px 2px rgba(16,24,40,.06) !important; }
.jp-pin.is-featured { box-shadow: 0 0 0 3px #ffd43b, 0 2px 6px rgba(0,0,0,.35); }
.jp-pin-star { position: absolute; top: -8px; right: -8px; transform: rotate(45deg); color: #f59f00; font-size: .8rem; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }

/* ---------- wallet / revenue ---------- */
.jp-balance { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.jp-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.jp-amount.is-credit { color: #2b8a3e; }
.jp-amount.is-debit { color: #c92a2a; }
.jp-instructions { white-space: pre-line; background: #f8faf9; border-radius: .5rem; padding: .75rem 1rem; font-size: .9rem; }
.jp-bars { display: flex; align-items: flex-end; gap: .5rem; height: 140px; }
.jp-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: .7rem; color: #6b7280; }
.jp-bar span { display: block; width: 100%; max-width: 46px; background: var(--jp-primary); border-radius: .35rem .35rem 0 0; min-height: 2px; }

/* ---------- CV ---------- */
.jp-cv-row { border: 1px solid #e3e8e6; border-radius: .65rem; padding: .85rem; background: #fcfdfd; }
.jp-cv-head { border-bottom: 3px solid var(--jp-primary); }
.jp-timeline { border-left: 2px solid #dfe5e3; padding-left: 1rem; }
.jp-timeline-item { position: relative; padding-bottom: 1rem; }
.jp-timeline-item::before { content: ""; position: absolute; left: calc(-1rem - 6px); top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--jp-primary); }
.jp-locked { filter: blur(4px); user-select: none; }
.jp-cv-card .jp-clamp { -webkit-line-clamp: 2; }
@media print {
    .jp-cv-actions, .breadcrumb { display: none !important; }
    .card { box-shadow: none !important; border: 0 !important; }
}

/* ---------- CV photo + attachments ---------- */
.jp-photo { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; flex: none; background: var(--bs-primary-bg-subtle); color: var(--jp-primary); font-weight: 700; }
.jp-photo-sm { width: 36px; height: 36px; font-size: .9rem; }
.jp-photo-md { width: 48px; height: 48px; font-size: 1.1rem; }
.jp-photo-lg { width: 96px; height: 96px; font-size: 2.2rem; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--bs-primary-bg-subtle); }
.jp-attachment { display: block; border: 1px solid #e3e8e6; border-radius: .65rem; padding: .5rem; background: #fff; height: 100%; transition: box-shadow .15s; }
a.jp-attachment:hover { box-shadow: 0 .25rem .75rem rgba(16,24,40,.1); }
.jp-attachment.is-locked { background: #f8faf9; }
.jp-attachment-thumb { display: flex; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .45rem; background: #f1f5f4; }
.jp-attachment-icon { align-items: center; justify-content: center; font-size: 2.4rem; }
.jp-attachment-mini { width: 48px; height: 48px; object-fit: cover; border-radius: .4rem; flex: none; }
@media print { .jp-attachment.is-locked { display: none; } }
.jp-photo-controls { flex: 1 1 260px; min-width: 0; }
.list-group { --bs-list-group-bg: #fff; }

/* ---------- user manual ---------- */
.jp-manual { line-height: 1.7; }
.jp-manual h2 { font-size: 1.1rem; margin-top: 1.6rem; margin-bottom: .6rem; color: var(--jp-primary-dark); }
.jp-manual ol, .jp-manual ul { padding-left: 1.3rem; }
.jp-manual li { margin-bottom: .35rem; }
.jp-manual code { background: #f1f5f4; color: #0a4238; padding: .05rem .35rem; border-radius: .3rem; }
.jp-help-tip { background: #fff8e1; border-left: 4px solid var(--jp-accent); border-radius: .4rem; padding: .7rem .9rem; margin: 1rem 0; font-size: .95rem; }
.jp-manual-print { background: #fff; }
.jp-manual-doc { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.jp-manual-cover { text-align: center; padding: 2rem 0 1.5rem; border-bottom: 3px solid var(--jp-primary); margin-bottom: 1.5rem; }
.jp-manual-toc { margin-bottom: 2rem; }
.jp-manual-section { padding-top: 1.5rem; border-top: 1px solid #e3e8e6; margin-top: 1.5rem; }
@media print {
    .jp-manual-doc { padding: 0; max-width: none; }
    .jp-manual-section { break-before: page; border-top: 0; }
    .jp-manual a { color: inherit; text-decoration: none; }
    .jp-help-tip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.list-group { --bs-list-group-active-bg: var(--jp-primary); --bs-list-group-active-border-color: var(--jp-primary); }

/* ---------- public website (visitors) ---------- */
.jp-public { padding-top: var(--jp-navbar-h); min-height: calc(100vh - 3rem); }
.jp-hero { background: linear-gradient(135deg, var(--jp-primary-dark), var(--jp-primary) 60%, #1b8a72); }
.jp-hero-search .form-control { border: 0; }
.jp-hero-stat { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: .9rem .5rem; }
.jp-preview { position: relative; }
.jp-preview-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 2.2em; background: linear-gradient(rgba(255,255,255,0), #fff); }
.jp-login-box { background: var(--bs-primary-bg-subtle, #e7f1ef); border: 1px dashed rgba(15,92,77,.35); }
