/* Kavenio CV · Navigation v2 · Same structure for the four authenticated core pages.
   Visual-only; auth/permissions/data-page logic remains unchanged. */
body[data-current-page="dashboard.html"] .admin-header,
body[data-current-page="my-resumes.html"] .admin-header,
body[data-current-page="profile.html"] .profile-header,
body[data-current-page="checkout.html"] .resume-dashboard-header {
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  align-items:stretch!important;
  width:100%!important;
  max-width:1220px!important;
  gap:0!important;
  margin:0 auto 26px!important;
  padding:22px 24px 18px!important;
  background:#fff!important;
  border:1px solid #dce4f0!important;
  border-radius:24px!important;
  box-shadow:0 12px 34px rgba(15,23,42,.07)!important;
  color:#0f172a!important;
}
/* Identity always first, logo on the right in RTL and on the left in LTR. */
body[data-current-page="dashboard.html"] .admin-header .brand,
body[data-current-page="my-resumes.html"] .admin-header .brand,
body[data-current-page="profile.html"] .profile-header .profile-brand,
body[data-current-page="checkout.html"] .resume-dashboard-header .kv-nav-identity {
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:18px!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0 0 18px!important;
  border:0!important;
  text-align:start!important;
  flex-wrap:nowrap!important;
}
body[data-current-page="dashboard.html"] .admin-header .brand-logo,
body[data-current-page="my-resumes.html"] .admin-header .brand-logo,
body[data-current-page="profile.html"] .profile-header .profile-logo,
body[data-current-page="checkout.html"] .resume-dashboard-header .brand-logo {
  display:grid!important;
  place-items:center!important;
  width:66px!important;
  height:66px!important;
  min-width:66px!important;
  min-height:66px!important;
  flex:0 0 66px!important;
  padding:8px!important;
  margin:0!important;
  border-radius:20px!important;
  background:#fff!important;
  border:1px solid #dce4f0!important;
  box-shadow:0 4px 16px rgba(15,23,42,.04)!important;
  overflow:hidden!important;
}
body[data-current-page="profile.html"] .profile-header .profile-logo img,
body[data-current-page="dashboard.html"] .admin-header .brand-logo img,
body[data-current-page="my-resumes.html"] .admin-header .brand-logo img,
body[data-current-page="checkout.html"] .resume-dashboard-header .brand-logo img {
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
}
body[data-current-page="dashboard.html"] .admin-header .admin-title,
body[data-current-page="my-resumes.html"] .admin-header .admin-title,
body[data-current-page="profile.html"] .profile-header .profile-title,
body[data-current-page="checkout.html"] .resume-dashboard-header .kv-nav-title {
  flex:1 1 auto!important;
  display:block!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  text-align:start!important;
}
body[data-current-page="dashboard.html"] .admin-header .admin-title h1,
body[data-current-page="my-resumes.html"] .admin-header .admin-title h1,
body[data-current-page="profile.html"] .profile-header .profile-title h1,
body[data-current-page="checkout.html"] .resume-dashboard-header .kv-nav-title h1 {
  margin:0 0 5px!important;
  padding:0!important;
  text-align:start!important;
  color:#0f172a!important;
  opacity:1!important;
  font:900 clamp(1.7rem,3.1vw,2.35rem)/1.25 "Cairo","Poppins",sans-serif!important;
  text-shadow:none!important;
  letter-spacing:normal!important;
}
body[data-current-page="dashboard.html"] .admin-header .admin-title p,
body[data-current-page="my-resumes.html"] .admin-header .admin-title p,
body[data-current-page="profile.html"] .profile-header .profile-title p,
body[data-current-page="checkout.html"] .resume-dashboard-header .kv-nav-title p {
  margin:0!important;
  color:#64748b!important;
  opacity:1!important;
  text-align:start!important;
  line-height:1.65!important;
  font-size:.92rem!important;
  font-weight:700!important;
  text-shadow:none!important;
}
body[data-current-page="dashboard.html"] .admin-header .admin-actions,
body[data-current-page="my-resumes.html"] .admin-header .admin-actions,
body[data-current-page="profile.html"] .profile-header .profile-actions,
body[data-current-page="checkout.html"] .resume-dashboard-header .resume-dashboard-actions {
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  justify-content:center!important;
  align-items:center!important;
  gap:9px!important;
  width:100%!important;
  margin:0!important;
  padding:18px 0 0!important;
  border-top:1px solid #e2e8f0!important;
  border-bottom:0!important;
  min-width:0!important;
}
body[data-current-page="dashboard.html"] .admin-header .admin-actions :is(a,button),
body[data-current-page="my-resumes.html"] .admin-header .admin-actions :is(a,button),
body[data-current-page="profile.html"] .profile-header .profile-actions :is(a,button),
body[data-current-page="checkout.html"] .resume-dashboard-header .resume-dashboard-actions :is(a,button) {
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:44px!important;
  height:auto!important;
  padding:9px 15px!important;
  margin:0!important;
  border:1px solid #dce4f0!important;
  border-radius:13px!important;
  background:#fff!important;
  box-shadow:none!important;
  color:#334155!important;
  font:800 .9rem/1.35 "Cairo","Poppins",sans-serif!important;
  text-align:center!important;
  text-decoration:none!important;
  white-space:normal!important;
  transform:none!important;
}
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) :is(a,button):hover {
  background:#eff6ff!important;
  border-color:#bfdbfe!important;
  color:#1d4ed8!important;
}
/* Identical active-page policy; no privilege added and no link forcibly exposed. */
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) :is(a,button):is(.is-current-page,[aria-current="page"],.kv-nav-active) {
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(37,99,235,.18)!important;
}
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) #logoutBtn {
  color:#dc2626!important;
  background:#fff7f7!important;
  border-color:#fecaca!important;
}
/* Keep hidden and role-limited controls hidden even under aggressive theme overrides. */
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) :is(a,button)[hidden],
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]):not(.is-admin) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) .admin-only {
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
/* Consistent order in RTL and LTR, retaining each page's actual links and permissions. */
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) :is(#builderBtn) {order:1!important;}
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) :is(#accountBtn,#dashboardBtn) {order:2!important;}
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) :is(#resumesBtn,#savedResumesBtn) {order:3!important;}
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) #checkoutBtn {order:4!important;}
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) #profileBtn {order:5!important;}
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) #adminBtn {order:6!important;}
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) #langBtn {order:7!important;}
body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) #logoutBtn {order:8!important;}
/* Billing portal feedback belongs in the billing tab; never silently fail. */
.kv-billing-portal-status:not([hidden]) {
  display:block!important;
  width:100%!important;
  flex:1 1 100%!important;
  padding:12px 15px!important;
  border-radius:12px!important;
  color:#1d4ed8!important;
  border:1px solid #bfdbfe!important;
  background:#eff6ff!important;
  font-size:.9rem!important;
  font-weight:700!important;
}
.kv-billing-portal-status.is-error {background:#fef2f2!important;border-color:#fecaca!important;color:#b91c1c!important;}
@media(max-width:720px) {
  body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-header,.profile-header,.resume-dashboard-header) {padding:18px 15px!important;}
  body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-header,.profile-header,.resume-dashboard-header) :is(.brand,.profile-brand,.kv-nav-identity) {gap:12px!important;}
  body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-header,.profile-header,.resume-dashboard-header) :is(.brand-logo,.profile-logo) {width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;flex-basis:52px!important;border-radius:14px!important;}
  body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-header,.profile-header,.resume-dashboard-header) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) {display:flex!important;flex-wrap:wrap!important;gap:8px!important;}
  body:is([data-current-page="dashboard.html"],[data-current-page="checkout.html"],[data-current-page="my-resumes.html"],[data-current-page="profile.html"]) :is(.admin-header,.profile-header,.resume-dashboard-header) :is(.admin-actions,.profile-actions,.resume-dashboard-actions) :is(a,button) {flex:1 1 auto!important;min-height:42px!important;padding:8px 11px!important;}
}
