/* ==========================================================================
   URG360 — Prescription Premium
   Refonte additive du moteur de prescription hospitalière.
   Aucune logique métier n'est modifiée par cette feuille.
   ========================================================================== */

#v26PrescriptionLabView.v26-patient-focus #v26TabPrescriptions{
  --rx-bg:#f4f6f8;
  --rx-surface:#ffffff;
  --rx-surface-soft:#f8fafb;
  --rx-line:#d9e1e7;
  --rx-line-strong:#c7d2db;
  --rx-ink:#172b3a;
  --rx-muted:#6b7d8a;
  --rx-accent:#176ea6;
  --rx-accent-strong:#0e5c91;
  --rx-accent-soft:#edf6fb;
  --rx-success:#24744c;
  --rx-warning:#9b6612;
  --rx-danger:#a63a3a;
  background:var(--rx-bg);
  padding:12px 14px 24px!important;
  color:var(--rx-ink);
}

#v26TabPrescriptions .v115-rx-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  margin:0 0 12px;
  padding:16px 18px;
  border:1px solid var(--rx-line);
  border-radius:18px;
  background:
    radial-gradient(circle at 92% 18%,rgba(23,110,166,.08),transparent 28%),
    linear-gradient(145deg,#fff 0%,#f8fbfd 100%);
  box-shadow:0 7px 24px rgba(22,48,68,.06);
}
#v26TabPrescriptions .v115-rx-hero-copy{min-width:0}
#v26TabPrescriptions .v115-rx-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-bottom:4px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--rx-accent);
}
#v26TabPrescriptions .v115-rx-eyebrow::before{
  content:"";
  width:7px;height:7px;border-radius:50%;
  background:var(--rx-accent);
  box-shadow:0 0 0 4px rgba(23,110,166,.10);
}
#v26TabPrescriptions .v115-rx-hero h3{
  margin:0;
  font-size:21px;
  line-height:1.15;
  letter-spacing:-.02em;
  color:#102d42;
}
#v26TabPrescriptions .v115-rx-hero p{
  margin:5px 0 0;
  color:var(--rx-muted);
  font-size:11px;
  line-height:1.45;
}
#v26TabPrescriptions .v115-rx-hero-side{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
#v26TabPrescriptions .v115-rx-stat{
  min-width:92px;
  padding:9px 11px;
  border:1px solid var(--rx-line);
  border-radius:13px;
  background:rgba(255,255,255,.88);
  text-align:left;
}
#v26TabPrescriptions .v115-rx-stat strong{
  display:block;
  font-size:19px;
  line-height:1;
  color:#17364b;
}
#v26TabPrescriptions .v115-rx-stat span{
  display:block;
  margin-top:4px;
  font-size:9px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.045em;
  color:#7a8a96;
}
#v26TabPrescriptions .v115-rx-jumps{
  display:flex;
  gap:6px;
  margin-left:4px;
}
#v26TabPrescriptions .v115-rx-jumps button{
  border:1px solid var(--rx-line);
  border-radius:999px;
  background:#fff;
  color:#365369;
  padding:7px 10px;
  font-size:10px;
  font-weight:850;
  cursor:pointer;
}
#v26TabPrescriptions .v115-rx-jumps button:hover{
  border-color:#93b8d1;
  background:#f5faff;
  color:var(--rx-accent-strong);
}

/* Sections */
#v26TabPrescriptions>.v26-section,
#v26TabPrescriptions>.v26-prescriptions-past{
  border:1px solid var(--rx-line)!important;
  border-radius:18px!important;
  background:var(--rx-surface)!important;
  box-shadow:0 5px 18px rgba(22,48,68,.045)!important;
  overflow:hidden;
}
#v26TabPrescriptions>.v26-section{margin:0 0 12px!important}
#v26TabPrescriptions>.v26-section>.v26-section-head{
  min-height:52px;
  padding:11px 16px!important;
  border-bottom:1px solid #e5ebef!important;
  background:linear-gradient(180deg,#fff 0%,#fbfcfd 100%)!important;
}
#v26TabPrescriptions>.v26-section>.v26-section-head h4{
  margin:0;
  font-size:14px;
  letter-spacing:-.01em;
  color:#153349;
}
#v26TabPrescriptions>.v26-section>.v26-section-head .mini{
  color:#7b8b97;
  font-size:10px;
}
#v26TabPrescriptions>.v26-section>.v26-section-body{
  padding:14px!important;
}

/* Créateur de prescription : catalogue / composition */
#v26TabPrescriptions .v26-prescription-create-section>.v26-section-head{
  background:
    linear-gradient(90deg,rgba(23,110,166,.05),transparent 42%),
    #fff!important;
}
#v26TabPrescriptions .v26-prescription-create-section>.v26-section-body{
  display:grid!important;
  grid-template-columns:minmax(285px,.72fr) minmax(0,1.45fr);
  column-gap:18px;
  row-gap:10px;
  align-items:start;
}
#v26TabPrescriptions .v26-prescription-create-section>.v26-section-body>.v26-prescription-sticky-tools,
#v26TabPrescriptions .v26-prescription-create-section>.v26-section-body>.v26-quick-menu{
  grid-column:1;
}
#v26TabPrescriptions .v26-prescription-create-section>.v26-section-body>:not(.v26-prescription-sticky-tools):not(.v26-quick-menu){
  grid-column:2;
}

#v26TabPrescriptions .v26-prescription-sticky-tools{
  position:sticky;
  top:106px;
  z-index:12;
  margin:0!important;
  padding:12px!important;
  border:1px solid var(--rx-line)!important;
  border-radius:15px!important;
  background:#fbfcfd!important;
  box-shadow:none!important;
}
#v26TabPrescriptions .v26-prescription-sticky-tools .v26-quick-tabs-mount{
  margin:0 0 10px!important;
}
#v26TabPrescriptions .v26-prescription-sticky-tools .v26-quick-tabs{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  overflow:visible!important;
}
#v26TabPrescriptions .v26-prescription-sticky-tools .v26-quick-tabs button{
  min-width:0;
  min-height:34px;
  padding:7px 9px!important;
  border:1px solid #d6e0e7!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#415a6b!important;
  font-size:9.5px!important;
  font-weight:850!important;
  text-align:left;
  white-space:normal!important;
  line-height:1.15;
  box-shadow:none!important;
}
#v26TabPrescriptions .v26-prescription-sticky-tools .v26-quick-tabs button:hover{
  border-color:#aac4d5!important;
  background:#f5f9fc!important;
  color:#1e536f!important;
}
#v26TabPrescriptions .v26-prescription-sticky-tools .v26-quick-tabs button.active{
  border-color:#9dc6df!important;
  background:var(--rx-accent-soft)!important;
  color:var(--rx-accent-strong)!important;
  box-shadow:0 0 0 1px rgba(23,110,166,.05)!important;
}
#v26TabPrescriptions .v26-prescription-sticky-tools .v26-catalog-search{
  margin:0!important;
  font-size:10px!important;
  color:#526b7c!important;
}
#v26TabPrescriptions .v26-prescription-sticky-tools .v26-catalog-search>span{
  margin-bottom:5px!important;
  font-weight:900!important;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#6f818e!important;
}
#v26TabPrescriptions #v26CatalogSearch{
  min-height:42px!important;
  margin:0!important;
  padding:9px 11px!important;
  border:1px solid #bdccd6!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#17364a!important;
  font-size:12px;
  box-shadow:0 1px 2px rgba(20,52,73,.02)!important;
}
#v26TabPrescriptions #v26CatalogSearch:focus{
  border-color:#6da8cd!important;
  box-shadow:0 0 0 3px rgba(23,110,166,.10)!important;
}
#v26TabPrescriptions .v26-catalog-results{
  margin-top:7px;
  max-height:320px;
  overflow:auto;
  border-radius:10px;
}
#v26TabPrescriptions .v26-catalog-option{
  border-color:#e0e7ec!important;
  border-radius:9px!important;
  padding:8px 9px!important;
  background:#fff!important;
}
#v26TabPrescriptions .v26-catalog-option:hover{
  border-color:#a9c5d7!important;
  background:#f7fbfd!important;
}

#v26TabPrescriptions .v26-quick-menu{
  margin:0!important;
  border:1px solid var(--rx-line)!important;
  border-radius:15px!important;
  background:#fff!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
#v26TabPrescriptions .v26-quick-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
  padding:9px!important;
}
#v26TabPrescriptions .v26-quick-item{
  min-height:78px!important;
  border-color:#e0e7ec!important;
  border-radius:10px!important;
  padding:9px!important;
  box-shadow:none!important;
}
#v26TabPrescriptions .v26-quick-item:hover{
  transform:translateY(-1px);
  border-color:#aec8d8!important;
  background:#f8fbfd!important;
}
#v26TabPrescriptions .v26-quick-item strong{font-size:12px!important}
#v26TabPrescriptions .v26-quick-item small{font-size:9.5px!important}

/* Panneau de composition */
#v26TabPrescriptions .v26-selected-item,
#v26TabPrescriptions .v26-prescription-stage,
#v26TabPrescriptions .v26-respiratory-support-box,
#v26TabPrescriptions .v28-prescription-weight-alert,
#v26TabPrescriptions .v26-posology-safety-line{
  margin:0!important;
  border-radius:14px!important;
}
#v26TabPrescriptions .v26-selected-item{
  padding:12px 13px!important;
  border:1px solid #bcd5e4!important;
  background:linear-gradient(180deg,#f6fbfe 0%,#eef7fb 100%)!important;
}
#v26TabPrescriptions .v26-prescription-stage{
  padding:12px 13px!important;
  border:1px solid var(--rx-line)!important;
  background:#fff!important;
  box-shadow:none!important;
}
#v26TabPrescriptions .v26-prescription-stage .v26-subsection-head{
  padding-bottom:8px;
  margin-bottom:9px!important;
  border-bottom:1px solid #edf1f4;
}
#v26TabPrescriptions .v26-prescription-stage .v26-subsection-head strong{
  color:#18384e;
  font-size:12px;
}
#v26TabPrescriptions .v26-prescription-stage .v26-subsection-head small{
  color:#7a8c98;
  font-size:9.5px;
}
#v26TabPrescriptions .v26-field{
  color:#496273!important;
  font-size:10px!important;
  font-weight:800!important;
}
#v26TabPrescriptions .v26-field input,
#v26TabPrescriptions .v26-field select,
#v26TabPrescriptions .v26-field textarea,
#v26TabPrescriptions .v26-prescription-stage input,
#v26TabPrescriptions .v26-prescription-stage select,
#v26TabPrescriptions .v26-prescription-stage textarea{
  border:1px solid #cbd7df!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#18364b!important;
  box-shadow:none!important;
}
#v26TabPrescriptions .v26-field input:focus,
#v26TabPrescriptions .v26-field select:focus,
#v26TabPrescriptions .v26-field textarea:focus,
#v26TabPrescriptions .v26-prescription-stage input:focus,
#v26TabPrescriptions .v26-prescription-stage select:focus,
#v26TabPrescriptions .v26-prescription-stage textarea:focus{
  border-color:#7daecc!important;
  box-shadow:0 0 0 3px rgba(23,110,166,.08)!important;
  outline:0!important;
}
#v26TabPrescriptions .v26-schedule-builder{
  background:#f8fafb!important;
}
#v26TabPrescriptions .v26-schedule-preview{
  border-color:#dce4e9!important;
  background:#fff!important;
}
#v26TabPrescriptions .v26-duration-presets button,
#v26TabPrescriptions .v26-prn-shortcuts button{
  border:1px solid #d3dee5!important;
  background:#fff!important;
  color:#456174!important;
}
#v26TabPrescriptions .v26-duration-presets button:hover,
#v26TabPrescriptions .v26-prn-shortcuts button:hover{
  border-color:#9ebed2!important;
  background:#f5faff!important;
}

/* Barre de validation */
#v26TabPrescriptions .v26-prescription-submit-sticky{
  bottom:10px!important;
  min-height:62px;
  padding:10px 12px!important;
  border:1px solid #c8d6df!important;
  border-radius:15px!important;
  background:rgba(255,255,255,.97)!important;
  box-shadow:0 10px 28px rgba(18,48,69,.13)!important;
}
#v26TabPrescriptions .v26-prescription-preview>span{
  color:#82909a!important;
  font-size:9px!important;
}
#v26TabPrescriptions .v26-prescription-preview>strong{
  color:#18364b!important;
  font-size:12px!important;
}
#v26TabPrescriptions #v26CreatePrescriptionBtn{
  min-width:170px!important;
  min-height:42px!important;
  border:1px solid var(--rx-accent-strong)!important;
  border-radius:11px!important;
  background:linear-gradient(180deg,#1a78b4 0%,#0f659d 100%)!important;
  color:#fff!important;
  font-size:12px!important;
  font-weight:900!important;
  box-shadow:0 5px 12px rgba(15,101,157,.18)!important;
}
#v26TabPrescriptions #v26CreatePrescriptionBtn:hover{
  filter:brightness(.98);
  transform:translateY(-1px);
}

/* Prescriptions actives */
#v26TabPrescriptions .v26-prescription-batch{
  margin:0 0 10px!important;
  padding:8px 10px!important;
  border:1px solid #d7e2e8!important;
  border-radius:12px!important;
  background:#f8fafb!important;
}
#v26TabPrescriptions .v26-order-list{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px!important;
}
#v26TabPrescriptions .v26-order{
  position:relative;
  min-width:0;
  margin:0!important;
  padding:11px 12px!important;
  border:1px solid #dce4e9!important;
  border-radius:13px!important;
  background:#fff!important;
  box-shadow:0 2px 7px rgba(18,48,69,.035)!important;
  transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
#v26TabPrescriptions .v26-order:hover{
  border-color:#c4d3dd!important;
  box-shadow:0 5px 14px rgba(18,48,69,.06)!important;
}
#v26TabPrescriptions .v26-order.selected{
  border-color:#8eb9d4!important;
  box-shadow:0 0 0 2px rgba(23,110,166,.08)!important;
}
#v26TabPrescriptions .v26-order-head{
  align-items:flex-start!important;
  gap:10px!important;
}
#v26TabPrescriptions .v26-order-head h5{
  margin:0 0 4px!important;
  color:#18364b!important;
  font-size:13px!important;
  line-height:1.28!important;
}
#v26TabPrescriptions .v26-order .v26-meta{
  color:#738591!important;
  font-size:9.5px!important;
  line-height:1.4!important;
}
#v26TabPrescriptions .v26-status{
  border:1px solid #dbe3e8!important;
  border-radius:999px!important;
  background:#f4f6f8!important;
  color:#667a88!important;
  font-size:8.5px!important;
  font-weight:900!important;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding:4px 7px!important;
}
#v26TabPrescriptions .v26-status.active{
  border-color:#c3ddce!important;
  background:#f0f8f3!important;
  color:var(--rx-success)!important;
}
#v26TabPrescriptions .v26-status.suspended{
  border-color:#ead9b3!important;
  background:#fff9ee!important;
  color:var(--rx-warning)!important;
}
#v26TabPrescriptions .v26-status.cancelled,
#v26TabPrescriptions .v26-status.annulée{
  border-color:#eccaca!important;
  background:#fff5f5!important;
  color:var(--rx-danger)!important;
}
#v26TabPrescriptions .v26-order-next{
  margin-top:8px!important;
  padding:7px 8px!important;
  border:1px solid #e2e8ec;
  border-radius:9px!important;
  font-size:10px!important;
}
#v26TabPrescriptions .v26-order-actions{
  display:flex!important;
  gap:5px!important;
  flex-wrap:wrap!important;
  margin-top:9px!important;
  padding-top:8px!important;
  border-top:1px solid #edf1f4;
}
#v26TabPrescriptions .v26-order-actions button{
  min-height:30px;
  padding:5px 8px!important;
  border:1px solid #d5dfe5!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#486274!important;
  font-size:9px!important;
  font-weight:850!important;
}
#v26TabPrescriptions .v26-order-actions button:hover{
  border-color:#a9c1d0!important;
  background:#f7fafc!important;
}
#v26TabPrescriptions .v26-order-actions .primary-mini{
  border-color:#a8c8dc!important;
  background:#eef7fb!important;
  color:#0f638f!important;
}
#v26TabPrescriptions .v26-order-actions .danger{
  border-color:#ebcaca!important;
  background:#fff8f8!important;
  color:#9f3f3f!important;
}

/* Historique */
#v26TabPrescriptions>.v26-prescriptions-past{
  margin-top:0!important;
}
#v26TabPrescriptions>.v26-prescriptions-past>summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:48px;
  padding:10px 15px!important;
  background:#fbfcfd!important;
  color:#29485e!important;
  cursor:pointer;
}
#v26TabPrescriptions .v26-prescriptions-past-body{
  padding:12px 14px 14px!important;
  border-top:1px solid #e8edf0;
}
#v26TabPrescriptions .v26-past-filters{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin:0 0 10px!important;
}
#v26TabPrescriptions .v26-past-filters button{
  border:1px solid #d7e1e7!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#566f80!important;
  padding:6px 9px!important;
  font-size:9.5px!important;
  font-weight:850!important;
}
#v26TabPrescriptions .v26-past-filters button.active{
  border-color:#a7c5d8!important;
  background:#eef6fb!important;
  color:#145f8c!important;
}

/* Préserve explicitement les codes couleur médicaments existants. */
#v26TabPrescriptions .v26-order.v26-drug-color{
  border-left:7px solid var(--v26-drug-accent)!important;
  background:linear-gradient(90deg,var(--v26-drug-wash) 0,#fff 34%)!important;
}
#v26TabPrescriptions .v26-order.v26-drug-color.selected{
  background:linear-gradient(90deg,var(--v26-drug-wash) 0,#f4faff 28%,#f4faff 100%)!important;
}
#v26TabPrescriptions .v26-catalog-option.v26-catalog-drug-color,
#v26TabPrescriptions .v26-quick-item.v26-catalog-drug-color{
  border-left:6px solid var(--v26-drug-accent)!important;
  background:linear-gradient(90deg,var(--v26-drug-wash) 0,#fff 28%)!important;
}

/* Tablette */
@media(max-width:1240px){
  #v26TabPrescriptions .v26-prescription-create-section>.v26-section-body{
    grid-template-columns:minmax(250px,.82fr) minmax(0,1.35fr);
    column-gap:12px;
  }
  #v26TabPrescriptions .v26-order-list{grid-template-columns:1fr}
  #v26TabPrescriptions .v115-rx-hero{grid-template-columns:1fr}
  #v26TabPrescriptions .v115-rx-hero-side{justify-content:flex-start}
}
/* Mobile / petit écran */
@media(max-width:900px){
  #v26PrescriptionLabView.v26-patient-focus #v26TabPrescriptions{
    padding:8px!important;
  }
  #v26TabPrescriptions .v26-prescription-create-section>.v26-section-body{
    display:block!important;
  }
  #v26TabPrescriptions .v26-prescription-sticky-tools{
    position:relative!important;
    top:auto!important;
    margin-bottom:9px!important;
  }
  #v26TabPrescriptions .v26-quick-menu{margin-bottom:9px!important}
  #v26TabPrescriptions .v26-prescription-stage,
  #v26TabPrescriptions .v26-selected-item{margin-bottom:8px!important}
  #v26TabPrescriptions .v26-prescription-submit-sticky{
    position:sticky!important;
    bottom:4px!important;
  }
  #v26TabPrescriptions .v115-rx-hero{padding:13px!important}
  #v26TabPrescriptions .v115-rx-stat{min-width:78px}
  #v26TabPrescriptions .v115-rx-jumps{width:100%;margin-left:0}
  #v26TabPrescriptions .v115-rx-jumps button{flex:1}
}

