/* ============ DC Hub — Sky UI ============ */
:root {
  --sky-50: #f0f9ff; --sky-100: #e0f2fe; --sky-200: #bae6fd; --sky-300: #7dd3fc;
  --sky-400: #38bdf8; --sky-500: #0ea5e9; --sky-600: #0284c7; --sky-700: #0369a1;
  --ink: #0b2540; --ink-2: #27425f; --muted: #5d748e; --line: #d9eaf7; --bg: #f4faff;
  --grad: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 45%, #0284c7 100%);
  --grad-soft: linear-gradient(135deg, #e0f2fe, #f0f9ff);
  --shadow-sm: 0 1px 2px rgba(11, 37, 64, .04), 0 4px 14px rgba(14, 165, 233, .06);
  --shadow: 0 2px 4px rgba(11, 37, 64, .04), 0 14px 40px rgba(14, 165, 233, .12);
  --shadow-lg: 0 30px 80px rgba(2, 132, 199, .22);
  --r: 22px; --r-sm: 14px;
  --tabbar: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font, "Readex Pro"), "Segoe UI", Tahoma, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.75; -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden;
  padding-bottom: var(--tabbar);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(62rem 40rem at 88% -12%, rgba(56, 189, 248, .30), transparent 60%),
    radial-gradient(48rem 36rem at -5% 8%, rgba(125, 211, 252, .34), transparent 60%),
    radial-gradient(44rem 30rem at 50% 115%, rgba(34, 211, 238, .16), transparent 60%), var(--bg);
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; letter-spacing: -.01em; }
p { margin: 0; }
img, svg { max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--sky-500); outline-offset: 2px; }
.ic { flex: none; vertical-align: -3px; }
.verified { flex: none; vertical-align: -4px; display: inline-block; }
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.inline { display: inline; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.center { text-align: center; }
.mt { margin-top: 18px; }
.hidden, [hidden] { display: none !important; }
.grad-text { background: linear-gradient(120deg, #0ea5e9, #22d3ee 55%, #0284c7); -webkit-background-clip: text; background-clip: text; color: transparent; }
code { background: var(--sky-100); color: var(--sky-700); padding: 1px 7px; border-radius: 7px; font-size: .88em; direction: ltr; unicode-bidi: isolate; }

/* ---------- Nav ---------- */
.nav-wrap { position: relative; z-index: 50; padding-inline: 14px; margin-top: 12px; }
.nav {
  max-width: 1180px; margin-inline: auto; display: flex; align-items: center; gap: 14px;
  padding: 8px 10px; padding-inline-start: 18px;
  background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .9); border-radius: 999px; box-shadow: var(--shadow);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(14, 165, 233, .4); }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-links a { padding: 7px 13px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: .94rem; transition: .2s; }
.nav-links a:hover { background: var(--sky-50); color: var(--sky-700); }
.nav-links a.active { background: var(--sky-100); color: var(--sky-700); }
.nav-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; transition: .2s; }
.icon-btn:hover { background: var(--sky-100); color: var(--sky-700); }
.bell .dot { position: absolute; top: -3px; inset-inline-end: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid #fff; box-sizing: content-box; }

/* ---------- Bottom tab bar (mobile / PWA) ---------- */
.tabbar { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 10px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .96rem; cursor: pointer; white-space: nowrap; text-align: center;
  transition: transform .18s, box-shadow .18s, background .18s, border-color .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(14, 165, 233, .36); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(14, 165, 233, .48); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--sky-50); }
.btn-soft { background: var(--sky-100); color: var(--sky-700); }
.btn-soft:hover { background: var(--sky-200); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--sky-300); color: var(--sky-700); }
.btn-danger { background: #fff1f2; color: #be123c; }
.btn-danger:hover { background: #ffe4e6; }
.btn-google { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-google:hover { border-color: var(--sky-300); }
.btn-sm { min-height: 36px; padding: 6px 15px; font-size: .88rem; }
.btn-lg { min-height: 52px; padding: 13px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; transform: none; box-shadow: none; }
summary.btn { list-style: none; width: fit-content; }
summary.btn::-webkit-details-marker { display: none; }

/* ---------- Cards / badges ---------- */
.card { background: rgba(255, 255, 255, .94); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 24px; }
.card-title { font-size: 1.08rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.avatar { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--grad-soft); border: 1px solid var(--sky-200); color: var(--sky-700); font-weight: 700; font-size: 1rem; }
.avatar-lg { width: 56px; height: 56px; border-radius: 18px; font-size: 1.15rem; }
.avatar-xl { width: 84px; height: 84px; border-radius: 26px; font-size: 1.7rem; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--sky-100); color: var(--sky-700); }
.st-new { background: #e0f2fe; color: #0369a1; }
.st-reviewed { background: #fef3c7; color: #92400e; }
.st-shortlisted { background: #ede9fe; color: #5b21b6; }
.st-rejected { background: #ffe4e6; color: #be123c; }
.st-hired, .st-open { background: #dcfce7; color: #166534; }
.st-closed { background: #e2e8f0; color: #475569; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; background: var(--sky-50); border: 1px solid var(--line); color: var(--ink-2); font-size: .82rem; }
a.tag:hover, .tag-on { background: var(--sky-500); border-color: var(--sky-500); color: #fff; }
.tag-salary { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.tag-verified { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; font-weight: 600; }
.chip { display: inline-block; padding: 4px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--sky-200); color: var(--sky-700); font-size: .84rem; font-weight: 500; direction: ltr; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Flash ---------- */
.flashes { margin-top: 18px; display: grid; gap: 8px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 18px; border-radius: var(--r-sm); font-weight: 500; border: 1px solid; }
.flash .ic { margin-top: 5px; }
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-error { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.flash-info { background: var(--sky-50); border-color: var(--sky-200); color: var(--sky-700); }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 36px; }
.hero-center { text-align: center; max-width: 900px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .85); border: 1px solid var(--sky-200); color: var(--sky-700); font-size: .86rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.7rem); font-weight: 700; margin: 22px 0 16px; line-height: 1.25; text-wrap: balance; }
.hero .lead { font-size: clamp(1rem, 2vw, 1.18rem); color: var(--ink-2); max-width: 640px; margin-inline: auto; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; align-items: center; }
.hero-center .hero-cta { justify-content: center; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 44px auto 0; max-width: 760px;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); padding: 20px 10px;
}
.hero-stats > div + div { border-inline-start: 1px solid var(--line); }
.hero-stats strong { display: block; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.2; color: var(--sky-700); }
.hero-stats span { color: var(--muted); font-size: .86rem; }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.95rem); }
.section-head p { color: var(--muted); margin-top: 4px; }
.grid { display: grid; gap: 18px; }
.grid > *, .cta-grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }

.feature .num { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--grad); color: #fff; margin-bottom: 14px; box-shadow: 0 8px 20px rgba(14, 165, 233, .32); }
.feature h3 { font-size: 1.1rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .95rem; }

.job-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.job-card:hover, .post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--sky-300); }
.job-head { min-width: 0; }
.job-head h3 { font-size: 1.08rem; line-height: 1.55; overflow-wrap: anywhere; }
.job-co { color: var(--sky-600); font-weight: 600; font-size: .95rem; margin-top: 2px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .88rem; }
.job-meta .ic { color: var(--sky-400); }
.job-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--sky-50); margin-top: auto; }
.salary { color: #047857; font-size: .96rem; }

.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cta { border-radius: 26px; padding: 34px; }
.cta h3 { font-size: 1.35rem; margin-bottom: 8px; }
.cta p { margin-bottom: 20px; max-width: 560px; }
.cta-dark { background: var(--grad); color: #fff; box-shadow: var(--shadow-lg); }
.cta-dark p { color: rgba(255, 255, 255, .92); }
.cta-dark .btn { background: #fff; color: var(--sky-700); }
.cta-dark .verified path:first-of-type { fill: #fff; }
.cta-dark .verified path:last-of-type { stroke: var(--sky-600); }
.cta-light { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.cta-light p { color: var(--muted); }
.cta-slim { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 26px 30px; }
.cta-slim p { margin-bottom: 0; }

/* ---------- Page head ---------- */
.page-head { padding: 50px 0 24px; }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin: 14px 0 10px; }
.page-head p { color: var(--ink-2); max-width: 720px; font-size: 1.04rem; }

/* ---------- About ---------- */
.prose p { color: var(--ink-2); margin-bottom: 12px; }
.prose p:last-child { margin-bottom: 0; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.check-list li .ic { color: var(--sky-500); margin-top: 5px; }
.path { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.path .step { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 14px; text-align: center; }
.path .step b { display: block; direction: ltr; font-size: .92rem; }
.path .step span { color: var(--muted); font-size: .8rem; }
.path .step i { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 8px; border-radius: 50%; background: var(--grad); color: #fff; font-style: normal; font-weight: 700; font-size: .85rem; }
.doc-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.doc-type { padding: 14px 16px; border-radius: 16px; background: var(--sky-50); border: 1px solid var(--line); }
.doc-type b { display: block; direction: ltr; text-align: start; color: var(--sky-700); }
.doc-type span { color: var(--muted); font-size: .86rem; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.field .hint { color: var(--muted); font-size: .8rem; }
.input {
  width: 100%; min-height: 46px; padding: 10px 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 1rem; outline: 0; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.7; }
.input.mono { font-family: Consolas, "Courier New", monospace; font-size: .95rem; }
.input:focus { border-color: var(--sky-400); box-shadow: 0 0 0 4px rgba(56, 189, 248, .2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.date-pair { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500 !important; cursor: pointer; margin-top: 4px; }
.check input { width: 18px; height: 18px; accent-color: var(--sky-500); }
.error-list { margin: 0 0 16px; padding: 12px 18px; padding-inline-start: 34px; background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; border-radius: var(--r-sm); font-size: .92rem; }

.auth { max-width: 520px; margin: 44px auto; padding-inline: 16px; }
.auth .card { padding: 32px; border-radius: 28px; box-shadow: var(--shadow); }
.auth h1 { font-size: 1.6rem; margin-bottom: 4px; }
.auth .sub { color: var(--muted); margin-bottom: 22px; }
.auth-foot { text-align: center; margin-top: 18px; color: var(--muted); }
.auth-foot a { color: var(--sky-600); font-weight: 600; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .84rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.role-switch input { position: absolute; opacity: 0; pointer-events: none; }
.role-switch label { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: .18s; height: 100%; }
.role-switch label b { display: flex; align-items: center; gap: 8px; }
.role-switch label span { color: var(--muted); font-size: .82rem; }
.role-switch input:checked + label { border-color: var(--sky-400); background: var(--sky-50); box-shadow: 0 0 0 4px rgba(56, 189, 248, .18); }
.role-switch input:focus-visible + label { outline: 2px solid var(--sky-500); outline-offset: 2px; }

/* ---------- Jobs list ---------- */
.filters { display: grid; grid-template-columns: 1.4fr 1fr repeat(3, .8fr) auto; gap: 10px; padding: 14px; border-radius: 24px; }
.filters-2 { grid-template-columns: 1.5fr 1fr; }
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .ic { color: var(--sky-300); margin-bottom: 8px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- Job detail / company ---------- */
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; padding-bottom: 60px; }
.job-hero { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.job-hero h1 { font-size: clamp(1.3rem, 2.6vw, 1.9rem); overflow-wrap: anywhere; }
.sticky { position: sticky; top: 16px; display: grid; gap: 16px; }
.apply-card { border-radius: 26px; box-shadow: var(--shadow); }
.apply-profile { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--sky-50); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 14px; }
.kv { display: grid; gap: 10px; }
.kv div { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: .93rem; }
.kv .ic { color: var(--sky-500); }
.company-mini { display: flex; gap: 12px; align-items: center; }
.company-mini > span:last-child { display: grid; }
.company-mini:hover strong { color: var(--sky-600); }
.company-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 30px; border-radius: 28px; box-shadow: var(--shadow); }
.company-info { flex: 1; min-width: 240px; display: grid; gap: 10px; }
.company-info h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.company-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; padding-top: 30px; padding-bottom: 60px; }
.dash-side { position: sticky; top: 16px; padding: 18px; }
.dash-user { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.dash-user strong, .dash-user span { display: block; }
.dash-nav { display: grid; gap: 4px; }
.dash-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; color: var(--ink-2); font-weight: 500; transition: .15s; white-space: nowrap; }
.dash-nav a:hover { background: var(--sky-50); color: var(--sky-700); }
.dash-nav a.active { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(14, 165, 233, .3); }
.dash-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.dash-head h1 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
.stat { display: flex; gap: 14px; align-items: center; padding: 20px; }
.stat .stat-ic { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--grad-soft); border: 1px solid var(--sky-200); color: var(--sky-600); }
.stat strong { display: block; font-size: 1.6rem; line-height: 1.2; }
.stat strong.stat-text { font-size: 1.05rem; line-height: 1.5; }
.stat span { color: var(--muted); font-size: .88rem; }
.progress { height: 9px; border-radius: 999px; background: var(--sky-100); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .3s; }

.table-wrap { overflow-x: auto; margin: 0 -8px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: start; color: var(--muted); font-weight: 600; font-size: .82rem; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--sky-50); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(240, 249, 255, .6); }
a.link { color: var(--sky-600); font-weight: 600; }
a.link:hover { text-decoration: underline; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.post-row { display: flex; gap: 12px; align-items: center; }
.post-row img { width: 96px; border-radius: 10px; flex: none; }

.applicant { display: grid; gap: 14px; }
.applicant-top { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.applicant-top .who { flex: 1; min-width: 200px; }
.applicant-top h3 { font-size: 1.06rem; }
.contact { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-2); font-size: .9rem; }
.contact a { color: var(--sky-600); }
.note { padding: 12px 16px; border-radius: 14px; background: var(--sky-50); border-inline-start: 3px solid var(--sky-400); color: var(--ink-2); font-size: .93rem; }
.status-form { display: flex; align-items: center; gap: 8px; }
.status-form select { min-height: 38px; padding: 5px 12px; border-radius: 999px; width: auto; font-size: .88rem; }
.exp-details summary { cursor: pointer; color: var(--sky-600); font-weight: 600; font-size: .92rem; width: fit-content; }
.exp-details[open] summary { margin-bottom: 12px; }

/* ---------- Timeline (experiences) ---------- */
.timeline { display: grid; gap: 4px; border-inline-start: 2px solid var(--sky-200); margin-inline-start: 8px; padding-inline-start: 20px; margin-bottom: 18px; }
.tl-item { position: relative; display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 8px 0; }
.tl-item::before { content: ""; position: absolute; inset-inline-start: -28px; top: 15px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--sky-500); }
.tl-body { display: grid; gap: 2px; min-width: 0; }
.tl-body p { color: var(--ink-2); margin-top: 4px; }
.add-exp[open] > summary { margin-bottom: 4px; }

/* ---------- Notifications ---------- */
.notif-list { padding: 8px; }
.notif { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; transition: background .15s; }
.notif + .notif { border-top: 1px solid var(--sky-50); }
.notif:hover { background: var(--sky-50); }
.notif-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--sky-100); color: var(--sky-600); }
.notif-body { display: grid; gap: 1px; min-width: 0; }
.notif.unread { background: linear-gradient(90deg, rgba(224, 242, 254, .7), rgba(240, 249, 255, .3)); }
.notif.unread .notif-ic { background: var(--grad); color: #fff; }
.notif.unread strong::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sky-500); margin-inline-start: 8px; }
.push-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: var(--sky-300); background: var(--sky-50); }

/* ---------- Quiz ---------- */
.quiz-wrap { max-width: 800px; padding-top: 26px; padding-bottom: 60px; }
.quiz { display: grid; gap: 16px; }
.quiz-bar { position: sticky; top: 8px; z-index: 5; padding: 14px 18px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.quiz-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quiz-timer { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 999px; background: var(--sky-100); color: var(--sky-700); font-variant-numeric: tabular-nums; direction: ltr; }
.quiz-timer.low { background: #fee2e2; color: #b91c1c; }
.q { margin: 0; min-width: 0; padding: 26px; }
.q legend { float: inline-start; width: 100%; padding: 0; margin-bottom: 10px; color: var(--muted); font-size: .88rem; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.q h2 { clear: both; font-size: clamp(1.05rem, 2.4vw, 1.3rem); line-height: 1.7; margin-bottom: 18px; }
.options { display: grid; gap: 10px; }
.options-tf { grid-template-columns: 1fr 1fr; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; transition: .15s; }
.option:hover { border-color: var(--sky-300); background: var(--sky-50); }
.option input { flex: none; width: 20px; height: 20px; margin-top: 4px; accent-color: var(--sky-500); }
.option:has(input:checked) { border-color: var(--sky-500); background: var(--sky-50); box-shadow: 0 0 0 4px rgba(56, 189, 248, .16); }
.start-card { padding: 40px 24px; display: grid; gap: 12px; justify-items: center; border-radius: 28px; box-shadow: var(--shadow); }
.result-card { padding: 44px 24px; display: grid; gap: 14px; justify-items: center; border-radius: 30px; box-shadow: var(--shadow); }
.result-card h1 { font-size: clamp(1.3rem, 3.4vw, 1.8rem); }
.score-ring { --c: var(--sky-500); width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--sky-100) 0); }
.score-ring > div { width: 136px; height: 136px; border-radius: 50%; background: #fff; display: grid; place-content: center; }
.score-ring strong { font-size: 2.3rem; line-height: 1.1; color: var(--ink); }
.score-ring span { color: var(--muted); font-size: .9rem; direction: ltr; }
.is-pass .score-ring { --c: #16a34a; }
.is-fail .score-ring { --c: #f59e0b; }
.cert-frame { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: #fff; line-height: 0; }
.cert-frame img { width: 100%; display: block; }

/* ---------- Blog ---------- */
.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.post-card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; background: var(--sky-100); }
.post-card-body { padding: 18px 20px 20px; display: grid; gap: 8px; align-content: start; flex: 1; }
.post-card-body .badge { width: fit-content; }
.post-card-body h3 { font-size: 1.06rem; line-height: 1.6; }
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; padding-top: 30px; padding-bottom: 40px; }
.article { padding: 34px 40px 40px; border-radius: 28px; box-shadow: var(--shadow); min-width: 0; }
.crumbs a:hover { color: var(--sky-600); }
.article-head { margin: 12px 0 20px; display: grid; gap: 10px; }
.article-head h1 { font-size: clamp(1.5rem, 4vw, 2.3rem); line-height: 1.45; text-wrap: balance; }
.article-cover { width: 100%; border-radius: 24px; box-shadow: var(--shadow); display: block; aspect-ratio: 1200 / 630; background: var(--sky-100); }
.article-lead { font-size: 1.14rem; color: var(--ink-2); margin: 24px 0 6px; padding-inline-start: 16px; border-inline-start: 4px solid var(--sky-400); }
.article-body { font-size: 1.08rem; line-height: 2; color: var(--ink-2); }
.article-body h2 { font-size: 1.45rem; color: var(--ink); margin: 34px 0 10px; }
.article-body h3 { font-size: 1.2rem; color: var(--ink); margin: 26px 0 8px; }
.article-body p { margin: 0 0 16px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-inline-start: 26px; }
.article-body li { margin-bottom: 6px; }
.article-body li::marker { color: var(--sky-500); font-weight: 700; }
.article-body a { color: var(--sky-600); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.article-body strong { color: var(--ink); }

/* ---------- Quiz (سؤال بسؤال) ---------- */
.quiz-app { display: grid; gap: 16px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.quiz-app .q { display: block; }
.q-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.q-clock { display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 8px; border-radius: 50%; background: var(--sky-100); color: var(--sky-700); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.q-clock.low { background: #fee2e2; color: #b91c1c; }
.q-bar { height: 5px; border-radius: 999px; background: var(--sky-100); overflow: hidden; margin-bottom: 20px; }
.q-bar i { display: block; height: 100%; width: 100%; background: var(--grad); border-radius: inherit; transform-origin: right; }
.option-btn { width: 100%; text-align: start; font-weight: 500; color: var(--ink); line-height: 1.7; }
.option-btn:disabled { opacity: .55; cursor: default; }
.option-btn.picked { border-color: var(--sky-500); background: var(--sky-50); opacity: 1; box-shadow: 0 0 0 4px rgba(56, 189, 248, .16); }
.result-icon { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: #fee2e2; color: #b91c1c; }
.card-warn { border-color: #fde68a; background: #fffdf5; }
.card-warn .check-list li .ic { color: #d97706; }

/* ---------- Admin: tabs / questions ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.tabs a:hover { border-color: var(--sky-300); }
.tabs a.active { background: var(--grad); border-color: transparent; color: #fff; }
.qa-item { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; padding: 14px 4px; border-bottom: 1px solid var(--sky-50); }
.qa-item:last-child { border-bottom: 0; }
.qa-item.is-off { opacity: .55; }
.qa-body { min-width: 0; display: grid; gap: 8px; }
.qa-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-opts span { padding: 3px 10px; border-radius: 9px; background: var(--sky-50); border: 1px solid var(--line); font-size: .84rem; color: var(--ink-2); }
.qa-opts span.ok { background: #dcfce7; border-color: #86efac; color: #166534; font-weight: 600; }
.opt-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.opt-row input[type=radio] { flex: none; width: 20px; height: 20px; accent-color: #16a34a; }

/* ---------- AI Insert / modal ---------- */
.btn-ai { background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; box-shadow: 0 8px 22px rgba(99, 102, 241, .3); }
.modal { width: min(640px, calc(100vw - 28px)); border: 0; border-radius: 24px; padding: 24px; box-shadow: var(--shadow-lg); color: var(--ink); }
.modal::backdrop { background: rgba(11, 37, 64, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modal-head h2 { font-size: 1.2rem; display: flex; gap: 8px; align-items: center; }
.modal textarea { margin: 12px 0; }
.is-filled { animation: filled 1.6s ease-out; }
@keyframes filled { from { box-shadow: 0 0 0 4px rgba(99, 102, 241, .35); border-color: #6366f1; } to { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Editor ---------- */
.editor { border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; }
.editor:focus-within { border-color: var(--sky-400); box-shadow: 0 0 0 4px rgba(56, 189, 248, .18); }
.ed-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 8px; background: var(--sky-50); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; }
.ed-bar button, .ed-bar select, .ed-color { min-width: 36px; height: 36px; padding: 0 9px; border: 1px solid transparent; border-radius: 10px; background: #fff; color: var(--ink-2); font-size: .88rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.ed-bar button:hover, .ed-bar select:hover, .ed-color:hover { border-color: var(--sky-300); color: var(--sky-700); }
.ed-color { position: relative; font-weight: 700; color: var(--sky-600); overflow: hidden; }
.ed-color.ed-hl { color: #eab308; }
.ed-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ed-sep { width: 1px; height: 22px; background: var(--line); margin-inline: 3px; }
.ed-area { min-height: 380px; padding: 20px 22px; outline: 0; }
.ed-area:empty::before { content: attr(data-placeholder); color: var(--muted); }
.ed-area.is-busy { opacity: .5; pointer-events: none; }
.ed-source { border: 0; border-radius: 0; min-height: 380px; }
.cover-pick { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cover-pick img { width: 240px; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: var(--sky-100); }
.cover-pick > div { flex: 1; min-width: 240px; display: grid; gap: 6px; }

/* عناصر المحتوى الغني داخل المقال والمحرر */
.article-body img { max-width: 100%; height: auto; border-radius: 16px; margin: 10px 0; display: block; }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: .96rem; display: block; overflow-x: auto; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: start; min-width: 90px; }
.article-body th { background: var(--sky-50); color: var(--ink); }
.article-body blockquote { margin: 0 0 18px; padding: 12px 18px; border-inline-start: 4px solid var(--sky-400); background: var(--sky-50); border-radius: 12px; }
.article-body .video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 20px; border-radius: 18px; overflow: hidden; background: #0b2540; }
.article-body .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }

/* ---------- Brand / logo ---------- */
.brand-logo { height: 38px; width: auto; max-width: 160px; object-fit: contain; display: block; }
.logo-preview { width: auto !important; max-width: 220px; height: 90px !important; aspect-ratio: auto !important; object-fit: contain !important; background: #fff !important; padding: 8px; }

/* ---------- Top announcement bar ---------- */
.topbar { margin: 10px 14px 0; }
.topbar-in { max-width: 1180px; display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 18px;
  background: linear-gradient(90deg, #0b2540, #0c4a6e); color: #e0f2fe; font-size: .9rem; box-shadow: var(--shadow-sm); }
.topbar-text { flex: 1; min-width: 0; font-weight: 500; }
.topbar-links { display: flex; gap: 8px; flex: none; }
.topbar-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px; font-weight: 600; font-size: .84rem; color: #fff; white-space: nowrap; }
.topbar-fb { background: #1877f2; }
.topbar-wa { background: #16a34a; }
.topbar-btn:hover { filter: brightness(1.1); }
.topbar-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #e0f2fe; cursor: pointer; }
.topbar-x:hover { background: rgba(255, 255, 255, .2); }

/* ---------- Community ad cards ---------- */
.section-tight { padding: 6px 0 10px; }
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.promo-grid.promo-stack { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.promo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px 22px; border-radius: 22px;
  border: 1px solid; transition: transform .2s, box-shadow .2s; }
.promo:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.promo-fb { background: linear-gradient(135deg, #eff6ff, #fff); border-color: #bfdbfe; }
.promo-wa { background: linear-gradient(135deg, #ecfdf5, #fff); border-color: #a7f3d0; }
.promo-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; }
.promo-fb .promo-ic { background: #1877f2; box-shadow: 0 8px 20px rgba(24, 119, 242, .3); }
.promo-wa .promo-ic { background: #16a34a; box-shadow: 0 8px 20px rgba(22, 163, 74, .3); }
.promo-body { display: grid; gap: 3px; min-width: 0; }
.promo-body strong { font-size: 1.05rem; color: var(--ink); }
.promo-body > span { color: var(--muted); font-size: .9rem; line-height: 1.7; }
.promo-btn { padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: #fff; white-space: nowrap; }
.promo-fb .promo-btn { background: #1877f2; }
.promo-wa .promo-btn { background: #16a34a; }
.promo-warn { font-style: normal; font-size: .78rem; color: #b45309; font-weight: 600; }
.promo-stack .promo { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
.promo-stack .promo-btn { grid-column: 1 / -1; text-align: center; }

/* ---------- Article sidebar / verify box ---------- */
.article-side { position: sticky; top: 16px; display: grid; gap: 16px; }
.side-list { display: grid; gap: 4px; padding: 18px; }
.side-list a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 14px; font-size: .9rem; font-weight: 600; line-height: 1.6; color: var(--ink-2); }
.side-list a:hover { background: var(--sky-50); color: var(--sky-700); }
.side-list img { width: 96px; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 10px; background: var(--sky-100); }
.side-jobs p { margin-bottom: 12px; }
.verify-box { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-top: 34px; padding: 22px 24px;
  border-radius: 22px; background: linear-gradient(135deg, #eff6ff, #f0f9ff); border: 1px solid #bfdbfe; }
.verify-box h3 { font-size: 1.15rem; margin-bottom: 4px; }
.verify-box p { color: var(--ink-2); font-size: .95rem; }
.verify-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); }

@media (max-width: 980px) {
  .article-wrap { grid-template-columns: minmax(0, 1fr); }
  .article-side { position: static; }
  .promo-grid.promo-stack { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .promo-grid, .promo-grid.promo-stack { grid-template-columns: minmax(0, 1fr); }
  .promo { grid-template-columns: auto minmax(0, 1fr); padding: 16px; gap: 12px; }
  .promo-ic { width: 44px; height: 44px; border-radius: 14px; }
  .promo-btn { grid-column: 1 / -1; text-align: center; }
  .topbar { margin: 8px 10px 0; }
  .topbar-in { flex-wrap: wrap; gap: 8px; padding: 10px 12px; font-size: .84rem; }
  .topbar-text { flex-basis: calc(100% - 42px); }
  .topbar-links { width: 100%; }
  .topbar-btn { flex: 1; justify-content: center; }
  .topbar-x { position: absolute; inset-inline-end: 8px; top: 8px; width: 26px; height: 26px; font-size: .8rem; }
  .topbar-text { padding-inline-end: 28px; }
  .topbar { position: relative; }
}
@media (max-width: 640px) {
  .article-wrap { padding-top: 14px; gap: 14px; }
  .article { padding: 20px 16px 24px; border-radius: 22px; }
  .verify-box { grid-template-columns: auto minmax(0, 1fr); padding: 18px; gap: 12px; }
  .verify-box .btn { grid-column: 1 / -1; width: 100%; }
  .verify-ic { width: 48px; height: 48px; }
}

/* ---------- Footer ---------- */
.footer { margin-top: 30px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .6); }
.footer-in { display: flex; justify-content: space-between; gap: 24px; padding-block: 30px; flex-wrap: wrap; }
.footer-in p { margin: 8px 0 12px; font-size: .92rem; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; color: var(--ink-2); font-weight: 500; }
.footer-links a:hover { color: var(--sky-600); }
.footer-bottom { padding-block: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; text-align: center; }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .job-layout, .dash, .cta-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .path { grid-template-columns: repeat(3, 1fr); }
  .sticky, .dash-side { position: static; }
  .dash-side { padding: 12px; }
  .dash-user { display: none; }
  .dash-nav { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .dash-nav::-webkit-scrollbar { display: none; }
  .dash-nav a { padding: 8px 14px; border-radius: 999px; background: var(--sky-50); font-size: .9rem; }
}

@media (max-width: 820px) {
  :root { --tabbar: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .nav-links, .hide-sm { display: none !important; }
  .nav { padding-inline-start: 14px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(14, 165, 233, .10);
  }
  .tabbar a { display: grid; justify-items: center; gap: 1px; padding: 6px 2px; border-radius: 14px; color: var(--muted); font-size: .72rem; font-weight: 600; }
  .tabbar a.active { color: var(--sky-600); background: var(--sky-50); }
  .footer { display: none; }
  .quiz-bar { top: 70px; }
}

@media (max-width: 640px) {
  .container { padding-inline: 14px; }
  .hero { padding: 38px 0 20px; }
  .hero-cta .btn-lg { width: 100%; }
  .hero-stats { grid-template-columns: 1fr 1fr; padding: 6px; gap: 0; margin-top: 30px; }
  .hero-stats > div { padding: 12px 6px; }
  .hero-stats > div + div { border-inline-start: 0; }
  .hero-stats > div:nth-child(even) { border-inline-start: 1px solid var(--line); }
  .hero-stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section { padding: 30px 0; }
  .page-head { padding: 30px 0 16px; }
  .grid-2, .grid-3, .form-row, .form-row-3, .doc-types, .filters, .filters-2, .role-switch { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .path { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 18px; border-radius: 20px; }
  .stat { padding: 14px; gap: 10px; }
  .stat .stat-ic { width: 40px; height: 40px; border-radius: 13px; }
  .stat strong { font-size: 1.3rem; }
  .auth { margin-top: 24px; }
  .auth .card { padding: 22px; }
  .cta { padding: 24px; border-radius: 24px; }
  .cta-slim .btn { width: 100%; }
  .company-head { padding: 22px; }
  .avatar-xl { width: 64px; height: 64px; border-radius: 20px; font-size: 1.3rem; }
  .dash { padding-top: 16px; gap: 14px; }
  .dash-head .btn { width: 100%; }
  .q { padding: 20px 16px; }
  .quiz-nav .btn { max-width: none; }
  .article-body { font-size: 1.03rem; }
  .status-form { width: 100%; justify-content: space-between; }
  .ed-bar { position: static; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ed-bar > * { flex: none; }
  .ed-area { padding: 16px; min-height: 300px; }
  .qa-item { flex-direction: column; }

  /* الجداول تتحول إلى كروت على الموبايل */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { padding: 4px 8px; border: 0; display: flex; gap: 10px; justify-content: space-between; align-items: center; }
  .table-cards td::before { content: attr(data-th); color: var(--muted); font-size: .8rem; flex: none; }
  .table-cards td:first-child { display: block; font-size: 1rem; padding-bottom: 6px; }
  .table-cards td:first-child::before { display: none; }
  .table-cards tbody tr:hover td { background: none; }
}

@media (display-mode: standalone) {
  .nav-wrap { margin-top: calc(8px + env(safe-area-inset-top, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .nav-wrap, .tabbar, .footer, .flashes { display: none !important; }
  body::before { display: none; }
}

/* ---------- شاشات الجوال الصغيرة ---------- */
.brand-name { white-space: nowrap; }
@media (max-width: 400px) {
  .nav-actions .btn-ghost { display: none; } /* زر الدخول موجود في الشريط السفلي */
  .nav { gap: 8px; }
}


/* ---------- الصور الشخصية ---------- */
img.avatar { object-fit: cover; padding: 0; background: var(--sky-50); }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; display: block; object-fit: cover; border: 2px solid var(--sky-200); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.photo-card { display: flex; align-items: center; gap: 18px; }
.photo-body { flex: 1; min-width: 0; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo-upload label { cursor: pointer; }
@media (max-width: 400px) {
  .photo-card { flex-direction: column; text-align: center; }
  .photo-actions { justify-content: center; }
}

/* ---------- التنبيهات المنبثقة (يمين الشاشة) ---------- */
.nt-stack { position: fixed; top: 16px; right: 16px; z-index: 120; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.nt { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 10px; border-radius: 18px; background: #fff; color: var(--ink, #0b2540); text-decoration: none;
  border: 1px solid var(--sky-200); box-shadow: 0 18px 44px rgba(2, 132, 199, .22); animation: nt-in .28s ease-out; direction: rtl; }
.nt:hover { border-color: var(--sky-400); }
.nt-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--grad-soft, #e0f2fe); color: var(--sky-700); }
.nt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nt-body strong { font-size: .95rem; }
.nt-body span { color: var(--muted); font-size: .85rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nt-x { flex: none; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .9rem; padding: 2px 6px; border-radius: 8px; }
.nt-x:hover { background: var(--sky-50); }
.nt-out { opacity: 0; transform: translateX(24px); transition: .25s; }
@keyframes nt-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .nt-stack { top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; left: 10px; width: auto; } }

/* ---------- مفاتيح الإعدادات ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row:last-of-type { border-bottom: 0; }
.switch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 99px; background: #cbd5e1; position: relative; cursor: pointer; transition: .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: .2s; }
.switch:checked { background: var(--sky-500, #0ea5e9); }
.switch:checked::after { right: 23px; }
.switch:focus-visible { outline: 2px solid var(--sky-500); outline-offset: 2px; }
.push-box { margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--sky-50); border: 1px dashed var(--sky-300); display: flex; flex-direction: column; gap: 8px; }
.stat-mini { display: flex; flex-wrap: wrap; gap: 8px; }
.check-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; font-size: .85rem; font-weight: 600; }
.check-ok { background: #dcfce7; color: #166534; }
.check-bad { background: #fee2e2; color: #991b1b; }

/* ---------- دليل الشركات ---------- */
.co-search { display: flex; gap: 10px; padding: 12px; margin-top: 18px; max-width: 640px; }
.co-search .input { flex: 1; min-width: 0; }
.co-card { position: relative; display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; transition: .18s; }
.co-card:hover { border-color: var(--sky-300); transform: translateY(-2px); }
.co-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.co-info strong { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.co-meta span { display: inline-flex; align-items: center; gap: 4px; }
.co-rank { position: absolute; top: 10px; left: 12px; font-size: .75rem; font-weight: 700; color: var(--sky-700); background: var(--sky-50); border: 1px solid var(--sky-200); padding: 2px 8px; border-radius: 99px; }
@media (max-width: 400px) { .co-search { flex-direction: column; } }

/* ---------- حالة النظام ---------- */
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.status-list li:last-child { border-bottom: 0; }
.st-ic { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .8rem; font-weight: 700; }
.st-ok .st-ic { background: #dcfce7; color: #166534; }
.st-warn .st-ic { background: #fef3c7; color: #a16207; }
.st-fail .st-ic { background: #fee2e2; color: #991b1b; }
.st-info .st-ic { background: var(--sky-50); color: var(--sky-700); }
.st-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
