/* Mr Pharmacist — MEDCORE dark mode parity v116.
   Values copied from the current MEDCORE dark theme tokens.
   Theme only: no routing, data, account, subscription or content changes. */

:root[data-theme="dark"]{
  --mrph-mc-navy:#071321;
  --mrph-mc-navy-2:#0c2033;
  --mrph-mc-ink:#edf4fb;
  --mrph-mc-muted:#a9b8c8;
  --mrph-mc-paper:#0c1621;
  --mrph-mc-panel:#132130;
  --mrph-mc-line:#263a4d;
  --mrph-mc-accent:#48b7b7;
  --mrph-mc-accent-soft:#123a3f;
  --mrph-mc-danger:#e16b72;
  --mrph-mc-shadow:0 14px 44px rgba(0,0,0,.24);
  color-scheme:dark;
}

:root[data-theme="dark"],
:root[data-theme="dark"] body,
:root[data-theme="dark"] body.app-body,
:root[data-theme="dark"] body.app-body #app,
:root[data-theme="dark"] body.app-body .app-shell,
:root[data-theme="dark"] body.app-body .main,
:root[data-theme="dark"] body.app-body #view{
  color:var(--mrph-mc-ink)!important;
  background:var(--mrph-mc-paper)!important;
}

:root[data-theme="dark"] body.app-body::before{
  opacity:0!important;
  background:none!important;
}

:root[data-theme="dark"] body.app-body .sidebar{
  color:#dce7f1!important;
  background:var(--mrph-mc-navy)!important;
  border-color:var(--mrph-mc-line)!important;
  box-shadow:none!important;
}

:root[data-theme="dark"] body.app-body .topbar{
  color:var(--mrph-mc-ink)!important;
  background:color-mix(in srgb,var(--mrph-mc-panel) 92%,transparent)!important;
  border-bottom-color:var(--mrph-mc-line)!important;
  box-shadow:none!important;
}

:root[data-theme="dark"] body.app-body :where(
  .page-title,.section-title,h1,h2,h3,h4,h5,h6,label,strong
){
  color:var(--mrph-mc-ink)!important;
}

:root[data-theme="dark"] body.app-body :where(
  p,small,.section-note,.muted,.mrph-suite-subtitle,.mrph-path-note,.meta-row
){
  color:var(--mrph-mc-muted)!important;
}

:root[data-theme="dark"] body.app-body :where(
  .card,.panel,.stat,.level-card,.question-card,.news-card,.rx-card,
  .library-card,.lecture-card,.subject-card,.membership-card,.account-card,
  .profile-card,.portfolio-card,.exam-card,.catalog-card,.attempt-card,
  .result-card,.youtube-card,.content-card,.dashboard-card,.workspace-card,
  .content-area,.answer-box,.option-pill,.auth-card,.modal,.dialog,.sheet,
  [class*="-card"],[class*="-panel"],[class*="-frame"]
){
  color:var(--mrph-mc-ink)!important;
  background:var(--mrph-mc-panel)!important;
  border-color:var(--mrph-mc-line)!important;
  box-shadow:var(--mrph-mc-shadow)!important;
}

:root[data-theme="dark"] body.app-body :where(
  .mrph-suite-content-head,.mrph-suite-content-body,.empty-state,.locked-state,
  .suite-empty,.mrph-membership-modal,.mrph-membership-sheet,.mrph-membership-gallery,
  .mrph-academic-card,.mrph-student-panel,.mrph-youtube-card,.mrph-channel-card
){
  color:var(--mrph-mc-ink)!important;
  background:var(--mrph-mc-panel)!important;
  border-color:var(--mrph-mc-line)!important;
}

:root[data-theme="dark"] body.app-body :where(input,select,textarea,.input){
  color:var(--mrph-mc-ink)!important;
  background:transparent!important;
  border-color:var(--mrph-mc-line)!important;
  box-shadow:none!important;
}

:root[data-theme="dark"] body.app-body :where(input,select,textarea,.input)::placeholder{
  color:#8192a4!important;
}

:root[data-theme="dark"] body.app-body :where(input,select,textarea,.input):focus{
  border-color:var(--mrph-mc-accent)!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--mrph-mc-accent) 16%,transparent)!important;
}

:root[data-theme="dark"] body.app-body :where(input,select,textarea,.input):disabled{
  color:#a9b8c8!important;
  background:#101c29!important;
  border-color:var(--mrph-mc-line)!important;
}

:root[data-theme="dark"] body.app-body :where(.btn-cyan,.primary){
  color:#fff!important;
  background:var(--mrph-mc-accent)!important;
  border-color:transparent!important;
  box-shadow:none!important;
}

:root[data-theme="dark"] body.app-body :where(.btn-ghost,.secondary),
:root[data-theme="dark"] body.app-body .topbar :where(.btn-ghost,.btn-icon,.language-button,.icon-button,.mrph-medcore-theme-toggle){
  color:var(--mrph-mc-ink)!important;
  background:var(--mrph-mc-panel)!important;
  border-color:var(--mrph-mc-line)!important;
  box-shadow:none!important;
}

:root[data-theme="dark"] body.app-body .mrph-medcore-theme-toggle{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  display:inline-grid!important;
  place-items:center!important;
  border-radius:9px!important;
  font-size:1rem!important;
  line-height:1!important;
}

:root:not([data-theme="dark"]) body.app-body .mrph-medcore-theme-toggle{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  display:inline-grid!important;
  place-items:center!important;
  border:1px solid var(--mrph-mc-line,#dce5ee)!important;
  border-radius:9px!important;
  color:var(--mrph-mc-ink,#172333)!important;
  background:var(--mrph-mc-panel,#fff)!important;
  box-shadow:none!important;
  font-size:1rem!important;
  line-height:1!important;
}

:root[data-theme="dark"] body.app-body :where(.chip,.level-status,.status-dot,.badge){
  color:var(--mrph-mc-accent)!important;
  background:var(--mrph-mc-accent-soft)!important;
  border-color:color-mix(in srgb,var(--mrph-mc-accent) 30%,var(--mrph-mc-line))!important;
  box-shadow:none!important;
}

:root[data-theme="dark"] body.app-body .hero,
:root[data-theme="dark"] body.app-body .mrph-medcore-profile-hero{
  color:#fff!important;
  background:linear-gradient(110deg,var(--mrph-mc-navy),var(--mrph-mc-navy-2))!important;
  border-color:rgba(72,183,183,.22)!important;
}

:root[data-theme="dark"] body.app-body .hero :where(h1,h2,h3,strong,b),
:root[data-theme="dark"] body.app-body .mrph-medcore-profile-hero :where(h1,h2,h3,strong,b){
  color:#fff!important;
}

:root[data-theme="dark"] body.app-body .hero p,
:root[data-theme="dark"] body.app-body .mrph-medcore-profile-hero p{
  color:#bfd1e1!important;
}

:root[data-theme="dark"] body.app-body .mrph-medcore-profile-surface{
  color:var(--mrph-mc-ink)!important;
  background:var(--mrph-mc-panel)!important;
  border-color:var(--mrph-mc-line)!important;
  box-shadow:var(--mrph-mc-shadow)!important;
}

:root[data-theme="dark"] body.app-body .mrph-medcore-profile-security{
  background:var(--mrph-mc-panel)!important;
}

:root[data-theme="dark"] body.app-body .mrph-medcore-account-summary,
:root[data-theme="dark"] body.app-body .mrph-medcore-certificate-note{
  color:var(--mrph-mc-ink)!important;
  background:#101c29!important;
  border-color:var(--mrph-mc-line)!important;
  box-shadow:none!important;
}

:root[data-theme="dark"] body.app-body .mrph-medcore-profile-head :where(h3,p),
:root[data-theme="dark"] body.app-body .mrph-medcore-account-summary :where(b,span,small),
:root[data-theme="dark"] body.app-body .mrph-medcore-certificate-note :where(b,p){
  color:inherit!important;
}

:root[data-theme="dark"] body.app-body .mrph-medcore-profile-avatar,
:root[data-theme="dark"] body.app-body .mrph-medcore-profile-seal{
  color:var(--mrph-mc-accent)!important;
  background:var(--mrph-mc-accent-soft)!important;
  border-color:color-mix(in srgb,var(--mrph-mc-accent) 30%,var(--mrph-mc-line))!important;
}

:root[data-theme="dark"] body.app-body .empty-state,
:root[data-theme="dark"] body.app-body .locked-state,
:root[data-theme="dark"] body.app-body .suite-empty{
  background:var(--mrph-mc-panel)!important;
  border-color:var(--mrph-mc-line)!important;
}

:root[data-theme="dark"] body.app-body :where(.empty-icon,.locked-icon,.suite-empty-icon){
  color:var(--mrph-mc-accent)!important;
  background:var(--mrph-mc-accent-soft)!important;
  border-color:var(--mrph-mc-line)!important;
  box-shadow:none!important;
}

:root[data-theme="dark"] body.app-body :where(.table-wrap th,.table-wrap td,.list-row){
  border-color:var(--mrph-mc-line)!important;
}

:root[data-theme="dark"] body.app-body :where(.bar,.progress-track){
  background:var(--mrph-mc-line)!important;
}

:root[data-theme="dark"] body.app-body :where(.modal-backdrop,.dialog-backdrop,.mrph-membership-backdrop){
  background:rgba(0,0,0,.62)!important;
}

/* Authentication surface follows the same MEDCORE tokens when the saved theme is dark. */
:root[data-theme="dark"] body:not(.app-body){
  color:var(--mrph-mc-ink)!important;
  background:var(--mrph-mc-paper)!important;
}
:root[data-theme="dark"] .auth-shell{
  background:radial-gradient(circle at 85% 12%,rgba(72,183,183,.13),transparent 27%),var(--mrph-mc-navy)!important;
}
:root[data-theme="dark"] .auth-card{
  color:var(--mrph-mc-ink)!important;
  background:var(--mrph-mc-panel)!important;
  border-color:var(--mrph-mc-line)!important;
}
:root[data-theme="dark"] .auth-card :where(h1,h2,h3,label,strong){color:var(--mrph-mc-ink)!important}
:root[data-theme="dark"] .auth-card :where(p,small){color:var(--mrph-mc-muted)!important}
:root[data-theme="dark"] .auth-card :where(input,select,textarea){
  color:var(--mrph-mc-ink)!important;
  background:transparent!important;
  border-color:var(--mrph-mc-line)!important;
}
