/* ManuScript canonical UI layer — September 2026
   Loaded after legacy app.css. Keep future design-system overrides here. */

:root{
  --ms-navy:#0f3449;
  --ms-navy-deep:#082839;
  --ms-teal:#0b776f;
  --ms-teal-bright:#19a38f;
  --ms-bg:#f4f7f8;
  --ms-card:#fff;
  --ms-text:#173848;
  --ms-secondary:#566f7b;
  --ms-muted:#667c87;
  --ms-line:#d9e5e8;
  --ms-danger:#a83e50;
  --ms-warning:#946311;
  --ms-success:#176b58;
  --ms-info:#176b91;
  --ms-shadow:0 5px 18px rgba(8,40,57,.055);
  --ms-radius:15px;
  --ms-body:16px;
  --ms-small:13px;
  --ms-label:14px;
  --ms-nav:14px;
  --ms-h3:19px;
  --ms-h2:22px;
  --ms-h1:30px;
  --ms-font:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--ms-font);
  font-size:var(--ms-body);
  line-height:1.56;
  color:var(--ms-text);
  background:var(--ms-bg);
  text-rendering:optimizeLegibility;
}

small{font-size:var(--ms-small)!important;line-height:1.45}
p{line-height:1.62}
h1,h2,h3{color:var(--ms-text);line-height:1.2}
.topbar h1{font-size:24px;font-weight:800;letter-spacing:-.35px}
.hero h2,.detail-hero h2,.rx-hero h2,.review-hero h2{font-size:24px;font-weight:800}
.section-head h2,.patient-panel-head h2,.hospital-queue-head h2{font-size:19px;font-weight:800}
.card h3,.quick-card h2{font-size:var(--ms-h3);font-weight:750}
.eyebrow,.nav-section,.product-label{
  font-size:11.5px;
  font-weight:800;
  letter-spacing:.085em;
}
.page-title .eyebrow{font-size:11px}
.hero p,.detail-hero p,.rx-hero p,.section-head p,
.auth-copy>p,.professional-onboarding-copy>p,.patient-onboarding-copy>p,
.onboarding-intro p,.medicine-discovery-copy p,.review-confirm-card p,
.hospital-command-copy p,.patient-empty-state p{
  color:var(--ms-secondary);
}
.hero p,.detail-hero p,.rx-hero p,.section-head p,
.hospital-command-copy p,.medicine-discovery-copy p{
  max-width:74ch;
}

/* Shell */
.app-shell{grid-template-columns:270px minmax(0,1fr)}
.sidebar{
  width:270px;
  padding:22px 17px 18px;
  box-shadow:8px 0 26px rgba(8,39,54,.055);
}
.manuscript-brand{padding-bottom:15px}
.brand-symbol{width:46px;height:46px}
.brand-copy strong{font-size:21px;font-weight:800}
.brand-copy small{
  margin-top:6px;
  max-width:188px;
  font-size:11.5px!important;
  color:#afc8d1;
}
.product-label{
  margin-bottom:15px;
  padding:8px 10px;
  color:#9cd7ca;
}
.tenant-chip{padding:11px 12px;margin-bottom:16px}
.tenant-chip span{font-size:11px;color:#9bb8c2}
.tenant-chip strong{font-size:13px}
.nav-section{margin:17px 10px 7px;color:#82a4b0}
.sidebar nav{gap:4px}
.sidebar nav a{
  min-height:46px;
  padding:7px 9px;
  gap:10px;
  border-radius:11px;
  font-size:var(--ms-nav);
  font-weight:650;
}
.sidebar nav a b{font-weight:650}
.nav-icon-wrap{
  display:grid!important;
  place-items:center;
  width:32px!important;
  height:32px!important;
  flex:0 0 32px;
  border-radius:9px;
  background:rgba(255,255,255,.055);
}
.nav-icon{width:18px;height:18px;display:block}
.sidebar nav a.active .nav-icon-wrap{background:#167f74;color:#fff}
.trust-strip{font-size:12px;color:#91b0ba}
.user-mini>span{width:38px;height:38px}
.user-mini strong{font-size:12.5px}
.user-mini small{font-size:12px!important}
.logout{font-size:12.5px;min-height:42px;align-items:center}

.topbar{
  min-height:80px;
  padding:13px 30px;
}
.content{padding:27px 30px 48px}
.messages{padding-left:30px;padding-right:30px}
.app-footer{font-size:12px}
.app-footer span{font-size:12.5px}
.app-footer small{font-size:12px!important}

/* Cards and controls */
.card{
  border-color:var(--ms-line);
  border-radius:var(--ms-radius);
  box-shadow:var(--ms-shadow);
}
.hero,.detail-hero,.rx-hero{padding:23px 25px}
.primary,.secondary,.danger,button{
  min-height:44px;
  padding:0 16px;
  border-radius:10px;
  font-size:13px;
  font-weight:700;
}
.compact{min-height:42px;font-size:12.5px}
input,select,textarea,.control,
.searchbar input,.filters input,.filters select,.medicine-search input,
.medicine-discovery-search input{
  font-family:var(--ms-font);
  font-size:15px;
}
.control,.searchbar input,.filters input,.filters select,.medicine-search input{
  min-height:46px;
}
.form-grid label,.upload-form label,.form-card form>label,
.onboarding-form-grid label,.auth-form form label,
.patient-registration-card label{
  font-size:13px;
  font-weight:650;
  color:#4b6673;
}
.form-grid label>span,.onboarding-form-grid label>span{font-size:13px}
.form-card h2{font-size:20px}
.form-card{padding:22px}

/* Metrics and tables */
.metrics{gap:12px}
.metrics article{
  min-height:118px;
  padding:18px 19px;
  border-radius:14px;
  box-shadow:var(--ms-shadow);
}
.metrics span{font-size:12.5px;font-weight:700;color:#647b87}
.metrics strong{
  font-size:31px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}
.metrics small{color:var(--ms-secondary)}
.pharmacy-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
.section-head{padding:17px 19px}
.section-head>a{font-size:13px}
.tr{min-height:58px;padding:12px 17px;font-size:13px}
.tr.th{font-size:11.5px;font-weight:800;letter-spacing:.05em}
.tr small{color:var(--ms-secondary)}
.status{
  min-height:28px;
  min-width:72px;
  padding:5px 9px;
  font-size:11.5px;
  font-weight:750;
}
.status.issued,.status.accepted,.status.ready,.status.dispensed,.status.completed{background:#e7f4ed;color:var(--ms-success)}
.status.draft,.status.received,.status.review,.status.quoted{background:#fff4dc;color:var(--ms-warning)}
.status.preparing,.status.delivery{background:#e7f2f8;color:var(--ms-info)}
.status.revoked,.status.rejected,.status.expired{background:#fae9ed;color:var(--ms-danger)}
.status.cancelled{background:#edf1f3;color:#61737d}
.pill{font-size:11.5px;padding:5px 9px}
.quick{padding:13px 14px}
.quick strong{font-size:13.5px}
.quick small{color:var(--ms-secondary)}

/* Medicine discovery */
.medicine-discovery-copy h2{font-size:27px;font-weight:800}
.medicine-discovery-search{min-height:58px}
.medicine-search-submit{min-height:46px}
.medicine-discovery-meta,.medicine-explore-tile small,
.medicine-result-name span,.medicine-result-name small,
.medicine-result-row>span,.medicine-result-row>div:nth-child(2)>span{
  font-size:12.5px;
}
.medicine-result-row{font-size:13px;min-height:70px}
.medicine-result-row strong{font-size:13.5px}
.medicine-guide-chip{font-size:11.5px}
.medicine-alphabet a{min-width:36px;min-height:40px;font-size:12.5px}

/* Prescription workflow */
.rx-stepper{padding:14px 18px}
.rx-step strong{font-size:13px}
.rx-step small{font-size:12px!important}
.rx-step>span{width:34px;height:34px;font-size:12px}
.rx-express-layout{grid-template-columns:minmax(0,1fr) 300px;gap:18px}
.rx-safety-column{gap:14px}
.rx-lines,.rx-item{border-radius:var(--ms-radius)}
.rx-item{padding:18px 19px}
.rx-item-head strong{font-size:14px}
.delete-check{font-size:12px}
.rx-subsection-title{
  display:flex;
  align-items:center;
  gap:9px;
  margin:18px 0 9px;
  color:#4e6874;
  font-size:12px;
  font-weight:800;
  letter-spacing:.065em;
  text-transform:uppercase;
}
.rx-subsection-title:after{content:"";height:1px;flex:1;background:#e4ecef}
.rx-item-head+.rx-subsection-title{margin-top:9px}
.smart-med-search label>span,.regimen-field>span,.instructions-field>span{
  font-size:13px;
  font-weight:700;
}
.medicine-search-input{min-height:48px;font-size:15px}
.med-inline-head strong{font-size:14px}
.med-inline-summary,.med-inline-details{font-size:12.5px}
.rx-med-meta,.rx-regimen-grid{gap:11px}
.quick-chips button,.quantity-recalculate,.med-info-toggle{
  min-height:40px;
  font-size:12px;
}
.interaction-live{padding:13px 14px}
.interaction-live strong{font-size:13px}
.interaction-live span{font-size:12.5px}
.patient-safety-panel p,.workflow-note p{font-size:12.5px;color:var(--ms-secondary)}
.sticky-form-footer{padding:11px}
.review-patient-grid>div>span,.review-regimen span{font-size:12px}
.review-patient-grid>div>strong,.review-regimen strong{font-size:13.5px}
.review-med-title h3{font-size:17px}
.review-med-body>p,.review-instructions{font-size:12.5px}
.review-confirm-card label{font-size:12.5px;line-height:1.45}

/* Patient dashboard: make actions more prominent than historical totals */
.patient-priority-actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}
.patient-priority-card{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:82px;
  padding:14px 15px;
  border:1px solid var(--ms-line);
  border-left:4px solid var(--ms-info);
  border-radius:13px;
  background:#fff;
  box-shadow:var(--ms-shadow);
}
.patient-priority-card:hover{text-decoration:none;transform:translateY(-1px)}
.patient-priority-card.quote{border-left-color:var(--ms-warning)}
.patient-priority-card.payment{border-left-color:var(--ms-info)}
.patient-priority-card.ready{border-left-color:var(--ms-success);background:#f8fcfa}
.patient-priority-card.delivery{border-left-color:#377f9c}
.patient-priority-icon{
  display:grid;place-items:center;
  width:38px;height:38px;flex:0 0 38px;
  border-radius:10px;background:#edf4f7;
  color:#1c6887;font-weight:800;font-size:12px;
}
.patient-priority-card>div{display:flex;flex-direction:column;min-width:0}
.patient-priority-card strong{font-size:13.5px;color:var(--ms-text)}
.patient-priority-card small{color:var(--ms-secondary)}
.patient-priority-card>b{margin-left:auto;color:#78909b;font-size:18px}
.patient-summary-card strong{font-variant-numeric:tabular-nums}

/* Auth and onboarding */
.auth-form h2{font-size:30px;font-weight:800}
.auth-copy h1{font-weight:800}
.auth-copy>p{font-size:15px}
.auth-points span{font-size:12.5px}
.auth-login-card{box-shadow:0 16px 48px rgba(8,40,57,.085)}
.auth-form p{font-size:13px}
.login-register-box strong{font-size:13px}
.login-register-box span{font-size:12px}
.auth-upload-link strong,.auth-admin-link strong{font-size:13px}
.auth-upload-link small,.auth-admin-link small{font-size:12px!important}
.onboarding-intro p,.account-type-card p{font-size:13.5px}
.account-type-card h2{font-size:21px}
.professional-onboarding-copy>p,.patient-onboarding-copy>p{font-size:14px}
.verification-callout strong{font-size:13px}
.verification-callout span{font-size:12.5px}
.consent-note{font-size:12.5px;line-height:1.55}

/* Public/verification surfaces */
.verify-card dt{font-size:12px}
.verify-card dd,.verify-card section strong,.verify-card section span{font-size:13px}
.verify-card footer{font-size:12px}
.clinical-warning{font-size:12.5px;line-height:1.55}

/* Tablet / compact desktop */
@media(max-width:1280px){
  .pharmacy-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
  .rx-express-layout{grid-template-columns:minmax(0,1fr) 275px}
}

/* Drawer navigation for tablets */
@media(max-width:1100px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{
    position:fixed;
    left:-310px;
    top:0;
    width:292px;
    height:100dvh;
    z-index:30;
    transition:left .2s ease;
  }
  .nav-open .sidebar{left:0}
  .nav-open{overflow:hidden}
  .nav-backdrop{z-index:29}
  .menu-btn{
    display:inline-grid;
    place-items:center;
    width:44px;min-width:44px;height:44px;
  }
  .content{padding:24px 22px 46px}
  .messages{padding-left:22px;padding-right:22px}
  .app-footer{width:calc(100% - 44px);margin-left:22px;margin-right:22px}
  .rx-express-layout{grid-template-columns:1fr}
  .rx-safety-column{position:static;grid-template-columns:1fr 1fr}
  .review-layout,.dashboard-grid,.patient-dashboard-grid,.hospital-work-queues{grid-template-columns:1fr}
  .review-side{position:static}
}

/* Portrait tablet */
@media(max-width:820px){
  body{font-size:16px}
  .topbar{min-height:74px;padding:10px 14px}
  .topbar h1{font-size:21px}
  .content{padding:19px 14px 42px}
  .messages{padding:10px 14px 0}
  .app-footer{width:calc(100% - 28px);margin-left:14px;margin-right:14px}
  .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pharmacy-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .metrics article{min-height:108px;padding:16px}
  .form-grid,.onboarding-form-grid,.medicine-filter-grid{grid-template-columns:1fr}
  .form-grid .span2,.onboarding-form-grid .span2{grid-column:1/-1}
  .patient-priority-actions{grid-template-columns:1fr}
  .patient-summary-grid{grid-template-columns:1fr}
  .rx-safety-column{grid-template-columns:1fr}
  .rx-regimen-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .review-patient-grid,.review-regimen{grid-template-columns:repeat(2,minmax(0,1fr))}
  .medicine-result-header{display:none}
  .medicine-results-table{display:grid;gap:10px;padding:10px}
  .medicine-result-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "name guide"
      "dose action"
      "route action";
    gap:6px 12px;
    padding:14px;
    min-height:0;
    border:1px solid var(--ms-line)!important;
    border-radius:12px;
    background:#fff;
  }
  .medicine-result-row .medicine-result-name{grid-area:name}
  .medicine-result-row>div:nth-child(2){grid-area:dose}
  .medicine-result-row>span:nth-child(3){grid-area:route}
  .medicine-result-row>span:nth-child(4){display:none}
  .medicine-result-row>.medicine-guide-chip{grid-area:guide;justify-self:end}
  .medicine-result-row>b{grid-area:action;align-self:end;justify-self:end}
  input,select,textarea,.control,.medicine-search-input{font-size:16px}
}

/* Phone */
@media(max-width:600px){
  .topbar .eyebrow{display:none}
  .topbar h1{
    max-width:calc(100vw - 155px);
    font-size:19px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .top-actions{gap:6px}
  .lang a{min-width:37px;min-height:40px;font-size:12px}
  .top-actions .primary{display:none}
  .mobile-primary-action{display:flex}
  .content{padding:16px 12px 88px}
  .hero,.detail-hero,.rx-hero{padding:18px;align-items:flex-start;flex-direction:column}
  .metrics{gap:9px}
  .metrics article{min-height:100px}
  .metrics strong{font-size:28px}
  .section-head{align-items:flex-start;gap:8px;flex-direction:column;padding:15px}
  .section-head>a{min-height:40px;display:inline-flex;align-items:center}
  .form-card{padding:16px}
  .rx-item{padding:15px}
  .rx-stepper{
    overflow-x:auto;
    justify-content:flex-start;
    gap:8px;
    scrollbar-width:none;
  }
  .rx-step{min-width:128px}
  .rx-stepper>i{min-width:20px}
  .rx-regimen-grid,.review-patient-grid,.review-regimen{grid-template-columns:1fr}
  .sticky-form-footer{
    bottom:7px;
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .sticky-form-footer .primary{grid-column:1/-1}
  .medicine-discovery-search{display:grid;grid-template-columns:1fr}
  .medicine-search-submit{width:100%}
  .medicine-result-row{
    grid-template-columns:1fr auto;
    grid-template-areas:
      "name guide"
      "dose dose"
      "route action";
  }

  /* Mobile login: brand first, form immediately afterwards. */
  .auth-shell{display:block}
  .auth-visual{
    min-height:auto;
    padding:22px 18px 24px;
  }
  .auth-logo img{width:44px;height:44px}
  .auth-logo strong{font-size:19px}
  .auth-copy{margin:24px 0 0}
  .auth-copy .eyebrow{display:none}
  .auth-copy h1{
    margin:0 0 10px;
    font-size:30px;
    line-height:1.08;
    letter-spacing:-.035em;
  }
  .auth-copy>p{font-size:13px;line-height:1.55}
  .auth-points{display:none}
  .auth-visual-footer{display:none}
  .auth-form{padding:18px 12px 32px}
  .auth-login-card{padding:21px 18px}
  .auth-form h2{font-size:26px}
  .onboarding-public-header{padding:12px 14px}
  .brand.public .brand-copy small{display:none}
  .professional-onboarding-shell,.patient-onboarding-shell{padding-left:12px;padding-right:12px}
  .verification-callout{padding:12px}
}

/* Narrow phone */
@media(max-width:480px){
  .metrics,.pharmacy-metrics{grid-template-columns:1fr}
  .metrics article{min-height:92px}
  .patient-summary-grid{grid-template-columns:1fr}
  .topbar h1{max-width:calc(100vw - 148px)}
  .medicine-result-row{
    grid-template-columns:1fr;
    grid-template-areas:"name" "dose" "route" "guide" "action";
  }
  .medicine-result-row>.medicine-guide-chip,
  .medicine-result-row>b{justify-self:start}
  .sticky-form-footer{grid-template-columns:1fr}
  .sticky-form-footer .primary{grid-column:auto}
}

@media(max-width:1366px) and (pointer:coarse){
  .app-shell{grid-template-columns:1fr}
  .sidebar{
    position:fixed;
    left:-310px;
    top:0;
    width:292px;
    height:100dvh;
    z-index:30;
  }
  .nav-open .sidebar{left:0}
  .menu-btn{display:inline-grid;place-items:center}
}

@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}


/* Structured professional onboarding */
.onboarding-section-title{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  gap:11px;
  margin:8px 0 0;
  padding:13px 14px;
  border:1px solid #dce8eb;
  border-radius:11px;
  background:#f7fafb;
}
.onboarding-section-title>span{
  display:grid;
  place-items:center;
  width:30px;height:30px;
  flex:0 0 30px;
  border-radius:9px;
  background:#e6f2f3;
  color:#0b776f;
  font-size:12px;
  font-weight:800;
}
.onboarding-section-title>div{display:flex;flex-direction:column}
.onboarding-section-title strong{font-size:13.5px;color:var(--ms-text)}
.onboarding-section-title small{color:var(--ms-secondary)}

/* Complete drawer treatment for large touch tablets */
@media(max-width:1366px) and (pointer:coarse){
  .sidebar-close{display:grid;place-items:center}
  .nav-backdrop{
    display:none;
    position:fixed;
    inset:0;
    z-index:29;
    width:100%;
    height:100%;
    padding:0;
    border:0;
    border-radius:0;
    background:rgba(5,29,41,.5);
    backdrop-filter:blur(2px);
  }
  .nav-open .nav-backdrop{display:block}
  .nav-open{overflow:hidden}
}


/* ==========================================================
   ManuScript login refinement — September 2026
   Split-screen balance, contrast, density and responsive UX
   ========================================================== */
.auth-login-shell{
  min-height:100dvh;
  grid-template-columns:minmax(0,1.04fr) minmax(480px,.96fr);
  background:#eef4f6;
}

.auth-login-shell .auth-visual{
  min-height:100dvh;
  padding:38px clamp(44px,5.2vw,82px);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background:
    radial-gradient(circle at 82% 18%,rgba(91,221,191,.13),transparent 22rem),
    radial-gradient(circle at 84% 88%,rgba(34,118,148,.24),transparent 28rem),
    linear-gradient(150deg,#082a3b 0%,#0d3f55 58%,#0b5260 115%);
}

.auth-login-shell .auth-visual:after{
  opacity:.72;
  right:-110px;
  bottom:-150px;
}

.auth-login-shell .auth-logo{
  gap:14px;
  align-items:center;
}
.auth-login-shell .auth-logo img{
  width:56px;
  height:56px;
  filter:drop-shadow(0 9px 22px rgba(0,0,0,.18));
}
.auth-login-shell .auth-logo strong{
  font-size:22px;
  font-weight:800;
  letter-spacing:-.35px;
}
.auth-login-shell .auth-logo strong em{color:#72e3c9}

.auth-login-shell .auth-copy{
  width:min(650px,100%);
  margin:auto 0;
  padding:52px 0 62px;
}
.auth-login-shell .auth-copy .eyebrow{
  color:#70dfc6;
  font-size:11.5px;
  letter-spacing:.095em;
}
.auth-login-shell .auth-copy h1{
  max-width:620px;
  margin:17px 0 20px;
  color:#fff;
  font-size:clamp(44px,4vw,61px);
  line-height:1.01;
  letter-spacing:-.052em;
  text-wrap:balance;
  text-shadow:0 2px 18px rgba(0,0,0,.08);
}
.auth-login-shell .auth-copy>p{
  max-width:590px;
  color:#d6e4e9;
  font-size:15.5px;
  line-height:1.65;
}
.auth-login-shell .auth-points{
  gap:10px;
  margin-top:30px;
}
.auth-login-shell .auth-points span{
  min-height:48px;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:11px;
  background:rgba(255,255,255,.055);
  color:#e0ebef;
  font-size:12.5px;
  backdrop-filter:blur(5px);
}
.auth-login-shell .auth-points b{
  display:grid;
  place-items:center;
  width:21px;
  height:21px;
  flex:0 0 21px;
  border-radius:50%;
  background:rgba(75,208,177,.14);
  color:#72e3c9;
}
.auth-login-shell .auth-visual-footer span{
  color:#bcd2da;
  font-size:12px;
}
.auth-login-shell .auth-visual-footer small{
  color:#87a8b5;
  font-size:11.5px!important;
}

/* Right-hand authentication panel */
.auth-login-panel{
  min-height:100dvh;
  padding:34px clamp(28px,5vw,72px);
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at 50% 15%,rgba(255,255,255,.9),transparent 26rem),
    #eef4f6;
}
.auth-login-wrap{
  width:min(472px,100%);
  display:grid;
  gap:11px;
}
.auth-login-card{
  padding:29px 31px 28px;
  border:1px solid #d9e5e8;
  border-radius:20px;
  background:#fff;
  box-shadow:0 18px 55px rgba(8,40,57,.085);
}
.auth-login-header{margin-bottom:22px}
.auth-login-header .eyebrow{
  color:#547989;
  font-size:11px;
}
.auth-login-header h2{
  margin:7px 0 6px;
  color:#10384d;
  font-size:34px;
  line-height:1.05;
  letter-spacing:-.7px;
}
.auth-login-header p{
  margin:0;
  color:#687f8a;
  font-size:13.5px;
}

.auth-login-form{
  display:grid;
  gap:15px;
}
.auth-login-form label{
  display:grid;
  gap:7px;
  margin:0!important;
}
.auth-login-form label>span{
  color:#365568;
  font-size:12.5px;
  font-weight:700;
}
.auth-login-form input{
  width:100%;
  min-height:51px;
  padding:0 13px;
  border:1px solid #cadbe1;
  border-radius:10px;
  background:#fbfdfe;
  color:#173848;
  font-size:15px;
  box-shadow:none;
  outline:0;
}
.auth-login-form input:hover{border-color:#aec8d1}
.auth-login-form input:focus{
  border-color:#3b95b0;
  background:#fff;
  box-shadow:0 0 0 4px rgba(37,137,167,.11);
}
.auth-login-form input:-webkit-autofill,
.auth-login-form input:-webkit-autofill:hover,
.auth-login-form input:-webkit-autofill:focus{
  -webkit-text-fill-color:#173848;
  -webkit-box-shadow:0 0 0 1000px #fbfdfe inset;
  transition:background-color 9999s ease-out 0s;
}
.auth-submit{
  min-height:50px;
  margin-top:2px;
  border-radius:10px;
  font-size:13.5px;
  box-shadow:0 8px 20px rgba(10,104,103,.16);
}
.auth-divider{
  display:flex;
  align-items:center;
  gap:11px;
  margin:20px 0 15px;
  color:#7d919a;
  font-size:11.5px;
}
.auth-divider:before,.auth-divider:after{
  content:"";
  height:1px;
  flex:1;
  background:#dce6e9;
}
.login-register-polished{
  display:grid;
  gap:10px;
  padding:0;
  border:0;
  background:transparent;
}
.login-register-polished>div{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.login-register-polished strong{
  color:#173f53;
  font-size:13px;
}
.login-register-polished span{
  color:#748893;
  font-size:12px;
}
.login-register-polished .secondary{
  min-height:46px;
  border-color:#cbdde3;
  background:#fff;
}

/* Alternative access links now behave as one support group */
.auth-access-links{
  display:grid;
  gap:8px;
  margin-top:2px;
}
.auth-upload-link,.auth-admin-link{
  min-height:62px;
  display:grid;
  grid-template-columns:36px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid #d8e4e8;
  border-radius:12px;
  background:rgba(255,255,255,.68);
  box-shadow:none;
}
.auth-upload-link:hover,.auth-admin-link:hover{
  border-color:#b9d0d7;
  background:#fff;
  transform:translateY(-1px);
}
.auth-access-icon{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:9px;
  background:#e8f4f7;
  color:#1e728f;
  font-size:15px;
  font-weight:800;
}
.auth-access-icon.admin{
  background:#eef1f3;
  color:#536d7b;
  font-size:12px;
}
.auth-upload-link>span:nth-child(2),
.auth-admin-link>span:nth-child(2){
  display:flex;
  flex-direction:column;
  min-width:0;
}
.auth-upload-link strong,.auth-admin-link strong{
  color:#193f53;
  font-size:12.5px;
}
.auth-upload-link small,.auth-admin-link small{
  color:#7a8e98;
  font-size:11.5px!important;
}
.auth-upload-link>b,.auth-admin-link>b{
  color:#67808c;
  font-size:11.5px;
  white-space:nowrap;
}

/* Desktop/laptop balance */
@media(max-width:1280px){
  .auth-login-shell{
    grid-template-columns:minmax(0,1fr) minmax(455px,.92fr);
  }
  .auth-login-shell .auth-visual{
    padding-left:42px;
    padding-right:42px;
  }
  .auth-login-shell .auth-copy h1{font-size:48px}
  .auth-login-panel{padding-left:28px;padding-right:28px}
}

/* Tablet */
@media(max-width:900px){
  .auth-login-shell{display:block}
  .auth-login-shell .auth-visual{
    min-height:auto;
    padding:24px 22px 26px;
  }
  .auth-login-shell .auth-copy{
    margin:26px 0 0;
    padding:0;
  }
  .auth-login-shell .auth-copy h1{
    margin:8px 0 10px;
    font-size:36px;
  }
  .auth-login-shell .auth-copy>p{
    margin:0;
    font-size:13.5px;
  }
  .auth-login-shell .auth-points,
  .auth-login-shell .auth-visual-footer{
    display:none;
  }
  .auth-login-panel{
    min-height:auto;
    padding:20px 14px 34px;
    align-items:flex-start;
  }
  .auth-login-wrap{width:min(540px,100%)}
}

/* Phone */
@media(max-width:600px){
  .auth-login-shell .auth-visual{
    padding:18px 16px 20px;
  }
  .auth-login-shell .auth-logo img{width:44px;height:44px}
  .auth-login-shell .auth-logo strong{font-size:19px}
  .auth-login-shell .auth-copy{margin-top:20px}
  .auth-login-shell .auth-copy h1{
    font-size:30px;
    line-height:1.08;
  }
  .auth-login-shell .auth-copy>p{
    font-size:13px;
    line-height:1.55;
  }
  .auth-login-card{
    padding:21px 18px;
    border-radius:17px;
  }
  .auth-login-header{margin-bottom:18px}
  .auth-login-header h2{font-size:28px}
  .auth-login-form input{font-size:16px}
  .auth-access-links{gap:7px}
  .auth-upload-link,.auth-admin-link{
    min-height:60px;
    grid-template-columns:34px minmax(0,1fr) auto;
  }
}

@media(max-width:420px){
  .auth-login-shell .auth-copy>p{display:none}
  .auth-admin-link>b{display:none}
  .auth-upload-link,.auth-admin-link{
    grid-template-columns:34px minmax(0,1fr);
  }
}


/* ==========================================================
   ManuScript sidebar ergonomics — September 2026
   Fixed account footer + independently scrollable navigation
   ========================================================== */
.sidebar{
  height:100dvh;
  max-height:100dvh;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:16px 16px 12px;
}

.manuscript-brand,
.product-label,
.tenant-chip,
.side-bottom{
  flex:0 0 auto;
}

.manuscript-brand{
  min-height:0;
  padding:0 4px 11px;
  gap:11px;
}
.sidebar .brand-symbol{
  width:42px;
  height:42px;
}
.sidebar .brand-copy strong{
  font-size:19px;
  line-height:1.05;
}
.sidebar .brand-copy small{
  margin-top:4px;
  max-width:176px;
  font-size:11px!important;
  line-height:1.3;
}

.sidebar .product-label{
  margin:0 4px 11px;
  padding:7px 9px;
  border-radius:9px;
  font-size:10.5px;
  line-height:1.35;
}

.sidebar .tenant-chip{
  margin:0 4px 11px;
  padding:9px 11px;
  border-radius:10px;
}
.sidebar .tenant-chip span{
  font-size:10px;
}
.sidebar .tenant-chip strong{
  margin-top:2px;
  font-size:12.5px;
  line-height:1.3;
}

/* Only the menu list scrolls when vertical space is limited. */
.sidebar nav{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(155,195,207,.34) transparent;
  padding:1px 4px 10px 0;
  margin-right:-3px;
}
.sidebar nav::-webkit-scrollbar{width:5px}
.sidebar nav::-webkit-scrollbar-track{background:transparent}
.sidebar nav::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:rgba(155,195,207,.28);
}

.sidebar .nav-section{
  margin:12px 9px 5px;
  font-size:10.5px;
  letter-spacing:.105em;
}
.sidebar nav a{
  min-height:43px;
  padding:5px 8px;
  gap:9px;
  border-radius:10px;
  font-size:13px;
}
.sidebar .nav-icon-wrap{
  width:30px!important;
  height:30px!important;
  flex-basis:30px;
}
.sidebar .nav-icon{
  width:17px;
  height:17px;
}

/* Persistent account/footer zone */
.sidebar .side-bottom{
  position:relative;
  z-index:2;
  margin-top:0;
  padding:10px 3px 0;
  border-top:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg,rgba(8,40,57,.22),rgba(8,40,57,.74));
  box-shadow:0 -10px 24px rgba(5,27,39,.12);
}

.sidebar .trust-strip{
  min-height:24px;
  margin:0 0 7px;
  padding:0 3px;
  gap:7px;
  font-size:11px;
}
.sidebar .trust-strip i{
  width:7px;
  height:7px;
}

.sidebar .user-mini{
  min-width:0;
  padding:3px 3px 7px;
  gap:9px;
}
.sidebar .user-mini>span{
  width:34px;
  height:34px;
  flex:0 0 34px;
  font-size:12px;
}
.sidebar .user-mini>div{
  min-width:0;
  overflow:hidden;
}
.sidebar .user-mini strong,
.sidebar .user-mini small{
  display:block;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.sidebar .user-mini strong{
  font-size:12px;
  color:#f2f7f9;
}
.sidebar .user-mini small{
  font-size:10.5px!important;
  color:#8eb0bd;
}

.sidebar .logout{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  min-height:42px;
  margin:2px 0 0;
  padding:0 11px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:9px;
  background:rgba(255,255,255,.055);
  color:#c8d9df;
  font-size:12px;
  font-weight:700;
}
.sidebar .logout:hover{
  color:#fff;
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.09);
}
.sidebar .logout span{
  font-size:13px;
  opacity:.85;
}

/* Short laptop displays: compress chrome before touching menu legibility. */
@media(max-height:760px) and (min-width:1101px){
  .sidebar{padding-top:11px;padding-bottom:9px}
  .manuscript-brand{padding-bottom:7px}
  .sidebar .brand-symbol{width:38px;height:38px}
  .sidebar .brand-copy strong{font-size:18px}
  .sidebar .brand-copy small{display:none}
  .sidebar .product-label{
    margin-bottom:8px;
    padding:6px 8px;
  }
  .sidebar .tenant-chip{
    margin-bottom:8px;
    padding:7px 9px;
  }
  .sidebar .nav-section{margin-top:9px}
  .sidebar nav a{
    min-height:39px;
    font-size:12.5px;
  }
  .sidebar .nav-icon-wrap{
    width:28px!important;
    height:28px!important;
    flex-basis:28px;
  }
  .sidebar .side-bottom{padding-top:7px}
  .sidebar .trust-strip{margin-bottom:4px}
  .sidebar .logout{min-height:39px}
}

/* Drawer uses the same fixed-footer structure on tablets/phones. */
@media(max-width:1100px), (max-width:1366px) and (pointer:coarse){
  .sidebar{
    height:100dvh;
    max-height:100dvh;
    padding-top:max(16px,env(safe-area-inset-top));
    padding-bottom:max(12px,env(safe-area-inset-bottom));
  }
}


/* ==========================================================
   Prescription detail layout — September 2026
   Prevent patient/prescriber/action overlap across breakpoints
   ========================================================== */
.prescription-sheet{
  min-width:0;
}

.prescription-sheet .rx-party-header{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(250px,340px);
  gap:24px;
  align-items:start;
  padding-bottom:16px;
  border-bottom:2px solid #e8eef1;
}

.rx-patient-block,
.rx-prescriber-block{
  min-width:0;
}

.rx-patient-block{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

.rx-prescriber-block{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  text-align:left;
}

.rx-party-header .eyebrow{
  display:block;
  margin-bottom:5px;
}

.rx-patient-block h3{
  max-width:100%;
  margin:0 0 4px;
  font-size:20px;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.rx-patient-block p{
  max-width:100%;
  margin:0;
  color:var(--ms-secondary);
  font-size:12.5px;
  line-height:1.45;
  overflow-wrap:anywhere;
}

.rx-prescriber-block strong{
  display:block;
  max-width:100%;
  color:var(--ms-text);
  font-size:15px;
  font-weight:750;
  line-height:1.35;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.rx-prescriber-block small{
  display:block;
  max-width:100%;
  color:var(--ms-secondary);
  font-size:12.5px!important;
  line-height:1.4;
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* Action bar can wrap instead of compressing controls into each other. */
.rx-detail-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
  gap:9px;
  min-width:0;
  max-width:100%;
}

.rx-detail-actions .inline-action-form,
.rx-detail-actions .send-rx-form{
  margin:0;
}

.rx-detail-actions .send-rx-form{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
}

.rx-detail-actions .send-rx-form label{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:36px;
  margin:0;
  color:#45616f;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}

.rx-detail-actions .send-rx-form input[type="checkbox"]{
  width:15px;
  height:15px;
  margin:0;
  flex:0 0 auto;
}

.rx-detail-actions .secondary,
.rx-detail-actions .primary{
  white-space:nowrap;
}

/* Right-side detail cards: long values should wrap cleanly. */
.side-stack,
.side-stack>.card{
  min-width:0;
}

.side-stack dd,
.side-stack dt{
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.side-stack dd{
  line-height:1.45;
}

/* Tablet: stack identity blocks before space becomes constrained. */
@media(max-width:980px){
  .prescription-sheet .rx-party-header{
    grid-template-columns:1fr;
    gap:13px;
  }
  .rx-prescriber-block{
    padding-top:12px;
    border-top:1px solid #e8eef1;
  }
  .rx-detail-actions{
    justify-content:flex-start;
    width:100%;
  }
}

/* Phone: actions become easy-to-tap rows and never overflow. */
@media(max-width:620px){
  .rx-detail-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }
  .rx-detail-actions>.status{
    grid-column:1/-1;
    justify-self:start;
  }
  .rx-detail-actions .inline-action-form{
    display:contents;
  }
  .rx-detail-actions .inline-action-form button,
  .rx-detail-actions>a,
  .rx-detail-actions>button{
    width:100%;
  }
  .rx-detail-actions .send-rx-form{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    width:100%;
    padding-top:4px;
  }
  .rx-detail-actions .send-rx-form button{
    grid-column:1/-1;
    width:100%;
  }
  .rx-detail-actions .send-rx-form label{
    min-height:42px;
    padding:0 10px;
    border:1px solid #dce6e9;
    border-radius:9px;
    background:#f8fafb;
  }
}

@media(max-width:420px){
  .rx-detail-actions{
    grid-template-columns:1fr;
  }
  .rx-detail-actions .send-rx-form{
    grid-template-columns:1fr;
  }
  .rx-detail-actions .send-rx-form button{
    grid-column:auto;
  }
}


/* Doctor signature onboarding and review */
.doctor-signature-review .signature-image-link{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:130px;
  padding:16px;
  background:#fff;
}
.doctor-signature-review .signature-image-link img{
  display:block;
  width:auto;
  max-width:min(520px,100%);
  max-height:150px;
  object-fit:contain;
  filter:grayscale(1);
}
.legacy-signature-upload{
  padding:16px 18px 18px;
  border-top:1px solid #e5ecef;
}
.legacy-signature-upload .onboarding-form-grid{
  margin-bottom:12px;
}


/* ==========================================================
   Pharmacy order workspace — September 2026
   Wide dispensing area + restrained action rail
   ========================================================== */
.pharmacy-order-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(310px,360px);
  gap:18px;
  align-items:start;
}
.order-main-stack{min-width:0}
.order-action-stack{
  min-width:0;
  position:sticky;
  top:96px;
  align-self:start;
}

.order-workflow-hero{
  padding:20px 22px;
  margin-bottom:14px;
}
.workflow-strip.card{
  margin:0 0 16px;
  padding:12px 16px;
}
.workflow-strip>div{
  min-width:86px;
  position:relative;
}
.workflow-strip>div.current>span{
  background:#0b776f;
  color:#fff;
  box-shadow:0 0 0 5px rgba(11,119,111,.10);
}
.workflow-strip>div.current strong{
  color:#0b776f;
  font-weight:800;
}

.order-patient-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}
.order-patient-grid>div{
  min-width:0;
  padding:11px 12px;
}
.order-patient-grid span{
  font-size:11.5px;
  color:#70838d;
}
.order-patient-grid strong{
  font-size:13px;
  line-height:1.4;
  overflow-wrap:anywhere;
}

.pharmacy-quote-workspace{
  overflow:hidden;
}
.quote-workspace-head{
  align-items:flex-start;
  padding:19px 20px;
}
.quote-workspace-head>div{min-width:0}
.quote-workspace-head h2{
  font-size:20px;
  margin-top:3px;
}
.quote-workspace-head p{
  max-width:74ch;
  margin:5px 0 0;
  color:var(--ms-secondary);
  font-size:13px;
  line-height:1.55;
}

.quote-workspace-form{
  padding:0 20px 20px;
}
.quote-line-head{
  display:grid;
  grid-template-columns:minmax(230px,1.7fr) minmax(155px,.85fr) minmax(120px,.65fr) minmax(125px,.7fr) minmax(110px,.6fr);
  gap:10px;
  padding:10px 12px;
  border:1px solid #dce6e9;
  border-bottom:0;
  border-radius:11px 11px 0 0;
  background:#f6f9fa;
  color:#5c737e;
  font-size:11px;
  font-weight:800;
  letter-spacing:.035em;
  text-transform:uppercase;
}
.quote-lines{
  display:grid;
  gap:0;
  border:1px solid #dce6e9;
  border-radius:0 0 11px 11px;
  overflow:hidden;
}
.quote-line{
  display:grid;
  grid-template-columns:minmax(230px,1.7fr) minmax(155px,.85fr) minmax(120px,.65fr) minmax(125px,.7fr) minmax(110px,.6fr);
  gap:10px;
  align-items:start;
  padding:14px 12px;
  background:#fff;
  border-top:1px solid #e8eef0;
}
.quote-line:first-child{border-top:0}
.quote-line.is-unavailable{background:#f8fafb}
.quote-line.is-unavailable .quote-medicine{opacity:.68}

.quote-medicine{
  display:flex;
  gap:10px;
  min-width:0;
}
.quote-line-number{
  display:grid;
  place-items:center;
  width:28px;height:28px;
  flex:0 0 28px;
  border-radius:8px;
  background:#e7f2f5;
  color:#28657a;
  font-size:11px;
  font-weight:800;
}
.quote-medicine>div{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.quote-medicine strong{
  color:var(--ms-text);
  font-size:13.5px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.quote-medicine small{
  margin-top:2px;
  color:var(--ms-secondary);
  font-size:11.5px!important;
  line-height:1.4;
}
.quote-medicine>div>span{
  margin-top:5px;
  color:#496978;
  font-size:11.5px;
  font-weight:700;
}

.quote-control{
  display:grid;
  gap:5px;
  min-width:0;
}
.quote-control>span,
.quote-line-note>span,
.quote-footer-field>span,
.quote-subtotal>span{
  color:#58717e;
  font-size:11.5px;
  font-weight:750;
}
.quote-control .control,
.quote-line-note .control,
.quote-footer-field .control{
  min-height:44px;
  font-size:14px;
}
.quote-subtotal{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:44px;
  padding:0 4px;
}
.quote-subtotal strong{
  margin-top:4px;
  color:#133e52;
  font-size:14px;
  font-variant-numeric:tabular-nums;
}
.quote-line-note{
  grid-column:2/-1;
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  align-items:center;
  gap:9px;
  margin-top:2px;
}
.quote-line-note .control{min-height:40px}

.external-quote-context{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
  padding:15px 16px;
  border:1px solid #d8e5e8;
  border-radius:11px;
  background:#f7fafb;
}
.external-quote-context>div{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.external-quote-context strong{
  margin:3px 0 2px;
  color:var(--ms-text);
  font-size:13.5px;
}
.external-quote-context p{
  margin:0;
  max-width:66ch;
  color:var(--ms-secondary);
  font-size:12.5px;
  line-height:1.5;
}
.external-quote-context .secondary{flex:0 0 auto}

.quote-footer-fields{
  display:grid;
  grid-template-columns:minmax(150px,190px) minmax(0,1fr) minmax(230px,300px);
  gap:12px;
  align-items:end;
  margin-top:16px;
}
.quote-footer-fields.manual-total{
  grid-template-columns:minmax(200px,1fr) minmax(120px,160px);
}
.quote-footer-field{
  display:grid;
  gap:6px;
  min-width:0;
}
.quote-footer-field.field-notes{
  grid-column:auto;
}
.quote-footer-fields.manual-total .field-notes{
  grid-column:1/-1;
}
.quote-total-card{
  min-height:82px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:12px 14px;
  border:1px solid #cfe2dc;
  border-radius:11px;
  background:#f4faf7;
}
.quote-total-card>span{
  color:#58766c;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.quote-total-card strong{
  margin:3px 0 1px;
  color:#126150;
  font-size:22px;
  line-height:1.15;
  font-variant-numeric:tabular-nums;
}
.quote-total-card strong b{
  font-size:12px;
  font-weight:800;
}
.quote-total-card small{
  color:#668177;
  font-size:10.5px!important;
}

.quote-workspace-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid #e4ecef;
}
.quote-workspace-actions>span{
  color:var(--ms-secondary);
  font-size:12px;
}
.quote-workspace-actions .primary{
  min-width:230px;
  min-height:46px;
}

.order-quote-summary dl{
  font-variant-numeric:tabular-nums;
}
.quote-rail-card{
  border-left:3px solid #3d8298;
}
.quote-rail-card .secondary{
  margin-top:5px;
}

.collapsible-danger{
  padding:0!important;
  overflow:hidden;
}
.collapsible-danger summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:58px;
  padding:12px 15px;
  cursor:pointer;
  color:#7a4954;
}
.collapsible-danger summary::-webkit-details-marker{display:none}
.collapsible-danger summary>span{
  display:flex;
  flex-direction:column;
}
.collapsible-danger summary strong{
  font-size:13px;
}
.collapsible-danger summary small{
  color:#8a747a;
  font-size:11px!important;
}
.collapsible-danger summary>b{
  font-size:16px;
  transition:transform .15s ease;
}
.collapsible-danger[open] summary>b{transform:rotate(180deg)}
.danger-zone-body{
  padding:0 15px 15px;
  border-top:1px solid #f0e1e4;
}
.danger-zone-body p{
  margin:12px 0;
  color:#78676c;
  font-size:12px;
}
.danger-zone-body form{
  display:grid;
  gap:10px;
}
.danger-zone-body label{
  display:grid;
  gap:6px;
}
.danger-zone-body label>span{
  color:#6d565d;
  font-size:11.5px;
  font-weight:700;
}

/* Tablet */
@media(max-width:1100px){
  .pharmacy-order-grid{grid-template-columns:1fr}
  .order-action-stack{
    position:static;
    grid-row:auto;
  }
  .quote-line-head{display:none}
  .quote-lines{
    gap:10px;
    border:0;
    border-radius:0;
    overflow:visible;
  }
  .quote-line{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    border:1px solid #dce6e9!important;
    border-radius:11px;
    padding:14px;
  }
  .quote-medicine{grid-column:1/-1}
  .quote-subtotal{
    min-height:68px;
    padding:10px 12px;
    border:1px solid #e0e9ec;
    border-radius:9px;
    background:#f8fafb;
  }
  .quote-line-note{
    grid-column:1/-1;
    grid-template-columns:1fr;
  }
  .quote-footer-fields{
    grid-template-columns:150px minmax(0,1fr);
  }
  .quote-total-card{grid-column:1/-1}
}

/* Portrait tablet / phone */
@media(max-width:820px){
  .order-patient-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .workflow-strip.card{
    overflow-x:auto;
    justify-content:flex-start;
    scrollbar-width:thin;
  }
  .workflow-strip>div{min-width:92px}
  .external-quote-context{
    align-items:flex-start;
    flex-direction:column;
  }
  .external-quote-context .secondary{width:100%}
  .quote-footer-fields,
  .quote-footer-fields.manual-total{
    grid-template-columns:1fr;
  }
  .quote-footer-fields.manual-total .field-notes,
  .quote-footer-field.field-notes{
    grid-column:auto;
  }
}

/* Phone */
@media(max-width:600px){
  .order-workflow-hero{
    padding:16px;
    align-items:flex-start;
    flex-direction:column;
  }
  .order-patient-grid{grid-template-columns:1fr}
  .quote-workspace-head{padding:16px}
  .quote-workspace-form{padding:0 16px 16px}
  .quote-line{grid-template-columns:1fr}
  .quote-medicine,
  .quote-line-note{grid-column:auto}
  .quote-subtotal{min-height:58px}
  .quote-workspace-actions{
    align-items:stretch;
    flex-direction:column;
  }
  .quote-workspace-actions .primary{width:100%;min-width:0}
}


/* ==========================================================
   Patient dashboard density & ergonomics — September 2026
   ========================================================== */

/* Correct legacy grid stretching in sparse patient navigation. */
.sidebar nav{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  align-content:flex-start;
}
.sidebar nav .nav-section,
.sidebar nav a{
  flex:0 0 auto;
}

.patient-dashboard-hero{
  grid-template-columns:minmax(0,1.55fr) minmax(280px,.55fr);
  gap:20px;
  padding:19px 21px;
  margin-bottom:12px;
}
.patient-dashboard-hero-copy h2{
  margin:4px 0 6px;
  font-size:22px;
}
.patient-dashboard-hero-copy p{
  max-width:78ch;
  color:#617985;
  font-size:12.5px;
  line-height:1.55;
}
.patient-dashboard-hero-actions{gap:8px}
.patient-dashboard-hero-actions>a{
  min-height:48px;
  padding:0 13px;
}
.patient-dashboard-hero-actions>a>span{
  width:32px;
  height:32px;
}
.patient-dashboard-hero-actions b{font-size:12.5px}

.patient-summary-grid{
  gap:10px;
  margin-bottom:12px;
}
.patient-summary-card{
  min-height:84px;
  padding:12px 15px;
  grid-template-columns:38px minmax(0,1fr);
  gap:11px;
}
.patient-summary-icon{
  width:38px;
  height:38px;
  border-radius:10px;
}
.patient-summary-card>div>span{
  color:#607884;
  font-size:11.5px;
}
.patient-summary-card strong{
  margin-top:3px;
  font-size:23px;
}
.patient-summary-card small{
  color:#6d818b;
  font-size:11.5px!important;
}

/* Action-first patient hierarchy */
.patient-priority-section{
  margin-bottom:12px;
  padding:14px 15px 15px;
  border:1px solid #d9e7e5;
  border-radius:14px;
  background:linear-gradient(180deg,#fbfefd,#f7fbfa);
  box-shadow:var(--ms-shadow);
}
.patient-priority-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.patient-priority-heading h2{
  margin:3px 0 0;
  color:#153f4b;
  font-size:16px;
  line-height:1.25;
}
.patient-priority-heading>span{
  display:grid;
  place-items:center;
  min-width:30px;
  height:30px;
  padding:0 8px;
  border-radius:999px;
  background:#dff2ec;
  color:#176b58;
  font-size:12px;
  font-weight:800;
}
.patient-priority-actions{
  margin:0;
  gap:9px;
}
.patient-priority-card{
  min-height:72px;
  padding:11px 13px;
}
.patient-priority-card small{
  color:#5f7681;
  font-size:11.5px!important;
}

/* Uploaded prescriptions are surfaced before empty historical panels. */
.patient-upload-panel{
  margin-bottom:12px;
}
.patient-upload-panel .patient-panel-head{
  min-height:62px;
  padding:12px 15px;
}
.patient-upload-panel .patient-dashboard-list>a,
.patient-upload-panel .patient-upload-row{
  min-height:60px;
  padding:9px 14px;
}

/* Historical panels should not dominate when empty. */
.patient-dashboard-grid{
  gap:12px;
  margin-bottom:12px;
}
.patient-panel-head{
  min-height:62px;
  padding:12px 15px;
}
.patient-panel-head h2{font-size:15.5px}
.patient-panel-count{
  min-width:28px;
  height:28px;
  font-size:11px;
}

.patient-empty-state{
  min-height:108px;
  padding:16px 16px;
  gap:11px;
  justify-content:flex-start;
}
.patient-empty-icon{
  width:40px;
  height:40px;
  border-radius:11px;
}
.patient-empty-state>div{
  max-width:500px;
}
.patient-empty-state strong{
  color:#294f63;
  font-size:12.5px;
}
.patient-empty-state p{
  margin-top:3px;
  color:#647b86;
  font-size:11.5px;
  line-height:1.45;
}
.patient-empty-state .secondary{
  margin-top:7px;
  min-height:40px;
}
.patient-empty-state.horizontal{
  min-height:82px;
  padding:13px 15px;
}

/* Stronger helper/meta contrast across the patient dashboard. */
.patient-list-copy span,
.patient-dashboard-hero-copy p,
.patient-summary-card small,
.patient-empty-state p,
.patient-get-started-steps small{
  color:#657b86;
}

/* Tablet */
@media(max-width:1050px){
  .patient-dashboard-hero{
    gap:13px;
    padding:17px 18px;
  }
  .patient-dashboard-hero-actions{
    grid-template-columns:1fr 1fr;
  }
}

/* Portrait tablet */
@media(max-width:820px){
  .patient-summary-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .patient-summary-card{
    min-height:80px;
    padding:11px 12px;
  }
  .patient-summary-card small{
    display:block;
    margin:3px 0 0;
  }
  .patient-priority-actions{grid-template-columns:1fr}
  .patient-dashboard-grid{grid-template-columns:1fr}
}

/* Phone */
@media(max-width:680px){
  .patient-dashboard-hero{
    padding:15px;
    gap:12px;
  }
  .patient-dashboard-hero-copy h2{
    font-size:20px;
  }
  .patient-dashboard-hero-copy p{
    font-size:12.5px;
  }
  .patient-dashboard-hero-actions{
    grid-template-columns:1fr;
  }
  .patient-dashboard-hero-actions>a{
    min-height:48px;
    width:100%;
  }

  .patient-summary-grid{
    grid-template-columns:1fr;
    gap:7px;
  }
  .patient-summary-card{
    min-height:70px;
    padding:10px 12px;
  }
  .patient-summary-card small{
    display:inline-block;
    margin-left:6px;
  }

  .patient-priority-section{
    padding:12px;
  }
  .patient-priority-heading{
    align-items:flex-start;
  }

  .patient-panel-head,
  .patient-upload-panel .patient-panel-head{
    min-height:58px;
    padding:11px 13px;
  }
  .patient-empty-state{
    min-height:0;
    padding:14px 13px;
  }
  .patient-empty-state.horizontal{
    min-height:0;
  }
}

@media(max-width:440px){
  .patient-priority-heading h2{font-size:15px}
  .patient-empty-state{
    gap:9px;
  }
}


/* Patient-facing pharmacy quote / order detail */
.patient-order-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:19px 21px;
  margin-bottom:14px;
}
.patient-order-hero>div{min-width:0}
.patient-order-hero h2{
  margin:4px 0 3px;
  font-size:22px;
  color:var(--ms-text);
}
.patient-order-hero p{
  margin:0;
  color:var(--ms-secondary);
  font-size:12.5px;
}
.patient-order-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,330px);
  gap:16px;
  align-items:start;
}
.patient-order-main{
  display:grid;
  gap:14px;
  min-width:0;
}
.patient-order-side{
  display:grid;
  gap:12px;
  position:sticky;
  top:94px;
}
.patient-order-side>.card{
  padding:17px;
}
.patient-order-side dl{
  display:grid;
  gap:0;
  margin:10px 0 0;
}
.patient-order-side dl>div{
  display:grid;
  gap:3px;
  padding:10px 0;
  border-top:1px solid #e8eef0;
}
.patient-order-side dt{
  color:#718691;
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.patient-order-side dd{
  margin:0;
  color:var(--ms-text);
  font-size:12.5px;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.patient-quote-card{
  overflow:hidden;
}
.patient-quote-card>header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:20px;
  background:linear-gradient(180deg,#fbfefd,#f6fbf9);
  border-bottom:1px solid #dce9e5;
}
.patient-quote-card h2{
  margin:4px 0 5px;
  color:#126150;
  font-size:28px;
  font-variant-numeric:tabular-nums;
}
.patient-quote-card header p{
  margin:0;
  max-width:68ch;
  color:#617b72;
  font-size:12.5px;
  line-height:1.5;
}
.patient-quote-badge{
  flex:0 0 auto;
  padding:7px 10px;
  border-radius:999px;
  background:#fff0d7;
  color:#8a5a0d;
  font-size:11px;
  font-weight:800;
}
.patient-quote-note{
  margin:16px 20px 0;
  padding:13px 14px;
  border:1px solid #e0e8eb;
  border-radius:10px;
  background:#f8fafb;
}
.patient-quote-note>span{
  color:#657b86;
  font-size:10.5px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.patient-quote-note p{
  margin:5px 0 0;
  color:#365565;
  font-size:12.5px;
  line-height:1.5;
}
.patient-payment-form{
  padding:18px 20px 20px;
}
.patient-payment-form fieldset{
  margin:0;
  padding:0;
  border:0;
}
.patient-payment-form legend{
  margin-bottom:10px;
  color:#315161;
  font-size:13px;
  font-weight:800;
}
.patient-payment-form .payment-options ul{
  list-style:none;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:0;
  padding:0;
}
.patient-payment-form .payment-options label{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:52px;
  padding:10px 12px;
  border:1px solid #d8e4e8;
  border-radius:10px;
  background:#fff;
  color:#365565;
  font-size:12.5px;
  font-weight:700;
}
.patient-payment-form .payment-options input{
  width:17px;
  height:17px;
  margin:0;
}
.patient-quote-actions{
  display:flex;
  justify-content:flex-end;
  gap:9px;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid #e8eef0;
}
.patient-order-state-card{
  padding:20px;
}
.patient-order-state-card h2{
  margin:5px 0 6px;
  font-size:21px;
}
.patient-order-state-card p{
  margin:0;
  color:var(--ms-secondary);
  font-size:12.5px;
  line-height:1.55;
}
.patient-order-state-card.success{
  border-left:4px solid var(--ms-success);
}
.patient-order-state-card.danger{
  border-left:4px solid var(--ms-danger);
}
.patient-order-document{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:17px 18px;
}
.patient-order-document>div{min-width:0}
.patient-order-document h3{
  margin:4px 0 3px;
  font-size:15px;
}
.patient-order-document p{
  margin:0;
  color:var(--ms-secondary);
  font-size:12px;
}

@media(max-width:900px){
  .patient-order-layout{grid-template-columns:1fr}
  .patient-order-side{position:static}
}
@media(max-width:620px){
  .patient-order-hero{
    align-items:flex-start;
    flex-direction:column;
    padding:16px;
  }
  .patient-quote-card>header{
    flex-direction:column;
    padding:16px;
  }
  .patient-quote-note{margin:14px 16px 0}
  .patient-payment-form{padding:16px}
  .patient-payment-form .payment-options ul{grid-template-columns:1fr}
  .patient-quote-actions{
    flex-direction:column-reverse;
  }
  .patient-quote-actions .primary,
  .patient-quote-actions .secondary{
    width:100%;
  }
  .patient-order-document{
    align-items:flex-start;
    flex-direction:column;
  }
  .patient-order-document .secondary{width:100%}
}


/* ==========================================================
   Pharmacy directory ergonomics — September 2026
   ========================================================== */
.pharmacy-directory-hero{
  padding:20px 22px;
  margin-bottom:12px;
}
.pharmacy-directory-hero>div{
  max-width:820px;
}
.pharmacy-directory-hero h2{
  margin:5px 0 7px;
  font-size:22px;
  line-height:1.22;
  letter-spacing:-.02em;
}
.pharmacy-directory-hero p{
  max-width:72ch;
  margin:0;
  color:#5f7783;
  font-size:13px;
  line-height:1.6;
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
}

.pharmacy-directory-search{
  padding:12px 13px;
  margin-bottom:12px;
}
.directory-search-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 1px 9px;
}
.directory-search-meta>div{
  display:flex;
  align-items:baseline;
  gap:9px;
  min-width:0;
}
.directory-search-meta .eyebrow{
  margin:0;
}
.directory-search-meta strong{
  color:#4f6875;
  font-size:12px;
  font-weight:700;
}
.directory-clear{
  flex:0 0 auto;
  color:#2b7089;
  font-size:12px;
  font-weight:700;
}
.pharmacy-searchbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
}
.pharmacy-searchbar input{
  min-height:46px;
  padding-left:13px;
  background:#fff;
}
.pharmacy-searchbar button{
  min-width:104px;
  min-height:46px;
}

.pharmacy-directory-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:0;
}
.pharmacy-directory-card{
  min-width:0;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:13px;
  border-color:#dbe6e9;
  box-shadow:0 4px 14px rgba(8,40,57,.045);
}
.pharmacy-directory-card:hover{
  border-color:#c9dce1;
  box-shadow:0 8px 22px rgba(8,40,57,.07);
}

.pharmacy-card-head{
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  gap:10px;
  align-items:start;
}
.pharmacy-card-head .account-icon{
  width:42px;
  height:42px;
  border-radius:11px;
  font-size:11px;
}
.pharmacy-card-title{
  min-width:0;
}
.pharmacy-card-head h3{
  margin:0 0 5px;
  color:#173f53;
  font-size:17px;
  line-height:1.25;
  letter-spacing:-.015em;
  overflow-wrap:anywhere;
}
.affiliation-badge{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  min-height:24px;
  padding:4px 8px;
  border-radius:999px;
  background:#e7f3f7;
  color:#286b84;
  font-size:11px;
  font-weight:750;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.affiliation-badge.independent{
  background:#eef2f3;
  color:#5f737e;
}
.directory-verified-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:5px 8px;
  border-radius:999px;
  background:#e8f6ef;
  color:#176b58;
  font-size:10.5px;
  font-weight:800;
  white-space:nowrap;
}

.pharmacy-directory-card dl{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  margin:0;
  border-top:1px solid #e7eef0;
  border-bottom:1px solid #e7eef0;
}
.pharmacy-directory-card dl>div{
  min-width:0;
  padding:10px 0;
  border:0;
  border-bottom:1px solid #edf2f3;
  border-radius:0;
  background:transparent;
}
.pharmacy-directory-card dl>div:nth-child(odd){
  padding-right:11px;
}
.pharmacy-directory-card dl>div:nth-child(even){
  padding-left:11px;
  border-left:1px solid #edf2f3;
}
.pharmacy-directory-card .directory-address,
.pharmacy-directory-card .directory-phone{
  grid-column:1/-1;
  padding-left:0!important;
  padding-right:0!important;
  border-left:0!important;
}
.pharmacy-directory-card .directory-phone{
  border-bottom:0;
}
.pharmacy-directory-card dt{
  margin:0;
  color:#70848e;
  font-size:11px;
  line-height:1.3;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.pharmacy-directory-card dd{
  margin:4px 0 0;
  color:#31596c;
  font-size:12.5px;
  line-height:1.48;
  overflow-wrap:anywhere;
}
.pharmacy-directory-card dd a{
  color:#1f6e87;
  font-weight:700;
}
.verified-note{
  margin-top:auto;
  color:#657d78;
  font-size:11px!important;
  font-weight:650;
}

@media(max-width:1180px){
  .pharmacy-directory-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:820px){
  .pharmacy-directory-hero{
    padding:17px 18px;
  }
  .pharmacy-directory-hero h2{
    font-size:20px;
  }
  .pharmacy-directory-grid{
    grid-template-columns:1fr;
  }
  .pharmacy-directory-card{
    padding:15px;
  }
}

@media(max-width:600px){
  .pharmacy-directory-hero p{
    text-align:left;
    hyphens:none;
  }
  .directory-search-meta{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
  }
  .directory-search-meta>div{
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
  }
  .pharmacy-searchbar{
    grid-template-columns:1fr;
  }
  .pharmacy-searchbar button{
    width:100%;
  }
  .pharmacy-card-head{
    grid-template-columns:38px minmax(0,1fr);
  }
  .pharmacy-card-head .account-icon{
    width:38px;
    height:38px;
  }
  .directory-verified-badge{
    grid-column:2;
    justify-self:start;
  }
}

@media(max-width:420px){
  .pharmacy-directory-card dl{
    grid-template-columns:1fr;
  }
  .pharmacy-directory-card dl>div{
    grid-column:1!important;
    padding:9px 0!important;
    border-left:0!important;
  }
  .pharmacy-directory-card dl>div:last-child{
    border-bottom:0;
  }
}


/* ==========================================================
   Pharmacy network search & collaboration — September 2026
   ========================================================== */

.pharmacy-live-search{
  position:relative;
  min-width:0;
}
.pharmacy-live-search>input{width:100%}
.pharmacy-suggestions{
  position:absolute;
  z-index:40;
  top:calc(100% + 6px);
  left:0;
  right:0;
  max-height:360px;
  overflow-y:auto;
  padding:6px;
  border:1px solid #ccdfe4;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 46px rgba(8,40,57,.16);
}
.pharmacy-suggestion{
  width:100%;
  min-height:58px;
  display:grid;
  grid-template-columns:36px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--ms-text);
  text-align:left;
  cursor:pointer;
}
.pharmacy-suggestion:hover,
.pharmacy-suggestion:focus-visible{
  background:#f2f8f8;
  outline:none;
}
.pharmacy-suggestion-icon{
  display:grid;
  place-items:center;
  width:34px;height:34px;
  border-radius:9px;
  background:#e7f2f5;
  color:#28657a;
  font-size:10px;
  font-weight:800;
}
.pharmacy-suggestion>span:nth-child(2){
  display:flex;
  flex-direction:column;
  min-width:0;
}
.pharmacy-suggestion strong{
  font-size:13px;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.pharmacy-suggestion small{
  margin-top:2px;
  color:#687e89;
  font-size:11.5px!important;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.pharmacy-suggestion>b{
  color:#6b8490;
  font-size:15px;
}
.pharmacy-suggestion-empty{
  padding:13px;
  color:#70838d;
  font-size:12.5px;
}

.directory-search-empty,
.directory-no-results{
  min-height:150px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-top:0;
  padding:24px;
  text-align:left;
}
.directory-no-results{grid-column:1/-1}
.directory-empty-icon{
  display:grid;
  place-items:center;
  width:48px;height:48px;
  flex:0 0 48px;
  border-radius:13px;
  background:#e9f3f5;
  color:#317189;
  font-size:22px;
}
.directory-search-empty>div,
.directory-no-results>div{
  max-width:620px;
}
.directory-search-empty strong,
.directory-no-results strong{
  color:#234c60;
  font-size:14px;
}
.directory-search-empty p,
.directory-no-results p{
  margin:4px 0 0;
  color:#657b86;
  font-size:12.5px;
  line-height:1.55;
}

.pharmacy-network-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:auto;
  padding-top:2px;
}
.pharmacy-network-actions a{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 9px;
  font-size:11.5px;
  text-align:center;
}
.pharmacy-network-actions a span{
  font-size:14px;
  font-weight:800;
}
.pharmacy-network-actions .network-loan{
  border-color:#c8ddd8;
  color:#176b58;
  background:#f8fcfa;
}
.pharmacy-network-actions .network-referral{
  border-color:#cbdde4;
  color:#246c85;
  background:#f8fbfc;
}

/* Network request form */
.network-request-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:21px 22px;
  margin-bottom:12px;
}
.network-request-hero>div{max-width:760px}
.network-request-hero h2{
  margin:5px 0 7px;
  font-size:22px;
}
.network-request-hero p{
  margin:0;
  max-width:72ch;
  color:#617985;
  font-size:13px;
  line-height:1.6;
  text-align:justify;
  text-justify:inter-word;
}

.network-request-type-switch{
  display:inline-flex;
  gap:6px;
  margin:0 0 12px;
  padding:4px;
  border:1px solid #d7e4e7;
  border-radius:11px;
  background:#eef4f5;
}
.network-request-type-switch a{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0 13px;
  border-radius:8px;
  color:#58717d;
  font-size:12px;
  font-weight:700;
}
.network-request-type-switch a:hover{text-decoration:none;background:#fff}
.network-request-type-switch a.active{
  background:#fff;
  color:#0b776f;
  box-shadow:0 2px 7px rgba(8,40,57,.08);
}

.network-request-card{padding:20px}
.network-request-form{display:grid;gap:16px}
.network-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px 16px;
}
.network-form-grid label{
  display:grid;
  gap:6px;
  min-width:0;
}
.network-form-grid label>span:not(.consent-control){
  color:#496573;
  font-size:12.5px;
  font-weight:700;
}
.network-form-grid label small{
  color:#6a808b;
  font-size:11.5px!important;
  line-height:1.45;
}
.network-form-grid .span2{grid-column:1/-1}
.network-privacy-note{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 14px;
  border:1px solid #d5e6e4;
  border-radius:10px;
  background:#f4faf8;
}
.network-privacy-note strong{
  flex:0 0 auto;
  color:#176b58;
  font-size:12px;
}
.network-privacy-note span{
  color:#5f776f;
  font-size:12px;
  line-height:1.5;
}
.consent-field{
  padding:12px 13px;
  border:1px solid #dce6e9;
  border-radius:10px;
  background:#f8fafb;
}
.consent-control{
  display:flex;
  align-items:flex-start;
  gap:9px;
  color:#435f6d;
  font-size:12.5px;
  line-height:1.45;
}
.consent-control input{
  width:18px;height:18px;
  flex:0 0 18px;
  margin-top:1px;
}
.network-request-actions{
  display:flex;
  justify-content:flex-end;
  gap:9px;
  padding-top:14px;
  border-top:1px solid #e5edef;
}

/* Network inbox */
.network-inbox-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:20px 22px;
  margin-bottom:12px;
}
.network-inbox-hero h2{margin:5px 0 6px;font-size:21px}
.network-inbox-hero p{
  margin:0;
  color:#627985;
  font-size:13px;
}
.network-inbox-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}
.network-inbox-summary article{
  min-height:88px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:13px 15px;
}
.network-inbox-summary span{
  color:#607782;
  font-size:11.5px;
  font-weight:700;
}
.network-inbox-summary strong{
  margin:2px 0;
  color:#143f53;
  font-size:25px;
  font-variant-numeric:tabular-nums;
}
.network-inbox-summary small{
  color:#71858e;
  font-size:11px!important;
}
.network-list-panel{overflow:hidden;margin-bottom:12px}
.network-list-panel .section-head{margin:0}
.network-request-list{display:grid}
.network-request-row{
  display:grid;
  grid-template-columns:40px minmax(0,1fr) minmax(240px,320px);
  gap:12px;
  align-items:start;
  padding:14px 16px;
  border-top:1px solid #e7eef0;
}
.network-request-row:first-child{border-top:0}
.network-request-row.pending{background:#fffdf8}
.network-request-list.outgoing .network-request-row{
  grid-template-columns:40px minmax(0,1fr);
}
.network-request-kind{
  display:grid;
  place-items:center;
  width:38px;height:38px;
  border-radius:10px;
  background:#e9f5ef;
  color:#176b58;
  font-size:17px;
  font-weight:800;
}
.network-request-kind.referral{
  background:#e9f3f7;
  color:#276e88;
}
.network-request-copy{min-width:0}
.network-request-title{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.network-request-title>strong{
  color:#20495d;
  font-size:13.5px;
}
.network-request-copy>span{
  display:block;
  margin-top:3px;
  color:#6c818b;
  font-size:11.5px;
}
.network-request-copy p{
  margin:7px 0 0;
  color:#496573;
  font-size:12px;
  line-height:1.45;
}
.network-message{
  padding:8px 10px;
  border-left:3px solid #c5d9df;
  background:#f7fafb;
}
.network-response{
  color:#426d61!important;
}
.network-decision-form{
  display:grid;
  gap:8px;
}
.network-decision-form label{
  display:grid;
  gap:5px;
}
.network-decision-form label>span{
  color:#617782;
  font-size:11px;
  font-weight:700;
}
.network-decision-form .control{
  min-height:40px;
  font-size:12.5px;
}
.network-decision-form>div{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}
.network-decision-form button{
  min-height:40px;
  font-size:11.5px;
}
.network-complete-form button{min-height:40px}
.network-empty,
.network-dashboard-empty{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:18px;
  color:#637984;
}
.network-empty strong,
.network-dashboard-empty strong{
  color:#36586a;
  font-size:12.5px;
}
.network-empty span,
.network-dashboard-empty span{
  font-size:11.5px;
}

/* Pharmacy dashboard network */
.pharmacy-metrics{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
.pharmacy-network-dashboard{margin-top:12px}
.section-head-actions{
  display:flex;
  align-items:center;
  gap:12px;
}
.section-head-actions a{
  font-size:12px;
  font-weight:700;
}
.network-dashboard-list{display:grid}
.network-dashboard-row{
  min-height:58px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:9px 15px;
  border-top:1px solid #e7eef0;
}
.network-dashboard-row:hover{
  text-decoration:none;
  background:#f8fbfb;
}
.network-dashboard-icon{
  display:grid;
  place-items:center;
  width:32px;height:32px;
  border-radius:9px;
  background:#e8f5ef;
  color:#176b58;
  font-weight:800;
}
.network-dashboard-icon.referral{
  background:#e8f2f7;
  color:#276f89;
}
.network-dashboard-row>div{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.network-dashboard-row strong{
  color:#274f63;
  font-size:12.5px;
}
.network-dashboard-row small{
  margin-top:2px;
  color:#6b808a;
  font-size:11.5px!important;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.status.pending{background:#fff4dc;color:#946311}
.status.accepted{background:#e7f4ed;color:#176b58}
.status.declined{background:#fae9ed;color:#a33d4f}
.status.completed{background:#e7f4ed;color:#176b58}
.status.cancelled{background:#edf1f3;color:#61737d}

@media(max-width:1380px){
  .pharmacy-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1000px){
  .network-request-row{
    grid-template-columns:40px minmax(0,1fr);
  }
  .network-decision-form,
  .network-complete-form{
    grid-column:2;
  }
}
@media(max-width:820px){
  .network-request-hero,
  .network-inbox-hero{
    flex-direction:column;
    align-items:flex-start;
  }
  .network-request-hero p{
    text-align:left;
    hyphens:none;
  }
  .network-form-grid{grid-template-columns:1fr}
  .network-form-grid .span2{grid-column:auto}
  .network-inbox-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .pharmacy-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .pharmacy-network-actions{grid-template-columns:1fr}
  .network-request-type-switch{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }
  .network-request-type-switch a{
    justify-content:center;
    text-align:center;
  }
  .network-request-card{padding:15px}
  .network-request-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .network-request-actions a,
  .network-request-actions button{width:100%}
  .network-inbox-summary{grid-template-columns:1fr}
  .network-request-row,
  .network-request-list.outgoing .network-request-row{
    grid-template-columns:36px minmax(0,1fr);
    padding:12px;
  }
  .network-decision-form,
  .network-complete-form{
    grid-column:1/-1;
  }
  .network-decision-form>div{
    grid-template-columns:1fr 1fr;
  }
  .network-dashboard-row{
    grid-template-columns:32px minmax(0,1fr);
  }
  .network-dashboard-row>.status{
    grid-column:2;
    justify-self:start;
  }
}


/* ==========================================================
   Inter-pharmacy partner search refinement — September 2026
   Horizontal results, no redundant trust badges
   ========================================================== */
.partner-search-hero{
  min-height:0;
  padding:17px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.partner-search-hero>div{
  max-width:720px;
}
.partner-search-hero h2{
  margin:4px 0 6px;
  font-size:21px;
}
.partner-search-hero p{
  max-width:68ch;
  margin:0;
  color:#607782;
  font-size:12.5px;
  line-height:1.6;
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
}
.partner-network-cta{
  flex:0 0 auto;
  min-height:44px;
  padding:0 14px;
}

.partner-search-panel{
  padding:11px 13px 13px;
}
.partner-search-panel .directory-search-meta{
  margin-bottom:7px;
}
.partner-search-form{
  grid-template-columns:minmax(0,1fr) auto;
}
.partner-search-form button{
  min-width:108px;
}

.pharmacy-partner-results{
  display:grid;
  gap:10px;
  margin-top:0;
}

.pharmacy-partner-row{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(220px,.9fr) minmax(0,1.6fr) minmax(280px,.72fr);
  gap:18px;
  align-items:center;
  padding:15px 16px;
  border-color:#dbe6e9;
  box-shadow:0 3px 12px rgba(8,40,57,.04);
}
.pharmacy-partner-row:hover{
  border-color:#c9dce1;
  box-shadow:0 7px 20px rgba(8,40,57,.065);
}

.partner-pharmacy-identity{
  min-width:0;
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:10px;
  align-items:center;
}
.partner-pharmacy-identity .account-icon{
  width:42px;
  height:42px;
  border-radius:11px;
  font-size:11px;
}
.partner-pharmacy-identity>div{
  min-width:0;
}
.partner-pharmacy-identity h3{
  margin:0 0 5px;
  color:#173f53;
  font-size:17px;
  line-height:1.25;
  letter-spacing:-.015em;
  overflow-wrap:anywhere;
}
.partner-pharmacy-identity .affiliation-badge{
  min-height:22px;
  padding:3px 7px;
  font-size:10.5px;
}

.partner-pharmacy-contact{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(130px,.7fr) minmax(200px,1.4fr) minmax(145px,.75fr);
  gap:0;
  border-left:1px solid #e5edef;
}
.partner-pharmacy-contact>div{
  min-width:0;
  padding:2px 13px;
  border-right:1px solid #e5edef;
}
.partner-pharmacy-contact>div:last-child{
  border-right:0;
}
.partner-pharmacy-contact span{
  display:block;
  margin-bottom:4px;
  color:#71858f;
  font-size:10.5px;
  line-height:1.25;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.partner-pharmacy-contact strong{
  display:block;
  color:#31596c;
  font-size:13px;
  line-height:1.45;
  font-weight:600;
  overflow-wrap:anywhere;
}
.partner-pharmacy-contact strong a{
  color:#1e718b;
  font-weight:750;
}

.partner-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin:0;
  padding:0;
}
.partner-actions a{
  min-height:44px;
  padding:0 9px;
  font-size:11.5px;
}
.partner-availability-note{
  justify-self:end;
  color:#647b86;
  font-size:11.5px!important;
}

.pharmacy-suggestion.active{
  background:#eef7f6;
  box-shadow:inset 0 0 0 1px #c9e1dc;
}
.pharmacy-suggestion.active strong{
  color:#0b6d66;
}

/* Remove legacy card-grid assumptions from this search experience. */
.pharmacy-partner-results .pharmacy-directory-card,
.pharmacy-partner-results .directory-verified-badge{
  display:none!important;
}

@media(max-width:1250px){
  .pharmacy-partner-row{
    grid-template-columns:minmax(220px,.85fr) minmax(0,1.45fr);
  }
  .partner-actions{
    grid-column:1/-1;
    grid-template-columns:repeat(2,minmax(180px,240px));
    justify-content:end;
    padding-top:10px;
    border-top:1px solid #e8eef0;
  }
  .partner-availability-note{
    grid-column:1/-1;
  }
}

@media(max-width:900px){
  .partner-search-hero{
    align-items:flex-start;
  }
  .pharmacy-partner-row{
    grid-template-columns:1fr;
    gap:12px;
  }
  .partner-pharmacy-contact{
    grid-template-columns:repeat(3,minmax(0,1fr));
    border-left:0;
    border-top:1px solid #e5edef;
    border-bottom:1px solid #e5edef;
    padding:10px 0;
  }
  .partner-pharmacy-contact>div{
    padding:0 12px;
  }
  .partner-actions{
    grid-column:auto;
    justify-content:stretch;
    grid-template-columns:1fr 1fr;
    border-top:0;
    padding-top:0;
  }
}

@media(max-width:680px){
  .partner-search-hero{
    flex-direction:column;
    padding:15px 16px;
  }
  .partner-search-hero p{
    text-align:left;
    hyphens:none;
  }
  .partner-network-cta{
    width:100%;
  }
  .partner-search-form{
    grid-template-columns:1fr;
  }
  .partner-search-form button{
    width:100%;
  }
  .pharmacy-partner-row{
    padding:14px;
  }
  .partner-pharmacy-contact{
    grid-template-columns:1fr;
    gap:0;
    padding:4px 0;
  }
  .partner-pharmacy-contact>div{
    padding:9px 0;
    border-right:0;
    border-bottom:1px solid #edf2f3;
  }
  .partner-pharmacy-contact>div:last-child{
    border-bottom:0;
  }
  .partner-actions{
    grid-template-columns:1fr;
  }
}


/* ==========================================================
   Network request page alignment & ergonomics — September 2026
   One visual grid across hero, mode switch, form and actions
   ========================================================== */
.network-request-page{
  display:grid;
  gap:12px;
}

.network-request-page .network-request-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:24px;
  margin:0;
  padding:18px 20px;
}
.network-request-hero-copy{
  min-width:0;
  max-width:760px;
}
.network-request-page .network-request-hero .eyebrow{
  display:block;
  margin-bottom:5px;
}
.network-request-page .network-request-hero h2{
  margin:0 0 7px;
  font-size:21px;
  line-height:1.25;
  letter-spacing:-.02em;
}
.network-request-page .network-request-hero p{
  max-width:68ch;
  margin:0;
  color:#617985;
  font-size:12.5px;
  line-height:1.6;
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
}
.network-back-link{
  min-height:44px;
  align-self:center;
  white-space:nowrap;
}

.network-request-page .network-request-card{
  padding:0;
  overflow:hidden;
}

/* The request type now belongs to the form card instead of floating between sections. */
.network-request-page .network-request-type-switch{
  width:100%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  margin:0;
  padding:0;
  border:0;
  border-bottom:1px solid #dce7ea;
  border-radius:0;
  background:#f5f8f9;
}
.network-request-page .network-request-type-switch a{
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 18px;
  border-radius:0;
  color:#607984;
  font-size:12.5px;
  font-weight:700;
  text-align:center;
}
.network-request-page .network-request-type-switch a+a{
  border-left:1px solid #dce7ea;
}
.network-request-page .network-request-type-switch a:hover{
  background:#fafdfe;
}
.network-request-page .network-request-type-switch a.active{
  position:relative;
  background:#fff;
  color:#0b776f;
  box-shadow:none;
}
.network-request-page .network-request-type-switch a.active:after{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  bottom:-1px;
  height:3px;
  border-radius:3px 3px 0 0;
  background:#1a8b81;
}

.network-request-page .network-request-form{
  display:grid;
  gap:18px;
  padding:20px;
}

.network-request-page .network-form-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:16px;
  align-items:start;
}

.network-request-page .network-field{
  min-width:0;
  display:grid;
  grid-template-rows:auto 46px minmax(20px,auto);
  gap:6px;
  align-content:start;
}
.network-request-page .network-field.span2{
  grid-column:1/-1;
}
.network-request-page .network-field-label{
  min-height:18px;
  display:flex;
  align-items:center;
  color:#496573;
  font-size:12.5px;
  font-weight:750;
  line-height:1.35;
}
.network-request-page .network-field>.control,
.network-request-page .network-field>input,
.network-request-page .network-field>select{
  width:100%;
  min-height:46px;
  height:46px;
}
.network-request-page .network-field>textarea{
  width:100%;
  min-height:116px;
  height:116px;
  resize:vertical;
}
.network-request-page .network-field-meta{
  min-height:20px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}
.network-request-page .network-field-meta small{
  color:#6c818b;
  font-size:11.5px!important;
  line-height:1.4;
}

/* Full-width rows do not need the fixed single-line field height. */
.network-request-page .field-message{
  grid-template-rows:auto auto minmax(0,auto);
}
.network-request-page .field-patient_consent_confirmed{
  grid-template-rows:auto;
}

.network-request-page .network-privacy-note{
  margin:0;
  padding:12px 14px;
}

.network-request-page .consent-field{
  padding:12px 13px;
}

.network-request-page .network-request-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  margin:0 -20px -20px;
  padding:13px 20px;
  border-top:1px solid #e4ecef;
  background:#fafcfc;
}
.network-request-page .network-request-actions a,
.network-request-page .network-request-actions button{
  min-height:44px;
}
.network-request-page .network-request-actions button{
  min-width:220px;
}

/* Desktop: keep content visually anchored to the same left/right gutters. */
@media(min-width:1101px){
  .network-request-page{
    width:100%;
  }
}

/* Tablet */
@media(max-width:900px){
  .network-request-page .network-request-hero{
    grid-template-columns:1fr;
    gap:14px;
    align-items:start;
  }
  .network-back-link{
    justify-self:start;
  }
  .network-request-page .network-form-grid{
    grid-template-columns:1fr;
  }
  .network-request-page .network-field.span2{
    grid-column:auto;
  }
}

/* Phone */
@media(max-width:600px){
  .network-request-page{
    gap:10px;
  }
  .network-request-page .network-request-hero{
    padding:15px 16px;
  }
  .network-request-page .network-request-hero h2{
    font-size:19px;
  }
  .network-request-page .network-request-hero p{
    text-align:left;
    hyphens:none;
  }
  .network-back-link{
    width:100%;
    justify-content:center;
  }

  .network-request-page .network-request-type-switch{
    grid-template-columns:1fr;
  }
  .network-request-page .network-request-type-switch a+a{
    border-left:0;
    border-top:1px solid #dce7ea;
  }
  .network-request-page .network-request-type-switch a.active:after{
    left:14px;
    right:14px;
  }

  .network-request-page .network-request-form{
    padding:16px;
  }
  .network-request-page .network-request-actions{
    display:grid;
    grid-template-columns:1fr;
    margin:0 -16px -16px;
    padding:12px 16px max(12px,env(safe-area-inset-bottom));
  }
  .network-request-page .network-request-actions a,
  .network-request-page .network-request-actions button{
    width:100%;
    min-width:0;
  }
}


/* ==========================================================
   Inter-pharmacy network density polish — September 2026
   ========================================================== */
.partner-search-hero{
  padding:14px 18px;
  gap:16px;
  margin-bottom:10px;
}
.partner-search-hero>div{
  max-width:780px;
}
.partner-search-hero h2{
  margin:3px 0 5px;
  font-size:20px;
}
.partner-search-hero p{
  max-width:70ch;
  color:#5d7480;
  font-size:13px;
  line-height:1.55;
}
.partner-network-cta{
  min-height:42px;
  padding:0 12px;
  font-size:12px;
  font-weight:700;
}

.partner-search-panel{
  padding:10px 12px 12px;
  margin-bottom:10px;
}
.partner-search-heading{
  min-height:34px;
  margin:0 1px 7px;
}
.partner-search-heading>div{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.partner-search-heading strong{
  color:#274f62;
  font-size:13px;
  font-weight:800;
}
.partner-search-heading span{
  color:#667d88;
  font-size:12px;
  line-height:1.4;
}
.partner-search-heading .directory-clear{
  align-self:center;
  font-size:11.5px;
}

.partner-search-form{
  grid-template-columns:minmax(0,1fr) auto;
  gap:6px;
}
.partner-search-form .pharmacy-live-search,
.partner-search-form input,
.partner-search-form button{
  min-height:46px;
}
.partner-search-form input{
  border-radius:10px 8px 8px 10px;
}
.partner-search-form button{
  min-width:106px;
  padding:0 14px;
  border-radius:8px 10px 10px 8px;
  font-size:12px;
}

.directory-search-empty{
  min-height:96px;
  justify-content:flex-start;
  gap:12px;
  margin-top:0;
  padding:16px 20px;
}
.directory-search-empty .directory-empty-icon{
  width:42px;
  height:42px;
  flex-basis:42px;
  border-radius:11px;
  font-size:18px;
}
.directory-search-empty>div{
  max-width:680px;
}
.directory-search-empty strong{
  color:#2b5366;
  font-size:13.5px;
}
.directory-search-empty p{
  margin-top:3px;
  color:#5f7682;
  font-size:12px;
  line-height:1.5;
}

@media(max-width:820px){
  .partner-search-hero{
    padding:14px 16px;
  }
  .partner-search-hero p{
    font-size:12.5px;
  }
  .partner-search-heading{
    align-items:flex-start;
  }
}

@media(max-width:600px){
  .partner-search-panel{
    padding:10px;
  }
  .partner-search-heading{
    align-items:flex-start;
    gap:5px;
  }
  .partner-search-heading .directory-clear{
    align-self:flex-start;
  }
  .partner-search-form{
    grid-template-columns:1fr;
    gap:7px;
  }
  .partner-search-form input,
  .partner-search-form button{
    width:100%;
    border-radius:10px;
  }
  .directory-search-empty{
    min-height:0;
    padding:14px;
  }
}


/* ==========================================================
   Courier role & pharmacy delivery workflow — September 2026
   ========================================================== */

/* Quote fulfillment selector */
.quote-footer-field.field-fulfillment_method{
  min-width:170px;
}
.quote-footer-field.field-delivery_address{
  grid-column:1/-1;
}
.quote-footer-field.field-delivery_address textarea{
  min-height:76px;
  resize:vertical;
}
.quote-footer-field.field-delivery_address[hidden]{
  display:none!important;
}
.patient-fulfillment-summary{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:7px;
  margin-top:10px;
  padding:9px 11px;
  border:1px solid #dce7ea;
  border-radius:9px;
  background:#f8fafb;
}
.patient-fulfillment-summary span{
  color:#687f8a;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.patient-fulfillment-summary strong{
  color:#214d60;
  font-size:12.5px;
}
.patient-fulfillment-summary small{
  flex-basis:100%;
  color:#657b86;
  font-size:11.5px!important;
}

/* Courier dashboard */
.courier-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:20px 22px;
  margin-bottom:12px;
}
.courier-hero>div:first-child{
  max-width:760px;
}
.courier-hero h2{
  margin:5px 0 7px;
  font-size:22px;
}
.courier-hero p{
  margin:0;
  max-width:70ch;
  color:#607782;
  font-size:13px;
  line-height:1.58;
}
.courier-license-chip{
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:11px 13px;
  border:1px solid #cfe2dc;
  border-radius:11px;
  background:#f4faf7;
}
.courier-license-chip span{
  color:#698078;
  font-size:10.5px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.courier-license-chip strong{
  color:#176b58;
  font-size:12.5px;
}
.courier-metrics{
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-bottom:12px;
}
.courier-panel{
  overflow:hidden;
  margin-bottom:12px;
}
.courier-job-list{
  display:grid;
}
.courier-job{
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  min-width:0;
  padding:14px 16px;
  border-top:1px solid #e6edef;
}
.courier-job:first-child{border-top:0}
.courier-job.available:hover{background:#f9fcfc}
.courier-job-icon{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border-radius:11px;
  background:#e8f3f6;
  color:#2a6f87;
  font-size:18px;
  font-weight:800;
}
.courier-job-copy{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.courier-job-copy strong{
  color:#244d61;
  font-size:13.5px;
}
.courier-job-copy span{
  margin-top:3px;
  color:#5e7682;
  font-size:12px;
}
.courier-job-copy small{
  margin-top:3px;
  color:#7a8d96;
  font-size:11px!important;
}
.courier-job form button{
  min-height:42px;
}
.courier-job.active{
  grid-template-columns:130px minmax(0,1fr) minmax(240px,300px);
  align-items:start;
  background:#fff;
}
.courier-job-status{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.courier-job-status small{
  color:#71858e;
  font-size:11px!important;
}
.courier-delivery-details{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px 16px;
  min-width:0;
}
.courier-delivery-details>div{
  min-width:0;
  display:flex;
  flex-direction:column;
}
.courier-delivery-details .span2{grid-column:1/-1}
.courier-delivery-details span{
  color:#72858f;
  font-size:10.5px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.courier-delivery-details strong{
  margin-top:3px;
  color:#2d5669;
  font-size:12.5px;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.courier-delivery-details small{
  margin-top:2px;
  color:#687f8a;
  font-size:11.5px!important;
  line-height:1.4;
}
.courier-delivery-details a{
  color:#1e718b;
  font-weight:700;
}
.courier-job-actions{
  display:grid;
  gap:8px;
}
.courier-job-actions form{
  display:grid;
  gap:8px;
}
.courier-delivered-form .confirm-line{
  font-size:11.5px;
}
.courier-release{
  border-top:1px solid #e6edef;
  padding-top:7px;
}
.courier-release summary{
  cursor:pointer;
  color:#6b7f88;
  font-size:11.5px;
  font-weight:700;
}
.courier-release form{
  margin-top:8px;
}
.courier-release .control{
  min-height:40px;
  font-size:12px;
}
.courier-empty{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:18px 16px;
}
.courier-empty strong{
  color:#365b6d;
  font-size:12.5px;
}
.courier-empty span{
  color:#71848d;
  font-size:11.5px;
}
.courier-completed-list{
  display:grid;
}
.courier-completed-list>div{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:12px;
  min-height:54px;
  padding:10px 15px;
  border-top:1px solid #e7eef0;
}
.courier-completed-list>div:first-child{border-top:0}
.courier-completed-list strong{font-size:12.5px;color:#31596c}
.courier-completed-list>div>span:not(.status){font-size:11.5px;color:#71858e}

.status.assigned{background:#e8f2f7;color:#276f89}
.status.out_for_delivery{background:#e8f2f7;color:#276f89}
.status.delivered{background:#e7f4ed;color:#176b58}
.status.failed{background:#fae9ed;color:#a33d4f}

@media(max-width:1050px){
  .courier-job.active{
    grid-template-columns:110px minmax(0,1fr);
  }
  .courier-job-actions{
    grid-column:1/-1;
    grid-template-columns:1fr 1fr;
    padding-top:10px;
    border-top:1px solid #e8eef0;
  }
}
@media(max-width:820px){
  .courier-hero{
    align-items:flex-start;
    flex-direction:column;
  }
  .courier-license-chip{
    width:100%;
  }
  .courier-metrics{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .courier-job.available{
    grid-template-columns:38px minmax(0,1fr);
  }
  .courier-job.available form{
    grid-column:2;
  }
}
@media(max-width:600px){
  .courier-hero{padding:16px}
  .courier-metrics{grid-template-columns:1fr}
  .courier-job,
  .courier-job.active{
    grid-template-columns:1fr;
    padding:13px;
  }
  .courier-job-icon{display:none}
  .courier-job.available form{grid-column:auto}
  .courier-job.available button{width:100%}
  .courier-delivery-details{grid-template-columns:1fr}
  .courier-delivery-details .span2{grid-column:auto}
  .courier-job-actions{
    grid-column:auto;
    grid-template-columns:1fr;
  }
  .courier-completed-list>div{
    grid-template-columns:1fr auto;
  }
  .courier-completed-list>div>span:nth-child(2){
    grid-column:1;
  }
}


/* ==========================================================
   Courier registration refinement — September 2026
   Dedicated public onboarding hierarchy and responsive form UX
   ========================================================== */
.courier-registration{
  background:
    radial-gradient(circle at 8% 10%,rgba(25,163,143,.065),transparent 28%),
    linear-gradient(180deg,#f8fbfc 0,#f2f6f7 100%);
}
.courier-registration .professional-onboarding-shell{
  max-width:1240px;
  grid-template-columns:minmax(0,.9fr) minmax(560px,1.1fr);
  gap:54px;
  padding-top:42px;
}
.courier-registration .professional-onboarding-copy{
  top:108px;
  padding-top:18px;
}
.courier-registration .professional-onboarding-copy>.eyebrow{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border:1px solid #cde4df;
  border-radius:999px;
  background:#f0f8f5;
  color:var(--ms-success);
  letter-spacing:.075em;
}
.courier-registration-kicker{
  display:flex;
  align-items:center;
  margin-top:18px;
}
.courier-registration-kicker span{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#53717d;
  font-size:12px;
  font-weight:800;
}
.courier-registration-kicker span:before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--ms-teal-bright);
  box-shadow:0 0 0 4px rgba(25,163,143,.12);
}
.courier-registration .professional-onboarding-copy h1{
  max-width:540px;
  margin:11px 0 14px;
  font-size:44px;
  line-height:1.04;
  letter-spacing:-.045em;
  color:var(--ms-navy-deep);
}
.courier-registration .professional-onboarding-copy>p{
  max-width:610px;
  margin:0;
  font-size:15px;
  line-height:1.72;
  color:#59717c;
}
.courier-registration-journey{
  display:grid;
  grid-template-columns:1fr 22px 1fr 22px 1fr;
  align-items:start;
  margin-top:26px;
  padding:17px 18px;
  border:1px solid #d9e7e9;
  border-radius:15px;
  background:rgba(255,255,255,.76);
  box-shadow:0 8px 24px rgba(8,40,57,.04);
  backdrop-filter:blur(6px);
}
.courier-registration-journey>div{
  display:flex;
  align-items:flex-start;
  gap:9px;
  min-width:0;
}
.courier-registration-journey b{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  flex:0 0 28px;
  border-radius:9px;
  background:#e8f4f2;
  color:var(--ms-teal);
  font-size:11px;
}
.courier-registration-journey div>span{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:2px;
}
.courier-registration-journey strong{
  color:#244d5f;
  font-size:11.5px;
  line-height:1.35;
}
.courier-registration-journey small{
  color:#71858e;
  font-size:10.5px!important;
  line-height:1.4;
}
.courier-registration-journey i{
  height:1px;
  margin-top:14px;
  background:#cddfe2;
}
.courier-registration-info-grid{
  display:grid;
  gap:9px;
  margin-top:14px;
}
.courier-registration-info{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  align-items:start;
  gap:11px;
  padding:13px 14px;
  border:1px solid #dde8ea;
  border-radius:12px;
  background:rgba(255,255,255,.7);
}
.courier-info-icon{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:10px;
  background:#edf6f7;
  color:#277188;
  font-size:11px;
  font-weight:850;
}
.courier-registration-info>div{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.courier-registration-info strong{
  color:#315a6d;
  font-size:12.5px;
}
.courier-registration-info small{
  color:#6e828c;
  font-size:11.5px!important;
  line-height:1.5;
}
.courier-registration .back-link{
  margin-top:18px;
  font-size:12px;
}

.courier-registration-form-card{
  overflow:hidden;
  padding:0;
  border:1px solid #d8e5e8;
  border-radius:18px;
  box-shadow:0 18px 54px rgba(8,40,57,.09);
}
.courier-registration-form-card .form-card-title{
  margin:0;
  padding:24px 25px 20px;
  border-bottom:1px solid #e7eef0;
  background:linear-gradient(180deg,#fff,#fbfdfd);
}
.courier-registration-form-card .form-card-title .eyebrow{
  color:var(--ms-teal);
}
.courier-registration-form-card .form-card-title h2{
  margin:5px 0 7px;
  color:var(--ms-navy-deep);
  font-size:25px;
  letter-spacing:-.025em;
}
.courier-registration-form-card .form-card-title p{
  max-width:66ch;
  color:#657b86;
  font-size:12.5px;
}
.courier-form-progress{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  padding:12px 25px;
  border-bottom:1px solid #e8eef0;
  background:#f8fbfb;
}
.courier-form-progress span{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  color:#617984;
  font-size:10.5px;
  font-weight:800;
  white-space:nowrap;
}
.courier-form-progress b{
  display:grid;
  place-items:center;
  width:21px;
  height:21px;
  flex:0 0 21px;
  border-radius:7px;
  background:#e7f2f1;
  color:var(--ms-teal);
  font-size:9.5px;
}
.courier-registration-form-card form{
  padding:0 25px 24px;
}
.courier-registration-form-card .onboarding-form-grid{
  gap:14px 16px;
}
.courier-registration-form-card .onboarding-section-title{
  margin:22px -3px 2px;
  padding:12px 13px;
  border-color:#dce8ea;
  background:#f7fafb;
}
.courier-registration-form-card .onboarding-section-title:first-child{
  margin-top:18px;
}
.courier-registration-form-card .courier-step-title>span{
  background:#e5f3f0;
  color:#0b776f;
}
.courier-registration-form-card .courier-step-title.optional>span{
  background:#eef2f4;
  color:#617783;
}
.courier-registration-form-card .onboarding-section-title strong{
  font-size:13.5px;
}
.courier-registration-form-card .onboarding-section-title small{
  margin-top:1px;
  color:#71838c;
  font-size:11.5px!important;
}
.courier-registration-form-card .onboarding-form-grid label{
  gap:7px;
  color:#3f5d6c;
  font-size:12.5px;
  font-weight:750;
}
.courier-registration-form-card .onboarding-form-grid label>span:first-child{
  display:block;
  line-height:1.35;
}
.courier-registration-form-card .control{
  min-height:48px;
  border:1px solid #cfdee2;
  border-radius:10px;
  background:#fff;
  color:#244957;
  font-size:14px;
  box-shadow:inset 0 1px 1px rgba(8,40,57,.015);
  transition:border-color .16s,box-shadow .16s,background .16s;
}
.courier-registration-form-card .control:hover{
  border-color:#b9ced4;
}
.courier-registration-form-card .control:focus{
  outline:0;
  border-color:#58a99f;
  box-shadow:0 0 0 3px rgba(11,119,111,.10);
}
.courier-registration-form-card textarea.control{
  min-height:88px;
  resize:vertical;
}
.courier-registration-form-card .onboarding-form-grid label>small{
  color:#7c8e97;
  font-size:11px!important;
  line-height:1.48;
}
.courier-registration-form-card .required-mark{
  color:#aa4153;
}
.courier-registration-form-card .courier-upload-field{
  padding:13px 14px 12px;
  border:1px solid #dbe7e9;
  border-radius:12px;
  background:#fbfdfd;
}
.courier-registration-form-card .courier-upload-field input[type=file].control{
  min-height:58px;
  padding:10px;
  border:1px dashed #bcd3d9;
  background:#fff;
}
.courier-registration-form-card .courier-upload-field input[type=file].control::file-selector-button{
  min-height:35px;
  margin-right:11px;
  padding:0 13px;
  border:1px solid #c9dcdf;
  border-radius:8px;
  background:#edf5f5;
  color:#2c6272;
  font-weight:750;
  cursor:pointer;
}
.courier-registration-form-card .consent-note{
  margin:20px 0 12px;
  padding:12px 13px;
  border:1px solid #e1e9eb;
  background:#f7f9fa;
  color:#657b86;
  font-size:11.5px;
}
.courier-submit-button{
  min-height:50px;
  border-radius:10px;
  font-size:13.5px;
  font-weight:800;
  box-shadow:0 8px 18px rgba(11,119,111,.15);
}
.courier-form-footnote{
  margin:9px 8px 0;
  text-align:center;
  color:#7b8c94;
  font-size:10.5px;
  line-height:1.45;
}

@media(max-width:1050px){
  .courier-registration .professional-onboarding-shell{
    max-width:840px;
    grid-template-columns:1fr;
    gap:22px;
    padding-top:30px;
  }
  .courier-registration .professional-onboarding-copy{
    position:static;
    padding-top:0;
  }
  .courier-registration .professional-onboarding-copy h1{
    max-width:none;
    font-size:39px;
  }
  .courier-registration .professional-onboarding-copy>p{
    max-width:760px;
  }
}
@media(max-width:720px){
  .courier-registration .onboarding-public-header{
    min-height:68px;
    height:auto;
    padding:10px 13px;
  }
  .courier-registration .professional-onboarding-shell{
    padding:24px 12px 40px;
  }
  .courier-registration .professional-onboarding-copy>.eyebrow{
    min-height:26px;
    font-size:9.5px;
  }
  .courier-registration-kicker{margin-top:14px}
  .courier-registration .professional-onboarding-copy h1{
    margin-top:9px;
    font-size:33px;
  }
  .courier-registration .professional-onboarding-copy>p{
    font-size:13.5px;
    line-height:1.65;
  }
  .courier-registration-journey{
    grid-template-columns:1fr;
    gap:8px;
    padding:13px;
  }
  .courier-registration-journey i{display:none}
  .courier-registration-journey>div{
    padding:2px 0;
  }
  .courier-registration-info{
    padding:12px;
  }
  .courier-registration-form-card{
    border-radius:15px;
  }
  .courier-registration-form-card .form-card-title{
    padding:20px 16px 17px;
  }
  .courier-registration-form-card .form-card-title h2{
    font-size:22px;
  }
  .courier-form-progress{
    grid-template-columns:1fr 1fr;
    padding:10px 16px;
  }
  .courier-registration-form-card form{
    padding:0 16px 18px;
  }
  .courier-registration-form-card .onboarding-form-grid{
    grid-template-columns:1fr;
    gap:13px;
  }
  .courier-registration-form-card .onboarding-form-grid label.span2,
  .courier-registration-form-card .onboarding-section-title{
    grid-column:auto;
  }
  .courier-registration-form-card .onboarding-section-title{
    margin:18px -1px 1px;
  }
  .courier-registration-form-card .control{
    min-height:48px;
    font-size:16px;
  }
  .courier-registration-form-card .courier-upload-field{
    padding:11px;
  }
}
@media(max-width:430px){
  .courier-registration .professional-onboarding-copy h1{font-size:30px}
  .courier-registration-info-grid{gap:7px}
  .courier-registration-info{
    grid-template-columns:34px minmax(0,1fr);
    gap:9px;
  }
  .courier-info-icon{width:34px;height:34px}
  .courier-form-progress{
    grid-template-columns:1fr;
    gap:5px;
  }
  .courier-registration-form-card .form-card-title,
  .courier-registration-form-card form{
    padding-left:13px;
    padding-right:13px;
  }
  .courier-registration-form-card .onboarding-section-title{
    align-items:flex-start;
    padding:11px;
  }
}


/* Courier registration validation feedback */
.courier-error-summary{
  margin:18px 0 2px;
  padding:15px;
  border:1px solid #efc6cd;
  border-radius:13px;
  background:#fff8f9;
  box-shadow:0 7px 20px rgba(168,62,80,.055);
  outline:none;
}
.courier-error-summary:focus{
  box-shadow:0 0 0 3px rgba(168,62,80,.10),0 7px 20px rgba(168,62,80,.055);
}
.courier-error-summary-head{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  align-items:start;
}
.courier-error-summary-head>span{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:9px;
  background:#f8e4e8;
  color:#a83e50;
  font-size:15px;
  font-weight:900;
}
.courier-error-summary-head>div{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.courier-error-summary-head strong{
  color:#853345;
  font-size:13.5px;
}
.courier-error-summary-head small{
  color:#776871;
  font-size:11.5px!important;
}
.courier-error-list{
  display:grid;
  gap:6px;
  margin-top:11px;
}
.courier-error-list>a,
.courier-error-list>div{
  display:grid;
  grid-template-columns:minmax(130px,.65fr) minmax(0,1.35fr);
  gap:9px;
  padding:8px 10px;
  border:1px solid #efd9dd;
  border-radius:9px;
  background:#fff;
  text-decoration:none;
}
.courier-error-list>a:hover{
  border-color:#dca9b2;
  background:#fffafa;
}
.courier-error-list strong{
  color:#743647;
  font-size:11.5px;
}
.courier-error-list span{
  color:#805b65;
  font-size:11.5px;
  line-height:1.45;
}
.courier-upload-retry-note{
  display:block;
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid #f0dde1;
  color:#806b72!important;
  font-size:10.5px!important;
}
.courier-registration-form-card .field-has-error{
  padding:10px;
  margin:-10px;
  border:1px solid #efc7ce;
  border-radius:11px;
  background:#fff9fa;
}
.courier-registration-form-card .field-has-error>.control{
  border-color:#cb697a;
  box-shadow:0 0 0 2px rgba(168,62,80,.07);
}
.courier-registration-form-card .field-has-error>span:first-child{
  color:#84384a;
}
.courier-registration-form-card .field-has-error small.error{
  display:flex;
  align-items:flex-start;
  gap:5px;
  color:#a33d50!important;
  font-size:11.5px!important;
  font-weight:750;
}
.courier-registration-form-card .field-has-error small.error:before{
  content:"!";
  display:grid;
  place-items:center;
  width:16px;
  height:16px;
  flex:0 0 16px;
  border-radius:50%;
  background:#f3dce1;
  font-size:9px;
  line-height:1;
}
.courier-submit-button[disabled]{
  cursor:wait;
  opacity:.78;
  box-shadow:none;
}
@media(max-width:720px){
  .courier-error-summary{margin-top:14px;padding:12px}
  .courier-error-list>a,.courier-error-list>div{
    grid-template-columns:1fr;
    gap:2px;
  }
  .courier-registration-form-card .field-has-error{
    margin:-7px;
    padding:7px;
  }
}


/* ==========================================================
   Courier dashboard ergonomics refinement — September 2026
   ========================================================== */
.courier-shell .app-shell{
  grid-template-columns:248px minmax(0,1fr);
}
.courier-shell .sidebar{
  width:248px;
  padding:20px 16px 16px;
}
.courier-shell .product-label{
  padding:9px 11px;
  font-size:10.5px;
  letter-spacing:.06em;
}
.courier-shell .tenant-chip{
  margin-top:10px;
}
.courier-shell .topbar{
  min-height:78px;
  padding-left:28px;
  padding-right:28px;
}
.courier-shell .content{
  padding:18px 28px 42px;
}
.courier-dashboard-v2{
  display:grid;
  gap:13px;
  width:100%;
  max-width:1380px;
  margin:0 auto;
}
.courier-dashboard-v2 .card{
  border-color:#dbe6e9;
  box-shadow:0 4px 18px rgba(8,40,57,.045);
}
.courier-hero-v2{
  margin:0;
  padding:21px 23px;
  border-radius:16px;
  background:linear-gradient(135deg,#fff 0%,#fbfdfd 72%,#f3faf8 100%);
}
.courier-hero-copy{
  min-width:0;
}
.courier-hero-topline{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.courier-account-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:26px;
  padding:0 9px;
  border:1px solid #d2e8e0;
  border-radius:999px;
  background:#f2faf6;
  color:#176b58;
  font-size:10.5px;
  font-weight:800;
}
.courier-account-status i{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#23b992;
  box-shadow:0 0 0 3px rgba(35,185,146,.11);
}
.courier-hero-v2 h2{
  margin:7px 0 6px;
  font-size:23px;
  letter-spacing:-.025em;
}
.courier-hero-v2 p{
  max-width:72ch;
  font-size:12.5px;
  line-height:1.55;
}
.courier-flow-mini{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:13px;
}
.courier-flow-mini span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:#5d7580;
  font-size:10.5px;
  font-weight:750;
}
.courier-flow-mini b{
  display:grid;
  place-items:center;
  width:21px;
  height:21px;
  border-radius:7px;
  background:#e8f4f2;
  color:#0b776f;
  font-size:9.5px;
}
.courier-flow-mini>i{
  width:24px;
  height:1px;
  background:#cfdee2;
}
.courier-hero-v2 .courier-license-chip{
  min-width:205px;
  padding:12px 14px;
  border-radius:12px;
  box-shadow:none;
}
.courier-hero-v2 .courier-license-chip small{
  margin-top:4px;
  color:#748982;
  font-size:10px!important;
}

.courier-dashboard-v2 .courier-metrics{
  gap:10px;
  margin:0;
}
.courier-dashboard-v2 .courier-metric{
  position:relative;
  min-height:92px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:"head value" "small value";
  align-items:center;
  gap:3px 14px;
  padding:15px 17px;
  overflow:hidden;
  border:1px solid #dde7ea;
  border-radius:14px;
  background:#fff;
  box-shadow:0 3px 13px rgba(8,40,57,.035);
}
.courier-dashboard-v2 .courier-metric:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  background:#6aa7b8;
}
.courier-dashboard-v2 .courier-metric.active:before{background:#2f8ca4}
.courier-dashboard-v2 .courier-metric.completed:before{background:#3b9b7c}
.courier-metric-head{
  grid-area:head;
  display:flex;
  align-items:center;
  gap:7px;
}
.courier-metric-head span{
  color:#506c79;
  font-size:12px;
  font-weight:800;
}
.courier-metric-head i{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#6aa7b8;
}
.courier-metric.active .courier-metric-head i{background:#2f8ca4}
.courier-metric.completed .courier-metric-head i{background:#3b9b7c}
.courier-dashboard-v2 .courier-metric>strong{
  grid-area:value;
  align-self:center;
  margin:0;
  color:#123f55;
  font-size:30px;
  line-height:1;
}
.courier-dashboard-v2 .courier-metric>small{
  grid-area:small;
  align-self:start;
  color:#71858f;
  font-size:10.5px!important;
}

.courier-work-grid{
  display:grid;
  grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);
  gap:13px;
  align-items:start;
}
.courier-dashboard-v2 .courier-panel{
  margin:0;
  border-radius:15px;
}
.courier-panel-head{
  min-height:94px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:16px 17px 14px;
  border-bottom:1px solid #e7edef;
  background:#fff;
}
.courier-panel-head .eyebrow{
  font-size:10px;
}
.courier-panel-head h2{
  margin:3px 0 3px;
  font-size:17px;
  letter-spacing:-.018em;
}
.courier-panel-head p{
  max-width:48ch;
  margin:0;
  color:#70848e;
  font-size:10.8px;
  line-height:1.45;
}
.courier-count-badge{
  display:grid;
  place-items:center;
  min-width:32px;
  height:32px;
  padding:0 8px;
  border-radius:10px;
  background:#eaf4f6;
  color:#226c83;
  font-size:12px;
  font-weight:850;
  font-variant-numeric:tabular-nums;
}
.courier-count-badge.active{
  background:#e8f2f7;
  color:#276f89;
}
.courier-count-badge.completed{
  background:#e9f5ef;
  color:#176b58;
}
.courier-empty-designed{
  min-height:156px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-direction:row;
  gap:13px;
  padding:24px 18px;
  background:linear-gradient(180deg,#fff,#fbfcfc);
}
.courier-empty-icon{
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  flex:0 0 46px;
  border:1px solid #dce9eb;
  border-radius:13px;
  background:#f2f7f8;
  color:#4e8192;
}
.courier-empty-icon svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
}
.courier-empty-designed>div{
  display:flex;
  flex-direction:column;
  gap:4px;
  max-width:390px;
}
.courier-empty-designed strong{
  color:#294f62;
  font-size:13px;
}
.courier-empty-designed span:not(.courier-empty-icon){
  color:#748891;
  font-size:11px;
  line-height:1.5;
}
.courier-empty-designed.active-empty .courier-empty-icon{
  background:#f1f6f8;
  color:#397c94;
}

.courier-dashboard-v2 .courier-job.available{
  grid-template-columns:42px minmax(0,1fr) auto;
  padding:14px 15px;
}
.courier-dashboard-v2 .courier-job-icon svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
}
.courier-dashboard-v2 .courier-job-copy strong{
  font-size:12.5px;
}
.courier-dashboard-v2 .courier-job-copy span{
  font-size:11.5px;
}
.courier-dashboard-v2 .courier-job-copy small{
  font-size:10.5px!important;
  line-height:1.45;
}
.courier-dashboard-v2 .courier-job.available button{
  min-height:38px;
  padding:0 13px;
  font-size:11.5px;
}
.courier-work-grid .courier-job.active{
  grid-template-columns:1fr;
  gap:13px;
  padding:15px 16px;
}
.courier-work-grid .courier-job-status{
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:11px;
  border-bottom:1px solid #e8eef0;
}
.courier-work-grid .courier-delivery-details{
  gap:11px 16px;
}
.courier-work-grid .courier-job-actions{
  grid-column:auto;
  grid-template-columns:1fr;
  padding-top:11px;
  border-top:1px solid #e8eef0;
}
.courier-history-panel{
  overflow:hidden;
}

@media(max-width:1180px){
  .courier-shell .app-shell{grid-template-columns:1fr}
  .courier-work-grid{grid-template-columns:1fr}
  .courier-empty-designed{min-height:132px}
}
@media(max-width:820px){
  .courier-shell .content{padding:16px 15px 38px}
  .courier-hero-v2{padding:18px}
  .courier-hero-v2 .courier-license-chip{min-width:0;width:100%}
  .courier-flow-mini{flex-wrap:wrap}
  .courier-panel-head{min-height:0}
}
@media(max-width:600px){
  .courier-shell .content{padding:12px 11px 34px}
  .courier-dashboard-v2{gap:10px}
  .courier-hero-v2 h2{font-size:20px}
  .courier-flow-mini>i{width:12px}
  .courier-dashboard-v2 .courier-metrics{grid-template-columns:1fr}
  .courier-dashboard-v2 .courier-metric{min-height:78px}
  .courier-empty-designed{
    min-height:0;
    align-items:flex-start;
    padding:18px 14px;
  }
  .courier-panel-head{padding:14px}
  .courier-dashboard-v2 .courier-job.available{
    grid-template-columns:38px minmax(0,1fr);
  }
  .courier-dashboard-v2 .courier-job.available form{
    grid-column:1/-1;
  }
  .courier-dashboard-v2 .courier-job.available button{width:100%}
}


/* ==========================================================
   Authenticated patient external prescription upload — Sep 2026
   ========================================================== */
.patient-upload-v2{
  display:grid;
  gap:14px;
  width:100%;
  max-width:1180px;
  margin:0 auto;
}
.patient-upload-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:22px 24px;
}
.patient-upload-hero>div:first-child{max-width:700px}
.patient-upload-hero h2{
  margin:5px 0 7px;
  font-size:23px;
  letter-spacing:-.025em;
}
.patient-upload-hero p{
  margin:0;
  color:#607782;
  font-size:13px;
  line-height:1.55;
}
.patient-upload-identity{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  align-items:center;
  gap:11px;
  min-width:300px;
  padding:12px 14px;
  border:1px solid #d4e5e1;
  border-radius:12px;
  background:#f5faf8;
}
.patient-upload-identity>span{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border-radius:11px;
  background:#dff1eb;
  color:#176b58;
  font-size:12px;
  font-weight:850;
}
.patient-upload-identity>div{
  display:flex;
  min-width:0;
  flex-direction:column;
}
.patient-upload-identity small{
  color:#71867e;
  font-size:10px!important;
  font-weight:750;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.patient-upload-identity strong{
  margin-top:1px;
  color:#214f5d;
  font-size:13px;
}
.patient-upload-identity em{
  margin-top:2px;
  color:#71858d;
  font-size:10.5px;
  font-style:normal;
  line-height:1.35;
}
.patient-upload-card{
  overflow:hidden;
  padding:0;
}
.patient-upload-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 21px 16px;
  border-bottom:1px solid #e7edef;
  background:#fff;
}
.patient-upload-card-head h2{
  margin:4px 0 4px;
  font-size:18px;
}
.patient-upload-card-head p{
  margin:0;
  color:#71858e;
  font-size:11.5px;
  line-height:1.45;
}
.patient-upload-step{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border-radius:9px;
  background:#edf5f6;
  color:#2a6d82;
  font-size:10.5px;
  font-weight:800;
  white-space:nowrap;
}
.patient-upload-card form{
  padding:20px 21px 21px;
}
.patient-upload-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px 16px;
}
.patient-upload-grid label{
  display:grid;
  align-content:start;
  gap:7px;
  min-width:0;
  color:#415f6d;
  font-size:12.5px;
  font-weight:750;
}
.patient-upload-grid label.span2{grid-column:1/-1}
.patient-upload-grid label>span:first-child{line-height:1.35}
.patient-upload-grid .control{
  min-height:48px;
  border:1px solid #cfdee2;
  border-radius:10px;
  background:#fff;
  font-size:14px;
}
.patient-upload-grid textarea.control{
  min-height:82px;
  resize:vertical;
}
.patient-upload-grid .field-file{
  padding:14px;
  border:1px solid #dbe7e9;
  border-radius:12px;
  background:#fbfdfd;
}
.patient-upload-grid .field-file input[type=file].control{
  min-height:60px;
  padding:10px;
  border:1px dashed #bcd3d9;
}
.patient-upload-grid .field-file input[type=file].control::file-selector-button{
  min-height:35px;
  margin-right:11px;
  padding:0 13px;
  border:1px solid #c8dcdf;
  border-radius:8px;
  background:#edf5f5;
  color:#2c6272;
  font-weight:750;
  cursor:pointer;
}
.patient-upload-notice{
  display:grid;
  grid-template-columns:32px minmax(0,1fr);
  gap:10px;
  align-items:start;
  margin-top:17px;
  padding:12px 13px;
  border:1px solid #d9e9e3;
  border-radius:11px;
  background:#f6faf8;
}
.patient-upload-notice>span{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:9px;
  background:#e4f3ed;
  color:#176b58;
  font-size:12px;
  font-weight:900;
}
.patient-upload-notice>div{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.patient-upload-notice strong{
  color:#315b67;
  font-size:11.5px;
}
.patient-upload-notice small{
  color:#71858d;
  font-size:10.5px!important;
}
.patient-upload-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid #edf1f2;
}
.patient-upload-actions .secondary,
.patient-upload-actions .primary{
  min-width:150px;
  min-height:44px;
}
.patient-upload-grid .field-has-error .control{border-color:#ca6678}
.patient-upload-grid small.error{
  color:#a33d50!important;
  font-size:11px!important;
}
@media(max-width:820px){
  .patient-upload-hero{
    align-items:flex-start;
    flex-direction:column;
    padding:18px;
  }
  .patient-upload-identity{width:100%;min-width:0}
  .patient-upload-card form{padding:17px}
}
@media(max-width:620px){
  .patient-upload-v2{gap:10px}
  .patient-upload-hero{padding:16px}
  .patient-upload-hero h2{font-size:20px}
  .patient-upload-card-head{
    padding:15px;
    flex-direction:column;
  }
  .patient-upload-card form{padding:15px}
  .patient-upload-grid{grid-template-columns:1fr;gap:13px}
  .patient-upload-grid label.span2{grid-column:auto}
  .patient-upload-grid .control{font-size:16px}
  .patient-upload-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .patient-upload-actions .secondary,
  .patient-upload-actions .primary{width:100%}
}


/* Prominent success confirmations */
.messages .msg.success{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  min-height:58px;
  padding:14px 16px 14px 54px;
  border:1px solid #bfe0d3;
  border-radius:13px;
  background:linear-gradient(135deg,#eaf8f2 0%,#f5fbf8 100%);
  color:#155f4d;
  font-size:13px;
  font-weight:750;
  line-height:1.5;
  box-shadow:0 8px 22px rgba(23,107,88,.09);
}
.messages .msg.success:before{
  content:"✓";
  position:absolute;
  left:15px;
  top:50%;
  transform:translateY(-50%);
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:9px;
  background:#d7f0e6;
  color:#176b58;
  font-size:15px;
  font-weight:900;
  box-shadow:inset 0 0 0 1px rgba(23,107,88,.08);
}
@media(max-width:620px){
  .messages .msg.success{
    min-height:54px;
    padding:12px 13px 12px 48px;
    font-size:12px;
  }
  .messages .msg.success:before{
    left:12px;
    width:26px;
    height:26px;
  }
}


/* ==========================================================
   Global ManuScript notification system — September 2026
   Applies to patient, doctor, pharmacy, hospital, courier and admin UI
   ========================================================== */
.messages{
  display:grid;
  gap:10px;
  padding-top:14px;
  padding-bottom:0;
}
.messages .msg{
  position:relative;
  display:flex;
  align-items:center;
  min-height:60px;
  padding:14px 18px 14px 58px;
  border:1px solid #cfdfe4;
  border-left-width:4px;
  border-radius:13px;
  background:#f5f9fa;
  color:#315968;
  font-size:13px;
  font-weight:700;
  line-height:1.5;
  box-shadow:0 8px 22px rgba(8,40,57,.075);
}
.messages .msg:before{
  content:"i";
  position:absolute;
  left:16px;
  top:50%;
  transform:translateY(-50%);
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:9px;
  background:#e4eef1;
  color:#315f71;
  font-size:14px;
  font-weight:900;
  line-height:1;
}
.messages .msg-copy{
  display:block;
  width:100%;
}

/* Success */
.messages .msg.success{
  border-color:#b9ded0;
  border-left-color:#248b6f;
  background:linear-gradient(135deg,#e8f7f1 0%,#f6fbf9 100%);
  color:#145d4b;
  box-shadow:0 8px 22px rgba(23,107,88,.10);
}
.messages .msg.success:before{
  content:"✓";
  background:#d6eee5;
  color:#176b58;
}

/* Error / danger */
.messages .msg.error,
.messages .msg.danger{
  border-color:#ecc3cb;
  border-left-color:#b1465a;
  background:linear-gradient(135deg,#fff0f3 0%,#fff8f9 100%);
  color:#873548;
  box-shadow:0 8px 22px rgba(168,62,80,.10);
}
.messages .msg.error:before,
.messages .msg.danger:before{
  content:"!";
  background:#f5dce2;
  color:#a33d50;
}

/* Warning */
.messages .msg.warning{
  border-color:#ead7a9;
  border-left-color:#b47d1b;
  background:linear-gradient(135deg,#fff8e8 0%,#fffdf7 100%);
  color:#7b5715;
  box-shadow:0 8px 22px rgba(148,99,17,.09);
}
.messages .msg.warning:before{
  content:"!";
  background:#f6e9c7;
  color:#946311;
}

/* Information / neutral */
.messages .msg.info,
.messages .msg.debug{
  border-color:#bfdbe5;
  border-left-color:#367f98;
  background:linear-gradient(135deg,#edf7fa 0%,#f8fcfd 100%);
  color:#245e73;
  box-shadow:0 8px 22px rgba(23,107,145,.08);
}
.messages .msg.info:before,
.messages .msg.debug:before{
  content:"i";
  background:#dceef4;
  color:#276f89;
}

@media(max-width:760px){
  .messages{
    gap:8px;
    padding-top:10px;
  }
  .messages .msg{
    min-height:56px;
    padding:12px 13px 12px 50px;
    border-radius:11px;
    font-size:12px;
  }
  .messages .msg:before{
    left:12px;
    width:27px;
    height:27px;
    border-radius:8px;
    font-size:13px;
  }
}


/* Patient dashboard: quote visibility and linked upload/order state */
.patient-dashboard-list.uploads a.patient-upload-row{
  color:inherit;
  text-decoration:none;
  transition:background .14s ease,border-color .14s ease;
}
.patient-dashboard-list.uploads a.patient-upload-row:hover{
  background:#f8fbfc;
}
.patient-dashboard-list.uploads .patient-upload-row.quote-ready{
  position:relative;
  background:linear-gradient(90deg,#fffaf0 0%,#fff 34%);
  box-shadow:inset 3px 0 0 #b47d1b;
}
.patient-dashboard-list.uploads .patient-upload-row.quote-ready:hover{
  background:linear-gradient(90deg,#fff7e5 0%,#fffdf9 40%);
}
.patient-dashboard-list.uploads .patient-upload-row.quote-ready .patient-list-copy>span b{
  color:#7b5715;
  font-weight:800;
}
.patient-upload-row-action{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  min-width:18px;
  color:#6e8995;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.patient-upload-row.quote-ready .patient-upload-row-action{
  min-width:82px;
  min-height:30px;
  padding:0 10px;
  border:1px solid #ead7a9;
  border-radius:9px;
  background:#fff6df;
  color:#805b14;
}
.status.quoted{
  background:#fff1cf!important;
  color:#835c12!important;
  border-color:#ecd69f!important;
}
@media(max-width:720px){
  .patient-dashboard-list.uploads a.patient-upload-row{
    grid-template-columns:38px minmax(0,1fr) auto;
  }
  .patient-dashboard-list.uploads .patient-upload-row-action{
    grid-column:2/-1;
    justify-self:start;
  }
}

/* Patient dashboard row layout hardening */
.patient-dashboard-list.uploads a.patient-upload-row{
  grid-template-columns:38px minmax(0,1fr) minmax(150px,auto);
  min-height:68px;
  column-gap:12px;
}
.patient-upload-row-meta{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  min-width:0;
  white-space:nowrap;
}
.patient-upload-row-meta .status{
  flex:0 0 auto;
}
.patient-upload-row-meta .patient-upload-row-action{
  flex:0 0 auto;
}
.patient-dashboard-list.uploads .patient-upload-row.quote-ready{
  align-items:center;
}
.patient-dashboard-list.uploads .patient-upload-row.quote-ready .patient-list-copy{
  padding-right:6px;
}
.patient-dashboard-list.uploads .patient-upload-row.quote-ready .patient-list-copy>span{
  overflow:visible;
  white-space:normal;
  line-height:1.45;
}
.patient-dashboard-list.uploads .patient-upload-row.quote-ready .patient-upload-row-action{
  min-width:94px;
  min-height:34px;
  justify-content:center;
  padding:0 12px;
  border-radius:9px;
}
@media(max-width:980px){
  .patient-dashboard-list.uploads a.patient-upload-row{
    grid-template-columns:38px minmax(0,1fr);
    row-gap:8px;
  }
  .patient-upload-row-meta{
    grid-column:2;
    justify-content:flex-start;
    flex-wrap:wrap;
  }
}
@media(max-width:620px){
  .patient-dashboard-list.uploads a.patient-upload-row{
    grid-template-columns:34px minmax(0,1fr);
    padding:12px;
    gap:8px 10px;
  }
  .patient-upload-row-meta{
    grid-column:1/-1;
    padding-left:44px;
    gap:7px;
  }
  .patient-upload-row-meta .status,
  .patient-upload-row-meta .patient-upload-row-action{
    min-height:30px;
  }
  .patient-upload-row-meta .patient-upload-row-action{
    min-width:0;
  }
}


/* ==========================================================
   Parcel tracking workflow — September 2026
   ========================================================== */
.status.collected{
  background:#e8f2f7;
  color:#276f89;
  border-color:#cfe1e8;
}
.status.in_transit{
  background:#edf3fb;
  color:#3c6592;
  border-color:#d6e1ef;
}
.status.out_for_delivery{
  background:#fff2d8;
  color:#875d10;
  border-color:#ead6a5;
}

.courier-job-status small b{
  color:#1f6178;
  font-weight:850;
  letter-spacing:.02em;
}
.courier-action-help{
  display:block;
  margin-top:5px;
  color:#72858e;
  font-size:10.5px!important;
  line-height:1.4;
}
.courier-custody-note{
  padding:9px 10px;
  border:1px solid #dce7ea;
  border-radius:9px;
  background:#f8fbfb;
  color:#6a7e87;
  font-size:10.5px;
  line-height:1.45;
}

.patient-delivery-tracking{
  overflow:hidden;
  padding:0;
}
.patient-tracking-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:20px 21px 17px;
  border-bottom:1px solid #e6edef;
  background:linear-gradient(135deg,#f8fcfb 0%,#fff 72%);
}
.patient-tracking-head>div{
  min-width:0;
}
.patient-tracking-head h2{
  margin:5px 0 5px;
  color:#123f55;
  font-size:22px;
  letter-spacing:.015em;
  font-variant-numeric:tabular-nums;
}
.patient-tracking-head p{
  max-width:68ch;
  margin:0;
  color:#667d87;
  font-size:12px;
  line-height:1.5;
}
.patient-tracking-timeline{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  padding:20px 21px;
  border-bottom:1px solid #e7edef;
  background:#fff;
}
.patient-tracking-stage{
  position:relative;
  display:grid;
  grid-template-columns:32px minmax(0,1fr);
  gap:9px;
  align-items:start;
  min-width:0;
  padding-right:13px;
}
.patient-tracking-stage:not(:last-child):after{
  content:"";
  position:absolute;
  top:15px;
  left:31px;
  right:-1px;
  height:2px;
  background:#dfe8eb;
  z-index:0;
}
.patient-tracking-stage.done:not(:last-child):after{
  background:#79bba8;
}
.patient-tracking-dot{
  position:relative;
  z-index:1;
  display:grid;
  place-items:center;
  width:31px;
  height:31px;
  border:2px solid #d5e0e4;
  border-radius:50%;
  background:#fff;
  color:#8a9ba3;
  font-size:11px;
  font-weight:850;
}
.patient-tracking-stage.done .patient-tracking-dot{
  border-color:#68ad98;
  background:#e7f5ef;
  color:#176b58;
}
.patient-tracking-stage.current .patient-tracking-dot{
  border-color:#248b79;
  background:#248b79;
  color:#fff;
  box-shadow:0 0 0 5px rgba(36,139,121,.10);
  font-size:20px;
  line-height:1;
}
.patient-tracking-stage>div{
  position:relative;
  z-index:1;
  min-width:0;
  padding-top:1px;
  background:#fff;
}
.patient-tracking-stage strong{
  display:block;
  color:#526b76;
  font-size:11.5px;
  line-height:1.35;
}
.patient-tracking-stage.current strong,
.patient-tracking-stage.done strong{
  color:#244f60;
}
.patient-tracking-stage small{
  display:block;
  margin-top:3px;
  color:#8a9aa2;
  font-size:9.8px!important;
  line-height:1.35;
}
.patient-tracking-stage.current small{
  color:#397a70;
  font-weight:750;
}
.patient-courier-contact{
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:15px 21px;
  background:#fbfdfd;
}
.patient-courier-avatar{
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:13px;
  background:#e4f2ef;
  color:#176b58;
  font-size:14px;
  font-weight:850;
  text-transform:uppercase;
}
.patient-courier-copy{
  display:flex;
  min-width:0;
  flex-direction:column;
}
.patient-courier-copy small{
  color:#71858d;
  font-size:9.8px!important;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.045em;
}
.patient-courier-copy strong{
  margin-top:2px;
  color:#244f60;
  font-size:13px;
}
.patient-courier-copy span{
  margin-top:2px;
  color:#617b86;
  font-size:11.5px;
}
.patient-call-courier{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 15px;
  white-space:nowrap;
}
.patient-delivery-tracking.delivered .patient-tracking-head{
  background:linear-gradient(135deg,#eef9f4 0%,#fff 72%);
}

@media(max-width:860px){
  .patient-tracking-timeline{
    grid-template-columns:1fr 1fr;
    gap:17px 12px;
  }
  .patient-tracking-stage:nth-child(2):after{
    display:none;
  }
}
@media(max-width:620px){
  .patient-tracking-head{
    flex-direction:column;
    padding:16px;
  }
  .patient-tracking-head h2{
    font-size:18px;
    overflow-wrap:anywhere;
  }
  .patient-tracking-timeline{
    grid-template-columns:1fr;
    gap:0;
    padding:15px 16px;
  }
  .patient-tracking-stage{
    grid-template-columns:32px minmax(0,1fr);
    min-height:66px;
    padding:0 0 14px;
  }
  .patient-tracking-stage:not(:last-child):after{
    top:30px;
    bottom:0;
    left:15px;
    right:auto;
    width:2px;
    height:auto;
  }
  .patient-tracking-stage:nth-child(2):after{
    display:block;
  }
  .patient-courier-contact{
    grid-template-columns:42px minmax(0,1fr);
    padding:14px 16px;
  }
  .patient-courier-avatar{
    width:40px;
    height:40px;
  }
  .patient-call-courier{
    grid-column:1/-1;
    width:100%;
  }
}


/* Quote accept/reject decision controls */
.quote-decision-stack{display:grid;gap:9px;min-width:280px}
.patient-quote-reject{display:flex;justify-content:flex-end;padding:0 21px 18px}
.patient-quote-reject .secondary{min-width:170px}
@media(max-width:620px){
  .quote-decision-stack{min-width:0;width:100%}
  .patient-quote-reject{padding:0 15px 15px}
  .patient-quote-reject .secondary{width:100%}
}


/* ==========================================================
   Administration · SMS configuration
   ========================================================== */
.sms-admin-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}
.sms-admin-metric{
  min-height:112px;
  padding:16px 17px;
}
.sms-admin-metric>span{
  display:block;
  color:#7d9099;
  font-size:10px;
  font-weight:850;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.sms-admin-metric strong{
  display:block;
  margin-top:7px;
  color:#244e61;
  font-size:22px;
  line-height:1.1;
}
.sms-admin-metric strong.ok{color:#18725e}
.sms-admin-metric strong.warn{color:#9a6a16}
.sms-admin-metric strong.danger{color:#a84646}
.sms-admin-metric small{
  display:block;
  margin-top:6px;
  color:#8999a1;
  font-size:10.5px;
}
.sms-admin-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:14px;
  align-items:start;
}
.sms-config-card{
  padding:0;
  overflow:hidden;
}
.sms-config-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:20px 21px 17px;
  border-bottom:1px solid #e6edef;
  background:linear-gradient(135deg,#f7fbfb 0%,#fff 76%);
}
.sms-config-head h2,
.sms-log-head h2{
  margin:4px 0 5px;
  color:#244f60;
  font-size:20px;
}
.sms-config-head p{
  max-width:72ch;
  margin:0;
  color:#6f838c;
  font-size:11.5px;
  line-height:1.55;
}
.sms-provider-state{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:31px;
  padding:0 10px;
  border-radius:999px;
  font-size:10.5px;
  font-weight:850;
  white-space:nowrap;
}
.sms-provider-state i{
  width:7px;
  height:7px;
  border-radius:50%;
}
.sms-provider-state.configured{
  background:#eaf6f1;
  color:#176c58;
  border:1px solid #cce8dc;
}
.sms-provider-state.configured i{background:#249578}
.sms-provider-state.pending{
  background:#fff5df;
  color:#8d6518;
  border:1px solid #eeddb2;
}
.sms-provider-state.pending i{background:#d39b31}
.sms-settings-form{
  padding:19px 21px 20px;
}
.sms-toggle-row{
  margin-bottom:17px;
  padding:13px 14px;
  border:1px solid #dde8eb;
  border-radius:11px;
  background:#f9fbfb;
}
.sms-switch-line{
  display:flex;
  align-items:flex-start;
  gap:10px;
  cursor:pointer;
}
.sms-switch-line input{
  width:18px;
  height:18px;
  margin-top:1px;
  accent-color:#218873;
}
.sms-switch-line span{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.sms-switch-line strong{
  color:#2a5264;
  font-size:12px;
}
.sms-switch-line small{
  color:#7c8f98;
  font-size:10.5px;
  line-height:1.4;
}
.sms-field-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.sms-field.span2{grid-column:1/-1}
.sms-field{
  min-width:0;
}
.sms-field label{
  display:block;
  margin-bottom:6px;
  color:#345d6e;
  font-size:10.5px;
  font-weight:850;
}
.sms-field .control{
  width:100%;
  min-height:42px;
}
.sms-field>small,
.sms-secret-control+small{
  display:block;
  margin-top:5px;
  color:#8999a1;
  font-size:9.8px;
  line-height:1.4;
}
.sms-secret-control{
  position:relative;
}
.sms-secret-control .control{
  padding-right:78px;
}
.sms-secret-toggle{
  position:absolute;
  top:50%;
  right:6px;
  transform:translateY(-50%);
  min-height:30px;
  padding:0 9px;
  border:0;
  border-radius:7px;
  background:#edf4f5;
  color:#3b6878;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}
.sms-secret-saved{
  display:inline-flex;
  margin-top:6px;
  padding:4px 7px;
  border-radius:999px;
  background:#eaf6f1;
  color:#18705d;
  font-size:9.5px;
  font-weight:800;
}
.sms-field.has-error .control{
  border-color:#cb6d6d!important;
  box-shadow:0 0 0 3px rgba(181,73,73,.08);
}
.field-error{
  color:#aa4343!important;
  font-weight:750;
}
.sms-form-error{
  margin-bottom:14px;
  padding:10px 12px;
  border:1px solid #e3b8b8;
  border-radius:9px;
  background:#fff3f3;
  color:#9b4141;
  font-size:11px;
}
.sms-config-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:20px;
  padding-top:16px;
  border-top:1px solid #e8edef;
}
.sms-config-actions small{
  color:#8b9ba2;
  font-size:9.8px;
}
.sms-save-button{
  min-height:42px;
  padding:0 17px;
}
.sms-security-card{
  padding:18px;
}
.sms-security-card h3{
  margin:5px 0 8px;
  color:#294f61;
  font-size:16px;
}
.sms-security-card p{
  margin:0;
  color:#72858e;
  font-size:10.8px;
  line-height:1.55;
}
.sms-security-card ul{
  margin:14px 0 0;
  padding:0;
  list-style:none;
}
.sms-security-card li{
  position:relative;
  padding:7px 0 7px 18px;
  border-top:1px solid #edf1f2;
  color:#58717d;
  font-size:10.5px;
}
.sms-security-card li:before{
  content:"✓";
  position:absolute;
  left:0;
  color:#218873;
  font-weight:900;
}
.sms-log-card{
  margin-top:14px;
  padding:0;
  overflow:hidden;
}
.sms-log-head{
  padding:16px 18px 12px;
  border-bottom:1px solid #e8edef;
}
.sms-log-list{
  display:flex;
  flex-direction:column;
}
.sms-log-row{
  display:grid;
  grid-template-columns:90px minmax(0,1fr) 120px;
  align-items:center;
  gap:12px;
  min-height:58px;
  padding:10px 16px;
  border-bottom:1px solid #edf1f2;
}
.sms-log-row:last-child{border-bottom:0}
.sms-log-row>div{
  min-width:0;
}
.sms-log-row strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#355c6c;
  font-size:11.5px;
}
.sms-log-row small{
  display:block;
  margin-top:3px;
  color:#87989f;
  font-size:9.8px;
}
.sms-log-row>span:last-child{
  color:#7f929a;
  font-size:10px;
  text-align:right;
}
@media(max-width:1050px){
  .sms-admin-metrics{grid-template-columns:1fr 1fr}
  .sms-admin-layout{grid-template-columns:1fr}
  .sms-admin-side{display:grid;grid-template-columns:1fr}
}
@media(max-width:650px){
  .sms-admin-metrics{grid-template-columns:1fr 1fr;gap:8px}
  .sms-admin-metric{min-height:96px;padding:13px}
  .sms-admin-metric strong{font-size:18px}
  .sms-config-head{flex-direction:column;padding:16px}
  .sms-settings-form{padding:15px 16px 17px}
  .sms-field-grid{grid-template-columns:1fr}
  .sms-field.span2{grid-column:auto}
  .sms-config-actions{align-items:stretch;flex-direction:column}
  .sms-save-button{width:100%}
  .sms-log-row{grid-template-columns:82px minmax(0,1fr);gap:8px 10px;padding:10px 12px}
  .sms-log-row>span:last-child{grid-column:2;text-align:left}
}
@media(max-width:420px){
  .sms-admin-metrics{grid-template-columns:1fr}
}


/* ==========================================================
   Platform-wide ergonomics & responsive refinement — Sep 2026
   Shared interaction, typography, wrapping, admin and recovery
   ========================================================== */
*,*:before,*:after{box-sizing:border-box}
body{overflow-x:hidden}
.main,.content,.topbar,.card,.hero,.section-head,.tr,.tr>*{min-width:0}
.main{width:100%}
.content{
  width:100%;
  max-width:1540px;
  margin-inline:auto;
}
.messages{
  width:100%;
  max-width:1540px;
  margin-inline:auto;
}
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(244,247,248,.94);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(217,229,232,.82);
}
.sidebar{overflow-y:auto;overscroll-behavior:contain}
h1,h2,h3,strong{overflow-wrap:break-word}
h1,h2,h3{text-wrap:balance}
p,small,span,dd{overflow-wrap:break-word}
a,button,input,select,textarea{touch-action:manipulation}
a.primary,a.secondary,a.danger,button,.primary,.secondary,.danger{
  line-height:1.25;
  text-align:center;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.control:focus-visible{
  outline:3px solid rgba(25,163,143,.24)!important;
  outline-offset:2px;
}
input,select,textarea,.control{
  max-width:100%;
  border-radius:10px;
}
textarea{resize:vertical;min-height:92px}
label>small,.field-help{display:block;margin-top:5px;color:#72858e}
.card{overflow-wrap:anywhere}
.hero,.detail-hero,.rx-hero{
  gap:18px;
  flex-wrap:wrap;
}
.hero>div,.detail-hero>div,.rx-hero>div{min-width:0}
.section-head{gap:14px;flex-wrap:wrap}
.status{white-space:nowrap;min-width:0}
.table{
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
}
.filters{gap:12px}
.empty{padding:22px 18px;color:#72858e}

/* Login access recovery */
.auth-login-form{gap:14px}
.auth-recovery-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:center;
  min-height:40px;
  margin-top:-2px;
  color:#176b7d;
  font-size:12.5px;
  font-weight:750;
  text-decoration:none;
}
.auth-recovery-link:hover{text-decoration:underline}
.auth-suspended-notice{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:12px 13px;
}
.auth-suspended-notice strong{font-size:13px}
.auth-suspended-notice span{font-size:12px;line-height:1.45}

/* Public account recovery */
.recovery-body{
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:28px 18px;
  background:
    radial-gradient(circle at 10% 0%,rgba(25,163,143,.09),transparent 34%),
    linear-gradient(145deg,#eef5f6 0%,#f7f9fa 52%,#eef4f5 100%);
}
.recovery-shell{width:min(100%,540px)}
.recovery-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:0 auto 16px;
  color:#103d52;
  text-decoration:none;
}
.recovery-brand img{width:44px;height:44px}
.recovery-brand>span{display:flex;flex-direction:column}
.recovery-brand strong{font-size:20px;line-height:1.05}
.recovery-brand strong em{font-style:normal;color:#188c7d}
.recovery-brand small{margin-top:4px;color:#6d838d;font-size:10.8px!important}
.recovery-card{
  padding:30px;
  border:1px solid #dce7ea;
  border-radius:18px;
  background:#fff;
  box-shadow:0 18px 55px rgba(8,40,57,.10);
}
.recovery-card h1{
  margin:6px 0 10px;
  color:#123f55;
  font-size:27px;
  letter-spacing:-.025em;
}
.recovery-card>p{margin:0 0 20px;color:#617985;font-size:13.5px}
.recovery-form{display:grid;gap:17px;margin-top:20px}
.recovery-form label{display:flex;flex-direction:column;gap:6px;color:#496671;font-size:13px;font-weight:750}
.recovery-form .control{min-height:48px;font-size:16px}
.recovery-form button{margin-top:2px}
.recovery-back{
  display:flex;
  justify-content:center;
  min-height:42px;
  align-items:center;
  margin-top:14px;
  color:#5f7782;
  font-size:12.5px;
  font-weight:700;
}
.recovery-security-note{
  display:flex;
  flex-direction:column;
  gap:3px;
  margin:17px 0;
  padding:12px 13px;
  border:1px solid #d9e9e5;
  border-radius:11px;
  background:#f4faf8;
}
.recovery-security-note strong{color:#256b5e;font-size:12px}
.recovery-security-note span{color:#617d76;font-size:11.5px;line-height:1.45}
.recovery-provider-warning{
  margin:14px 0;
  padding:11px 12px;
  border:1px solid #ead7a9;
  border-radius:10px;
  background:#fff8e7;
  color:#805e17;
  font-size:11.5px;
}
.recovery-success-icon,.recovery-invalid-icon{
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  margin-bottom:13px;
  border-radius:14px;
  background:#e7f5ef;
  color:#176b58;
  font-size:22px;
  font-weight:900;
}
.recovery-invalid-icon{background:#fae9ed;color:#9f3f50}

/* Platform administrator user management */
.admin-users-v2{display:grid;gap:14px}
.admin-users-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:22px 24px;
}
.admin-users-hero h2{margin:5px 0 6px;font-size:23px}
.admin-users-hero p{max-width:74ch;margin:0;color:#607985;font-size:12.5px}
.admin-users-security{
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  gap:10px;
  align-items:center;
  flex:0 1 360px;
  padding:11px 13px;
  border:1px solid #d8e9e4;
  border-radius:12px;
  background:#f5faf8;
}
.admin-users-security>span{
  display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#dff1ea;color:#176b58;font-weight:900
}
.admin-users-security div{display:flex;flex-direction:column;min-width:0}
.admin-users-security strong{color:#315e55;font-size:12px}
.admin-users-security small{color:#6b827b;font-size:10.5px!important}
.admin-users-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.admin-users-filters{
  display:grid;
  grid-template-columns:minmax(240px,1fr) 190px auto auto;
  gap:10px;
  align-items:end;
  padding:14px 16px;
}
.admin-users-filters label{display:flex;flex-direction:column;gap:5px;color:#5d747f;font-size:11.5px;font-weight:750}
.admin-users-filters button,.admin-users-filters>a{min-height:46px}
.admin-users-list-card{padding:0;overflow:hidden}
.admin-users-head{border-bottom:1px solid #e5edef}
.admin-users-list{display:flex;flex-direction:column}
.admin-user-row{
  display:grid;
  grid-template-columns:minmax(230px,1.35fr) minmax(170px,1fr) minmax(155px,.8fr) auto minmax(240px,1.15fr);
  gap:16px;
  align-items:center;
  padding:13px 17px;
  border-bottom:1px solid #eaf0f2;
  background:#fff;
}
.admin-user-row:last-child{border-bottom:0}
.admin-user-row.suspended{background:#fcf8f8}
.admin-user-identity{display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;align-items:center;min-width:0}
.admin-user-avatar{
  display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#e6f2f2;color:#176b70;font-size:12px;font-weight:850;text-transform:uppercase
}
.admin-user-identity>div,.admin-user-meta{display:flex;min-width:0;flex-direction:column}
.admin-user-identity strong{color:#284f60;font-size:13px}
.admin-user-identity small{color:#71858e;font-size:10.8px!important}
.admin-user-meta>span{color:#84959c;font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.045em}
.admin-user-meta strong{margin-top:2px;color:#486571;font-size:11.5px}
.admin-user-meta small{margin-top:2px;color:#809199;font-size:10px!important}
.admin-user-state{display:flex;justify-content:center}
.admin-user-action form{display:grid;grid-template-columns:minmax(110px,1fr) auto;gap:7px;align-items:center}
.admin-user-reason{min-height:40px!important;font-size:12px!important}
.admin-user-action button{min-height:40px;white-space:nowrap}
.admin-protected-account{display:inline-flex;align-items:center;min-height:36px;padding:0 10px;border-radius:9px;background:#edf2f4;color:#687d87;font-size:10.5px;font-weight:750}
.status.suspended{background:#fff0dc;color:#8a5a0c;border-color:#efd8ae}
.status.revoked{background:#fae9ed;color:#9f3f50;border-color:#eccbd2}

/* Hospital affiliation lifecycle */
.hospital-affiliations-v2{display:grid;gap:14px}
.hospital-affiliation-hero{align-items:center;justify-content:space-between}
.hospital-affiliation-policy{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:9px;
  align-items:center;
  flex:0 1 360px;
  padding:11px 12px;
  border:1px solid #dbe8eb;
  border-radius:11px;
  background:#f7fafb;
}
.hospital-affiliation-policy>span{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#e7f2f5;color:#276b83;font-weight:850}
.hospital-affiliation-policy>div{display:flex;min-width:0;flex-direction:column}
.hospital-affiliation-policy strong{color:#3b6372;font-size:11.5px}
.hospital-affiliation-policy small{color:#71868f;font-size:10.2px!important}
.hospital-affiliation-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.lifecycle-card{gap:18px}
.lifecycle-card .doctor-affiliation-identity{min-width:220px}
.lifecycle-actions{min-width:min(100%,390px)}
.lifecycle-buttons{display:grid;grid-template-columns:1fr auto;gap:8px}
.affiliation-state-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  min-width:min(100%,420px);
}
.affiliation-inline-action{display:grid;grid-template-columns:minmax(120px,1fr) auto;gap:7px;align-items:center;min-width:260px}
.affiliation-inline-action .control{min-height:40px;font-size:12px}
.affiliation-state-actions form button{min-height:40px}
.suspended-section{border-color:#eadfc5}
.hospital-affiliation-card.suspended{background:#fffcf7}

/* Global touch/tablet and phone refinements */
@media(max-width:1180px){
  .admin-user-row{grid-template-columns:minmax(220px,1.2fr) minmax(170px,1fr) auto minmax(230px,1fr)}
  .admin-user-row .admin-user-login{display:none}
  .hospital-affiliation-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
  .admin-users-hero{align-items:flex-start;flex-direction:column}
  .admin-users-security{width:100%;flex-basis:auto}
  .admin-users-filters{grid-template-columns:1fr 180px auto}
  .admin-users-filters>a{grid-column:1/-1;justify-self:start}
  .admin-user-row{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:"identity state" "profile profile" "action action";
    gap:9px 12px;
  }
  .admin-user-identity{grid-area:identity}
  .admin-user-profile{grid-area:profile;display:flex!important}
  .admin-user-state{grid-area:state}
  .admin-user-action{grid-area:action}
  .admin-user-action form{grid-template-columns:minmax(0,1fr) auto}
  .hospital-affiliation-card.lifecycle-card{align-items:flex-start;flex-direction:column}
  .lifecycle-actions,.affiliation-state-actions{width:100%;min-width:0}
  .affiliation-state-actions{justify-content:flex-start}
}
@media(max-width:820px){
  .topbar{padding-top:max(10px,env(safe-area-inset-top))}
  .top-actions .secure-badge{display:none}
  .content{padding-inline:14px}
  .card{border-radius:14px}
  .primary,.secondary,.danger,button{font-size:13.5px}
  .admin-users-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:650px){
  .topbar{min-height:66px;padding-left:10px;padding-right:10px}
  .menu-btn{width:42px;min-width:42px;height:42px}
  .page-title{min-width:0}
  .topbar h1{max-width:calc(100vw - 135px);font-size:18px}
  .top-actions{margin-left:auto}
  .content{padding:14px 10px 88px}
  .messages{padding-left:10px;padding-right:10px}
  .hero,.detail-hero,.rx-hero{padding:16px}
  .card{border-radius:13px}
  .section-head{padding:14px}
  .admin-users-metrics{grid-template-columns:1fr}
  .admin-users-filters{grid-template-columns:1fr;padding:13px}
  .admin-users-filters button,.admin-users-filters>a{width:100%}
  .admin-user-row{padding:13px}
  .admin-user-action form{grid-template-columns:1fr}
  .admin-user-action button{width:100%}
  .hospital-affiliation-metrics{grid-template-columns:1fr 1fr}
  .lifecycle-buttons{grid-template-columns:1fr 1fr}
  .affiliation-inline-action{grid-template-columns:1fr;min-width:0;width:100%}
  .affiliation-inline-action button,.affiliation-revoke-form,.affiliation-revoke-form button{width:100%}
  .affiliation-state-actions{display:grid;grid-template-columns:1fr;width:100%}
  .hospital-affiliation-policy{width:100%;flex-basis:auto}
  .recovery-body{padding:18px 10px}
  .recovery-card{padding:22px 18px;border-radius:15px}
  .recovery-card h1{font-size:23px}
  .recovery-brand small{display:none}
}
@media(max-width:430px){
  .hospital-affiliation-metrics{grid-template-columns:1fr}
  .lifecycle-buttons{grid-template-columns:1fr}
  .admin-user-identity{grid-template-columns:36px minmax(0,1fr)}
  .admin-user-avatar{width:36px;height:36px;border-radius:10px}
}
@media(pointer:coarse){
  .sidebar nav a,.primary,.secondary,.danger,button,a.logout,.lang a{min-height:46px}
  input,select,.control{min-height:48px}
}

/* Readability floor for authenticated interfaces */
.content small{font-size:11.5px!important;line-height:1.45}
.sidebar small{font-size:11.5px!important;line-height:1.4}
@media(max-width:820px){
  .content small{font-size:12px!important}
}


/* ==========================================================
   Pharmacy quote workspace · dual currency + ergonomics — Sep 2026
   ========================================================== */
.pharmacy-order-grid{
  grid-template-columns:minmax(0,1fr) 320px;
  gap:20px;
  align-items:start;
}
.order-main-stack{min-width:0}
.order-action-stack{
  position:sticky;
  top:96px;
  display:grid;
  gap:14px;
  align-self:start;
}
.order-action-stack .action-card{
  padding:19px 18px;
}
.order-action-stack .action-card h3{
  margin:6px 0 8px;
  font-size:18px;
  letter-spacing:-.015em;
}
.order-action-stack .action-card p{
  margin:0 0 14px;
  color:#657c87;
  font-size:12.5px;
  line-height:1.6;
}
.pharmacy-quote-workspace{
  overflow:hidden;
}
.quote-workspace-head{
  padding:20px 22px 17px;
  border-bottom:1px solid #e7edef;
}
.quote-workspace-head h2{
  margin:4px 0 5px;
  font-size:21px;
  letter-spacing:-.025em;
}
.quote-workspace-head p{
  margin:0;
  max-width:78ch;
  color:#627985;
  font-size:13px;
  line-height:1.58;
}
.quote-workspace-form{
  padding:18px 22px 22px;
}
.external-quote-context{
  margin:0 0 18px;
  padding:16px 17px;
  border-color:#d8e5e8;
  background:#f8fbfb;
}
.external-quote-context strong{font-size:14px}
.external-quote-context p{font-size:12.5px}
.quote-footer-fields.manual-total{
  grid-template-columns:minmax(260px,2fr) minmax(170px,.7fr) minmax(210px,1fr);
  gap:14px;
  align-items:start;
  margin-top:0;
}
.quote-footer-fields.manual-total .field-total_amount{grid-column:1}
.quote-footer-fields.manual-total .field-currency{grid-column:2}
.quote-footer-fields.manual-total .field-fulfillment_method{grid-column:3;min-width:0}
.quote-footer-fields.manual-total .field-delivery_address,
.quote-footer-fields.manual-total .field-notes{
  grid-column:1/-1;
}
.quote-footer-field{
  align-content:start;
  gap:7px;
}
.quote-footer-field>span{
  color:#496775;
  font-size:12.5px;
  font-weight:800;
}
.quote-footer-field .control{
  min-height:48px;
  border:1px solid #cfdee2;
  border-radius:10px;
  background:#fff;
  color:#1f4658;
  font-size:14.5px;
}
.quote-footer-field.field-total_amount input{
  font-size:16px;
  font-weight:750;
  font-variant-numeric:tabular-nums;
}
.quote-footer-field.field-currency select{
  font-weight:750;
  cursor:pointer;
}
.quote-footer-field .field-help{
  margin-top:0;
  color:#758991;
  font-size:11px!important;
  font-weight:500;
  line-height:1.4;
}
.quote-footer-field.field-delivery_address textarea,
.quote-footer-field.field-notes textarea{
  min-height:84px;
}
.quote-workspace-actions{
  margin-top:20px;
  padding-top:17px;
}
.quote-workspace-actions>span{
  max-width:58ch;
  font-size:12.5px;
  line-height:1.5;
}
.quote-workspace-actions .primary{
  min-width:245px;
  min-height:48px;
}

@media(max-width:1320px) and (min-width:1101px){
  .pharmacy-order-grid{
    grid-template-columns:minmax(0,1fr) 292px;
    gap:16px;
  }
}
@media(max-width:1100px){
  .pharmacy-order-grid{grid-template-columns:1fr}
  .order-action-stack{position:static;top:auto}
  .quote-footer-fields.manual-total{
    grid-template-columns:minmax(0,1.6fr) minmax(170px,.7fr);
  }
  .quote-footer-fields.manual-total .field-total_amount{grid-column:1}
  .quote-footer-fields.manual-total .field-currency{grid-column:2}
  .quote-footer-fields.manual-total .field-fulfillment_method,
  .quote-footer-fields.manual-total .field-delivery_address,
  .quote-footer-fields.manual-total .field-notes{grid-column:1/-1}
}
@media(max-width:700px){
  .quote-workspace-head{padding:16px}
  .quote-workspace-head h2{font-size:19px}
  .quote-workspace-form{padding:15px 16px 17px}
  .quote-footer-fields.manual-total{grid-template-columns:1fr}
  .quote-footer-fields.manual-total .field-total_amount,
  .quote-footer-fields.manual-total .field-currency,
  .quote-footer-fields.manual-total .field-fulfillment_method,
  .quote-footer-fields.manual-total .field-delivery_address,
  .quote-footer-fields.manual-total .field-notes{grid-column:1}
  .quote-workspace-actions{
    align-items:stretch;
    flex-direction:column;
  }
  .quote-workspace-actions .primary{width:100%;min-width:0}
}


/* ==========================================================
   Sidebar visual hierarchy & spacing refinement — Sep 2026
   Creates breathing room around the brand and distributes navigation
   ========================================================== */
.sidebar{
  padding:20px 16px 14px;
}

/* Brand zone: calm, distinct and visually separated from navigation */
.sidebar .manuscript-brand{
  gap:12px;
  padding:3px 5px 15px;
}
.sidebar .brand-symbol{
  width:44px;
  height:44px;
  flex:0 0 44px;
}
.sidebar .brand-copy strong{
  font-size:20px;
  line-height:1.05;
}
.sidebar .brand-copy small{
  margin-top:5px;
  max-width:178px;
  font-size:10.8px!important;
  line-height:1.35;
}

/* Product descriptor becomes a quiet label instead of a competing button */
.sidebar .product-label{
  margin:0 6px 0;
  padding:0 0 17px;
  border:0;
  border-bottom:1px solid rgba(255,255,255,.10);
  border-radius:0;
  background:transparent;
  color:#8fc8bd;
  font-size:10px;
  line-height:1.4;
  letter-spacing:.075em;
}

.sidebar .tenant-chip{
  margin:15px 5px 2px;
  padding:10px 11px;
}

/* Navigation gets its own breathing space and stronger section rhythm */
.sidebar nav{
  padding:13px 3px 18px 0;
}
.sidebar .nav-section{
  margin:16px 10px 8px;
  font-size:10px;
  letter-spacing:.12em;
}
.sidebar nav .nav-section:not(:first-child){
  margin-top:27px;
}
.sidebar nav a{
  min-height:48px;
  margin-bottom:5px;
  padding:7px 9px;
  gap:11px;
  border-radius:11px;
  font-size:13px;
  transition:background .15s ease,transform .15s ease,border-color .15s ease;
}
.sidebar nav a:hover{
  background:rgba(255,255,255,.065);
  transform:translateX(1px);
}
.sidebar nav a.active{
  box-shadow:inset 3px 0 0 #55d1bc;
}
.sidebar .nav-icon-wrap{
  width:32px!important;
  height:32px!important;
  flex-basis:32px;
}

/* Preserve compactness only when vertical space is genuinely constrained */
@media(max-height:760px) and (min-width:1101px){
  .sidebar{padding-top:11px;padding-bottom:9px}
  .sidebar .manuscript-brand{padding-bottom:8px}
  .sidebar .brand-symbol{width:38px;height:38px;flex-basis:38px}
  .sidebar .brand-copy strong{font-size:18px}
  .sidebar .brand-copy small{display:none}
  .sidebar .product-label{
    padding-bottom:9px;
    font-size:9.5px;
  }
  .sidebar .tenant-chip{margin-top:8px}
  .sidebar nav{padding-top:6px}
  .sidebar .nav-section{margin-top:9px;margin-bottom:5px}
  .sidebar nav .nav-section:not(:first-child){margin-top:14px}
  .sidebar nav a{
    min-height:40px;
    margin-bottom:2px;
    font-size:12.5px;
  }
  .sidebar .nav-icon-wrap{
    width:28px!important;
    height:28px!important;
    flex-basis:28px;
  }
}

@media(max-width:1100px), (max-width:1366px) and (pointer:coarse){
  .sidebar{
    padding-top:max(18px,env(safe-area-inset-top));
    padding-left:16px;
    padding-right:16px;
  }
  .sidebar nav a{min-height:48px}
}


/* ==========================================================
   Login page premium ergonomics refinement — Sep 2026
   Stronger brand presence, better visual balance and form rhythm
   ========================================================== */
.auth-login-shell{
  grid-template-columns:minmax(0,1.07fr) minmax(480px,.93fr);
}
.auth-login-shell .auth-visual{
  padding:42px clamp(48px,5.4vw,88px) 34px;
}
.auth-login-shell .auth-logo{
  width:min(650px,100%);
  margin-inline:auto;
  padding-left:clamp(14px,2.5vw,34px);
  gap:15px;
}
.auth-login-shell .auth-logo img{
  width:64px;
  height:64px;
  flex:0 0 64px;
  filter:drop-shadow(0 12px 26px rgba(0,0,0,.20));
}
.auth-login-shell .auth-logo strong{
  font-size:26px;
  letter-spacing:-.45px;
}
.auth-login-shell .auth-copy{
  width:min(650px,100%);
  margin:auto;
  padding:42px 0 52px;
}
.auth-login-shell .auth-copy .eyebrow{
  font-size:11.8px;
  letter-spacing:.105em;
}
.auth-login-shell .auth-copy h1{
  max-width:640px;
  margin:19px 0 22px;
  font-size:clamp(48px,4.25vw,64px);
  line-height:.99;
  letter-spacing:-.054em;
}
.auth-login-shell .auth-copy>p{
  max-width:610px;
  font-size:15.8px;
  line-height:1.68;
}
.auth-login-shell .auth-points{
  gap:12px;
  margin-top:33px;
}
.auth-login-shell .auth-points span{
  min-height:52px;
  padding:13px 15px;
  border-radius:12px;
  font-size:12.7px;
}
.auth-login-shell .auth-visual-footer{
  width:min(650px,100%);
  margin-inline:auto;
}
.auth-login-shell .auth-visual-footer span{font-size:12.3px}

/* Right panel: quieter background, stronger card hierarchy */
.auth-login-panel{
  padding:34px clamp(30px,4.8vw,68px);
  background:
    radial-gradient(circle at 50% 11%,rgba(255,255,255,.94),transparent 24rem),
    linear-gradient(180deg,#f4f8f9 0%,#edf3f5 100%);
}
.auth-login-wrap{
  width:min(492px,100%);
  gap:13px;
}
.auth-login-card{
  padding:34px 34px 31px;
  border-color:#d7e3e7;
  border-radius:24px;
  box-shadow:0 22px 64px rgba(8,40,57,.095);
}
.auth-login-header{margin-bottom:24px}
.auth-login-header .eyebrow{
  font-size:11px;
  letter-spacing:.09em;
}
.auth-login-header h2{
  margin:8px 0 7px;
  font-size:36px;
  letter-spacing:-.8px;
}
.auth-login-header p{
  max-width:40ch;
  font-size:13.7px;
  line-height:1.55;
}
.auth-login-form{gap:14px}
.auth-login-form label{gap:7px}
.auth-login-form label>span{font-size:12.8px}
.auth-login-form input{
  min-height:53px;
  padding:0 14px;
  border-radius:11px;
  font-size:15px;
}
.auth-recovery-link{
  justify-self:end;
  min-height:auto;
  margin:-4px 1px 1px;
  padding:2px 0 4px;
  color:#176c7f;
  font-size:12px;
  font-weight:750;
}
.auth-submit{
  min-height:52px;
  margin-top:2px;
  border-radius:11px;
  font-size:13.8px;
  box-shadow:0 10px 24px rgba(10,104,103,.18);
}
.auth-divider{
  margin:23px 0 16px;
  font-size:11px;
}
.login-register-polished{gap:11px}
.login-register-polished strong{font-size:13.5px}
.login-register-polished span{font-size:12.2px;line-height:1.45}
.login-register-polished .secondary{
  min-height:48px;
  border-radius:11px;
}
.auth-access-links{gap:9px;margin-top:3px}
.auth-upload-link,.auth-admin-link{
  min-height:66px;
  padding:11px 13px;
  border-radius:14px;
  background:rgba(255,255,255,.78);
  box-shadow:0 4px 14px rgba(8,40,57,.025);
}
.auth-upload-link:hover,.auth-admin-link:hover{
  border-color:#b7ced6;
  box-shadow:0 8px 20px rgba(8,40,57,.06);
}
.auth-access-icon{
  width:36px;
  height:36px;
  border-radius:10px;
}
.auth-upload-link strong,.auth-admin-link strong{font-size:12.8px}
.auth-upload-link small,.auth-admin-link small{font-size:11.6px!important}

@media(max-width:1280px){
  .auth-login-shell .auth-logo{
    padding-left:18px;
  }
  .auth-login-shell .auth-logo img{width:60px;height:60px;flex-basis:60px}
  .auth-login-shell .auth-logo strong{font-size:24px}
  .auth-login-shell .auth-copy h1{font-size:50px}
}
@media(max-width:900px){
  .auth-login-shell .auth-logo{
    width:100%;
    margin:0;
    padding-left:0;
  }
  .auth-login-shell .auth-logo img{width:52px;height:52px;flex-basis:52px}
  .auth-login-shell .auth-logo strong{font-size:22px}
  .auth-login-shell .auth-copy{
    width:100%;
    margin:26px 0 0;
    padding:0;
  }
  .auth-login-card{padding:29px 27px;border-radius:21px}
}
@media(max-width:600px){
  .auth-login-shell .auth-logo img{width:48px;height:48px;flex-basis:48px}
  .auth-login-shell .auth-logo strong{font-size:20px}
  .auth-login-card{padding:23px 19px;border-radius:18px}
  .auth-login-header h2{font-size:29px}
  .auth-recovery-link{justify-self:start;margin-top:-3px}
  .auth-upload-link,.auth-admin-link{min-height:62px}
}


/* ==========================================================
   Prescription clarification workflow — Sep 2026
   ========================================================== */
.status.clarification{
  background:#e8f3f8!important;
  color:#236b83!important;
  border-color:#c9e0e9!important;
}
.clarification-zone{
  padding:0!important;
  overflow:hidden;
  border-left:3px solid #3d8ca4;
}
.clarification-zone summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:64px;
  padding:13px 15px;
  cursor:pointer;
  color:#285f73;
}
.clarification-zone summary::-webkit-details-marker{display:none}
.clarification-zone summary>span{display:flex;flex-direction:column;min-width:0}
.clarification-zone summary strong{font-size:13px}
.clarification-zone summary small{color:#6e8792;font-size:11px!important}
.clarification-zone summary>b{font-size:16px;transition:transform .15s ease}
.clarification-zone[open] summary>b{transform:rotate(180deg)}
.clarification-zone-body{padding:14px 15px 16px;border-top:1px solid #e3edf0;background:#fbfdfd}
.clarification-zone-body p{margin:0 0 12px;color:#667d87;font-size:12px;line-height:1.55}
.clarification-zone-body form{display:grid;gap:11px}
.clarification-zone-body label{display:grid;gap:6px;color:#496a78;font-size:11.5px;font-weight:750}
.clarification-zone-body textarea{min-height:102px}
.clarification-submit{border-color:#bdd6df!important;color:#236b83!important;background:#f4fafc!important}
.clarification-waiting-card{border-left:3px solid #3d8ca4}
.clarification-waiting-card h3{color:#245a70}
.clarification-question{display:grid;gap:5px;margin-top:12px;padding:11px 12px;border:1px solid #d6e6eb;border-radius:10px;background:#f6fafb}
.clarification-question span{color:#6f8791;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.clarification-question strong{color:#315d6e;font-size:12.5px;line-height:1.5}

.prescription-clarification-card{
  display:grid;
  gap:15px;
  margin-bottom:18px;
  padding:20px 22px;
  border-left:4px solid #3186a0;
  background:linear-gradient(135deg,#f3fafc 0%,#fff 72%);
}
.clarification-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.clarification-card-head h2{margin:4px 0 0;font-size:20px;color:#184b61}
.clarification-request-copy{display:grid;gap:4px;padding:13px 14px;border:1px solid #d7e7ec;border-radius:11px;background:#fff}
.clarification-request-copy>span{color:#718891;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.045em}
.clarification-request-copy strong{color:#315967;font-size:13.5px;line-height:1.55}
.clarification-request-copy small{color:#81949c}
.clarification-correct-action{display:flex;justify-content:flex-end}
.revision-origin-banner{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:start;
  gap:8px 18px;
  margin-bottom:16px;
  padding:16px 18px;
  border-left:4px solid #3186a0;
  background:#f4fafc;
}
.revision-origin-banner>.eyebrow{grid-column:1/-1;color:#37768c}
.revision-origin-banner>div{display:flex;flex-direction:column;gap:3px}
.revision-origin-banner strong{color:#234f61;font-size:13.5px}
.revision-origin-banner span:not(.eyebrow){color:#607b86;font-size:12.5px;line-height:1.5}
.revision-origin-banner>small{grid-column:1/-1;color:#6d858f;font-size:11.5px!important}

.clinician-clarification-alert{
  margin-bottom:16px;
  overflow:hidden;
  border-left:4px solid #3186a0;
}
.clinician-clarification-alert>header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:17px 19px;
  border-bottom:1px solid #e3ecef;
  background:linear-gradient(135deg,#f2f9fb,#fff);
}
.clinician-clarification-alert h2{margin:4px 0 3px;font-size:19px}
.clinician-clarification-alert p{margin:0;color:#687f89;font-size:12px}
.clarification-count{display:grid;place-items:center;min-width:38px;height:38px;padding:0 10px;border-radius:11px;background:#dfeff4;color:#246b82;font-size:16px;font-weight:850}
.clinician-clarification-list{display:flex;flex-direction:column}
.clinician-clarification-list>a{display:grid;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:12px;min-height:65px;padding:11px 18px;border-bottom:1px solid #edf2f3;text-decoration:none}
.clinician-clarification-list>a:last-child{border-bottom:0}
.clinician-clarification-list>a:hover{background:#f9fcfd}
.clinician-clarification-list>a>div{display:flex;min-width:0;flex-direction:column}
.clinician-clarification-list strong{color:#284f60;font-size:12.8px}
.clinician-clarification-list div>span{margin-top:2px;color:#728791;font-size:11.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.clinician-clarification-list>a>b{color:#73909c}

@media(max-width:700px){
  .clarification-card-head{flex-direction:column}
  .clarification-correct-action .primary{width:100%}
  .revision-origin-banner{grid-template-columns:1fr;padding:14px}
  .clinician-clarification-alert>header{align-items:flex-start}
  .clinician-clarification-list>a{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px 14px}
  .clinician-clarification-list>a>b{display:none}
  .clinician-clarification-list div>span{white-space:normal}
}


/* Patient order rerouting after pharmacy refusal — Sep 2026 */
.patient-reroute-panel{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(310px,.72fr);
  gap:24px;
  align-items:center;
  padding:22px 24px;
  border-color:#cfe3df;
  background:linear-gradient(135deg,#f6fbf9 0%,#fff 72%);
}
.patient-reroute-copy h2{
  margin:5px 0 7px;
  color:#17485a;
  font-size:20px;
}
.patient-reroute-copy p{
  max-width:64ch;
  margin:0;
  color:#637b85;
  font-size:12.5px;
  line-height:1.55;
}
.patient-reroute-form{
  display:grid;
  gap:10px;
}
.patient-reroute-form label{
  display:grid;
  gap:6px;
  color:#3f6170;
  font-size:12px;
  font-weight:800;
}
.patient-reroute-form .control,
.patient-reroute-form select{
  width:100%;
  min-height:48px;
  border-radius:10px;
}
.patient-reroute-form .primary{
  min-height:48px;
  width:100%;
}
@media(max-width:820px){
  .patient-reroute-panel{
    grid-template-columns:1fr;
    gap:16px;
    padding:18px;
  }
}
@media(max-width:620px){
  .patient-reroute-panel{padding:16px}
  .patient-reroute-copy h2{font-size:18px}
  .patient-reroute-form .control,
  .patient-reroute-form select{font-size:16px}
}


/* ==========================================================
   Prescription review readability & ergonomics — Sep 2026
   ========================================================== */
.review-layout{
  grid-template-columns:minmax(0,1fr) 330px;
  gap:18px;
}
.review-main{gap:16px}
.review-side{gap:16px;top:106px}
.review-hero{
  padding:21px 22px;
  margin-bottom:17px;
}
.review-hero h2{
  font-size:25px;
  letter-spacing:-.02em;
}
.review-hero p{
  font-size:13.5px;
  line-height:1.5;
}
.review-hero .status.large{
  font-size:12.5px;
  padding:8px 13px;
}
.review-patient .section-head,
.review-medicines .section-head,
.review-interactions .section-head{
  padding:19px 20px 15px;
}
.review-patient .section-head h2,
.review-medicines .section-head h2,
.review-interactions .section-head h2{
  font-size:20px;
  letter-spacing:-.015em;
}
.review-patient-grid{
  gap:10px;
  padding:17px 19px 12px;
}
.review-patient-grid>div{
  min-height:70px;
  padding:12px 13px;
  border-radius:10px;
  gap:5px;
}
.review-patient-grid>div>span,
.review-regimen span{
  font-size:11.5px;
  line-height:1.25;
  letter-spacing:.025em;
}
.review-patient-grid>div>strong,
.review-regimen strong{
  font-size:15px;
  line-height:1.35;
}
.review-allergy{
  margin:0 19px 15px;
  padding:12px 13px;
  border-radius:10px;
  gap:5px;
}
.review-allergy b{
  font-size:11px;
  letter-spacing:.025em;
}
.review-allergy span{
  font-size:13px;
  line-height:1.5;
}
.review-diagnosis{
  margin:0 19px 18px;
  font-size:13.5px;
  line-height:1.55;
}
.review-med-list>article{
  grid-template-columns:34px minmax(0,1fr);
  gap:12px;
  padding:18px 20px;
}
.review-med-title h3{
  font-size:18px;
  line-height:1.25;
}
.review-med-body>p{
  margin:5px 0 11px;
  font-size:13.5px;
  line-height:1.5;
}
.review-regimen{
  gap:9px;
}
.review-regimen>div{
  min-height:64px;
  padding:10px 11px;
  border-radius:9px;
  gap:5px;
}
.review-instructions{
  margin-top:10px;
  font-size:13px;
  line-height:1.5;
}
.review-safe{
  margin:15px 18px 17px;
  padding:13px 14px;
  border-radius:10px;
}
.review-safe strong{font-size:14px}
.review-safe span{font-size:12.5px;line-height:1.5}
.review-interactions .interaction{
  margin:12px 18px;
}
.review-side>.card{
  padding:19px 18px;
}
.review-side h3{
  margin:7px 0 14px;
  font-size:17px;
  line-height:1.3;
}
.review-side dl div{
  padding:10px 0;
}
.review-side dt{
  font-size:10.5px;
  line-height:1.3;
  letter-spacing:.035em;
}
.review-side dd{
  margin:4px 0 0;
  font-size:13px;
  line-height:1.45;
}
.review-confirm-card p{
  font-size:13px;
  line-height:1.55;
}
.review-confirm-card form{
  gap:10px;
}
.review-confirm-card form label{
  gap:9px;
  padding:10px 11px;
  border-radius:9px;
  font-size:12.8px;
  line-height:1.45;
}
.review-confirm-card form input[type=checkbox]{
  width:17px;
  height:17px;
  flex:0 0 17px;
  margin-top:1px;
}
.review-confirm-card .primary,
.review-confirm-card .secondary{
  min-height:47px;
  font-size:13px;
}
.review-back{margin-top:9px}

@media(max-width:1180px){
  .review-layout{grid-template-columns:1fr}
  .review-side{
    position:static;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:760px){
  .review-side{grid-template-columns:1fr}
  .review-patient-grid,
  .review-regimen{grid-template-columns:repeat(2,minmax(0,1fr))}
  .review-patient-grid>div>strong,
  .review-regimen strong{font-size:14.5px}
}
@media(max-width:520px){
  .review-patient-grid,
  .review-regimen{grid-template-columns:1fr}
  .review-hero{align-items:flex-start;flex-direction:column}
  .review-med-list>article{padding:16px}
}


/* Prescription Express · ergonomic alignment pass 2026-09-06 */
.rx-stepper{
  display:grid;
  grid-template-columns:auto minmax(70px,1fr) auto minmax(70px,1fr) auto;
  align-items:center;
  gap:14px;
  padding:15px 18px;
  margin-bottom:18px;
}
.rx-step{display:flex;align-items:center;gap:11px;min-width:0}
.rx-stepper>i{width:100%;height:1px;background:#d8e5e9}
.rx-step strong{display:block;line-height:1.2}
.rx-step small{display:block;margin-top:2px;color:#7a8e99}

.rx-patient-card.form-card{
  padding:0;
  overflow:hidden;
  margin-bottom:18px;
}
.rx-patient-card .section-head{
  padding:25px 26px 18px;
  margin:0;
  border-bottom:1px solid #e5edef;
}
.rx-patient-card .section-head h2{margin-top:5px;font-size:21px}
.rx-context-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:17px 18px;
  padding:19px 22px 22px;
}
.rx-context-grid>label{
  display:grid;
  grid-template-rows:24px auto;
  gap:7px;
  align-content:start;
  min-width:0;
}
.rx-context-grid>label.span2{grid-template-rows:24px auto}
.rx-context-grid>label>span,
.rx-context-grid .patient-picker-label{
  min-height:24px;
  display:flex;
  align-items:center;
  margin:0;
  color:#355766;
  font-size:13px;
  font-weight:750;
  line-height:1.25;
}
.rx-context-grid .patient-picker-label{
  justify-content:space-between;
  gap:10px;
}
.patient-quick-add{
  min-height:30px;
  padding:0 10px;
  border:1px solid #cfe3e4;
  border-radius:999px;
  background:#f1f9f8;
  color:#0b776f;
  font-size:12px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
  text-decoration:none!important;
}
.patient-quick-add:hover{background:#e6f5f2;border-color:#b8d8d6}
.rx-context-grid select,
.rx-context-grid input,
.rx-context-grid textarea{
  min-height:48px;
  border-radius:10px;
}
.rx-context-grid textarea{min-height:92px}

.rx-safety-column .card{
  padding:20px 21px;
}
.rx-safety-column .card h3{margin:7px 0 7px;font-size:19px;line-height:1.22}
.rx-safety-column .card p{margin:0;line-height:1.58}
.rx-safety-column{gap:15px}

.rx-express-lines{
  margin-top:0;
  overflow:visible;
}
.rx-express-lines>.section-head{
  min-height:78px;
  padding:18px 20px;
  align-items:center;
}
.rx-express-lines>.section-head>div{min-width:0}
.rx-express-lines>.section-head #addItem,
.rx-express-lines>.section-head button{
  min-width:112px;
  min-height:44px;
  flex:0 0 auto;
}

/* Do not float the action bar over medication controls. */
.rx-express-footer{
  position:static;
  width:100%;
  margin:18px 0 0;
  padding:12px;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  background:#fff;
  border:1px solid var(--ms-line);
  border-radius:14px;
  box-shadow:var(--ms-shadow);
  backdrop-filter:none;
}
.rx-express-footer>*{
  width:auto;
  min-height:46px;
  margin:0;
}
.rx-express-footer .secondary{min-width:128px}
.rx-express-footer .primary{min-width:190px}

@media(max-width:1280px){
  .rx-context-grid{gap:15px;padding:18px 19px 20px}
  .rx-patient-card .section-head{padding:22px 22px 17px}
}
@media(max-width:820px){
  .rx-stepper{grid-template-columns:1fr;gap:9px;padding:14px}
  .rx-stepper>i{display:none}
  .rx-step{padding:3px 0}
  .rx-context-grid{grid-template-columns:1fr;padding:17px 16px 19px}
  .rx-context-grid>label.span2{grid-column:1}
  .rx-context-grid .patient-picker-label{align-items:center;flex-direction:row}
  .rx-express-footer{display:grid;grid-template-columns:1fr;margin-top:14px}
  .rx-express-footer>*{width:100%;min-width:0!important}
  .rx-safety-column{grid-template-columns:1fr}
}
@media(max-width:520px){
  .rx-context-grid .patient-picker-label{align-items:flex-start;flex-direction:column;height:auto;min-height:42px}
  .patient-quick-add{align-self:flex-start}
}

/* Prescription destination modes · patient direct or ManuScript pharmacy */
.rx-context-grid .field-help{
  margin-top:1px;
  color:#708792;
  font-size:11.5px!important;
  font-weight:500;
  line-height:1.45;
}
.rx-pharmacy-destination[hidden],.rx-patient-direct-note[hidden]{display:none!important}
.rx-patient-direct-note{
  padding:14px 15px;
  border:1px solid #cfe6e0;
  border-left:4px solid var(--ms-teal);
  border-radius:11px;
  background:#f2faf8;
}
.rx-patient-direct-note>div{display:grid;gap:4px}
.rx-patient-direct-note strong{font-size:13.5px;color:#155d55}
.rx-patient-direct-note span{font-size:12.5px;line-height:1.55;color:#55757a}
.review-direct-destination{
  display:grid;
  gap:4px;
  margin-top:14px;
  padding:12px 13px;
  border-radius:10px;
  background:#f0f8f6;
  border:1px solid #cfe5df;
}
.review-direct-destination strong{font-size:13px;color:#176b58}
.review-direct-destination span{font-size:12px;line-height:1.5;color:#5d747e}
.patient-direct-prescription{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  padding:20px 22px;
  margin-bottom:18px;
  border-left:4px solid var(--ms-teal);
}
.patient-direct-icon{
  display:grid;
  place-items:center;
  width:48px;height:48px;
  border-radius:13px;
  background:#e9f6f2;
  color:#0b776f;
  font-weight:900;
  font-size:14px;
}
.patient-direct-copy h2{margin:4px 0 5px;font-size:20px}
.patient-direct-copy p{margin:0;color:var(--ms-secondary);font-size:13px;line-height:1.55}
.patient-direct-copy small{display:block;margin-top:7px;color:#71858e}
.patient-direct-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:820px){
  .patient-direct-prescription{grid-template-columns:auto 1fr;align-items:start}
  .patient-direct-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;width:100%}
  .patient-direct-actions>*{width:100%}
}
@media(max-width:520px){
  .patient-direct-prescription{grid-template-columns:1fr;padding:17px}
  .patient-direct-icon{width:42px;height:42px}
  .patient-direct-actions{grid-template-columns:1fr}
}

/* Global typography legibility pass · 2026-09-06 */
.eyebrow,.nav-section,.product-label{font-size:12px}
.page-title .eyebrow{font-size:12px}
.topbar h1{font-size:25px}
.section-head h2,.patient-panel-head h2,.hospital-queue-head h2{font-size:20px}
.card h3,.quick-card h2{font-size:19px}

.primary,.secondary,.danger,button{
  font-size:14px;
  line-height:1.2;
}
.compact{font-size:13.5px}

input,select,textarea,.control,
.searchbar input,.filters input,.filters select,.medicine-search input,
.medicine-discovery-search input,.medicine-search-input{
  font-size:16px;
  line-height:1.35;
}
.control,.searchbar input,.filters input,.filters select,.medicine-search input{
  min-height:48px;
}
.searchbar input::placeholder,.medicine-search input::placeholder,
.medicine-discovery-search input::placeholder,.medicine-search-input::placeholder,
input::placeholder,textarea::placeholder{
  font-size:15px;
  color:#7b8f99;
  opacity:1;
}

.form-grid label,.upload-form label,.form-card form>label,
.onboarding-form-grid label,.auth-form form label,.patient-registration-card label,
.rx-context-grid>label>span,.rx-context-grid .patient-picker-label,
.smart-med-search label>span,.regimen-field>span,.instructions-field>span{
  font-size:14px;
  font-weight:700;
}
.rx-context-grid .field-help,
.rx-patient-direct-note span,
.review-direct-destination span{
  font-size:12.75px!important;
  line-height:1.55;
}
.rx-step strong{font-size:14px}
.rx-step small{font-size:13px!important}
.patient-safety-panel p,.workflow-note p{font-size:13.5px}
.rx-safety-column .card h3{font-size:20px}

.sidebar nav a{font-size:14px}
.tenant-chip strong{font-size:13.5px}
.tenant-chip span{font-size:11.5px}
.user-mini strong{font-size:13px}
.user-mini small{font-size:12.5px!important}
.logout{font-size:13px}
.brand-copy small{font-size:12px!important;line-height:1.4}

.tr{font-size:13.5px}
.tr.th{font-size:12px}
.metrics span{font-size:13px}
.status{font-size:12px}
.section-head>a{font-size:13.5px}
.quick strong{font-size:14px}
.quick small{font-size:13px!important}

.medicine-result-row{font-size:14px}
.medicine-result-row strong{font-size:14.5px}
.medicine-discovery-meta,.medicine-explore-tile small,
.medicine-result-name span,.medicine-result-name small,
.medicine-result-row>span,.medicine-result-row>div:nth-child(2)>span{
  font-size:13px;
}

@media(max-width:820px){
  body{font-size:16px}
  input,select,textarea,.control,.searchbar input,.filters input,.filters select,
  .medicine-search input,.medicine-discovery-search input,.medicine-search-input{font-size:16px}
  .sidebar nav a{font-size:14.5px}
}

/* Search bars and searchable selectors: explicit readable minimum */
.searchbar,.medicine-search,.medicine-discovery-search{font-size:16px}
.searchbar input,.medicine-search input,.medicine-discovery-search input,.medicine-search-input{
  min-height:50px;
  padding:11px 14px;
}
.searchbar button,.medicine-search button,.medicine-discovery-search button{min-height:48px;font-size:14px}

/* Prescription regimen · clinician-controlled duration and quantity */
.regimen-note{
  display:block;
  margin-top:5px;
  color:#6c818b;
  font-size:12.5px!important;
  font-weight:500!important;
  line-height:1.45;
}
.quantity-manual-note{
  margin-top:5px;
  padding:9px 10px;
  border:1px solid #dce8eb;
  border-radius:9px;
  background:#f7fafb;
  color:#607985;
  font-size:12.5px;
  line-height:1.45;
}
.quick-chips button[data-custom-duration="1"]{
  background:#fff;
  border-style:dashed;
  color:#0b776f;
  font-weight:800;
}
.quick-chips button[data-custom-duration="1"].on,
.quick-chips button[data-custom-duration="1"]:hover{
  background:#eaf7f4;
  color:#0b776f;
  border-color:#8fc7bd;
}
.quantity-field input::placeholder,
.regimen-field input::placeholder{font-size:14px}

/* =====================================================================
   ManuScript · Premium front-end system pass · 2026-09-06
   Front-end only: typography, spacing, controls, alignment, dropdowns,
   interaction states, paragraph rhythm and responsive polish.
   ===================================================================== */

:root{
  --ms-navy:#0d3549;
  --ms-navy-deep:#072a3b;
  --ms-teal:#0c7b72;
  --ms-teal-bright:#1aa38f;
  --ms-bg:#f3f7f8;
  --ms-card:#ffffff;
  --ms-text:#163846;
  --ms-secondary:#506a76;
  --ms-muted:#6a7f89;
  --ms-line:#d6e3e7;
  --ms-line-strong:#c8d9de;
  --ms-danger:#a43d50;
  --ms-warning:#8d6014;
  --ms-success:#176b58;
  --ms-info:#176b91;
  --ms-shadow-soft:0 1px 2px rgba(8,40,57,.035),0 8px 24px rgba(8,40,57,.055);
  --ms-shadow-card:0 1px 2px rgba(8,40,57,.035),0 14px 38px rgba(8,40,57,.07);
  --ms-shadow-float:0 16px 42px rgba(8,40,57,.13);
  --ms-radius:16px;
  --ms-radius-control:11px;
  --ms-focus:0 0 0 4px rgba(26,163,143,.14);
}

html{scroll-behavior:smooth}
body{
  color:var(--ms-text);
  background:
    radial-gradient(circle at 84% -10%,rgba(26,163,143,.045),transparent 29rem),
    linear-gradient(180deg,#f5f8f9 0%,var(--ms-bg) 100%);
  font-feature-settings:"kern" 1,"liga" 1,"calt" 1;
}

/* Typography: stronger contrast, clearer hierarchy, controlled line length */
h1,h2,h3,h4{
  color:var(--ms-text);
  letter-spacing:-.018em;
  text-wrap:balance;
}
h1{letter-spacing:-.032em}
h2{letter-spacing:-.024em}
h3{letter-spacing:-.016em}
p{
  color:var(--ms-secondary);
  line-height:1.68;
}
.content p{
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
  -webkit-hyphens:auto;
}
.content .empty-state p,
.content .patient-empty-state p,
.content .courier-empty p,
.content [style*="text-align:center"] p{
  text-align:center;
}
.auth-copy>p,
.professional-onboarding-copy>p,
.patient-onboarding-copy>p,
.onboarding-intro p,
.account-type-card p,
.public-upload p,
.verify-card p,
.recovery-card>p{
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
  -webkit-hyphens:auto;
}
small,.field-help,.regimen-note{color:#667d88}
.eyebrow,.nav-section,.product-label{
  font-weight:850;
  letter-spacing:.105em;
}
.page-title h1{
  margin:2px 0 0;
  color:#123b50;
  font-weight:820;
}
.section-head h2,.card h2,.card h3{font-weight:790}

/* Shell: sharper spatial hierarchy without visual noise */
.sidebar{
  background:
    radial-gradient(circle at 12% 0%,rgba(49,170,146,.14),transparent 19rem),
    linear-gradient(180deg,#082c3e 0%,#0a3449 58%,#0b3a4f 100%);
  border-right:1px solid rgba(255,255,255,.055);
  box-shadow:12px 0 35px rgba(4,31,45,.07);
}
.sidebar nav a{
  color:#c7d9e0;
  border:1px solid transparent;
}
.sidebar nav a:hover{
  color:#fff;
  border-color:rgba(255,255,255,.055);
  background:rgba(255,255,255,.075);
}
.sidebar nav a.active{
  color:#fff;
  background:linear-gradient(90deg,rgba(30,139,126,.28),rgba(255,255,255,.065));
  border-color:rgba(98,211,190,.14);
  box-shadow:inset 3px 0 0 #55d1bc,0 8px 20px rgba(0,0,0,.055);
}
.sidebar nav a.active .nav-icon-wrap{
  background:linear-gradient(135deg,#138a7d,#1aa38f);
  box-shadow:0 5px 14px rgba(10,119,111,.23);
}
.tenant-chip{
  border-color:rgba(255,255,255,.11);
  background:rgba(255,255,255,.045);
}

.topbar{
  min-height:82px;
  gap:18px;
  background:rgba(248,250,251,.91);
  border-bottom:1px solid rgba(202,218,223,.86);
  box-shadow:0 1px 0 rgba(255,255,255,.86),0 6px 18px rgba(8,40,57,.035);
}
.page-title{min-width:0}
.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.secure-badge{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 11px;
  border:1px solid #d7e7e3;
  border-radius:999px;
  background:#f5faf8;
  color:#3f675e;
  font-size:11.5px;
  font-weight:750;
  white-space:nowrap;
}
.secure-badge i{width:8px;height:8px}
.lang{
  min-height:40px;
  display:flex;
  align-items:center;
  padding:3px;
  border:1px solid var(--ms-line);
  border-radius:11px;
  background:#eef3f5;
  box-shadow:inset 0 1px 1px rgba(8,40,57,.025);
}
.lang a{
  min-width:39px;
  min-height:34px;
  display:grid;
  place-items:center;
  padding:0 8px;
  border-radius:8px;
  color:#657d87;
  font-size:12px;
  font-weight:800;
  transition:background .16s ease,color .16s ease,box-shadow .16s ease;
}
.lang a:hover{color:#234f61;background:rgba(255,255,255,.72)}
.lang a.on{
  color:#134d5f;
  background:#fff;
  box-shadow:0 2px 7px rgba(8,40,57,.08);
}

.content{
  max-width:1560px;
  padding-top:30px;
}
.app-footer{
  color:#758a93;
  border-top-color:#d8e4e8;
}

/* Cards: premium depth, consistent borders, cleaner hierarchy */
.card,
.metrics article{
  border:1px solid var(--ms-line);
  background:rgba(255,255,255,.985);
  box-shadow:var(--ms-shadow-soft);
}
.card{border-radius:var(--ms-radius)}
.hero,.detail-hero,.rx-hero,.review-hero{
  border-color:#d3e2e6;
  background:
    radial-gradient(circle at 100% 0%,rgba(26,163,143,.045),transparent 22rem),
    #fff;
  box-shadow:var(--ms-shadow-card);
}
.metrics article{
  position:relative;
  overflow:hidden;
}
.metrics article:before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:3px;
  background:linear-gradient(180deg,#1aa38f,#2a718d);
  opacity:.72;
}
.quick,.medicine-card,.patient-priority-card,.account-type-card,.action-card{
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.quick:hover,.medicine-card:hover,.patient-priority-card:hover,.account-type-card:hover,.action-card:hover{
  transform:translateY(-1px);
  border-color:#c6dce1;
  box-shadow:var(--ms-shadow-card);
}

/* Section headers: enforce horizontal/vertical alignment discipline */
.section-head,
.hero,.detail-hero,.rx-hero,.review-hero,
.form-card footer,
.sticky-form-footer,
.rx-actions,
.issue-form,
.send-rx-form,
.quick-patient-actions,
.quote-workspace-actions{
  align-items:center;
}
.section-head{
  min-height:72px;
  gap:16px;
  padding:18px 20px;
}
.section-head>div:first-child{min-width:0}
.section-head>:is(a,button,.primary,.secondary,.danger){
  flex:0 0 auto;
  align-self:center;
  margin-block:0;
}
.section-head p{margin-top:5px;max-width:78ch}

/* Buttons: consistent height, optical alignment and interaction feedback */
button,
.primary,.secondary,.danger,
a.primary,a.secondary,a.danger{
  min-height:46px;
  padding-inline:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:11px;
  line-height:1.15;
  font-weight:760;
  vertical-align:middle;
  text-decoration:none;
  transition:transform .14s ease,box-shadow .14s ease,background .14s ease,border-color .14s ease,color .14s ease;
}
.primary,a.primary{
  border:1px solid rgba(7,82,91,.13);
  background:linear-gradient(135deg,#155269 0%,#0c786f 100%);
  color:#fff;
  box-shadow:0 7px 18px rgba(9,92,95,.16);
}
.primary:hover,a.primary:hover{
  transform:translateY(-1px);
  background:linear-gradient(135deg,#124c62 0%,#096d66 100%);
  box-shadow:0 10px 24px rgba(9,92,95,.22);
}
.secondary,a.secondary{
  border:1px solid #cddde2;
  background:linear-gradient(180deg,#fff,#fbfcfd);
  color:#2f586a;
  box-shadow:0 2px 6px rgba(8,40,57,.035);
}
.secondary:hover,a.secondary:hover{
  transform:translateY(-1px);
  border-color:#abc9d2;
  background:#f6fafb;
  color:#194e62;
  box-shadow:0 6px 14px rgba(8,40,57,.07);
}
.danger,a.danger{
  border:1px solid #9e394b;
  background:linear-gradient(180deg,#ad4457,#9f394c);
  box-shadow:0 7px 16px rgba(164,61,80,.14);
}
button:active,.primary:active,.secondary:active,.danger:active{transform:translateY(0)}
button:disabled,.primary:disabled,.secondary:disabled,.danger:disabled,
button[aria-disabled="true"]{
  opacity:.52;
  cursor:not-allowed;
  transform:none!important;
  box-shadow:none!important;
}
.compact{min-height:42px;padding-inline:14px}

/* Form controls: more legible, more tactile, consistent geometry */
input,select,textarea,.control,
.searchbar input,.filters input,.filters select,.medicine-search input,
.medicine-discovery-search input,.medicine-search-input{
  min-height:48px;
  border:1px solid #cddce1;
  border-radius:var(--ms-radius-control);
  background-color:#fff;
  color:#1c4657;
  box-shadow:inset 0 1px 2px rgba(8,40,57,.025);
  transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease;
}
input:hover,select:hover,textarea:hover,.control:hover{
  border-color:#b7ced5;
}
input:focus,select:focus,textarea:focus,.control:focus{
  border-color:#64a99d!important;
  box-shadow:var(--ms-focus),inset 0 1px 2px rgba(8,40,57,.02)!important;
  outline:none;
}
input::placeholder,textarea::placeholder{
  color:#748994;
  opacity:1;
  font-weight:450;
}
input:disabled,select:disabled,textarea:disabled,.control:disabled{
  color:#71838b;
  background:#f2f5f6;
  border-color:#dbe5e8;
  cursor:not-allowed;
}
textarea{padding:12px 13px;line-height:1.58}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]){padding-inline:13px}

/* Refined native select: preserve semantics, replace primitive browser arrow */
select:not([multiple]){
  -webkit-appearance:none;
  appearance:none;
  cursor:pointer;
  padding-left:13px;
  padding-right:44px!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m7 9.5 5 5 5-5' stroke='%233b6272' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:18px 18px;
}
select:not([multiple]):hover{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m7 9.5 5 5 5-5' stroke='%231a6675' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
select:not([multiple]):focus{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m7 9.5 5 5 5-5' stroke='%230c7b72' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
select:not([multiple]):disabled{
  cursor:not-allowed;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m7 9.5 5 5 5-5' stroke='%2394a5ac' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
select option{color:#1d4555;background:#fff}

input[type="checkbox"],input[type="radio"]{
  width:17px;
  height:17px;
  min-height:17px;
  accent-color:var(--ms-teal);
}

/* Labels and field rhythm */
.form-grid,.onboarding-form-grid,.rx-context-grid,.medicine-filter-grid{
  align-items:start;
}
.form-grid label,.upload-form label,.form-card form>label,
.onboarding-form-grid label,.auth-form form label,
.patient-registration-card label,.rx-context-grid>label{
  gap:7px;
  line-height:1.35;
}
.form-grid label>span,.onboarding-form-grid label>span,
.rx-context-grid>label>span,.smart-med-search label>span,
.regimen-field>span,.instructions-field>span{
  min-height:20px;
  display:flex;
  align-items:flex-end;
  color:#3e5e6c;
}
.field-help,.regimen-note{
  margin-top:2px;
  line-height:1.48;
}

/* Tables/list rows: optical alignment, hierarchy, hover readability */
.table{border-radius:0 0 var(--ms-radius) var(--ms-radius)}
.tr{
  align-items:center;
  line-height:1.42;
  border-color:#e7eef0;
}
.tr>*{min-width:0}
.tr:not(.th):hover{background:#f8fbfc}
.tr.th{
  color:#607782;
  background:#f6f9fa;
  border-bottom:1px solid #dfe9ec;
}
.tr strong{color:#254d5f;font-weight:720}

/* Status chips: calmer, more polished */
.status,.pill{
  border:1px solid transparent;
  border-radius:999px;
  line-height:1.15;
}
.status{font-weight:780}
.status.issued,.status.accepted,.status.ready,.status.dispensed,.status.completed{border-color:#cfe7dc}
.status.draft,.status.received,.status.review,.status.quoted{border-color:#eeddb8}
.status.preparing,.status.delivery{border-color:#cfe0e8}
.status.revoked,.status.rejected,.status.expired{border-color:#ebccd3}

/* Prescription workspace: premium clinical focus */
.rx-stepper{
  border-color:#d5e3e7;
  box-shadow:var(--ms-shadow-soft);
}
.rx-step>span{
  box-shadow:inset 0 0 0 1px rgba(20,84,102,.06);
}
.rx-step.active>span{
  background:linear-gradient(135deg,#155b70,#0c7b72);
  box-shadow:0 0 0 4px rgba(12,123,114,.10),0 6px 14px rgba(12,91,99,.12);
}
.rx-patient-card,.rx-express-lines{box-shadow:var(--ms-shadow-card)}
.rx-patient-card .section-head,.rx-express-lines>.section-head{
  background:linear-gradient(180deg,#fff,#fbfdfd);
}
.rx-express-lines>.section-head{
  position:sticky;
  top:82px;
  z-index:12;
  border-radius:var(--ms-radius) var(--ms-radius) 0 0;
  box-shadow:0 8px 18px rgba(8,40,57,.045);
}
.rx-express-lines>.section-head #addItem{
  min-width:118px;
  border-color:#b9d4db;
  background:#fff;
  color:#164f63;
  box-shadow:0 4px 12px rgba(8,40,57,.055);
}
.rx-express-lines>.section-head #addItem:hover{
  border-color:#8ebbc3;
  background:#f1f8f8;
}
.rx-express-lines .interaction-sticky{top:164px}
.smart-rx-item{
  background:#fff;
}
.smart-rx-item+.smart-rx-item{
  border-top:1px solid #dfe9ec;
}
.rx-item-head{
  align-items:center;
}
.rx-med-number{
  background:linear-gradient(135deg,#e5f3f4,#eaf3f7);
  color:#205f70;
  box-shadow:inset 0 0 0 1px #d6e7ea;
}
.item-delete-btn{
  min-height:36px;
  border-color:#e2c7ce;
  background:#fff;
  color:#9f3e50;
  box-shadow:none;
}
.item-delete-btn:hover{
  transform:none;
  border-color:#d8aeb8;
  background:#fff4f6;
  box-shadow:none;
}
.medicine-search-shell .control,
.medicine-search-input{
  box-shadow:inset 0 1px 2px rgba(8,40,57,.025),0 1px 0 rgba(255,255,255,.7);
}
.medicine-results{
  border-color:#c6dbe1;
  border-radius:12px;
  box-shadow:var(--ms-shadow-float);
  overflow:hidden auto;
}
.medicine-result{
  min-height:58px;
  transition:background .12s ease;
}
.medicine-result:hover{background:#f1f8f8}
.manual-med-fallback{border-color:#d5e4e8!important;background:#fbfdfd!important}
.interaction-live{
  border-radius:11px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}
.patient-safety-panel,.workflow-note{
  box-shadow:var(--ms-shadow-soft);
}
.rx-express-footer{
  box-shadow:var(--ms-shadow-card);
}

/* Search/filter bars */
.searchbar,.filters,.medicine-search,.medicine-discovery-search{
  align-items:center;
}
.searchbar,.filters{
  padding:12px;
  border:1px solid var(--ms-line);
  border-radius:13px;
  background:#fff;
  box-shadow:var(--ms-shadow-soft);
}
.searchbar input,.filters input,.filters select{
  margin:0;
}

/* Empty states and notices */
.empty-state,.patient-empty-state{
  color:#657c87;
}
.empty-state>span,.patient-empty-state>span{
  filter:saturate(.82);
}
.workflow-notice,.verification-callout,.clinical-warning{
  border-radius:11px;
}

/* Mobile and tablet: preserve touch comfort and alignment */
@media(max-width:1100px){
  .topbar{min-height:76px}
  .rx-express-lines>.section-head{top:76px}
  .rx-express-lines .interaction-sticky{top:158px}
}
@media(max-width:820px){
  .content{padding-top:20px}
  .topbar{min-height:72px}
  .secure-badge{display:none}
  .section-head{
    min-height:0;
    align-items:flex-start;
  }
  .section-head>:is(a,button,.primary,.secondary,.danger){align-self:flex-start}
  .rx-express-lines>.section-head{top:72px}
  .rx-express-lines .interaction-sticky{top:145px}
  .rx-express-lines>.section-head #addItem{min-height:42px}
  input,select,textarea,.control{font-size:16px}
}
@media(max-width:600px){
  .content{padding-top:15px}
  .topbar{min-height:66px;gap:9px}
  .lang{min-height:38px}
  .lang a{min-width:36px;min-height:32px}
  .section-head{gap:10px}
  .section-head>div{width:100%}
  .hero,.detail-hero,.rx-hero,.review-hero{gap:13px}
  .card{border-radius:14px}
  .rx-express-lines>.section-head{
    top:66px;
    padding:13px 14px;
  }
  .rx-express-lines>.section-head #addItem{
    min-width:0;
    width:auto;
    align-self:flex-start;
  }
  .rx-express-lines .interaction-sticky{top:132px}
  .searchbar,.filters{padding:9px}
  button,.primary,.secondary,.danger,a.primary,a.secondary,a.danger{min-height:46px}
}
@media(max-width:480px){
  .topbar{padding-inline:9px}
  .page-title h1{font-size:18px}
  .rx-express-lines>.section-head #addItem{width:100%}
}

/* Premium pass · final utility alignment */
.searchbar>button:not(.medicine-search-submit){
  min-width:118px;
  border:1px solid rgba(7,82,91,.13);
  background:linear-gradient(135deg,#155269,#0c786f);
  color:#fff;
  box-shadow:0 6px 16px rgba(9,92,95,.14);
}
.searchbar>button:not(.medicine-search-submit):hover{
  background:linear-gradient(135deg,#124c62,#096d66);
  box-shadow:0 9px 20px rgba(9,92,95,.19);
}
.filters>button:not(.primary):not(.secondary):not(.danger){
  min-width:104px;
  border:1px solid #cddde2;
  background:linear-gradient(180deg,#fff,#f8fbfc);
  color:#2f586a;
  box-shadow:0 2px 6px rgba(8,40,57,.035);
}
.filters>button:not(.primary):not(.secondary):not(.danger):hover{
  border-color:#abc9d2;
  background:#f3f8f9;
  color:#194e62;
}

@media(max-width:600px){
  /* Full justification is excellent on wider clinical surfaces; narrow phones
     use ragged-right text to avoid exaggerated word spacing. */
  .content p,
  .auth-copy>p,
  .professional-onboarding-copy>p,
  .patient-onboarding-copy>p,
  .onboarding-intro p,
  .account-type-card p,
  .public-upload p,
  .verify-card p,
  .recovery-card>p{
    text-align:left;
    hyphens:none;
    -webkit-hyphens:none;
  }
  .searchbar>button,.filters>button{min-width:0}
}


/* ==========================================================
   Button contrast correction · 2026-09-06
   Prevent generic button flex rules and muted small text from
   making compound CTA labels look faded.
   ========================================================== */
.quick{
  display:grid;
  grid-template-columns:1fr;
  align-content:center;
  gap:4px;
  min-height:72px;
  padding:13px 15px;
  text-align:left;
}
.quick strong,
.quick b{
  display:block;
  line-height:1.3;
}
.quick small{
  display:block;
  margin:0;
  line-height:1.4;
  opacity:1;
}
.quick.primary{
  display:grid;
  align-items:center;
  justify-items:start;
  min-height:72px;
  padding:13px 15px;
  text-align:left;
}
.quick.primary strong,
.quick.primary b,
.quick.primary span{
  color:#ffffff!important;
  opacity:1!important;
}
.quick.primary small{
  color:rgba(255,255,255,.88)!important;
  opacity:1!important;
  font-weight:520;
}

/* Preserve readable contrast for any compound primary/danger action. */
.primary strong,.primary b,.primary span,
a.primary strong,a.primary b,a.primary span{
  color:#ffffff!important;
  opacity:1!important;
}
.primary small,a.primary small{
  color:rgba(255,255,255,.88)!important;
  opacity:1!important;
}
.danger strong,.danger b,.danger span,
a.danger strong,a.danger b,a.danger span{
  color:#ffffff!important;
  opacity:1!important;
}
.danger small,a.danger small{
  color:rgba(255,255,255,.88)!important;
  opacity:1!important;
}

/* Secondary actions should never resemble disabled controls. */
.secondary,.secondary strong,.secondary b,.secondary span,
a.secondary,a.secondary strong,a.secondary b,a.secondary span{
  opacity:1;
}
.secondary small,a.secondary small{
  color:#5d7580!important;
  opacity:1!important;
}


/* ==========================================================
   Patient dashboard mobile emergency fix · 2026-09-06
   Fixes hero copy collapsing into a few pixels on phones after
   later desktop grid rules overrode the legacy responsive rule.
   ========================================================== */
.card{overflow-wrap:break-word}

@media(max-width:1050px){
  .patient-dashboard-hero{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:14px!important;
  }
  .patient-dashboard-hero-copy,
  .patient-dashboard-hero-actions{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .patient-dashboard-hero-copy .eyebrow,
  .patient-dashboard-hero-copy h2,
  .patient-dashboard-hero-copy p{
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    word-break:normal!important;
    overflow-wrap:break-word!important;
  }
  .patient-dashboard-hero-actions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .patient-dashboard-hero-actions>a{
    width:100%!important;
    min-width:0!important;
  }
}

@media(max-width:680px){
  .patient-dashboard-hero{
    padding:15px!important;
    gap:12px!important;
  }
  .patient-dashboard-hero-copy{
    display:block!important;
  }
  .patient-dashboard-hero-copy .eyebrow{
    display:block!important;
    margin-bottom:6px!important;
    white-space:normal!important;
  }
  .patient-dashboard-hero-copy h2{
    margin:0 0 8px!important;
    font-size:20px!important;
    line-height:1.22!important;
    letter-spacing:-.018em!important;
    text-wrap:pretty!important;
  }
  .patient-dashboard-hero-copy p{
    margin:0!important;
    font-size:13px!important;
    line-height:1.58!important;
    text-align:left!important;
    hyphens:none!important;
  }
  .patient-dashboard-hero-actions{
    grid-template-columns:minmax(0,1fr)!important;
    gap:9px!important;
  }
  .patient-dashboard-hero-actions>a{
    min-height:50px!important;
    grid-template-columns:34px minmax(0,1fr)!important;
  }
  .patient-dashboard-hero-actions b{
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:break-word!important;
  }

  .patient-summary-grid,
  .patient-priority-actions,
  .patient-dashboard-grid{
    width:100%!important;
    min-width:0!important;
  }
}

@media(max-width:440px){
  .patient-dashboard-hero{
    padding:14px!important;
  }
  .patient-dashboard-hero-copy h2{
    font-size:19px!important;
  }
}


/* ==========================================================
   Mobile/tablet select rendering fix · 2026-09-06
   Samsung Internet / Android: prevent custom chevron background
   from tiling across native select controls.
   ========================================================== */
select:not([multiple]){
  background-repeat:no-repeat!important;
  background-position:right 14px center!important;
  background-size:18px 18px!important;
}

@media(max-width:820px), (pointer:coarse){
  select:not([multiple]),
  .public-upload select,
  .external-upload-form select,
  .form-card select,
  .patient-pharmacy-form select,
  .upload-form select{
    -webkit-appearance:menulist!important;
    appearance:auto!important;
    background-image:none!important;
    background-repeat:no-repeat!important;
    background-position:right 12px center!important;
    background-size:0 0!important;
    padding-right:14px!important;
    min-height:50px!important;
    line-height:1.35!important;
  }
}


/* ==========================================================
   Prescription patient quick-add visibility fix · 2026-09-06
   Keep “Nouveau patient” available on new/edit prescription views,
   with explicit mobile placement and contrast.
   ========================================================== */
.patient-picker-label .patient-quick-add{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  visibility:visible!important;
  opacity:1!important;
  flex:0 0 auto!important;
  color:#0b776f!important;
}

@media(max-width:820px){
  .rx-context-grid .patient-picker-label{
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    align-items:center!important;
    justify-content:space-between!important;
    flex-direction:row!important;
    gap:10px!important;
  }
  .patient-picker-label .patient-quick-add{
    min-height:34px!important;
    padding:0 11px!important;
    border:1px solid #b9d8d5!important;
    border-radius:999px!important;
    background:#edf8f6!important;
    font-size:12px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
}

@media(max-width:520px){
  .rx-context-grid .patient-picker-label{
    align-items:flex-start!important;
    flex-direction:column!important;
    min-height:0!important;
  }
  .patient-picker-label .patient-quick-add{
    width:auto!important;
    align-self:flex-start!important;
    margin-top:2px!important;
  }
}


/* ==========================================================
   Prescription patient quick-add mobile row fix · 2026-09-06
   The label row was constrained to 24px, clipping the button on phones.
   ========================================================== */
.patient-picker-field{
  grid-template-rows:auto auto!important;
  overflow:visible!important;
}
.patient-picker-field>.patient-picker-label{
  height:auto!important;
  min-height:34px!important;
  overflow:visible!important;
}

@media(max-width:820px){
  .patient-picker-field{
    grid-template-rows:auto auto!important;
    gap:8px!important;
  }
}

@media(max-width:520px){
  .patient-picker-field{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    gap:8px!important;
  }
  .patient-picker-field>.patient-picker-label{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-height:0!important;
    gap:7px!important;
    overflow:visible!important;
  }
  .patient-picker-field>.patient-picker-label .patient-quick-add{
    display:inline-flex!important;
    position:static!important;
    z-index:2!important;
    width:auto!important;
    max-width:100%!important;
    min-height:38px!important;
    padding:0 12px!important;
    margin:0 0 2px!important;
    border:1px solid #9fcfc8!important;
    border-radius:10px!important;
    background:#eaf7f4!important;
    color:#0a6e67!important;
    font-size:13px!important;
    font-weight:800!important;
    line-height:1!important;
    white-space:nowrap!important;
    visibility:visible!important;
    opacity:1!important;
  }
  .patient-picker-field>select,
  .patient-picker-field>.control{
    width:100%!important;
    grid-row:auto!important;
  }
}
