:root {
  --sc-ink: var(--bs-body-color);
  --sc-muted: var(--bs-secondary-color);
  --sc-line: var(--bs-border-color-translucent);
  --sc-panel: color-mix(in srgb, var(--bs-body-bg) 88%, white 12%);
  --sc-soft: color-mix(in srgb, var(--bs-body-bg) 88%, var(--bs-primary) 12%);
  --sc-primary: var(--bs-primary);
  --sc-primary-strong: color-mix(in srgb, var(--bs-primary) 78%, black 22%);
  --sc-accent: var(--bs-info);
  --sc-rgb-primary: var(--bs-primary-rgb);
  --sc-rgb-info: var(--bs-info-rgb);
  --sc-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  --sc-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
}

html {
  font-size: 15px;
}

@media (min-width: 768px) {
  html {
    font-size: 15.5px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem var(--bs-body-bg), 0 0 0 0.25rem rgba(var(--sc-rgb-primary), 0.28);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  color: var(--sc-ink);
  font-family: "Segoe UI", "Noto Sans Thai", Tahoma, Arial, sans-serif;
  font-size: 0.98rem;
  line-height: 1.55;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--sc-rgb-primary), 0.13), transparent 26%),
    radial-gradient(circle at 92% 10%, rgba(var(--sc-rgb-info), 0.1), transparent 25%),
    linear-gradient(180deg, color-mix(in srgb, var(--bs-body-bg) 94%, white 6%) 0%, color-mix(in srgb, var(--bs-body-bg) 88%, var(--bs-primary) 12%) 100%);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--sc-ink);
  letter-spacing: 0;
}

a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.smartclinic-navbar {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  backdrop-filter: blur(18px);
  background: linear-gradient(90deg, color-mix(in srgb, var(--bs-dark) 86%, var(--bs-primary) 14%) 0%, color-mix(in srgb, var(--bs-primary) 72%, var(--bs-dark) 28%) 100%);
}

.smartclinic-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.82rem;
}

.smartclinic-navbar .nav-link {
  border-radius: 999px;
  padding: 0.48rem 0.72rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 600;
}

.smartclinic-navbar .nav-link:hover,
.smartclinic-navbar .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.nav-tool,
.nav-account {
  padding-left: 0.4rem;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--bs-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.theme-select {
  min-width: 140px;
}

.profile-report-sheet {
  background: #fff;
  color: #111827;
  width: min(210mm, 100%);
  min-height: 297mm;
  margin: 0 auto;
  padding: 13mm 16mm 8mm;
  border: 1px solid #d8dee6;
  box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, .12);
  font-family: "TH Sarabun New", "Sarabun", "Leelawadee UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.48;
  position: relative;
}

.profile-form-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 15px;
  margin-bottom: 18px;
}

.profile-form-top > div:last-child {
  text-align: right;
}

/* Public signup and subscription experience */
.controller-access .app-shell{max-width:none;padding:0!important}.controller-access .app-main{padding:0!important}.signup-page{--ink:#102a43;--teal:#087f8c;--blue:#1769e0;background:#f7fafc;color:var(--ink)}
.signup-hero{min-height:650px;position:relative;display:flex;align-items:center;overflow:hidden;background:#eef7fb}.signup-hero>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.signup-hero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,252,247,.98) 0%,rgba(255,252,247,.91) 33%,rgba(255,255,255,.15) 62%,transparent 100%)}
.signup-hero-media{position:absolute;inset:0}.signup-hero-media .promo-media-frame,.signup-hero-media video,.signup-hero-media iframe{width:100%;height:100%;object-fit:cover;border-radius:0}.promo-media-frame{position:relative;overflow:hidden;border-radius:18px;background:#0d2638;aspect-ratio:16/9}.promo-media-frame video,.promo-media-frame iframe{width:100%;height:100%;display:block;border:0;object-fit:cover}.promo-sound-toggle{position:absolute;right:14px;bottom:14px;border:1px solid rgba(255,255,255,.45);background:rgba(9,32,48,.72);color:#fff;border-radius:999px;padding:7px 12px;font-size:.75rem;backdrop-filter:blur(8px)}
.signup-hero-copy{position:relative;z-index:1;width:min(660px,90%);margin-left:max(5vw,24px);padding:80px 0}.signup-pill,.section-kicker,.admin-hero>div>span,.modal-header span{display:inline-flex;color:#087f8c;font-size:.72rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase}.signup-hero h1{font-size:clamp(2.7rem,5vw,5rem);line-height:1.05;letter-spacing:-.055em;margin:20px 0;color:#102a43;font-weight:800}.signup-hero h1 em{font-style:normal;color:#087f8c}.signup-hero-copy>p{font-size:1.12rem;line-height:1.8;max-width:590px;color:#536b7d}.signup-actions{display:flex;gap:12px;margin:30px 0}.hero-trust{display:flex;gap:18px;flex-wrap:wrap;color:#385568;font-size:.88rem;font-weight:600}
.feature-ribbon{display:grid;grid-template-columns:repeat(4,1fr);max-width:1320px;margin:-42px auto 0;position:relative;z-index:2;background:#fff;border:1px solid #e1ebf0;border-radius:24px;box-shadow:0 20px 60px rgba(22,59,81,.12);padding:22px}.feature-ribbon article{display:flex;align-items:center;gap:13px;padding:10px 20px;border-right:1px solid #e7eef2}.feature-ribbon article:last-child{border:0}.feature-icon{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:#e8f7f6;color:#087f8c;font-weight:800}.feature-ribbon strong,.feature-ribbon small{display:block}.feature-ribbon small{color:#78909e;margin-top:4px}
.product-film-section{max-width:1320px;margin:72px auto 0;padding:42px;display:grid;grid-template-columns:.7fr 1.3fr;gap:45px;align-items:center;border-radius:28px;background:linear-gradient(135deg,#102d43,#0b5368);color:#fff;box-shadow:0 24px 70px rgba(12,45,63,.18)}.product-film-copy .section-kicker{color:#79ddd4}.product-film-copy h2{font-size:clamp(2rem,3.2vw,3.4rem);font-weight:800;letter-spacing:-.04em;margin:12px 0}.product-film-copy p{color:#bdd2dd;line-height:1.75}.product-film-player .promo-media-frame{box-shadow:0 18px 50px rgba(0,0,0,.28)}.film-placeholder{position:relative;overflow:hidden;border-radius:18px;aspect-ratio:16/9}.film-placeholder img{width:100%;height:100%;object-fit:cover}.film-placeholder span{position:absolute;inset:auto 20px 20px;background:rgba(7,36,53,.8);padding:9px 14px;border-radius:10px}.board-video{margin-top:20px;padding:18px;background:#f5f9fa;border-radius:18px}.board-video>div:first-child span{font-size:.7rem;color:#087f8c;font-weight:800}.board-video h3{font-size:1rem;margin:5px 0}.board-video p{font-size:.83rem;color:#70838e}.board-video .promo-media-frame{margin-top:12px}
.product-film-section .product-film-copy h2{color:#fff!important;text-shadow:0 2px 18px rgba(0,0,0,.18)}.product-film-section .product-film-copy p{color:#d8e9ef!important;font-size:1rem}.product-film-section .product-film-copy .btn{background:#18b8a6;border-color:#18b8a6;color:#062f35;font-weight:800;box-shadow:0 8px 24px rgba(24,184,166,.28)}.product-film-section .product-film-copy .btn:hover{background:#5addcf;border-color:#5addcf;transform:translateY(-1px)}
.signup-content-grid{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(360px,.82fr);gap:28px;max-width:1320px;margin:70px auto;padding:0 24px}.signup-form-card,.news-board,.admin-panel{background:#fff;border:1px solid #e2ebef;border-radius:24px;padding:34px;box-shadow:0 16px 50px rgba(30,69,91,.07)}.signup-form-card h2,.news-board h2,.admin-panel h2{font-weight:800;letter-spacing:-.025em}.signup-form-card .form-control{min-height:50px;border-radius:12px;border-color:#dbe5ea}.signup-consent{padding:14px 14px 14px 42px;background:#f5fafb;border-radius:12px}.signup-contact{text-align:center;margin-top:20px;color:#607d8b}.signup-contact a{font-weight:800;color:#087f8c}.news-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}.news-heading span{font-size:.75rem;background:#edf9f7;color:#087f8c;border-radius:999px;padding:6px 10px}.news-featured{background:linear-gradient(145deg,#0e3a56,#087f8c);color:#fff;border-radius:18px;padding:25px;margin:20px 0}.news-featured>span{font-size:.72rem;background:rgba(255,255,255,.16);border-radius:99px;padding:5px 10px}.news-featured h3{font-size:1.25rem;margin:16px 0 8px}.news-featured p{opacity:.8;margin:0}.news-item{display:grid;grid-template-columns:80px 1fr;gap:16px;padding:19px 0;border-bottom:1px solid #e6eef1}.news-item time{color:#087f8c;font-size:.72rem;font-weight:800}.news-item h3{font-size:1rem;margin:0 0 6px}.news-item p{font-size:.87rem;color:#6b7f8b;margin:0;line-height:1.55}.unlimited-ad{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;margin-top:24px;padding:20px;border-radius:18px;background:#f2f0ff;color:#29215b}.infinity-mark{font-size:3rem;color:#6554d9}.unlimited-ad small,.unlimited-ad strong{display:block}.unlimited-ad a{background:#6554d9;color:#fff;padding:8px 12px;border-radius:10px;text-decoration:none;font-size:.8rem}
.news-board .news-featured h3{color:#fff!important;text-shadow:0 1px 12px rgba(0,0,0,.16)}.news-board .news-featured p{color:#e4f3f5!important;opacity:1}.news-board .news-featured>span{color:#fff}.news-board .news-featured{box-shadow:0 14px 30px rgba(8,92,108,.18)}
.signup-success-shell{min-height:75vh;display:grid;place-items:center;padding:40px 20px;background:radial-gradient(circle at top,#eaf9f7,#f7fafc 55%)}.signup-success-card{width:min(620px,100%);background:#fff;border:1px solid #dfeaec;border-radius:28px;padding:42px;box-shadow:0 25px 70px rgba(21,62,82,.12);text-align:center}.success-check{width:64px;height:64px;margin:0 auto 18px;border-radius:50%;display:grid;place-items:center;background:#daf5eb;color:#07835c;font-size:2rem}.signup-success-card h1{font-weight:800;margin:14px 0}.credential-box{display:grid;grid-template-columns:130px 1fr auto;align-items:center;text-align:left;gap:12px;padding:14px;margin:12px 0;background:#f6f9fb;border-radius:12px}.credential-box label{color:#718793}.credential-box strong{font-family:monospace}.credential-box button{border:0;background:transparent;color:#1769e0;font-weight:700}.quota-welcome{display:grid;gap:4px;margin:22px 0;padding:18px;border:1px solid #cae8e4;border-radius:16px;background:#f0faf8}.quota-welcome strong{font-size:1.45rem;color:#087f8c}
.patient-quota-bar{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:18px;background:#fff;border:1px solid #dce9ed;border-radius:18px;padding:16px 20px;margin-bottom:22px;box-shadow:0 8px 26px rgba(29,65,85,.06)}.quota-symbol{width:46px;height:46px;border-radius:14px;background:#e7f5f4;color:#087f8c;display:grid;place-items:center;font-size:1.4rem;font-weight:900}.quota-copy small,.quota-copy strong,.quota-remaining small,.quota-remaining strong{display:block}.quota-progress{height:6px;background:#e8eff2;border-radius:99px;overflow:hidden;margin-top:8px}.quota-progress i{display:block;height:100%;background:#11998e;border-radius:99px}.quota-remaining{text-align:right}.patient-quota-bar.low{border-color:#f3cf93}.patient-quota-bar.low .quota-progress i{background:#f0a230}.patient-quota-bar.exhausted{border-color:#efb8b8;background:#fffafa}.patient-quota-bar.exhausted .quota-symbol{background:#fde8e8;color:#c43e3e}.patient-quota-bar.unlimited{background:linear-gradient(120deg,#f4f1ff,#eefbfa);border-color:#d9d3fa}.patient-quota-bar.unlimited .quota-symbol{background:#6655d9;color:#fff;font-size:2rem}.credit-request-modal,.quota-modal{border:0;border-radius:22px;overflow:hidden}.credit-request-modal .modal-header,.quota-modal .modal-header{padding:24px;border:0;background:#f2f8fa}.credit-request-modal .modal-body,.quota-modal .modal-body{padding:24px;display:grid;gap:10px}.quota-limit-notice{display:flex;justify-content:space-between;padding:14px;border-radius:12px;background:#fff2ed;color:#a54828}.unlimited-switch{padding:16px 16px 16px 50px;margin:8px 0;border:1px solid #ddd7fa;background:#f7f5ff;border-radius:14px}.unlimited-switch label small{display:block;color:#756f92}
.subscription-admin{max-width:1500px;margin:0 auto}.admin-hero{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:34px;margin:20px 0;background:linear-gradient(120deg,#102d43,#087f8c);border-radius:24px;color:#fff}.admin-hero>div>span{color:#8de2d9}.admin-hero h1{font-weight:800;margin:8px 0}.admin-hero p{margin:0;opacity:.75}.admin-summary{display:flex;gap:12px}.admin-summary div{min-width:95px;padding:16px;text-align:center;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);border-radius:16px}.admin-summary strong,.admin-summary small{display:block}.admin-summary strong{font-size:1.6rem}.admin-panel{margin-bottom:24px}.panel-title{display:flex;justify-content:space-between;margin-bottom:20px}.panel-title h2{font-size:1.3rem;margin:4px 0}.admin-panel td small{display:block;color:#81929c}.plan-badge,.request-status{display:inline-block;padding:5px 10px;border-radius:999px;font-size:.7rem;font-weight:800}.plan-badge.unlimited{background:#eeeaff;color:#5a49c9}.plan-badge.credit{background:#e6f7f3;color:#087f6b}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.request-card{display:grid;grid-template-columns:1fr 240px;gap:16px;padding:18px 0;border-bottom:1px solid #e5ecef}.request-card form{display:grid;gap:7px}.request-status.pending{background:#fff2d9;color:#a96900}.request-status.completed{background:#e1f5eb;color:#087754}.announcement-form{display:grid;gap:10px;padding:18px;background:#f6f9fa;border-radius:16px}.announcement-list article{display:flex;justify-content:space-between;gap:12px;padding:15px 0;border-bottom:1px solid #e5ecef}.announcement-list article div{display:grid;gap:3px}.announcement-list span{color:#087f8c;font-size:.7rem;font-weight:800}.announcement-list small{color:#71848f}.empty-admin{padding:40px;text-align:center;color:#82949e}
.subscription-admin .admin-hero h1{color:#fff!important}.subscription-admin .admin-hero p{color:#d7e8ed!important;opacity:1}.subscription-admin .admin-summary strong,.subscription-admin .admin-summary small{color:#fff}
.media-admin-form{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;padding:20px;background:#f6f9fa;border-radius:18px}.media-options{display:flex;gap:16px;align-items:center}.media-admin-list{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:18px}.media-admin-list article{display:grid;grid-template-columns:100px 1fr auto;align-items:center;gap:14px;padding:12px;border:1px solid #e1e9ed;border-radius:14px}.media-admin-list article>div:nth-child(2){display:grid;gap:3px}.media-admin-list article>div:nth-child(2)>span{font-size:.7rem;font-weight:800;color:#087f8c}.media-admin-list small{color:#758892}.media-admin-preview{width:100px;aspect-ratio:16/9;background:#102d43;border-radius:9px;overflow:hidden;display:grid;place-items:center;color:#fff;font-weight:900}.media-admin-preview video{width:100%;height:100%;object-fit:cover}
.media-admin-list article{grid-template-columns:100px 1fr auto auto}.media-edit-button{white-space:nowrap}.media-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.media-edit-options{grid-column:1/-1;padding:14px 16px;background:#f4f9fa;border-radius:12px}
@media(max-width:992px){.signup-hero{min-height:580px}.signup-hero:after{background:rgba(255,252,247,.85)}.signup-content-grid,.admin-grid,.product-film-section{grid-template-columns:1fr}.feature-ribbon{grid-template-columns:1fr 1fr;margin:20px}.feature-ribbon article:nth-child(2){border-right:0}.admin-hero{align-items:flex-start;flex-direction:column}.media-admin-form{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.signup-hero-copy{padding:50px 0}.signup-hero h1{font-size:2.65rem}.signup-actions{flex-direction:column}.feature-ribbon{grid-template-columns:1fr}.feature-ribbon article{border-right:0;border-bottom:1px solid #e7eef2}.signup-content-grid{padding:0 14px;margin-top:36px}.signup-form-card,.news-board,.admin-panel{padding:22px}.product-film-section{margin:35px 14px 0;padding:24px}.unlimited-ad{grid-template-columns:auto 1fr}.unlimited-ad a{grid-column:1/-1;text-align:center}.patient-quota-bar{grid-template-columns:auto 1fr}.quota-remaining{text-align:left;grid-column:2}.patient-quota-bar .btn{grid-column:1/-1}.admin-summary{width:100%}.admin-summary div{min-width:0;flex:1}.request-card{grid-template-columns:1fr}.credential-box{grid-template-columns:1fr auto}.credential-box label{grid-column:1/-1}.media-admin-form,.media-admin-list{grid-template-columns:1fr}.media-admin-list article{grid-template-columns:80px 1fr auto}.media-admin-list form{grid-column:1/-1}.media-admin-preview{width:80px}.media-edit-grid{grid-template-columns:1fr}}

/* OPD vital signs */
.amed-vital-summary{display:flex;flex-wrap:wrap;gap:.35rem 1rem;margin:.55rem 0;padding:.65rem .8rem;border:1px solid #f0a18b;border-radius:8px;background:#fff9f7;font-size:.8rem}.amed-vital-summary span{white-space:nowrap}
.pi-vital-latest{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem;margin-bottom:.7rem}.pi-vital-latest>div{display:flex;flex-direction:column;padding:.5rem;border-radius:9px;background:#f4f8fb}.pi-vital-latest small{color:#718397;font-size:.6rem}.pi-vital-latest strong{font-size:.9rem}.pi-vital-latest em{color:#91a0ac;font-size:.55rem;font-style:normal}.pi-chart-wrap.compact{height:180px}.pi-subchart-title{margin:1rem 0 .4rem;font-size:.78rem;font-weight:800}.pi-legend .weight{background:#7656cf}.pi-legend .bmi{background:#ec8b43}@media(max-width:440px){.pi-vital-latest{grid-template-columns:repeat(2,1fr)}}
.pi-appointments{margin-bottom:1rem}.pi-appointment-count{padding:.3rem .6rem;border-radius:99px;background:#fff3e4;color:#c47828;font-size:.68rem}.pi-appointment-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;max-height:280px;overflow:auto}.pi-appointment-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;padding:.7rem;border:1px solid #dfe9ef;border-left:4px solid #4b91e2;border-radius:12px;background:#fff}.pi-appointment-card.today{border-left-color:#e19431;background:#fffbf4}.pi-appointment-card.past{border-left-color:#aab6bf;opacity:.78}.pi-appointment-date{display:grid;place-items:center;width:46px;height:48px;border-radius:10px;background:#eaf3ff;color:#276fca}.pi-appointment-date span{font-size:1.05rem;font-weight:800;line-height:1}.pi-appointment-date small{font-size:.58rem}.pi-appointment-info{min-width:0}.pi-appointment-info>div{display:flex;align-items:center;gap:.4rem}.pi-appointment-info h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.78rem;font-weight:800;margin:0}.pi-appointment-info em{padding:.18rem .4rem;border-radius:99px;background:#e7f8f2;color:#16806b;font-size:.56rem;font-style:normal;white-space:nowrap}.pi-appointment-info em.today{background:#fff0d9;color:#b66c20}.pi-appointment-info em.past{background:#edf1f4;color:#71808c}.pi-appointment-info p{margin:.15rem 0;color:#4e6d83;font-size:.68rem}.pi-appointment-info>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8796a2;font-size:.62rem}.pi-appointment-card>a{font-size:.65rem;font-weight:700;color:#246bdb;text-decoration:none;white-space:nowrap}@media(max-width:720px){.pi-appointment-list{grid-template-columns:1fr}}@media(max-width:480px){.pi-appointment-card{grid-template-columns:auto minmax(0,1fr)}.pi-appointment-card>a{grid-column:2}}
.appointment-picker-button{display:flex;align-items:center;gap:.55rem;width:100%;padding:.55rem .65rem;border:1px dashed #b8cad6;border-radius:10px;background:#fff;color:#587083;text-align:left}.appointment-picker-button>span:first-child{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:#edf5ff;color:#2878e3}.appointment-picker-button>span:nth-child(2){display:flex;min-width:0;flex:1;flex-direction:column}.appointment-picker-button strong{font-size:.72rem}.appointment-picker-button small{color:#8a99a5;font-size:.6rem}.appointment-picker-button b{font-size:1.1rem}.appointment-picker-button.selected{border-style:solid;border-color:#74a9e9;background:#f6faff;color:#246bdb}.appointment-picker-button:disabled{display:none}.appointment-modal{border:0;border-radius:18px;overflow:hidden}.appointment-modal .modal-header>div{display:flex;align-items:center;gap:.65rem}.appointment-modal .modal-header{background:linear-gradient(120deg,#edf6ff,#edfaf6)}.appointment-modal .modal-title{font-size:1rem;font-weight:800}.appointment-modal .modal-header p{margin:.15rem 0 0;color:#718397;font-size:.68rem}.appointment-modal-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#fff;color:#2878e3;font-size:1.2rem}.appointment-calendar-grid{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}.appointment-calendar-grid label span{display:block;margin-bottom:.3rem;color:#536e82;font-size:.7rem;font-weight:700}.appointment-preview{display:flex;align-items:center;gap:.65rem;margin-top:.8rem;padding:.7rem;border-radius:11px;background:#f4f8fb}.appointment-preview>span{font-size:1.3rem;color:#2878e3}.appointment-preview div{display:flex;flex-direction:column}.appointment-preview small{color:#7c8d9a;font-size:.62rem}.appointment-preview strong{font-size:.78rem}@media(max-width:480px){.appointment-calendar-grid{grid-template-columns:1fr}}
.profile-pdf-status{display:flex;align-items:center;gap:.7rem;padding:.8rem;border:1px dashed #c2d0d9;border-radius:12px;background:#f8fafb}.profile-pdf-status.has-file{border-style:solid;border-color:#89cbb9;background:#f1faf7}.profile-pdf-icon,.profile-upload-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:10px;background:#ffe9e7;color:#c14d45;font-size:.65rem;font-weight:900}.profile-pdf-status>div:nth-child(2){display:flex;min-width:0;flex:1;flex-direction:column}.profile-pdf-status strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.76rem}.profile-pdf-status small{color:#7a8c99;font-size:.65rem}.profile-upload-modal{border:0;border-radius:18px;overflow:hidden}.profile-upload-modal .modal-header{background:linear-gradient(120deg,#fff3f0,#f0f8ff)}.profile-upload-modal .modal-header>div{display:flex;align-items:center;gap:.65rem}.profile-upload-modal .modal-title{font-size:1rem;font-weight:800}.profile-upload-modal .modal-header p{margin:.15rem 0 0;color:#718397;font-size:.68rem}.profile-upload-drop{display:flex;align-items:center;flex-direction:column;padding:1.5rem;border:2px dashed #b9ccd8;border-radius:14px;background:#f8fbfd;cursor:pointer;transition:.15s}.profile-upload-drop.dragging,.profile-upload-drop:hover{border-color:#4d93e4;background:#f0f7ff}.profile-upload-drop input{position:absolute;width:1px;height:1px;opacity:0}.profile-upload-drop>span{font-size:1.8rem;color:#2878e3}.profile-upload-drop strong{font-size:.82rem}.profile-upload-drop small{color:#8293a0;font-size:.67rem}.profile-upload-selected{display:flex;align-items:center;gap:.6rem;margin-top:.7rem;padding:.65rem;border-radius:10px;background:#eef8f5}.profile-upload-selected>span{font-size:.62rem;font-weight:900;color:#c14d45}.profile-upload-selected>div{display:flex;min-width:0;flex:1;flex-direction:column}.profile-upload-selected strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.72rem}.profile-upload-selected small{color:#7b8d9a;font-size:.62rem}.profile-upload-selected button{border:0;background:transparent;color:#718397;font-size:1.1rem}.profile-upload-progress{display:flex;align-items:center;gap:.5rem;color:#607788}.profile-upload-progress span{width:18px;height:18px;border:2px solid #d0dde5;border-top-color:#2878e3;border-radius:50%;animation:pi-spin .7s linear infinite}.profile-upload-progress small{font-size:.68rem}@media(max-width:560px){.profile-pdf-status{align-items:flex-start;flex-wrap:wrap}.profile-pdf-status>div:last-child{width:100%}}
.vital-signs-card{padding:1rem;border:1px solid #d8e6ee;border-radius:15px;background:linear-gradient(135deg,#f7fbfe,#f3fbf8)}.vital-signs-head,.vital-signs-head>div{display:flex;align-items:center;justify-content:space-between;gap:.65rem}.vital-signs-head>div>div{display:flex;flex-direction:column}.vital-signs-head strong{font-size:.88rem}.vital-signs-head small{color:#718397;font-size:.68rem}.vital-signs-head>span{padding:.25rem .5rem;border-radius:99px;background:#e6f8f2;color:#16856e;font-size:.65rem}.vital-icon{display:grid;place-items:center;width:35px;height:35px;border-radius:10px;background:#e7f1ff;color:#2878e3}.vital-input-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin-top:.9rem}.vital-input-grid label>span{display:block;margin:0 0 .28rem .1rem;color:#506a7d;font-size:.7rem;font-weight:700}.vital-input-grid label>div{display:flex;align-items:center;min-height:42px;overflow:hidden;border:1px solid #cfdee7;border-radius:10px;background:#fff;transition:.15s}.vital-input-grid label>div:focus-within{border-color:#6ca7ed;box-shadow:0 0 0 3px #3a87e515}.vital-input-grid input{min-width:0;width:100%;padding:.55rem .6rem;border:0;outline:0;background:transparent;color:#17344d;font-weight:750}.vital-input-grid em{padding-right:.55rem;color:#8495a3;font-size:.63rem;font-style:normal;white-space:nowrap}.vital-input-grid b{color:#8a9ba8}.vital-bp input{text-align:center}.bmi-result{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.75rem;padding:.65rem .8rem;border-radius:11px;background:#eaf3ff;color:#246bdb}.bmi-result>div{display:flex;align-items:baseline;gap:.4rem}.bmi-result span{font-size:.7rem;font-weight:800}.bmi-result strong{font-size:1.3rem}.bmi-result small,.bmi-result em{font-size:.68rem;font-style:normal}.bmi-result[data-level=normal]{background:#e7f8f2;color:#137d68}.bmi-result[data-level=warn]{background:#fff4e4;color:#bd6d22}.bmi-result[data-level=high]{background:#ffebea;color:#bd4b45}.bmi-result[data-level=low]{background:#eef1ff;color:#6268b4}@media(max-width:767px){.vital-input-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:440px){.vital-input-grid{grid-template-columns:1fr}.vital-signs-head{align-items:flex-start}.bmi-result{align-items:flex-start;flex-direction:column;gap:.2rem}}

.profile-form-service-block {
  position: relative;
}

.profile-form-small-box {
  min-width: 26px;
  min-height: 13px;
  display: inline-block;
  margin-top: 6px;
  border: 1px solid #111827;
  padding: 0 6px;
  font-size: 14px;
  line-height: 17px;
}

.profile-form-date {
  margin-top: 4px;
}

.profile-form-patient-photo {
  position: absolute;
  top: 30mm;
  right: 5mm;
  width: 24mm;
  height: 30mm;
  border: 1px solid #111827;
  background: #fff;
  padding: 1mm;
}

.profile-form-patient-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-form-title {
  text-align: center;
  margin-bottom: 15px;
  padding-top: 20mm;
}

.profile-form-logo {
  position: absolute;
  top: calc(100% + 3mm);
  left: 0;
  display: block;
  width: 24mm;
  height: 24mm;
  object-fit: contain;
}

.profile-form-title h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 2px;
}

.profile-form-title .clinic-name {
  font-size: 17px;
  font-weight: 700;
}

.profile-form-section {
  border-top: 1px solid #d7dde6;
  padding-top: 8px;
  margin-top: 8px;
}

.profile-form-section h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 6px;
}

.profile-form-section p {
  margin: 0 0 6px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 42px;
}

.profile-form-grid span {
  color: #4b5563;
}

.profile-form-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 52px;
  text-align: center;
  font-size: 16px;
}

.signature-line {
  min-height: 74px;
  position: relative;
}

.profile-form-signature-img {
  display: block;
  width: 58mm;
  height: 17mm;
  object-fit: contain;
  margin: -21mm auto 1mm;
}

.signature-line .line {
  border-bottom: 1px dotted #111827;
  height: 1px;
  margin-bottom: 7px;
}

.profile-form-provider-title {
  font-size: 15px;
}

.profile-form-barcode {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3mm;
  text-align: center;
  font-family: "Courier New", monospace;
  letter-spacing: 0;
  font-size: 15px;
}

.profile-form-barcode svg {
  display: block;
  height: 42px;
  max-width: 82mm;
  margin: 0 auto 1mm;
}

@media print {
  .profile-report-sheet {
    width: 210mm;
    min-height: 297mm;
    padding: 13mm 16mm 8mm;
    border: 0;
    box-shadow: none;
  }
}

.app-shell {
  max-width: 1900px;
}

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(135deg, color-mix(in srgb, var(--bs-dark) 88%, var(--bs-primary) 12%), color-mix(in srgb, var(--bs-primary) 86%, var(--bs-dark) 14%));
  box-shadow: var(--sc-shadow);
}

.hero-panel .display-5,
.hero-panel .display-6,
.hero-panel h1,
.hero-panel h2,
.hero-panel h3 {
  color: #fff;
}

.glass-card {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.card {
  border: 1px solid var(--sc-line) !important;
  border-radius: 0.9rem;
  background: var(--sc-panel);
  box-shadow: var(--sc-shadow-sm) !important;
  overflow: hidden;
}

.card-body {
  color: var(--sc-ink);
}

.form-label {
  margin-bottom: 0.38rem;
  color: var(--sc-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-control,
.form-select {
  min-height: 2.5rem;
  border-color: var(--sc-line);
  border-radius: 0.55rem;
  font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(var(--sc-rgb-primary), 0.65);
  box-shadow: 0 0 0 0.22rem rgba(var(--sc-rgb-primary), 0.14);
}

textarea.form-control {
  line-height: 1.45;
}

.btn {
  border-radius: 0.55rem;
  font-weight: 700;
}

.btn-primary {
  border-color: var(--sc-primary);
  background: var(--sc-primary);
}

.btn-primary:hover {
  border-color: var(--sc-primary-strong);
  background: var(--sc-primary-strong);
}

.btn-info {
  border-color: var(--sc-accent);
  background: var(--sc-accent);
}

.badge {
  border-radius: 999px;
  font-weight: 700;
}

.table {
  --bs-table-bg: transparent;
  font-size: 0.92rem;
}

.table thead th {
  color: var(--sc-muted);
  border-bottom-color: var(--sc-line);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.table tbody td {
  border-color: var(--sc-line);
  vertical-align: middle;
}

.list-group-item {
  border-color: var(--sc-line);
}

.modal-content {
  border-radius: 0.9rem;
}

.record-icon-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.icon-action-btn {
  display: inline-flex;
  width: 2.45rem;
  min-width: 2.45rem;
  height: 2.45rem;
  align-items: center;
  justify-content: center;
  padding: 0.48rem;
}

.icon-action-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
  pointer-events: none;
}

.signature-manage-button {
  cursor: pointer;
}

.signature-popup-preview {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border: 1px solid var(--sc-line);
  border-radius: 0.75rem;
  background: #fff;
}

.signature-popup-preview img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.signature-capture-canvas {
  display: block;
  width: 100%;
  height: 240px;
  border: 2px dashed color-mix(in srgb, var(--sc-primary) 42%, var(--sc-line));
  border-radius: 0.75rem;
  background:
    linear-gradient(to bottom, transparent calc(72% - 1px), rgba(31, 41, 55, 0.18) 72%, transparent calc(72% + 1px)),
    #fff;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.signature-background-option {
  padding: 0.85rem 1rem 0.85rem 3.25rem;
  border: 1px solid color-mix(in srgb, var(--sc-primary) 28%, var(--sc-line));
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--bs-primary-bg-subtle) 55%, transparent);
}

.signature-background-option .form-check-input {
  margin-left: -2.25rem;
}

.signature-background-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.signature-background-preview[hidden] {
  display: none;
}

.signature-preview-pane {
  display: flex;
  min-height: 130px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.65rem;
  border: 1px solid var(--sc-line);
  border-radius: 0.65rem;
}

.signature-preview-checkerboard {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e8edf3 25%, transparent 25%),
    linear-gradient(-45deg, #e8edf3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8edf3 75%),
    linear-gradient(-45deg, transparent 75%, #e8edf3 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.signature-preview-pane img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}

@media (max-width: 575.98px) {
  .signature-background-preview {
    grid-template-columns: 1fr;
  }
}

/* Patient 360 insights */
.pi-page{--pi-blue:#246bdb;--pi-ink:#18334d;--pi-muted:#718397;--pi-line:#e5edf3;max-width:1500px;margin:0 auto;color:var(--pi-ink)}
.pi-hero{display:flex;justify-content:space-between;align-items:center;padding:1.7rem 2rem;margin-bottom:1rem;border-radius:22px;background:linear-gradient(125deg,#e9f5ff,#effbf7 58%,#fff8eb);overflow:hidden}
.pi-eyebrow{display:block;color:#34837a;font-size:.68rem;font-weight:800;letter-spacing:.16em;margin-bottom:.35rem}.pi-hero h1{font-size:clamp(1.55rem,2.4vw,2.15rem);font-weight:800;margin:0}.pi-hero p{margin:.3rem 0 0;color:var(--pi-muted)}.pi-shield{display:grid;place-items:center;width:74px;height:74px;border-radius:24px;background:#fff;color:#3aaf99;font-size:2rem;box-shadow:0 12px 30px #539a8426;transform:rotate(5deg)}
.pi-search-card,.pi-panel,.pi-profile,.pi-results{background:var(--sc-panel,#fff);border:1px solid var(--pi-line);border-radius:18px;box-shadow:0 6px 22px #3457760c}.pi-search-card{padding:1rem 1.2rem;margin-bottom:1rem}.pi-search-card label{font-size:.78rem;font-weight:700;margin-bottom:.5rem}.pi-search-row{display:flex;gap:.7rem}.pi-search-input{flex:1;display:flex;align-items:center;gap:.6rem;background:#f6f9fb;border:1px solid #dce7ee;border-radius:12px;padding:0 .9rem}.pi-search-input span{font-size:1.5rem;color:#7a91a4}.pi-search-input input{width:100%;border:0;outline:0;background:transparent;padding:.72rem 0;color:var(--pi-ink)}.pi-search-row>button,.pi-filters button,.pi-primary-btn{border:0;border-radius:11px;background:var(--pi-blue);color:#fff;padding:.65rem 1.1rem;font-weight:700}
.pi-results{padding:1.2rem}.pi-section-title>div{display:flex;align-items:center;gap:.6rem;margin-bottom:1rem}.pi-section-title span{font-size:1.05rem;font-weight:800}.pi-section-title small{color:var(--pi-muted)}.pi-patient-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.65rem}.pi-patient-result{display:flex;align-items:center;gap:.75rem;padding:.8rem;border:1px solid var(--pi-line);border-radius:13px;color:inherit;text-decoration:none;transition:.2s}.pi-patient-result:hover{border-color:#9dc2f5;background:#f6faff;transform:translateY(-1px)}.pi-patient-result div:nth-child(2){display:flex;flex-direction:column}.pi-patient-result small{color:var(--pi-muted)}.pi-arrow{margin-left:auto;font-size:1.6rem;color:var(--pi-blue)}
.pi-profile{display:grid;grid-template-columns:auto 1fr minmax(210px,300px);gap:1.2rem;padding:1.25rem;margin-bottom:1rem}.pi-avatar{width:86px;height:86px;border-radius:22px;background:linear-gradient(135deg,#d6ecff,#dff8ed);display:grid;place-items:center;overflow:hidden;font-size:2rem;font-weight:800;color:#2877bb}.pi-avatar img{width:100%;height:100%;object-fit:cover}.pi-avatar.mini{width:45px;height:45px;border-radius:13px;font-size:1rem}.pi-profile-head{display:flex;justify-content:space-between;gap:1rem}.pi-profile-head h2{font-size:1.45rem;font-weight:800;margin:.15rem 0}.pi-profile-head a{font-size:.78rem;color:var(--pi-blue);text-decoration:none}.pi-online{font-size:.68rem;color:#168d73;background:#e5f8f2;border-radius:99px;padding:.2rem .5rem}.pi-identity,.pi-contact{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.45rem}.pi-identity span{font-size:.72rem;background:#f2f6f9;border-radius:6px;padding:.24rem .48rem;color:#577086}.pi-contact span{font-size:.76rem;color:var(--pi-muted)}.pi-health-tags{display:grid;gap:.5rem}.pi-health-tags div{padding:.55rem .7rem;border-radius:10px;background:#f6fafb;display:flex;justify-content:space-between;gap:.6rem}.pi-health-tags small{color:var(--pi-muted)}.pi-health-tags strong{font-size:.76rem;text-align:right}.pi-health-tags .warn{color:#c66838}
.pi-no-photo{display:grid;place-items:center;width:100%;height:100%;color:#6b9db5}.pi-no-photo svg{width:42%;height:42%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.pi-avatar.mini .pi-no-photo svg{width:48%;height:48%}
.pi-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:.75rem;margin-bottom:1rem}.pi-stats article{display:flex;align-items:center;gap:.75rem;background:#fff;border:1px solid var(--pi-line);border-radius:15px;padding:.85rem 1rem}.pi-stats article div{display:flex;flex-direction:column}.pi-stats strong{font-size:1.45rem;line-height:1}.pi-stats small{color:var(--pi-muted);margin-top:.25rem}.pi-stat-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;font-size:1.2rem}.pi-stat-icon.blue{background:#eaf3ff;color:#2878e3}.pi-stat-icon.green{background:#e6f8f3;color:#1d9b7f}.pi-stat-icon.amber{background:#fff3e2;color:#dc8525}.pi-stat-icon.purple{background:#f1ecff;color:#7656cf}
.pi-documents{margin-bottom:1rem}.pi-doc-count{font-size:.7rem;color:#2878e3;background:#eaf3ff;border-radius:99px;padding:.3rem .6rem}.pi-document-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;max-height:250px;overflow:auto;padding-right:.2rem}.pi-document-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;width:100%;padding:.75rem;text-align:left;background:#fff;border:1px solid var(--pi-line);border-radius:13px;color:var(--pi-ink);transition:.18s}.pi-document-card:hover{border-color:#9ec4f6;background:#f8fbff;transform:translateY(-1px);box-shadow:0 5px 14px #3b73a512}.pi-document-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:13px}.pi-document-icon.opd{color:#2878e3;background:#eaf3ff}.pi-document-icon.profile{color:#15977b;background:#e6f8f2}.pi-document-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.pi-document-info{display:flex;min-width:0;flex-direction:column}.pi-document-info strong{font-size:.82rem}.pi-document-info small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pi-muted);font-size:.7rem;margin:.12rem 0}.pi-document-info em{font-style:normal;color:#96a3ae;font-size:.65rem}.pi-document-action{font-size:.7rem;font-weight:700;color:var(--pi-blue);white-space:nowrap}.pi-document-action b{font-size:1rem}.pi-preview-modal{height:min(90vh,900px)}.pi-preview-modal .modal-body{position:relative;padding:0;background:#eef3f7;overflow:hidden}.pi-preview-modal iframe{width:100%;height:100%;min-height:65vh;border:0;background:#fff;opacity:0;transition:opacity .2s}.pi-preview-modal iframe.loaded{opacity:1}.pi-preview-loading{position:absolute;z-index:1;inset:0;display:flex;align-items:center;justify-content:center;gap:.7rem;color:var(--pi-muted);background:#f5f8fa}.pi-preview-loading[hidden]{display:none}.pi-preview-loading span{width:20px;height:20px;border:2px solid #cddce7;border-top-color:var(--pi-blue);border-radius:50%;animation:pi-spin .7s linear infinite}@keyframes pi-spin{to{transform:rotate(360deg)}}
.pi-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(330px,.75fr);gap:1rem}.pi-panel{padding:1.15rem}.pi-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}.pi-panel-head h2{font-size:1.05rem;font-weight:800;margin:0}.pi-panel-head p{font-size:.73rem;color:var(--pi-muted);margin:.2rem 0 0}.pi-filters{display:flex;gap:.4rem}.pi-filters select{border:1px solid #dce6ed;border-radius:9px;padding:.4rem .55rem;color:#526c80;background:#fff;font-size:.75rem}.pi-filters button{font-size:.73rem;padding:.42rem .7rem}.pi-timeline{position:relative}.pi-visit{display:flex;gap:.8rem;padding:.8rem 0;border-top:1px solid var(--pi-line)}.pi-visit:first-child{border-top:0;padding-top:0}.pi-visit-icon{flex:0 0 40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#eaf3ff;color:#2878e3}.pi-visit-icon.wound{background:#e8f8f2;color:#16977a}.pi-visit-body{min-width:0;flex:1}.pi-visit-top{display:flex;justify-content:space-between;gap:.7rem}.pi-visit-top span{font-size:.68rem;color:var(--pi-muted)}.pi-visit h3{font-size:.92rem;font-weight:800;margin:.15rem 0}.pi-visit-top em{height:max-content;font-style:normal;font-size:.66rem;background:#e9f8f2;color:#138269;border-radius:99px;padding:.25rem .5rem;white-space:nowrap}.pi-visit p{font-size:.76rem;color:#607589;margin:.25rem 0 .5rem}.pi-visit-meta{display:flex;justify-content:space-between;gap:.7rem;align-items:center;font-size:.68rem;color:#8a99a7}.pi-report-btn{border:0;background:transparent;color:var(--pi-blue);font-weight:700}.pi-report-btn b{font-size:1rem}.pi-chart-wrap{width:100%;height:250px}.pi-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:.8rem;font-size:.67rem;color:var(--pi-muted)}.pi-legend i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:.25rem}.pi-legend .sys{background:#2878e3}.pi-legend .dia{background:#23a88a}.pi-legend .pulse{background:#ec8b43}.pi-live{font-size:.65rem;color:#168d73;background:#e7f8f2;padding:.25rem .45rem;border-radius:99px}.pi-care{display:grid;grid-template-columns:auto 1fr;gap:.7rem;margin-top:1rem;background:linear-gradient(130deg,#eff8ff,#effaf6)}.pi-care-icon{font-size:1.5rem;color:#2d8bc5}.pi-care h3{font-size:.9rem;margin:0;font-weight:800}.pi-care p{font-size:.72rem;color:var(--pi-muted);margin:.2rem 0}.pi-care a{grid-column:1/-1;text-align:center;border:1px solid #9cc8e3;border-radius:9px;padding:.4rem;color:#277cad;text-decoration:none;font-size:.75rem;font-weight:700}
.pi-empty,.pi-welcome{text-align:center;padding:3rem 1rem;color:var(--pi-muted)}.pi-empty>span,.pi-welcome-art{display:block;font-size:2.6rem;color:#79a6c8}.pi-empty h2,.pi-welcome h2{font-size:1.15rem;color:var(--pi-ink);margin:.7rem 0 .25rem}.pi-empty p,.pi-welcome p{font-size:.82rem}.pi-empty.compact{padding:2rem 1rem}.pi-empty.compact>span{font-size:1.8rem}.pi-empty.compact h3{font-size:.9rem;color:var(--pi-ink);margin:.5rem 0 .2rem}.pi-welcome-art{position:relative;width:80px;margin:auto}.pi-welcome-art i{position:absolute;font-size:1rem;font-style:normal;color:#25a285}.pi-modal{border:0;border-radius:20px;overflow:hidden}.pi-modal .modal-header{background:linear-gradient(120deg,#edf7ff,#effaf7);padding:1.2rem 1.4rem}.pi-modal .modal-title{font-size:1.25rem;font-weight:800}.pi-modal-date{color:var(--pi-muted);font-size:.8rem;margin-bottom:1rem}.pi-report-grid{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}.pi-report-grid>div{background:#f6f9fb;border-radius:12px;padding:.8rem}.pi-report-grid small{color:var(--pi-muted)}.pi-report-grid p{margin:.3rem 0 0;font-size:.82rem}
@media(max-width:1100px){.pi-dashboard-grid{grid-template-columns:1fr}.pi-profile{grid-template-columns:auto 1fr}.pi-health-tags{grid-column:1/-1;grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.pi-hero{padding:1.2rem}.pi-shield{display:none}.pi-search-row{flex-direction:column}.pi-search-row>button{width:100%}.pi-patient-grid,.pi-stats,.pi-document-grid{grid-template-columns:1fr}.pi-profile{grid-template-columns:1fr;text-align:center}.pi-avatar{margin:auto}.pi-profile-head{display:block}.pi-identity,.pi-contact{justify-content:center}.pi-health-tags{grid-template-columns:1fr;text-align:left}.pi-panel-head{display:block}.pi-filters{margin-top:.7rem}.pi-report-grid{grid-template-columns:1fr}}
@media(max-width:460px){.pi-patient-grid,.pi-stats{grid-template-columns:1fr}.pi-filters{display:grid;grid-template-columns:1fr 1fr}.pi-filters button{grid-column:1/-1}.pi-visit-meta{align-items:flex-start;flex-direction:column}}

/* Central system administration */
.controller-systemadmin .app-shell{background:#f3f7f9;max-width:none}.sa-page{max-width:1500px;margin:0 auto;padding:22px 0;color:#183449}.sa-hero,.sa-page-head{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:22px}.sa-hero{padding:30px 34px;border-radius:24px;background:linear-gradient(125deg,#102f46,#096c78);color:#fff;box-shadow:0 18px 45px rgba(16,47,70,.18)}.sa-hero span,.sa-page-head span,.sa-panel-head span{color:#38cbbb;font-size:.7rem;font-weight:900;letter-spacing:.14em}.sa-hero h1,.sa-page-head h1{margin:.35rem 0;font-weight:850;letter-spacing:-.035em}.sa-hero h1{color:#fff!important}.sa-hero p{margin:0;color:#d6e8ee}.sa-live{padding:10px 14px;border:1px solid #ffffff2c;border-radius:99px;background:#ffffff12;font-size:.75rem;white-space:nowrap}.sa-live i{display:inline-block;width:8px;height:8px;margin-right:7px;border-radius:50%;background:#52e3a4;box-shadow:0 0 0 5px #52e3a422}.sa-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:20px}.sa-kpis a{display:grid;gap:4px;padding:20px;border:1px solid #dde8ec;border-radius:18px;background:#fff;color:#183449;text-decoration:none;box-shadow:0 8px 25px rgba(23,55,74,.05);transition:.18s}.sa-kpis a:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(23,55,74,.09)}.sa-kpis span{color:#657d8c;font-size:.72rem}.sa-kpis strong{font-size:1.8rem}.sa-kpis small{color:#8496a1}.sa-kpis .attention{border-color:#efc98a;background:#fffaf1}.sa-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.sa-panel{padding:22px;border:1px solid #dfe9ed;border-radius:20px;background:#fff;box-shadow:0 8px 25px rgba(23,55,74,.045)}.sa-panel.span2{grid-column:1/-1}.sa-panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:15px}.sa-panel-head h2{margin:.2rem 0;font-size:1.15rem;font-weight:850}.sa-panel-head>a{font-size:.78rem;font-weight:750;text-decoration:none}.sa-table{margin:0}.sa-table thead th{padding:.7rem;border:0;background:#f3f7f9;color:#607987;font-size:.68rem;text-transform:uppercase}.sa-table tbody td{padding:.85rem .7rem;border-color:#edf1f3;vertical-align:middle}.sa-table td small{display:block;color:#81929d;font-size:.7rem;margin-top:3px}.sa-table td>a:not(.btn){font-weight:750;text-decoration:none}.sa-status{display:inline-block;padding:5px 9px;border-radius:99px;background:#edf2f4;color:#607580;font-size:.66rem;font-weight:850}.sa-status.active,.sa-status.approved,.sa-status.replied{background:#def5ea;color:#087454}.sa-status.pending,.sa-status.new{background:#fff0d5;color:#9b6200}.sa-status.suspended,.sa-status.rejected,.sa-status.closed{background:#fde5e4;color:#aa3f39}.sa-status.inprogress{background:#e4efff;color:#2966b4}.sa-feed{display:grid}.sa-feed>a,.sa-feed>div{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid #edf1f3;color:inherit;text-decoration:none}.sa-feed i{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#e6f5f3;color:#087f72;font-style:normal;font-weight:850}.sa-feed i.slip{background:#e3f6ea;color:#16804d}.sa-feed i.message{background:#e8efff;color:#386dc4}.sa-feed>*>div{display:grid}.sa-feed small{color:#7e919d}.sa-audit{display:grid}.sa-audit article{display:grid;grid-template-columns:145px 180px 100px 1fr;gap:12px;padding:10px 0;border-bottom:1px solid #edf1f3;font-size:.76rem}.sa-audit time,.sa-audit span{color:#80929d}.sa-audit p{margin:0;color:#5d7482}.sa-page-head{padding:12px 6px}.sa-page-head p{margin:0;color:#6e8390}.sa-total{padding:14px 18px;border-radius:15px;background:#e6f5f1;text-align:right}.sa-total small,.sa-total strong{display:block}.sa-total strong{color:#087967;font-size:1.25rem}.sa-filter{display:grid;grid-template-columns:1fr 220px auto;gap:10px;margin-bottom:17px;padding:13px;border:1px solid #dfe8ec;border-radius:16px;background:#fff}.sa-filter.compact{grid-template-columns:260px auto;width:max-content}.clinic-admin-head{display:flex;align-items:center;gap:16px;padding:25px;border-radius:20px;background:#fff;border:1px solid #dfe8ec}.clinic-admin-head>div:nth-child(2){flex:1}.clinic-admin-head h1{margin:3px 0;font-weight:850}.clinic-admin-head p{margin:0;color:#718691}.clinic-admin-head>div>span{color:#087f72;font-size:.72rem;font-weight:850}.clinic-admin-mark{display:grid;place-items:center;width:58px;height:58px;border-radius:17px;background:linear-gradient(145deg,#0d6680,#16a58f);color:#fff;font-size:1.5rem;font-weight:850}.clinic-admin-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:15px 0}.clinic-admin-stats div{padding:17px;border-radius:16px;background:#fff;border:1px solid #dfe8ec}.clinic-admin-stats small,.clinic-admin-stats strong{display:block}.clinic-admin-stats small{color:#718691}.clinic-admin-stats strong{font-size:1.45rem}.sa-breadcrumb{display:flex;gap:8px;margin:5px 0 14px;color:#728690;font-size:.78rem}.sa-action-form{display:grid;gap:10px}.sa-slip-modal{border:0;border-radius:20px;overflow:hidden}.sa-slip-modal .modal-header{background:#eff7f8}.sa-slip-modal iframe{width:100%;height:70vh;border:0;background:#e9eef1}.process-slip-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:20px}.process-slip-grid iframe{height:540px;border-radius:14px}.process-clinic{margin-bottom:15px;padding:12px;border-radius:12px;background:#edf7f6;font-weight:850}.message-admin-list{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.message-admin-list article header h2{margin:10px 0 3px;font-size:1.1rem;font-weight:850}.message-admin-list article>p{min-height:60px;padding:14px;border-radius:12px;background:#f6f8f9;white-space:pre-wrap}.message-admin-list form{display:grid;gap:10px}.message-admin-list form>div{display:grid;grid-template-columns:1fr auto;gap:10px}.quota-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.slip-submit-grid{grid-template-columns:1fr 1fr!important;gap:18px!important}.slip-submit-grid>div{display:grid;gap:7px}.slip-submit-grid .col-span-2{grid-column:1/-1}
@media(max-width:1000px){.sa-kpis{grid-template-columns:1fr 1fr}.sa-grid,.message-admin-list{grid-template-columns:1fr}.sa-panel.span2{grid-column:auto}.sa-audit article{grid-template-columns:120px 1fr}.sa-audit span,.sa-audit p{grid-column:2}.process-slip-grid{grid-template-columns:1fr}.process-slip-grid iframe{height:420px}.clinic-admin-stats{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.sa-page{padding:12px 0}.sa-hero,.sa-page-head{align-items:flex-start;flex-direction:column}.sa-kpis{grid-template-columns:1fr}.sa-live{white-space:normal}.sa-filter,.sa-filter.compact{grid-template-columns:1fr;width:100%}.clinic-admin-head{align-items:flex-start;flex-wrap:wrap}.clinic-admin-head .sa-status{margin-left:74px}.clinic-admin-stats{grid-template-columns:1fr 1fr}.sa-audit article{grid-template-columns:1fr}.sa-audit span,.sa-audit p{grid-column:auto}.slip-submit-grid{grid-template-columns:1fr!important}.slip-submit-grid .col-span-2{grid-column:auto}.quota-actions{grid-column:1/-1;justify-content:stretch}.quota-actions .btn{flex:1}.message-admin-list form>div{grid-template-columns:1fr}}

/* ICD-10 autocomplete */
.icd-autocomplete{position:relative}.icd-code-mark{font-size:.7rem;font-weight:800;letter-spacing:.08em;color:#246bdb;background:#eaf3ff;border-color:#cfdeeb}.icd-code-mark.alt{color:#14866f;background:#e7f8f2}.icd-results{position:absolute;z-index:1060;top:calc(100% - 1.2rem);left:0;right:0;max-height:310px;overflow:auto;padding:.35rem;background:#fff;border:1px solid #d9e5ed;border-radius:12px;box-shadow:0 14px 35px #24465f2b}.icd-result-item{display:grid;grid-template-columns:70px minmax(0,1fr);gap:.1rem .6rem;width:100%;border:0;border-radius:9px;background:transparent;padding:.6rem .7rem;text-align:left;color:#18334d}.icd-result-item:hover,.icd-result-item:focus{background:#edf6ff;outline:0}.icd-result-item strong{grid-row:1/3;color:#246bdb;font-size:.82rem}.icd-result-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.78rem;font-weight:650}.icd-result-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7b8d9d;font-size:.67rem}.icd-result-empty{padding:.8rem;text-align:center;color:#7b8d9d;font-size:.78rem}.icd-selected{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.45rem}.icd-chip{display:inline-flex;align-items:center;gap:.35rem;max-width:100%;padding:.28rem .5rem;border-radius:99px;background:#e8f8f2;color:#167a68;font-size:.7rem;font-weight:700}.icd-chip.primary{background:#eaf3ff;color:#246bdb}.icd-chip button{display:grid;place-items:center;width:17px;height:17px;padding:0;border:0;border-radius:50%;background:#ffffffa8;color:inherit;font-size:.9rem;line-height:1}

.wound-report { max-width: 210mm; color: #111; }
.wound-report-photo { width: 100%; height: 220px; object-fit: contain; border: 1px solid #bbb; }
@media print {
  .wound-report { max-width: none; padding: 0 !important; }
  .wound-report-photo { height: 62mm; }
}

.footer {
  background: color-mix(in srgb, var(--bs-body-bg) 72%, transparent);
  backdrop-filter: blur(10px);
}

.status-kpi {
  background: color-mix(in srgb, var(--bs-body-bg) 90%, var(--bs-primary) 10%);
  border: 1px solid var(--sc-line);
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 2.25rem;
  overflow: hidden;
  position: relative;
  border-radius: 1.15rem;
  color: #fff;
  background:
    radial-gradient(circle at 82% 0%, rgba(111, 211, 255, 0.28), transparent 30%),
    linear-gradient(125deg, #203c5a 0%, #265f9c 58%, #287bd3 100%);
  box-shadow: 0 16px 38px rgba(23, 67, 112, 0.2);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -4rem;
  bottom: -7rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  border: 3rem solid rgba(255, 255, 255, 0.05);
}

.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-hero-identity {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-width: 0;
}

.dashboard-hero-copy {
  min-width: 0;
}

.dashboard-clinic-logo-frame {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 12px 30px rgba(7, 35, 67, 0.24),
    0 0 0 5px rgba(255, 255, 255, 0.08);
}

.dashboard-clinic-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dashboard-eyebrow,
.dashboard-panel-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: #79bdf8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.dashboard-hero h1 {
  margin: 0 0 0.4rem;
  color: #fff;
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  font-weight: 800;
}

.dashboard-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.dashboard-hero-status {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 310px;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.dashboard-hero-status strong,
.dashboard-hero-status small {
  display: block;
}

.dashboard-hero-status small {
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
}

.dashboard-live-dot {
  width: 0.8rem;
  height: 0.8rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0.35rem rgba(74, 222, 128, 0.16);
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-kpi {
  --kpi-color: 54, 132, 230;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.85rem;
  padding: 1.25rem;
  border: 1px solid rgba(var(--kpi-color), 0.22);
  border-radius: 1rem;
  color: var(--sc-ink);
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--kpi-color), 0.14), transparent 38%),
    var(--sc-panel);
  box-shadow: var(--sc-shadow-sm);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-kpi:hover {
  color: var(--sc-ink);
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(var(--kpi-color), 0.16);
}

.dashboard-kpi-green { --kpi-color: 36, 174, 112; }
.dashboard-kpi-violet { --kpi-color: 133, 92, 216; }
.dashboard-kpi-orange { --kpi-color: 235, 142, 49; }

.dashboard-kpi-icon {
  grid-row: 1 / span 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.85rem;
  background: rgba(var(--kpi-color), 0.13);
  font-size: 1.3rem;
}

.dashboard-kpi-icon svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: rgb(var(--kpi-color));
}

.dashboard-kpi-label {
  color: var(--bs-secondary-color);
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-kpi strong {
  color: rgb(var(--kpi-color));
  font-size: 1.85rem;
  line-height: 1.1;
}

.dashboard-kpi small {
  color: var(--bs-secondary-color);
  font-size: 0.73rem;
}

.dashboard-panel {
  overflow: hidden;
}

.dashboard-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dashboard-panel-heading h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.dashboard-total-pill {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: #2d639b;
  background: #eaf4ff;
  font-size: 0.75rem;
  font-weight: 800;
}

.dashboard-bar-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(38px, 1fr));
  gap: clamp(0.55rem, 2vw, 1.25rem);
  min-height: 245px;
  padding: 0.75rem 0.5rem 0;
}

.dashboard-bar-item {
  display: grid;
  grid-template-rows: 1.25rem 1fr auto auto;
  gap: 0.3rem;
  min-width: 0;
  text-align: center;
}

.dashboard-bar-value {
  color: #2c6eae;
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard-bar-track {
  display: flex;
  align-items: flex-end;
  min-height: 150px;
  overflow: hidden;
  border-radius: 0.6rem 0.6rem 0.25rem 0.25rem;
  background: linear-gradient(180deg, rgba(48, 126, 207, 0.04), rgba(48, 126, 207, 0.1));
}

.dashboard-bar-fill {
  width: 100%;
  min-height: 0.45rem;
  border-radius: 0.6rem 0.6rem 0.2rem 0.2rem;
  background: linear-gradient(180deg, #69b9f2 0%, #2677c8 100%);
  box-shadow: 0 -5px 16px rgba(38, 119, 200, 0.18);
}

.dashboard-bar-item strong {
  font-size: 0.75rem;
}

.dashboard-bar-item small {
  color: var(--bs-secondary-color);
  font-size: 0.68rem;
}

.dashboard-gender-layout {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 1.5rem;
}

.dashboard-donut {
  --male: 0%;
  --female: 0%;
  display: grid;
  width: 145px;
  height: 145px;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(#3b91e3 0 var(--male), #e76da5 var(--male) calc(var(--male) + var(--female)), #b9c5d3 0);
}

.dashboard-donut::after {
  content: "";
  position: absolute;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background: var(--sc-panel);
}

.dashboard-donut div {
  z-index: 1;
  text-align: center;
}

.dashboard-donut strong,
.dashboard-donut small {
  display: block;
}

.dashboard-donut strong {
  font-size: 1.6rem;
}

.dashboard-donut small {
  color: var(--bs-secondary-color);
  font-size: 0.72rem;
}

.dashboard-legend {
  display: grid;
  gap: 0.7rem;
}

.dashboard-legend > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
}

.legend-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

.legend-dot.male { background: #3b91e3; }
.legend-dot.female { background: #e76da5; }
.legend-dot.other { background: #b9c5d3; }

.dashboard-coverage {
  display: grid;
  gap: 0.95rem;
  margin-top: 1.5rem;
}

.dashboard-coverage > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.8rem;
  align-items: center;
  font-size: 0.78rem;
}

.dashboard-coverage .progress {
  grid-column: 1 / -1;
  height: 0.45rem;
  border-radius: 999px;
}

.dashboard-activity-list {
  display: grid;
}

.dashboard-activity-item {
  display: grid;
  grid-template-columns: auto minmax(160px, 1.1fr) minmax(180px, 2fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--sc-line);
  color: var(--sc-ink);
  text-decoration: none;
  transition: background-color 0.18s ease, padding 0.18s ease;
}

.dashboard-activity-item:hover {
  padding-left: 0.8rem;
  color: var(--sc-ink);
  background: color-mix(in srgb, var(--bs-body-bg) 90%, #eaf4ff 10%);
}

.dashboard-activity-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: #2263a0;
  background: #e7f2ff;
  font-size: 0.76rem;
  font-weight: 800;
}

.dashboard-activity-patient strong,
.dashboard-activity-patient small {
  display: block;
}

.dashboard-activity-patient small,
.dashboard-activity-item time {
  color: var(--bs-secondary-color);
  font-size: 0.72rem;
}

.dashboard-activity-diagnosis {
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-activity-arrow {
  color: #3584cf;
  font-size: 1.5rem;
}

.dashboard-empty {
  padding: 2.5rem;
  color: var(--bs-secondary-color);
  text-align: center;
}

.smartclinic-status-header {
  border-bottom: 0;
}

.opd-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.opd-status-panel {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 220px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--sc-line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: var(--sc-shadow-sm);
}

.opd-status-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: var(--bs-success);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.14);
}

.opd-step-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.opd-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--sc-line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.78);
  color: var(--bs-secondary-color);
}

.opd-step span,
.opd-section-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-body-color) 10%, transparent);
  color: var(--sc-ink);
  font-weight: 700;
}

.opd-step.active {
  border-color: rgba(var(--sc-rgb-primary), 0.35);
  background: rgba(var(--sc-rgb-primary), 0.08);
  color: var(--sc-ink);
}

.opd-step.active span,
.opd-section-index {
  background: var(--sc-primary);
  color: #fff;
}

.opd-form-card {
  overflow: visible;
}

.opd-form-section {
  padding: 1rem;
  border: 1px solid var(--sc-line);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--bs-body-bg) 82%, var(--bs-primary) 6%);
}

.opd-form-section + .opd-form-section {
  margin-top: 1rem;
}

.opd-form-section-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.opd-form-section-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.opd-form-section-header p {
  margin: 0.15rem 0 0;
  color: var(--bs-secondary-color);
  font-size: 0.88rem;
}

.opd-action-bar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 3;
  padding: 0.85rem;
  border: 1px solid var(--sc-line);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--bs-body-bg) 92%, transparent);
  box-shadow: var(--sc-shadow);
  backdrop-filter: blur(10px);
}

.opd-form-section textarea.form-control {
  min-height: 6rem;
}

.opd-recent-list .opd-recent-item {
  border-bottom: 1px solid color-mix(in srgb, var(--sc-line) 85%, #dbe7f7 15%);
  transition: background-color 0.18s ease;
}

.opd-recent-list .opd-recent-item:hover {
  background: color-mix(in srgb, var(--bs-body-bg) 92%, #eef5ff 8%);
}

.opd-recent-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.86rem;
  color: #134a84;
  background: linear-gradient(145deg, #ecf4ff 0%, #dcecff 100%);
  border: 1px solid #bfd9fb;
  box-shadow: 0 2px 8px rgba(57, 110, 169, 0.14);
}

.opd-records-table tbody tr {
  transition: background-color 0.18s ease;
}

.opd-records-table tbody td {
  font-size: 0.78rem;
  line-height: 1.35;
}

.opd-records-table tbody td .small {
  font-size: 0.72rem;
}

.opd-records-table tbody td:nth-child(3),
.opd-records-table tbody td:nth-child(4) {
  white-space: nowrap;
}

.opd-records-table thead th:first-child,
.opd-records-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bs-body-bg);
}

.opd-records-table thead th:first-child {
  z-index: 2;
}

.opd-records-table tbody tr:nth-child(odd) {
  background: color-mix(in srgb, var(--bs-body-bg) 96%, #eef6ff 4%);
}

.opd-records-table tbody tr:hover {
  background: color-mix(in srgb, var(--bs-body-bg) 88%, #e4f0ff 12%);
}

.opd-record-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.83rem;
  color: #1f4f86;
  background: linear-gradient(145deg, #edf5ff 0%, #daebff 100%);
  border: 1px solid #bfd8f9;
}

.opd-records-table tbody tr:nth-child(1) .opd-record-rank {
  color: #6f4a00;
  background: linear-gradient(145deg, #fff5dc 0%, #ffe8b5 100%);
  border-color: #f1cf84;
}

.opd-records-table tbody tr:nth-child(2) .opd-record-rank {
  color: #3c4f63;
  background: linear-gradient(145deg, #f5f8fc 0%, #e5edf7 100%);
  border-color: #cad7e8;
}

.opd-records-table tbody tr:nth-child(3) .opd-record-rank {
  color: #5f4b24;
  background: linear-gradient(145deg, #fff3e7 0%, #ffe0c2 100%);
  border-color: #efc99e;
}

.signature-thumb {
  max-height: 54px;
  max-width: 160px;
  object-fit: contain;
  border-radius: 0.5rem;
  border: 1px solid var(--sc-line);
  padding: 0.25rem;
  background: #fff;
}

.signatures-table tbody tr {
  transition: background-color 0.18s ease;
}

.signatures-table {
  --sig-col-rank-width: 70px;
  --sig-col-cid-width: 220px;
  --sig-sticky-separator: color-mix(in srgb, var(--sc-line) 82%, #d8e6f8 18%);
}

.signatures-table thead th:first-child,
.signatures-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bs-body-bg);
}

.signatures-table thead th:first-child {
  z-index: 2;
}

.signatures-table thead th:nth-child(2),
.signatures-table tbody td:nth-child(2) {
  position: sticky;
  left: var(--sig-col-rank-width);
  z-index: 1;
  background: var(--bs-body-bg);
}

.signatures-table thead th:nth-child(2) {
  z-index: 2;
}

.signatures-table thead th:nth-child(3),
.signatures-table tbody td:nth-child(3) {
  position: sticky;
  left: calc(var(--sig-col-rank-width) + var(--sig-col-cid-width));
  z-index: 1;
  background: var(--bs-body-bg);
  border-right: 1px solid var(--sig-sticky-separator);
}

.signatures-table thead th:nth-child(3) {
  z-index: 2;
}

.signatures-table thead th:nth-child(1),
.signatures-table thead th:nth-child(2),
.signatures-table thead th:nth-child(3),
.signatures-table tbody td:nth-child(1),
.signatures-table tbody td:nth-child(2),
.signatures-table tbody td:nth-child(3) {
  box-shadow: 1px 0 0 var(--sig-sticky-separator);
}

.signatures-table thead th:nth-child(3),
.signatures-table tbody td:nth-child(3) {
  box-shadow: 2px 0 8px rgba(31, 79, 134, 0.06);
}

@media (max-width: 992px) {
  .signatures-table thead th:nth-child(3),
  .signatures-table tbody td:nth-child(3) {
    position: static;
    left: auto;
    border-right: 0;
    box-shadow: none;
  }
}

.signatures-table tbody tr:nth-child(odd) {
  background: color-mix(in srgb, var(--bs-body-bg) 96%, #eef6ff 4%);
}

.signatures-table tbody tr:hover {
  background: color-mix(in srgb, var(--bs-body-bg) 88%, #e4f0ff 12%);
}

.signature-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.83rem;
  color: #1f4f86;
  background: linear-gradient(145deg, #edf5ff 0%, #daebff 100%);
  border: 1px solid #bfd8f9;
}

.signatures-table tbody tr:nth-child(1) .signature-rank {
  color: #6f4a00;
  background: linear-gradient(145deg, #fff5dc 0%, #ffe8b5 100%);
  border-color: #f1cf84;
}

.signatures-table tbody tr:nth-child(2) .signature-rank {
  color: #3c4f63;
  background: linear-gradient(145deg, #f5f8fc 0%, #e5edf7 100%);
  border-color: #cad7e8;
}

.signatures-table tbody tr:nth-child(3) .signature-rank {
  color: #5f4b24;
  background: linear-gradient(145deg, #fff3e7 0%, #ffe0c2 100%);
  border-color: #efc99e;
}

.signature-patient-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--sc-line);
  background: #fff;
  flex-shrink: 0;
}

.report-paper {
  max-width: 1100px;
  margin: 0 auto;
}

.report-results-table tbody tr {
  transition: background-color 0.18s ease;
}

.report-results-table tbody tr:nth-child(odd) {
  background: color-mix(in srgb, var(--bs-body-bg) 96%, #eef6ff 4%);
}

.report-results-table tbody tr:hover {
  background: color-mix(in srgb, var(--bs-body-bg) 88%, #e4f0ff 12%);
}

.report-results-table th:first-child,
.report-results-table td:first-child {
  width: 64px;
}

.report-row-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid #bfd8f9;
  background: linear-gradient(145deg, #edf5ff 0%, #daebff 100%);
  color: #1f4f86;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(57, 110, 169, 0.12);
}

.report-results-table tbody tr:nth-child(3n + 1) .report-row-rank {
  border-color: #f1cf84;
  background: linear-gradient(145deg, #fff5dc 0%, #ffe8b5 100%);
  color: #6f4a00;
}

.report-results-table tbody tr:nth-child(3n + 2) .report-row-rank {
  border-color: #b9dfcb;
  background: linear-gradient(145deg, #eefbf4 0%, #d9f2e5 100%);
  color: #24613f;
}

.report-signature-image {
  max-height: 90px;
  max-width: 340px;
  object-fit: contain;
}

.report-signature-placeholder {
  min-height: 72px;
  border: 1px dashed var(--sc-line);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-secondary-color);
}

.amed-report-sheet {
  position: relative;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 7mm 8mm 26mm;
  color: #111;
  font-size: 14px;
  line-height: 1.25;
}

.amed-report-header {
  position: relative;
  text-align: center;
  min-height: 36mm;
}

.amed-clinic-logo {
  position: absolute;
  top: 5mm;
  left: 5mm;
  width: 25mm;
  height: 25mm;
  object-fit: contain;
  z-index: 2;
}

.amed-report-logo {
  width: 25mm;
  height: 21mm;
  object-fit: contain;
  display: block;
  margin: 0 auto 1mm;
}

.amed-service-box {
  position: absolute;
  right: 0;
  top: 0;
  border: 1px solid #444;
  padding: 2mm 4mm;
  font-weight: 700;
  background: var(--bs-body-bg);
}

.amed-patient-photo {
  position: absolute;
  right: -5mm;
  top: 15mm;
  width: 28mm;
  height: 35mm;
  object-fit: cover;
  border: 1px solid #444;
  background: #fff;
}

.amed-report-title {
  font-size: 18px;
  text-align: center;
  font-weight: 700;
  margin: 0 0 1mm;
}

.amed-clinic-line {
  line-height: 1.3;
}

.amed-visit-line,
.amed-patient-line {
  display: flex;
  justify-content: center;
  gap: 10mm;
  flex-wrap: wrap;
  margin-bottom: 1mm;
}

.amed-patient-line {
  justify-content: flex-start;
  gap: 6mm;
}

.amed-section {
  display: flex;
  gap: 6px;
  margin-bottom: 3px;
}

.amed-label {
  font-weight: 700;
  white-space: nowrap;
}

.amed-value {
  flex: 1;
}

.amed-heading {
  font-size: 14px;
  font-weight: 700;
  margin: 5px 0 2px;
}

.amed-block {
  min-height: 22px;
}

.amed-preline {
  white-space: pre-line;
}

.amed-child-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.amed-medicine-list {
  display: grid;
  gap: 2px;
  margin-bottom: 3px;
}

.amed-medicine-item {
  padding-left: 4mm;
  text-indent: -4mm;
}

.amed-medicine-name {
  font-weight: 700;
}

.amed-signature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 8px;
  text-align: center;
}

.amed-signature-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.amed-signature-img,
.amed-signature-empty {
  width: 210px;
  height: 54px;
  object-fit: contain;
  margin: 0 auto 2px;
}

.amed-signature-empty {
  border-bottom: 1px dotted #555;
}

.amed-report-bottom {
  position: absolute;
  left: 8mm;
  right: 3mm;
  bottom: 7mm;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px;
}

.amed-revision-text {
  align-self: end;
  font-size: 12px;
}

.amed-auth-time {
  text-align: right;
  font-size: 13px;
}

.amed-barcode {
  grid-column: 2;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0;
}

.amed-barcode svg {
  display: block;
  max-width: 260px;
  height: 54px;
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body {
    background: #fff;
    margin: 0;
  }

  header,
  footer,
  .smartclinic-navbar {
    display: none !important;
  }

  .report-paper {
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  .report-toolbar {
    display: none !important;
  }

  .report-print-area {
    box-shadow: none !important;
    border: 0 !important;
  }

  .amed-report-sheet {
    position: relative;
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    box-shadow: none !important;
    padding: 7mm 8mm 26mm;
    font-size: 13px;
  }
}

@media (max-width: 991.98px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-hero-status {
    width: 100%;
    min-width: 0;
  }

  .dashboard-activity-item {
    grid-template-columns: auto 1fr auto;
  }

  .dashboard-activity-diagnosis {
    grid-column: 2 / -1;
  }

  .smartclinic-navbar .navbar-collapse {
    margin-top: 0.8rem;
    padding: 0.8rem;
    border-radius: 0.9rem;
    background: color-mix(in srgb, var(--bs-dark) 24%, transparent);
  }

  .smartclinic-navbar .nav-link {
    border-radius: 0.65rem;
  }

  .nav-tool,
  .nav-account {
    align-items: stretch !important;
    flex-wrap: wrap;
    padding-left: 0;
  }

  .opd-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .opd-status-panel {
    width: 100%;
  }

  .opd-step-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .dashboard-hero {
    padding: 1.5rem;
  }

  .dashboard-hero-identity {
    align-items: flex-start;
    gap: 0.9rem;
  }

  .dashboard-clinic-logo-frame {
    width: 64px;
    height: 64px;
    padding: 7px;
    border-radius: 0.9rem;
  }

  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-gender-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
  }

  .dashboard-legend {
    width: 100%;
  }

  .dashboard-bar-chart {
    gap: 0.35rem;
    overflow-x: auto;
  }

  .dashboard-activity-item {
    gap: 0.65rem;
  }

  .dashboard-activity-item time {
    display: none;
  }

  .opd-step-strip {
    grid-template-columns: 1fr;
  }

  .opd-action-bar .btn {
    flex: 1 1 100%;
  }
}

.consent-toolbar {
  display: flex;
  gap: 0.6rem;
  width: min(210mm, 100%);
  margin: 0 auto 1rem;
}

.self-pay-consent-sheet {
  width: min(210mm, 100%);
  min-height: 297mm;
  margin: 0 auto;
  padding: 8mm 10mm 7mm;
  color: #111;
  border: 1px solid #d7dce2;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  font-family: "TH Sarabun New", "Sarabun", "Leelawadee UI", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

.consent-clinic-header {
  display: grid;
  justify-items: center;
  text-align: center;
}

.consent-clinic-header strong {
  font-size: 18px;
}

.consent-clinic-header span {
  font-size: 13px;
}

.consent-clinic-logo {
  width: 18mm;
  height: 18mm;
  margin-bottom: 1mm;
  object-fit: contain;
}

.consent-divider {
  margin: 3mm 0;
  border-top: 1px solid #111;
}

.consent-title {
  margin-bottom: 4mm;
  text-align: center;
}

.consent-title h1 {
  margin: 0 0 1mm;
  color: #111;
  font-size: 19px;
  font-weight: 800;
}

.consent-title p {
  margin: 0;
}

.consent-visit-row,
.consent-patient-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5mm;
  margin-bottom: 2.2mm;
}

.consent-fill {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 6mm;
  padding: 0 2mm 0.5mm;
  border-bottom: 1px dotted #111;
  font-weight: 700;
  line-height: 1.1;
}

.consent-date-fill {
  min-width: 43mm;
}

.consent-auth-label {
  margin-left: 3mm;
}

.consent-auth-fill {
  min-width: 41mm;
}

.consent-name-fill {
  flex: 1 1 95mm;
}

.consent-citizen-fill {
  min-width: 90mm;
}

.consent-statements {
  display: grid;
  gap: 2.2mm;
  margin-top: 4mm;
}

.consent-statements p {
  margin: 0;
  text-align: justify;
  text-indent: 0;
}

.consent-checkbox {
  display: inline-grid;
  place-items: center;
  width: 4.4mm;
  height: 4.4mm;
  margin-right: 1mm;
  border: 1px solid #111;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  vertical-align: -0.6mm;
}

.consent-checkbox.checked {
  color: #0057b8;
}

.consent-choice {
  white-space: normal;
}

.consent-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18mm;
  margin: 8mm 12mm 5mm;
  text-align: center;
}

.consent-signature-space {
  display: grid;
  place-items: end center;
  height: 16mm;
}

.consent-signature-space img {
  max-width: 58mm;
  max-height: 16mm;
  object-fit: contain;
}

.consent-sign-line {
  position: relative;
  min-height: 6mm;
  border-bottom: 1px dotted #111;
}

.consent-signature > div,
.consent-signature > strong {
  display: block;
}

.consent-notes {
  margin-top: 3mm;
  padding-top: 2mm;
  border-top: 1px solid #111;
  font-size: 12px;
}

.consent-notes ol {
  margin: 1mm 0 0;
  padding-left: 5mm;
}

.consent-notes li {
  margin-bottom: 0.7mm;
}

@media print {
  .self-pay-consent-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 8mm 10mm 7mm;
    border: 0;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* SmartClinic unified experience layer */
:root {
  --sc-canvas: color-mix(in srgb, var(--bs-body-bg) 92%, #eaf3fb 8%);
  --sc-radius: 1rem;
  --sc-radius-sm: 0.7rem;
  --sc-shadow: 0 16px 38px rgba(15, 43, 70, 0.09);
  --sc-shadow-sm: 0 7px 20px rgba(15, 43, 70, 0.065);
}

body.app-body {
  display: flex;
  min-height: 100vh;
  margin-bottom: 0;
  flex-direction: column;
  background:
    radial-gradient(circle at 10% 0%, rgba(var(--sc-rgb-primary), 0.1), transparent 25rem),
    radial-gradient(circle at 90% 8%, rgba(var(--sc-rgb-info), 0.08), transparent 22rem),
    var(--sc-canvas);
}

.app-body > header,
.app-body > .app-shell,
.app-body > .app-footer {
  width: 100%;
}

.app-shell {
  flex: 1 0 auto;
}

.app-main {
  animation: app-content-in 0.28s ease-out;
}

@keyframes app-content-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1100;
  padding: 0.55rem 0.8rem;
  border-radius: 0.5rem;
  color: #fff;
  background: #153b62;
  transform: translateY(-150%);
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

.smartclinic-navbar {
  min-height: 4.25rem;
  margin-bottom: 1.5rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(circle at 82% -80%, rgba(110, 196, 255, 0.32), transparent 34%),
    linear-gradient(105deg, #243d58 0%, #285f98 56%, #2879c5 100%);
  box-shadow: 0 8px 24px rgba(18, 48, 78, 0.14);
}

.smartclinic-brand {
  min-width: max-content;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.1));
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy small {
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.smartclinic-navbar .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.5rem 0.62rem;
  font-size: 0.82rem;
}

.smartclinic-navbar .nav-link::before {
  content: attr(data-nav-icon);
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.45rem;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.52rem;
  font-weight: 800;
}

.smartclinic-navbar .nav-link.active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.theme-label {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.68rem;
  font-weight: 700;
}

.theme-select {
  min-width: 112px;
  color: #163d63;
  background-color: rgba(255, 255, 255, 0.94);
}

.user-chip {
  gap: 0.4rem;
  padding: 0.25rem 0.65rem 0.25rem 0.28rem;
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #3d8bd7, #235f9c);
  font-size: 0.68rem;
}

.card {
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow-sm) !important;
}

.card > .card-header {
  padding: 0.9rem 1.15rem;
  border-bottom-color: var(--sc-line);
  background: color-mix(in srgb, var(--bs-body-bg) 92%, var(--bs-primary) 8%);
  font-weight: 800;
}

.form-control,
.form-select {
  min-height: 2.65rem;
  border-radius: var(--sc-radius-sm);
  background-color: color-mix(in srgb, var(--bs-body-bg) 96%, white 4%);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--bs-body-bg);
}

.form-control::placeholder {
  color: color-mix(in srgb, var(--bs-secondary-color) 72%, transparent);
}

.input-group > .form-control:first-child,
.input-group > .form-select:first-child {
  border-radius: var(--sc-radius-sm) 0 0 var(--sc-radius-sm);
}

.btn {
  min-height: 2.35rem;
  border-radius: 0.65rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-primary {
  box-shadow: 0 5px 13px rgba(var(--sc-rgb-primary), 0.16);
}

.table {
  margin-bottom: 0;
}

.table thead th {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--sc-line) 80%, var(--bs-primary) 20%);
}

.table tbody td {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.table tbody tr {
  transition: background-color 0.16s ease;
}

.table tbody tr:hover {
  background: color-mix(in srgb, var(--bs-body-bg) 91%, var(--bs-primary) 9%);
}

.table-responsive {
  scrollbar-color: color-mix(in srgb, var(--bs-secondary-color) 45%, transparent) transparent;
  scrollbar-width: thin;
}

.pagination {
  gap: 0.2rem;
}

.pagination .page-link {
  min-width: 2rem;
  border-radius: 0.5rem !important;
  text-align: center;
}

.alert {
  border: 0;
  border-left: 4px solid currentColor;
  border-radius: 0.75rem;
  box-shadow: var(--sc-shadow-sm);
}

.validation-summary-errors {
  padding: 0.8rem 0.9rem;
  border-left: 4px solid var(--bs-danger);
  border-radius: 0.65rem;
  color: var(--bs-danger-text-emphasis);
  background: var(--bs-danger-bg-subtle);
  font-size: 0.82rem;
}

.validation-summary-errors ul {
  margin: 0;
  padding-left: 1.1rem;
}

.field-validation-error {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.75rem;
}

.modal-content {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 24px 70px rgba(14, 35, 57, 0.24);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem !important;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -8rem;
  width: 24rem;
  height: 24rem;
  border: 3.5rem solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  pointer-events: none;
}

.hero-panel .row {
  position: relative;
  z-index: 1;
}

.hero-panel .display-5 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800 !important;
}

.hero-symbol,
.download-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-symbol svg,
.download-hero-icon svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: currentColor;
}

.download-hero-icon {
  color: var(--bs-primary);
  border-color: rgba(var(--sc-rgb-primary), 0.18);
  background: rgba(var(--sc-rgb-primary), 0.09);
}

.hero-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.hero-mini-stats span {
  min-width: 0;
  padding: 0.7rem 0.45rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
}

.hero-mini-stats strong,
.hero-mini-stats small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-mini-stats strong {
  color: #fff;
  font-size: 1.05rem;
}

.hero-mini-stats small {
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.64rem;
}

.opd-page-header {
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  background: color-mix(in srgb, var(--bs-body-bg) 92%, var(--bs-primary) 8%);
  box-shadow: var(--sc-shadow-sm);
}

.list-group-item {
  background: transparent;
}

.app-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--sc-line);
  background: color-mix(in srgb, var(--bs-body-bg) 86%, transparent);
  backdrop-filter: blur(12px);
}

.footer-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.5rem;
  color: #fff;
  background: linear-gradient(145deg, #356fa8, #244e76);
  font-size: 0.62rem;
  font-weight: 800;
}

.footer-status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: #35b979;
  box-shadow: 0 0 0 0.2rem rgba(53, 185, 121, 0.11);
}

.auth-shell {
  min-height: calc(100vh - 12rem);
  align-items: center;
  padding-bottom: 2rem;
}

.auth-card {
  position: relative;
  overflow: visible;
  border-top: 4px solid var(--sc-primary) !important;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: -6rem;
  right: -5rem;
  z-index: -1;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: rgba(var(--sc-rgb-primary), 0.08);
  filter: blur(2px);
}

.auth-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 0.9rem;
  color: #fff;
  background: linear-gradient(145deg, #337fc8, #214f7d);
  box-shadow: 0 8px 20px rgba(33, 79, 125, 0.2);
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-security-note {
  margin-top: 1.25rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.7rem;
  color: var(--bs-secondary-color);
  background: color-mix(in srgb, var(--bs-body-bg) 90%, var(--bs-info) 10%);
  font-size: 0.75rem;
  text-align: center;
}

.content-intro-card {
  border-left: 5px solid var(--sc-primary) !important;
  background:
    radial-gradient(circle at 95% 0%, rgba(var(--sc-rgb-info), 0.13), transparent 30%),
    var(--sc-panel);
}

.content-page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  background: var(--sc-panel);
  box-shadow: var(--sc-shadow-sm);
}

.content-page-header h1 {
  margin: 0.1rem 0;
  font-size: 1.55rem;
  font-weight: 800;
}

.content-page-header p {
  margin: 0;
  color: var(--bs-secondary-color);
}

.content-page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  flex-shrink: 0;
  border-radius: 1rem;
  color: #fff;
  background: linear-gradient(145deg, #3e91dc, #2668a7);
  font-size: 0.72rem;
  font-weight: 800;
}

.content-page-kicker {
  color: var(--bs-primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.privacy-status-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(53, 185, 121, 0.14), transparent 42%),
    var(--sc-panel);
}

.privacy-shield {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 50% 50% 45% 45%;
  color: #fff;
  background: #35a96f;
  box-shadow: 0 8px 18px rgba(53, 169, 111, 0.2);
  font-weight: 800;
}

.privacy-checklist {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.privacy-checklist li {
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--bs-body-bg) 90%, #dff6e9 10%);
  font-size: 0.83rem;
}

.pdpa-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  overflow: hidden;
  position: relative;
  border-radius: 1.2rem;
  color: #fff;
  background:
    radial-gradient(circle at 82% 0%, rgba(96, 205, 255, 0.28), transparent 32%),
    linear-gradient(125deg, #173b5e 0%, #2267a5 58%, #2886d5 100%);
  box-shadow: 0 18px 42px rgba(22, 71, 117, 0.18);
}

.pdpa-hero-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.pdpa-logo-frame {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 82px;
  height: 82px;
  padding: 9px;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 28px rgba(5, 35, 66, 0.25);
}

.pdpa-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pdpa-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: #9ddaff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.pdpa-hero h1 {
  margin: 0 0 0.4rem;
  color: #fff;
  font-size: clamp(1.6rem, 2.5vw, 2.35rem);
  font-weight: 800;
}

.pdpa-hero p {
  max-width: 850px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.pdpa-version {
  flex: 0 0 auto;
  min-width: 210px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.pdpa-version span,
.pdpa-version strong,
.pdpa-version small {
  display: block;
}

.pdpa-version span,
.pdpa-version small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.pdpa-version strong {
  margin: 0.15rem 0;
}

.pdpa-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.pdpa-summary > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.1rem 0.8rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--sc-line);
  border-radius: 1rem;
  background: var(--sc-panel);
  box-shadow: var(--sc-shadow-sm);
}

.pdpa-summary-icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.75rem;
  color: var(--bs-primary);
  font-size: 0.72rem;
  font-weight: 900;
  background: color-mix(in srgb, var(--bs-primary) 12%, var(--bs-body-bg));
}

.pdpa-summary small {
  color: var(--bs-secondary-color);
}

.pdpa-nav-card {
  position: sticky;
  top: 1rem;
  padding: 1.15rem;
  border: 1px solid var(--sc-line);
  border-radius: 1rem;
  background: var(--sc-panel);
  box-shadow: var(--sc-shadow-sm);
}

.pdpa-nav-title {
  margin-bottom: 0.55rem;
  font-weight: 800;
}

.pdpa-nav-card nav {
  display: grid;
  gap: 0.2rem;
}

.pdpa-nav-card nav a {
  padding: 0.55rem 0.65rem;
  border-radius: 0.65rem;
  color: var(--bs-body-color);
  font-size: 0.88rem;
}

.pdpa-nav-card nav a:hover {
  color: var(--bs-primary);
  background: color-mix(in srgb, var(--bs-primary) 9%, transparent);
}

.pdpa-nav-note {
  display: grid;
  gap: 0.25rem;
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 0.75rem;
  color: #714c00;
  background: #fff4d6;
  font-size: 0.8rem;
}

.pdpa-content {
  display: grid;
  gap: 1rem;
}

.pdpa-section {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  scroll-margin-top: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--sc-line);
  border-radius: 1rem;
  background: var(--sc-panel);
  box-shadow: var(--sc-shadow-sm);
}

.pdpa-section-number {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.8rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  background: linear-gradient(145deg, #246cac, #3294e4);
}

.pdpa-section h2 {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.pdpa-section h3 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.pdpa-section p:last-child {
  margin-bottom: 0;
}

.pdpa-contact-grid,
.pdpa-info-grid,
.pdpa-rights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.pdpa-contact-grid > div,
.pdpa-info-grid article,
.pdpa-rights-grid > div {
  padding: 0.85rem;
  border: 1px solid var(--sc-line);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--bs-body-bg) 91%, var(--bs-primary) 9%);
}

.pdpa-contact-grid span,
.pdpa-contact-grid strong,
.pdpa-rights-grid strong,
.pdpa-rights-grid span {
  display: block;
}

.pdpa-contact-grid span,
.pdpa-rights-grid span,
.pdpa-muted {
  color: var(--bs-secondary-color);
  font-size: 0.86rem;
}

.pdpa-info-grid article.sensitive {
  border-color: #f1c36c;
  background: #fff7e5;
  color: #4f3809;
}

.pdpa-purpose-list {
  display: grid;
  gap: 0.65rem;
  padding-left: 1.2rem;
}

.pdpa-law-box,
.pdpa-alert {
  margin: 1rem 0;
  padding: 1rem;
  border-left: 4px solid var(--bs-primary);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--bs-primary) 8%, var(--bs-body-bg));
}

.pdpa-law-box p {
  margin: 0.35rem 0 0;
}

.pdpa-security-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.pdpa-security-row span {
  padding: 0.45rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--bs-success) 34%, var(--sc-line));
  border-radius: 999px;
  color: color-mix(in srgb, var(--bs-success) 70%, var(--bs-body-color));
  background: color-mix(in srgb, var(--bs-success) 8%, var(--bs-body-bg));
  font-size: 0.82rem;
  font-weight: 700;
}

.pdpa-contact-section {
  border-color: color-mix(in srgb, var(--bs-primary) 38%, var(--sc-line));
}

.pdpa-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.pdpa-contact-actions a {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--bs-primary);
  border-radius: 0.7rem;
  color: var(--bs-primary);
  font-weight: 700;
}

.pdpa-contact-actions a:hover {
  color: #fff;
  background: var(--bs-primary);
}

@media (max-width: 991.98px) {
  .pdpa-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .pdpa-version {
    min-width: 0;
  }

  .pdpa-summary {
    grid-template-columns: 1fr;
  }

  .pdpa-nav-card {
    position: static;
  }
}

@media (max-width: 575.98px) {
  .pdpa-hero {
    padding: 1.25rem;
  }

  .pdpa-hero-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .pdpa-logo-frame {
    width: 64px;
    height: 64px;
  }

  .pdpa-section {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .pdpa-contact-grid,
  .pdpa-info-grid,
  .pdpa-rights-grid {
    grid-template-columns: 1fr;
  }
}

.system-state-page {
  max-width: 620px;
  margin: 8vh auto;
  padding: 2.5rem;
  border: 1px solid var(--sc-line);
  border-radius: 1.2rem;
  background: var(--sc-panel);
  box-shadow: var(--sc-shadow);
  text-align: center;
}

.system-state-icon {
  display: grid;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  place-items: center;
  border-radius: 50%;
  color: #b94747;
  background: #ffe8e8;
  font-size: 1.8rem;
  font-weight: 800;
}

.system-state-page h1 {
  margin: 0.3rem 0 0.6rem;
  font-size: 1.7rem;
  font-weight: 800;
}

.system-state-page p {
  color: var(--bs-secondary-color);
}

.system-request-id {
  margin: 1rem 0;
  padding: 0.7rem;
  border-radius: 0.6rem;
  background: var(--bs-tertiary-bg);
  font-size: 0.75rem;
}

.controller-clinics .card,
.controller-nhssomasters .card,
.controller-clinicusers .card,
.controller-downloads .card {
  border-color: color-mix(in srgb, var(--sc-line) 78%, var(--bs-primary) 22%) !important;
}

.controller-patients .recent-patient-avatar,
.controller-patientmedicalprofiles .opd-recent-rank,
.controller-medicalrecords .opd-record-rank,
.controller-signatures .signature-rank {
  box-shadow: 0 3px 10px rgba(34, 83, 130, 0.12);
}

@media (min-width: 1200px) and (max-width: 1540px) {
  .smartclinic-navbar .nav-link {
    padding-right: 0.48rem;
    padding-left: 0.48rem;
    font-size: 0.76rem;
  }

  .theme-label {
    display: none;
  }
}

@media (max-width: 1199.98px) {
  .smartclinic-navbar .nav-link {
    display: flex;
    width: 100%;
    border-radius: 0.65rem;
  }

  .smartclinic-navbar .nav-link::before {
    display: inline-flex;
  }
}

@media (max-width: 575.98px) {
  .app-shell {
    padding-right: 0.75rem !important;
    padding-left: 0.75rem !important;
  }

  .card-body.p-4,
  .card-body.p-lg-4 {
    padding: 1rem !important;
  }

  .hero-panel {
    padding: 1.35rem !important;
  }

  .opd-page-header {
    padding: 1rem;
  }
}

/* Balanced page-title scale */
.dashboard-hero {
  min-height: auto;
  padding: 1.45rem 1.8rem;
}

.dashboard-hero h1 {
  max-width: 980px;
  margin-bottom: 0.25rem;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.dashboard-hero p {
  font-size: 0.84rem;
}

.dashboard-eyebrow {
  margin-bottom: 0.45rem;
  font-size: 0.65rem;
}

.dashboard-hero-status {
  min-width: 270px;
  padding: 0.75rem 0.9rem;
}

.hero-panel {
  padding: 1.5rem 1.75rem !important;
}

.hero-panel .display-5 {
  margin-bottom: 0.45rem !important;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
}

.hero-panel .lead {
  max-width: 780px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.hero-symbol {
  width: 2.55rem;
  height: 2.55rem;
  margin-bottom: 0.65rem !important;
}

.hero-symbol svg {
  width: 1.3rem;
  height: 1.3rem;
}

.opd-page-header h1 {
  margin-bottom: 0.2rem !important;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  line-height: 1.25;
  font-weight: 800 !important;
}

.opd-page-header > div:first-child > .text-body-secondary:last-child {
  font-size: 0.82rem;
}

.content-page-header h1,
.system-state-page h1,
.auth-card h1,
.controller-patients .app-main > .d-flex h1,
.controller-clinics .card h1,
.controller-nhssomasters .card h1,
.controller-downloads .content-intro-card h1 {
  font-size: clamp(1.35rem, 1.8vw, 1.65rem) !important;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.controller-patients .app-main > .d-flex:first-of-type {
  padding: 1rem 1.15rem;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  background: var(--sc-panel);
  box-shadow: var(--sc-shadow-sm);
}

@media (max-width: 575.98px) {
  .dashboard-hero,
  .hero-panel {
    padding: 1.15rem !important;
  }

  .dashboard-hero h1,
  .hero-panel .display-5 {
    font-size: 1.4rem;
  }

  .dashboard-hero-status {
    padding: 0.7rem 0.8rem;
  }
}
/* Medication labels A15 */
.med-label-page{max-width:1600px;margin:auto}.med-label-hero{display:flex;justify-content:space-between;gap:2rem;align-items:center;padding:1.6rem 2rem;margin-bottom:1.25rem;border-radius:20px;background:linear-gradient(135deg,#063f55,#0794ad);color:#fff}.med-label-hero span,.panel-heading span,.live-preview-panel>span{font-size:.72rem;letter-spacing:.14em;font-weight:700}.med-label-hero h1{margin:.25rem 0}.med-label-hero p,.med-label-hero small{display:block;opacity:.85}.med-label-layout{display:grid;grid-template-columns:280px minmax(520px,1fr) 340px;gap:1rem;align-items:start}.med-template-panel,.med-editor-panel,.live-preview-panel{background:var(--bs-body-bg);border:1px solid rgba(100,120,140,.18);border-radius:18px;padding:1.1rem;box-shadow:0 8px 28px rgba(20,50,70,.08)}.panel-heading{display:flex;justify-content:space-between;align-items:center}.panel-heading h2,.live-preview-panel h2,.label-form-section h2{font-size:1.05rem;margin:.2rem 0 1rem}.med-template-list{max-height:720px;overflow:auto}.med-template-list section h3{font-size:.82rem;text-transform:uppercase;color:#087f9b;margin:1rem 0 .35rem}.med-template-item{display:flex;align-items:center;border:1px solid #dce7ea;border-radius:10px;margin:.35rem 0}.med-template-item>a{padding:.65rem;display:flex;flex-direction:column;flex:1;text-decoration:none;color:inherit}.med-template-item small{color:var(--bs-secondary-color)}.med-template-item form button{border:0;background:transparent;color:#b42318;font-size:1.4rem;padding:.5rem}.empty-template{text-align:center;padding:3rem 1rem;color:var(--bs-secondary-color)}.mode-selector{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.mode-selector label{cursor:pointer}.mode-selector input{position:absolute;opacity:0}.mode-selector span{display:flex;flex-direction:column;border:2px solid #dce7ea;border-radius:12px;padding:.85rem}.mode-selector input:checked+span{border-color:#0794ad;background:#e9fbff}.mode-selector small{color:var(--bs-secondary-color)}.label-form-section{padding:1rem 0;border-bottom:1px solid #e4ecef}.check-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;margin-top:1rem}.check-grid.advice{grid-template-columns:repeat(2,1fr)}.check-grid label{border:1px solid #dce7ea;padding:.55rem;border-radius:8px}.fields-disabled{opacity:.38;pointer-events:none}.print-settings{display:grid;grid-template-columns:repeat(4,1fr);gap:.65rem}.print-settings label{font-size:.8rem}.slot-preview{display:grid;grid-template-columns:repeat(2,58px);grid-template-rows:repeat(4,36px);gap:4px;margin:1rem auto;width:max-content}.slot-preview span{border:1px dashed #9aabb2;display:grid;place-items:center;border-radius:4px}.slot-preview span.selected{background:#0794ad;color:#fff;border-style:solid}.editor-actions{display:flex;justify-content:flex-end;gap:.75rem;padding-top:1rem}.live-preview-panel{position:sticky;top:90px}.mini-label{aspect-ratio:8/5;border:2px solid #0794ad;border-radius:8px;overflow:hidden;color:#08768c;font-size:9px}.mini-label header,.mini-label footer{background:#0794ad;color:#fff;text-align:center;padding:4px;font-weight:700}.mini-label small{display:block;text-align:center;font-size:6px}.mini-label p{margin:4px 8px;border-bottom:1px dotted #8db9c2;white-space:nowrap}.dimension-note{text-align:center;margin-top:.75rem;color:var(--bs-secondary-color)}@media(max-width:1200px){.med-label-layout{grid-template-columns:240px 1fr}.live-preview-panel{display:none}}@media(max-width:800px){.med-label-layout{grid-template-columns:1fr}.mode-selector,.print-settings{grid-template-columns:1fr 1fr}.med-label-hero{align-items:flex-start;flex-direction:column}.check-grid{grid-template-columns:1fr 1fr}}

/* Refined medication-label workspace */
.controller-medicationlabels .app-main{background:#f4f7f8}.med-label-page{color:#24343b}.med-label-hero{min-height:180px;padding:2rem 2.25rem;border:1px solid rgba(255,255,255,.12);border-radius:24px;background:linear-gradient(120deg,#073d50 0%,#075b6d 52%,#0b91a5 100%);box-shadow:0 18px 42px rgba(4,62,78,.16)}.med-label-hero-copy{max-width:700px}.med-label-hero-copy>span{color:#a9eff4}.med-label-hero h1{margin:.45rem 0 .55rem!important;color:#fff!important;font-size:clamp(1.8rem,3vw,2.65rem)!important;font-weight:700!important;line-height:1.15!important;letter-spacing:-.035em}.med-label-hero p{margin:0;color:#d6f3f5;font-size:.92rem}.med-clinic-chip{min-width:310px;max-width:420px;padding:1rem 1.15rem;border:1px solid rgba(255,255,255,.22);border-radius:16px;background:rgba(2,42,55,.26);backdrop-filter:blur(8px)}.med-clinic-chip small{margin-bottom:.3rem;color:#a9eff4;font-size:.7rem;text-transform:uppercase;letter-spacing:.1em}.med-clinic-chip strong{display:block;color:#fff;font-size:1rem;line-height:1.45}.med-clinic-chip span{display:block;margin-top:.25rem;color:#d7f2f4;font-size:.78rem;letter-spacing:0;font-weight:400;line-height:1.45}.med-label-layout{gap:1.25rem}.med-template-panel,.med-editor-panel,.live-preview-panel{border-color:#dde7e9;border-radius:20px;background:#fff;box-shadow:0 10px 30px rgba(28,57,66,.065)}.med-template-panel,.live-preview-panel{padding:1.3rem}.med-editor-panel{padding:1.4rem 1.6rem}.panel-heading{gap:.75rem}.panel-heading h2,.live-preview-panel h2,.label-form-section h2{color:#173b47;font-weight:700}.panel-heading span,.live-preview-panel>span{color:#13889a}.med-template-item{border-color:#e1eaec;background:#fbfcfc;transition:.18s ease}.med-template-item:hover{border-color:#82c8d1;background:#f1fbfc;transform:translateY(-1px)}.mode-selector{gap:1rem;margin-bottom:.4rem}.mode-selector span{min-height:92px;justify-content:center;border:1px solid #dbe7e9;border-radius:14px;background:#fafcfc;padding:1rem 1.1rem;transition:.18s ease}.mode-selector input:checked+span{border-color:#1592a4;background:#edf9fa;box-shadow:inset 0 0 0 1px #1592a4}.mode-selector strong{color:#173b47}.mode-selector small{margin-top:.25rem;line-height:1.45}.label-form-section{padding:1.45rem 0;border-color:#e6edef}.label-form-section h2{display:flex;align-items:center;gap:.55rem;margin-bottom:1.1rem}.label-form-section h2:before{content:"";width:5px;height:20px;border-radius:10px;background:#1592a4}.med-editor-panel .form-label,.print-settings label{color:#38545d;font-weight:600}.med-editor-panel .form-control,.med-editor-panel .form-select{min-height:44px;border-color:#d7e2e5;border-radius:10px;background-color:#fcfdfd}.med-editor-panel .form-control:focus,.med-editor-panel .form-select:focus{border-color:#2b9fae;box-shadow:0 0 0 .2rem rgba(21,146,164,.12)}.check-grid{gap:.65rem}.check-grid label{display:flex;align-items:center;gap:.45rem;min-height:44px;border-color:#dce7e9;border-radius:10px;background:#fafcfc;color:#3a535c;cursor:pointer}.check-grid label:has(input:checked){border-color:#58b1bd;background:#effafb;color:#086d7d}.slot-preview{grid-template-columns:repeat(2,72px);grid-template-rows:repeat(4,42px);gap:6px}.slot-preview span{border-color:#adbec3;border-radius:7px;background:#fafcfc;color:#688087}.slot-preview span.selected{border-color:#0d8799;background:linear-gradient(135deg,#0b7285,#14a2b5);box-shadow:0 4px 10px rgba(13,135,153,.18);color:#fff}.editor-actions{padding-top:1.25rem}.editor-actions .btn{min-width:150px;border-radius:10px;font-weight:700}.editor-actions .btn-primary{border-color:#0b8295;background:#0b8295}.live-preview-panel{padding-bottom:1.4rem}.mini-label{margin-top:.9rem;border-color:#1592a4;border-radius:10px;background:#fff;box-shadow:0 8px 18px rgba(10,100,115,.1)}.dimension-note{display:inline-flex;margin:1rem auto 0;padding:.35rem .65rem;border-radius:20px;background:#edf5f6;color:#547078;font-size:.75rem}@media(max-width:800px){.med-label-hero{min-height:auto;padding:1.4rem}.med-clinic-chip{min-width:0;width:100%}.med-editor-panel{padding:1.1rem}.editor-actions{flex-direction:column}.editor-actions .btn{width:100%}}
.mini-label.clinical{color:#173b47}.mini-label.clinical header{display:grid;grid-template-columns:1fr auto;gap:2px;padding:7px 8px;background:#078fa4}.mini-label.clinical header strong{overflow:hidden;color:#fff;font-size:9px;white-space:nowrap;text-overflow:ellipsis}.mini-label.clinical header b{padding:2px 5px;border-radius:10px;background:#fff;color:#078fa4;font-size:6px}.mini-label.clinical header small{grid-column:1/-1;color:#fff!important;opacity:.95;text-align:left}.mini-label.clinical .mini-body{padding:6px 8px}.mini-label.clinical p{display:flex;align-items:flex-end;gap:4px;margin:0 0 5px;border:0}.mini-label.clinical p em{font-style:normal}.mini-label.clinical p i,.mini-label.clinical section i{flex:1;height:8px;border-bottom:1px dotted #82b9c2}.mini-label.clinical p i.short{flex:0 0 38px}.mini-label.clinical section{margin:2px -2px 5px;padding:5px;border-radius:5px;background:#edf7f8}.mini-label.clinical section small{display:block;text-align:left;color:#385761}.mini-label.clinical section i{display:block}.mini-label.clinical p.choices{font-size:7px}.mini-label.clinical .mini-advice{padding-top:4px;border-top:1px solid #d9e8ea}.mini-label.clinical .mini-advice strong,.mini-label.clinical .mini-advice small{display:block;font-size:7px;text-align:left}.mini-label.clinical footer{padding:4px;background:#edf7f8;color:#315963}
