/* ===== Splash / offline ===== */
.splash { min-height: 100vh; display: grid; place-items: center; background: #FFFFFF; }
.splash img { border-radius: 18px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .65; transform: scale(.96); } }
.offline-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--cx-navy-800); }
.offline-card { max-width: 420px; padding: 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.offline-card img { border-radius: 16px; }
.toast-action { border: 0; background: rgba(255,255,255,.12) !important; color: #fff !important; font-weight: 600; padding: 6px 10px !important; border-radius: 6px; margin-inline-start: auto; }
.toast-action + button { margin-inline-start: 6px !important; }

/* ===== Shared page bits ===== */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); margin-top: var(--s-4); }
.filters .input-group { min-width: 220px; }
.filters .field { min-width: 160px; }
.filters .field > label { font-size: var(--fs-xs); }
.icon-tile { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(12,150,143,.12); color: #0C968F; flex: none; }
.link-btn { border: 0; background: none; padding: 0; color: var(--primary); font-weight: 600; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }
.dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 10px 20px; margin: 0; }
.dl dt { font-weight: 600; color: var(--text-muted); font-size: var(--fs-sm); gap: 8px; }
.dl dd { margin: 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.dl.compact { gap: 4px 16px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 16px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }

/* ===== Home ===== */
.welcome-card { background: linear-gradient(120deg, var(--surface) 55%, var(--primary-soft)); }
.todo-list { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
.todo { display: flex; align-items: center; gap: var(--s-3); padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text); text-decoration: none !important; }
.todo:hover { border-color: var(--primary); background: var(--primary-soft); }
.todo-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.roadmap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.roadmap-item { display: flex; gap: var(--s-3); align-items: flex-start; }
.roadmap-item > span:first-child { color: var(--accent); margin-top: 2px; }
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }
.person-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--s-4) var(--s-3); text-align: center; color: var(--text); text-decoration: none !important; }
.person-card:hover { border-color: var(--primary); }

/* ===== Companies ===== */
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-4); }
.company-card { overflow: hidden; color: var(--text); text-decoration: none !important; transition: border-color .15s; }
.company-card:hover { border-color: var(--primary); }
.company-card-top { height: 64px; background: linear-gradient(120deg, var(--cx-navy-800), var(--cx-navy-700)); display: flex; justify-content: center; align-items: flex-end; }
.company-card-top .avatar { margin-bottom: -32px; border: 3px solid var(--surface); background: var(--surface); }
.company-card-body { padding: 40px var(--s-4) var(--s-4); text-align: center; }
.company-card-body h3 { font-size: var(--fs-md); }
.glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); text-align: center; }
.glance div { display: flex; flex-direction: column; padding: var(--s-2); border-radius: var(--r-sm); background: var(--surface-2); }
.glance b { font-size: var(--fs-lg); }
.glance span { font-size: var(--fs-xs); color: var(--text-muted); }

/* ===== Profile & company header ===== */
.profile-head { overflow: hidden; }
.profile-cover { position: relative; height: 180px; background: linear-gradient(120deg, #0A1A33, #0C968F); background-size: cover; background-position: center; }
.cover-btn { position: absolute; top: 12px; inset-inline-end: 12px; }
.profile-head-body { position: relative; padding: 0 var(--s-6) var(--s-5); }
.profile-avatar { position: relative; width: max-content; margin-top: -86px; }
.avatar-edit { position: absolute; inset-block-end: 8px; inset-inline-end: 4px; background: var(--surface); }
.head-edit { position: absolute; top: 12px; inset-inline-end: 12px; }
.profile-identity { display: flex; gap: var(--s-6); margin-top: var(--s-3); }
.profile-identity h1 { font-size: 26px; }
.headline { font-size: var(--fs-md); color: var(--text-2); margin-top: 4px; }
.profile-company { flex: 0 0 auto; max-width: 240px; padding-top: 6px; }
.profile-company a { color: var(--text); }
.profile-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.otw-card { display: inline-flex; gap: 10px; align-items: flex-start; margin-top: var(--s-4); padding: 10px 14px; border-radius: var(--r-md); background: var(--cx-teal-100); color: var(--cx-teal-600); }
.otw-card .muted { color: #2B6B67; }

/* Profile sections */
.profile-section .card-header h2 { font-size: var(--fs-xl); }
.entry { position: relative; display: flex; gap: var(--s-3); padding: var(--s-3) 0; }
.entry + .entry { border-top: 1px solid var(--border); }
.entry-body { flex: 1; min-width: 0; }
.entry-icon { width: 48px; height: 48px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-muted); display: grid; place-items: center; flex: none; }
.entry-edit { position: absolute; top: 8px; inset-inline-end: 0; }

/* Editors */
.tag-input { position: relative; }
.tag-input .menu { inset-inline-start: 0; inset-inline-end: auto; top: 100%; width: 100%; max-height: 260px; overflow-y: auto; }
.lang-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--s-2); align-items: center; }

/* ===== Onboarding ===== */
.onb { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.onb-top { display: flex; align-items: center; justify-content: space-between; padding: var(--s-4) var(--s-6); background: var(--surface); border-bottom: 1px solid var(--border); }
.onb-main { flex: 1; padding: var(--s-10) var(--s-4); }
.onb-card { max-width: 640px; margin: 0 auto; padding: var(--s-8); }
.onb-card h1 { font-size: 26px; margin-bottom: 4px; }
.onb-progress { display: flex; gap: 6px; }
.onb-progress span { flex: 1; height: 4px; border-radius: 99px; background: var(--cx-gray-200); }
.onb-progress span.is-done { background: var(--primary); }
.onb-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--border); margin-top: var(--s-2); }

/* ===== Company management ===== */
.brand-edit-cover { position: relative; height: 140px; border-radius: var(--r-md); background: linear-gradient(120deg, var(--cx-navy-800), var(--cx-blue-600)); background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 0 var(--s-4); }
.brand-edit-cover .avatar { margin-bottom: -40px; }
.brand-edit .row { margin-top: 52px !important; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s-3); }
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: var(--s-4); }
.stat-card b { font-size: 28px; font-family: var(--font-display); color: var(--brand); line-height: 1.1; }
.bar-chart { width: 100%; height: auto; display: block; }
.bar-chart .bar { fill: var(--primary); }
.bar-chart .bar:hover { fill: var(--primary-hover); }
.bar-chart .bar-empty { fill: var(--cx-gray-200); }
.bar-chart .axis { font-size: 11px; fill: var(--text-faint); font-family: var(--font-ui); }

/* ===== Settings ===== */
.settings-layout, .admin-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.settings-nav, .admin-nav { position: sticky; top: calc(var(--nav-h) + var(--s-6)); padding-bottom: var(--s-2); overflow: hidden; }
.danger-card { border-color: #F5C2C2; }
.danger-btn { color: var(--cx-danger); border-color: #F5C2C2; }
.danger-btn:hover { background: var(--cx-danger-bg) !important; }

/* ===== Admin ===== */
/* Admin: full-height sidebar fixed to the screen edge (inline-start, so it flips to the right in Arabic);
   the content uses the whole remaining width. Phones get horizontal tabs (see media query below). */
.shell.shell-admin { max-width: none; padding-inline-start: calc(var(--admin-nav-w) + var(--s-6)); padding-inline-end: var(--s-6); }
:root { --admin-nav-w: 248px; }
.admin-layout { display: block; }
.admin-nav { position: fixed; inset-block: 0; display: flex; flex-direction: column; inset-inline-start: 0; width: var(--admin-nav-w); z-index: 40;
  border: 0; border-inline-end: 1px solid var(--border); border-radius: 0; box-shadow: none; overflow-y: auto; padding: var(--s-2) 0 var(--s-6); }
.admin-nav { scrollbar-width: none; -ms-overflow-style: none; } /* still scrolls (wheel / touch), the bar is just hidden */
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav > .admin-title { padding: var(--s-2) var(--s-5) var(--s-3); }
.admin-brand { padding: 0; }
.admin-brand .brand-mark { width: auto; height: 36px; }
.admin-brand .brand-word { font-size: 24px; }
.admin-brand .brand { color: var(--brand); }
.admin-foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); padding: var(--s-4) var(--s-5) 0; border-top: 1px solid var(--border); }
.admin-signout { display: inline-flex; align-items: center; gap: var(--s-3); padding: 8px 0; border: 0; background: none; color: var(--text-2); font-weight: 500; }
.admin-signout:hover { color: var(--cx-danger); }
.admin-nav > .admin-title h2 { margin-top: 8px; font-size: var(--fs-lg); }
.admin-nav a { padding: 11px var(--s-5); border-inline-start: 3px solid transparent; }
.admin-nav a[aria-current="page"] { border-inline-start-color: var(--primary); }
/* Admin dashboard: 5 cards per row on laptops/desktops, 3 per row on phones */
.admin-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.admin-stats .stat-card { min-width: 0; }
.admin-stats .stat-card > span { overflow-wrap: anywhere; }
.review-item { padding: var(--s-4) 0; }
.review-item + .review-item { border-top: 1px solid var(--border); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .settings-layout, .admin-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; padding: 0; }
  .shell.shell-admin { padding-inline: var(--s-4); }
  .admin-nav { position: static; inset: auto; width: auto; display: flex; overflow-x: auto; padding: 0; border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: var(--s-4); }
  .admin-nav a { white-space: nowrap; border-inline-start: 0; border-bottom: 2px solid transparent; }
  .admin-nav a[aria-current="page"] { border-bottom-color: var(--primary); }
  .settings-nav h2, .admin-nav > .admin-title { display: none; }
  .admin-nav { flex-direction: row; align-items: center; }
  .admin-brand { flex: none; padding: 0 var(--s-3); }
  .admin-brand .brand-mark { height: 28px; }
  .admin-brand .brand-word { display: none; }
  .admin-foot { flex-direction: row; align-items: center; margin-top: 0; margin-inline-start: auto; padding: 0 var(--s-3); border-top: 0; border-inline-start: 1px solid var(--border); }
  .admin-signout span { display: none; }
  .shell.shell-admin { padding-bottom: var(--s-6); }
  .settings-nav a { white-space: nowrap; }
}
@media (max-width: 760px) {
  .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
  .admin-stats .stat-card { padding: var(--s-3) 10px; gap: 2px; }
  .admin-stats .stat-card b { font-size: 20px; }
  .admin-stats .stat-card .small { font-size: 11.5px; line-height: 1.35; }
  .admin-stats .stat-card .xsmall { font-size: 10.5px; }
  .profile-cover { height: 120px; }
  .profile-avatar { margin-top: -60px; }
  .profile-avatar .avatar-xl { --size: 112px; }
  .profile-head-body { padding: 0 var(--s-4) var(--s-4); }
  .profile-identity { flex-direction: column; gap: var(--s-2); }
  .profile-identity h1 { font-size: 22px; }
  .roadmap { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .onb-card { padding: var(--s-5); }
  .onb-top { padding: var(--s-3) var(--s-4); }
  .lang-row { grid-template-columns: 1fr 1fr auto; }
  .filters .field, .filters .input-group { min-width: 100%; }
  .person-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== Phase 2: feed & posts ===== */
.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.icon-xs { width: 13px; height: 13px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: var(--fs-xs); }
.btn-icon.btn-xs { width: 24px; padding: 0; }
.select-sm { width: auto; min-height: 30px; height: 30px; padding-block: 2px; font-size: var(--fs-sm); }
.input-sm { min-height: 32px; height: 32px; font-size: var(--fs-sm); }
.h3 { font-size: var(--fs-lg); }
.h4 { font-size: var(--fs-md); }
.muted-link { color: var(--text-muted); font-weight: 500; }
.danger-text { color: var(--cx-danger) !important; }
.modal-lg { width: min(760px, 100%); }

.composer .composer-input { min-height: 48px; resize: none; border-radius: var(--r-md); }
.composer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--border); }
.composer-images { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.composer-images:empty { display: none; }
.composer-thumb { position: relative; width: 96px; height: 96px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border); }
.composer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.composer-thumb button { position: absolute; top: 4px; inset-inline-end: 4px; background: rgba(15, 23, 42, .7); color: #fff; width: 26px; height: 26px; }

.post-head { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4) var(--s-4) 0; }
.post-author { color: var(--text); }
.post-body { padding: var(--s-3) var(--s-4) 0; font-size: var(--fs-md); line-height: 1.55; }
.post-media { display: grid; gap: 2px; margin-top: var(--s-3); background: var(--surface-2); }
.post-media.n-2, .post-media.n-4 { grid-template-columns: 1fr 1fr; }
.post-media.n-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.post-media.n-3 a:first-child { grid-row: span 2; }
.post-media a { display: block; overflow: hidden; }
.post-media img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; display: block; }
.post-media.n-1 img { object-fit: contain; height: auto; background: var(--surface-2); }
.post-job { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-3) var(--s-4) 0; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); text-decoration: none !important; background: var(--surface-2); }
.post-job:hover { border-color: var(--primary); }
.post-stats { display: flex; justify-content: space-between; align-items: center; padding: var(--s-3) var(--s-4) 0; font-size: var(--fs-sm); }
.react-emoji { font-size: 15px; line-height: 1; }
.post-actions { display: flex; gap: 2px; margin: var(--s-2) var(--s-3) var(--s-1); padding: 4px 0 0; border-top: 1px solid var(--border); }
.post-actions > * { flex: 1; }
.post-action { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-muted); font-weight: 600; font-size: var(--fs-sm); }
.post-action:hover { background: var(--surface-hover); color: var(--text); }
.post-action.is-active { color: var(--primary); }
.react-wrap { position: relative; }
.react-picker { position: absolute; bottom: calc(100% + 4px); inset-inline-start: 0; display: none; gap: 2px; padding: 4px 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); box-shadow: var(--shadow-pop); z-index: 5; }
.react-wrap:hover .react-picker, .react-wrap:focus-within .react-picker { display: flex; }
.react-picker button { border: 0; background: none; font-size: 22px; width: 36px; height: 36px; border-radius: 50%; transition: transform .12s; }
.react-picker button:hover, .react-picker button:focus-visible { transform: scale(1.25); background: var(--surface-2); }
@media (hover: none) { .react-wrap:hover .react-picker { display: none; } }
.post-comments { padding: var(--s-2) var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.post-comments.hidden { display: none; }
.comment-form { display: flex; align-items: center; gap: var(--s-2); }
.comment-form .input { flex: 1; border-radius: var(--r-pill); }
.comment { display: flex; gap: var(--s-2); align-items: flex-start; }
.comment-bubble { background: var(--surface-2); border-radius: 4px var(--r-md) var(--r-md) var(--r-md); padding: 8px 12px; }
:root[dir="rtl"] .comment-bubble { border-radius: var(--r-md) 4px var(--r-md) var(--r-md); }

/* ===== Phase 2: network ===== */
.person-tile { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.person-tile .person-card { border: 0; box-shadow: none; border-radius: 0; flex: 1; }
.person-tile-action { padding: 0 var(--s-3) var(--s-3); }
.request-note { margin: -4px 0 0; margin-inline-start: 60px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--r-md); }
.request-time { margin-inline-start: 60px; margin-top: 4px; padding-bottom: var(--s-2); }
[data-request-row] + [data-request-row] { border-top: 1px solid var(--border); }

/* ===== Phase 3: jobs ===== */
.fact-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fact-list li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--text-2); }
.fact-list .icon { color: var(--text-muted); }
.job-row .title { font-size: var(--fs-md); }
.manage-job .icon-tile { width: 44px; height: 44px; }
.stage-legend { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 8px; }
.app-item + .app-item { border-top: 1px solid var(--border); }
.app-item .list-item { border: 0; }
.app-item .timeline { padding-bottom: var(--s-3); padding-inline-start: 60px; }
.app-closed { padding-bottom: var(--s-3); margin-inline-start: 60px; display: flex; align-items: center; gap: 4px; }
.stepper { list-style: none; margin: 0 0 var(--s-3); padding: 0; padding-inline-start: 60px; display: grid; grid-template-columns: repeat(6, 1fr); }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--text-faint); }
.stepper li::before { content: ""; position: absolute; top: 6px; inset-inline-end: 50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper .dot { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.stepper li.done, .stepper li.current { color: var(--text-2); }
.stepper li.done .dot { background: var(--accent); border-color: var(--accent); }
.stepper li.done::before, .stepper li.current::before { background: var(--accent); }
.stepper li.current .dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft-2); }
.stepper li.current { color: var(--primary); font-weight: 600; }
.timeline-list { list-style: none; margin: 0; padding: 0; padding-inline-start: 14px; border-inline-start: 2px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.timeline-list li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.timeline-list li::before { content: ""; position: absolute; inset-inline-start: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); }

/* ATS */
.shell-wide-col { max-width: 100%; margin: 0 auto; width: 100%; }
.pipeline-summary { width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-2); margin-top: var(--s-2); }
.pipeline-summary div { display: flex; flex-direction: column; align-items: center; padding: var(--s-2); border-radius: var(--r-sm); background: var(--surface-2); text-align: center; }
.pipeline-summary b { font-size: var(--fs-xl); }
.pipeline-summary span { font-size: var(--fs-xs); color: var(--text-muted); }
.applicant-row { cursor: pointer; border-radius: var(--r-sm); }
.applicant-row:hover, .applicant-row:focus-visible { background: var(--surface-2); outline: none; }
.stars { color: #F59E0B; letter-spacing: 1px; }
.stage-box { padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.rating button { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--border-strong); padding: 0 1px; }
.rating button.on { color: #F59E0B; }
.note { padding: 8px 12px; border-radius: var(--r-md); background: var(--cx-warning-bg); }

@media (max-width: 760px) {
  .stepper { padding-inline-start: 0; }
  .stepper .xsmall { font-size: 10px; }
  .app-item .timeline, .app-closed { padding-inline-start: 0; margin-inline-start: 0; }
  .pipeline-summary { grid-template-columns: repeat(3, 1fr); }
  .request-note, .request-time { margin-inline-start: 0; }
  .post-action { font-size: var(--fs-xs); gap: 4px; }
}

/* ===== Phase 4: chat ===== */
.chat-shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: var(--s-4); height: calc(100vh - var(--nav-h) - 48px); min-height: 480px; }
.chat-list, .chat-thread { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-list .card-header { padding-bottom: var(--s-3); border-bottom: 1px solid var(--border); }
.chat-list-body { overflow-y: auto; flex: 1; }
.chat-item { display: flex; gap: var(--s-3); align-items: center; padding: 12px var(--s-4); color: var(--text); text-decoration: none !important; border-inline-start: 3px solid transparent; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.is-active { background: var(--primary-soft); border-inline-start-color: var(--primary); }
.chat-item.is-unread .strong { color: var(--text); }
.chat-item.is-unread .small { color: var(--text); font-weight: 600; }
.chat-head { display: flex; align-items: center; gap: var(--s-3); padding: 12px var(--s-4); border-bottom: 1px solid var(--border); }
.chat-head a.strong { color: var(--text); }
.chat-back { display: none; }
.chat-messages { flex: 1; overflow-y: auto; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); background: var(--surface-2); }
.bubble-row { display: flex; flex-direction: column; align-items: flex-start; }
.bubble-row.mine { align-items: flex-end; }
.bubble { max-width: min(78%, 520px); padding: 8px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); white-space: pre-line; overflow-wrap: anywhere; font-size: var(--fs-md); line-height: 1.45; }
.bubble-row.mine .bubble { background: var(--primary); color: #fff; border-color: var(--primary); }
.seen { margin-top: 2px; }
.chat-compose { display: flex; gap: var(--s-2); align-items: flex-end; padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border); background: var(--surface); }
.chat-compose .textarea { flex: 1; min-height: 40px; max-height: 160px; resize: none; border-radius: 20px; padding-block: 9px; }
.chat-closed { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border); margin: 0; }
.chat-placeholder { flex: 1; display: grid; place-items: center; }

/* ===== Phase 4: notifications ===== */
.notif-list { display: flex; flex-direction: column; }
.notif { display: flex; gap: var(--s-3); align-items: center; padding: 12px var(--s-5); color: var(--text); text-decoration: none !important; border-top: 1px solid var(--border); }
.notif:first-child { border-top: 0; }
.notif:hover { background: var(--surface-2); }
.notif.is-unread { background: var(--primary-soft); }
.notif-avatar { position: relative; flex: none; }
.notif-type { position: absolute; inset-inline-end: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; border: 2px solid var(--surface); }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex: none; }

/* ===== Phase 5: events ===== */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-4); }
.event-card { overflow: hidden; color: var(--text); text-decoration: none !important; display: flex; flex-direction: column; }
.event-card:hover { border-color: var(--primary); }
.event-cover, .event-hero { position: relative; height: 120px; background: linear-gradient(120deg, var(--cx-navy-800), var(--cx-blue-600)); background-size: cover; background-position: center; }
.event-hero { height: 180px; }
.event-cover .date-badge { position: absolute; top: 12px; inset-inline-start: 12px; }
.event-status { position: absolute; top: 12px; inset-inline-end: 12px; }
.event-card-body { padding: var(--s-3) var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.event-card-body h3 { font-size: var(--fs-md); }
.event-type { color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
:root[lang="ar"] .event-type { letter-spacing: 0; }
.date-badge { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 48px; padding: 4px 8px; border-radius: var(--r-sm); background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); line-height: 1.1; flex: none; }
.date-badge b { font-size: var(--fs-xl); }
.date-badge span { font-size: var(--fs-xs); color: var(--cx-danger); font-weight: 700; text-transform: uppercase; }
.date-badge.is-small { min-width: 42px; border: 1px solid var(--border); box-shadow: none; }
.date-badge.is-small b { font-size: var(--fs-lg); }
.event-mini { color: var(--text); text-decoration: none !important; }
.note-plain { padding: 8px 12px; border-radius: var(--r-md); background: var(--surface-2); }

/* ===== Phase 5: plans & billing ===== */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-4); }
.plan-card.is-featured { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft-2); }
.plan-price { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; color: var(--brand); margin: 0; }
.plan-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-features li { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-sm); color: var(--text-2); }
.plan-features .icon { color: var(--cx-success); margin-top: 2px; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-4); }
.usage .meter { margin-top: 6px; }
.meter.is-full > span { background: var(--cx-danger) !important; }

@media (max-width: 760px) {
  .chat-shell { grid-template-columns: minmax(0, 1fr); height: calc(100vh - var(--nav-h) - 96px); }
  .chat-shell.has-thread .chat-list { display: none; }
  .chat-shell:not(.has-thread) .chat-thread { display: none; }
  .chat-back { display: inline-flex; }
  .notif { padding-inline: var(--s-4); }
}

/* Top bar labels stay on one line now that it holds six items */
.nav-link > span:not(.dot) { white-space: nowrap; }

/* ===== Admin dashboard (overview) ===== */
.dash { gap: var(--s-5); }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.dash-eyebrow { display: block; font-size: var(--fs-sm); color: var(--text-muted); }
.dash-head h1 { font-size: 28px; letter-spacing: -0.02em; color: var(--brand); }
.dash-tools { display: flex; align-items: center; gap: var(--s-3); }
.dash-range { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; }
.dash-eyebrow-caps { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.kpi { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); }
.kpi-top, .kpi-bottom { display: flex; justify-content: space-between; gap: var(--s-3); }
.kpi-top { align-items: flex-start; }
.kpi-bottom { align-items: flex-end; }
.kpi-icon { flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.kpi-text { display: flex; flex-direction: column; min-width: 0; }
.kpi-text b { font-family: var(--font-display); font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; color: var(--brand); }
.kpi-label { margin-top: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.kpi-sub { font-size: var(--fs-xs); color: var(--text-faint); }
.kpi-spark { flex: none; width: 72px; height: 36px; }
.kpi-spark rect { fill: var(--primary-soft-2); }
.kpi-spark rect.on { fill: var(--primary); }
.trend { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.trend.up { background: var(--cx-success-bg); color: var(--cx-success); }
.trend.down { background: var(--cx-danger-bg); color: var(--cx-danger); }
.good-text { color: var(--cx-success); }
.bad-text { color: var(--cx-danger); }

.dash-grid { display: grid; grid-template-columns: 1.25fr 1fr .9fr; gap: var(--s-4); align-items: stretch; }
.dash-card { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); min-width: 0; }
.dash-card-head { display: flex; align-items: center; gap: var(--s-3); }
.dash-card-head h3 { font-size: var(--fs-md); }

.seg-bar { display: flex; gap: 3px; height: 9px; border-radius: var(--r-pill); overflow: hidden; background: var(--cx-gray-100); }
.seg-bar span { min-width: 4px; }
.c1 { background: #1446D6; } .c2 { background: #38BDF8; } .c3 { background: #12A150; }
.c4 { background: #F59E0B; } .c5 { background: #0C968F; } .c6 { background: #DC2626; }
.stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.stage { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: var(--r-md); background: var(--surface-2); text-align: center; }
.stage-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); }
.stage-label i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.stage b { font-family: var(--font-display); font-size: 20px; color: var(--brand); }
.flow { display: flex; flex-direction: column; }
.flow-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 40px 14px; align-items: center; gap: var(--s-3); padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.flow-row:last-child { border-bottom: 0; }
.flow-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; }
.flow-row b { text-align: end; font-size: var(--fs-sm); }
.mini-bar { height: 6px; border-radius: var(--r-pill); background: var(--cx-gray-100); overflow: hidden; }
.mini-bar span { display: block; height: 100%; border-radius: inherit; }
.mini-bar .good { background: #12A150; }
.mini-bar .warn { background: #F59E0B; }

.big-num { display: flex; flex-direction: column; align-items: flex-end; }
.big-num b { font-family: var(--font-display); font-size: 28px; line-height: 1.1; color: var(--primary); }
.big-num span { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar-row { display: grid; grid-template-columns: minmax(90px, 130px) minmax(0, 1fr) 40px; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); }
.hbar-row b { text-align: end; color: var(--primary); }
.hbar { height: 10px; border-radius: var(--r-pill); background: var(--cx-gray-100); overflow: hidden; }
.hbar span { display: block; height: 100%; border-radius: inherit; background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 3px, transparent 3px 7px); }
.hbar .s0 { background-color: #1446D6; }
.hbar .s1 { background-color: #3B74FF; }
.hbar .s2 { background-color: #38BDF8; }
.hbar .s3 { background-color: #93C5FD; }
.attention { margin-top: auto; padding: 12px 14px; border-radius: var(--r-md); background: #FFFBEB; border: 1px solid #FDE68A; display: flex; flex-direction: column; gap: 10px; }
.attention-title { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 600; color: #B45309; }
.attention .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.attention .chip { padding: 4px 10px; border: 0; background: #FDE68A; color: #92400E; font-size: var(--fs-xs); font-weight: 600; text-decoration: none; }
.attention .chip:hover { background: #FCD34D; }
.attention.clear { background: var(--cx-success-bg); border-color: #BBE5CB; }
.attention.clear .attention-title { color: var(--cx-success); }

.dash-blue { background: linear-gradient(120deg, #0A1A33, #0C968F); color: #fff; }
.dash-blue h3 { color: #fff; }
.dash-blue .kpi-icon { background: rgba(255,255,255,.16); color: #fff; }
.dash-blue .kpi-sub, .dash-blue .dash-eyebrow-caps { color: rgba(255,255,255,.75); }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: rgba(255,255,255,.16); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; }
.quick-list { display: flex; flex-direction: column; gap: 8px; }
.quick-list a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r-md); border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; font-size: var(--fs-sm); font-weight: 500; text-decoration: none !important; transition: background .15s; }
.quick-list a:hover { background: rgba(255,255,255,.18); }
.quick-count { padding: 1px 8px; border-radius: var(--r-pill); background: #fff; color: #0C968F; font-size: 11.5px; font-weight: 700; }
.quick-search { margin-top: auto; display: flex; align-items: center; gap: 6px; padding-block: 5px; padding-inline: 14px 5px; border-radius: var(--r-md); background: #fff; }
.quick-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: var(--fs-sm); color: var(--text); }
.quick-search button { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: linear-gradient(120deg, #0A1A33, #0C968F); color: #fff; }
.quick-search button:hover { background: linear-gradient(120deg, #0D2242, #0FA89F); }

@media (max-width: 1300px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-blue { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .kpi-grid, .dash-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .kpi { padding: var(--s-4); }
  .kpi-text b { font-size: 24px; }
  .dash-card { padding: var(--s-4); }
  .dash-tools { width: 100%; }
  .dash-tools .btn { flex: 1; }
}

/* ===== Admin › Company detail ===== */
.admin-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500; text-decoration: none !important; }
.admin-back:hover { color: var(--primary); }
.co-ext { display: inline-flex; vertical-align: middle; color: var(--text-faint); }
.co-ext:hover { color: var(--primary); }
.co-head { overflow: hidden; border-radius: var(--r-lg); }
.co-cover { height: 110px; background: linear-gradient(120deg, var(--cx-navy-800), var(--cx-blue-600)); background-size: cover; background-position: center; }
.co-head-body { display: flex; align-items: flex-end; gap: var(--s-4); padding: 0 var(--s-5) var(--s-5); flex-wrap: wrap; }
.co-head-body > .avatar { margin-top: -36px; border: 4px solid var(--surface); flex: none; }
.co-head-text { min-width: 220px; padding-top: var(--s-3); }
.co-head-text h1 { display: flex; align-items: center; gap: 8px; font-size: 24px; letter-spacing: -0.02em; color: var(--brand); }
.co-head-text p { margin-top: 2px; font-size: var(--fs-sm); }
.co-badges { gap: 8px; margin-top: var(--s-2); align-items: center; }
.co-actions { gap: var(--s-2); }
.kpi-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.co-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.co-dl { grid-template-columns: minmax(110px, max-content) 1fr; }
.co-about { padding-top: var(--s-3); border-top: 1px solid var(--border); color: var(--text-2); }
.co-plan { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.co-plan b { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--brand); }
.co-team { display: flex; flex-direction: column; }
.co-member { display: flex; align-items: center; gap: var(--s-3); padding: 10px 0; border-bottom: 1px solid var(--border); }
.co-member:last-child { border-bottom: 0; }
.co-member-text { min-width: 0; }
.co-member-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.co-verify { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); }
.co-verify:first-child { padding-top: 0; }
.co-verify:last-child { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 1300px) {
  .kpi-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .co-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .kpi-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-head-body { align-items: flex-start; }
  .co-actions { width: 100%; }
}

/* Admin › Member detail */
.member-strength { margin-bottom: var(--s-2); display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: center; gap: var(--s-3); }
.member-strength b { font-size: var(--fs-sm); color: var(--primary); }

/* Dashboard tiles that open a list */
.kpi-link { color: inherit; text-decoration: none !important; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi-link:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(31, 91, 255, .10); transform: translateY(-1px); }
.kpi-link:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Dashboard tiles that open a list */
.kpi-link { color: inherit; text-decoration: none !important; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi-link:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(31, 91, 255, .10); transform: translateY(-1px); }
.kpi-link:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ===== Admin tables (modern look) — scoped to the admin area ===== */
.shell-admin .table { border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.shell-admin .table thead th {
  position: sticky; top: 0; z-index: 1;
  padding: 12px 16px; background: var(--surface); color: var(--text-faint);
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.shell-admin .table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--cx-gray-100); vertical-align: middle; transition: background-color .12s; }
.shell-admin .table tbody tr:last-child td { border-bottom: 0; }
.shell-admin .table tbody tr:hover td { background: var(--primary-soft); }
.shell-admin .table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
[dir="rtl"] .shell-admin .table tbody tr:hover td:first-child { box-shadow: inset -3px 0 0 var(--primary); }
.shell-admin .table a { font-weight: 600; text-decoration: none; }
.shell-admin .table a:hover { text-decoration: underline; }
.shell-admin .table .avatar-sm { --size: 36px; }

/* Serial number column */
.cell-num { width: 1%; white-space: nowrap; text-align: center !important; }
.serial { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 8px;
  background: var(--surface-2); color: var(--text-muted); font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.shell-admin .table tbody tr:hover .serial { background: var(--surface); color: var(--primary); }

/* Status badges get a leading dot */
.shell-admin .table .badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.shell-admin .table .badge:not([class*="badge-"])::before { display: none; }

/* Row actions: compact pill buttons */
.cell-actions { width: 1%; white-space: nowrap; text-align: end; }
.row-actions { display: inline-flex; align-items: center; gap: 6px; }
.chip-btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: var(--fs-xs); font-weight: 600;
  white-space: nowrap; transition: background-color .12s, border-color .12s, color .12s; }
.chip-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.chip-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.chip-btn[disabled] { opacity: .6; }
.chip-danger { color: var(--cx-danger); border-color: #F5C2C2; }
.chip-danger:hover { color: #fff; background: var(--cx-danger); border-color: var(--cx-danger); }
.chip-success { color: var(--cx-success); border-color: #BBE5CB; }
.chip-success:hover { color: #fff; background: var(--cx-success); border-color: var(--cx-success); }

/* Pagination under admin tables */
.shell-admin .table-wrap .pagination { border-top: 1px solid var(--border); margin: 0; padding: var(--s-3) var(--s-4); justify-content: space-between; }

@media (max-width: 1100px) {
  .chip-btn > span { display: none; } /* icon-only actions on narrow screens */
  .chip-btn.chip-danger > span, .chip-btn.chip-success > span { display: inline; }
}
@media (max-width: 760px) {
  .shell-admin .table thead th { padding: 10px 12px; }
  .shell-admin .table tbody td { padding: 12px; }
}
.shell-admin .table td.small { white-space: nowrap; color: var(--text-2); }

/* Accounting cards */
.kpi-money { font-size: 24px !important; white-space: nowrap; }
.kpi-skeleton { min-height: 128px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: kpi-shimmer 1.2s linear infinite; }
@keyframes kpi-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.kpi-warn .kpi-icon { background: var(--cx-warning-bg); color: var(--cx-warning); }
.kpi-bad .kpi-icon { background: var(--cx-danger-bg); color: var(--cx-danger); }
.shell-admin .table tr.row-link { cursor: pointer; }
/* Member page header without the cover banner */
.co-head-plain .co-head-body { align-items: center; padding-top: var(--s-5); }
.co-head-plain .co-head-body > .avatar { margin-top: 0; border: 0; }
.co-head-plain .co-head-text { padding-top: 0; }

/* Company overview tab */
.ov-applicant { color: inherit; text-decoration: none !important; border-radius: var(--r-md); padding-inline: 8px; margin-inline: -8px; }
.ov-applicant:hover { background: var(--surface-2); }
.setup-list { display: flex; flex-direction: column; gap: 4px; }
.setup-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-md); font-size: var(--fs-sm); color: var(--text-2); text-decoration: none !important; }
a.setup-item:hover { background: var(--primary-soft); color: var(--primary); }
a.setup-item > .icon:first-child { color: var(--primary); }
.setup-item.done { color: var(--text-faint); text-decoration: line-through !important; }
.setup-item.done > .icon { color: var(--cx-success); }

/* Onboarding: company logo + cover preview */
.onb-brand { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface); padding-bottom: 46px; }
.onb-brand-cover { height: 120px; background: linear-gradient(120deg, var(--cx-navy-800), var(--cx-blue-600)); background-size: cover; background-position: center; }
.onb-brand-logo { position: absolute; inset-inline-start: 18px; bottom: 10px; }
.onb-brand-logo .avatar { border: 4px solid var(--surface); }

/* ===== Courses ===== */
.course-band { position: relative; height: 92px; display: flex; align-items: flex-end; justify-content: space-between; padding: 12px 14px;
  background: linear-gradient(120deg, var(--cx-navy-800), var(--cx-blue-600)); color: #fff; }
.course-band-lg { height: 120px; }
.course-band-language { background: linear-gradient(120deg, #13284A, #1F5BFF); }
.course-band-hospitality { background: linear-gradient(120deg, #0A1A33, #0C968F); }
.course-band-culinary { background: linear-gradient(120deg, #4A2A13, #D97706); }
.course-band-diving { background: linear-gradient(120deg, #0B3B5C, #0EA5E9); }
.course-band-computer { background: linear-gradient(120deg, #1E1B4B, #6366F1); }
.course-band-soft_skills { background: linear-gradient(120deg, #3B0A3F, #C026D3); }
.course-band-management { background: linear-gradient(120deg, #1F2937, #475569); }
.course-band-other { background: linear-gradient(120deg, #13284A, #3B74FF); }
.course-band-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.16); }
.course-band-icon .icon { width: 24px; height: 24px; }
.course-mode { background: rgba(255,255,255,.92); color: var(--cx-navy-800); }
.course-mode.is-online { color: var(--primary); }
.table .course-mode { background: var(--surface-2); }
.course-price { font-weight: 700; font-size: var(--fs-sm); color: var(--brand); white-space: nowrap; }
.course-price.is-free, .course-price-big.is-free { color: var(--cx-success); }
.course-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s-3); }
.course-chips .chip { cursor: pointer; }
.course-chips .chip.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.course-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-4); align-items: start; }
.course-head { overflow: hidden; }
.course-head h1 { font-size: 26px; letter-spacing: -0.02em; color: var(--brand); }
.course-price-big { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--brand); }
.course-facts { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.course-facts div { display: flex; flex-direction: column; gap: 2px; }
.course-facts dt { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.course-facts dd { margin: 0; font-size: var(--fs-sm); color: var(--text); }
@media (max-width: 900px) { .course-detail { grid-template-columns: minmax(0, 1fr); } }
.manage-events-head { font-size: var(--fs-md); margin: var(--s-2) 4px 0; }

/* Internships (reuse the course card styles) */
.intern-band { background: linear-gradient(120deg, #0A1A33, #0C968F); }
.intern-app .input-sm { height: 32px; font-size: var(--fs-sm); }

/* Internship detail page (/internships/:id) */
.intern-detail { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-5); }
.intern-hero { overflow: hidden; }
.intern-hero-band { position: relative; height: 150px; display: flex; align-items: flex-start; justify-content: flex-end; padding: 16px 18px;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.16), transparent 45%), linear-gradient(120deg, #0A1A33 0%, #0B4F63 55%, #0C968F 100%); }
.intern-hero-body { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0 var(--s-6) var(--s-5); }
.intern-hero-logo { margin-top: -40px; margin-bottom: 8px; }
.intern-hero-logo .avatar { border: 4px solid var(--surface); box-shadow: var(--shadow-sm, 0 2px 8px rgba(10,26,51,.12)); background: var(--surface); }
.intern-hero h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; color: var(--brand); margin: 0; }
.intern-company { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: var(--text); text-decoration: none; font-size: var(--fs-sm); }
.intern-company:hover .strong { color: var(--primary); text-decoration: underline; }
.intern-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0; border-top: 1px solid var(--border); background: var(--surface-2); }
.intern-highlights > div { display: flex; align-items: center; gap: 12px; padding: 16px var(--s-5); min-width: 0; }
.intern-highlights > div + div { border-inline-start: 1px solid var(--border); }
.intern-hl-icon { flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(12,150,143,.12); color: #0C968F; }
.intern-hl-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.intern-hl-text dt { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.intern-hl-text dd { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.intern-sec-head { display: flex; align-items: center; justify-content: flex-start; gap: 10px; }
.intern-sec-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); color: var(--primary); }
.intern-text { font-size: 15px; line-height: 1.75; color: var(--text); }
.intern-side { position: sticky; top: calc(var(--nav-h) + var(--s-5)); }
.intern-apply-card { border-top: 4px solid #0C968F; }
.intern-pay { display: flex; flex-direction: column; gap: 4px; }
.intern-pay-amount { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--brand); }
.intern-pay-amount.is-free { color: var(--text-muted); font-size: 24px; }
.intern-pay-cur { font-size: 18px; font-weight: 700; }
.intern-pay-per { font-family: var(--font-body, inherit); font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); }
.intern-places { display: flex; flex-direction: column; gap: 6px; }
.intern-bar { height: 8px; border-radius: 99px; background: var(--cx-gray-200); overflow: hidden; }
.intern-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0C968F, #1F5BFF); }
.intern-deadline { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: var(--fs-sm); color: var(--text); }
.intern-deadline.is-soon { background: rgba(217,119,6,.1); color: #B45309; }
.intern-free { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(22,163,74,.09); color: var(--cx-success); font-size: var(--fs-sm); font-weight: 600; }
.intern-action { display: flex; flex-direction: column; gap: 10px; padding-top: var(--s-2); border-top: 1px solid var(--border); }
.intern-action > .badge { align-self: flex-start; }
.intern-co-card { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) {
  .intern-side { position: static; }
  .intern-hero-band { height: 110px; }
  .intern-hero-body { padding: 0 var(--s-4) var(--s-4); }
  .intern-hero h1 { font-size: 24px; }
  .intern-highlights { grid-template-columns: 1fr 1fr; }
  .intern-highlights > div { padding: 12px var(--s-4); }
  .intern-highlights > div + div { border-inline-start: 0; }
  .intern-highlights > div:nth-child(even) { border-inline-start: 1px solid var(--border); }
  .intern-highlights > div:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* Admin sign-in page (/admin/login) */
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: var(--s-6) max(16px, env(safe-area-inset-left, 0px)); background: radial-gradient(circle at 80% 20%, rgba(31,91,255,.35), transparent 55%), var(--cx-navy-900); }
.admin-login-card { width: min(100%, 400px); display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-8); border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.admin-login-card h1 { margin-top: 8px; font-size: 24px; color: var(--brand); }
.admin-login-brand .brand { color: var(--brand); }

/* Admin company page: courses / internships / events */
.co-learning { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.co-learning-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.co-learning-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.co-learning-list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-md); min-width: 0; }
.co-learning-list li a { font-weight: 600; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-learning-list .badge { align-self: flex-start; }
@media (max-width: 1100px) { .co-learning { grid-template-columns: minmax(0, 1fr); } }

/* Onboarding on phones: gradient band (logo, language, finish later), the step on a sheet over it, actions pinned to the bottom */
@media (max-width: 760px) {
  .onb { background: var(--surface); }
  .onb-top { padding: 14px 16px 46px; border-bottom: 0; background: linear-gradient(120deg, #0A1A33, #0C968F); }
  .onb-top .brand { color: #fff; }
  .onb-top .brand-word { font-size: 21px; }
  .onb-top .brand-word b { background-image: linear-gradient(120deg, #5EEAD4, #0C968F); }
  .onb-top .row { gap: 8px; }
  .onb-top .lang-switch { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff; }
  .onb-top .lang-switch > span { display: none; }
  .onb-top [data-skip-all] { height: 34px; padding: 0 12px; border-radius: var(--r-pill); background: rgba(255,255,255,.12); color: #fff; font-size: var(--fs-sm); }
  .onb-top [data-skip-all]:hover { background: rgba(255,255,255,.2); }
  .onb-main { position: relative; z-index: 1; flex: 1; margin-top: -28px; padding: 0; display: flex; flex-direction: column; }
  .onb-card { flex: 1; width: 100%; max-width: none; padding: 24px 20px 20px !important; border: 0; border-radius: 26px 26px 0 0; box-shadow: 0 -10px 30px rgba(10,26,51,.18); }
  .onb-card h1 { font-size: 23px; }
  .onb-progress span { height: 5px; }
  .onb-progress span.is-done { background: linear-gradient(90deg, #0A1A33, #0C968F); }
  .onb-card .input, .onb-card .select { height: 46px; border-radius: 12px; }
  .onb-actions { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(10,26,51,.06); }
  .onb-actions .btn { height: 46px; }
  .onb-actions .btn-primary { min-width: 130px; }
  .onb-main > p { margin: 0 !important; padding: 4px 20px calc(96px + env(safe-area-inset-bottom)); background: var(--surface); }
}

/* Admin sidebar: count of employer accounts waiting for approval */
.admin-nav .nav-count { margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; display: inline-grid; place-items: center;
  background: #F59E0B; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.admin-nav .nav-count.hidden { display: none; }

/* Pending approval page (/pending-approval) */
.approval-state { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); text-align: center; }
.approval-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; color: #fff;
  background: linear-gradient(120deg, #0A1A33, #0C968F); box-shadow: 0 10px 24px rgba(12,150,143,.3); }
.approval-state.is-rejected .approval-icon { background: linear-gradient(120deg, #7F1D1D, #DC2626); box-shadow: 0 10px 24px rgba(220,38,38,.25); }
.approval-state h1 { font-size: 24px; margin: 6px 0 0; }
.approval-state > p { margin: 0; }
.approval-note { align-self: stretch; text-align: start; padding: 12px 14px; border-radius: 12px; background: rgba(220,38,38,.07); border: 1px solid rgba(220,38,38,.2); }
.approval-note p { margin: 4px 0 0; font-size: var(--fs-sm); }
.approval-steps { align-self: stretch; display: flex; flex-direction: column; gap: 10px; margin: 8px 0 4px; padding: 0; list-style: none; text-align: start; }
.approval-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: var(--fs-sm); color: var(--text-muted); }
.approval-dot { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cx-gray-200); color: var(--text-muted); }
.approval-steps li.is-done { color: var(--text); }
.approval-steps li.is-done .approval-dot { background: rgba(12,150,143,.15); color: #0C968F; }
.approval-steps li.is-current { color: var(--text); font-weight: 600; background: rgba(245,158,11,.1); }
.approval-steps li.is-current .approval-dot { background: #F59E0B; color: #fff; animation: approval-pulse 1.8s ease-in-out infinite; }
.approval-actions { align-self: stretch; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
@keyframes approval-pulse { 50% { box-shadow: 0 0 0 6px rgba(245,158,11,.2); } }
@media (prefers-reduced-motion: reduce) { .approval-steps li.is-current .approval-dot { animation: none; } }
/* Register: "employer accounts are reviewed" notice under the account type */
.employer-approval-hint { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(245,158,11,.1); color: #92400E; font-size: var(--fs-sm); line-height: 1.45; }
.employer-approval-hint .icon { flex: none; margin-top: 1px; color: #B45309; }
.employer-approval-hint.hidden { display: none; }

/* Onboarding on laptops & desktops: same look as on phones — gradient band (logo, language, finish later)
   with the step on a centred card that overlaps it; the action bar sticks to the bottom of the card */
@media (min-width: 761px) {
  .onb { background: var(--bg); }
  .onb-top { padding: 22px 40px 120px; border-bottom: 0;
    background: radial-gradient(circle at 80% 10%, rgba(94,234,212,.25), transparent 45%), linear-gradient(120deg, #0A1A33, #0C968F); }
  .onb-top .brand { color: #fff; }
  .onb-top .brand-word { font-size: 22px; }
  .onb-top .brand-word b { background-image: linear-gradient(120deg, #5EEAD4, #0C968F); }
  .onb-top .row { gap: 10px; }
  .onb-top .lang-switch { height: 36px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff; }
  .onb-top .lang-switch:hover { background: rgba(255,255,255,.2); }
  .onb-top [data-skip-all] { height: 36px; padding: 0 16px; border-radius: var(--r-pill); background: rgba(255,255,255,.12); color: #fff; }
  .onb-top [data-skip-all]:hover { background: rgba(255,255,255,.2); }
  .onb-main { margin-top: -88px; padding: 0 var(--s-4) var(--s-10); }
  .onb-card { max-width: 960px; padding: 32px 48px 0 !important; border: 0; border-radius: 26px; box-shadow: 0 24px 60px rgba(10,26,51,.16); }
  .onb-card h1 { font-size: 26px; }
  .onb-progress span { height: 5px; }
  .onb-progress span.is-done { background: linear-gradient(90deg, #0A1A33, #0C968F); }
  .onb-card .input, .onb-card .select { height: 46px; border-radius: 12px; }
  .onb-card .choice[aria-pressed="true"] { border-color: #0C968F; background: rgba(12,150,143,.08); }
  .onb-card .choice .icon { color: #0C968F; }
  .onb-actions { position: sticky; bottom: 0; z-index: 5; margin: var(--s-2) -48px 0; padding: 14px 48px 18px; border-top: 1px solid var(--border);
    background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-radius: 0 0 26px 26px; }
  .onb-actions .btn { height: 44px; }
  .onb-actions .btn-primary { min-width: 140px; }
}
/* Onboarding on laptops & desktops: three fields per row */
@media (min-width: 761px) {
  .onb-card .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4) 20px; }
  .onb-card .form-grid > .span-2 { grid-column: auto; }
}
/* Onboarding on laptops & desktops: the top bar stays put and only the body scrolls (scrollbar under the bar).
   The band continues into the scroll area so the card still overlaps it; a horizontal gradient keeps the seam invisible. */
@media (min-width: 761px) {
  html:has(.onb), html:has(.onb) body { height: 100%; overflow: hidden; }
  html:has(.onb) #app, html:has(.onb) #view { height: 100%; }
  .onb { height: 100%; min-height: 0; }
  .onb-top { flex: none; padding: 20px 40px; background: linear-gradient(90deg, #0A1A33, #0C968F); }
  .onb-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; margin-top: 0; padding: 8px var(--s-4) var(--s-10);
    background: linear-gradient(90deg, #0A1A33, #0C968F) top / 100% 96px no-repeat, var(--bg); }
}
/* Onboarding: "Step 2 of 4" above the progress bars; long text boxes use the full width */
.onb-progress-wrap { display: flex; flex-direction: column; gap: 8px; }
.onb-step-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #0C968F; }
:root[lang="ar"] .onb-step-label { letter-spacing: 0; }
.onb-card .form-grid > .span-2:has(textarea), .onb-card .form-grid > .field:has(textarea) { grid-column: 1 / -1; }
/* Onboarding on laptops & desktops: only the card scrolls — the page, band and top bar stay still;
   the action bar stays at the bottom of the card */
@media (min-width: 761px) {
  .onb-main { overflow: hidden; display: flex; flex-direction: column; padding-bottom: var(--s-4); }
  .onb-card { flex: 0 1 auto; min-height: 0; width: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  }
  @supports not selector(::-webkit-scrollbar) { .onb-card { scrollbar-width: thin; scrollbar-color: rgba(12,150,143,.45) transparent; } }
  .onb-card::-webkit-scrollbar { width: 8px; }
  .onb-card::-webkit-scrollbar-thumb { background: rgba(12,150,143,.45); border-radius: 99px; }
  .onb-card::-webkit-scrollbar-track { margin: 28px 0 84px; } /* shorter track: clear of the rounded top and the action bar */
  .onb-main > p { flex: none; }
}

/* "Company or employer?" picker (register + onboarding) */
.kind-pick { display: flex; flex-direction: column; gap: 8px; }
.kind-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kind-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px; text-align: start; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.kind-option:hover { border-color: var(--cx-gray-400); }
.kind-option[aria-checked="true"] { border-color: #0C968F; background: rgba(12,150,143,.08); }
.kind-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: #0C968F; }
.kind-option[aria-checked="true"] .kind-icon { background: linear-gradient(120deg, #0A1A33, #0C968F); color: #fff; }
.kind-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.35; }
@media (max-width: 640px) { .kind-grid { grid-template-columns: minmax(0, 1fr); } .kind-option { align-items: center; } }

/* Onboarding › "Your HR team" (hotels) */
.hr-rows { display: flex; flex-direction: column; gap: 12px; }
.hr-row { position: relative; padding: 14px 16px; padding-inline-end: 48px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.hr-row .input, .hr-row .select { background: var(--surface); }
.hr-remove { position: absolute; top: 10px; inset-inline-end: 10px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); cursor: pointer; }
.hr-remove:hover { background: rgba(220,38,38,.1); color: var(--cx-danger); }
.hr-add { align-self: flex-start; }
.hr-added { display: flex; flex-direction: column; gap: 8px; }
.hr-person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
@media (min-width: 761px) { .onb-card .hr-row .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; } }
/* Onboarding: Back sits on the page (on the gradient band) just above the step card, not inside the step's form */
.onb-back-row { display: flex; margin: 0 auto 12px; }
.onb-back { height: 34px; padding: 0 14px 0 10px; border-radius: var(--r-pill); border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.12); color: #fff; }
.onb-back:hover { background: rgba(255,255,255,.2); }
@media (max-width: 760px) {
  .onb-top { padding-bottom: 82px; }
  .onb-main { margin-top: -74px; }
  .onb-back-row { padding: 0 16px; }
}
@media (min-width: 761px) { .onb-back-row { width: 100%; max-width: 960px; } }
/* Reactions on phones (like Facebook): tap Like = like; press and hold Like opens the picker (.is-picking, set in posts.js) */
@media (hover: none) {
  .react-wrap:focus-within .react-picker { display: none; }
  .post-action[data-post-act="like"] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
.react-wrap.is-picking .react-picker { display: flex; }
.react-picker button { padding: 0; line-height: 1; }
