/* ==========================================================
   GTX Jobs – Design system (Glovetex purple)
   ========================================================== */
:root {
  --brand: #4B1F7A;
  --brand-600: color-mix(in srgb, var(--brand) 85%, #000);
  --brand-50: color-mix(in srgb, var(--brand) 7%, #fff);
  --brand-100: color-mix(in srgb, var(--brand) 14%, #fff);
  --ink: #1d1b22;
  --muted: #6b6775;
  --line: #ece8f1;
  --soft: #f7f5fa;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30, 10, 60, .04), 0 6px 24px rgba(30, 10, 60, .06);
  --bs-body-font-family: 'Prompt', 'Sarabun', system-ui, sans-serif;
  --bs-link-color-rgb: 75, 31, 122;
  --bs-primary: var(--brand);
}
body { font-family: var(--bs-body-font-family); color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
.text-brand { color: var(--brand) !important; }
.bg-brand { background: var(--brand) !important; color: #fff; }
.form-label { font-weight: 500; font-size: .9rem; margin-bottom: .3rem; }
.form-label.req::after { content: ' *'; color: #dc3545; }
.form-control, .form-select { border-radius: 10px; border-color: #ddd6e6; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 18%, transparent); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.btn { border-radius: 10px; font-weight: 500; }
.btn-brand { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.btn-outline-brand { color: var(--brand); border: 1px solid var(--brand); background: #fff; }
.btn-outline-brand:hover, .btn-outline-brand.on, .btn-check:checked + .btn-outline-brand { background: var(--brand); color: #fff; }
.btn-icon { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--ink); font-size: 1.2rem; }
.btn-icon:hover { background: var(--brand-50); color: var(--brand); }
.border-dashed { border-style: dashed !important; }
.page-link { color: var(--brand); border-radius: 8px !important; margin: 0 2px; border: 0; }
.active > .page-link { background: var(--brand); }
.alert-brand { background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand); border-radius: var(--radius); }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-100); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .9rem; flex-shrink: 0; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-100); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 1.6rem; object-fit: cover; }

/* ---------- Badges ---------- */
.type-badge { background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); font-weight: 500; border: 1px solid color-mix(in srgb, var(--c) 25%, #fff); }
.status-badge { background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); font-weight: 500; }
.badge-urgent { background: #fdecec; color: #c62828; font-weight: 500; }
.badge-featured { background: #fff6e0; color: #b7791f; font-weight: 500; }
.role-admin { background: #fde8e8; color: #b91c1c; } .role-hr { background: var(--brand-100); color: var(--brand); } .role-candidate { background: #e8f3ff; color: #0b61c4; }

/* ---------- Public nav ---------- */
.site-nav { box-shadow: 0 1px 0 var(--line); padding: .6rem 0; }
.site-nav .nav-link { font-weight: 500; color: var(--ink); padding: .5rem .25rem !important; position: relative; }
.site-nav .nav-link.active, .site-nav .nav-link:hover { color: var(--brand); }
.site-nav .nav-link.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--brand); border-radius: 2px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 2px; }
.lang-switch a { padding: 2px 10px; border-radius: 99px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.lang-switch a.on { background: var(--brand); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 110px 0 120px; color: #fff; overflow: hidden;
  background: radial-gradient(1200px 500px at 90% -10%, color-mix(in srgb, var(--brand) 55%, #c9a8ff) 0, transparent 60%), linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 70%, #000) 100%); }
.hero.has-img { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 92%, transparent) 0%, color-mix(in srgb, var(--brand) 55%, transparent) 60%, transparent 100%), var(--hero-img) center/cover; }
.hero::after { content: ''; position: absolute; right: -120px; bottom: -160px; width: 480px; height: 480px; border-radius: 50%; border: 60px solid rgba(255,255,255,.06); }
.hero-kicker { display: inline-block; background: rgba(255,255,255,.15); backdrop-filter: blur(4px); padding: 6px 14px; border-radius: 99px; font-size: .9rem; margin-bottom: 1rem; }
.hero-title { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; line-height: 1.15; margin-bottom: 1rem; }
.hero-sub { font-size: 1.15rem; opacity: .9; max-width: 640px; }
.hero-search { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 16px; padding: 8px 8px 8px 18px; margin-top: 2rem; max-width: 720px; box-shadow: 0 10px 40px rgba(0,0,0,.18); }
.hero-search > i { color: var(--muted); }
.hero-search .form-control, .hero-search .form-select { border: 0; box-shadow: none !important; }
.hero-search .form-select { max-width: 200px; border-left: 1px solid var(--line); border-radius: 0; }
.hero-search .btn { padding: .65rem 1.6rem; }

/* ---------- Sections ---------- */
.section-title { font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--ink); }
.section-soft { background: var(--soft); }
.section-brand { background: var(--brand); color: #fff; }
.section-brand .section-title, .section-brand .text-muted { color: #fff !important; }
.rich { line-height: 1.85; }
.rich ul, .rich ol { padding-left: 1.3rem; }
.rich li { margin-bottom: .25rem; }
.stats-band { background: var(--brand); color: #fff; padding: 36px 0; }
.stat-num { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
.stat-label { opacity: .8; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: .2s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.feature-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 16px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; transition: .2s; }
.gallery-grid a:hover img { transform: scale(1.02); }
.cta-box { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #000)); color: #fff; border-radius: 24px; padding: 48px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.contact-card { background: var(--soft); border-radius: var(--radius); padding: 28px; }
.contact-card p { display: flex; gap: 10px; }
.contact-card p i { color: var(--brand); }
.branch-map-list { display: grid; gap: 7px; }
.branch-map-item { width: 100%; display: grid; grid-template-columns: 22px minmax(0,1fr) 18px; align-items: start; gap: 8px; text-align: left; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); padding: 8px 9px; transition: .18s ease; }
.branch-map-item > i:first-child { color: var(--brand); margin-top: 1px; }
.branch-map-item span { min-width: 0; }
.branch-map-item b, .branch-map-item small { display: block; }
.branch-map-item small { color: var(--muted); margin-top: 2px; line-height: 1.4; }
.branch-map-item:hover { background: #fff; border-color: var(--brand-100); transform: translateX(2px); }
.branch-map-item.active { background: #fff; color: var(--brand); border-color: var(--brand); box-shadow: 0 4px 14px rgba(75,31,122,.1); }
.branch-map-arrow { color: var(--muted) !important; align-self: center; }
.branch-map-item.active .branch-map-arrow { color: var(--brand) !important; }
.branch-map-frame { background: var(--soft); }
.branch-map-frame iframe { transition: opacity .18s ease; }
.branch-map-frame.loading iframe { opacity: .35; }
.branch-map-loading { position: absolute; inset: 0; display: none; place-items: center; background: rgba(75,31,122,.16); pointer-events: none; }
.branch-map-frame.loading .branch-map-loading { display: grid; }

/* ---------- Type pills / tabs ---------- */
.type-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.type-pills a { padding: 6px 16px; border-radius: 99px; background: #fff; border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); color: var(--c); font-weight: 500; font-size: .9rem; }
.type-pills a:hover { background: var(--c); color: #fff; }
.type-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.type-tabs a { --c: var(--brand); white-space: nowrap; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); font-weight: 500; background: #fff; }
.type-tabs a span { background: var(--soft); border-radius: 99px; padding: 1px 8px; font-size: .8rem; margin-left: 4px; }
.type-tabs a.on { background: var(--c); color: #fff; border-color: var(--c); }
.type-tabs a.on span { background: rgba(255,255,255,.25); }

/* ---------- Job card ---------- */
.job-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; transition: .2s; position: relative; }
.job-card:hover { box-shadow: var(--shadow); border-color: var(--brand-100); transform: translateY(-2px); }
.job-title { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin: 4px 0 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-card a:hover .job-title { color: var(--brand); }
.job-meta { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); flex: 1; }
.job-meta i { margin-right: 6px; color: var(--brand); opacity: .7; }
.job-meta .salary { color: #0f7b3f; font-weight: 500; }
.job-foot { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.btn-save { border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; padding: 2px; }
.btn-save.on, .btn-save:hover { color: #e0245e; }

/* ---------- Page head ---------- */
.page-head { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000)); color: #fff; padding: 44px 0 40px; }
.page-head h1 { font-weight: 700; font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.page-head p { opacity: .85; }
.job-head-meta { display: flex; flex-wrap: wrap; gap: 18px; opacity: .9; }
.job-head-meta i { margin-right: 6px; }

/* ---------- Cards ---------- */
.content-card, .filter-card, .apply-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.filter-card { position: sticky; top: 90px; }
.section-h { font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--ink); }
.section-h i { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.apply-card { box-shadow: var(--shadow); }
.salary-big { background: #eefaf2; color: #0f7b3f; border-radius: 12px; padding: 14px 16px; font-size: 1.3rem; font-weight: 600; margin-bottom: 14px; }
.salary-big small { display: block; font-size: .8rem; font-weight: 400; color: #4b8a64; }
.facts { list-style: none; padding: 0; margin: 0 0 18px; }
.facts li { display: grid; grid-template-columns: 26px 1fr auto; gap: 6px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; align-items: center; }
.facts li i { color: var(--brand); }
.facts li span { color: var(--muted); }
.facts li b { font-weight: 500; text-align: right; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state i { font-size: 3rem; color: var(--brand-100); display: block; margin-bottom: 10px; }

/* ---------- Apply wizard ---------- */
.steps { display: flex; gap: 8px; }
.step { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--soft); color: var(--muted); font-weight: 500; font-size: .92rem; }
.step span { width: 28px; height: 28px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.step.on { background: var(--brand); color: #fff; }
.step.on span { color: var(--brand); }
.step.done { background: var(--brand-100); color: var(--brand); }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px dashed #d8cde6; border-radius: 14px; padding: 28px; text-align: center; cursor: pointer; position: relative; transition: .2s; background: var(--soft); }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-50); }
.dropzone i { font-size: 2.2rem; color: var(--brand); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone.has-file { border-style: solid; border-color: #198754; background: #eefaf2; }
.intern-box, .pdpa-box { background: var(--soft); border-radius: 12px; padding: 18px; }
.pdpa-box { max-height: 220px; overflow: auto; border: 1px solid var(--line); }
.success-icon { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: #e6f6ec; color: #198754; font-size: 3rem; display: flex; align-items: center; justify-content: center; animation: pop .4s ease; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.code-box { background: var(--brand-50); border-radius: 14px; padding: 16px; display: inline-block; min-width: 260px; }
.code-box b { font-size: 1.6rem; letter-spacing: 2px; color: var(--brand); }

/* ---------- Status flow ---------- */
.status-flow { display: flex; justify-content: space-between; position: relative; }
.status-flow::before { content: ''; position: absolute; top: 18px; left: 10%; right: 10%; height: 3px; background: var(--line); }
.sf-step { flex: 1; text-align: center; position: relative; }
.sf-dot { width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 3px solid var(--line); margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; color: #bbb; position: relative; z-index: 1; }
.sf-step.done .sf-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.sf-step.current .sf-dot { box-shadow: 0 0 0 5px var(--brand-100); }
.sf-label { font-size: .8rem; color: var(--muted); }
.sf-step.done .sf-label { color: var(--brand); font-weight: 500; }
.status-flow.ended { opacity: .5; }
.log-list { list-style: none; padding: 0; }
.log-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 300px); display: flex; align-items: center; justify-content: center; padding: 48px 16px; background: radial-gradient(800px 400px at 50% 0, var(--brand-50), transparent); }
.auth-card { background: #fff; width: 100%; max-width: 440px; padding: 36px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.divider { text-align: center; position: relative; margin: 22px 0; color: var(--muted); font-size: .85rem; }
.divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.divider span { background: #fff; padding: 0 12px; position: relative; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 10px; bottom: 10px; border: 0; background: none; color: var(--muted); z-index: 5; }
.form-floating > .pw-toggle { bottom: 16px; }
.avatar-upload { width: 88px; height: 88px; border-radius: 50%; background: var(--brand-50); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: var(--brand); cursor: pointer; position: relative; overflow: visible; }
.avatar-upload img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-upload .cam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .9rem; display: flex; align-items: center; justify-content: center; border: 3px solid #fff; }

/* ---------- Footer ---------- */
.site-footer { background: #1c1128; color: #cfc7da; }
.site-footer h6 { color: #fff; }
.site-footer a { color: #cfc7da; }
.site-footer a:hover { color: #fff; }
.site-footer li { margin-bottom: 6px; }
.footer-logo { filter: brightness(0) invert(1); opacity: .9; }
.footer-bottom { background: #140b1e; color: #8f86a0; }
.social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; }
.social a:hover { background: var(--brand); }

/* ==========================================================
   Back-office
   ========================================================== */
body.bo { background: #f6f4f9; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; background: #fff; border-right: 1px solid var(--line); z-index: 1040; display: flex; flex-direction: column; transition: transform .25s; }
.sidebar-brand { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.sidebar-nav { padding: 10px 12px; overflow-y: auto; flex: 1; }
.side-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 10px 6px; font-weight: 600; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #4a4553; font-weight: 500; font-size: .93rem; margin-bottom: 2px; }
.side-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.side-link:hover { background: var(--brand-50); color: var(--brand); }
.side-link.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 30%, transparent); }
.bo-main { margin-left: 250px; min-height: 100vh; }
.bo-top { position: sticky; top: 0; z-index: 1030; height: 64px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 24px; }
.bo-content { padding: 24px; max-width: 1600px; }
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1035; }
  .bo-main { margin-left: 0; }
  .bo-content { padding: 16px; }
  .bo-top { padding: 0 12px; }
}
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(30,10,60,.03); }
.panel-h { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.panel-b { padding: 18px; }
.panel .table { margin-bottom: 0; }
.panel .table > :not(caption) > * > * { padding: .7rem .9rem; }
.panel .table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; background: var(--soft); border-bottom: 0; }
.bulk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--brand) 3%, #fff); }
.bulk-bar .form-select { width: auto; min-width: 180px; }
.bulk-count { color: var(--muted); font-size: .85rem; min-width: 92px; }
.bulk-check { width: 38px !important; text-align: center !important; }
.bulk-table tr.bulk-selected > * { background: color-mix(in srgb, var(--brand) 7%, #fff); }
.datatable th.text-start .dt-column-header { justify-content: flex-start !important; }
[data-bs-theme=dark] .bulk-bar { background: #211d27; }
.kpi-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--ink); transition: .2s; height: 100%; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.kpi-icon { width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 10px; }
.kpi-num { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.kpi-label { font-size: .82rem; color: var(--muted); }
.date-chip { width: 48px; text-align: center; background: var(--brand-50); color: var(--brand); border-radius: 10px; padding: 4px 0; line-height: 1.2; flex-shrink: 0; }
.date-chip b { display: block; font-size: 1.1rem; }
.date-chip small { font-size: .72rem; }
.status-pills { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 100%; overflow: hidden !important; }
.status-pills .nav-item { min-width: 0; }
.status-pills .nav-link { color: #4a4553; border-radius: 12px; font-weight: 500; font-size: .9rem; line-height: 1.2; white-space: normal; background: #fff; border: 1px solid var(--line); width: 100%; min-width: 0; height: 100%; padding: .65rem .7rem; display: flex; align-items: center; gap: .42rem; margin: 0; box-shadow: 0 1px 2px rgba(30,10,60,.025); }
.status-pills .nav-link > i { flex: 0 0 auto; }
.status-pills .nav-link .badge { margin-left: auto; }
.status-pills .nav-link .badge { background: var(--soft); color: var(--muted); }
.status-pills .nav-link.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.status-pills .nav-link.active .badge { background: rgba(255,255,255,.2); color: #fff; }
.lang-tabs .nav-link, .nav-sm .nav-link { padding: 4px 12px; font-size: .85rem; border-radius: 8px; color: var(--muted); }
.lang-tabs .nav-link.active { background: var(--brand); color: #fff; }
.type-radio { display: flex; flex-wrap: wrap; gap: 6px; }
.type-radio .btn { border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); color: var(--c); font-size: .88rem; padding: 6px 12px; }
.type-radio .btn-check:checked + .btn { background: var(--c); color: #fff; border-color: var(--c); }
.quill-wrap .ql-toolbar { border-radius: 10px 10px 0 0; border-color: #ddd6e6; }
.quill-wrap .ql-container, .rich-edit .ql-container { border-radius: 0 0 10px 10px; border-color: #ddd6e6; font-family: inherit; font-size: .95rem; }
.quill-wrap .ql-editor { min-height: 140px; }
.rich-edit .ql-editor { min-height: 100px; }
.info-grid { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; }
.info-grid dt { color: var(--muted); font-weight: 400; }
.info-grid dd { margin: 0; }
.trash-detail-grid { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 0; }
.trash-detail-grid dt, .trash-detail-grid dd { padding: .75rem .9rem; border-bottom: 1px solid var(--line); }
.trash-detail-grid dt { color: var(--muted); font-weight: 500; background: var(--soft); }
.trash-detail-grid dd { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.trash-detail-grid > :nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 575.98px) { .info-grid { grid-template-columns: 1fr; } .info-grid dt { margin-top: 6px; } }
@media (max-width: 575.98px) { .trash-detail-grid { grid-template-columns: 1fr; } .trash-detail-grid dt { border-bottom: 0; padding-bottom: .25rem; } .trash-detail-grid dd { padding-top: .25rem; } }
.resume-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 10px; }
.star-rating { font-size: 1.5rem; color: #ddd; cursor: pointer; }
.star-rating i.on { color: #f5b301; }
.note-item { background: #fffbea; border: 1px solid #f7ecb5; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.activity { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.activity li { padding: 0 0 14px 16px; position: relative; }
.activity li::before { content: ''; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.interview-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
/* Kanban */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kanban-col { flex: 0 0 280px; background: #efebf4; border-radius: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.kanban-h { padding: 12px 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; border-top: 4px solid var(--c); border-radius: 14px 14px 0 0; }
.kanban-h i { color: var(--c); }
.kanban-h .badge { background: #fff; color: var(--c); }
.kanban-list { padding: 0 10px 10px; overflow-y: auto; min-height: 120px; flex: 1; }
.kanban-card { background: #fff; border-radius: 10px; padding: 12px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); cursor: grab; border-left: 3px solid var(--c); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.ghost { opacity: .4; }
/* Page builder */
.sec-card.inactive { opacity: .55; }
.sec-card .handle { cursor: grab; font-size: 1.2rem; }
.i18n-pair { display: grid; grid-template-columns: 28px 1fr 28px 1fr; gap: 6px; align-items: center; }
.i18n-pair span { font-size: .7rem; font-weight: 600; color: var(--muted); text-align: center; }
@media (max-width: 767.98px) { .i18n-pair { grid-template-columns: 28px 1fr; } }
.img-field { display: flex; gap: 8px; align-items: center; }
.img-field img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.imgs-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.imgs-item { position: relative; }
.imgs-item img, .imgs-add { width: 100px; height: 72px; object-fit: cover; border-radius: 8px; }
.imgs-item button { position: absolute; top: 2px; right: 2px; padding: 0 4px; line-height: 1.2; }
.imgs-add { border: 2px dashed #d8cde6; background: var(--soft); color: var(--brand); font-size: 1.4rem; }
.item-row { display: flex; gap: 8px; align-items: flex-start; background: var(--soft); padding: 10px; border-radius: 10px; margin-bottom: 8px; }
.section-menu { display: grid !important; grid-template-columns: repeat(2, 1fr); }
.section-menu.show { display: grid !important; }
.section-menu:not(.show) { display: none !important; }
.logo-preview { background: var(--soft); border-radius: 10px; padding: 12px; text-align: center; }
.logo-preview img { max-height: 60px; max-width: 100%; }
.settings-nav .nav-link { color: #4a4553; border-radius: 10px; }
.settings-nav .nav-link.active { background: var(--brand); color: #fff; }
/* DataTables tweaks */
div.dt-container .dt-search input { border-radius: 10px; }
div.dt-container { font-size: .93rem; }
.ts-control { border-radius: 10px !important; }

/* Dark mode (back-office) */
[data-bs-theme=dark] body.bo, [data-bs-theme=dark] .bo { --line: #2e2a36; --soft: #221f28; --ink: #e8e4ee; background: #16141a; color: var(--ink); }
[data-bs-theme=dark] .sidebar, [data-bs-theme=dark] .panel, [data-bs-theme=dark] .kpi-card, [data-bs-theme=dark] .kanban-card { background: #1d1a22; color: var(--ink); }
[data-bs-theme=dark] .bo-top { background: rgba(29,26,34,.9); }
[data-bs-theme=dark] .side-link { color: #c9c3d3; }
[data-bs-theme=dark] .kanban-col { background: #25212c; }
[data-bs-theme=dark] .note-item { background: #2d2816; border-color: #4a4120; }
[data-bs-theme=dark] .btn-outline-brand { background: transparent; color: #c9a8ff; border-color: #7a52a8; }
[data-bs-theme=dark] a { color: #c9a8ff; }
[data-bs-theme=dark] .side-link.active, [data-bs-theme=dark] .btn-brand { color: #fff; }
[data-bs-theme=dark] .kpi-card { color: var(--ink); }
[data-bs-theme=dark] .status-pills .nav-link { background: #1d1a22; color: #c9c3d3; }

/* ==========================================================
   Toasts (Sonner-style)
   ========================================================== */
.toaster { position: fixed; z-index: 2000; bottom: 24px; right: 24px; display: flex; flex-direction: column-reverse; gap: 8px; width: 356px; max-width: calc(100vw - 32px); pointer-events: none; }
.toast-s { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; background: #fff; color: #111; border: 1px solid #ededed; border-radius: 10px; padding: 14px 16px; box-shadow: 0 4px 12px rgba(0,0,0,.08); font-size: .9rem; animation: toastIn .35s cubic-bezier(.21,1.02,.73,1) forwards; }
.toast-s.out { animation: toastOut .25s ease forwards; }
.toast-s .ti { font-size: 1.1rem; line-height: 1.2; }
.toast-s.success .ti { color: #16a34a; } .toast-s.error .ti { color: #dc2626; } .toast-s.warning .ti { color: #d97706; } .toast-s.info .ti { color: #2563eb; }
.toast-s.danger .ti { color: #dc2626; }
.toast-s .tx { flex: 1; }
.toast-s .tc { border: 0; background: none; color: #999; padding: 0 0 0 6px; }
.toast-s .spin { width: 16px; height: 16px; border: 2px solid #ddd; border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; margin-top: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(100%) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 575.98px) { .toaster { right: 16px; left: 16px; bottom: 16px; width: auto; } }
.swal2-popup { font-family: var(--bs-body-font-family); border-radius: 16px !important; }

@media (max-width: 767.98px) {
  .hero { padding: 64px 0 72px; }
  .steps .step { font-size: 0; justify-content: center; }
  .steps .step span { font-size: .9rem; }
  .cta-box { padding: 28px; }
  .content-card, .apply-card, .filter-card { padding: 18px; }
  .filter-card { position: static; }
}
.mobile-apply { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.06); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 991.98px) { body:has(.mobile-apply) .site-footer { padding-bottom: 72px; } }

/* ==========================================================
   v2 – Premium forms (apply / resume)
   ========================================================== */
.site { background: #fbfafd; }
.site-nav { background: rgba(255,255,255,.85) !important; backdrop-filter: saturate(180%) blur(14px); }
.apply-hero { position: relative; overflow: hidden; color: #fff; padding: 36px 0 96px;
  background: radial-gradient(900px 300px at 85% -40%, color-mix(in srgb, var(--brand) 40%, #d9b8ff) 0, transparent 60%), linear-gradient(120deg, var(--brand), color-mix(in srgb, var(--brand) 65%, #0d0417)); }
.apply-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent, #000 70%); pointer-events: none; }
.apply-hero.slim { padding-bottom: 88px; }
.apply-hero h1 { font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.3rem); margin: 0; }
.back-link { color: rgba(255,255,255,.75); font-size: .9rem; display: inline-block; margin-bottom: 14px; }
.back-link:hover { color: #fff; }
.apply-wrap { margin-top: -64px; position: relative; z-index: 2; padding-bottom: 48px; }

.quick-banner { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.qb-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #ffb703, #fb8500); color: #fff; font-size: 1.2rem; flex-shrink: 0; }

/* Stepper */
.stepper { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 10px; gap: 6px; margin-bottom: 16px; box-shadow: var(--shadow); }
.stepper .step { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; color: var(--muted); background: transparent; font-size: .9rem; transition: .2s; }
.stepper .step em { font-style: normal; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper .dot { width: 36px; height: 36px; border-radius: 11px; background: var(--soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: .2s; }
.stepper .dot .ok { display: none; }
.stepper .step.on { background: var(--brand-50); color: var(--brand); }
.stepper .step.on .dot { background: var(--brand); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.stepper .step.done { color: #15803d; }
.stepper .step.done .dot { background: #dcfce7; color: #15803d; }
.stepper .step.done .dot .bi:not(.ok) { display: none; }
.stepper .step.done .dot .ok { display: inline; }
@media (max-width: 767.98px) { .stepper .step em { display: none; } .stepper .step { justify-content: center; } .stepper .step.on em { display: inline; } }

/* Form cards */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(30,10,60,.03), 0 12px 32px -12px rgba(30,10,60,.08); scroll-margin-top: 90px; }
.form-card[hidden] { display: none !important; }
.fc-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.fc-head h2 { font-size: 1.2rem; font-weight: 600; margin: 2px 0 2px; }
.fc-head p { color: var(--muted); font-size: .88rem; margin: 0; }
.fc-num { width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #b57bff)); color: #fff; box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--brand) 60%, transparent); }
.fc-sub { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--ink); }
.fc-sub i { color: var(--brand); }
.fc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; padding-top: 20px; border-top: 1px dashed var(--line); }
.form-card .form-control, .form-card .form-select { min-height: 46px; background-color: #fcfbfe; }
.form-card .form-control:focus, .form-card .form-select:focus { background-color: #fff; }
.form-card .input-group-text { background: var(--soft); border-color: #ddd6e6; color: var(--muted); }
.form-select:disabled { background-color: #f3f1f6; opacity: .7; }
.form-select.flash, .form-control.flash { animation: flash .9s ease; }
@keyframes flash { 30% { box-shadow: 0 0 0 .25rem rgba(34,197,94,.35); border-color: #22c55e; } }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > .form-control { padding-left: 40px; }
.char-count { display: block; text-align: right; color: var(--muted); font-size: .75rem; margin-top: 4px; }

/* Pills & check cards */
.choice-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-pills label { padding: 10px 18px; border: 1.5px solid #e2dcea; border-radius: 12px; cursor: pointer; font-weight: 500; font-size: .92rem; background: #fcfbfe; transition: .15s; user-select: none; }
.choice-pills label:hover { border-color: var(--brand); color: var(--brand); }
.choice-pills .btn-check:checked + label { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--brand) 55%, transparent); }
.choice-pills .btn-check:focus-visible + label { outline: 3px solid var(--brand-100); }
.check-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.check-cards label { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid #e2dcea; border-radius: 12px; cursor: pointer; font-size: .9rem; background: #fcfbfe; transition: .15s; }
.check-cards label i { font-size: 1.15rem; color: var(--brand); }
.check-cards .btn-check:checked + label { border-color: var(--brand); background: var(--brand-50); color: var(--brand); font-weight: 500; }

/* Postcode quick fill */
.postcode-quick { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: linear-gradient(90deg, #fff8e6, #fffdf7); border: 1px dashed #f5c451; border-radius: 12px; padding: 10px 14px; font-size: .88rem; }
.postcode-quick > i { color: #f59e0b; }
.postcode-quick .form-control { width: 110px; min-height: 36px !important; background: #fff; letter-spacing: 2px; font-weight: 600; }
.zip-results { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 20; max-height: 260px; overflow: auto; padding: 6px; }
.zip-results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; font-size: .9rem; }
.zip-results button:hover { background: var(--brand-50); color: var(--brand); }
.zr-empty { padding: 10px 12px; color: var(--muted); }

/* Repeaters */
.repeat-item { position: relative; border: 1px solid var(--line); background: linear-gradient(180deg, #fdfcff, #fff); border-radius: 16px; padding: 16px 18px 18px; margin-bottom: 12px; }
.repeat-item.pop { animation: pop .3s ease; }
.repeat-item.out { opacity: 0; transform: scale(.97); transition: .18s; }
.repeat-head { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 6px; }
.repeat-no { font-size: .78rem; font-weight: 700; color: var(--brand); background: var(--brand-50); padding: 2px 10px; border-radius: 99px; }
.repeat-item.compact { display: grid; grid-template-columns: 1fr 180px 36px; gap: 8px; align-items: center; padding: 8px; margin-bottom: 8px; border-radius: 12px; }
.btn-add { width: 100%; border: 1.5px dashed #d4c8e4; color: var(--brand); background: transparent; border-radius: 14px; padding: 12px; font-weight: 500; }
.btn-add:hover:not(:disabled) { background: var(--brand-50); border-color: var(--brand); color: var(--brand); }
.btn-add.btn-sm { width: auto; padding: 6px 14px; }

/* Chips */
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 46px; cursor: text; height: auto; padding: 6px 10px; }
.chips-input input { border: 0; outline: 0; flex: 1; min-width: 160px; background: transparent; padding: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100); border-radius: 99px; padding: 3px 6px 3px 12px; font-size: .85rem; font-weight: 500; }
.chip button { border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1; padding: 0 4px; opacity: .6; }
.chip button:hover { opacity: 1; }

/* Dropzone v2 */
.dropzone { border-radius: 18px; padding: 32px 20px; background: linear-gradient(180deg, #fcfaff, #f7f3fc); }
.dz-icon { width: 60px; height: 60px; border-radius: 18px; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); margin-bottom: 8px; }
.dz-icon i { font-size: 1.8rem; }
.profile-resume { display: flex; align-items: center; gap: 12px; border: 1.5px solid #bbf7d0; background: #f0fdf4; border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; cursor: pointer; }
.profile-resume > i { font-size: 1.8rem; color: #dc2626; }
.profile-resume .form-check-input { margin: 0; width: 1.3em; height: 1.3em; }
.file-chip { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--soft); color: var(--ink); }
.file-chip > i:first-child { color: #dc2626; font-size: 1.3rem; }

.review-box { background: var(--soft); border-radius: 16px; padding: 18px 20px; }
.review-box:empty { display: none; }
.review-box dl { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; margin: 0; font-size: .92rem; }
.review-box dt { color: var(--muted); font-weight: 400; }
.review-box dd { margin: 0; font-weight: 500; }
@media (max-width: 575.98px) { .review-box dl { grid-template-columns: 1fr; } .review-box dd { margin-bottom: 6px; } }
.pdpa-box { border-radius: 16px; background: #fff; }
.pdpa-text { max-height: 110px; overflow: auto; color: var(--muted); }
.btn-glow { box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-glow:hover { transform: translateY(-1px); }

/* Job summary sidebar */
.job-summary { top: 88px; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 12px 32px -12px rgba(30,10,60,.12); }
.js-top { padding: 22px; background: linear-gradient(180deg, var(--brand-50), #fff); }
.js-logo { height: 34px; margin-bottom: 14px; }
.js-top h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 2px; }
.js-facts { list-style: none; margin: 0; padding: 4px 22px 14px; }
.js-facts li { display: flex; gap: 10px; padding: 7px 0; font-size: .9rem; border-bottom: 1px dashed var(--line); }
.js-facts li:last-child { border: 0; }
.js-facts i { color: var(--brand); }
.js-progress { padding: 14px 22px; border-top: 1px solid var(--line); }
.js-progress .progress { height: 8px; border-radius: 99px; background: var(--soft); }
.js-progress .progress-bar { background: linear-gradient(90deg, var(--brand), #b57bff); border-radius: 99px; transition: width .4s; }
.js-secure { padding: 12px 22px; background: var(--soft); font-size: .8rem; color: var(--muted); display: flex; gap: 8px; }
@media (max-width: 991.98px) { .job-summary .js-facts, .job-summary .js-secure, .js-logo { display: none; } .js-top { padding: 16px 18px; } }

/* Profile page */
.profile-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px; text-align: center; box-shadow: 0 12px 32px -12px rgba(30,10,60,.12); margin-bottom: 14px; }
.profile-card h2 { font-size: 1.2rem; font-weight: 600; margin: 14px 0 2px; }
.avatar-upload.xl { width: 104px; height: 104px; margin: 0 auto; font-size: 2.8rem; box-shadow: 0 0 0 5px #fff, 0 0 0 7px var(--brand-100); }
.ring { --p: 0; width: 92px; height: 92px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--soft) 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.ring span { position: relative; font-weight: 700; font-size: 1.2rem; color: var(--brand); }
.section-nav { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 8px; }
.section-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: var(--ink); font-size: .92rem; }
.section-nav a > i { width: 30px; height: 30px; border-radius: 9px; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.section-nav a span { flex: 1; }
.section-nav a em { font-style: normal; font-size: .75rem; color: #d97706; }
.section-nav a.done em { color: #16a34a; font-size: 1rem; }
.section-nav a.done > i { background: #dcfce7; color: #16a34a; }
.section-nav a:hover, .section-nav a.active { background: var(--brand-50); color: var(--brand); }
@media (max-width: 991.98px) { .section-nav { display: none; } }
.save-bar { position: sticky; bottom: 12px; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px 12px 20px; box-shadow: 0 12px 32px -8px rgba(30,10,60,.18); }
.save-bar .btn { margin-left: auto; }
.is-invalid { border-color: #dc3545 !important; }
.rb-title { font-weight: 600; margin: 22px 0 10px; display: flex; gap: 8px; align-items: center; }
.rb-title i { color: var(--brand); }
.rb-timeline { border-left: 2px solid var(--brand-100); padding-left: 16px; }
.rb-item { position: relative; padding-bottom: 12px; }
.rb-item::before { content: ''; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px #fff; }

/* Language rows: language + speak/listen/read/write + remove */
.lang-head, .repeat-item.lang-row { display: grid; grid-template-columns: minmax(120px, 1.3fr) repeat(4, minmax(84px, 1fr)) 36px; gap: 8px; align-items: center; }
.lang-head { padding: 0 10px 6px; font-size: .8rem; font-weight: 500; color: var(--muted); }
.repeat-item.lang-row { padding: 8px 10px; margin-bottom: 8px; border-radius: 12px; }
.repeat-item.lang-row .form-control, .repeat-item.lang-row .form-select { min-height: 42px; }
.repeat-item.lang-row .form-select { padding-right: 1.8rem; font-size: .9rem; }
@media (max-width: 767.98px) {
  .repeat-item.lang-row { grid-template-columns: 1fr 1fr; padding: 12px; position: relative; }
  .repeat-item.lang-row > input { grid-column: 1 / -1; width: calc(100% - 36px); }
  .repeat-item.lang-row > [data-remove] { position: absolute; top: 16px; right: 8px; }
}

/* Navbar (and its dropdowns) must stay above sticky sidebars (.sticky-lg-top = 1020) */
.site-nav { z-index: 1040; }
.site-nav .dropdown-menu { z-index: 1050; }
.apply-card.sticky-lg-top, .job-summary.sticky-lg-top, aside .sticky-lg-top { z-index: 10; }

/* Status badges never stretch inside flex rows */
.status-badge, .type-badge { align-self: center; flex-shrink: 0; white-space: nowrap; line-height: 1.2; height: auto; padding: .35em .75em; font-size: .75rem; }
.other-apps .list-group-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; }
.other-apps .oa-title { font-weight: 500; color: var(--ink); }
.other-apps .oa-date { font-size: .8rem; color: var(--muted); }
.file-missing { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff8e6; border: 1px solid #fde7a8; border-radius: 12px; padding: 14px 16px; }
.file-missing > i { font-size: 1.5rem; color: #d97706; }
.file-missing code { font-size: .75rem; }
.resume-blocks .rb-item b { color: var(--ink); }

/* Reports */
.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 240px; }
.stack-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--soft); }
.stack-bar i { display: block; height: 100%; }

/* Avatars */
.avatar-xs, .avatar-sm, .avatar-md, .avatar-lg, .avatar-xl, .avatar-fill { border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; overflow: hidden; }
.avatar-xs { width: 22px; height: 22px; font-size: .68rem; }
.avatar-sm { width: 32px; height: 32px; font-size: .85rem; }
.avatar-md { width: 40px; height: 40px; font-size: 1rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }
.avatar-xl { width: 72px; height: 72px; font-size: 1.7rem; }
.avatar-fill { width: 100%; height: 100%; font-size: 2rem; }
img.avatar-img { object-fit: cover; background: var(--soft); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.avatar-initial { --av: var(--brand); background: color-mix(in srgb, var(--av) 14%, #fff); color: var(--av); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--av) 20%, transparent); }
.ring-white { box-shadow: 0 0 0 3px rgba(255,255,255,.7) !important; }
.page-head .avatar-initial { background: rgba(255,255,255,.18); color: #fff; }
.min-w-0 { min-width: 0; }
.kanban-card .avatar-md { width: 34px; height: 34px; font-size: .85rem; }
.photo-pick { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px dashed #dcd3e8; border-radius: 16px; background: #fcfbfe; }
.photo-pick .avatar-upload { width: 76px; height: 76px; font-size: 2rem; }
.avatar-upload > .avatar-fill { pointer-events: none; }
[data-bs-theme=dark] .avatar-initial { background: color-mix(in srgb, var(--av) 30%, #1d1a22); color: #eee; }

/* Apply method chooser */
.mode-chip { background: rgba(255,255,255,.18); border-radius: 99px; padding: 1px 10px; font-size: .85em; }
.method-list { display: grid; gap: 12px; }
.method-card { --m: var(--brand); display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); transition: .18s; position: relative; overflow: hidden; }
.method-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--m); opacity: 0; transition: .18s; }
.method-card:hover { border-color: color-mix(in srgb, var(--m) 45%, #fff); box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--m) 45%, transparent); transform: translateY(-2px); color: var(--ink); }
.method-card:hover::before { opacity: 1; }
.m-icon { width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--m), color-mix(in srgb, var(--m) 70%, #000)); box-shadow: 0 8px 18px -8px var(--m); }
.m-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m-title { font-weight: 600; font-size: 1.05rem; }
.m-badge { font-size: .7rem; font-weight: 600; color: var(--m); background: color-mix(in srgb, var(--m) 12%, #fff); border-radius: 99px; padding: 2px 9px; vertical-align: middle; }
.m-desc { color: var(--muted); font-size: .9rem; }
.m-meta { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--m); font-weight: 500; margin-top: 2px; }
.m-progress { width: 90px; height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; display: inline-block; }
.m-progress i { display: block; height: 100%; background: var(--m); }
.m-go { color: var(--muted); font-size: 1.2rem; transition: .18s; }
.method-card:hover .m-go { color: var(--m); transform: translateX(3px); }
.method-foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: var(--soft); font-size: .9rem; color: var(--muted); }
.method-foot a { font-weight: 500; }
/* Quick apply resume summary */
.resume-mini { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.rm-head { display: flex; gap: 16px; align-items: center; padding: 18px; background: linear-gradient(180deg, var(--brand-50), #fff); }
.rm-head h3 { font-size: 1.2rem; font-weight: 600; margin: 0 0 2px; }
.rm-contacts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.rm-contacts i { margin-right: 5px; color: var(--brand); }
.rm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.rm-grid > div { background: #fff; padding: 12px 18px; min-width: 0; }
.rm-grid small { display: block; color: var(--muted); font-size: .78rem; }
.rm-grid b { font-weight: 500; font-size: .92rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 575.98px) { .rm-grid { grid-template-columns: 1fr; } }
/* short form collapsible */
.collapse-sec > summary { list-style: none; cursor: pointer; }
.collapse-sec > summary::-webkit-details-marker { display: none; }
.collapse-sec[open] .sum-btn { display: none; }
.file-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .88rem; background: var(--soft); }
.file-list li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list li i { color: var(--brand); }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
/* email apply */
.mail-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.mc-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mc-k { color: var(--muted); font-size: .85rem; }
.mc-v { font-weight: 500; word-break: break-all; }
.mc-body { padding: 12px 16px; background: var(--soft); }
.mc-body textarea { background: #fff; font-size: .92rem; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mail-rules { display: grid; gap: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 14px; padding: 14px 16px; font-size: .9rem; }
.mail-rules > div { display: flex; gap: 10px; }
.mail-rules i { color: #15803d; font-size: 1.1rem; }
.adv-box { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 16px; background: var(--soft); }
.adv-box > summary { cursor: pointer; font-weight: 500; }

/* Desktop back-office: reduce type scale by 15% without affecting the public site. */
@media (min-width: 992px) {
  html.backoffice-root { font-size: 85%; }
  body.bo .form-control, body.bo .form-select, body.bo .btn, body.bo .dropdown-menu { font-size: inherit; }
}
@media (min-width: 992px) and (max-width: 1399.98px) {
  .status-pills { grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible !important; }
}

/* ==========================================================
   Mobile (≤ 767px): text 20% smaller + layout fixes
   ========================================================== */
@media (max-width: 767.98px) {
  html { font-size: 80%; }                      /* all rem-based sizes shrink 20% */
  .row.g-5 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
  .container, .bo-content { padding-left: 14px; padding-right: 14px; }
  .form-card, .content-card, .panel-b { padding: 16px; }
  .panel-h { padding: 12px 16px; }
  .fc-head { gap: 10px; margin-bottom: 16px; }
  .fc-num { width: 38px; height: 38px; border-radius: 12px; }
  .fc-foot { flex-wrap: wrap; gap: 10px; }
  .fc-foot .btn-lg { flex: 1 1 auto; font-size: 1rem; padding: .6rem 1rem; }
  .btn-lg { font-size: 1.05rem; }
  .apply-hero { padding: 24px 0 80px; }
  .page-head { padding: 28px 0 26px; }
  .kpi-num { font-size: 1.5rem; }
  .bo-top { height: 56px; }
  .bo-top .lang-switch { display: none; }
  .table > :not(caption) > * > * { padding: .5rem .6rem; }
  .status-pills .nav-link { padding: .35rem .7rem; font-size: .85rem; }
  .status-pills { display: flex; flex-wrap: nowrap; overflow-x: auto !important; scrollbar-width: none; padding-bottom: 3px; }
  .status-pills::-webkit-scrollbar { display: none; }
  .status-pills .nav-item { flex: 0 0 auto; }
  .info-grid { gap: 4px 10px; }
  .method-card { padding: 14px; gap: 12px; }
  .m-icon { width: 44px; height: 44px; font-size: 1.2rem; border-radius: 12px; }
  .mc-row { grid-template-columns: 52px 1fr auto; padding: 10px 12px; }
  .mail-actions .btn { flex: 1 1 auto; }
  .resume-frame { height: 420px; }
  .modal-dialog { margin: .75rem; }
  /* FullCalendar toolbar */
  .fc .fc-toolbar { flex-wrap: wrap; gap: 8px; justify-content: center; }
  .fc .fc-toolbar-title { font-size: 1.15rem; }
  .fc .fc-button { padding: .3em .55em; font-size: .85rem; }
  .sidebar { width: 260px; }
}
/* iPhone: keep form fields at 16px so Safari doesn't zoom the page when a field is tapped */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 767.98px) {
    input.form-control, select.form-select, textarea.form-control, .chips-input input, .ts-control input { font-size: 16px !important; }
  }
}
