/* Medibox+ v225 — Implantologji & Protetikë */
.implant-module{display:grid;gap:18px;width:100%}.implant-module-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;border:1px solid #dfe7f1;border-radius:18px;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.05)}.implant-module-breadcrumb{display:flex;align-items:center;gap:16px;min-width:0}.implant-module-breadcrumb h1{margin:2px 0 2px;font-size:22px;line-height:1.15;color:#172033}.implant-module-breadcrumb small{color:#64748b}.implant-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.implant-kpi-card{position:relative;overflow:hidden;display:grid;gap:4px;min-height:114px;padding:17px 18px;border:1px solid #e2e8f0;border-radius:17px;background:linear-gradient(145deg,#fff,#f8fafc);box-shadow:0 7px 22px rgba(15,23,42,.04)}.implant-kpi-card:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#6366f1}.implant-kpi-card:nth-child(2):before{background:#0ea5e9}.implant-kpi-card:nth-child(3):before{background:#14b8a6}.implant-kpi-card.is-next:before{background:#f59e0b}.implant-kpi-card>span{font-size:12px;font-weight:800;letter-spacing:.02em;color:#64748b}.implant-kpi-card>strong{font-size:28px;line-height:1.05;color:#111827}.implant-kpi-card>small{font-size:12px;color:#94a3b8}.implant-layout{display:grid;grid-template-columns:minmax(270px,320px) minmax(0,1fr);gap:16px;align-items:start}.implant-case-sidebar,.implant-case-main{min-width:0}.implant-case-sidebar{position:sticky;top:86px;padding:14px;border:1px solid #e2e8f0;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.04)}.implant-section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.implant-section-heading h2{margin:2px 0 0;font-size:16px;color:#182033}.implant-case-list{display:grid;gap:8px}.implant-case-item{display:grid;gap:7px;padding:13px 14px;border:1px solid #e4eaf2;border-radius:14px;background:#fff;color:inherit;text-decoration:none;transition:.16s ease}.implant-case-item:hover{border-color:#c7d2fe;box-shadow:0 7px 18px rgba(79,70,229,.08);transform:translateY(-1px)}.implant-case-item.is-active{border-color:#818cf8;background:linear-gradient(145deg,#eef2ff,#fff);box-shadow:0 8px 22px rgba(79,70,229,.10)}.implant-case-item-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.implant-case-item-top>strong{font-size:11px;letter-spacing:.06em;color:#4f46e5}.implant-case-item h3{margin:0;font-size:14px;color:#172033}.implant-case-item small{font-size:11px;color:#64748b}.implant-case-metrics{display:flex;gap:10px;font-size:11px;color:#64748b}.implant-case-main{display:grid;gap:14px}.implant-case-header-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;border:1px solid #dfe6f0;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.04)}.implant-case-header-card h2{margin:5px 0 4px;font-size:21px;color:#111827}.implant-case-header-card p{margin:0;color:#64748b;font-size:12px}.implant-case-title-line{display:flex;align-items:center;gap:8px}.implant-case-no{font-size:11px;font-weight:850;letter-spacing:.06em;color:#4f46e5}.implant-status-badge{display:inline-flex;align-items:center;min-height:24px;padding:4px 8px;border-radius:999px;background:#eef2ff;color:#4338ca;font-size:10px;font-weight:800;white-space:nowrap}.implant-status-badge.status-completed,.implant-status-badge.status-installed,.implant-status-badge.status-restored,.implant-status-badge.status-ready{background:#dcfce7;color:#166534}.implant-status-badge.status-surgery,.implant-status-badge.status-placed,.implant-status-badge.status-sent{background:#e0f2fe;color:#075985}.implant-status-badge.status-healing,.implant-status-badge.status-osseointegration,.implant-status-badge.status-in_lab{background:#ccfbf1;color:#115e59}.implant-status-badge.status-prosthetics,.implant-status-badge.status-try_in{background:#f3e8ff;color:#7e22ce}.implant-status-badge.status-correction{background:#fef3c7;color:#92400e}.implant-status-badge.status-cancelled,.implant-status-badge.status-failed,.implant-status-badge.status-removed{background:#fee2e2;color:#991b1b}.implant-inline-status-form label{display:grid;gap:5px;min-width:190px}.implant-inline-status-form span{font-size:10px;font-weight:800;color:#64748b}.implant-inline-status-form select,.implant-device-actions select,.implant-prosthetic-status-form select{min-height:36px;border:1px solid #d6deea;border-radius:10px;background:#fff;padding:6px 9px;font:inherit;font-size:12px;color:#334155}.implant-stepper{display:grid;grid-template-columns:repeat(5,1fr);gap:0;padding:15px 18px;border:1px solid #e2e8f0;border-radius:16px;background:#fff}.implant-step{position:relative;display:grid;justify-items:center;gap:6px;color:#94a3b8;text-align:center}.implant-step:not(:last-child):after{content:"";position:absolute;top:14px;left:58%;right:-42%;height:2px;background:#e2e8f0}.implant-step.is-done:not(:last-child):after{background:#a5b4fc}.implant-step>span{position:relative;z-index:1;width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:#f1f5f9;border:2px solid #e2e8f0;font-size:11px;font-weight:850}.implant-step>strong{font-size:10px}.implant-step.is-done>span{background:#eef2ff;border-color:#818cf8;color:#4338ca}.implant-step.is-current>span{background:#4f46e5;border-color:#4f46e5;color:#fff;box-shadow:0 0 0 4px #eef2ff}.implant-step.is-current>strong{color:#3730a3}.implant-module-section{padding:17px 18px;border:1px solid #e2e8f0;border-radius:18px;background:#fff;box-shadow:0 7px 22px rgba(15,23,42,.035)}.implant-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.implant-device-card{display:grid;gap:10px;padding:15px;border:1px solid #e3e9f1;border-radius:15px;background:linear-gradient(145deg,#fff,#fbfdff)}.implant-device-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.implant-tooth-chip{display:grid;place-items:center;min-width:48px;height:34px;padding:0 10px;border-radius:10px;background:#eef2ff;color:#4338ca;font-weight:900}.implant-device-card h3{margin:0;font-size:15px;color:#172033}.implant-device-card>p{margin:-5px 0 0;color:#64748b;font-size:11px}.implant-spec-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}.implant-spec-grid>div{padding:8px 9px;border-radius:10px;background:#f8fafc}.implant-spec-grid dt{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#94a3b8}.implant-spec-grid dd{margin:2px 0 0;font-size:11px;font-weight:750;color:#334155}.implant-note{padding:9px 10px!important;margin:0!important;border-left:3px solid #c7d2fe;background:#f8fafc;border-radius:8px;font-size:11px!important;color:#475569!important}.implant-device-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:3px}.implant-device-actions form{margin:0}.implant-two-column-sections{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}.implant-timeline{position:relative;display:grid;gap:0}.implant-timeline:before{content:"";position:absolute;left:74px;top:16px;bottom:16px;width:1px;background:#e2e8f0}.implant-timeline-item{position:relative;display:grid;grid-template-columns:64px 12px minmax(0,1fr);gap:9px;padding:9px 0}.implant-timeline-dot{position:relative;z-index:1;width:10px;height:10px;margin-top:4px;border-radius:50%;background:#6366f1;border:2px solid #eef2ff;box-shadow:0 0 0 2px #c7d2fe}.implant-timeline-date{font-size:10px;font-weight:800;color:#64748b;text-align:right}.implant-timeline-body{display:grid;gap:4px}.implant-timeline-body strong{font-size:12px;color:#1e293b}.implant-timeline-body span,.implant-timeline-body small{font-size:10px;color:#64748b}.implant-timeline-body p{margin:0;font-size:11px;line-height:1.45;color:#475569}.implant-prosthetic-list{display:grid;gap:8px}.implant-prosthetic-row{display:grid;grid-template-columns:minmax(150px,1.25fr) minmax(120px,.9fr) minmax(120px,.9fr) minmax(110px,.7fr) auto;gap:10px;align-items:center;padding:11px 12px;border:1px solid #e6ebf2;border-radius:12px}.implant-prosthetic-row>div{display:grid;gap:2px;min-width:0}.implant-prosthetic-row small{font-size:9px;color:#94a3b8}.implant-prosthetic-row strong{font-size:11px;color:#334155;overflow-wrap:anywhere}.implant-prosthetic-row span{font-size:9px;color:#64748b}.implant-prosthetic-main .implant-status-badge{justify-self:start;margin-bottom:3px}.implant-prosthetic-status-form{margin:0}.implant-case-footer-summary{display:grid;grid-template-columns:220px 1fr;gap:18px;padding:15px 18px;border:1px solid #e2e8f0;border-radius:16px;background:#fff}.implant-case-footer-summary>div{display:grid;gap:4px}.implant-case-footer-summary small{font-size:10px;font-weight:800;color:#94a3b8}.implant-case-footer-summary strong{font-size:18px;color:#111827}.implant-case-footer-summary p{margin:0;font-size:11px;line-height:1.5;color:#475569}.implant-empty{display:grid;justify-items:center;gap:8px;text-align:center;color:#64748b}.implant-empty.compact{padding:22px 14px;border:1px dashed #dbe3ee;border-radius:13px;background:#fbfdff}.implant-empty.compact strong{font-size:12px;color:#334155}.implant-empty.compact span{font-size:10px}.implant-empty.hero{min-height:360px;padding:36px;border:1px dashed #cbd5e1;border-radius:18px;background:linear-gradient(145deg,#fff,#f8fafc)}.implant-empty.hero h2{margin:0;color:#172033}.implant-empty.hero p{max-width:500px;margin:0;line-height:1.5}.implant-empty-icon{width:54px;height:54px;border-radius:17px;display:grid;place-items:center;background:#eef2ff;color:#4f46e5;font-size:28px;font-weight:500}.implant-dialog{width:min(660px,calc(100vw - 28px))}.implant-dialog-wide{width:min(960px,calc(100vw - 28px))}.implant-dialog-card{max-height:min(90vh,860px);overflow:auto}.implant-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px 20px}.implant-form-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.implant-form-grid .field{display:grid;gap:6px;align-content:start}.implant-form-grid .field>span{font-size:10px;font-weight:800;color:#475569}.implant-form-grid .field small{font-size:9px;color:#94a3b8}.implant-form-grid input,.implant-form-grid select,.implant-form-grid textarea{width:100%;border:1px solid #d8e0ea;border-radius:10px;background:#fff;padding:9px 10px;font:inherit;font-size:12px;color:#1f2937;outline:none}.implant-form-grid input:focus,.implant-form-grid select:focus,.implant-form-grid textarea:focus{border-color:#818cf8;box-shadow:0 0 0 3px rgba(99,102,241,.10)}.implant-form-grid textarea{resize:vertical}.field-span-2{grid-column:span 2}.field-span-3{grid-column:span 3}.implant-check-field{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center!important;gap:8px!important;min-height:40px;padding:8px 10px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}.implant-check-field input{width:16px;height:16px}.implant-check-field span{margin:0}.implant-dialog .modal-actions{display:flex;justify-content:flex-end;gap:8px;padding:14px 20px;border-top:1px solid #edf1f5}.button-small{min-height:34px!important;padding:6px 10px!important;font-size:11px!important}.patient-implant-summary-card{display:grid;gap:16px;padding:20px;border:1px solid #e2e8f0;border-radius:18px;background:linear-gradient(145deg,#fff,#f8fafc)}.patient-implant-summary-head{display:flex;align-items:center;justify-content:space-between;gap:18px}.patient-implant-summary-head h2{margin:3px 0 4px}.patient-implant-summary-head p{margin:0;color:#64748b}.patient-implant-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.patient-implant-kpis>div{display:grid;gap:3px;padding:13px 14px;border:1px solid #e5eaf1;border-radius:13px;background:#fff}.patient-implant-kpis span{font-size:10px;font-weight:800;color:#64748b}.patient-implant-kpis strong{font-size:22px;color:#172033}.patient-implant-kpis small{font-size:9px;color:#94a3b8}
/* Implant passport */
.implant-passport-shell{width:min(900px,100%);margin:0 auto;padding:24px}.implant-passport-actions{display:flex;justify-content:flex-end;gap:8px;margin-bottom:12px}.implant-passport{padding:32px;border:1px solid #dfe7f0;border-radius:18px;background:#fff;box-shadow:0 18px 55px rgba(15,23,42,.08)}.implant-passport-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-bottom:18px;border-bottom:2px solid #1e293b}.implant-passport-header>div:first-child{display:flex;align-items:center;gap:12px}.implant-passport-mark{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#4f46e5;color:#fff;font-size:24px}.implant-passport-header strong{display:block;font-size:17px}.implant-passport-header small{display:block;color:#64748b}.implant-passport-code{text-align:right}.implant-passport-code span{display:block;font-size:10px;font-weight:850;letter-spacing:.08em;color:#64748b}.implant-passport-code strong{font-size:26px;color:#4f46e5}.implant-passport-patient{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:18px 0}.implant-passport-patient>div,.implant-passport-grid>div{display:grid;gap:3px}.implant-passport-patient small,.implant-passport-grid small,.implant-passport-notes small,.implant-passport-footer small{font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.05em;color:#94a3b8}.implant-passport-patient strong{font-size:14px;color:#1e293b}.implant-passport-patient span{font-size:10px;color:#64748b}.implant-passport-grid{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #e2e8f0;border-radius:14px;overflow:hidden}.implant-passport-grid>div{min-height:76px;padding:13px;border-right:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0}.implant-passport-grid>div:nth-child(3n){border-right:0}.implant-passport-grid strong{font-size:12px;color:#334155}.implant-passport-notes{margin-top:14px;padding:14px;border-radius:12px;background:#f8fafc}.implant-passport-notes p{margin:6px 0 0;font-size:11px;line-height:1.5}.implant-passport-footer{display:flex;justify-content:space-between;gap:20px;margin-top:30px;padding-top:18px;border-top:1px solid #cbd5e1}.implant-passport-footer>div{min-width:220px}.implant-passport-footer strong{display:block;margin-top:22px;padding-top:7px;border-top:1px solid #64748b;font-size:12px}
@media(max-width:1150px){.implant-kpi-grid{grid-template-columns:repeat(2,1fr)}.implant-layout{grid-template-columns:1fr}.implant-case-sidebar{position:static}.implant-case-list{grid-template-columns:repeat(2,minmax(0,1fr))}.implant-two-column-sections{grid-template-columns:1fr}.implant-prosthetic-row{grid-template-columns:1.2fr 1fr 1fr auto}.implant-prosthetic-row>div:nth-child(4){display:none}.patient-implant-kpis{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.implant-module-toolbar,.implant-module-breadcrumb,.implant-case-header-card,.patient-implant-summary-head{align-items:stretch;flex-direction:column}.implant-kpi-grid,.implant-case-list,.implant-card-grid,.patient-implant-kpis{grid-template-columns:1fr}.implant-stepper{overflow:auto;grid-template-columns:repeat(5,minmax(100px,1fr))}.implant-prosthetic-row{grid-template-columns:1fr}.implant-prosthetic-row>div:nth-child(4){display:grid}.implant-form-grid,.implant-form-grid-3{grid-template-columns:1fr}.field-span-2,.field-span-3{grid-column:auto}.implant-case-footer-summary{grid-template-columns:1fr}.implant-passport-shell{padding:10px}.implant-passport{padding:18px}.implant-passport-header,.implant-passport-footer{align-items:stretch;flex-direction:column}.implant-passport-code{text-align:left}.implant-passport-patient,.implant-passport-grid{grid-template-columns:1fr}.implant-passport-grid>div{border-right:0}.implant-passport-grid>div:nth-child(3n){border-right:0}}
@media print{.implant-passport-shell{width:100%;padding:0}.implant-passport{box-shadow:none;border:0;border-radius:0;padding:0}.no-print{display:none!important}}
.implant-module .button,.implant-passport-shell .button,.implant-dialog .button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:8px 13px;border:1px solid transparent;border-radius:10px;font:inherit;font-size:12px;font-weight:800;text-decoration:none;cursor:pointer;white-space:nowrap}.implant-module .button-primary,.implant-passport-shell .button-primary,.implant-dialog .button-primary{background:#4f46e5;border-color:#4f46e5;color:#fff;box-shadow:0 6px 16px rgba(79,70,229,.18)}.implant-module .button-primary:hover,.implant-passport-shell .button-primary:hover,.implant-dialog .button-primary:hover{background:#4338ca;border-color:#4338ca}.implant-module .button-light,.implant-passport-shell .button-light,.implant-dialog .button-light{background:#fff;border-color:#dbe3ed;color:#334155}.implant-module .button-light:hover,.implant-passport-shell .button-light:hover,.implant-dialog .button-light:hover{background:#f8fafc;border-color:#cbd5e1}
.implant-action-pair,.implant-prosthetic-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.implant-prosthetic-actions{justify-content:flex-end}.implant-prosthetic-actions .implant-prosthetic-status-form{margin:0}

/* Medibox+ v226 — professional implant/prosthetics finance UX */
.implant-module-toolbar{padding:20px 22px;border-color:#dce4ef;box-shadow:0 14px 34px rgba(15,23,42,.055)}
.implant-module-toolbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.implant-rate-badge{display:grid;gap:1px;min-height:40px;padding:7px 11px;border:1px solid #dbe4ef;border-radius:11px;background:#f8fafc;white-space:nowrap}
.implant-rate-badge small{font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.06em;color:#94a3b8}
.implant-rate-badge strong{font-size:11px;color:#334155}
.implant-case-header-card{padding:20px 22px;border-color:#dce4ef}
.implant-case-header-actions{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.implant-case-header-actions .implant-inline-status-form{margin:0}
.implant-finance-overview{display:grid;gap:14px;padding:18px 20px;border:1px solid #dfe7f1;border-radius:18px;background:linear-gradient(145deg,#ffffff,#fbfdff);box-shadow:0 9px 26px rgba(15,23,42,.04)}
.implant-finance-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.implant-finance-heading h2{margin:2px 0 0;font-size:16px;color:#172033}
.implant-rate-inline{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border:1px solid #dbeafe;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:10px;font-weight:850;white-space:nowrap}
.implant-finance-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.implant-finance-grid article{display:grid;gap:3px;min-width:0;padding:13px 14px;border:1px solid #e5eaf1;border-radius:13px;background:#fff}
.implant-finance-grid article>span{font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.045em;color:#94a3b8}
.implant-finance-grid article>strong{font-size:16px;line-height:1.2;color:#172033;overflow-wrap:anywhere}
.implant-finance-grid article>small{font-size:10px;color:#64748b}
.implant-finance-grid article.is-positive{border-color:#bbf7d0;background:#f8fffb}
.implant-finance-grid article.is-positive>strong{color:#166534}
.implant-finance-grid article.is-negative{border-color:#fecaca;background:#fffafa}
.implant-finance-grid article.is-negative>strong{color:#b91c1c}
.implant-finance-progress{display:grid;gap:7px;padding-top:2px}
.implant-finance-progress>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:10px;color:#64748b}
.implant-finance-progress>div:first-child strong{font-size:11px;color:#334155}
.implant-finance-progress-track{height:7px;overflow:hidden;border-radius:999px;background:#edf2f7}
.implant-finance-progress-track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#4f46e5,#0ea5e9);transition:width .2s ease}
.implant-prosthetic-price em{font-style:normal;font-size:9px;color:#94a3b8;line-height:1.35}
.implant-prosthetic-price strong{font-size:12px!important;color:#172033!important}
.implant-prosthetic-price>span{font-size:10px!important;color:#4f46e5!important;font-weight:750}
.implant-case-footer-summary>div:first-child span{font-size:11px;font-weight:750;color:#4f46e5}
.implant-money-pair-field{padding:10px;border:1px solid #e6ebf2;border-radius:12px;background:#fbfdff}
.implant-currency-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.implant-currency-pair>label{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:6px}
.implant-currency-pair>label small{display:grid;place-items:center;min-height:36px;padding:0 6px;border:1px solid #dbe4ef;border-radius:9px;background:#fff;font-size:9px;font-weight:900;color:#475569}
.implant-currency-pair>label:first-child small{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}
.implant-currency-pair input{min-width:0}
.implant-currency-hint{display:block;margin-top:1px;color:#64748b!important}
.implant-module-section{border-color:#e0e7f0;box-shadow:0 9px 26px rgba(15,23,42,.035)}
.implant-device-card{border-color:#dfe7f0;box-shadow:0 6px 16px rgba(15,23,42,.025)}
.implant-prosthetic-row{border-color:#dfe7f0;background:#fff;transition:border-color .15s ease,box-shadow .15s ease}
.implant-prosthetic-row:hover{border-color:#cbd5e1;box-shadow:0 7px 18px rgba(15,23,42,.04)}
@media(max-width:1150px){.implant-finance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.implant-case-header-actions{justify-content:flex-start}.implant-prosthetic-row>div:nth-child(4){display:grid}}
@media(max-width:760px){.implant-module-toolbar-actions{justify-content:flex-start}.implant-rate-badge{width:100%}.implant-finance-heading{align-items:flex-start;flex-direction:column}.implant-finance-grid{grid-template-columns:1fr}.implant-currency-pair{grid-template-columns:1fr}.implant-case-header-actions{align-items:stretch;flex-direction:column}.implant-case-header-actions .button,.implant-case-header-actions .implant-inline-status-form,.implant-case-header-actions .implant-inline-status-form label{width:100%}}
.implant-case-value{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-top:2px;padding-top:8px;border-top:1px solid #edf1f5}.implant-case-value strong{font-size:11px;color:#334155}.implant-case-value span{font-size:9px;font-weight:750;color:#4f46e5}.implant-case-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:7px}.implant-case-meta>span{display:grid;gap:1px;min-width:108px;padding:6px 9px;border:1px solid #e6ebf2;border-radius:9px;background:#f8fafc}.implant-case-meta small{font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.05em;color:#94a3b8}.implant-case-meta strong{font-size:10px;color:#475569;font-weight:750}@media(max-width:760px){.implant-case-meta{display:grid;grid-template-columns:1fr}.implant-case-meta>span{min-width:0}}

/* v227 — EUR is the editable source; MKD is an automatic conversion result. */
.implant-currency-pair>label:first-child input{border-color:#bfdbfe;background:#fff;box-shadow:0 0 0 1px rgba(37,99,235,.03)}
.implant-currency-pair>label:last-child small{background:#f8fafc;color:#64748b}
.implant-currency-pair input[data-currency-mkd][readonly]{background:#f1f5f9;color:#475569;border-color:#dbe3ec;cursor:default;font-weight:750}
.implant-currency-pair input[data-currency-mkd][readonly]:focus{box-shadow:none;border-color:#dbe3ec}
.implant-currency-hint{font-size:9px;line-height:1.35}

/* v228 — click EUR/MKD to switch the visible currency. */
.implant-currency-pair{display:block}
.implant-currency-entry{display:grid;grid-template-columns:56px minmax(0,1fr);align-items:center;gap:8px}
.implant-currency-entry[hidden]{display:none!important}
.implant-currency-toggle{display:inline-grid;place-items:center;min-height:38px;padding:0 10px;border:1px solid #bfdbfe;border-radius:10px;background:#eff6ff;color:#1d4ed8;font:inherit;font-size:10px;font-weight:900;letter-spacing:.03em;cursor:pointer;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}
.implant-currency-toggle:hover{background:#dbeafe;border-color:#93c5fd;color:#1e40af;transform:translateY(-1px)}
.implant-currency-entry[data-currency-entry="mkd"] .implant-currency-toggle{border-color:#d8e0ea;background:#f8fafc;color:#475569}
.implant-currency-entry[data-currency-entry="mkd"] .implant-currency-toggle:hover{background:#eef2f7;border-color:#cbd5e1;color:#334155}
.implant-currency-entry input{min-width:0;width:100%}
.implant-money-toggle{display:inline-flex;align-items:center;justify-content:flex-start;min-height:28px;width:max-content;max-width:100%;padding:4px 8px;border:1px solid #dbeafe;border-radius:9px;background:#eff6ff;color:#1d4ed8;font-size:12px;font-weight:850;line-height:1.2;cursor:pointer;user-select:none;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}
.implant-money-toggle:hover,.implant-money-toggle:focus-visible{background:#dbeafe;border-color:#93c5fd;color:#1e40af;outline:none;transform:translateY(-1px)}
.implant-money-toggle[data-view="mkd"]{border-color:#dbe3ec;background:#f8fafc;color:#334155}
.implant-money-toggle[data-view="mkd"]:hover,.implant-money-toggle[data-view="mkd"]:focus-visible{background:#eef2f7;border-color:#cbd5e1;color:#1e293b}
.implant-case-value{justify-content:flex-start}
.implant-case-value .implant-money-toggle{font-size:10px;min-height:25px;padding:3px 7px}
.implant-finance-grid article>.implant-money-toggle{margin-top:2px;font-size:16px;min-height:32px;padding:4px 9px}
.implant-finance-grid article.is-positive>.implant-money-toggle{color:#166534;border-color:#bbf7d0;background:#f0fdf4}
.implant-finance-grid article.is-negative>.implant-money-toggle{color:#b91c1c;border-color:#fecaca;background:#fff1f2}
.implant-prosthetic-price{gap:4px!important}
.implant-prosthetic-price .implant-money-toggle{font-size:10px;min-height:25px;padding:3px 7px}
.implant-prosthetic-price em{margin-top:2px}
.implant-case-footer-summary .implant-money-toggle{font-size:16px;min-height:32px;padding:4px 9px}
.implant-money-toggle-hint{font-size:9px!important;font-weight:650!important;color:#94a3b8!important}
@media(max-width:760px){.implant-currency-entry{grid-template-columns:52px minmax(0,1fr)}.implant-money-toggle{width:100%;justify-content:center}}

/* v229 — dual-source EUR/MKD entry with EUR conversion preview. */
.implant-currency-editor{display:grid;grid-template-columns:96px minmax(0,1fr) 18px minmax(0,1fr);align-items:center;gap:8px;margin-top:5px}
.implant-currency-mode-switch{display:inline-flex;align-items:center;align-self:stretch;overflow:hidden;border:1px solid #d6deea;border-radius:10px;background:#f8fafc}
.implant-currency-mode-switch button{min-width:47px;min-height:38px;padding:0 8px;border:0;border-right:1px solid #d6deea;background:transparent;color:#64748b;font:inherit;font-size:10px;font-weight:900;letter-spacing:.025em;cursor:pointer;transition:background .15s ease,color .15s ease,box-shadow .15s ease}
.implant-currency-mode-switch button:last-child{border-right:0}
.implant-currency-mode-switch button:hover{background:#eef2f7;color:#334155}
.implant-currency-mode-switch button.is-active{background:#eef2ff;color:#4338ca;box-shadow:inset 0 0 0 1px rgba(99,102,241,.14)}
.implant-currency-input{position:relative;min-width:0}
.implant-currency-input[hidden]{display:none!important}
.implant-currency-input input{width:100%;min-width:0;padding-right:48px}
.implant-currency-input>span{position:absolute;top:50%;right:11px;transform:translateY(-50%);font-size:9px;font-weight:900;letter-spacing:.03em;color:#94a3b8;pointer-events:none}
.implant-currency-input.is-converted input{background:#f1f5f9;color:#475569;border-color:#dbe3ec;font-weight:750;cursor:default}
.implant-currency-input.is-converted>span{color:#64748b}
.implant-currency-input.is-primary input{background:#fff;color:#172033;border-color:#d6deea;cursor:text;font-weight:inherit}
.implant-currency-equals{display:grid;place-items:center;color:#94a3b8;font-size:12px;font-weight:850}
.implant-currency-editor[data-currency-mode="mkd"] .implant-currency-input[data-currency-input="mkd"]{grid-column:2/-1}
.implant-currency-editor[data-currency-mode="mkd"] .implant-currency-input[data-currency-input="mkd"]>span{color:#475569}
.implant-currency-hint{margin-top:5px!important}
@media(max-width:760px){
  .implant-currency-editor{grid-template-columns:94px minmax(0,1fr);gap:7px}
  .implant-currency-mode-switch{grid-column:1;grid-row:1}
  .implant-currency-input[data-currency-input="eur"],.implant-currency-input.is-primary{grid-column:2;grid-row:1}
  .implant-currency-equals{display:none!important}
  .implant-currency-input.is-converted{grid-column:2;grid-row:2}
  .implant-currency-editor[data-currency-mode="mkd"] .implant-currency-input[data-currency-input="mkd"]{grid-column:2;grid-row:1}
}

/* v230 — larger minimal implant-plan modal with fixed currency-entry columns. */
.implant-dialog-plan{width:min(940px,calc(100vw - 32px))}
.implant-plan-card{min-height:410px}
.implant-plan-card .modal-header{padding:20px 24px}
.implant-plan-card .modal-header small{display:block;margin-top:5px;color:#64748b;font-size:10px;font-weight:600}
.implant-plan-minimal-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(220px,.75fr);gap:16px;padding:24px}
.implant-plan-minimal-grid .field{display:grid;gap:7px;align-content:start}
.implant-plan-minimal-grid .field>span{font-size:10px;font-weight:800;color:#475569}
.implant-plan-minimal-grid input,.implant-plan-minimal-grid select{width:100%;min-height:42px;border:1px solid #d8e0ea;border-radius:10px;background:#fff;padding:9px 11px;font:inherit;font-size:12px;color:#1f2937;outline:none}
.implant-plan-minimal-grid input:focus,.implant-plan-minimal-grid select:focus{border-color:#818cf8;box-shadow:0 0 0 3px rgba(99,102,241,.10)}
.implant-plan-title{grid-column:1/-1}
.implant-plan-price{grid-column:1/-1;padding:14px 15px;border:1px solid #e1e7ef;border-radius:13px;background:#fbfdff}
.implant-plan-card .modal-actions{padding:16px 24px}
.implant-currency-editor-fixed{display:grid;grid-template-columns:104px minmax(190px,1fr) minmax(190px,1fr);align-items:center;gap:10px;margin-top:6px}
.implant-currency-editor-fixed .implant-currency-mode-switch{width:104px;min-width:104px;height:42px}
.implant-currency-editor-fixed .implant-currency-mode-switch button{width:52px;min-width:52px;min-height:40px}
.implant-currency-entry-box,.implant-currency-result-box{position:relative;min-width:0}
.implant-currency-entry-box input,.implant-currency-result-box input{width:100%;min-height:42px;padding-right:54px}
.implant-currency-entry-box>span,.implant-currency-result-box>span{position:absolute;top:50%;right:12px;transform:translateY(-50%);font-size:9px;font-weight:900;letter-spacing:.03em;color:#64748b;pointer-events:none}
.implant-currency-result-box input{background:#f1f5f9!important;color:#475569!important;border-color:#dbe3ec!important;font-weight:750;cursor:default}
.implant-currency-hint{margin-top:6px!important;font-size:9px;line-height:1.35;color:#64748b!important}
@media(max-width:760px){
  .implant-dialog-plan{width:calc(100vw - 18px)}
  .implant-plan-minimal-grid{grid-template-columns:1fr;padding:16px}
  .implant-plan-title,.implant-plan-price{grid-column:auto}
  .implant-currency-editor-fixed{grid-template-columns:104px minmax(0,1fr)}
  .implant-currency-result-box{grid-column:2}
}


/* v231 — wider modern implant-plan modal; fixed horizontal EUR/MKD editor. */
.implant-dialog-plan{width:min(1120px,calc(100vw - 40px));max-width:none}
.implant-plan-card{min-height:0;border:1px solid rgba(148,163,184,.28);border-radius:22px;overflow:hidden;background:#fff;box-shadow:0 30px 80px rgba(15,23,42,.22)}
.implant-plan-card .modal-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 30px;border-bottom:1px solid #e8edf4;background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)}
.implant-plan-card .modal-header .eyebrow{margin:0 0 5px;font-size:10px;font-weight:900;letter-spacing:.11em;text-transform:uppercase;color:#64748b}
.implant-plan-card .modal-header h2{margin:0;font-size:23px;line-height:1.15;color:#0f172a}
.implant-plan-card .modal-header small{margin-top:7px;font-size:11px;line-height:1.45;color:#64748b}
.implant-plan-card .modal-header .icon-button{width:40px;height:40px;min-width:40px;border:1px solid #d8e1ec;border-radius:12px;background:#fff;color:#64748b;box-shadow:0 4px 12px rgba(15,23,42,.04)}
.implant-plan-card .modal-header .icon-button:hover{background:#f8fafc;color:#0f172a;border-color:#cbd5e1}
.implant-plan-minimal-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(230px,.8fr) minmax(210px,.7fr);gap:18px 16px;padding:28px 30px 30px;background:#fff}
.implant-plan-minimal-grid .field{display:grid;gap:8px;align-content:start;min-width:0}
.implant-plan-minimal-grid .field>span{font-size:11px;font-weight:850;color:#475569}
.implant-plan-minimal-grid input,.implant-plan-minimal-grid select{min-height:46px;border:1px solid #d7e0eb;border-radius:12px;padding:10px 13px;background:#fff;font-size:13px;color:#172033;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}
.implant-plan-minimal-grid input:hover,.implant-plan-minimal-grid select:hover{border-color:#c5d0de}
.implant-plan-minimal-grid input:focus,.implant-plan-minimal-grid select:focus{border-color:#6366f1;box-shadow:0 0 0 4px rgba(99,102,241,.10)}
.implant-plan-title,.implant-plan-dentist,.implant-plan-date{grid-column:auto}
.implant-plan-price{grid-column:1/-1;padding:18px 20px 17px;border:1px solid #e1e8f0;border-radius:16px;background:linear-gradient(180deg,#fbfdff 0%,#f8fafc 100%)}
.implant-plan-price>span{margin-bottom:2px}
.implant-plan-card .modal-actions{position:sticky;bottom:0;z-index:2;padding:18px 30px;border-top:1px solid #e8edf4;background:rgba(255,255,255,.97);backdrop-filter:blur(8px)}
.implant-plan-card .modal-actions .button{min-height:42px;padding:9px 17px;border-radius:11px;font-size:12px}

.implant-plan-currency-editor{display:grid;grid-template-columns:92px minmax(210px,1fr) 28px minmax(210px,1fr);align-items:end;gap:12px;width:100%;margin-top:4px}
.implant-plan-currency-column{display:grid;gap:6px;min-width:0}
.implant-plan-currency-column>small{font-size:9px;font-weight:850;letter-spacing:.035em;text-transform:uppercase;color:#94a3b8}
.implant-plan-currency-toggle{width:92px;min-width:92px;height:46px;border:1px solid #c7d2fe;border-radius:12px;background:linear-gradient(180deg,#eef2ff,#e8edff);color:#4338ca;font:inherit;font-size:12px;font-weight:900;letter-spacing:.055em;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(99,102,241,.04);transition:background .15s ease,border-color .15s ease,transform .15s ease,box-shadow .15s ease}
.implant-plan-currency-toggle:hover{border-color:#a5b4fc;background:#e0e7ff;box-shadow:0 5px 14px rgba(79,70,229,.10);transform:translateY(-1px)}
.implant-plan-currency-editor[data-currency-mode="mkd"] .implant-plan-currency-toggle{border-color:#cbd5e1;background:linear-gradient(180deg,#f8fafc,#f1f5f9);color:#334155}
.implant-plan-currency-input{position:relative;min-width:0}
.implant-plan-currency-input input{width:100%;min-width:0;height:46px;padding-right:58px!important;font-size:14px!important;font-variant-numeric:tabular-nums}
.implant-plan-currency-input>span{position:absolute;top:50%;right:13px;transform:translateY(-50%);font-size:10px;font-weight:900;letter-spacing:.04em;color:#64748b;pointer-events:none}
.implant-plan-currency-input.is-result input{background:#f1f5f9!important;border-color:#d8e1ec!important;color:#334155!important;font-weight:800;cursor:default}
.implant-plan-currency-input.is-result input:focus{box-shadow:none!important;border-color:#d8e1ec!important}
.implant-plan-currency-equals{display:grid;place-items:center;height:46px;padding-top:15px;color:#94a3b8;font-size:15px;font-weight:900}
.implant-plan-currency-hint{display:block;margin-top:8px;font-size:10px;line-height:1.45;color:#64748b}

@media(max-width:900px){
  .implant-dialog-plan{width:calc(100vw - 24px)}
  .implant-plan-minimal-grid{grid-template-columns:1fr 1fr;padding:22px}
  .implant-plan-title{grid-column:1/-1}
  .implant-plan-price{grid-column:1/-1}
  .implant-plan-card .modal-header,.implant-plan-card .modal-actions{padding-left:22px;padding-right:22px}
  .implant-plan-currency-editor{grid-template-columns:88px minmax(0,1fr) 24px minmax(0,1fr)}
  .implant-plan-currency-toggle{width:88px;min-width:88px}
}
@media(max-width:640px){
  .implant-dialog-plan{width:calc(100vw - 14px)}
  .implant-plan-card{border-radius:16px}
  .implant-plan-minimal-grid{grid-template-columns:1fr;gap:14px;padding:18px}
  .implant-plan-title,.implant-plan-dentist,.implant-plan-date,.implant-plan-price{grid-column:auto}
  .implant-plan-card .modal-header,.implant-plan-card .modal-actions{padding-left:18px;padding-right:18px}
  .implant-plan-currency-editor{grid-template-columns:78px minmax(0,1fr);align-items:end;gap:9px}
  .implant-plan-currency-column-mode{grid-column:1;grid-row:1}
  .implant-plan-currency-column-entry{grid-column:2;grid-row:1}
  .implant-plan-currency-equals{display:none}
  .implant-plan-currency-column-result{grid-column:2;grid-row:2}
  .implant-plan-currency-toggle{width:78px;min-width:78px}
}

/* v242 — destructive implant plan action */
.implant-case-delete-form{margin:0}
.implant-delete-plan-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:#b42318;background:#fff6f5;border-color:#f4c7c3}
.implant-delete-plan-button:hover{color:#8f1d15;background:#ffebe8;border-color:#efaaa4}
.implant-delete-plan-button svg{width:15px;height:15px}
@media(max-width:760px){.implant-case-delete-form,.implant-case-delete-form .implant-delete-plan-button{width:100%}}

/* v243 — faster implantology data-entry UX + patient profile navigation */
.implant-patient-profile-nav{width:100%;overflow:hidden;border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 5px 18px rgba(15,23,42,.035)}
.implant-patient-tabs{display:flex!important;align-items:stretch!important;gap:0!important;overflow-x:auto!important;padding:0 8px!important;border-top:0!important;white-space:nowrap;scrollbar-width:none}
.implant-patient-tabs::-webkit-scrollbar{display:none}
.implant-patient-tabs .patient-profile-v2-tab{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;flex:0 0 auto!important;min-height:46px!important;text-decoration:none!important}
.implant-patient-tabs .patient-profile-v2-tab svg{width:15px;height:15px;flex:0 0 auto}
.implant-patient-tabs .patient-profile-v2-tab.is-active{font-weight:700!important}

.implant-module-toolbar{padding:15px 18px}
.implant-module-breadcrumb{gap:0}
.implant-module-breadcrumb .eyebrow{margin-bottom:3px}
.implant-module-breadcrumb h1{font-size:20px}

.implant-quick-entry{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid #dfe5ff;border-radius:15px;background:linear-gradient(135deg,#f7f8ff 0%,#fff 65%)}
.implant-quick-entry-copy{display:grid;gap:2px;min-width:0}
.implant-quick-entry-copy small{font-size:9px;font-weight:900;letter-spacing:.09em;color:#6366f1}
.implant-quick-entry-copy strong{font-size:12px;color:#334155}
.implant-quick-entry-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.implant-quick-entry-actions .button{display:inline-flex;align-items:center;gap:6px}
.implant-quick-entry-actions svg{width:14px;height:14px}

.implant-entry-dialog{width:min(1040px,calc(100vw - 30px))}
.implant-entry-dialog .implant-dialog-card{max-height:min(92vh,900px);border-radius:19px;overflow:auto}
.implant-entry-header{position:sticky;top:0;z-index:4;background:rgba(255,255,255,.98);backdrop-filter:blur(8px);border-bottom:1px solid #e8edf4}
.implant-entry-header small{display:block;margin-top:5px;color:#64748b;font-size:10px;line-height:1.4}
.implant-entry-body{display:grid;gap:12px;padding:16px 18px;background:#f8fafc}
.implant-entry-section{overflow:hidden;border:1px solid #e2e8f0;border-radius:15px;background:#fff}
.implant-entry-section.is-primary{border-color:#dfe5ff;box-shadow:0 6px 18px rgba(79,70,229,.04)}
.implant-entry-section-title{display:flex;align-items:center;gap:10px;padding:13px 16px;border-bottom:1px solid #edf1f6;background:#fbfcff}
.implant-entry-section-title>span{display:grid;place-items:center;width:27px;height:27px;border-radius:9px;background:#eef2ff;color:#4f46e5;font-size:11px;font-weight:900}
.implant-entry-section-title>div{display:grid;gap:1px}
.implant-entry-section-title strong{font-size:12px;color:#1f2937}
.implant-entry-section-title small{font-size:9px;color:#94a3b8}
.implant-entry-grid{padding:15px 16px!important;gap:11px!important}
.implant-entry-grid .field>span{font-size:10px!important}
.implant-entry-grid input,.implant-entry-grid select,.implant-entry-grid textarea{min-height:40px;border-radius:9px!important}
.implant-entry-grid textarea{min-height:76px}

.implant-fdi-picker{display:grid;gap:8px;padding:10px 11px;border:1px solid #e5eaf1;border-radius:12px;background:#fbfdff}
.implant-fdi-picker-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.implant-fdi-picker-head>span{font-size:9px;font-weight:900;letter-spacing:.04em;color:#64748b;text-transform:uppercase}
.implant-fdi-picker-head>div{display:flex;gap:6px}
.implant-fdi-picker-head button,.implant-date-shortcuts button{min-height:28px;padding:4px 9px;border:1px solid #d8e0ea;border-radius:8px;background:#fff;color:#475569;font:inherit;font-size:9px;font-weight:750;cursor:pointer}
.implant-fdi-picker-head button:hover,.implant-date-shortcuts button:hover,.implant-fdi-picker-head button.is-active,.implant-date-shortcuts button.is-active{border-color:#a5b4fc;background:#eef2ff;color:#4338ca}
.implant-fdi-row{display:grid;grid-template-columns:50px minmax(0,1fr);gap:8px;align-items:center}
.implant-fdi-row>small{font-size:9px;font-weight:800;color:#94a3b8}
.implant-fdi-row>div{display:grid;grid-template-columns:repeat(16,minmax(31px,1fr));gap:4px}
.implant-fdi-row button{min-width:0;height:30px;border:1px solid #dfe5ed;border-radius:7px;background:#fff;color:#475569;font:inherit;font-size:9px;font-weight:800;cursor:pointer;transition:.12s ease}
.implant-fdi-row button:hover{border-color:#a5b4fc;background:#f5f7ff;color:#4338ca}
.implant-fdi-row button.is-selected{border-color:#6366f1;background:#4f46e5;color:#fff;box-shadow:0 0 0 2px #eef2ff}

.implant-entry-more{border:1px solid #e2e8f0;border-radius:14px;background:#fff;overflow:hidden}
.implant-entry-more>summary{display:flex;align-items:center;gap:10px;padding:12px 14px;cursor:pointer;list-style:none;user-select:none}
.implant-entry-more>summary::-webkit-details-marker{display:none}
.implant-entry-more>summary>span{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#f1f5f9;color:#64748b}
.implant-entry-more>summary>span svg{width:15px;height:15px}
.implant-entry-more>summary>div{display:grid;gap:1px;min-width:0;flex:1}
.implant-entry-more>summary strong{font-size:11px;color:#334155}
.implant-entry-more>summary small{font-size:9px;color:#94a3b8}
.implant-entry-more>summary>b{font-size:18px;font-weight:400;color:#94a3b8;transition:transform .15s ease}
.implant-entry-more[open]>summary>b{transform:rotate(45deg)}
.implant-entry-more[open]>summary{border-bottom:1px solid #edf1f5;background:#fbfcfe}
.implant-entry-grid.is-advanced{background:#fff}

.implant-next-control-field{padding:10px 11px;border:1px solid #e5eaf1;border-radius:11px;background:#fbfdff}
.implant-date-shortcuts{display:flex;gap:5px;flex-wrap:wrap;margin-top:3px}
.implant-entry-actions{position:sticky;bottom:0;z-index:4;display:flex!important;align-items:center;justify-content:space-between!important;gap:12px;background:rgba(255,255,255,.98);backdrop-filter:blur(8px)}
.implant-entry-actions>small{font-size:9px;color:#94a3b8}
.implant-entry-actions>div{display:flex;gap:8px}

@media(max-width:900px){
  .implant-fdi-row{grid-template-columns:42px minmax(0,1fr)}
  .implant-fdi-row>div{grid-template-columns:repeat(8,minmax(30px,1fr))}
}
@media(max-width:760px){
  .implant-patient-profile-nav{border-radius:12px}
  .implant-patient-tabs .patient-profile-v2-tab{min-height:43px!important;padding:0 10px!important}
  .implant-quick-entry{align-items:stretch;flex-direction:column}
  .implant-quick-entry-actions{justify-content:flex-start}
  .implant-quick-entry-actions .button{flex:1 1 auto}
  .implant-entry-dialog{width:calc(100vw - 14px)}
  .implant-entry-body{padding:10px}
  .implant-entry-grid{padding:12px!important}
  .implant-entry-section-title{padding:11px 12px}
  .implant-fdi-picker-head{align-items:flex-start;flex-direction:column}
  .implant-fdi-row{grid-template-columns:1fr;gap:4px}
  .implant-fdi-row>div{grid-template-columns:repeat(8,minmax(28px,1fr))}
  .implant-entry-actions{align-items:stretch;flex-direction:column}
  .implant-entry-actions>div{width:100%}
  .implant-entry-actions>div .button{flex:1}
}


/* Medibox+ v244 — visual alignment to reference screenshot */
.implant-module-toolbar,
.implant-kpi-grid,
.implant-quick-entry,
.implant-stepper,
.implant-finance-overview,
.implant-case-footer-summary {
    display: none !important;
}

.implant-module {
    padding-top: 10px;
}

.implant-layout {
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.implant-case-sidebar,
.implant-case-main,
.implant-overview-card,
.implant-content-panel-board,
.implant-case-header-card-visual,
.implant-sidebar-note {
    background: #fff;
    border: 1px solid #e6ebf3;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

.implant-case-sidebar {
    padding: 18px;
}

.implant-sidebar-note {
    margin-top: 18px;
    padding: 18px;
}

.implant-sidebar-note-title,
.implant-mini-heading {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 14px;
}

.implant-sidebar-note-body {
    min-height: 76px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.implant-case-list {
    gap: 14px;
}

.implant-case-item {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.implant-case-item.is-active {
    border-color: #6ea8fe;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .18);
    background: #f8fbff;
}

.implant-case-item h3,
.implant-case-item .implant-case-item-top strong {
    display: none;
}

.implant-case-item small,
.implant-case-item .implant-case-metrics,
.implant-case-item .implant-case-value {
    display: none;
}

.implant-case-item-top {
    margin-bottom: 8px;
}

.implant-case-item-top::before {
    content: attr(data-label);
}

.implant-case-item::before {
    content: "";
}

.implant-case-item strong {
    display: block !important;
    font-size: 22px;
}

.implant-case-item-top {
    align-items: center;
}

.implant-case-item .implant-status-badge {
    margin-left: auto;
}

.implant-case-item > strong,
.implant-case-item > small {
    display: none;
}

.implant-case-item .implant-case-item-top + h3 + small { display:none; }

.implant-case-item::after { display:none; }

.implant-case-item {
    position: relative;
}

.implant-case-item[href]::selection { background: transparent; }

.implant-case-item .implant-case-item-top strong::before { content: ""; }

.implant-case-item .implant-case-item-top strong {
    font-size: 20px;
    line-height: 1.2;
}

.implant-case-item .implant-case-item-top + h3 {
    display: none;
}

.implant-case-item .implant-case-item-top strong::after {
    content: "";
}

.implant-case-item .implant-case-item-top {
    display: flex;
    gap: 12px;
}

.implant-case-item .implant-case-item-top strong + .implant-status-badge { margin-left: auto; }

.implant-case-item .implant-case-item-top strong {
    color: #111827;
}

.implant-case-item .implant-case-item-top {
    flex-wrap: wrap;
}

.implant-case-item .implant-case-item-top strong,
.implant-case-item .implant-case-item-top + div,
.implant-case-item .implant-case-item-top + h3 + small,
.implant-case-item .implant-case-item-top + h3 + small + div,
.implant-case-item .implant-case-item-top + h3 + small + div + div { all: unset; }

.implant-case-item {
    display: block;
}

.implant-case-item .implant-case-item-top + h3,
.implant-case-item .implant-case-metrics,
.implant-case-item .implant-case-value { display:none !important; }

.implant-case-item .implant-case-item-top strong {
    all: unset;
    font-weight: 700;
    font-size: 22px;
    color: #111827;
}

.implant-case-item .implant-case-item-top::after,
.implant-case-item .implant-case-item-top::before { display:none !important; }

.implant-case-item > .implant-case-item-top + * {
    display: none !important;
}

.implant-case-item { min-height: 72px; }

.implant-case-item:has(.implant-status-badge) {
    padding-top: 18px;
}

.implant-case-item .implant-status-badge { font-size: 12px; }

.implant-case-item .implant-case-item-top strong {
    display: inline-block;
}

.implant-case-item .implant-case-item-top strong + * {
    display: inline-flex;
}

.implant-case-main {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.implant-case-header-card-visual {
    padding: 22px 26px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.implant-case-header-copy h2 {
    font-size: 18px;
    line-height: 1.3;
    margin: 10px 0 8px;
    color: #111827;
}

.implant-case-no {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0f172a;
}

.implant-case-meta-visual {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 13px;
}

.implant-case-meta-visual span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.implant-case-meta-visual strong { color: #4b5563; font-weight: 600; }

.implant-case-header-actions-visual {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.implant-case-header-actions-visual .button,
.implant-case-header-actions-visual .implant-select-wrap {
    min-height: 42px;
    border-radius: 12px;
}

.implant-inline-status-form-visual label span.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; }

.implant-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dbe4f0;
    background: #fff;
    padding: 0 12px;
}

.implant-select-wrap select {
    border: 0;
    background: transparent;
    padding: 10px 4px 10px 0;
    font-weight: 600;
}

.implant-overview-board { margin-bottom: 18px; }

.implant-overview-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(340px, 1.1fr);
    gap: 18px;
}

.implant-overview-card { padding: 20px; }

.implant-arch-board {
    border: 1px solid #edf1f7;
    border-radius: 14px;
    padding: 18px;
    background: #fff;
}

.implant-arch-row + .implant-arch-row { margin-top: 12px; }

.implant-arch-row small {
    display: block;
    color: #94a3b8;
    margin-bottom: 8px;
}

.implant-arch-row-teeth {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.implant-arch-row.is-upper .implant-arch-row-teeth { justify-content: center; }
.implant-arch-row.is-lower .implant-arch-row-teeth { justify-content: center; }

.implant-arch-tooth {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #cfd8e3;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.implant-arch-tooth.is-active {
    background: #28c7a1;
    border-color: #28c7a1;
    color: #fff;
}

.implant-selected-summary {
    color: #475569;
    font-size: 14px;
    margin-top: 14px;
}

.implant-overview-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.implant-plan-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.implant-plan-stat {
    border: 1px solid #e7edf5;
    border-radius: 14px;
    min-height: 90px;
    padding: 16px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.implant-plan-stat strong {
    color: #06b6d4;
    font-size: 34px;
    line-height: 1;
    font-weight: 800;
}

.implant-plan-stat:nth-child(2) strong { color: #10b981; }
.implant-plan-stat:nth-child(3) strong { color: #ec4899; }
.implant-plan-stat:nth-child(4) strong { color: #f59e0b; font-size: 28px; }

.implant-plan-stat span {
    margin-top: 10px;
    color: #475569;
    font-size: 14px;
}

.implant-notes-box {
    border: 1px solid #e7edf5;
    border-radius: 14px;
    min-height: 88px;
    padding: 16px;
    color: #94a3b8;
    line-height: 1.6;
}

.implant-content-panel-board {
    padding: 0;
    overflow: hidden;
}

.implant-content-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 0 18px;
    border-bottom: 1px solid #edf2f7;
    background: #fff;
}

.implant-content-tabs button {
    border: 0;
    background: transparent;
    padding: 16px 10px 14px;
    color: #475569;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}

.implant-content-tabs button.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.implant-content-panel {
    display: none;
    padding: 18px;
}

.implant-content-panel.is-active {
    display: block;
}

.implant-section-heading-table {
    margin: 0 0 14px;
    padding: 0;
}

.implant-table-shell {
    border: 1px solid #edf2f7;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.implant-clean-table {
    width: 100%;
    border-collapse: collapse;
}

.implant-clean-table th,
.implant-clean-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
}

.implant-clean-table th {
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.implant-tooth-table-chip {
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.implant-table-title { font-weight: 700; color: #0f172a; }
.implant-table-subtitle { color: #94a3b8; font-size: 13px; margin-top: 4px; }

.implant-row-actions {
    display: flex;
    gap: 8px;
}

.icon-button-soft {
    width: 34px;
    height: 34px;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #fff;
    color: #2563eb;
}

.implant-simple-list {
    display: grid;
    gap: 12px;
}

.implant-simple-item {
    border: 1px solid #edf2f7;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.implant-simple-item small,
.implant-simple-item-side { color: #64748b; display:block; margin-top: 4px; }

.implant-document-box {
    border: 1px solid #edf2f7;
    border-radius: 14px;
    padding: 18px;
    color: #475569;
    line-height: 1.7;
}

.implant-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

@media (max-width: 1180px) {
    .implant-layout,
    .implant-overview-grid {
        grid-template-columns: 1fr;
    }

    .implant-plan-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .implant-case-header-card-visual,
    .implant-case-header-actions-visual,
    .implant-content-tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .implant-clean-table {
        min-width: 760px;
    }

    .implant-table-shell {
        overflow-x: auto;
    }

    .implant-plan-stat-grid {
        grid-template-columns: 1fr;
    }
}


/* Medibox+ v244.1 — sidebar card cleanup */
.implant-case-item {
    display: block;
    min-height: auto;
}

.implant-case-item .implant-case-item-top {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.implant-case-item .implant-case-item-top strong {
    all: unset;
    display: inline-block;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.implant-case-item .implant-case-item-date,
.implant-case-item .implant-case-item-count {
    display: block !important;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.implant-case-item .implant-case-item-count {
    margin-top: 6px;
    font-weight: 600;
}

.implant-case-item h3,
.implant-case-item small,
.implant-case-item .implant-case-metrics,
.implant-case-item .implant-case-value { display:none !important; }


/* Medibox+ v245 — process flow as left-side history and sequential sections */
.implant-process-sidebar {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.implant-process-history {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #edf2f7;
}

.implant-process-history-head small,
.implant-process-section-head > div:nth-child(2) > small,
.implant-other-service-card-head small {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 4px;
}

.implant-process-history-head h2 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #0f172a;
}

.implant-process-timeline {
    position: relative;
    display: grid;
    gap: 0;
}

.implant-process-timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 18px;
    bottom: 18px;
    width: 2px;
    background: #e7edf5;
}

.implant-process-step {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    width: 100%;
    padding: 10px 8px;
    border: 0;
    background: transparent;
    text-align: left;
    border-radius: 12px;
    cursor: pointer;
}

.implant-process-step:hover,
.implant-process-step.is-viewing {
    background: #f6f9ff;
}

.implant-process-dot {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px solid #dbe4f0;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.implant-process-step.is-done .implant-process-dot {
    border-color: #22c55e;
    background: #ecfdf3;
    color: #15803d;
}

.implant-process-step.is-current .implant-process-dot,
.implant-process-step.is-viewing .implant-process-dot {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 4px #dbeafe;
}

.implant-process-copy strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.35;
}

.implant-process-copy small {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.35;
}

.implant-plan-history-heading {
    align-items: center;
    gap: 10px;
}

.implant-plan-history-heading h2 { font-size: 15px; }

.implant-process-section {
    scroll-margin-top: 18px;
    background: #fff;
    border: 1px solid #e6ebf3;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(16,24,40,.03);
    margin-bottom: 18px;
    overflow: hidden;
}

.implant-process-section-head {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #edf2f7;
    background: #fbfdff;
}

.implant-process-section-number {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf2ff;
    color: #2563eb;
    font-weight: 800;
}

.implant-process-section-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
}

.implant-process-section-head p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
}

.implant-process-section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.implant-process-section-body,
.implant-plan-section-body {
    padding: 20px;
}

.implant-plan-section-body {
    display: grid;
    grid-template-columns: 1.1fr 1.3fr;
    gap: 16px;
}

.implant-plan-primary-card,
.implant-notes-panel-process {
    border: 1px solid #edf2f7;
    border-radius: 14px;
    padding: 18px;
    background: #fff;
}

.implant-plan-primary-card h3 {
    margin: 12px 0;
    font-size: 18px;
    color: #0f172a;
}

.implant-plan-stat-grid-process {
    grid-template-columns: repeat(2, minmax(0,1fr));
    margin: 0;
}

.implant-notes-panel-process {
    grid-column: 1 / -1;
}

.implant-process-teeth-card {
    margin-bottom: 18px;
    box-shadow: none;
}

.implant-table-area { min-width: 0; }

.implant-control-history-list {
    position: relative;
}

.implant-history-record {
    padding-left: 22px;
    position: relative;
}

.implant-history-record-dot {
    position: absolute;
    left: 8px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #2563eb;
}

.implant-history-record p {
    margin: 8px 0 0;
    color: #475569;
    line-height: 1.55;
}

.implant-other-services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
}

.implant-other-service-card {
    border: 1px solid #edf2f7;
    border-radius: 14px;
    padding: 16px;
    min-width: 0;
}

.implant-other-service-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.implant-other-service-card-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
}

.implant-service-history-list {
    display: grid;
    gap: 10px;
}

.implant-service-history-item {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    background: #fff;
}

.implant-service-history-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef6ff;
    color: #2563eb;
}

.implant-service-history-copy > div {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.implant-service-history-copy strong { color:#0f172a; }
.implant-service-history-copy small { display:block; margin-top:4px; color:#64748b; }
.implant-service-history-copy p { margin:7px 0 0; color:#475569; font-size:13px; line-height:1.5; }

.implant-service-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3e8ff;
    color: #7e22ce;
    font-size: 11px;
    font-weight: 700;
}

/* v245 uses sequential sections instead of the v244 tab panel */
.implant-content-panel-board,
.implant-overview-board,
.implant-case-header-card-visual { display:none !important; }

@media (max-width: 1180px) {
    .implant-process-sidebar { position: static; max-height: none; }
    .implant-plan-section-body,
    .implant-other-services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .implant-process-section-head { grid-template-columns: 38px 1fr; }
    .implant-process-section-actions { grid-column: 1 / -1; justify-content: stretch; }
    .implant-process-section-actions .button { flex: 1; }
}


/* Medibox+ v246 — process ends with Control */
.implant-process-complete {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #bfe8d7;
    background: #f1fbf7;
    border-radius: 12px;
}

.implant-process-complete > span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #10b981;
    color: #fff;
    font-weight: 800;
}

.implant-process-complete strong,
.implant-process-complete small {
    display: block;
}

.implant-process-complete strong { color: #166534; }
.implant-process-complete small { margin-top: 2px; color: #5f6f68; }

.implant-plan-stat-process-state.is-complete strong { color: #10b981; }

.implant-final-step-badge {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-size: 13px;
    font-weight: 700;
}

#process-other-services,
[data-process-section="services"],
[data-scroll-process="process-other-services"] {
    display: none !important;
}


/* Medibox+ v247 — Albanian UI + more compact structured layout */
.implant-layout {
    grid-template-columns: 285px minmax(0, 1fr);
    gap: 18px;
}

.implant-case-sidebar {
    padding: 14px;
}

.implant-process-history {
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.implant-process-history-head h2 {
    margin-bottom: 12px;
    font-size: 16px;
}

.implant-process-step {
    grid-template-columns: 30px 1fr;
    gap: 9px;
    padding: 8px 6px;
}

.implant-process-timeline::before {
    left: 14px;
    top: 16px;
    bottom: 16px;
}

.implant-process-dot {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.implant-process-copy strong {
    font-size: 13px;
}

.implant-process-copy small {
    margin-top: 2px;
    font-size: 11px;
}

.implant-process-complete {
    margin-top: 10px;
    gap: 8px;
    padding: 10px 11px;
}

.implant-process-complete > span {
    width: 26px;
    height: 26px;
    font-size: 12px;
}

.implant-process-complete strong { font-size: 12px; }
.implant-process-complete small { font-size: 10px; }

.implant-plan-history-heading h2 { font-size: 14px; }
.implant-plan-history-heading .button { min-height: 30px !important; padding: 5px 8px !important; }

.implant-case-list { gap: 9px; }
.implant-case-item {
    padding: 11px 12px;
    border-radius: 11px;
}
.implant-case-item .implant-case-item-top { margin-bottom: 6px; }
.implant-case-item .implant-case-item-top strong { font-size: 15px; }
.implant-case-item .implant-case-item-date,
.implant-case-item .implant-case-item-count { font-size: 11px; }
.implant-case-item .implant-case-item-count { margin-top: 3px; }
.implant-case-item .implant-status-badge { font-size: 10px; min-height: 20px; padding: 2px 7px; }

.implant-sidebar-note {
    margin-top: 12px;
    padding: 12px;
    border-radius: 11px;
}
.implant-sidebar-note-title { margin-bottom: 8px; font-size: 12px; }
.implant-sidebar-note-body { min-height: 48px; font-size: 11px; line-height: 1.45; }

.implant-process-section {
    margin-bottom: 14px;
    border-radius: 13px;
}

.implant-process-section-head {
    grid-template-columns: 34px minmax(0,1fr) auto;
    gap: 11px;
    padding: 13px 15px;
}

.implant-process-section-number {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.implant-process-section-head > div:nth-child(2) > small {
    font-size: 9px;
    margin-bottom: 2px;
}
.implant-process-section-head h2 { font-size: 16px; }
.implant-process-section-head p { margin-top: 3px; font-size: 11px; line-height: 1.4; }
.implant-process-section-actions .button { min-height: 30px !important; padding: 5px 9px !important; font-size: 10px !important; }
.implant-final-step-badge { min-height: 30px; padding: 0 9px; font-size: 10px; }

.implant-process-section-body,
.implant-plan-section-body {
    padding: 14px;
}

.implant-plan-section-body {
    gap: 12px;
}

.implant-plan-primary-card,
.implant-notes-panel-process,
.implant-overview-card {
    padding: 13px;
    border-radius: 11px;
}

.implant-plan-primary-card h3 {
    margin: 8px 0;
    font-size: 15px;
}
.implant-case-no { font-size: 18px; }
.implant-case-meta-visual { gap: 13px; font-size: 11px; }

.implant-plan-stat-grid-process { gap: 8px; }
.implant-plan-stat {
    min-height: 68px;
    padding: 10px 8px;
    border-radius: 10px;
}
.implant-plan-stat strong { font-size: 23px; }
.implant-plan-stat:nth-child(4) strong { font-size: 18px; }
.implant-plan-stat span { margin-top: 6px; font-size: 10px; }

.implant-mini-heading { margin-bottom: 9px; font-size: 12px; }
.implant-notes-box { min-height: 56px; padding: 11px; border-radius: 10px; font-size: 11px; }

.implant-process-teeth-card { margin-bottom: 12px; }
.implant-arch-board { padding: 10px; border-radius: 10px; }
.implant-arch-row + .implant-arch-row { margin-top: 7px; }
.implant-arch-row small { margin-bottom: 5px; font-size: 9px; }
.implant-arch-row-teeth { gap: 5px; }
.implant-arch-tooth {
    width: 27px;
    height: 27px;
    font-size: 9px;
    border-width: 1px;
}
.implant-selected-summary { margin-top: 8px; font-size: 10px; }

.implant-table-shell { border-radius: 10px; }
.implant-clean-table th,
.implant-clean-table td { padding: 9px 10px; font-size: 11px; }
.implant-clean-table th { font-size: 10px; }
.implant-tooth-table-chip { min-width: 26px; height: 26px; font-size: 10px; }
.implant-table-title { font-size: 11px; }
.implant-table-subtitle { margin-top: 2px; font-size: 9px; }
.implant-row-actions { gap: 5px; }
.icon-button-soft { width: 29px; height: 29px; border-radius: 8px; }

.implant-simple-list { gap: 8px; }
.implant-simple-item { padding: 10px 12px; border-radius: 10px; font-size: 11px; }
.implant-simple-item small,
.implant-simple-item-side { margin-top: 2px; font-size: 10px; }
.implant-history-record p { margin-top: 5px; font-size: 11px; }

@media (max-width: 1180px) {
    .implant-layout { grid-template-columns: 250px minmax(0,1fr); gap: 14px; }
}

@media (max-width: 900px) {
    .implant-layout { grid-template-columns: 1fr; }
    .implant-process-sidebar { position: static; }
}


/* Medibox+ v248 — horizontal history + minimal one-row process sections */
.implant-flow-workspace {
    display: grid;
    gap: 10px;
    width: 100%;
    padding-top: 8px;
}

.implant-flow-history-card,
.implant-flow-row-section,
.implant-flow-row {
    background: #fff;
    border: 1px solid #e6ebf3;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}

.implant-flow-history-card {
    padding: 12px 16px 14px;
}

.implant-flow-history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.implant-flow-history-top small,
.implant-flow-row-copy > small {
    display: block;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.implant-flow-history-top h2 {
    margin: 2px 0 0;
    font-size: 15px;
    color: #0f172a;
}

.implant-flow-history-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.implant-flow-complete-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid #b7ead5;
    background: #f0fbf6;
    color: #07835f;
    font-size: 10px;
    font-weight: 700;
}

.implant-flow-history-horizontal {
    display: grid;
    grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr) 44px minmax(0,1fr);
    align-items: center;
    gap: 0;
}

.implant-flow-history-step {
    border: 0;
    background: transparent;
    display: grid;
    grid-template-columns: 30px minmax(0,1fr);
    align-items: center;
    gap: 9px;
    padding: 7px 6px;
    text-align: left;
    color: #64748b;
    border-radius: 9px;
}

.implant-flow-history-step:hover,
.implant-flow-history-step.is-viewing {
    background: #f8fbff;
}

.implant-flow-step-number,
.implant-flow-row-number {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #d9e1ec;
    background: #fff;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    flex: 0 0 auto;
}

.implant-flow-history-step.is-current .implant-flow-step-number,
.implant-flow-row-number.is-current {
    border-color: #3b82f6;
    color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59,130,246,.08);
}

.implant-flow-history-step.is-done .implant-flow-step-number,
.implant-flow-row-number.is-done {
    border-color: #22b78b;
    background: #22b78b;
    color: #fff;
}

.implant-flow-history-step strong {
    display: block;
    color: #172033;
    font-size: 12px;
    line-height: 1.25;
}

.implant-flow-history-step small {
    display: block;
    margin-top: 2px;
    color: #8a96a8;
    font-size: 9px;
}

.implant-flow-history-line {
    height: 1px;
    background: #e3e9f2;
}

.implant-flow-history-line.is-done {
    background: #76d6b8;
}

.implant-flow-row-section {
    overflow: hidden;
}

.implant-flow-row-section > .implant-flow-row {
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

.implant-flow-row {
    min-height: 64px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.implant-flow-row-main {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 11px;
}

.implant-flow-row-copy {
    min-width: 0;
}

.implant-flow-row-copy h3,
.implant-flow-row-empty h3 {
    margin: 1px 0 4px;
    color: #111827;
    font-size: 14px;
    line-height: 1.25;
}

.implant-flow-row-empty p {
    margin: 0;
    color: #7c8798;
    font-size: 10px;
}

.implant-flow-inline-data {
    display: flex;
    align-items: center;
    gap: 8px 14px;
    flex-wrap: wrap;
    color: #697586;
    font-size: 10px;
}

.implant-flow-inline-data strong {
    color: #253047;
    font-size: 11px;
}

.implant-flow-inline-data span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.implant-flow-row-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.implant-flow-row-actions .button {
    min-height: 30px !important;
    padding: 5px 9px !important;
    font-size: 10px !important;
}

.implant-flow-plan-select {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 9px;
}

.implant-flow-plan-select select {
    min-height: 30px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fff;
    color: #445066;
    padding: 4px 26px 4px 8px;
    font-size: 10px;
}

.implant-flow-toggle-button {
    min-height: 30px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fff;
    color: #445066;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
}

.implant-flow-toggle-button b {
    color: #2563eb;
    font-size: 13px;
    line-height: 1;
}

.implant-flow-success-text {
    color: #07835f !important;
    font-weight: 700;
}

.implant-flow-details {
    border-top: 1px solid #edf1f6;
    background: #fbfcfe;
    padding: 11px 12px 12px;
}

.implant-flow-details[hidden] {
    display: none !important;
}

.implant-flow-details-grid {
    display: grid;
    grid-template-columns: 250px minmax(0,1fr);
    gap: 12px;
    align-items: start;
}

.implant-flow-teeth-panel,
.implant-flow-table-panel {
    min-width: 0;
}

.implant-arch-board-compact {
    padding: 8px;
}

.implant-arch-board-compact .implant-arch-row + .implant-arch-row {
    margin-top: 5px;
}

.implant-arch-board-compact .implant-arch-row-teeth {
    gap: 4px;
}

.implant-arch-board-compact .implant-arch-tooth {
    width: 24px;
    height: 24px;
    font-size: 8px;
}

.implant-arch-board-compact .implant-arch-row small {
    margin-bottom: 4px;
    font-size: 8px;
}

.implant-flow-details .implant-clean-table th,
.implant-flow-details .implant-clean-table td {
    padding: 7px 8px;
    font-size: 10px;
}

.implant-flow-details .implant-clean-table th {
    font-size: 9px;
}

.implant-flow-details .implant-simple-item {
    padding: 8px 10px;
}

/* Hide the old v245/v247 two-column process presentation if any fragment remains. */
.implant-layout,
.implant-process-sidebar,
.implant-process-section {
    display: none !important;
}

@media (max-width: 900px) {
    .implant-flow-history-horizontal {
        grid-template-columns: 1fr;
        gap: 3px;
    }
    .implant-flow-history-line { display: none; }
    .implant-flow-row {
        align-items: flex-start;
        flex-direction: column;
    }
    .implant-flow-row-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .implant-flow-details-grid {
        grid-template-columns: 1fr;
    }
}


/* Medibox+ v249 — patient identity, modern history and expanded implant details */
.implant-patient-identity-strip{display:flex;align-items:center;gap:12px;margin:0 0 8px;padding:10px 14px;border:1px solid #e6ebf3;border-radius:14px;background:linear-gradient(135deg,#fff 0%,#f8fbff 100%);box-shadow:0 1px 3px rgba(15,23,42,.035)}
.implant-patient-avatar{width:38px;height:38px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;background:#eef5ff;border:1px solid #dbeafe;color:#2563eb;font-size:13px;font-weight:800;letter-spacing:.04em}
.implant-patient-identity-copy{min-width:0}.implant-patient-identity-copy>small{display:block;color:#94a3b8;font-size:8px;font-weight:800;letter-spacing:.11em}.implant-patient-identity-copy h1{margin:1px 0 2px;color:#0f172a;font-size:17px;line-height:1.2;letter-spacing:-.01em}.implant-patient-identity-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;color:#64748b;font-size:9px}.implant-patient-identity-meta span{display:inline-flex;align-items:center;gap:4px}.implant-patient-identity-meta svg{width:12px;height:12px}
.implant-flow-row>.implant-flow-row-main>.implant-flow-row-number,.implant-flow-row-main>.implant-flow-row-number{display:none!important}.implant-flow-row-main{gap:0}
.implant-flow-history-card{padding:16px 18px 18px;border-radius:16px;border-color:#e2e8f0;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);box-shadow:0 8px 24px rgba(15,23,42,.045)}
.implant-flow-history-top-modern{margin-bottom:14px}.implant-flow-history-title-wrap{display:flex;align-items:center;gap:11px}.implant-flow-history-icon{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:11px;background:#eef5ff;color:#2563eb;border:1px solid #dbeafe}.implant-flow-history-icon svg{width:17px;height:17px}.implant-flow-history-title-wrap p{margin:3px 0 0;color:#94a3b8;font-size:9px}
.implant-flow-history-modern{grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr) 34px minmax(0,1fr);gap:0}.implant-flow-history-modern .implant-flow-history-step{position:relative;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;min-height:66px;padding:10px 12px;border:1px solid #e8edf5;border-radius:13px;background:#fff;box-shadow:0 2px 8px rgba(15,23,42,.025);transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.implant-flow-history-modern .implant-flow-history-step:hover,.implant-flow-history-modern .implant-flow-history-step.is-viewing{background:#fff;border-color:#bfdbfe;box-shadow:0 6px 18px rgba(37,99,235,.08);transform:translateY(-1px)}
.implant-flow-history-modern .implant-flow-step-number{width:32px;height:32px;border-radius:10px;background:#f8fafc;border-color:#dbe3ee;color:#64748b;font-size:11px}.implant-flow-history-modern .implant-flow-history-step.is-current .implant-flow-step-number{background:#eff6ff;border-color:#93c5fd;color:#2563eb;box-shadow:none}.implant-flow-history-modern .implant-flow-history-step.is-done .implant-flow-step-number{background:#eefbf7;border-color:#b7ead5;color:#07835f}.implant-flow-history-step-copy{min-width:0}.implant-flow-history-modern .implant-flow-history-step strong{font-size:11px}.implant-flow-history-modern .implant-flow-history-step small{font-size:9px}
.implant-flow-history-state{align-self:start;white-space:nowrap;padding:4px 7px;border-radius:999px;background:#f8fafc;color:#94a3b8;font-size:8px;font-weight:700}.implant-flow-history-step.is-current .implant-flow-history-state{background:#eff6ff;color:#2563eb}.implant-flow-history-step.is-done .implant-flow-history-state{background:#f0fbf6;color:#07835f}.implant-flow-history-modern .implant-flow-history-line{height:2px;margin:0 5px;border-radius:999px;background:#e5eaf2}.implant-flow-history-modern .implant-flow-history-line.is-done{background:#b7ead5}
.implant-flow-row{min-height:70px;padding:12px 15px;border-radius:13px}.implant-flow-row-copy h3,.implant-flow-row-empty h3{font-size:15px}.implant-flow-inline-data{font-size:10px;gap:7px 14px}.implant-flow-inline-data strong{font-size:11px}
.implant-flow-details-implants{padding:0;background:#f8fafc}.implant-details-modern-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px 15px;border-bottom:1px solid #e8edf4;background:linear-gradient(135deg,#fff 0%,#f8fbff 100%)}.implant-details-modern-header small{display:block;color:#94a3b8;font-size:8px;font-weight:800;letter-spacing:.1em}.implant-details-modern-header h4{margin:3px 0;color:#0f172a;font-size:16px}.implant-details-modern-header p{margin:0;color:#7c8798;font-size:10px}.implant-details-modern-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.implant-details-modern-summary span{min-width:82px;padding:8px 10px;border:1px solid #e2e8f0;border-radius:11px;background:#fff;color:#64748b;font-size:9px;text-align:center}.implant-details-modern-summary strong{display:block;color:#0f172a;font-size:16px;line-height:1.1}
.implant-flow-details-grid-modern{grid-template-columns:1fr;gap:14px;padding:16px 18px 18px}.implant-flow-teeth-panel-modern,.implant-flow-table-panel-modern{padding:14px;border:1px solid #e5eaf1;border-radius:14px;background:#fff;box-shadow:0 2px 8px rgba(15,23,42,.025)}.implant-arch-board-expanded{padding:14px 18px;border:0;background:#fbfdff}.implant-arch-board-expanded .implant-arch-row+.implant-arch-row{margin-top:9px}.implant-arch-board-expanded .implant-arch-row-teeth{gap:7px;justify-content:center}.implant-arch-board-expanded .implant-arch-tooth{width:32px;height:32px;font-size:10px;border-radius:9px;transition:transform .15s ease,box-shadow .15s ease}.implant-arch-board-expanded .implant-arch-tooth.is-active{background:#eafaf5;border-color:#75d4b5;color:#087a5c;box-shadow:inset 0 0 0 1px rgba(8,122,92,.06)}.implant-arch-board-expanded .implant-arch-tooth:hover{transform:translateY(-1px)}.implant-arch-board-expanded .implant-arch-row small{margin-bottom:6px;color:#94a3b8;font-size:8px;text-align:center}.implant-details-selected-teeth{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:10px;color:#64748b;font-size:9px}.implant-details-selected-teeth strong{color:#0f172a;font-size:10px}.implant-table-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.implant-table-panel-heading small{color:#94a3b8;font-size:9px;font-weight:600}.implant-flow-table-panel-modern .implant-table-shell{border-radius:12px;overflow:hidden}.implant-flow-table-panel-modern .implant-clean-table th{padding:10px 12px;background:#f8fafc;color:#64748b;font-size:9px}.implant-flow-table-panel-modern .implant-clean-table td{padding:11px 12px;font-size:10px}.implant-flow-table-panel-modern .implant-tooth-table-chip{min-width:30px;height:30px;border-radius:9px;background:#f1f5f9;color:#334155;font-size:10px}
@media(max-width:900px){.implant-patient-identity-strip{padding:9px 11px}.implant-flow-history-modern{grid-template-columns:1fr;gap:6px}.implant-flow-history-modern .implant-flow-history-line{display:none}.implant-flow-history-modern .implant-flow-history-step{grid-template-columns:34px minmax(0,1fr) auto}.implant-details-modern-header{align-items:flex-start;flex-direction:column}.implant-details-modern-summary{width:100%}.implant-details-modern-summary span{flex:1}}


/* Medibox+ v250 — patient header aligned with the other patient modules */
.implant-patient-profile-hero { margin:0 0 12px; overflow:visible; }
.implant-patient-profile-main { min-height:78px; }
.implant-profile-avatar { flex:0 0 auto; }
.implant-profile-identity { min-width:0; flex:1 1 auto; }
.implant-profile-title-line h1 { margin:0; }
.implant-profile-inline-meta { margin-top:8px; }
.implant-profile-edit { margin-left:auto; align-self:center; flex:0 0 auto; }
.implant-patient-profile-hero .implant-patient-tabs { border-top:0 !important; border-bottom:0 !important; border-radius:0 !important; box-shadow:none !important; }
@media (max-width:760px){ .implant-patient-profile-main{align-items:flex-start}.implant-profile-edit{align-self:flex-start} }


/* Medibox+ v251 — simplified history header */
.implant-flow-history-top-minimal {
    padding-bottom: 8px;
}

.implant-flow-history-actions-full {
    width: 100%;
    justify-content: flex-end;
}

/* Medibox+ v253 — modern implantology workspace refinement */
.implant-flow-workspace {
    gap: 14px;
    padding-top: 12px;
}

.implant-flow-history-card {
    position: relative;
    overflow: hidden;
    padding: 12px 14px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .055);
}

.implant-flow-history-card::before {
    content: none;
    display: none;
}

.implant-flow-history-top-minimal {
    min-height: 40px;
    margin: 0 0 10px;
    padding: 2px 0 0;
}

.implant-flow-history-actions-full {
    width: 100%;
    justify-content: flex-end;
    gap: 10px;
}

.implant-flow-complete-badge {
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid #ccefe2;
    background: #f4fcf8;
    color: #087a5c;
    font-size: 11px;
    font-weight: 750;
}

.implant-new-plan-button {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    border: 0;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.implant-new-plan-button:hover {
    transform: translateY(-1px);
    background: #1d4ed8;
    box-shadow: 0 11px 22px rgba(37, 99, 235, .28);
}

.implant-new-plan-button:focus-visible {
    outline: 3px solid rgba(59, 130, 246, .22);
    outline-offset: 2px;
}

.implant-flow-history-modern {
    grid-template-columns: minmax(0,1fr) 26px minmax(0,1fr) 26px minmax(0,1fr);
    align-items: stretch;
}

.implant-flow-history-modern .implant-flow-history-step {
    min-height: 76px;
    grid-template-columns: 38px minmax(0,1fr) auto;
    gap: 11px;
    padding: 12px 13px;
    border: 1px solid #e7edf5;
    border-radius: 14px;
    background: #fbfdff;
    box-shadow: none;
}

.implant-flow-history-modern .implant-flow-history-step:hover,
.implant-flow-history-modern .implant-flow-history-step.is-viewing {
    border-color: #bfd4ff;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
    transform: translateY(-1px);
}

.implant-flow-history-modern .implant-flow-step-number {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid #dce5f0;
    background: #fff;
}

.implant-flow-history-modern .implant-flow-history-step.is-current .implant-flow-step-number {
    background: #eef5ff;
    border-color: #9cc0ff;
    color: #1d4ed8;
}

.implant-flow-history-modern .implant-flow-history-step.is-done .implant-flow-step-number {
    background: #eefaf6;
    border-color: #a8e2cf;
    color: #087a5c;
}

.implant-flow-history-modern .implant-flow-history-step strong {
    font-size: 13px;
    font-weight: 750;
    color: #172033;
}

.implant-flow-history-modern .implant-flow-history-step small {
    margin-top: 4px;
    font-size: 10.5px;
    color: #7c8798;
}

.implant-flow-history-state {
    align-self: center;
    padding: 5px 8px;
    font-size: 9.5px;
    font-weight: 750;
    border: 1px solid #edf1f6;
    background: #fff;
}

.implant-flow-history-step.is-current .implant-flow-history-state {
    border-color: #d7e6ff;
    background: #f2f7ff;
    color: #2563eb;
}

.implant-flow-history-step.is-done .implant-flow-history-state {
    border-color: #d7f1e7;
    background: #f3fbf7;
    color: #087a5c;
}

.implant-flow-history-modern .implant-flow-history-line {
    align-self: center;
    height: 2px;
    margin: 0 4px;
    background: #e3eaf3;
}

.implant-flow-history-modern .implant-flow-history-line.is-done {
    background: #9edcc8;
}

.implant-flow-row-section {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.implant-flow-row-section > .implant-flow-row,
.implant-section-card {
    position: relative;
    overflow: hidden;
    min-height: 82px;
    padding: 15px 17px;
    border: 1px solid #e5ebf3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .04);
}

.implant-section-card::before {
    content: "";
    position: absolute;
    inset: 12px auto 12px 0;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: #94a3b8;
}

.implant-section-card-plan::before { background: #6366f1; }
.implant-section-card-implants::before { background: #0ea5e9; }
.implant-section-card-controls::before { background: #10b981; }

.implant-section-card:hover {
    border-color: #d7e1ee;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .055);
}

.implant-flow-row-copy h3,
.implant-flow-row-empty h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .035em;
}

.implant-flow-inline-data {
    gap: 7px 8px;
    font-size: 11.5px;
}

.implant-flow-inline-data strong,
.implant-flow-inline-data span {
    min-height: 27px;
    padding: 4px 9px;
    border: 1px solid #edf1f6;
    border-radius: 999px;
    background: #f8fafc;
    color: #526075;
}

.implant-flow-inline-data strong {
    font-size: 11.5px;
    color: #263248;
    font-weight: 750;
}

.implant-flow-inline-data svg {
    width: 13px;
    height: 13px;
    color: #64748b;
}

.implant-flow-row-actions {
    gap: 8px;
}

.implant-flow-row-actions .button {
    min-height: 36px !important;
    padding: 7px 11px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

.implant-flow-row-actions .button-primary {
    box-shadow: 0 5px 14px rgba(37, 99, 235, .13);
}

.implant-flow-plan-select {
    gap: 7px;
    font-size: 10.5px;
}

.implant-flow-plan-select select {
    min-height: 36px;
    border-radius: 10px;
    padding: 6px 30px 6px 10px;
    font-size: 11px;
}

.implant-flow-toggle-button {
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-size: 11px;
    font-weight: 750;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.implant-flow-toggle-button:hover {
    border-color: #bfd4ff;
    background: #f8fbff;
}

.implant-flow-toggle-button[aria-expanded="true"] {
    border-color: #a9c7ff;
    background: #eef5ff;
    color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .08);
}

.implant-flow-toggle-button b {
    font-size: 15px;
    color: currentColor;
}

.implant-flow-details {
    margin-top: -2px;
    padding: 16px;
    border: 1px solid #e5ebf3;
    border-top: 0;
    border-radius: 0 0 16px 16px;
    background: #f8fafc;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .035);
}

.implant-flow-details-implants {
    padding: 0;
    background: #f8fafc;
}

.implant-details-modern-header {
    padding: 20px 22px 17px;
    border-bottom: 1px solid #e5ebf3;
    background: linear-gradient(135deg, #ffffff 0%, #f7faff 100%);
}

.implant-details-modern-header small {
    font-size: 9px;
}

.implant-details-modern-header h4 {
    margin: 4px 0 5px;
    font-size: 18px;
    letter-spacing: -.01em;
}

.implant-details-modern-header p {
    font-size: 11.5px;
    line-height: 1.5;
}

.implant-details-modern-summary span {
    min-width: 92px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 10px;
}

.implant-details-modern-summary strong {
    font-size: 18px;
}

.implant-flow-details-grid-modern {
    grid-template-columns: minmax(330px, .85fr) minmax(0, 1.45fr);
    gap: 16px;
    padding: 18px 20px 20px;
}

.implant-flow-teeth-panel-modern,
.implant-flow-table-panel-modern {
    padding: 16px;
    border: 1px solid #e3eaf3;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .035);
}

.implant-mini-heading {
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
}

.implant-arch-board-expanded {
    padding: 15px;
    border: 1px solid #eef2f7;
    border-radius: 13px;
    background: #fbfdff;
}

.implant-arch-board-expanded .implant-arch-row + .implant-arch-row {
    margin-top: 11px;
}

.implant-arch-board-expanded .implant-arch-row-teeth {
    gap: 8px;
}

.implant-arch-board-expanded .implant-arch-tooth {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 10.5px;
    background: #fff;
}

.implant-arch-board-expanded .implant-arch-tooth.is-active {
    background: #e9faf5;
    border-color: #7ad5b8;
    color: #087a5c;
    box-shadow: 0 3px 8px rgba(16, 185, 129, .09);
}

.implant-details-selected-teeth {
    justify-content: flex-start;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #e8edf4;
    border-radius: 11px;
    background: #f8fafc;
    font-size: 10.5px;
}

.implant-details-selected-teeth strong {
    font-size: 11px;
}

.implant-flow-table-panel-modern .implant-table-shell {
    border: 1px solid #e7edf5;
    border-radius: 13px;
}

.implant-flow-table-panel-modern .implant-clean-table th {
    padding: 11px 13px;
    font-size: 10.5px;
    letter-spacing: .02em;
}

.implant-flow-table-panel-modern .implant-clean-table td {
    padding: 12px 13px;
    font-size: 11.5px;
}

.implant-flow-table-panel-modern .implant-table-title {
    font-size: 12px;
}

.implant-flow-table-panel-modern .implant-table-subtitle {
    font-size: 10.5px;
}

.implant-flow-table-panel-modern .implant-tooth-table-chip {
    min-width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 11px;
    background: #eef5ff;
    color: #2458a7;
}

.implant-control-history-list {
    gap: 10px;
}

.implant-control-history-list .implant-history-record {
    padding: 13px 15px;
    border: 1px solid #e4ebf3;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .025);
}

.implant-control-history-list .implant-history-record strong {
    font-size: 12px;
    color: #172033;
}

.implant-control-history-list .implant-history-record small,
.implant-control-history-list .implant-history-record p,
.implant-control-history-list .implant-simple-item-side {
    font-size: 10.5px;
}

@media (max-width: 1180px) {
    .implant-flow-details-grid-modern {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .implant-flow-history-modern {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .implant-flow-history-modern .implant-flow-history-line {
        display: none;
    }

    .implant-flow-history-modern .implant-flow-history-step {
        grid-template-columns: 38px minmax(0,1fr) auto;
    }

    .implant-section-card,
    .implant-flow-row-section > .implant-flow-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .implant-flow-row-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .implant-flow-history-card {
        padding: 10px;
        border-radius: 15px;
    }

    .implant-new-plan-button {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .implant-flow-inline-data strong,
    .implant-flow-inline-data span {
        width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
    }

    .implant-details-modern-header,
    .implant-flow-details-grid-modern {
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* Medibox+ v254 — simplified implant details header and modern control history */
.implant-details-modern-header-minimal {
    justify-content: flex-end;
    padding: 14px 18px 10px;
    background: linear-gradient(135deg, #fbfdff 0%, #f4f8fc 100%);
}

.implant-details-modern-summary-wide {
    width: 100%;
    justify-content: flex-end;
}

.implant-details-modern-summary-wide span {
    min-width: 112px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
}

.implant-details-modern-summary-wide strong {
    display: block;
    font-size: 18px;
    line-height: 1.1;
    margin-bottom: 4px;
}

.implant-details-modern-summary-wide em {
    font-style: normal;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.implant-control-history-list {
    gap: 14px;
}

.implant-history-record-modern {
    display: block;
    padding: 0;
    border: 1px solid #e7edf5;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    overflow: hidden;
}

.implant-history-record-main {
    padding: 16px 18px;
}

.implant-history-record-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.implant-history-record-modern strong {
    font-size: 14px;
    line-height: 1.3;
    color: #0f172a;
}

.implant-history-record-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2458a7;
    font-size: 11px;
    font-weight: 700;
}

.implant-history-record-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #b7efd0;
}

.implant-history-record-pill svg,
.implant-history-record-meta svg {
    width: 13px;
    height: 13px;
}

.implant-history-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
    color: #64748b;
    font-size: 12px;
}

.implant-history-record-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.implant-history-record-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    color: #334155;
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .implant-details-modern-summary-wide {
        justify-content: stretch;
    }

    .implant-details-modern-summary-wide span {
        flex: 1;
        min-width: 0;
    }

    .implant-history-record-pill {
        margin-left: 0;
    }
}

/* Medibox+ v256 — remove implant tabs separator line */
.implant-patient-profile-hero .implant-patient-tabs { border-top:0 !important; border-bottom:0 !important; box-shadow:none !important; }

/* Medibox+ v257 — remove top accent line above implant history */
.implant-flow-history-card::before { content:none; display:none; }


/* Medibox+ v258 — larger typography, icon-only actions and implant report controls */
.implant-module,
.implant-module input,
.implant-module select,
.implant-module textarea,
.implant-module button { font-size: 15px; }
.implant-module-toolbar .eyebrow, .implant-mini-heading, .implant-flow-history-state, .implant-flow-history-step-copy small, .implant-flow-inline-data span, .implant-table-subtitle { font-size: 13px; }
.implant-module-toolbar h1, .implant-flow-row-copy h3 { font-size: 19px; }
.implant-flow-inline-data strong, .implant-table-title, .implant-history-record-top strong { font-size: 15px; }
.implant-quick-add-button{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:12px;background:#2563eb;color:#fff;font-size:27px;line-height:1;font-weight:500;box-shadow:0 8px 18px rgba(37,99,235,.22);cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.implant-quick-add-button:hover{transform:translateY(-1px);background:#1d4ed8;box-shadow:0 10px 22px rgba(37,99,235,.28)}
.implant-quick-add-inline{width:36px;height:36px;font-size:24px}
.implant-flow-toggle-icon{width:36px;min-width:36px;padding:0;justify-content:center;gap:0}
.implant-flow-toggle-icon span{display:none !important}
.implant-inline-form{display:inline-flex;margin:0}
.implant-action-icon{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center}
.implant-action-delete{color:#b42318;background:#fff6f5;border-color:#f4c7c3}
.implant-action-delete:hover{color:#8f1d15;background:#ffebe8;border-color:#efaaa4}
.implant-history-record-modern{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.implant-history-record-actions{display:flex;gap:8px;align-items:center;flex:0 0 auto}
.implant-flow-plan-actions{flex-wrap:wrap;align-items:center}
.implant-module-toolbar-actions{align-items:center}


/* Medibox+ v260 — implantology patient header aligned with Reviews */
.implant-patient-profile-main{min-height:84px;align-items:center}
.implant-profile-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.implant-profile-new-visit-form{margin-left:auto;flex:0 0 auto}
.implant-profile-new-visit{white-space:nowrap}
@media(max-width:760px){
  .implant-patient-profile-main{align-items:flex-start}
  .implant-profile-new-visit-form{margin-left:0;width:100%}
  .implant-profile-new-visit{width:100%;justify-content:center}
}

/* Medibox+ v286 — empty Implantology state before the first procedure */
.implant-no-procedure {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 118px;
    padding: 22px 24px;
    border: 1px solid #dfe7f1;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}
.implant-no-procedure-copy {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}
.implant-no-procedure-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 25px;
    font-weight: 500;
    line-height: 1;
}
.implant-no-procedure h2 {
    margin: 0 0 5px;
    color: #172033;
    font-size: 15px;
    font-weight: 800;
}
.implant-no-procedure p {
    max-width: 760px;
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
}
/* Medibox+ v287 — compact add-procedure action, matching the empty-state + icon */
.implant-no-procedure-action {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    box-shadow: none;
    transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.implant-no-procedure-action:hover,
.implant-no-procedure-action:focus-visible {
    background: #e3edff;
    color: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .12);
    outline: none;
}
.implant-no-procedure-action:active {
    transform: translateY(1px);
}
@media (max-width: 720px) {
    .implant-no-procedure {
        align-items: flex-start;
        flex-direction: column;
    }
}
\n\n/* Medibox+ v288 — one active implant procedure, top actions and previous procedure rows */\n.implant-flow-history-actions-full .implant-inline-form {\n    display: inline-flex;\n    margin: 0;\n}\n\n.implant-history-action {\n    width: 38px;\n    height: 38px;\n    min-width: 38px;\n    border-radius: 11px;\n}\n\n.implant-previous-procedures {\n    display: grid;\n    gap: 8px;\n}\n\n.implant-previous-procedure-row {\n    display: grid;\n    grid-template-columns: minmax(150px, auto) auto minmax(150px, 1fr) auto auto 22px;\n    align-items: center;\n    gap: 12px;\n    min-height: 50px;\n    padding: 9px 12px;\n    border: 1px solid #e5eaf1;\n    border-radius: 13px;\n    background: #fbfcfe;\n    color: #475569;\n    text-decoration: none;\n    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;\n}\n\n.implant-previous-procedure-row:hover,\n.implant-previous-procedure-row:focus-visible {\n    border-color: #cbd8e8;\n    background: #ffffff;\n    box-shadow: 0 7px 20px rgba(15, 23, 42, .055);\n    transform: translateY(-1px);\n}\n\n.implant-previous-procedure-row:focus-visible {\n    outline: 3px solid rgba(59, 130, 246, .16);\n    outline-offset: 2px;\n}\n\n.implant-previous-procedure-label {\n    font-size: 11px;\n    font-weight: 800;\n    letter-spacing: .025em;\n    text-transform: uppercase;\n    color: #7c8ba1;\n}\n\n.implant-previous-procedure-row > strong {\n    color: #23324a;\n    font-size: 13px;\n}\n\n.implant-previous-procedure-row > span:not(.implant-previous-procedure-label):not(.implant-status-badge):not(.implant-previous-procedure-arrow) {\n    min-width: 0;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    font-size: 12px;\n}\n\n.implant-previous-procedure-row.is-active-procedure {\n    border-color: #cfe0ff;\n    background: #f7faff;\n}\n\n.implant-previous-procedure-row.is-active-procedure .implant-previous-procedure-label {\n    color: #2563eb;\n}\n\n.implant-previous-procedure-arrow {\n    justify-self: end;\n    color: #94a3b8;\n    font-size: 18px;\n    line-height: 1;\n}\n\n@media (max-width: 760px) {\n    .implant-flow-history-actions-full {\n        flex-wrap: wrap;\n    }\n\n    .implant-previous-procedure-row {\n        grid-template-columns: 1fr auto;\n        gap: 5px 10px;\n        padding: 11px 12px;\n    }\n\n    .implant-previous-procedure-label,\n    .implant-previous-procedure-row > strong,\n    .implant-previous-procedure-row > span:not(.implant-status-badge):not(.implant-previous-procedure-arrow) {\n        grid-column: 1;\n    }\n\n    .implant-previous-procedure-row .implant-status-badge,\n    .implant-previous-procedure-arrow {\n        grid-column: 2;\n    }\n}\n
/* Medibox v326 — visual implantology process flow */
.implant-process-visual-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) 64px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
}

.implant-process-visual-step {
    appearance: none;
    min-width: 0;
    min-height: 112px;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1.5px solid #d6dee9;
    border-radius: 28px;
    background: #fff;
    color: #64748b;
    text-align: left;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .035);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.implant-process-visual-step:hover,
.implant-process-visual-step:focus-visible,
.implant-process-visual-step.is-viewing {
    transform: translateY(-2px);
    outline: none;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.implant-process-visual-number {
    position: relative;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border: 7px solid #cfd7e2;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .18);
}

.implant-process-visual-number b {
    color: #64748b;
    font-size: 25px;
    line-height: 1;
}

.implant-process-visual-number em {
    position: absolute;
    top: -12px;
    right: -9px;
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 14px;
    font-style: normal;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(22, 163, 74, .2);
}

.implant-process-visual-copy {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.implant-process-visual-copy strong {
    color: #64748b;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .01em;
}

.implant-process-visual-copy small {
    max-width: 270px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.implant-process-visual-step.is-done {
    border-color: #7edfb0;
    background: linear-gradient(135deg, #f5fffa 0%, #fff 70%);
}

.implant-process-visual-step.is-done .implant-process-visual-number {
    border-color: #22a866;
}

.implant-process-visual-step.is-done .implant-process-visual-number b,
.implant-process-visual-step.is-done .implant-process-visual-copy strong {
    color: #159650;
}

.implant-process-visual-step.is-current {
    border-color: #2563eb;
    background: linear-gradient(135deg, #f8fbff 0%, #fff 72%);
    box-shadow: 0 10px 28px rgba(37, 99, 235, .08);
}

.implant-process-visual-step.is-current .implant-process-visual-number {
    border-color: #1d63d8;
    box-shadow: 0 0 0 7px rgba(37, 99, 235, .07);
}

.implant-process-visual-step.is-current .implant-process-visual-number b,
.implant-process-visual-step.is-current .implant-process-visual-copy strong {
    color: #1559c6;
}

.implant-process-visual-step.is-pending {
    border-color: #d5dce6;
    background: #fbfcfe;
}

.implant-process-visual-step.is-pending .implant-process-visual-number,
.implant-process-visual-step.is-pending .implant-process-visual-copy {
    opacity: .82;
}

.implant-process-visual-connector {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #9ca9ba;
}

.implant-process-visual-connector i {
    flex: 1;
    height: 2px;
    background: repeating-linear-gradient(90deg, #b7c1cf 0 7px, transparent 7px 12px);
}

.implant-process-visual-connector b {
    font-size: 29px;
    line-height: 1;
    font-weight: 500;
}

.implant-process-visual-connector.is-done {
    color: #18a05c;
}

.implant-process-visual-connector.is-done i {
    background: #20a765;
}

.implant-process-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.implant-process-summary-card {
    position: relative;
    min-width: 0;
    min-height: 390px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dce3ec;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .045);
}

.implant-process-summary-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: #cbd5e1;
}

.implant-process-summary-card.is-done::before { background: #18a05c; }
.implant-process-summary-card.is-current::before { background: #2563eb; }

.implant-process-summary-header {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 64px;
    padding: 17px 21px 12px;
}

.implant-process-summary-dot {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 6px solid #dce3eb;
    border-radius: 50%;
    background: #fff;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
}

.implant-process-summary-card.is-done .implant-process-summary-dot {
    border: 0;
    background: #18a05c;
}

.implant-process-summary-card.is-current .implant-process-summary-dot {
    border-color: #d7e8ff;
    background: #2563eb;
    box-shadow: 0 0 0 4px #eef5ff;
}

.implant-process-summary-header strong {
    color: #475569;
    font-size: 16px;
    font-weight: 900;
}

.implant-process-summary-card.is-done .implant-process-summary-header strong { color: #11844a; }
.implant-process-summary-card.is-current .implant-process-summary-header strong { color: #1559c6; }

.implant-process-summary-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2px 21px 18px;
}

.implant-process-summary-body > p {
    min-height: 50px;
    margin: 0 0 15px;
    color: #526078;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
}

.implant-process-summary-body > p b {
    color: #1559c6;
    font-weight: 900;
}

.implant-process-summary-rows {
    display: grid;
    gap: 9px;
    margin-top: auto;
}

.implant-process-summary-rows > div {
    min-height: 47px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid #e7ecf2;
    border-radius: 11px;
    background: #f9fbfd;
}

.implant-process-summary-rows span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5f6d82;
    font-size: 11px;
    font-weight: 700;
}

.implant-process-summary-rows span svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.implant-process-summary-rows strong {
    max-width: 150px;
    overflow: hidden;
    color: #27364c;
    font-size: 11px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.implant-process-summary-action {
    min-height: 52px;
    margin: 0 21px 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid #bcc8d7;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.implant-process-summary-action svg {
    width: 17px;
    height: 17px;
}

.implant-process-summary-action:hover:not(:disabled),
.implant-process-summary-action:focus-visible:not(:disabled) {
    transform: translateY(-1px);
    outline: none;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .08);
}

.implant-process-summary-action.is-plan {
    border-color: #34b56f;
    color: #11844a;
}

.implant-process-summary-action.is-primary {
    border-color: #2563eb;
    background: #1765e8;
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .16);
}

.implant-process-summary-action.is-primary:hover,
.implant-process-summary-action.is-primary:focus-visible {
    background: #1458ce;
}

.implant-process-summary-plus {
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}

.implant-process-summary-action:disabled {
    cursor: not-allowed;
    opacity: .5;
    background: #f8fafc;
}

/* Detailed records stay below the visual flow and remain fully functional. */
.implant-process-summary-grid + .implant-previous-procedures,
.implant-previous-procedures + [data-process-section],
.implant-process-summary-grid + [data-process-section] {
    margin-top: 4px;
}

@media (max-width: 1180px) {
    .implant-process-visual-flow {
        grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr) 42px minmax(0, 1fr);
        gap: 7px;
    }
    .implant-process-visual-step {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 12px;
        padding: 15px;
        border-radius: 22px;
    }
    .implant-process-visual-number {
        width: 56px;
        height: 56px;
        border-width: 6px;
    }
    .implant-process-visual-number b { font-size: 20px; }
    .implant-process-visual-copy strong { font-size: 15px; }
    .implant-process-visual-copy small { font-size: 10px; }
    .implant-process-summary-grid { gap: 14px; }
}

@media (max-width: 900px) {
    .implant-process-visual-flow {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .implant-process-visual-connector {
        width: 2px;
        height: 24px;
        justify-self: center;
    }
    .implant-process-visual-connector i {
        width: 2px;
        height: 100%;
        flex: 0 0 auto;
        background: repeating-linear-gradient(180deg, #b7c1cf 0 6px, transparent 6px 10px);
    }
    .implant-process-visual-connector.is-done i { background: #20a765; }
    .implant-process-visual-connector b { display: none; }
    .implant-process-summary-grid { grid-template-columns: 1fr; }
    .implant-process-summary-card { min-height: 0; }
    .implant-process-summary-body > p { min-height: 0; }
}

@media (max-width: 560px) {
    .implant-flow-history-card { padding: 13px; }
    .implant-process-visual-step {
        min-height: 92px;
        grid-template-columns: 50px minmax(0, 1fr);
        padding: 13px;
        border-radius: 17px;
    }
    .implant-process-visual-number {
        width: 48px;
        height: 48px;
        border-width: 5px;
    }
    .implant-process-visual-number em {
        width: 23px;
        height: 23px;
        top: -9px;
        right: -7px;
        border-width: 2px;
        font-size: 11px;
    }
    .implant-process-summary-header,
    .implant-process-summary-body { padding-left: 15px; padding-right: 15px; }
    .implant-process-summary-action { margin-left: 15px; margin-right: 15px; }
    .implant-process-summary-rows > div { grid-template-columns: 1fr; gap: 4px; }
    .implant-process-summary-rows strong { max-width: none; }
}

/* Medibox v327 — simple professional implantology process */
.implant-module-simple-process {
    margin-top: 14px;
}

.implant-module-simple-process .implant-flow-workspace {
    display: grid;
    gap: 16px;
}

.implant-process-summary-grid-simple {
    gap: 16px;
}

.implant-process-summary-grid-simple .implant-process-summary-card {
    min-height: 318px;
    border: 1px solid #e1e7ef;
    border-radius: 16px;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .045);
}

.implant-process-summary-grid-simple .implant-process-summary-card::before {
    height: 3px;
}

.implant-process-summary-grid-simple .implant-process-summary-header {
    min-height: 58px;
    padding: 16px 18px 10px;
}

.implant-process-summary-grid-simple .implant-process-summary-header > strong {
    font-size: 14px;
    letter-spacing: .01em;
}

.implant-process-summary-grid-simple .implant-process-summary-dot {
    width: 22px;
    height: 22px;
    font-size: 10px;
}

.implant-process-summary-grid-simple .implant-process-summary-dot-number {
    border: 2px solid #d7dee8;
    background: #fff;
    color: #64748b;
    font-size: 11px;
}

.implant-process-summary-grid-simple .implant-process-summary-card.is-current .implant-process-summary-dot-number {
    border-color: #d7e8ff;
    background: #2563eb;
    color: #fff;
}

.implant-process-summary-grid-simple .implant-process-summary-body {
    padding: 2px 18px 16px;
}

.implant-process-summary-grid-simple .implant-process-summary-body > p {
    min-height: 43px;
    margin-bottom: 12px;
    font-size: 11px;
    line-height: 1.5;
}

.implant-process-summary-grid-simple .implant-process-summary-rows {
    gap: 7px;
}

.implant-process-summary-grid-simple .implant-process-summary-rows > div {
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fafbfd;
}

.implant-process-summary-grid-simple .implant-process-summary-rows span,
.implant-process-summary-grid-simple .implant-process-summary-rows strong {
    font-size: 10px;
}

.implant-process-summary-grid-simple .implant-process-summary-action {
    min-height: 46px;
    margin: 0 18px 18px;
    border-radius: 10px;
    font-size: 11px;
}

.implant-process-card-header-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.implant-process-card-detail-button,
.implant-process-card-add-button {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #dce3ec;
    border-radius: 9px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease;
}

.implant-process-summary-header > .implant-process-card-detail-button {
    margin-left: auto;
}

.implant-process-card-detail-button svg {
    width: 15px;
    height: 15px;
}

.implant-process-card-detail-button:hover,
.implant-process-card-detail-button:focus-visible {
    border-color: #b8c7db;
    background: #f8fafc;
    color: #334155;
    outline: none;
    transform: translateY(-1px);
}

.implant-process-card-add-button {
    border-color: #cfe0ff;
    background: #f3f7ff;
    color: #1d5ed2;
    font-size: 20px;
    line-height: 1;
}

.implant-process-card-add-button:hover:not(:disabled),
.implant-process-card-add-button:focus-visible:not(:disabled) {
    border-color: #90b6ff;
    background: #eaf2ff;
    outline: none;
}

.implant-process-card-add-button:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.implant-process-detail-panel,
.implant-process-detail-panel-wrap {
    scroll-margin-top: 18px;
}

.implant-process-detail-panel[hidden],
.implant-process-detail-panel-wrap[hidden] {
    display: none !important;
}

.implant-process-detail-panel {
    padding: 16px 18px;
    border: 1px solid #e1e7ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .04);
}

.implant-process-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.implant-process-detail-head small {
    display: block;
    margin-bottom: 3px;
    color: #16a05d;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}

.implant-process-detail-head h3 {
    margin: 0;
    color: #1f2937;
    font-size: 15px;
}

.implant-process-detail-close {
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
    color: #64748b;
    font: inherit;
    font-size: 18px;
    cursor: pointer;
}

.implant-process-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.implant-process-detail-grid > div {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding: 10px 11px;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    background: #fafbfd;
}

.implant-process-detail-grid > div.is-wide {
    grid-column: 1 / -1;
}

.implant-process-detail-grid span {
    color: #7a8798;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.implant-process-detail-grid strong {
    color: #26364a;
    font-size: 11px;
    line-height: 1.5;
}

.implant-process-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.implant-process-detail-actions .button {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 10px;
}

.implant-process-detail-actions .button svg {
    width: 14px;
    height: 14px;
}

.implant-process-delete-button {
    color: #c23b3b !important;
}

.implant-process-detail-panel-wrap .implant-flow-toggle-button {
    display: none;
}

.implant-process-detail-panel-wrap > .implant-flow-details {
    margin-top: 8px;
}

.implant-tooth-select-control {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    overflow: hidden;
    border: 1px solid #dbe2eb;
    border-radius: 10px;
    background: #fff;
}

.implant-tooth-select-control > svg {
    width: 15px;
    height: 15px;
    margin: auto;
    color: #2563eb;
}

.implant-tooth-select-control select {
    width: 100%;
    min-height: 38px;
    border: 0 !important;
    border-left: 1px solid #e5eaf1 !important;
    border-radius: 0 !important;
    background: #fff;
    box-shadow: none !important;
}

.implant-control-simple-dialog .implant-dialog-card {
    width: min(620px, calc(100vw - 28px));
}

.implant-control-simple-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.implant-control-simple-grid .field-span-2 {
    grid-column: 1 / -1;
}

.implant-next-control-simple {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(145px, .6fr);
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fafbfd;
}

.implant-next-control-simple-head {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.implant-next-control-simple-head span {
    color: #334155;
    font-size: 11px;
    font-weight: 900;
}

.implant-next-control-simple-head small {
    color: #8491a3;
    font-size: 9px;
    font-weight: 700;
}

.implant-next-control-simple > select,
.implant-next-control-simple > input[type="date"] {
    min-height: 39px;
    width: 100%;
    border: 1px solid #dbe2eb;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    padding: 7px 10px;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
}

.implant-next-control-simple > input[type="date"][hidden] {
    display: none;
}

.implant-next-control-preview {
    min-height: 39px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border: 1px solid #e4e9f0;
    border-radius: 9px;
    background: #fff;
}

.implant-next-control-preview span {
    color: #7b8798;
    font-size: 9px;
    font-weight: 700;
}

.implant-next-control-preview strong {
    color: #26364a;
    font-size: 10px;
    white-space: nowrap;
}

.implant-history-record-note small {
    display: block;
    margin-bottom: 4px;
    color: #66758a;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

@media (max-width: 900px) {
    .implant-process-summary-grid-simple {
        grid-template-columns: 1fr;
    }
    .implant-process-summary-grid-simple .implant-process-summary-card {
        min-height: 0;
    }
    .implant-process-detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .implant-process-detail-grid,
    .implant-control-simple-grid,
    .implant-next-control-simple {
        grid-template-columns: 1fr;
    }
    .implant-process-detail-grid > div.is-wide,
    .implant-control-simple-grid .field-span-2,
    .implant-next-control-simple-head {
        grid-column: 1;
    }
    .implant-next-control-simple-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Medibox v328 — clean compact Implantologji process */
.implant-process-summary-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 46px;
    align-items: stretch;
    overflow: visible;
}

.implant-process-summary-grid-compact .implant-process-compact-card {
    position: relative;
    min-height: 360px;
    overflow: visible;
    border-width: 1.5px;
    border-style: solid;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

.implant-process-summary-grid-compact .implant-process-compact-card::before {
    display: none;
}

.implant-process-summary-grid-compact .implant-process-compact-card.is-plan {
    border-color: #66d79b;
}

.implant-process-summary-grid-compact .implant-process-compact-card.is-implants {
    border-color: #4b7dff;
}

.implant-process-summary-grid-compact .implant-process-compact-card.is-control {
    border-color: #c7d0dc;
}

.implant-process-summary-grid-compact .implant-process-compact-card:nth-child(1)::after,
.implant-process-summary-grid-compact .implant-process-compact-card:nth-child(2)::after {
    content: "→";
    position: absolute;
    top: 48px;
    right: -34px;
    z-index: 2;
    width: 24px;
    display: grid;
    place-items: center;
    color: #97a3b4;
    font-size: 26px;
    font-weight: 500;
    line-height: 1;
}

.implant-process-summary-grid-compact .implant-process-compact-card:nth-child(1)::after {
    color: #21a765;
}

.implant-process-summary-grid-compact .implant-process-summary-header {
    min-height: 92px;
    padding: 24px 26px 14px;
    gap: 16px;
}

.implant-process-summary-grid-compact .implant-process-summary-header > strong {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: .01em;
}

.implant-process-summary-grid-compact .implant-process-summary-dot {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #475569;
    font-size: 17px;
    font-weight: 900;
    box-shadow: none;
}

.implant-process-summary-grid-compact .is-plan .implant-process-summary-dot {
    border: 0;
    background: #0ea357;
    color: #fff;
    font-size: 28px;
    box-shadow: 0 7px 16px rgba(14, 163, 87, .18);
}

.implant-process-summary-grid-compact .is-plan .implant-process-summary-header > strong {
    color: #11884b;
}

.implant-process-summary-grid-compact .is-implants .implant-process-summary-dot {
    border: 0;
    background: #1268e8;
    color: #fff;
    font-size: 28px;
    box-shadow: 0 7px 16px rgba(18, 104, 232, .18);
}

.implant-process-summary-grid-compact .is-implants .implant-process-summary-header > strong {
    color: #155dcc;
}

.implant-process-summary-grid-compact .is-control .implant-process-summary-dot {
    border: 2px solid #aeb9c8;
    background: #fff;
    color: #334155;
    font-size: 16px;
}

.implant-process-summary-grid-compact .is-control .implant-process-summary-header > strong {
    color: #334155;
}

.implant-process-summary-grid-compact .implant-process-summary-body {
    padding: 0 26px 18px;
}

.implant-process-summary-grid-compact .implant-process-summary-body > p {
    min-height: 60px;
    margin: 0 0 18px;
    color: #334155;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.65;
}

.implant-process-summary-grid-compact .implant-process-summary-body > p b {
    color: inherit;
    font-weight: 900;
}

.implant-process-summary-grid-compact .implant-process-summary-rows {
    gap: 0;
    margin-top: auto;
    border-top: 1px solid #e7ebf1;
}

.implant-process-summary-grid-compact .implant-process-summary-rows > div {
    min-height: 51px;
    padding: 11px 4px;
    border: 0;
    border-bottom: 1px solid #e7ebf1;
    border-radius: 0;
    background: transparent;
}

.implant-process-summary-grid-compact .implant-process-summary-rows span {
    gap: 10px;
    color: #475569;
    font-size: 11px;
    font-weight: 750;
}

.implant-process-summary-grid-compact .implant-process-summary-rows span svg {
    width: 17px;
    height: 17px;
    color: #26364a;
}

.implant-process-summary-grid-compact .implant-process-summary-rows strong {
    max-width: 145px;
    color: #111827;
    font-size: 11px;
    font-weight: 850;
}

.implant-process-summary-grid-compact .implant-process-summary-action {
    min-height: 52px;
    margin: 0 26px 24px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 900;
    box-shadow: none;
}

.implant-process-summary-grid-compact .implant-process-summary-action.is-plan {
    border-color: #20a65d;
    background: #fff;
    color: #0d8a49;
}

.implant-process-summary-grid-compact .implant-process-summary-action.is-plan:hover,
.implant-process-summary-grid-compact .implant-process-summary-action.is-plan:focus-visible {
    background: #f5fcf8;
}

.implant-process-summary-grid-compact .implant-process-summary-action.is-primary {
    border-color: #1767e8;
    background: #1767e8;
    color: #fff;
    box-shadow: 0 8px 18px rgba(23, 103, 232, .16);
}

.implant-process-summary-grid-compact .implant-process-summary-action.is-primary:hover,
.implant-process-summary-grid-compact .implant-process-summary-action.is-primary:focus-visible {
    background: #115bd2;
}

.implant-process-summary-grid-compact .implant-process-summary-action.is-control {
    border-color: #aeb9c8;
    background: #fff;
    color: #334155;
}

.implant-process-summary-grid-compact .implant-process-card-detail-button,
.implant-process-summary-grid-compact .implant-process-card-add-button {
    width: 29px;
    height: 29px;
    border-radius: 50%;
}

.implant-process-summary-grid-compact .implant-process-card-detail-button {
    border-color: transparent;
    background: #f5f7fa;
}

.implant-process-summary-grid-compact .implant-process-card-add-button {
    border-color: #d9e6ff;
    background: #f2f6ff;
    color: #1767e8;
}

@media (max-width: 1180px) {
    .implant-process-summary-grid-compact {
        gap: 30px;
    }
    .implant-process-summary-grid-compact .implant-process-compact-card:nth-child(1)::after,
    .implant-process-summary-grid-compact .implant-process-compact-card:nth-child(2)::after {
        right: -26px;
    }
    .implant-process-summary-grid-compact .implant-process-summary-header {
        padding-left: 20px;
        padding-right: 20px;
    }
    .implant-process-summary-grid-compact .implant-process-summary-body {
        padding-left: 20px;
        padding-right: 20px;
    }
    .implant-process-summary-grid-compact .implant-process-summary-action {
        margin-left: 20px;
        margin-right: 20px;
    }
}

@media (max-width: 900px) {
    .implant-process-summary-grid-compact {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .implant-process-summary-grid-compact .implant-process-compact-card {
        min-height: 0;
    }
    .implant-process-summary-grid-compact .implant-process-compact-card:nth-child(1)::after,
    .implant-process-summary-grid-compact .implant-process-compact-card:nth-child(2)::after {
        content: "↓";
        top: auto;
        right: auto;
        bottom: -22px;
        left: 50%;
        transform: translateX(-50%);
        width: 24px;
        background: #fff;
    }
    .implant-process-summary-grid-compact .implant-process-summary-body > p {
        min-height: 0;
    }
}

@media (max-width: 560px) {
    .implant-process-summary-grid-compact .implant-process-summary-header {
        min-height: 78px;
        padding: 18px 16px 10px;
    }
    .implant-process-summary-grid-compact .implant-process-summary-dot {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }
    .implant-process-summary-grid-compact .implant-process-summary-header > strong {
        font-size: 15px;
    }
    .implant-process-summary-grid-compact .implant-process-summary-body {
        padding: 0 16px 14px;
    }
    .implant-process-summary-grid-compact .implant-process-summary-action {
        margin: 0 16px 16px;
    }
}

/* Medibox v329 — smaller modern Implantology cards + plan action bar/modal */
.implant-module-simple-process .implant-flow-workspace {
    gap: 12px;
}

.implant-plan-top-actions {
    max-width: 1040px;
    width: 100%;
    margin: 0 auto 2px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
}

.implant-plan-top-actions .implant-inline-form {
    display: inline-flex;
    margin: 0;
}

.implant-plan-top-action {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #e0e6ee;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .025);
    transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.implant-plan-top-action svg {
    width: 14px;
    height: 14px;
}

.implant-plan-top-action:hover,
.implant-plan-top-action:focus-visible {
    transform: translateY(-1px);
    border-color: #c8d3e1;
    background: #fbfcfe;
    color: #1f3b63;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .055);
    outline: none;
}

.implant-plan-top-action.is-danger {
    border-color: #f1d3d3;
    color: #c33d3d;
}

.implant-plan-top-action.is-danger:hover,
.implant-plan-top-action.is-danger:focus-visible {
    border-color: #eebbbb;
    background: #fff8f8;
    color: #b42323;
}

.implant-plan-top-action.is-new {
    border-color: #d7e5ff;
    background: #f6f9ff;
    color: #1d5ed2;
}

.implant-process-summary-grid-compact {
    max-width: 1040px;
    width: 100%;
    margin: 0 auto;
    gap: 16px;
}

.implant-process-summary-grid-compact .implant-process-compact-card {
    min-height: 286px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    box-shadow: 0 7px 20px rgba(15, 23, 42, .045);
}

.implant-process-summary-grid-compact .implant-process-compact-card.is-plan {
    border-color: #ccebd9;
}

.implant-process-summary-grid-compact .implant-process-compact-card.is-implants {
    border-color: #cfdfff;
}

.implant-process-summary-grid-compact .implant-process-compact-card.is-control {
    border-color: #dde3eb;
}

.implant-process-summary-grid-compact .implant-process-compact-card:nth-child(1)::after,
.implant-process-summary-grid-compact .implant-process-compact-card:nth-child(2)::after {
    display: none;
}

.implant-process-summary-grid-compact .implant-process-summary-header {
    min-height: 64px;
    padding: 15px 17px 8px;
    gap: 10px;
}

.implant-process-summary-grid-compact .implant-process-summary-header > strong {
    font-size: 13px;
}

.implant-process-summary-grid-compact .implant-process-summary-dot {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    font-size: 11px;
}

.implant-process-summary-grid-compact .is-plan .implant-process-summary-dot,
.implant-process-summary-grid-compact .is-implants .implant-process-summary-dot {
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .09);
}

.implant-process-summary-grid-compact .implant-process-summary-body {
    padding: 0 17px 12px;
}

.implant-process-summary-grid-compact .implant-process-summary-body > p {
    min-height: 38px;
    margin: 0 0 10px;
    color: #4b5b70;
    font-size: 10px;
    line-height: 1.5;
}

.implant-process-summary-grid-compact .implant-process-summary-rows > div {
    min-height: 37px;
    padding: 7px 2px;
}

.implant-process-summary-grid-compact .implant-process-summary-rows span {
    gap: 7px;
    font-size: 9px;
}

.implant-process-summary-grid-compact .implant-process-summary-rows span svg {
    width: 14px;
    height: 14px;
}

.implant-process-summary-grid-compact .implant-process-summary-rows strong {
    max-width: 125px;
    font-size: 9px;
}

.implant-process-summary-grid-compact .implant-process-summary-action {
    min-height: 40px;
    margin: 0 17px 16px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 10px;
}

.implant-process-summary-grid-compact .implant-process-summary-plus {
    font-size: 19px;
}

.implant-process-summary-grid-compact .implant-process-card-detail-button,
.implant-process-summary-grid-compact .implant-process-card-add-button {
    width: 27px;
    height: 27px;
}

.implant-plan-view-dialog .implant-plan-view-card {
    width: min(660px, calc(100vw - 28px));
}

.implant-plan-view-header {
    border-bottom: 1px solid #e9edf3;
}

.implant-plan-view-header .eyebrow {
    color: #159650;
}

.implant-plan-view-body {
    padding: 18px 20px 8px;
}

.implant-plan-view-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.implant-plan-view-grid > div {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 11px 12px;
    border: 1px solid #e8edf3;
    border-radius: 11px;
    background: #fafbfd;
}

.implant-plan-view-grid > div.is-wide {
    grid-column: 1 / -1;
}

.implant-plan-view-grid span {
    color: #7a8798;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.implant-plan-view-grid strong {
    color: #26364a;
    font-size: 11px;
    line-height: 1.5;
}

.implant-plan-view-footer {
    padding-top: 12px;
}

@media (max-width: 900px) {
    .implant-plan-top-actions {
        max-width: none;
        flex-wrap: wrap;
    }
    .implant-process-summary-grid-compact {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .implant-plan-top-actions {
        justify-content: flex-start;
    }
    .implant-plan-top-action span {
        display: none;
    }
    .implant-plan-top-action.is-new span:last-child {
        display: inline;
    }
    .implant-plan-view-grid {
        grid-template-columns: 1fr;
    }
    .implant-plan-view-grid > div.is-wide {
        grid-column: 1;
    }
}

/* Medibox v330 — full-width Implantology cards, larger plan modal and completion actions */
.implant-module-simple-process .implant-flow-workspace {
    width: 100%;
    max-width: none;
    gap: 14px;
}

.implant-plan-top-actions {
    max-width: none;
    width: 100%;
    margin: 0 0 4px;
    justify-content: space-between;
    gap: 12px;
}

.implant-plan-top-actions-left,
.implant-plan-top-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.implant-plan-top-actions-right .implant-inline-form,
.implant-plan-top-actions-left .implant-inline-form {
    display: inline-flex;
    margin: 0;
}

.implant-plan-top-action.is-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 11px;
}

.implant-plan-top-action.is-icon svg {
    width: 16px;
    height: 16px;
}

.implant-plan-complete-action,
.implant-plan-new-action,
.implant-plan-completed-badge {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 11px;
    font: inherit;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.implant-plan-complete-action {
    border: 1px solid #b9e6cd;
    background: #f3fcf7;
    color: #16834c;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(22, 131, 76, .045);
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.implant-plan-complete-action:hover,
.implant-plan-complete-action:focus-visible {
    transform: translateY(-1px);
    border-color: #86d5a9;
    background: #ecfaf2;
    box-shadow: 0 6px 16px rgba(22, 131, 76, .09);
    outline: none;
}

.implant-plan-complete-action svg,
.implant-plan-completed-badge svg {
    width: 14px;
    height: 14px;
}

.implant-plan-completed-badge {
    border: 1px solid #b9e6cd;
    background: #edf9f2;
    color: #16834c;
}

.implant-plan-new-action {
    border: 1px solid #cddcff;
    background: #f4f7ff;
    color: #1f5fd1;
    cursor: pointer;
}

.implant-plan-new-action > span:first-child {
    font-size: 19px;
    font-weight: 500;
    line-height: .7;
}

.implant-plan-new-action:hover,
.implant-plan-new-action:focus-visible {
    border-color: #aac3fb;
    background: #eef4ff;
    outline: none;
}

.implant-process-summary-grid-compact {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
}

.implant-process-summary-grid-compact .implant-process-compact-card {
    width: 100%;
    min-height: 312px;
}

.implant-process-summary-grid-compact .implant-process-summary-header {
    padding-left: 19px;
    padding-right: 19px;
}

.implant-process-summary-grid-compact .implant-process-summary-body {
    padding-left: 19px;
    padding-right: 19px;
}

.implant-process-summary-grid-compact .implant-process-summary-action {
    margin-left: 19px;
    margin-right: 19px;
}

.implant-plan-view-dialog {
    width: min(1020px, calc(100vw - 32px));
}

.implant-plan-view-dialog .implant-plan-view-card {
    width: 100%;
    max-height: min(88vh, 900px);
}

.implant-plan-view-body {
    padding: 24px 26px 12px;
}

.implant-plan-view-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.implant-plan-view-grid > div {
    min-height: 78px;
    align-content: center;
    padding: 14px 15px;
    border-radius: 13px;
}

.implant-plan-view-grid > div.is-wide {
    grid-column: 1 / -1;
    min-height: 112px;
    align-content: start;
}

.implant-plan-view-grid span {
    font-size: 10px;
}

.implant-plan-view-grid strong {
    font-size: 13px;
}

@media (max-width: 1050px) {
    .implant-process-summary-grid-compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 900px) {
    .implant-plan-top-actions {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .implant-process-summary-grid-compact {
        grid-template-columns: 1fr;
    }
    .implant-process-summary-grid-compact .implant-process-compact-card {
        min-height: 0;
    }
    .implant-plan-view-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .implant-plan-top-actions-left {
        width: 100%;
        flex-wrap: wrap;
    }
    .implant-plan-top-actions-right {
        margin-left: auto;
    }
    .implant-plan-view-dialog {
        width: calc(100vw - 18px);
    }
    .implant-plan-view-body {
        padding: 16px 15px 8px;
    }
    .implant-plan-view-grid {
        grid-template-columns: 1fr;
    }
    .implant-plan-view-grid > div.is-wide {
        grid-column: 1;
    }
}

/* Medibox v331 — active/completed Implantology presentation */
.implant-process-summary-grid-compact .implant-process-summary-header {
    gap: 8px;
}

.implant-process-summary-grid-compact .implant-process-summary-header > strong:first-child {
    margin-left: 0;
}

.implant-completed-plan-summary {
    width: 100%;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid #dfe6ee;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .035);
}

.implant-completed-plan-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.implant-completed-plan-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid #b9e6cd;
    border-radius: 999px;
    background: #effaf4;
    color: #16834c;
    font-size: 10px;
    font-weight: 900;
}

.implant-completed-plan-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 15px;
    color: #64748b;
}

.implant-completed-plan-copy > strong {
    width: 100%;
    overflow: hidden;
    color: #253247;
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.implant-completed-plan-copy > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
}

.implant-completed-plan-copy svg {
    width: 13px;
    height: 13px;
}

.implant-completed-plan-details-button {
    flex: 0 0 auto;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid #cfd9e6;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.implant-completed-plan-details-button:hover,
.implant-completed-plan-details-button:focus-visible {
    transform: translateY(-1px);
    border-color: #abc0df;
    background: #f8fbff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
    outline: none;
}

.implant-completed-plan-details-button svg {
    width: 15px;
    height: 15px;
}

.implant-completed-details-dialog {
    width: min(1180px, calc(100vw - 30px));
}

.implant-completed-details-card {
    width: 100%;
    max-height: min(92vh, 980px);
}

.implant-completed-details-body {
    display: grid;
    gap: 16px;
    padding: 20px 22px;
    overflow: auto;
}

.implant-completed-details-section {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.implant-completed-details-heading {
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #edf1f5;
    background: #f8fafc;
}

.implant-completed-details-heading strong {
    color: #26364a;
    font-size: 12px;
    font-weight: 900;
}

.implant-completed-details-heading span {
    min-width: 26px;
    min-height: 24px;
    display: inline-grid;
    place-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1e5fd0;
    font-size: 9px;
    font-weight: 900;
}

.implant-completed-plan-grid,
.implant-completed-item-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    padding: 13px;
}

.implant-completed-plan-grid > div,
.implant-completed-item-grid > div {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding: 10px 11px;
    border: 1px solid #edf1f5;
    border-radius: 10px;
    background: #fbfcfe;
}

.implant-completed-plan-grid > div.is-wide,
.implant-completed-item-grid > div.is-wide {
    grid-column: 1 / -1;
}

.implant-completed-plan-grid small,
.implant-completed-item-grid small {
    color: #7a8798;
    font-size: 9px;
    font-weight: 800;
}

.implant-completed-plan-grid strong,
.implant-completed-item-grid strong {
    min-width: 0;
    color: #29384d;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.implant-completed-implant-list,
.implant-completed-control-list {
    display: grid;
    gap: 10px;
    padding: 13px;
}

.implant-completed-implant-item,
.implant-completed-control-item {
    border: 1px solid #e6ebf1;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.implant-completed-item-title {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #edf1f5;
    background: #fbfcfe;
}

.implant-completed-item-title strong {
    color: #253247;
    font-size: 11px;
    font-weight: 900;
}

.implant-completed-item-title span {
    color: #66758a;
    font-size: 9px;
    font-weight: 800;
}

.implant-completed-details-empty {
    padding: 18px 14px;
    color: #7a8798;
    font-size: 10px;
    font-weight: 700;
}

@media (max-width: 820px) {
    .implant-completed-plan-summary,
    .implant-completed-plan-main {
        align-items: flex-start;
    }
    .implant-completed-plan-summary {
        flex-direction: column;
    }
    .implant-completed-plan-details-button {
        align-self: flex-end;
    }
    .implant-completed-plan-grid,
    .implant-completed-item-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .implant-completed-plan-main {
        flex-direction: column;
    }
    .implant-completed-plan-copy > strong {
        white-space: normal;
    }
    .implant-completed-plan-details-button {
        width: 100%;
    }
    .implant-completed-details-dialog {
        width: calc(100vw - 16px);
    }
    .implant-completed-details-body {
        padding: 12px;
    }
    .implant-completed-plan-grid,
    .implant-completed-item-grid {
        grid-template-columns: 1fr;
    }
    .implant-completed-plan-grid > div.is-wide,
    .implant-completed-item-grid > div.is-wide {
        grid-column: 1;
    }
}

/* Medibox v332 — completed plan register + modern details modal */
.implant-completed-plan-register {
    width: 100%;
    display: grid;
    gap: 8px;
}

.implant-completed-plan-register-title {
    display: flex;
    align-items: center;
    min-height: 30px;
}

.implant-completed-plan-table {
    overflow: hidden;
    border: 1px solid #e1e7ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .035);
}

.implant-completed-plan-table-head,
.implant-completed-plan-table-row {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(110px, .8fr) minmax(150px, 1fr) minmax(100px, .7fr) 48px;
    align-items: center;
    gap: 14px;
}

.implant-completed-plan-table-head {
    min-height: 38px;
    padding: 7px 14px;
    border-bottom: 1px solid #e8edf3;
    background: #f8fafc;
}

.implant-completed-plan-table-head > span {
    color: #7b8798;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.implant-completed-plan-table-row {
    min-height: 64px;
    padding: 10px 14px;
}

.implant-completed-plan-table-row > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.implant-completed-plan-table-row strong {
    min-width: 0;
    overflow: hidden;
    color: #26354a;
    font-size: 11px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.implant-completed-plan-table-row small {
    color: #8591a1;
    font-size: 9px;
    font-weight: 700;
}

.implant-completed-plan-name {
    display: grid !important;
    gap: 3px !important;
}

.implant-completed-plan-name strong {
    font-size: 12px;
}

.implant-completed-plan-action-cell {
    justify-content: flex-end;
}

.implant-completed-plan-details-button {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border: 1px solid #d6deea;
    border-radius: 9px;
    background: #fff;
    color: #526174;
    box-shadow: none;
}

.implant-completed-plan-details-button:hover,
.implant-completed-plan-details-button:focus-visible {
    border-color: #b9c9df;
    background: #f5f8fc;
    color: #215fbd;
    box-shadow: 0 5px 12px rgba(15, 23, 42, .06);
}

.implant-completed-plan-details-button svg {
    width: 16px;
    height: 16px;
}

.implant-completed-details-dialog {
    width: min(1240px, calc(100vw - 28px));
}

.implant-completed-details-card {
    width: 100%;
    max-height: min(94vh, 1040px);
    overflow: hidden;
    border: 1px solid #dce3ec;
    border-radius: 20px;
    background: #f7f9fc;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}

.implant-completed-details-modal-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #e3e8ef;
    background: #fff;
}

.implant-completed-details-modal-title {
    min-width: 0;
}

.implant-completed-details-modal-title .eyebrow {
    margin: 8px 0 4px;
    color: #7b8798;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.implant-completed-details-modal-title h2 {
    margin: 0;
    color: #1f2d40;
    font-size: 21px;
    font-weight: 900;
    line-height: 1.2;
}

.implant-completed-details-modal-title > p:last-child {
    margin: 6px 0 0;
    color: #788598;
    font-size: 11px;
    font-weight: 600;
}

.implant-completed-details-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 5px 9px;
    border: 1px solid #bee7d0;
    border-radius: 999px;
    background: #effaf4;
    color: #16834c;
    font-size: 9px;
    font-weight: 900;
}

.implant-completed-details-status-badge svg {
    width: 12px;
    height: 12px;
}

.implant-completed-details-close {
    flex: 0 0 auto;
}

.implant-completed-details-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 22px;
    border-bottom: 1px solid #e3e8ef;
    background: #fff;
}

.implant-completed-details-overview > div {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    background: #fafbfd;
}

.implant-completed-details-overview > div > span {
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    align-self: center;
    border-radius: 10px;
    background: #eef4ff;
    color: #2f69c8;
}

.implant-completed-details-overview svg {
    width: 16px;
    height: 16px;
}

.implant-completed-details-overview small {
    color: #8793a3;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
}

.implant-completed-details-overview strong {
    min-width: 0;
    overflow: hidden;
    color: #26354a;
    font-size: 11px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.implant-completed-details-body {
    gap: 14px;
    padding: 18px 22px 22px;
    background: #f7f9fc;
}

.implant-completed-details-section {
    border-color: #dfe6ee;
    border-radius: 15px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .025);
}

.implant-completed-details-heading {
    min-height: 48px;
    padding: 11px 15px;
    background: #fff;
}

.implant-completed-details-heading strong {
    font-size: 11px;
    letter-spacing: .035em;
}

.implant-completed-plan-grid,
.implant-completed-item-grid {
    gap: 8px;
    padding: 12px;
}

.implant-completed-plan-grid > div,
.implant-completed-item-grid > div {
    padding: 10px 11px;
    border-color: #e9eef4;
    background: #fbfcfe;
}

.implant-completed-implant-item,
.implant-completed-control-item {
    border-color: #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .02);
}

@media (max-width: 860px) {
    .implant-completed-plan-table-head {
        display: none;
    }
    .implant-completed-plan-table-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 14px;
        padding: 13px;
    }
    .implant-completed-plan-table-row > div:not(.implant-completed-plan-name):not(.implant-completed-plan-action-cell) {
        display: grid;
        gap: 2px;
    }
    .implant-completed-plan-table-row > div:nth-child(2)::before { content: "Data"; }
    .implant-completed-plan-table-row > div:nth-child(3)::before { content: "Mjeku"; }
    .implant-completed-plan-table-row > div:nth-child(4)::before { content: "Kontrola"; }
    .implant-completed-plan-table-row > div:nth-child(2)::before,
    .implant-completed-plan-table-row > div:nth-child(3)::before,
    .implant-completed-plan-table-row > div:nth-child(4)::before {
        color: #8a95a4;
        font-size: 8px;
        font-weight: 900;
        text-transform: uppercase;
    }
    .implant-completed-plan-name {
        grid-column: 1;
    }
    .implant-completed-plan-action-cell {
        grid-column: 2;
        grid-row: 1;
    }
    .implant-completed-details-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .implant-completed-plan-table-row {
        grid-template-columns: 1fr auto;
    }
    .implant-completed-plan-table-row > div:not(.implant-completed-plan-name):not(.implant-completed-plan-action-cell) {
        grid-column: 1 / -1;
    }
    .implant-completed-details-dialog {
        width: calc(100vw - 12px);
    }
    .implant-completed-details-card {
        border-radius: 14px;
    }
    .implant-completed-details-modal-header {
        padding: 17px 16px 14px;
    }
    .implant-completed-details-modal-title h2 {
        font-size: 17px;
    }
    .implant-completed-details-overview {
        grid-template-columns: 1fr;
        padding: 12px 14px;
    }
    .implant-completed-details-body {
        padding: 12px 14px 16px;
    }
}
@media (max-width: 560px) {
    .implant-completed-plan-details-button {
        width: 34px;
        min-width: 34px;
    }
}

/* Medibox v333 — compact completed plan actions + viewport-fit modals */
.implant-completed-plan-register {
    gap: 0;
}

.implant-completed-plan-register-title {
    display: none;
}

.implant-completed-plan-table {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .028);
}

.implant-completed-plan-table-head,
.implant-completed-plan-table-row {
    grid-template-columns: minmax(250px, 2fr) minmax(96px, .72fr) minmax(140px, 1fr) minmax(86px, .62fr) 116px;
    gap: 10px;
}

.implant-completed-plan-table-head {
    min-height: 32px;
    padding: 5px 12px;
}

.implant-completed-plan-table-head > span {
    font-size: 8px;
}

.implant-completed-plan-table-row {
    min-height: 54px;
    padding: 8px 12px;
}

.implant-completed-plan-table-row strong {
    font-size: 10px;
}

.implant-completed-plan-table-row small {
    font-size: 8px;
}

.implant-completed-plan-name {
    min-width: 0;
}

.implant-completed-plan-open {
    appearance: none;
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.implant-completed-plan-open:hover strong,
.implant-completed-plan-open:focus-visible strong {
    color: #1f5fd1;
}

.implant-completed-plan-open:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .2);
    outline-offset: 3px;
    border-radius: 5px;
}

.implant-completed-plan-action-cell {
    gap: 5px !important;
}

.implant-completed-plan-action-cell .implant-inline-form {
    display: inline-flex;
    margin: 0;
}

.implant-completed-plan-row-action {
    appearance: none;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #dbe2eb;
    border-radius: 8px;
    background: #fff;
    color: #526174;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.implant-completed-plan-row-action:hover,
.implant-completed-plan-row-action:focus-visible {
    border-color: #bdd0e8;
    background: #f6f9fd;
    color: #1f5fd1;
    box-shadow: 0 3px 9px rgba(15, 23, 42, .05);
    outline: none;
}

.implant-completed-plan-row-action.is-danger:hover,
.implant-completed-plan-row-action.is-danger:focus-visible {
    border-color: #fecaca;
    background: #fff6f6;
    color: #dc2626;
}

.implant-completed-plan-row-action svg {
    width: 14px;
    height: 14px;
}

/* Keep the plan modal completely inside the viewport. */
.implant-plan-view-dialog {
    width: min(900px, calc(100vw - 24px));
    max-height: calc(100dvh - 20px);
}

.implant-plan-view-dialog .implant-plan-view-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
}

.implant-plan-view-header {
    flex: 0 0 auto;
    padding: 14px 16px 12px;
}

.implant-plan-view-header h2 {
    font-size: 17px;
}

.implant-plan-view-header small,
.implant-plan-view-header .eyebrow {
    font-size: 8px;
}

.implant-plan-view-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 14px 6px;
}

.implant-plan-view-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.implant-plan-view-grid > div {
    min-height: 56px;
    padding: 9px 10px;
    border-radius: 9px;
}

.implant-plan-view-grid > div.is-wide {
    min-height: 72px;
}

.implant-plan-view-grid span {
    font-size: 8px;
}

.implant-plan-view-grid strong {
    font-size: 10px;
    line-height: 1.35;
}

.implant-plan-view-footer {
    flex: 0 0 auto;
    padding: 8px 14px 12px;
}

.implant-plan-view-footer .button {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 9px;
}

/* Completed-plan details: compact chrome, full modal visible, inner content scrolls. */
.implant-completed-details-dialog {
    width: min(1120px, calc(100vw - 24px));
    max-height: calc(100dvh - 18px);
}

.implant-completed-details-card {
    width: 100%;
    max-height: calc(100dvh - 18px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
}

.implant-completed-details-modal-header {
    flex: 0 0 auto;
    gap: 12px;
    padding: 13px 16px 11px;
}

.implant-completed-details-modal-title .eyebrow {
    margin: 0 0 2px;
    font-size: 8px;
}

.implant-completed-details-modal-title h2 {
    font-size: 17px;
}

.implant-completed-details-modal-title > p:last-child {
    margin-top: 3px;
    font-size: 9px;
}

.implant-completed-details-status-badge {
    display: none;
}

.implant-completed-details-overview {
    flex: 0 0 auto;
    gap: 7px;
    padding: 9px 14px;
}

.implant-completed-details-overview > div {
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 7px;
    padding: 7px 9px;
    border-radius: 9px;
}

.implant-completed-details-overview > div > span {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.implant-completed-details-overview svg {
    width: 13px;
    height: 13px;
}

.implant-completed-details-overview small {
    font-size: 7px;
}

.implant-completed-details-overview strong {
    font-size: 9px;
}

.implant-completed-details-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    gap: 9px;
    padding: 10px 14px;
}

.implant-completed-details-section {
    border-radius: 11px;
}

.implant-completed-details-heading {
    min-height: 34px;
    padding: 7px 10px;
}

.implant-completed-details-heading strong {
    font-size: 9px;
}

.implant-completed-details-heading span {
    min-width: 22px;
    min-height: 20px;
    padding: 3px 6px;
    font-size: 8px;
}

.implant-completed-plan-grid,
.implant-completed-item-grid {
    gap: 6px;
    padding: 8px;
}

.implant-completed-plan-grid > div,
.implant-completed-item-grid > div {
    gap: 2px;
    padding: 7px 8px;
    border-radius: 8px;
}

.implant-completed-plan-grid small,
.implant-completed-item-grid small {
    font-size: 7px;
}

.implant-completed-plan-grid strong,
.implant-completed-item-grid strong {
    font-size: 8.5px;
    line-height: 1.35;
}

.implant-completed-implant-list,
.implant-completed-control-list {
    gap: 7px;
    padding: 8px;
}

.implant-completed-implant-item,
.implant-completed-control-item {
    border-radius: 9px;
}

.implant-completed-item-title {
    min-height: 30px;
    padding: 6px 9px;
}

.implant-completed-item-title strong {
    font-size: 9px;
}

.implant-completed-item-title span {
    font-size: 7.5px;
}

.implant-completed-details-card > .modal-actions {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 7px 14px 9px;
}

.implant-completed-details-card > .modal-actions .button {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 9px;
}

/* Slightly reduce the content inside the three active cards while retaining full-width layout. */
.implant-process-summary-grid-compact .implant-process-compact-card {
    min-height: 286px;
}

.implant-process-summary-grid-compact .implant-process-summary-header {
    min-height: 48px;
    padding: 12px 16px 9px;
}

.implant-process-summary-grid-compact .implant-process-summary-header strong {
    font-size: 12px;
}

.implant-process-summary-grid-compact .implant-process-summary-body {
    padding: 0 16px 12px;
}

.implant-process-summary-grid-compact .implant-process-summary-body > p {
    min-height: 36px;
    margin-bottom: 9px;
    font-size: 9px;
}

.implant-process-summary-grid-compact .implant-process-summary-rows {
    gap: 6px;
}

.implant-process-summary-grid-compact .implant-process-summary-rows > div {
    min-height: 36px;
    padding: 6px 8px;
    border-radius: 8px;
}

.implant-process-summary-grid-compact .implant-process-summary-action {
    min-height: 34px;
    margin: 0 16px 13px;
    padding: 6px 9px;
    font-size: 9px;
}

.implant-plan-top-action.is-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 9px;
}

.implant-plan-complete-action,
.implant-plan-new-action,
.implant-plan-completed-badge {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 9px;
}

@media (max-width: 860px) {
    .implant-completed-plan-table-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .implant-completed-plan-action-cell {
        width: auto;
        gap: 4px !important;
    }
    .implant-completed-details-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .implant-completed-plan-grid,
    .implant-completed-item-grid,
    .implant-plan-view-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .implant-completed-details-dialog,
    .implant-plan-view-dialog {
        width: calc(100vw - 10px);
        max-height: calc(100dvh - 10px);
    }
    .implant-completed-details-card,
    .implant-plan-view-dialog .implant-plan-view-card {
        max-height: calc(100dvh - 10px);
        border-radius: 12px;
    }
    .implant-completed-details-overview,
    .implant-completed-plan-grid,
    .implant-completed-item-grid,
    .implant-plan-view-grid {
        grid-template-columns: 1fr;
    }
    .implant-completed-plan-grid > div.is-wide,
    .implant-completed-item-grid > div.is-wide,
    .implant-plan-view-grid > div.is-wide {
        grid-column: 1;
    }
}

/* Medibox v334 — unified plan register + icon-only new plan action */
.implant-plan-top-actions-streamlined {
    min-height: 36px;
    margin-bottom: 2px;
}

.implant-plan-top-actions-streamlined .implant-plan-top-actions-right {
    margin-left: auto;
}

.implant-plan-new-action-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 9px;
}

.implant-plan-new-action-icon > span:first-child {
    font-size: 21px;
    line-height: 1;
}

.implant-all-plans-register {
    margin: 0 0 2px;
}

.implant-all-plans-register .implant-completed-plan-table {
    overflow: hidden;
}

.implant-all-plans-register .implant-completed-plan-table-row + .implant-completed-plan-table-row {
    border-top: 1px solid #edf1f5;
}

.implant-all-plans-register .implant-completed-plan-table-row.is-selected {
    background: #f8fbff;
}

.implant-all-plans-register .implant-completed-plan-table-row.is-selected .implant-completed-plan-open strong {
    color: #1f5fd1;
}

.implant-all-plans-register .implant-completed-plan-open {
    text-decoration: none;
}

.implant-all-plans-register .implant-completed-plan-action-cell {
    justify-content: flex-end;
}

@media (max-width: 860px) {
    .implant-plan-top-actions-streamlined {
        align-items: center;
    }
}

/* Medibox v335 — current implant plan first + dedicated previous-procedure cards */
.implant-current-plan-shell {
    width: min(1040px, 100%);
    margin: 0 auto 10px;
    padding: 14px 16px;
    border: 1px solid #d9e7ff;
    border-radius: 15px;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 60%);
    box-shadow: 0 8px 22px rgba(37, 99, 235, .055);
}

.implant-current-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.implant-current-plan-heading {
    min-width: 0;
}

.implant-current-plan-kicker,
.implant-previous-procedures-kicker {
    display: block;
    margin-bottom: 4px;
    color: #2563eb;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .12em;
}

.implant-current-plan-title-line {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.implant-current-plan-title-line h2 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #172033;
    font-size: 15px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.implant-current-plan-heading > p {
    margin: 4px 0 0;
    color: #7b8798;
    font-size: 9px;
    font-weight: 700;
}

.implant-current-plan-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 8.5px;
    font-weight: 850;
    white-space: nowrap;
}

.implant-current-plan-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .11);
}

.implant-current-plan-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
}

.implant-current-plan-actions .implant-inline-form {
    margin: 0;
}

.implant-no-current-plan-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: min(1040px, 100%);
    margin: 0 auto 10px;
    padding: 11px 14px;
    border: 1px dashed #d8e0ea;
    border-radius: 14px;
    background: #fbfcfe;
}

.implant-no-current-plan-bar > div {
    display: grid;
    gap: 2px;
}

.implant-no-current-plan-bar strong {
    color: #334155;
    font-size: 11px;
}

.implant-no-current-plan-bar span {
    color: #94a3b8;
    font-size: 9px;
}

/* Active cards deliberately read as work-in-progress cards, not historical records. */
.implant-process-summary-grid-compact {
    margin-top: 0;
    margin-bottom: 16px;
}

.implant-process-summary-grid-compact .implant-process-compact-card {
    position: relative;
    border-width: 1px;
    box-shadow: 0 9px 24px rgba(15, 23, 42, .055);
}

.implant-process-summary-grid-compact .implant-process-compact-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: #cbd5e1;
}

.implant-process-summary-grid-compact .implant-process-compact-card.is-plan::before {
    background: #22a765;
}

.implant-process-summary-grid-compact .implant-process-compact-card.is-implants::before {
    background: #3b82f6;
}

.implant-process-summary-grid-compact .implant-process-compact-card.is-control::before {
    background: #7c8aa0;
}

.implant-process-card-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.implant-process-summary-grid-compact .implant-process-card-edit-button,
.implant-process-summary-grid-compact .implant-process-card-detail-button,
.implant-process-summary-grid-compact .implant-process-card-add-button {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    border: 1px solid #d9e2ee;
    border-radius: 8px;
    background: #fff;
    color: #526176;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.implant-process-summary-grid-compact .implant-process-card-edit-button {
    border-color: #cfe0ff;
    background: #f6f9ff;
    color: #2563eb;
}

.implant-process-summary-grid-compact .implant-process-card-edit-button:hover,
.implant-process-summary-grid-compact .implant-process-card-edit-button:focus-visible {
    border-color: #9fc2ff;
    background: #eaf2ff;
    color: #174fb7;
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, .10);
}

.implant-process-summary-grid-compact .implant-process-card-edit-button svg,
.implant-process-summary-grid-compact .implant-process-card-detail-button svg {
    width: 13px;
    height: 13px;
}

/* Previous implantology procedures: visually quieter, compact clinical-history cards. */
.implant-previous-procedures {
    width: min(1040px, 100%);
    margin: 4px auto 16px;
    padding-top: 16px;
    border-top: 1px solid #e8edf3;
}

.implant-previous-procedures-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
}

.implant-previous-procedures-header > div {
    min-width: 0;
}

.implant-previous-procedures-kicker {
    margin-bottom: 3px;
    color: #7b8798;
}

.implant-previous-procedures-header h2 {
    margin: 0;
    color: #273244;
    font-size: 13px;
    line-height: 1.25;
}

.implant-previous-procedures-header p {
    margin: 4px 0 0;
    color: #8a96a7;
    font-size: 8.5px;
    line-height: 1.45;
}

.implant-previous-procedures-count {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid #e1e7ee;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 8.5px;
    font-weight: 800;
    white-space: nowrap;
}

.implant-previous-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.implant-previous-plan-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e4e9ef;
    border-radius: 13px;
    background: #fbfcfd;
    box-shadow: 0 4px 13px rgba(15, 23, 42, .025);
}

.implant-previous-plan-card.is-selected {
    border-color: #c9d8ef;
    background: #f8fbff;
    box-shadow: 0 5px 15px rgba(37, 99, 235, .045);
}

.implant-previous-plan-card-head {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
}

.implant-previous-plan-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #dce7e1;
    border-radius: 9px;
    background: #f2f8f5;
    color: #4b7d61;
}

.implant-previous-plan-icon svg {
    width: 13px;
    height: 13px;
}

.implant-previous-plan-title {
    min-width: 0;
}

.implant-previous-plan-title > a,
.implant-previous-plan-title > button {
    display: grid;
    gap: 2px;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.implant-previous-plan-title strong {
    overflow: hidden;
    color: #334155;
    font-size: 10.5px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.implant-previous-plan-title small {
    color: #94a3b8;
    font-size: 8px;
    font-weight: 700;
}

.implant-previous-plan-status {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef4f1;
    color: #53705f;
    font-size: 7.5px;
    font-weight: 850;
    white-space: nowrap;
}

.implant-previous-plan-meta {
    display: grid;
    grid-template-columns: 1.05fr 1.35fr .7fr .7fr;
    gap: 6px;
}

.implant-previous-plan-meta > div {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid #edf0f4;
    border-radius: 8px;
    background: #fff;
}

.implant-previous-plan-meta small {
    color: #9aa4b2;
    font-size: 7px;
    font-weight: 800;
}

.implant-previous-plan-meta strong {
    overflow: hidden;
    color: #475569;
    font-size: 8.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.implant-previous-plan-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 2px;
}

.implant-previous-plan-open-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #fff;
    color: #5f6f82;
    font: inherit;
    font-size: 8px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.implant-previous-plan-open-action:hover,
.implant-previous-plan-open-action:focus-visible {
    border-color: #cbd8e8;
    background: #f7faff;
    color: #365f91;
    outline: none;
}

.implant-previous-plan-open-action svg {
    width: 12px;
    height: 12px;
}

.implant-previous-plan-icon-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.implant-previous-plan-icon-actions .implant-inline-form {
    display: inline-flex;
    margin: 0;
}

.implant-previous-plan-icon-action {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #fff;
    color: #718096;
    text-decoration: none;
    cursor: pointer;
}

.implant-previous-plan-icon-action:hover,
.implant-previous-plan-icon-action:focus-visible {
    border-color: #c9d7e7;
    background: #f7faff;
    color: #3c638c;
    outline: none;
}

.implant-previous-plan-icon-action.is-danger {
    border-color: #f0dddd;
    color: #b95a5a;
}

.implant-previous-plan-icon-action.is-danger:hover,
.implant-previous-plan-icon-action.is-danger:focus-visible {
    border-color: #e9c5c5;
    background: #fff8f8;
    color: #a63f3f;
}

.implant-previous-plan-icon-action svg {
    width: 12px;
    height: 12px;
}

@media (max-width: 860px) {
    .implant-current-plan-header,
    .implant-previous-procedures-header {
        align-items: flex-start;
    }

    .implant-previous-plan-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .implant-current-plan-header,
    .implant-previous-procedures-header,
    .implant-previous-plan-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .implant-current-plan-title-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .implant-current-plan-actions,
    .implant-previous-plan-icon-actions {
        justify-content: flex-start;
    }

    .implant-previous-procedures-count {
        align-self: flex-start;
    }

    .implant-previous-plan-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Medibox v336 — current plan cards only + complete action inside PLAN + history side by side */
.implant-plan-card-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin: 0 19px 13px;
}

.implant-plan-card-actions .implant-process-summary-action {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    margin: 0;
    padding: 6px 8px;
}

.implant-plan-card-complete-form {
    display: flex;
    min-width: 0;
    margin: 0;
}

.implant-plan-card-complete-action {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 9px;
    font-size: 9px;
}

/* Keep previous procedures next to each other on normal desktop/tablet workspace widths. */
@media (min-width: 621px) {
    .implant-previous-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 620px) {
    .implant-plan-card-actions {
        grid-template-columns: 1fr;
        margin-left: 15px;
        margin-right: 15px;
    }

    .implant-previous-plan-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Medibox v337 — previous implantology procedures in one clinical table */
.implant-previous-procedures-header-simple {
    display: block;
    margin-bottom: 9px;
}

.implant-previous-procedures-header-simple h2 {
    margin: 0;
    color: #273244;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
}

.implant-previous-plan-table-wrap {
    overflow-x: auto;
    border: 1px solid #e4e9ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .025);
}

.implant-previous-plan-table {
    width: 100%;
    min-width: 790px;
    border-collapse: collapse;
    table-layout: auto;
}

.implant-previous-plan-table th {
    padding: 8px 10px;
    border-bottom: 1px solid #e7ebf0;
    background: #f8fafc;
    color: #8a96a7;
    font-size: 7.5px;
    font-weight: 850;
    letter-spacing: .025em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.implant-previous-plan-table th.is-actions {
    text-align: right;
}

.implant-previous-plan-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #edf0f4;
    color: #5b6778;
    font-size: 9px;
    vertical-align: middle;
    white-space: nowrap;
}

.implant-previous-plan-table tbody tr:last-child td {
    border-bottom: 0;
}

.implant-previous-plan-table tbody tr {
    transition: background-color .15s ease;
}

.implant-previous-plan-table tbody tr:hover,
.implant-previous-plan-table tbody tr.is-selected {
    background: #f8fbff;
}

.implant-previous-plan-table-procedure {
    width: 28%;
    min-width: 190px;
}

.implant-previous-plan-table-procedure > a,
.implant-previous-plan-table-procedure > button {
    display: grid;
    gap: 1px;
    max-width: 270px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.implant-previous-plan-table-procedure strong {
    overflow: hidden;
    color: #334155;
    font-size: 9.5px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.implant-previous-plan-table-procedure small {
    color: #94a3b8;
    font-size: 7.5px;
    font-weight: 700;
}

.implant-previous-plan-table-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 21px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef6f1;
    color: #53705f;
    font-size: 7.5px;
    font-weight: 850;
}

.implant-previous-plan-table-status svg {
    width: 10px;
    height: 10px;
}

.implant-previous-plan-table-doctor {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.implant-previous-plan-table-number {
    color: #3f4d5f;
    font-size: 9px;
}

.implant-previous-plan-table-actions {
    display: table-cell;
    text-align: right;
    white-space: nowrap;
}

.implant-previous-plan-table-actions .implant-inline-form {
    display: inline-flex;
    margin: 0 0 0 3px;
    vertical-align: middle;
}

.implant-previous-plan-table-open,
.implant-previous-plan-table-action {
    display: inline-grid;
    place-items: center;
    width: 27px;
    height: 27px;
    min-width: 27px;
    margin-left: 3px;
    padding: 0;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #fff;
    color: #718096;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
}

.implant-previous-plan-table-open {
    border-color: #d8e4f2;
    background: #f8fbff;
    color: #4c6f96;
}

.implant-previous-plan-table-open:hover,
.implant-previous-plan-table-open:focus-visible,
.implant-previous-plan-table-action:hover,
.implant-previous-plan-table-action:focus-visible {
    border-color: #bfd0e3;
    background: #f5f9fe;
    color: #355f8d;
    outline: none;
}

.implant-previous-plan-table-action.is-danger {
    border-color: #f0dddd;
    color: #b95a5a;
}

.implant-previous-plan-table-action.is-danger:hover,
.implant-previous-plan-table-action.is-danger:focus-visible {
    border-color: #e9c5c5;
    background: #fff8f8;
    color: #a63f3f;
}

.implant-previous-plan-table-open svg,
.implant-previous-plan-table-action svg {
    width: 11px;
    height: 11px;
}

@media (max-width: 620px) {
    .implant-previous-procedures {
        padding-top: 13px;
    }

    .implant-previous-plan-table-wrap {
        border-radius: 10px;
    }
}


/* v340 — v337 baseline: plan specialty dropdown */
@media (min-width: 981px){
  .implant-plan-minimal-grid .implant-plan-title{grid-column:1 / span 2}
  .implant-plan-minimal-grid .implant-plan-type{grid-column:3}
  .implant-plan-minimal-grid .implant-plan-dentist{grid-column:1 / span 2}
  .implant-plan-minimal-grid .implant-plan-date{grid-column:3}
}
@media (max-width: 980px) and (min-width: 641px){
  .implant-plan-minimal-grid .implant-plan-title{grid-column:1 / -1}
  .implant-plan-minimal-grid .implant-plan-type,.implant-plan-minimal-grid .implant-plan-dentist,.implant-plan-minimal-grid .implant-plan-date{grid-column:auto}
}
@media (max-width: 640px){
  .implant-plan-minimal-grid .implant-plan-title,.implant-plan-minimal-grid .implant-plan-type,.implant-plan-minimal-grid .implant-plan-dentist,.implant-plan-minimal-grid .implant-plan-date{grid-column:auto}
}

/* Medibox v341 — unified specialty card labels + compact professional cards + full-width history */
.implant-process-summary-grid-compact {
    gap: 14px;
    width: 100%;
}

.implant-process-summary-grid-compact .implant-process-compact-card {
    min-height: 292px;
    border-width: 1px;
    border-radius: 14px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .045);
}

/* Cleaner professional flow: cards carry the sequence, no oversized arrows. */
.implant-process-summary-grid-compact .implant-process-compact-card:nth-child(1)::after,
.implant-process-summary-grid-compact .implant-process-compact-card:nth-child(2)::after {
    display: none;
}

.implant-process-summary-grid-compact .implant-process-summary-header {
    min-height: 54px;
    padding: 14px 16px 10px;
    gap: 9px;
}

.implant-process-summary-grid-compact .implant-process-summary-header > strong {
    font-size: 12px;
    letter-spacing: .035em;
}

.implant-process-summary-grid-compact .implant-process-summary-body {
    padding: 0 16px 12px;
}

.implant-process-summary-grid-compact .implant-process-summary-body > p {
    min-height: 42px;
    margin: 0 0 10px;
    font-size: 10px;
    line-height: 1.5;
}

.implant-process-summary-grid-compact .implant-process-summary-rows > div {
    min-height: 38px;
    padding: 7px 2px;
}

.implant-process-summary-grid-compact .implant-process-summary-rows span,
.implant-process-summary-grid-compact .implant-process-summary-rows strong {
    font-size: 9px;
}

.implant-process-summary-grid-compact .implant-process-summary-rows span {
    gap: 7px;
}

.implant-process-summary-grid-compact .implant-process-summary-rows span svg {
    width: 13px;
    height: 13px;
}

.implant-process-card-header-actions {
    margin-left: auto;
    gap: 4px;
}

.implant-process-summary-grid-compact .implant-process-card-edit-button,
.implant-process-summary-grid-compact .implant-process-card-detail-button,
.implant-process-summary-grid-compact .implant-process-card-add-button {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 7px;
}

.implant-process-summary-grid-compact .implant-process-card-edit-button svg,
.implant-process-summary-grid-compact .implant-process-card-detail-button svg {
    width: 11px;
    height: 11px;
}

.implant-process-summary-grid-compact .implant-process-card-add-button {
    font-size: 15px;
    line-height: 1;
}

.implant-process-summary-grid-compact .implant-process-summary-action,
.implant-plan-card-complete-action {
    min-height: 30px;
    margin: 0 16px 14px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 8.5px;
    font-weight: 850;
    gap: 6px;
}

.implant-process-summary-grid-compact .implant-process-summary-action svg,
.implant-plan-card-complete-action svg {
    width: 12px;
    height: 12px;
}

.implant-process-summary-plus {
    font-size: 17px;
}

.implant-plan-card-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    margin: 0 16px 14px;
}

.implant-plan-card-actions .implant-process-summary-action,
.implant-plan-card-actions .implant-plan-card-complete-action {
    min-height: 30px;
    margin: 0;
    padding: 5px 7px;
    font-size: 8px;
}

/* History aligns exactly with the active card row. */
.implant-previous-procedures {
    width: 100%;
    max-width: none;
    margin: 4px 0 16px;
}

.implant-previous-plan-table-wrap {
    width: 100%;
    box-sizing: border-box;
}

.implant-previous-plan-table {
    width: 100%;
}

@media (max-width: 900px) {
    .implant-process-summary-grid-compact {
        gap: 10px;
    }
}

@media (max-width: 620px) {
    .implant-plan-card-actions {
        grid-template-columns: 1fr;
        margin-left: 14px;
        margin-right: 14px;
    }
}

/* Medibox v342 — Design 2: master PLAN summary + operational second row */
.implant-process-summary-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 14px;
}

.implant-process-summary-grid-compact .implant-plan-master-card {
    grid-column: 1 / -1;
    min-height: 0;
    overflow: hidden;
    border-color: #dfe7ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .045);
}

.implant-process-summary-grid-compact .implant-plan-master-card::before {
    height: 3px;
    background: #22a765;
}

.implant-plan-master-header {
    min-height: 46px !important;
    padding: 11px 15px 8px !important;
    border-bottom: 1px solid #eef2f6;
}

.implant-plan-master-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.implant-plan-master-label > strong {
    color: #182535;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .07em;
}

.implant-plan-type-chip,
.implant-plan-status-chip {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    font-size: 8.5px;
    font-weight: 800;
    line-height: 1;
}

.implant-plan-type-chip {
    padding: 5px 8px;
    border: 1px solid #dce7f1;
    background: #f7fafc;
    color: #526176;
}

.implant-plan-status-chip {
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid #ccebdc;
    background: #f2fbf6;
    color: #198754;
}

.implant-plan-status-chip i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, .08);
}

.implant-plan-master-body {
    padding: 12px 15px 10px !important;
}

.implant-plan-master-summary {
    display: grid;
    grid-template-columns: minmax(200px, .85fr) minmax(0, 1.7fr);
    gap: 22px;
    align-items: center;
}

.implant-plan-master-title {
    min-width: 0;
}

.implant-plan-master-title h3 {
    margin: 0;
    color: #172334;
    font-size: 15px;
    font-weight: 850;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
}

.implant-plan-master-title p {
    min-height: 0 !important;
    margin: 4px 0 0 !important;
    color: #8290a2 !important;
    font-size: 9px !important;
    line-height: 1.35 !important;
}

.implant-process-summary-grid-compact .implant-plan-master-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border: 0;
}

.implant-process-summary-grid-compact .implant-plan-master-meta > div {
    min-height: 44px;
    padding: 7px 9px;
    border: 1px solid #edf1f5;
    border-radius: 9px;
    background: #fafbfd;
}

.implant-process-summary-grid-compact .implant-plan-master-meta > div + div {
    border-top: 1px solid #edf1f5;
}

.implant-process-summary-grid-compact .implant-plan-master-meta span {
    font-size: 8px;
}

.implant-process-summary-grid-compact .implant-plan-master-meta strong {
    max-width: 100%;
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.implant-plan-master-card .implant-plan-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin: 0 15px 12px;
}

.implant-plan-master-card .implant-plan-card-actions > button,
.implant-plan-master-card .implant-plan-card-actions > form {
    width: auto;
    flex: 0 0 auto;
}

.implant-plan-master-card .implant-plan-card-actions .implant-process-summary-action,
.implant-plan-master-card .implant-plan-card-actions .implant-plan-card-complete-action {
    width: auto;
    min-width: 0;
    min-height: 28px;
    padding: 5px 9px;
    font-size: 8px;
    border-radius: 7px;
}

/* Second row: operational cards carry more visual weight. */
.implant-process-summary-grid-compact .implant-process-compact-card.is-implants,
.implant-process-summary-grid-compact .implant-process-compact-card.is-control {
    min-height: 248px;
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(15, 23, 42, .055);
}

.implant-process-summary-grid-compact .implant-process-compact-card.is-implants {
    border-color: #d9e7fa;
}

.implant-process-summary-grid-compact .implant-process-compact-card.is-control {
    border-color: #e1e6ed;
}

.implant-process-summary-grid-compact .is-implants .implant-process-summary-header,
.implant-process-summary-grid-compact .is-control .implant-process-summary-header {
    min-height: 50px;
    padding: 12px 15px 9px;
}

.implant-process-summary-grid-compact .is-implants .implant-process-summary-body,
.implant-process-summary-grid-compact .is-control .implant-process-summary-body {
    padding: 0 15px 10px;
}

.implant-process-summary-grid-compact .is-implants .implant-process-summary-body > p,
.implant-process-summary-grid-compact .is-control .implant-process-summary-body > p {
    min-height: 34px;
    margin-bottom: 8px;
}

.implant-process-summary-grid-compact .is-implants .implant-process-summary-action,
.implant-process-summary-grid-compact .is-control .implant-process-summary-action {
    width: auto;
    align-self: flex-start;
    margin: 0 15px 12px;
    padding: 5px 9px;
}

@media (max-width: 820px) {
    .implant-plan-master-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .implant-process-summary-grid-compact .implant-plan-master-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .implant-process-summary-grid-compact {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .implant-process-summary-grid-compact .implant-plan-master-card {
        grid-column: auto;
    }

    .implant-process-summary-grid-compact .implant-plan-master-meta {
        grid-template-columns: 1fr;
    }

    .implant-plan-master-card .implant-plan-card-actions {
        display: flex;
        flex-wrap: wrap;
        margin-left: 14px;
        margin-right: 14px;
    }
}

/* Medibox v343 — simplified plan actions + detailed previous plans table */
.implant-no-current-plan-bar.implant-no-current-plan-bar-plus-only {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.implant-plan-master-icon-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
}

.implant-plan-master-icon-actions .implant-inline-form {
    display: inline-flex;
    margin: 0;
}

.implant-plan-header-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 27px !important;
    height: 27px !important;
    min-width: 27px !important;
    padding: 0 !important;
    border-radius: 7px !important;
    text-decoration: none;
}

.implant-plan-header-action svg {
    width: 13px;
    height: 13px;
}

.implant-plan-header-action.is-complete {
    border-color: #bfe7cf !important;
    background: #f0faf4 !important;
    color: #14864d !important;
}

.implant-plan-header-action.is-complete:hover,
.implant-plan-header-action.is-complete:focus-visible {
    border-color: #94d5ae !important;
    background: #e6f7ed !important;
}

.implant-plan-header-action.is-danger {
    border-color: #f1d1d4 !important;
    background: #fff7f7 !important;
    color: #c94b54 !important;
}

.implant-plan-header-action.is-danger:hover,
.implant-plan-header-action.is-danger:focus-visible {
    border-color: #e9b7bc !important;
    background: #fff0f1 !important;
}

/* The former PLAN footer is intentionally removed; actions live in the header. */
.implant-plan-master-card .implant-plan-master-body {
    padding-bottom: 13px !important;
}

.implant-previous-procedures-header-simple h2 {
    font-size: 15px;
}

.implant-previous-plan-table-wrap-detailed {
    width: 100%;
    max-width: none;
    overflow-x: auto;
    border-radius: 12px;
}

.implant-previous-plan-table-detailed {
    width: 100%;
    min-width: 1120px;
    table-layout: auto;
}

.implant-previous-plan-table-detailed th,
.implant-previous-plan-table-detailed td {
    padding: 9px 9px;
    vertical-align: middle;
}

.implant-previous-plan-table-detailed th {
    font-size: 8.5px;
    white-space: nowrap;
}

.implant-previous-plan-table-detailed td {
    font-size: 10px;
}

.implant-previous-plan-table-detailed .implant-previous-plan-table-procedure {
    min-width: 150px;
}

.implant-previous-plan-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 4px 7px;
    border: 1px solid #dfe7ef;
    border-radius: 999px;
    background: #f7fafc;
    color: #526176;
    font-size: 8.5px;
    font-weight: 800;
    white-space: nowrap;
}

.implant-previous-plan-table-money {
    white-space: nowrap;
    font-weight: 750;
    color: #334155;
}

.implant-previous-plan-table-notes {
    max-width: 210px;
    color: #64748b;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

.implant-previous-plan-table-detailed .implant-previous-plan-table-actions {
    min-width: 142px;
}

@media (max-width: 760px) {
    .implant-plan-master-header {
        align-items: flex-start !important;
        gap: 8px;
    }

    .implant-plan-master-icon-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

/* Medibox v344 — active-procedure empty state, uniform history table, complete details */
.implant-empty-active-procedure {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 54px;
    padding: 10px 12px 10px 15px;
    border: 1px solid #e3e9f0;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .025);
}
.implant-empty-active-procedure p {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}
.implant-add-procedure-cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 31px;
    padding: 5px 7px 5px 10px;
    border: 1px solid #d9e5f4;
    border-radius: 9px;
    background: #f8fbff;
    color: #315f91;
    font: inherit;
    font-size: 9.5px;
    font-weight: 750;
    cursor: pointer;
    transition: .16s ease;
}
.implant-add-procedure-cta b {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #e9f2ff;
    color: #2563eb;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
}
.implant-add-procedure-cta:hover,
.implant-add-procedure-cta:focus-visible {
    border-color: #bfd3eb;
    background: #f4f8fd;
    color: #244f7d;
    outline: none;
}

/* All history columns use one compact visual language. */
.implant-previous-plan-table-detailed th {
    padding: 7px 8px;
    color: #7d8998;
    font-size: 8px !important;
    font-weight: 700 !important;
    letter-spacing: .015em;
}
.implant-previous-plan-table-detailed td,
.implant-previous-plan-table-detailed td strong,
.implant-previous-plan-table-detailed td small,
.implant-previous-plan-table-detailed .implant-previous-plan-type-badge,
.implant-previous-plan-table-detailed .implant-previous-plan-table-status,
.implant-previous-plan-table-detailed .implant-previous-plan-table-number,
.implant-previous-plan-table-detailed .implant-previous-plan-table-money {
    font-size: 8.5px !important;
    font-weight: 600 !important;
    line-height: 1.3;
}
.implant-previous-plan-table-detailed td {
    padding: 7px 8px;
    color: #526071;
}
.implant-previous-plan-table-detailed .implant-previous-plan-table-procedure strong,
.implant-previous-plan-table-detailed .implant-previous-plan-table-procedure small {
    color: #526071;
}
.implant-previous-plan-table-detailed .implant-previous-plan-type-badge,
.implant-previous-plan-table-detailed .implant-previous-plan-table-status {
    min-height: 19px;
    padding: 2px 6px;
    border-radius: 6px;
    background: #f7f9fb;
    border: 1px solid #e5e9ef;
    color: #526071;
}
.implant-previous-plan-table-detailed .implant-previous-plan-table-status svg {
    width: 9px;
    height: 9px;
}
.implant-previous-plan-table-detailed .implant-previous-plan-table-notes {
    max-width: 190px;
    color: #526071;
}
.implant-previous-plan-table-detailed .implant-previous-plan-table-actions {
    min-width: 130px;
}
.implant-previous-plan-table-detailed .implant-previous-plan-table-open,
.implant-previous-plan-table-detailed .implant-previous-plan-table-action {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 7px;
}
.implant-previous-plan-table-detailed .implant-previous-plan-table-open svg,
.implant-previous-plan-table-detailed .implant-previous-plan-table-action svg {
    width: 10px;
    height: 10px;
}

/* Complete details: all available bundle data remains visible in one scrollable modal. */
.implant-completed-details-dialog {
    width: min(1240px, calc(100vw - 20px));
}
.implant-completed-details-overview-full {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
.implant-completed-plan-grid-full,
.implant-completed-item-grid-full {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.implant-completed-plan-grid-full > div.is-wide,
.implant-completed-item-grid-full > div.is-wide {
    grid-column: 1 / -1;
}
.implant-completed-prosthetic-list {
    display: grid;
    gap: 7px;
    padding: 8px;
}
.implant-completed-prosthetic-item {
    overflow: hidden;
    border: 1px solid #e6ebf1;
    border-radius: 9px;
    background: #fff;
}
.implant-completed-finance-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.implant-completed-details-body {
    scrollbar-gutter: stable;
}
.implant-completed-details-body .implant-money-toggle {
    font-size: inherit;
    font-weight: inherit;
}

@media (max-width: 980px) {
    .implant-completed-details-overview-full {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .implant-completed-plan-grid-full,
    .implant-completed-item-grid-full,
    .implant-completed-finance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 620px) {
    .implant-empty-active-procedure {
        align-items: stretch;
        flex-direction: column;
    }
    .implant-add-procedure-cta {
        align-self: flex-end;
    }
    .implant-completed-details-overview-full,
    .implant-completed-plan-grid-full,
    .implant-completed-item-grid-full,
    .implant-completed-finance-grid {
        grid-template-columns: 1fr;
    }
}

/* Medibox v345 — truly uniform typography in previous procedures table */
.implant-previous-plan-table-detailed,
.implant-previous-plan-table-detailed *:not(svg):not(path) {
    font-family: Arial, Helvetica, sans-serif !important;
}

.implant-previous-plan-table-detailed th {
    font-size: 8px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: .01em !important;
}

.implant-previous-plan-table-detailed td,
.implant-previous-plan-table-detailed td strong,
.implant-previous-plan-table-detailed td small,
.implant-previous-plan-table-detailed td a,
.implant-previous-plan-table-detailed td button:not(.implant-previous-plan-table-open):not(.implant-previous-plan-table-action),
.implant-previous-plan-table-detailed .implant-previous-plan-type-badge,
.implant-previous-plan-table-detailed .implant-previous-plan-table-status,
.implant-previous-plan-table-detailed .implant-previous-plan-table-number,
.implant-previous-plan-table-detailed .implant-previous-plan-table-money,
.implant-previous-plan-table-detailed .implant-previous-plan-table-money .implant-money-toggle {
    font-size: 8.5px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
}

/* Plan title and case number use the same typography as every other cell. */
.implant-previous-plan-table-detailed .implant-previous-plan-table-procedure > a,
.implant-previous-plan-table-detailed .implant-previous-plan-table-procedure > button {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 260px;
    font-size: 8.5px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
}
.implant-previous-plan-table-detailed .implant-previous-plan-table-procedure strong,
.implant-previous-plan-table-detailed .implant-previous-plan-table-procedure small {
    display: inline;
    margin: 0;
    color: #526071 !important;
    font-size: 8.5px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
}
.implant-previous-plan-table-detailed .implant-previous-plan-table-procedure small::before {
    content: "·";
    margin-right: 4px;
    color: #9aa5b3;
}

/* Type/status keep only a subtle background; typography remains identical. */
.implant-previous-plan-table-detailed .implant-previous-plan-type-badge,
.implant-previous-plan-table-detailed .implant-previous-plan-table-status {
    min-height: 18px;
    padding: 2px 5px;
    border-radius: 5px;
}

/* Currency value must not look like a different typographic component inside the table. */
.implant-previous-plan-table-detailed .implant-previous-plan-table-money .implant-money-toggle {
    min-height: 0 !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #526071 !important;
    box-shadow: none !important;
    transform: none !important;
}

.implant-previous-plan-table-detailed .implant-previous-plan-table-number,
.implant-previous-plan-table-detailed .implant-previous-plan-table-money,
.implant-previous-plan-table-detailed .implant-previous-plan-table-doctor,
.implant-previous-plan-table-detailed .implant-previous-plan-table-notes {
    color: #526071 !important;
    font-weight: 500 !important;
}

/* Medibox v346 — normalize date/doctor typography and add compact doctor/value badges */
.implant-previous-plan-table-detailed .implant-previous-plan-table-date,
.implant-previous-plan-table-detailed .implant-previous-plan-table-date span,
.implant-previous-plan-table-detailed .implant-previous-plan-table-doctor,
.implant-previous-plan-table-detailed .implant-previous-plan-doctor-badge,
.implant-previous-plan-table-detailed .implant-previous-plan-table-money,
.implant-previous-plan-table-detailed .implant-previous-plan-value-badge,
.implant-previous-plan-table-detailed .implant-previous-plan-value-badge .implant-money-toggle {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 8.5px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
}
.implant-previous-plan-table-detailed .implant-previous-plan-table-date span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    color: #526071 !important;
    white-space: nowrap;
}
.implant-previous-plan-table-detailed .implant-previous-plan-doctor-badge,
.implant-previous-plan-table-detailed .implant-previous-plan-value-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 3px 7px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #526071 !important;
    white-space: nowrap;
    vertical-align: middle;
}
.implant-previous-plan-table-detailed .implant-previous-plan-doctor-badge {
    justify-content: flex-start;
}
.implant-previous-plan-table-detailed .implant-previous-plan-value-badge {
    min-width: 44px;
}
.implant-previous-plan-table-detailed .implant-previous-plan-value-badge .implant-money-toggle {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 0 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #526071 !important;
    box-shadow: none !important;
}
