/* RXOPD unified OPD UI system
   Palette intentionally follows the public index: white, green, blue and black/navy only.
   The public home page is excluded by layout.php; this stylesheet is loaded on authenticated,
   login, discovery, doctor, clinic and booking pages. */
:root{
  --rxui-blue:#0b5ed7;
  --rxui-blue-dark:#073f96;
  --rxui-blue-soft:#eef7ff;
  --rxui-green:#079b72;
  --rxui-green-dark:#047857;
  --rxui-green-soft:#ecfdf5;
  --rxui-ink:#0f172a;
  --rxui-navy:#08245c;
  --rxui-muted:#64748b;
  --rxui-line:#d9e8fa;
  --rxui-bg:#f4f9ff;
  --rxui-white:#ffffff;
  --rxui-shadow:0 14px 34px rgba(11,94,215,.09);
  --rxui-shadow-strong:0 22px 50px rgba(8,36,92,.14);
  --rxui-radius:18px;
  --rxui-radius-sm:12px;
  --rxui-sidebar:272px;
}

html{scroll-behavior:smooth}
body.rx-ui-system:not(.rx-ui-home){
  color:var(--rxui-ink)!important;
  background:linear-gradient(180deg,#fff 0%,var(--rxui-bg) 44%,#fff 100%)!important;
}
body.rx-ui-system:not(.rx-ui-home),
body.rx-ui-system:not(.rx-ui-home) button,
body.rx-ui-system:not(.rx-ui-home) input,
body.rx-ui-system:not(.rx-ui-home) select,
body.rx-ui-system:not(.rx-ui-home) textarea{
  font-family:Inter,Calibri,Candara,"Segoe UI",Arial,sans-serif!important;
}
body.rx-ui-system:not(.rx-ui-home) *{box-sizing:border-box}
body.rx-ui-system:not(.rx-ui-home) a{transition:color .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease}
body.rx-ui-system:not(.rx-ui-home) :focus-visible{outline:3px solid rgba(11,94,215,.3)!important;outline-offset:2px!important}

/* Core buttons and forms */
body.rx-ui-system:not(.rx-ui-home) button,
body.rx-ui-system:not(.rx-ui-home) .button,
body.rx-ui-system:not(.rx-ui-home) .rx-btn,
body.rx-ui-system:not(.rx-ui-home) [class*="btn"]{
  border-radius:10px;
}
body.rx-ui-system:not(.rx-ui-home) input,
body.rx-ui-system:not(.rx-ui-home) select,
body.rx-ui-system:not(.rx-ui-home) textarea{
  border:1px solid #cfe0f5!important;
  background:#fff!important;
  color:var(--rxui-ink)!important;
  border-radius:10px!important;
  min-height:42px;
  box-shadow:0 5px 14px rgba(11,94,215,.04);
}
body.rx-ui-system:not(.rx-ui-home) textarea{min-height:96px}
body.rx-ui-system:not(.rx-ui-home) input:focus,
body.rx-ui-system:not(.rx-ui-home) select:focus,
body.rx-ui-system:not(.rx-ui-home) textarea:focus{
  border-color:var(--rxui-blue)!important;
  box-shadow:0 0 0 3px rgba(11,94,215,.12)!important;
}
body.rx-ui-system:not(.rx-ui-home) table{border-collapse:separate;border-spacing:0;width:100%}
body.rx-ui-system:not(.rx-ui-home) th{background:#f0f7ff;color:#284c75;font-size:11px;letter-spacing:.04em;text-transform:uppercase}
body.rx-ui-system:not(.rx-ui-home) th,
body.rx-ui-system:not(.rx-ui-home) td{padding:12px;border-bottom:1px solid #e7f0fb;text-align:left;vertical-align:middle}
body.rx-ui-system:not(.rx-ui-home) tr:last-child td{border-bottom:0}
body.rx-ui-system:not(.rx-ui-home) tbody tr:hover{background:#f9fcff}

/* Shared role shell */
body.rx-ui-system.rx-role-shell{
  --rx-role-sidebar-width:var(--rxui-sidebar);
  --rx-role-topbar-height:68px;
  --rx-role-border:var(--rxui-line);
  --rx-role-bg:var(--rxui-bg);
  --rx-role-text:var(--rxui-ink);
  --rx-role-muted:var(--rxui-muted);
  --rx-role-primary:var(--rxui-blue);
  --rx-role-primary-dark:var(--rxui-blue-dark);
}
body.rx-ui-system .rx-role-sidebar{
  width:var(--rxui-sidebar)!important;
  color:var(--rxui-ink)!important;
  background:#fff!important;
  border-right:1px solid var(--rxui-line)!important;
  box-shadow:10px 0 32px rgba(8,36,92,.07)!important;
}
body.rx-ui-system .rx-role-brand-row{
  min-height:72px!important;
  border-bottom:1px solid var(--rxui-line)!important;
  background:linear-gradient(110deg,#fff,#f5faff)!important;
}
body.rx-ui-system .rx-role-brand{color:var(--rxui-navy)!important}
body.rx-ui-system .rx-role-brand img{width:122px!important}
body.rx-ui-system .rx-role-brand span{color:var(--rxui-blue-dark)!important;font-weight:800!important}
body.rx-ui-system .rx-role-brand-row>button{color:var(--rxui-navy)!important;background:#eef7ff!important}
body.rx-ui-system .rx-role-user-card{
  margin:12px!important;
  padding:14px!important;
  color:var(--rxui-ink)!important;
  border:1px solid var(--rxui-line)!important;
  background:linear-gradient(135deg,#f8fbff,#ecfdf5)!important;
  box-shadow:none!important;
}
body.rx-ui-system .rx-role-user-card small{color:var(--rxui-blue)!important}
body.rx-ui-system .rx-role-user-card strong{color:var(--rxui-ink)!important}
body.rx-ui-system .rx-role-user-card span{color:#45627f!important}
body.rx-ui-system .rx-role-navigation{padding:0 9px 16px!important}
body.rx-ui-system .rx-role-nav-group h2{color:#7890a8!important;font-size:9px!important;margin-top:10px!important}
body.rx-ui-system .rx-role-nav-group a{
  min-height:42px!important;
  color:#244566!important;
  border-radius:10px!important;
  padding:7px 9px!important;
}
body.rx-ui-system .rx-role-nav-group a>span{
  color:var(--rxui-blue)!important;
  background:#eef7ff!important;
  border:1px solid #dbeafe!important;
}
body.rx-ui-system .rx-role-nav-group a:hover{background:#f3f9ff!important;border-color:#dbeafe!important;transform:none!important}
body.rx-ui-system .rx-role-nav-group a.active{
  color:#fff!important;
  background:var(--rxui-green)!important;
  border-color:var(--rxui-green)!important;
  box-shadow:0 9px 18px rgba(7,155,114,.2)!important;
}
body.rx-ui-system .rx-role-nav-group a.active>span{color:var(--rxui-blue-dark)!important;background:#fff!important;border-color:#fff!important}
body.rx-ui-system .rx-role-logout{border-top:1px solid var(--rxui-line)!important}
body.rx-ui-system .rx-role-logout button{color:var(--rxui-navy)!important;background:#fff!important;border:1px solid var(--rxui-line)!important}
body.rx-ui-system .rx-role-logout button:hover{color:#fff!important;background:var(--rxui-blue)!important;border-color:var(--rxui-blue)!important}
body.rx-ui-system .rx-role-topbar{
  left:var(--rxui-sidebar)!important;
  min-height:68px!important;
  border-bottom:1px solid var(--rxui-line)!important;
  background:rgba(255,255,255,.97)!important;
  box-shadow:0 8px 26px rgba(8,36,92,.05)!important;
}
body.rx-ui-system .rx-role-page-title small{color:var(--rxui-green)!important}
body.rx-ui-system .rx-role-page-title strong{color:var(--rxui-navy)!important}
body.rx-ui-system .rx-role-top-actions>a,
body.rx-ui-system .rx-role-top-actions button{
  color:var(--rxui-blue-dark)!important;
  border-color:var(--rxui-line)!important;
  background:#fff!important;
}
body.rx-ui-system .rx-role-top-actions>a:hover,
body.rx-ui-system .rx-role-top-actions button:hover{color:#fff!important;background:var(--rxui-blue)!important;border-color:var(--rxui-blue)!important}
body.rx-ui-system .rx-role-main{margin-left:var(--rxui-sidebar)!important;padding-top:68px!important;background:var(--rxui-bg)!important}
body.rx-ui-system .rx-role-bottom-nav{background:#fff!important;border-top:1px solid var(--rxui-line)!important;box-shadow:0 -8px 24px rgba(8,36,92,.08)!important}
body.rx-ui-system .rx-role-bottom-nav a.active{color:var(--rxui-green)!important}

/* Admin shell: same visual language, vital modules remain visible */
body.rx-ui-system.clean-admin-shell{
  --clean-sidebar-width:278px;
  background:var(--rxui-bg)!important;
}
body.rx-ui-system .clean-admin-sidebar{
  width:278px!important;
  background:#fff!important;
  border-right:1px solid var(--rxui-line)!important;
  color:var(--rxui-ink)!important;
  box-shadow:10px 0 32px rgba(8,36,92,.07)!important;
}
body.rx-ui-system .clean-admin-brand{background:linear-gradient(110deg,#fff,#f3f9ff)!important;border-bottom:1px solid var(--rxui-line)!important}
body.rx-ui-system .clean-admin-brand small{color:var(--rxui-blue-dark)!important}
body.rx-ui-system .clean-admin-user{background:linear-gradient(135deg,#eef7ff,#ecfdf5)!important;border:1px solid var(--rxui-line)!important;color:var(--rxui-ink)!important}
body.rx-ui-system .clean-admin-user small{color:var(--rxui-blue)!important}
body.rx-ui-system .clean-admin-search span{color:var(--rxui-muted)!important}
body.rx-ui-system .clean-admin-search input{background:#f9fcff!important}
body.rx-ui-system .clean-admin-nav summary,
body.rx-ui-system .clean-admin-nav a{color:#244566!important}
body.rx-ui-system .clean-admin-nav summary:hover,
body.rx-ui-system .clean-admin-nav a:hover{background:#eef7ff!important;color:var(--rxui-blue-dark)!important}
body.rx-ui-system .clean-admin-nav a.active,
body.rx-ui-system .clean-menu-direct.active{background:var(--rxui-green)!important;color:#fff!important;border-color:var(--rxui-green)!important}
body.rx-ui-system .clean-admin-scope-note{color:#21496d!important;background:#eef7ff!important;border-color:#dbeafe!important}
body.rx-ui-system .clean-admin-scope-note span{color:#54718e!important}
body.rx-ui-system .clean-admin-topbar{left:278px!important;background:#fff!important;border-bottom:1px solid var(--rxui-line)!important;box-shadow:0 8px 26px rgba(8,36,92,.05)!important}
body.rx-ui-system .clean-admin-page{margin-left:278px!important;background:var(--rxui-bg)!important}
body.rx-ui-system .clean-admin-logout button{background:#fff!important;color:var(--rxui-blue-dark)!important;border:1px solid var(--rxui-line)!important}

/* Unified page components */
.rxui-page{max-width:1440px;margin:0 auto;padding:24px clamp(14px,2.2vw,30px) 42px;color:var(--rxui-ink)}
.rxui-hero{
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:24px 26px;border:1px solid var(--rxui-line);border-radius:var(--rxui-radius);
  background:linear-gradient(120deg,#fff 0%,#f4f9ff 62%,#ecfdf5 100%);box-shadow:var(--rxui-shadow);overflow:hidden;position:relative;
}
.rxui-hero:after{content:"";position:absolute;right:-50px;bottom:-90px;width:260px;height:260px;border-radius:50%;background:rgba(11,94,215,.05)}
.rxui-hero-copy{position:relative;z-index:1;max-width:760px}
.rxui-eyebrow{display:inline-flex;align-items:center;gap:7px;color:var(--rxui-green);font-size:11px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.rxui-eyebrow:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--rxui-green)}
.rxui-hero h1{margin:7px 0 7px;color:var(--rxui-navy);font-size:clamp(24px,3.2vw,42px);line-height:1.05;letter-spacing:-.035em}
.rxui-hero p{margin:0;color:#45627f;line-height:1.55;font-size:14px}
.rxui-hero-side{position:relative;z-index:1;min-width:240px;padding:16px;border:1px solid #d8ebfb;border-radius:14px;background:#fff;box-shadow:0 9px 22px rgba(11,94,215,.07)}
.rxui-hero-side small,.rxui-hero-side strong,.rxui-hero-side span{display:block}
.rxui-hero-side small{color:var(--rxui-blue);font-weight:900;text-transform:uppercase;letter-spacing:.08em;font-size:10px}
.rxui-hero-side strong{margin:5px 0;color:var(--rxui-navy);font-size:20px}
.rxui-hero-side span{color:var(--rxui-muted);font-size:12px;line-height:1.45}
.rxui-vital-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}
.rxui-action-card{display:flex;align-items:center;gap:12px;min-height:86px;padding:15px;border:1px solid var(--rxui-line);border-radius:14px;background:#fff;color:var(--rxui-navy);text-decoration:none;box-shadow:var(--rxui-shadow)}
.rxui-action-card:hover{transform:translateY(-2px);border-color:#a8ccef;box-shadow:var(--rxui-shadow-strong)}
.rxui-action-card .icon{display:grid;place-items:center;flex:0 0 42px;height:42px;border-radius:12px;color:var(--rxui-blue);background:#eef7ff;border:1px solid #dbeafe;font-weight:900;font-size:12px}
.rxui-action-card.primary{color:#fff;background:var(--rxui-blue);border-color:var(--rxui-blue)}
.rxui-action-card.primary .icon{color:var(--rxui-blue-dark);background:#fff;border-color:#fff}
.rxui-action-card.green{color:#fff;background:var(--rxui-green);border-color:var(--rxui-green)}
.rxui-action-card.green .icon{color:var(--rxui-green-dark);background:#fff;border-color:#fff}
.rxui-action-card b,.rxui-action-card span{display:block}
.rxui-action-card b{font-size:14px}.rxui-action-card span{margin-top:3px;font-size:11px;line-height:1.35;opacity:.82}
.rxui-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:16px 0}
.rxui-kpi{padding:16px;border:1px solid var(--rxui-line);border-radius:14px;background:#fff;box-shadow:0 8px 22px rgba(11,94,215,.06)}
.rxui-kpi small,.rxui-kpi strong,.rxui-kpi span{display:block}.rxui-kpi small{color:var(--rxui-muted);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.rxui-kpi strong{margin:5px 0;color:var(--rxui-navy);font-size:27px}.rxui-kpi span{color:#55718c;font-size:11px}
.rxui-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px;margin-top:14px}
.rxui-panel{grid-column:span 4;padding:18px;border:1px solid var(--rxui-line);border-radius:var(--rxui-radius);background:#fff;box-shadow:var(--rxui-shadow)}
.rxui-panel.span-5{grid-column:span 5}.rxui-panel.span-6{grid-column:span 6}.rxui-panel.span-7{grid-column:span 7}.rxui-panel.span-8{grid-column:span 8}.rxui-panel.span-12{grid-column:span 12}
.rxui-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:13px}
.rxui-panel-head small{display:block;color:var(--rxui-green);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.rxui-panel-head h2{margin:4px 0 0;color:var(--rxui-navy);font-size:19px}.rxui-panel-head>a,.rxui-panel-head>button{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 11px;border:1px solid var(--rxui-line);border-radius:9px;background:#fff;color:var(--rxui-blue-dark);font-size:11px;font-weight:900;text-decoration:none}
.rxui-panel-head>a:hover,.rxui-panel-head>button:hover{color:#fff;background:var(--rxui-blue);border-color:var(--rxui-blue)}
.rxui-list{display:grid;gap:8px}.rxui-list>a,.rxui-list>article,.rxui-list>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid #e5eef9;border-radius:11px;background:#fbfdff;color:var(--rxui-ink);text-decoration:none}.rxui-list>a:hover{border-color:#b9d7f4;background:#f3f9ff}.rxui-list b,.rxui-list span,.rxui-list small{display:block}.rxui-list b{font-size:13px;color:var(--rxui-navy)}.rxui-list span,.rxui-list small{margin-top:3px;color:var(--rxui-muted);font-size:11px}.rxui-list em{font-style:normal;color:var(--rxui-green);font-weight:900;font-size:12px}
.rxui-status{display:inline-flex;align-items:center;justify-content:center;min-height:25px;padding:4px 9px;border-radius:999px;background:#eef7ff;color:var(--rxui-blue-dark);font-size:10px;font-weight:900;text-transform:capitalize}.rxui-status.ready,.rxui-status.completed,.rxui-status.active,.rxui-status.approved{background:#dcfce7;color:#047857}.rxui-status.waiting,.rxui-status.pending{background:#eef7ff;color:#0b5ed7}.rxui-status.blocked,.rxui-status.failed,.rxui-status.cancelled{background:#f1f5f9;color:#334155}
.rxui-instruction{margin:14px 0;padding:15px 17px;border:1px solid #bfe8dc;border-left:5px solid var(--rxui-green);border-radius:12px;background:#f5fffb;color:#244f45}.rxui-instruction strong{display:block;color:var(--rxui-green-dark);font-size:13px}.rxui-instruction p{margin:5px 0 0;font-size:12px;line-height:1.5}.rxui-instruction ol{margin:8px 0 0;padding-left:18px;font-size:12px;line-height:1.55}
.rxui-empty{padding:24px;border:1px dashed #bfd5ea;border-radius:13px;background:#f9fcff;text-align:center;color:var(--rxui-muted)}
.rxui-process{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.rxui-process span{position:relative;padding:11px;border:1px solid var(--rxui-line);border-radius:10px;background:#f8fbff;color:#365776;font-size:11px;font-weight:800;text-align:center}.rxui-process span.done{color:#fff;background:var(--rxui-green);border-color:var(--rxui-green)}
.rxui-table-wrap{overflow:auto;border:1px solid var(--rxui-line);border-radius:12px}
.rxui-profile-meter{height:8px;border-radius:999px;background:#e8f0f8;overflow:hidden}.rxui-profile-meter>i{display:block;height:100%;background:var(--rxui-green);border-radius:999px}

/* Existing operational pages restyled without changing their business logic */
body.rx-ui-system .opdops-page,
body.rx-ui-system .rxdoc-shell,
body.rx-ui-system .rx-role-page,
body.rx-ui-system .rx-wallet-page,
body.rx-ui-system .mr-dashboard-hero,
body.rx-ui-system .mr-stat-grid,
body.rx-ui-system .mr-quick-menu,
body.rx-ui-system .card{
  max-width:1440px!important;margin-left:auto!important;margin-right:auto!important;
}
body.rx-ui-system .opdops-page{padding:24px clamp(14px,2.2vw,30px) 42px!important}
body.rx-ui-system .opdops-hero,
body.rx-ui-system .rxdoc-hero,
body.rx-ui-system .rx-role-hero,
body.rx-ui-system .rx-wallet-hero,
body.rx-ui-system .mr-dashboard-hero{
  border:1px solid var(--rxui-line)!important;border-radius:18px!important;background:linear-gradient(120deg,#fff,#f3f9ff 66%,#ecfdf5)!important;color:var(--rxui-ink)!important;box-shadow:var(--rxui-shadow)!important;
}
body.rx-ui-system .opdops-hero h1,
body.rx-ui-system .rxdoc-hero h1,
body.rx-ui-system .rx-role-hero h1,
body.rx-ui-system .rx-wallet-hero h1,
body.rx-ui-system .mr-dashboard-hero h1{color:var(--rxui-navy)!important}
body.rx-ui-system .opdops-hero p,
body.rx-ui-system .rxdoc-hero p,
body.rx-ui-system .rx-role-hero p,
body.rx-ui-system .rx-wallet-hero p{color:#45627f!important}
body.rx-ui-system .opdops-kicker,
body.rx-ui-system .rxdoc-kicker,
body.rx-ui-system .rx-role-kicker,
body.rx-ui-system .rx-wallet-kicker,
body.rx-ui-system .eyebrow{color:var(--rxui-green)!important}
body.rx-ui-system .opdops-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin:14px 0!important}
body.rx-ui-system .opdops-actions a{min-height:54px!important;display:flex!important;align-items:center!important;justify-content:center!important;border:1px solid var(--rxui-line)!important;border-radius:11px!important;background:#fff!important;color:var(--rxui-blue-dark)!important;font-weight:900!important;text-align:center!important}
body.rx-ui-system .opdops-actions a.primary{background:var(--rxui-green)!important;color:#fff!important;border-color:var(--rxui-green)!important}
body.rx-ui-system .opdops-card,
body.rx-ui-system .rxdoc-panel,
body.rx-ui-system .rxdoc-v2-card,
body.rx-ui-system .rx-role-panel,
body.rx-ui-system .rx-wallet-panel,
body.rx-ui-system .card{
  border:1px solid var(--rxui-line)!important;border-radius:16px!important;background:#fff!important;box-shadow:var(--rxui-shadow)!important;
}
body.rx-ui-system .opdops-metrics,
body.rx-ui-system .rxdoc-stat-grid,
body.rx-ui-system .staff-kpis,
body.rx-ui-system .mr-stat-grid{gap:10px!important}
body.rx-ui-system .opdops-metrics article,
body.rx-ui-system .rxdoc-stat-grid a,
body.rx-ui-system .staff-kpis article,
body.rx-ui-system .mr-stat-grid article{border:1px solid var(--rxui-line)!important;border-radius:12px!important;background:#fff!important;color:var(--rxui-ink)!important;box-shadow:0 7px 20px rgba(11,94,215,.05)!important}
body.rx-ui-system .opdops-metrics strong,
body.rx-ui-system .rxdoc-stat-grid b,
body.rx-ui-system .staff-kpis strong,
body.rx-ui-system .mr-stat-grid strong{color:var(--rxui-navy)!important}
body.rx-ui-system .opdops-card-head h2,
body.rx-ui-system .rxdoc-section-head h2,
body.rx-ui-system .rx-panel-title h2,
body.rx-ui-system .rx-wallet-panel-head h2{color:var(--rxui-navy)!important}
body.rx-ui-system .opdops-card-head span,
body.rx-ui-system .rxdoc-section-head span,
body.rx-ui-system .rx-panel-title p,
body.rx-ui-system .rx-wallet-panel-head span{color:var(--rxui-green)!important}
body.rx-ui-system .opdops-status.open,
body.rx-ui-system .opdops-status.active,
body.rx-ui-system .opdops-status.assistant_ready,
body.rx-ui-system .opdops-status.completed{background:#dcfce7!important;color:#047857!important}

/* Admin dashboard overrides */
body.rx-ui-system .rx-final-admin-desk{max-width:1500px!important;padding:22px clamp(12px,2vw,28px) 42px!important}
body.rx-ui-system .rx-page-hero{border:1px solid var(--rxui-line)!important;background:linear-gradient(120deg,#fff,#f3f9ff 65%,#ecfdf5)!important;color:var(--rxui-ink)!important;border-radius:18px!important;box-shadow:var(--rxui-shadow)!important}
body.rx-ui-system .rx-page-hero h1{color:var(--rxui-navy)!important}
body.rx-ui-system .rx-page-hero p{color:#45627f!important}
body.rx-ui-system .rx-admin-kpi,
body.rx-ui-system .rx-admin-panel,
body.rx-ui-system .rx-module-card{border:1px solid var(--rxui-line)!important;background:#fff!important;box-shadow:var(--rxui-shadow)!important}
body.rx-ui-system .rx-admin-kpi:before{background:var(--rxui-blue)!important}
body.rx-ui-system .rx-admin-kpi.green:before,
body.rx-ui-system .rx-admin-kpi.teal:before{background:var(--rxui-green)!important}
body.rx-ui-system .rx-module-card.priority{border-color:#a8d9ca!important;background:#f8fffc!important}
body.rx-ui-system .rx-btn.primary,
body.rx-ui-system .rx-wallet-btn.primary,
body.rx-ui-system .rxdoc-primary,
body.rx-ui-system .rxpub-btn-primary{background:var(--rxui-green)!important;border-color:var(--rxui-green)!important;color:#fff!important}
body.rx-ui-system .rx-btn:not(.primary),
body.rx-ui-system .rx-wallet-btn:not(.primary),
body.rx-ui-system .rxpub-btn-secondary{background:#fff!important;border-color:var(--rxui-line)!important;color:var(--rxui-blue-dark)!important}

/* Auth pages: one clean theme for patient/provider/company/admin/MR */
body.rx-ui-system .rxopd-public-auth-screen,
body.rx-ui-system .rx-company-login-repair,
body.rx-ui-system .mr-login-shell,
body.rx-ui-system .auth-screen{
  min-height:calc(100dvh - 88px)!important;display:grid!important;place-items:center!important;padding:34px 14px 60px!important;background:radial-gradient(circle at 15% 20%,rgba(11,94,215,.10),transparent 32%),radial-gradient(circle at 85% 82%,rgba(7,155,114,.10),transparent 28%),#f7fbff!important;
}
body.rx-ui-system .rxopd-public-auth-card,
body.rx-ui-system .rx-company-login-card,
body.rx-ui-system .mr-login-card,
body.rx-ui-system .auth-card{
  width:min(100%,500px)!important;padding:28px!important;border:1px solid var(--rxui-line)!important;border-radius:20px!important;background:#fff!important;box-shadow:var(--rxui-shadow-strong)!important;
}
body.rx-ui-system .rxopd-public-auth-logo img,
body.rx-ui-system .rx-company-login-logo img{width:148px!important}
body.rx-ui-system .rxopd-public-auth-heading span,
body.rx-ui-system .rx-company-login-copy>span,
body.rx-ui-system .mr-login-card>.eyebrow{color:var(--rxui-green)!important}
body.rx-ui-system .rxopd-public-auth-heading h1,
body.rx-ui-system .rx-company-login-copy h1,
body.rx-ui-system .mr-login-card h2,
body.rx-ui-system .auth-card h2{color:var(--rxui-navy)!important;font-size:30px!important;letter-spacing:-.03em!important}
body.rx-ui-system .rxopd-public-auth-tabs button.active,
body.rx-ui-system .rxopd-public-auth-tabs a.active{background:var(--rxui-blue)!important;color:#fff!important;border-color:var(--rxui-blue)!important}
body.rx-ui-system .rxopd-public-auth-submit,
body.rx-ui-system .rx-company-login-submit{background:var(--rxui-green)!important;color:#fff!important;border-color:var(--rxui-green)!important;min-height:46px!important;font-weight:900!important}
body.rx-ui-system .rxopd-login-secondary-links,
body.rx-ui-system .rx-company-login-links{border-top:1px solid var(--rxui-line)!important}
body.rx-ui-system .rxopd-login-secondary-links a,
body.rx-ui-system .rx-company-login-links a{color:var(--rxui-blue-dark)!important}
body.rx-ui-system .mr-brand-panel{border:1px solid var(--rxui-line)!important;border-radius:20px!important;background:linear-gradient(145deg,var(--rxui-blue-dark),var(--rxui-blue))!important;color:#fff!important;box-shadow:var(--rxui-shadow-strong)!important}
body.rx-ui-system .role-grid-form{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
body.rx-ui-system .role-choice{min-height:92px!important;border:1px solid var(--rxui-line)!important;background:#fff!important;color:var(--rxui-navy)!important;text-align:left!important;padding:15px!important}
body.rx-ui-system .role-choice:hover{border-color:var(--rxui-green)!important;background:#f5fffb!important;transform:translateY(-2px)!important}

/* Discovery, doctor and clinic profiles */
body.rx-ui-system .rxdp-shell,
body.rx-ui-system .rxpub-shell,
body.rx-ui-system .rx-public-location-hero,
body.rx-ui-system .rx-public-location-map-card,
body.rx-ui-system .rx-public-location-section{
  max-width:1180px!important;margin-left:auto!important;margin-right:auto!important;
}
body.rx-ui-system .rxdp-hero,
body.rx-ui-system .rxpub-panel,
body.rx-ui-system .rx-public-location-hero,
body.rx-ui-system .rx-public-location-map-card,
body.rx-ui-system .rx-public-location-section{
  border:1px solid var(--rxui-line)!important;border-radius:18px!important;background:#fff!important;box-shadow:var(--rxui-shadow)!important;
}
body.rx-ui-system .rxdp-hero{background:linear-gradient(120deg,#fff,#f3f9ff 65%,#ecfdf5)!important}
body.rx-ui-system .rxdp-kicker,
body.rx-ui-system .rxdp-section-head span,
body.rx-ui-system .rx-public-section-head span{color:var(--rxui-green)!important}
body.rx-ui-system .rxdp-hero h1,
body.rx-ui-system .rxdp-section h2,
body.rx-ui-system .rx-public-location-copy h1,
body.rx-ui-system .rx-public-section-head h2{color:var(--rxui-navy)!important}
body.rx-ui-system .rxdp-actions .primary,
body.rx-ui-system .rxpd-session-card>a,
body.rx-ui-system .rx-public-doctor-card>a,
body.rx-ui-system .rx-public-primary{background:var(--rxui-green)!important;color:#fff!important;border-color:var(--rxui-green)!important}
body.rx-ui-system .rxpd-session-card,
body.rx-ui-system .rx-public-doctor-card{border:1px solid var(--rxui-line)!important;border-radius:13px!important;background:#fff!important;box-shadow:0 8px 22px rgba(11,94,215,.06)!important}
body.rx-ui-system .rxpd-session-card:hover,
body.rx-ui-system .rx-public-doctor-card:hover{transform:translateY(-2px)!important;border-color:#afd1f0!important;box-shadow:var(--rxui-shadow)!important}

/* Booking page: clear six-step process and no hidden vital action */
body.rx-ui-system .rx-booking-payment-page{max-width:1180px!important;padding:24px 14px 44px!important}
body.rx-ui-system .rx-wallet-grid.booking-grid{grid-template-columns:minmax(0,1.5fr) minmax(260px,.7fr)!important}
body.rx-ui-system .rx-wallet-payment-choice{border:1px solid #bfe8dc!important;background:#f6fffb!important}
body.rx-ui-system .rx-wallet-choice{border:1px solid var(--rxui-line)!important;background:#fff!important}

/* Staff legacy desk, still preserved for backward compatibility */
body.rx-ui-system.staff-desk-shell{background:var(--rxui-bg)!important}
body.rx-ui-system .staff-sidebar{background:#fff!important;color:var(--rxui-ink)!important;border-right:1px solid var(--rxui-line)!important}
body.rx-ui-system .staff-topbar{background:#fff!important;border-bottom:1px solid var(--rxui-line)!important}
body.rx-ui-system .staff-action-card{border:1px solid var(--rxui-line)!important;background:#fff!important;color:var(--rxui-navy)!important;box-shadow:var(--rxui-shadow)!important}

/* Alerts */
body.rx-ui-system .alert,
body.rx-ui-system [class*="alert"]{border-radius:11px!important}
body.rx-ui-system .alert.success,
body.rx-ui-system [class*="alert"].success{color:#075f47!important;background:#ecfdf5!important;border-color:#b7e4d5!important}
body.rx-ui-system .alert.error,
body.rx-ui-system [class*="alert"].error{color:#334155!important;background:#f8fafc!important;border-color:#cbd5e1!important}

@media(max-width:1180px){
  .rxui-vital-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rxui-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .rxui-panel,.rxui-panel.span-5,.rxui-panel.span-7{grid-column:span 6}
  .rxui-panel.span-8{grid-column:span 12}
  body.rx-ui-system .opdops-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:860px){
  body.rx-ui-system .rx-role-sidebar{width:min(88vw,320px)!important}
  body.rx-ui-system .rx-role-topbar{left:0!important}
  body.rx-ui-system .rx-role-main{margin-left:0!important;padding-top:64px!important}
  body.rx-ui-system .clean-admin-topbar{left:0!important}
  body.rx-ui-system .clean-admin-page{margin-left:0!important}
  .rxui-page{padding:14px 10px 90px}
  .rxui-hero{display:block;padding:19px}
  .rxui-hero-side{margin-top:13px;min-width:0}
  .rxui-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rxui-panel,.rxui-panel.span-5,.rxui-panel.span-6,.rxui-panel.span-7,.rxui-panel.span-8{grid-column:span 12}
  .rxui-process{grid-template-columns:repeat(2,1fr)}
  body.rx-ui-system .rx-wallet-grid.booking-grid{grid-template-columns:1fr!important}
  body.rx-ui-system .role-grid-form{grid-template-columns:1fr!important}
}
@media(max-width:560px){
  .rxui-vital-actions{grid-template-columns:1fr 1fr;gap:8px}
  .rxui-action-card{display:block;min-height:112px;padding:12px}
  .rxui-action-card .icon{margin-bottom:8px}
  .rxui-kpis{grid-template-columns:1fr 1fr;gap:8px}
  .rxui-kpi{padding:13px}.rxui-kpi strong{font-size:23px}
  .rxui-panel{padding:14px}
  .rxui-hero h1{font-size:26px}
  body.rx-ui-system .opdops-actions{grid-template-columns:1fr 1fr!important}
  body.rx-ui-system .rxopd-public-auth-card,
  body.rx-ui-system .rx-company-login-card,
  body.rx-ui-system .mr-login-card,
  body.rx-ui-system .auth-card{padding:20px!important;border-radius:16px!important}
}

/* Role indicators used on the unified login pages */
.rxui-role-chips{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0 2px}
.rxui-role-chips span{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border:1px solid #d9e8fa;border-radius:999px;background:#f4f9ff;color:#244f73;font-size:10px;font-weight:800}
.rxui-booking-process{max-width:1180px;margin:14px auto}

/* Remove legacy rainbow/purple treatments from OPD workflow pages. */
body.rx-ui-system .rx-wf-header,
body.rx-ui-system .rx-report-head,
body.rx-ui-system .portal-head,
body.rx-ui-system .admin-hero,
body.rx-ui-system .company-command-hero,
body.rx-ui-system .company-corporate-hero{
  border:1px solid var(--rxui-line)!important;
  border-radius:18px!important;
  background:linear-gradient(120deg,#fff 0%,#f3f9ff 68%,#ecfdf5 100%)!important;
  color:var(--rxui-ink)!important;
  box-shadow:var(--rxui-shadow)!important;
}
body.rx-ui-system .rx-wf-header h1,
body.rx-ui-system .rx-report-head h1,
body.rx-ui-system .portal-head h1,
body.rx-ui-system .admin-hero h1,
body.rx-ui-system .company-command-hero h1{color:var(--rxui-navy)!important}
body.rx-ui-system .rx-wf-header p,
body.rx-ui-system .rx-report-head p,
body.rx-ui-system .portal-head .eyebrow,
body.rx-ui-system .company-kicker{color:var(--rxui-green)!important}
body.rx-ui-system .rx-wf-header span,
body.rx-ui-system .rx-report-head span,
body.rx-ui-system .portal-head p,
body.rx-ui-system .company-command-hero p{color:#45627f!important}
body.rx-ui-system .rx-wf-panel,
body.rx-ui-system .rx-report-panel,
body.rx-ui-system .review-card,
body.rx-ui-system .kyc-filter-card,
body.rx-ui-system .company-panel,
body.rx-ui-system .company-module-tile,
body.rx-ui-system .rx-report-patient-card{
  border:1px solid var(--rxui-line)!important;
  border-radius:16px!important;
  background:#fff!important;
  color:var(--rxui-ink)!important;
  box-shadow:var(--rxui-shadow)!important;
}
body.rx-ui-system .rx-wf-title p,
body.rx-ui-system .rx-report-panel>h2,
body.rx-ui-system .company-section-head small{color:var(--rxui-green)!important}
body.rx-ui-system .rx-wf-title h2,
body.rx-ui-system .rx-report-panel h2,
body.rx-ui-system .rx-report-panel h3,
body.rx-ui-system .review-card h2,
body.rx-ui-system .company-panel h2{color:var(--rxui-navy)!important}
body.rx-ui-system .rx21-risk-row,
body.rx-ui-system .rx-report-item,
body.rx-ui-system .checklist-row{
  border:1px solid var(--rxui-line)!important;
  border-radius:11px!important;
  background:#fff!important;
  color:var(--rxui-ink)!important;
}
body.rx-ui-system .rx21-risk-row:hover,
body.rx-ui-system .rx-report-item:hover,
body.rx-ui-system .rx-report-item.active{border-color:#94bfe8!important;background:#f4f9ff!important}
body.rx-ui-system .rx21-risk-row>b,
body.rx-ui-system .rx-report-item.active em{background:var(--rxui-green)!important;color:#fff!important}
body.rx-ui-system .review-actions button.primary,
body.rx-ui-system .rx-wf-form-grid button.primary,
body.rx-ui-system .rx-report-form button.primary,
body.rx-ui-system .kyc-filter-card button.primary{background:var(--rxui-green)!important;border-color:var(--rxui-green)!important;color:#fff!important}
body.rx-ui-system .kyc-tab{border:1px solid var(--rxui-line)!important;background:#fff!important;color:var(--rxui-blue-dark)!important}
body.rx-ui-system .kyc-tab.active{background:var(--rxui-blue)!important;border-color:var(--rxui-blue)!important;color:#fff!important}
body.rx-ui-system .approval-warning,
body.rx-ui-system .security-note{border-color:#bfe8dc!important;background:#f5fffb!important;color:#244f45!important}

/* Existing corporate pages that are not yet replaced still follow the same palette. */
body.rx-ui-system .company-action.primary,
body.rx-ui-system .company-link-btn,
body.rx-ui-system .company-module-tile:hover{background:var(--rxui-green)!important;border-color:var(--rxui-green)!important;color:#fff!important}
body.rx-ui-system .company-action:not(.primary){background:#fff!important;border-color:var(--rxui-line)!important;color:var(--rxui-blue-dark)!important}
body.rx-ui-system .company-metric-grid article{border:1px solid var(--rxui-line)!important;background:#fff!important;color:var(--rxui-ink)!important;box-shadow:var(--rxui-shadow)!important}
body.rx-ui-system .company-metric-grid article strong{color:var(--rxui-navy)!important}
body.rx-ui-system .company-chip.on{background:#dcfce7!important;color:var(--rxui-green-dark)!important}
body.rx-ui-system .company-chip.off{background:#eef2f7!important;color:#475569!important}

/* Explicit visual consistency for queue, scan, booking and clinical buttons. */
body.rx-ui-system a.primary,
body.rx-ui-system button.primary,
body.rx-ui-system .button.primary{background:var(--rxui-green)!important;border-color:var(--rxui-green)!important;color:#fff!important}
body.rx-ui-system a.danger,
body.rx-ui-system button.danger{background:#fff!important;border-color:#94a3b8!important;color:#334155!important}
body.rx-ui-system a.warn,
body.rx-ui-system button.warn{background:var(--rxui-blue-soft)!important;border-color:#93c5fd!important;color:var(--rxui-blue-dark)!important}

/* Admin dashboard: the first daily actions remain visually dominant. */
body.rx-ui-system .rx-hero-buttons{display:flex!important;flex-wrap:wrap!important;gap:9px!important}
body.rx-ui-system .rx-module-card summary>span{background:#eef7ff!important;color:var(--rxui-blue)!important}
body.rx-ui-system .rx-module-card.priority summary>span{background:#dcfce7!important;color:var(--rxui-green-dark)!important}

@media(max-width:700px){
  .rxui-role-chips{gap:5px}.rxui-role-chips span{font-size:9px;padding:4px 7px}
  .rxui-booking-process{margin:10px 0}
}


/* ========================================================================== 
   RXOPD role header + mobile quick navigation alignment correction (2026-07-14)
   - no account/switch-role menu
   - direct logout in the header
   - RXOPD logo always visible
   - real SVG icons in sidebar and bottom navigation
   ========================================================================== */
body.rx-ui-system .rx-menu-svg{display:block;width:20px;height:20px;flex:0 0 20px}
body.rx-ui-system .rx-role-nav-group a>span.rx-nav-icon{font-size:0!important;letter-spacing:0!important}
body.rx-ui-system .rx-role-nav-group a>span.rx-nav-icon .rx-menu-svg{width:18px;height:18px}
body.rx-ui-system .rx-role-logout button{display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important}
body.rx-ui-system .rx-role-logout button span{display:grid;place-items:center}
body.rx-ui-system .rx-role-logout button .rx-menu-svg{width:18px;height:18px}

body.rx-ui-system .rx-role-topbar.rxopd-rounded-header{
  top:10px!important;
  left:calc(var(--rxui-sidebar) + 12px)!important;
  right:12px!important;
  min-height:58px!important;
  height:58px!important;
  display:grid!important;
  grid-template-columns:auto auto minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
  padding:7px 10px 7px 14px!important;
  border:1px solid rgba(191,219,254,.92)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:0 12px 34px rgba(8,36,92,.11)!important;
  overflow:visible!important;
}
body.rx-ui-system .rx-role-top-brand{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-width:108px!important;
  text-decoration:none!important;
}
body.rx-ui-system .rx-role-top-brand img{
  display:block!important;
  width:108px!important;
  max-width:100%!important;
  height:38px!important;
  max-height:38px!important;
  object-fit:contain!important;
  object-position:left center!important;
}
body.rx-ui-system .rx-role-page-title{align-self:center!important;min-width:0!important}
body.rx-ui-system .rx-role-page-title small{font-size:9px!important;line-height:1.1!important}
body.rx-ui-system .rx-role-page-title strong{font-size:15px!important;line-height:1.2!important;margin-top:1px!important}
body.rx-ui-system .rx-role-top-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  min-width:0!important;
}
body.rx-ui-system .rx-role-top-actions>a,
body.rx-ui-system .rx-role-top-actions button{
  width:auto!important;
  min-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  padding:8px 11px!important;
  border-radius:12px!important;
  gap:7px!important;
  box-shadow:none!important;
}
body.rx-ui-system .rx-role-top-actions .rx-menu-svg{width:19px;height:19px}
body.rx-ui-system .rxopd-bell-button{position:relative!important;padding:8px!important}
body.rx-ui-system .rxopd-header-logout{margin:0!important}
body.rx-ui-system .rxopd-header-logout button{display:inline-flex!important;align-items:center!important;justify-content:center!important;color:var(--rxui-navy)!important}
body.rx-ui-system .rxopd-header-logout button:hover{color:#fff!important}
body.rx-ui-system .rxopd-header-logout button span{font-size:11px!important;font-weight:850!important;white-space:nowrap!important}
body.rx-ui-system .rx-notification-badge{position:absolute!important;top:-5px!important;right:-5px!important;min-width:18px!important;height:18px!important;padding:0 4px!important;display:grid!important;place-items:center!important;border:2px solid #fff!important;border-radius:999px!important;background:#dc2626!important;color:#fff!important;font-size:9px!important;line-height:1!important}
body.rx-ui-system .rx-notification-badge[hidden]{display:none!important}
body.rx-ui-system .rx-role-main{padding-top:80px!important}

body.rx-ui-system .rx-role-bottom-nav a,
body.rx-ui-system .rx-role-bottom-nav button{
  min-height:61px!important;
  gap:4px!important;
  padding:5px 3px 6px!important;
}
body.rx-ui-system .rx-role-bottom-nav .rx-bottom-icon{
  width:28px!important;
  height:28px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:9px!important;
  color:var(--rxui-blue-dark)!important;
  background:#eef7ff!important;
}
body.rx-ui-system .rx-role-bottom-nav .rx-bottom-icon .rx-menu-svg{width:18px!important;height:18px!important}
body.rx-ui-system .rx-role-bottom-nav strong{
  display:block!important;
  max-width:100%!important;
  min-height:20px!important;
  font-size:9px!important;
  line-height:1.08!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  text-align:center!important;
}
body.rx-ui-system .rx-role-bottom-nav a.active .rx-bottom-icon{color:#fff!important;background:var(--rxui-green)!important;box-shadow:0 5px 12px rgba(7,155,114,.2)!important}
body.rx-ui-system .rx-role-bottom-nav button .rx-bottom-icon{color:#fff!important;background:var(--rxui-navy)!important}

@media(max-width:1100px){
  body.rx-ui-system .rx-role-top-actions>a{display:inline-flex!important}
}

@media(max-width:860px){
  body.rx-ui-system.rx-role-shell{padding-bottom:78px!important}
  body.rx-ui-system .rx-role-topbar.rxopd-rounded-header{
    top:8px!important;
    left:8px!important;
    right:8px!important;
    width:auto!important;
    min-height:56px!important;
    height:56px!important;
    grid-template-columns:42px minmax(86px,1fr) auto!important;
    gap:7px!important;
    padding:6px 7px!important;
    border-radius:17px!important;
  }
  body.rx-ui-system .rx-role-menu-button{
    display:flex!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    border-radius:12px!important;
    padding:0!important;
  }
  body.rx-ui-system .rx-role-top-brand{
    grid-column:2!important;
    justify-content:center!important;
    min-width:0!important;
  }
  body.rx-ui-system .rx-role-top-brand img{
    width:104px!important;
    height:36px!important;
    object-position:center!important;
  }
  body.rx-ui-system .rx-role-page-title{display:none!important}
  body.rx-ui-system .rx-role-top-actions{grid-column:3!important;gap:5px!important}
  body.rx-ui-system .rx-role-top-actions>a,
  body.rx-ui-system .rx-role-top-actions button{
    display:inline-flex!important;
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    padding:8px!important;
    border-radius:12px!important;
  }
  body.rx-ui-system .rxopd-header-logout button span{display:none!important}
  body.rx-ui-system .rx-role-main{margin-left:0!important;padding-top:72px!important}
  body.rx-ui-system .rx-role-bottom-nav{min-height:74px!important;padding-top:4px!important}
}

@media(max-width:390px){
  body.rx-ui-system .rx-role-topbar.rxopd-rounded-header{left:6px!important;right:6px!important;gap:4px!important;padding-left:5px!important;padding-right:5px!important}
  body.rx-ui-system .rx-role-top-brand img{width:88px!important}
  body.rx-ui-system .rx-role-top-actions{gap:3px!important}
  body.rx-ui-system .rx-role-top-actions>a,
  body.rx-ui-system .rx-role-top-actions button,
  body.rx-ui-system .rx-role-menu-button{width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important}
  body.rx-ui-system .rx-role-bottom-nav strong{font-size:8.5px!important}
}
